@valentia-ai-skills/framework 2.0.6 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -13
- package/bin/cli.js +873 -103
- package/package.json +1 -1
- package/skills/global/aisupportapp-project-architecture/SKILL.md +1 -1
- package/skills/global/aisupportapp-project-conventions/SKILL.md +1 -1
- package/skills/global/aisupportapp-project-workflows/SKILL.md +1 -1
- package/skills/global/api-design/SKILL.md +1 -1
- package/skills/global/appointment-oas-app/SKILL.md +1 -1
- package/skills/global/code-quality-auditor/SKILL.md +704 -0
- package/skills/global/code-standards/SKILL.md +1 -1
- package/skills/global/codebase-legacy-intelligence/SKILL.md +1 -1
- package/skills/global/legacy-api-converter/SKILL.md +979 -0
- package/skills/global/legacy-redevelopment-planner/SKILL.md +622 -0
- package/skills/global/observability-integrations/SKILL.md +835 -0
- package/skills/global/project-scanner/SKILL.md +1 -1
- package/skills/global/ui-replication-engine/SKILL.md +591 -0
- package/skills/global/aisupportapp-test-installation/SKILL.md +0 -32
- package/skills/global/viteapp-core-workflows/SKILL.md +0 -32
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: legacy-redevelopment-planner
|
|
3
|
+
description: Reads the intelligence package generated by the codebase-legacy-intelligence skill and produces a comprehensive, sprint-ready redevelopment plan for rebuilding the application in a modern tech stack. Covers tech stack selection, architecture design, phased migration strategy, module dependency ordering, risk assessment, data migration plan, API compatibility layer, testing strategy, and sprint-level task breakdowns. Use this skill whenever someone wants to: plan a rewrite of a legacy app, migrate from one framework to another (e.g., .NET MVC to React, jQuery to React, monolith to microservices), create a development roadmap from legacy intelligence files, plan a modernization effort, estimate effort for rebuilding an application, or decide on a migration strategy (strangler fig, big bang, parallel run). Also trigger when someone says things like "plan the rebuild", "how should we rewrite this", "migrate this to React", "modernize this app", "create a development plan from the scan", "what would it take to rebuild this", or "plan the redevelopment". This skill expects the output from codebase-legacy-intelligence as input — specifically the MASTER_SKILL.md, module SKILL.md files, BUSINESS_RULES.md, API_REGISTRY.md, DATA_MODELS.md, DEPENDENCIES.md, and REPRODUCTION_GUIDE.md.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
scope: global
|
|
6
|
+
last_reviewed: 2026-04-02
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
name: legacy-redevelopment-planner
|
|
11
|
+
description: >
|
|
12
|
+
Reads the intelligence package generated by the codebase-legacy-intelligence skill and produces
|
|
13
|
+
a comprehensive, sprint-ready redevelopment plan for rebuilding the application in a modern tech
|
|
14
|
+
stack. Covers tech stack selection, architecture design, phased migration strategy, module
|
|
15
|
+
dependency ordering, risk assessment, data migration plan, API compatibility layer, testing
|
|
16
|
+
strategy, and sprint-level task breakdowns. Use this skill whenever someone wants to: plan a
|
|
17
|
+
rewrite of a legacy app, migrate from one framework to another (e.g., .NET MVC to React, jQuery
|
|
18
|
+
to React, monolith to microservices), create a development roadmap from legacy intelligence files,
|
|
19
|
+
plan a modernization effort, estimate effort for rebuilding an application, or decide on a
|
|
20
|
+
migration strategy (strangler fig, big bang, parallel run). Also trigger when someone says things
|
|
21
|
+
like "plan the rebuild", "how should we rewrite this", "migrate this to React", "modernize this
|
|
22
|
+
app", "create a development plan from the scan", "what would it take to rebuild this", or
|
|
23
|
+
"plan the redevelopment". This skill expects the output from codebase-legacy-intelligence as input
|
|
24
|
+
— specifically the MASTER_SKILL.md, module SKILL.md files, BUSINESS_RULES.md, API_REGISTRY.md,
|
|
25
|
+
DATA_MODELS.md, DEPENDENCIES.md, and REPRODUCTION_GUIDE.md.
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# Legacy Redevelopment Planner
|
|
29
|
+
|
|
30
|
+
You are a senior technical architect and project planner. Your job is to read the intelligence package from a legacy codebase scan and produce a **production-grade redevelopment plan** — not a vague roadmap, but a concrete, phased, sprint-ready plan that a development team can execute from day one.
|
|
31
|
+
|
|
32
|
+
## Philosophy
|
|
33
|
+
|
|
34
|
+
Rewrites fail for predictable reasons: underestimating hidden business logic, wrong migration strategy, breaking changes in the API layer that downstream consumers can't absorb, data migration disasters, and scope creep from discovering undocumented behavior mid-build. Your plan must anticipate and address all of these. Every decision must be justified with evidence from the intelligence package.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Step 0: Ingest the Intelligence Package
|
|
39
|
+
|
|
40
|
+
Before planning anything, read and deeply understand the legacy application.
|
|
41
|
+
|
|
42
|
+
### Locating the Intelligence Package
|
|
43
|
+
|
|
44
|
+
The intelligence package can be in one of these locations:
|
|
45
|
+
|
|
46
|
+
1. **Installed via CLI** (most common for team members): `.ai-skills/legacy-projects/{projectname}/`
|
|
47
|
+
2. **Local scan output** (for the developer who ran the scan): `./{projectname}-intelligence/`
|
|
48
|
+
3. **Custom path**: The user specifies where it is
|
|
49
|
+
|
|
50
|
+
Check in this order:
|
|
51
|
+
1. Ask the user: "Which legacy project are you planning for?" — get the project name
|
|
52
|
+
2. Look for `.ai-skills/legacy-projects/{projectname}/` — if found, use it
|
|
53
|
+
3. Look for `./{projectname}-intelligence/` — if found, use it
|
|
54
|
+
4. If neither found, ask the user for the path
|
|
55
|
+
5. Verify `manifest.json` exists in the folder — if not, this isn't a valid intelligence package
|
|
56
|
+
|
|
57
|
+
### Required Files — Read in This Order:
|
|
58
|
+
|
|
59
|
+
1. **manifest.json** — Project metadata, file inventory, statistics (read first to understand scope)
|
|
60
|
+
2. **OVERVIEW.md** — Tech stack, architecture, project scale
|
|
61
|
+
3. **MASTER_SKILL.md** — Full architecture, cross-cutting concerns, module map
|
|
62
|
+
4. **BUSINESS_RULES.md** — Every extracted business rule (this is critical — rules drive effort estimation)
|
|
63
|
+
5. **API_REGISTRY.md** — All endpoints exposed and consumed
|
|
64
|
+
6. **DATA_MODELS.md** — Every entity, relationship, constraint
|
|
65
|
+
7. **DEPENDENCIES.md** — External packages and service integrations
|
|
66
|
+
8. **ENV_CONFIG.md** — Environment variables, feature flags, secrets
|
|
67
|
+
9. **RISK_REPORT.md** — Tech debt, anti-patterns, security concerns
|
|
68
|
+
10. **REPRODUCTION_GUIDE.md** — Rebuild order and dependency chain
|
|
69
|
+
11. **Module SKILL.md files** — Read every file in `modules/*/SKILL.md` for per-module deep dive
|
|
70
|
+
12. **Mermaid diagrams** — Read every `.mermaid` file in `diagrams/`
|
|
71
|
+
|
|
72
|
+
If any file is missing, note it — it affects planning confidence. If BUSINESS_RULES.md or API_REGISTRY.md are missing, warn the user that estimation accuracy will be significantly reduced.
|
|
73
|
+
|
|
74
|
+
Build a mental model of the entire application before proceeding. You need to understand:
|
|
75
|
+
- What the app does (business domain)
|
|
76
|
+
- How big it is (modules, endpoints, rules, entities)
|
|
77
|
+
- What's tightly coupled vs loosely coupled
|
|
78
|
+
- Where the complexity lives (which modules have the most business rules)
|
|
79
|
+
- What external dependencies exist (APIs, services, databases)
|
|
80
|
+
- What the risk hotspots are
|
|
81
|
+
|
|
82
|
+
### Then Ask the User:
|
|
83
|
+
|
|
84
|
+
1. **Target tech stack**: What do you want to rebuild in? (React, Next.js, Vue, Angular, etc. for frontend; Node/Express, NestJS, .NET Core, Python/FastAPI, etc. for backend; PostgreSQL, MongoDB, etc. for database). If they're unsure, recommend based on the application's needs.
|
|
85
|
+
2. **Migration strategy preference**: Big bang rewrite, strangler fig (incremental), or parallel run? If unsure, you'll recommend.
|
|
86
|
+
3. **Team size and composition**: How many developers? Frontend/backend split? Any expertise gaps?
|
|
87
|
+
4. **Timeline constraints**: Is there a deadline? A budget ceiling?
|
|
88
|
+
5. **Must-keep constraints**: Anything that must stay the same? (Same database? Same API contracts for external consumers? Same auth provider?)
|
|
89
|
+
6. **Priority modules**: Which features are most critical to get right first?
|
|
90
|
+
7. **Current pain points**: What's driving the rewrite? (Performance? Maintainability? Hiring? End of life for framework?)
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Step 1: Migration Strategy Assessment
|
|
95
|
+
|
|
96
|
+
Based on the intelligence package and user inputs, recommend the right migration strategy. This is the most consequential decision in the plan.
|
|
97
|
+
|
|
98
|
+
### Evaluate Each Strategy:
|
|
99
|
+
|
|
100
|
+
**Big Bang Rewrite**
|
|
101
|
+
- Suitable when: app is small-medium (<20 modules), team is strong, legacy app can be frozen during rebuild, no external API consumers that can't handle downtime
|
|
102
|
+
- Risk: if it takes longer than expected, you're maintaining two codebases
|
|
103
|
+
- Evidence to check: module count, coupling score from RISK_REPORT.md, external API consumer count from API_REGISTRY.md
|
|
104
|
+
|
|
105
|
+
**Strangler Fig (Incremental)**
|
|
106
|
+
- Suitable when: app is large, has external API consumers, can't freeze the legacy app, team needs to ship value during migration
|
|
107
|
+
- Requires: an API compatibility layer or proxy that routes between old and new
|
|
108
|
+
- Evidence to check: module dependency graph (which modules can be extracted independently?), API surface stability
|
|
109
|
+
|
|
110
|
+
**Parallel Run**
|
|
111
|
+
- Suitable when: the app is critical (healthcare, finance), correctness must be verified before cutover, you can afford to run both systems temporarily
|
|
112
|
+
- Requires: traffic mirroring, output comparison tooling
|
|
113
|
+
- Evidence to check: data sensitivity from BUSINESS_RULES.md, calculation complexity
|
|
114
|
+
|
|
115
|
+
### Output: `MIGRATION_STRATEGY.md`
|
|
116
|
+
|
|
117
|
+
```markdown
|
|
118
|
+
# Migration Strategy
|
|
119
|
+
|
|
120
|
+
## Recommendation: {strategy name}
|
|
121
|
+
|
|
122
|
+
### Why This Strategy
|
|
123
|
+
{Justify with specific evidence from the intelligence package — module count, coupling,
|
|
124
|
+
external consumers, business rule complexity, team constraints}
|
|
125
|
+
|
|
126
|
+
### Why Not the Alternatives
|
|
127
|
+
{Explain why other strategies are less suitable for THIS specific project}
|
|
128
|
+
|
|
129
|
+
### Strategy-Specific Plan
|
|
130
|
+
{For strangler fig: which modules to extract first and why}
|
|
131
|
+
{For big bang: how to manage the parallel development period}
|
|
132
|
+
{For parallel run: how to set up traffic mirroring and comparison}
|
|
133
|
+
|
|
134
|
+
### Risk Mitigation
|
|
135
|
+
{Top 5 risks specific to this strategy + mitigation plan for each}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Step 2: Target Architecture Design
|
|
141
|
+
|
|
142
|
+
Design the new architecture based on the legacy app's needs and the target tech stack.
|
|
143
|
+
|
|
144
|
+
### Actions:
|
|
145
|
+
1. Map each legacy module to its equivalent in the new stack
|
|
146
|
+
2. Design the new module boundaries — this is a chance to fix coupling issues flagged in RISK_REPORT.md
|
|
147
|
+
3. Define the new data model — migrate entities from DATA_MODELS.md, fixing any schema issues
|
|
148
|
+
4. Design the API layer — maintain backward compatibility if external consumers exist
|
|
149
|
+
5. Plan the authentication/authorization architecture
|
|
150
|
+
6. Design the state management approach (frontend)
|
|
151
|
+
7. Plan infrastructure (hosting, CI/CD, monitoring)
|
|
152
|
+
|
|
153
|
+
### Output: `TARGET_ARCHITECTURE.md`
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
# Target Architecture
|
|
157
|
+
|
|
158
|
+
## Tech Stack
|
|
159
|
+
| Layer | Technology | Justification |
|
|
160
|
+
|-------|-----------|---------------|
|
|
161
|
+
| Frontend | {framework} | {why this fits the app's needs} |
|
|
162
|
+
| Backend | {framework} | {why} |
|
|
163
|
+
| Database | {engine} | {why — migrate or keep?} |
|
|
164
|
+
| Auth | {provider/approach} | {why} |
|
|
165
|
+
| Hosting | {platform} | {why} |
|
|
166
|
+
| CI/CD | {tool} | {why} |
|
|
167
|
+
|
|
168
|
+
## Module Map: Legacy → New
|
|
169
|
+
| Legacy Module | New Module(s) | Changes | Complexity |
|
|
170
|
+
|---------------|--------------|---------|------------|
|
|
171
|
+
| {old name} | {new name(s)} | {split/merged/renamed/restructured} | {low/med/high} |
|
|
172
|
+
|
|
173
|
+
## Architecture Diagram
|
|
174
|
+
{Mermaid diagram of the new system architecture}
|
|
175
|
+
|
|
176
|
+
## Data Model Changes
|
|
177
|
+
| Legacy Entity | New Entity | Changes | Migration Notes |
|
|
178
|
+
|---------------|-----------|---------|-----------------|
|
|
179
|
+
| {old} | {new} | {field changes, type changes, relationship changes} | {data transformation needed} |
|
|
180
|
+
|
|
181
|
+
## API Compatibility
|
|
182
|
+
| Legacy Endpoint | New Endpoint | Breaking Changes | Mitigation |
|
|
183
|
+
|----------------|-------------|-----------------|------------|
|
|
184
|
+
| {old} | {new} | {yes/no — what changed} | {adapter, versioning, deprecation period} |
|
|
185
|
+
|
|
186
|
+
## New Architecture Patterns
|
|
187
|
+
{What patterns will the new app use? Why are they better than the legacy patterns?}
|
|
188
|
+
|
|
189
|
+
## Infrastructure
|
|
190
|
+
{Hosting, deployment, monitoring, logging plan}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Output: `diagrams/target-architecture.mermaid`
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Step 3: Effort Estimation
|
|
198
|
+
|
|
199
|
+
This is where the intelligence package pays off. You have every business rule, endpoint, entity, and integration cataloged — use them for evidence-based estimation.
|
|
200
|
+
|
|
201
|
+
### Estimation Method:
|
|
202
|
+
|
|
203
|
+
For each module, count:
|
|
204
|
+
- **Endpoints** (from API_REGISTRY.md) → each endpoint = base effort unit
|
|
205
|
+
- **Business rules** (from BUSINESS_RULES.md) → each rule = complexity multiplier
|
|
206
|
+
- **Entities** (from DATA_MODELS.md) → each entity = data layer effort
|
|
207
|
+
- **External integrations** (from DEPENDENCIES.md) → each integration = integration effort + risk buffer
|
|
208
|
+
- **State transitions** (from BUSINESS_RULES.md) → each state machine = high complexity
|
|
209
|
+
- **Calculations/formulas** (from BUSINESS_RULES.md) → each formula = precision-critical effort
|
|
210
|
+
|
|
211
|
+
### Complexity Scoring Per Module:
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
Simple module: <5 endpoints, <10 rules, <3 entities, no external integrations
|
|
215
|
+
Medium module: 5-15 endpoints, 10-30 rules, 3-8 entities, 1-2 integrations
|
|
216
|
+
Complex module: >15 endpoints, >30 rules, >8 entities, >2 integrations, state machines
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Output: `EFFORT_ESTIMATION.md`
|
|
220
|
+
|
|
221
|
+
```markdown
|
|
222
|
+
# Effort Estimation
|
|
223
|
+
|
|
224
|
+
## Module-by-Module Breakdown
|
|
225
|
+
|
|
226
|
+
### {Module Name}
|
|
227
|
+
- **Endpoints**: {count} ({list key ones})
|
|
228
|
+
- **Business Rules**: {count} ({note the complex ones})
|
|
229
|
+
- **Entities**: {count}
|
|
230
|
+
- **External Integrations**: {count}
|
|
231
|
+
- **State Machines**: {yes/no}
|
|
232
|
+
- **Complexity**: {simple/medium/complex}
|
|
233
|
+
- **Estimated Effort**: {story points or developer-days}
|
|
234
|
+
- **Risk Buffer**: {percentage — higher for modules with many cross-module rules or external integrations}
|
|
235
|
+
- **Notes**: {anything that could increase/decrease effort}
|
|
236
|
+
|
|
237
|
+
## Summary
|
|
238
|
+
| Module | Complexity | Base Effort | Risk Buffer | Total |
|
|
239
|
+
|--------|-----------|-------------|-------------|-------|
|
|
240
|
+
| ... | ... | ... | ... | ... |
|
|
241
|
+
|
|
242
|
+
## Total Project Estimate
|
|
243
|
+
- **Base effort**: {sum}
|
|
244
|
+
- **Risk buffer**: {sum of buffers}
|
|
245
|
+
- **Data migration**: {separate estimate}
|
|
246
|
+
- **Testing & QA**: {separate estimate — typically 30-40% of dev effort}
|
|
247
|
+
- **DevOps & infrastructure**: {separate estimate}
|
|
248
|
+
- **Grand total**: {sum}
|
|
249
|
+
|
|
250
|
+
## Estimation Confidence
|
|
251
|
+
{How confident are you in this estimate? What could blow it up?
|
|
252
|
+
Reference specific unknowns from the intelligence package.}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Step 4: Phase Planning
|
|
258
|
+
|
|
259
|
+
Break the redevelopment into phases. Each phase should deliver usable value and build on the previous one.
|
|
260
|
+
|
|
261
|
+
### Phase Design Principles:
|
|
262
|
+
1. **Dependency order first**: The REPRODUCTION_GUIDE.md has the build order — respect it
|
|
263
|
+
2. **Foundation before features**: Auth, data layer, shared utilities come first
|
|
264
|
+
3. **High-risk modules early**: Tackle complex/risky modules in early phases when there's time to course-correct
|
|
265
|
+
4. **Quick wins for momentum**: Include at least one simple, visible module in Phase 1
|
|
266
|
+
5. **API compatibility throughout**: If using strangler fig, each phase must maintain API compatibility
|
|
267
|
+
|
|
268
|
+
### Output: `PHASE_PLAN.md`
|
|
269
|
+
|
|
270
|
+
```markdown
|
|
271
|
+
# Phase Plan
|
|
272
|
+
|
|
273
|
+
## Phase 0: Foundation ({estimated duration})
|
|
274
|
+
### Objective
|
|
275
|
+
Set up the project scaffold, CI/CD, auth, database, and shared infrastructure.
|
|
276
|
+
|
|
277
|
+
### Deliverables
|
|
278
|
+
- [ ] Project repository initialized with {target stack}
|
|
279
|
+
- [ ] CI/CD pipeline configured
|
|
280
|
+
- [ ] Database schema migrated (see DATA_MIGRATION.md)
|
|
281
|
+
- [ ] Authentication system implemented
|
|
282
|
+
- [ ] Shared utilities and base components created
|
|
283
|
+
- [ ] API compatibility layer / proxy set up (if strangler fig)
|
|
284
|
+
- [ ] Monitoring and logging configured
|
|
285
|
+
|
|
286
|
+
### Dependencies
|
|
287
|
+
None — this is the foundation.
|
|
288
|
+
|
|
289
|
+
### Risk
|
|
290
|
+
{Phase-specific risks and mitigations}
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Phase 1: {Phase Name} ({estimated duration})
|
|
295
|
+
### Objective
|
|
296
|
+
{What this phase achieves}
|
|
297
|
+
|
|
298
|
+
### Modules Included
|
|
299
|
+
| Module | Key Features | Business Rules | Complexity |
|
|
300
|
+
|--------|-------------|----------------|------------|
|
|
301
|
+
| {module} | {features being built} | {rule IDs from BUSINESS_RULES.md} | {complexity} |
|
|
302
|
+
|
|
303
|
+
### Deliverables
|
|
304
|
+
- [ ] {Specific deliverable with acceptance criteria}
|
|
305
|
+
- [ ] {Another deliverable}
|
|
306
|
+
|
|
307
|
+
### Dependencies
|
|
308
|
+
- Phase 0 complete
|
|
309
|
+
- {Any specific modules or infrastructure needed}
|
|
310
|
+
|
|
311
|
+
### Migration Steps (if strangler fig)
|
|
312
|
+
{How to cut over this module from legacy to new — routing changes, data sync, etc.}
|
|
313
|
+
|
|
314
|
+
### Risk
|
|
315
|
+
{Phase-specific risks}
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
{Repeat for each phase}
|
|
320
|
+
|
|
321
|
+
## Phase N: Cutover & Decommission
|
|
322
|
+
### Objective
|
|
323
|
+
Final migration, legacy system shutdown.
|
|
324
|
+
|
|
325
|
+
### Deliverables
|
|
326
|
+
- [ ] All traffic routed to new system
|
|
327
|
+
- [ ] Data migration verified
|
|
328
|
+
- [ ] Legacy system decommissioned
|
|
329
|
+
- [ ] Post-migration monitoring period complete
|
|
330
|
+
- [ ] Documentation updated
|
|
331
|
+
|
|
332
|
+
## Timeline Summary
|
|
333
|
+
| Phase | Duration | Modules | Cumulative Progress |
|
|
334
|
+
|-------|----------|---------|-------------------|
|
|
335
|
+
| 0 | {weeks} | Foundation | Infrastructure ready |
|
|
336
|
+
| 1 | {weeks} | {modules} | {X}% of features live |
|
|
337
|
+
| ... | ... | ... | ... |
|
|
338
|
+
| N | {weeks} | Cutover | 100% |
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## Step 5: Data Migration Plan
|
|
344
|
+
|
|
345
|
+
Data migration is where rewrites go to die. Plan it explicitly.
|
|
346
|
+
|
|
347
|
+
### Output: `DATA_MIGRATION.md`
|
|
348
|
+
|
|
349
|
+
```markdown
|
|
350
|
+
# Data Migration Plan
|
|
351
|
+
|
|
352
|
+
## Strategy: {approach}
|
|
353
|
+
{Big bang migration / rolling migration / dual-write / event sourcing replay}
|
|
354
|
+
|
|
355
|
+
## Schema Changes
|
|
356
|
+
| Legacy Table | New Table | Transformation |
|
|
357
|
+
|-------------|----------|----------------|
|
|
358
|
+
| {old} | {new} | {field renames, type conversions, splits, merges, computed fields} |
|
|
359
|
+
|
|
360
|
+
## Data Transformation Rules
|
|
361
|
+
### {Transformation Name}
|
|
362
|
+
- **Source**: {legacy table.column}
|
|
363
|
+
- **Target**: {new table.column}
|
|
364
|
+
- **Transform**: {exact transformation logic}
|
|
365
|
+
- **Edge Cases**: {nulls, invalid data, orphaned records}
|
|
366
|
+
|
|
367
|
+
## Migration Scripts
|
|
368
|
+
{Description of scripts needed — what they do, what order to run them}
|
|
369
|
+
|
|
370
|
+
## Verification
|
|
371
|
+
| Check | Method | Acceptance Criteria |
|
|
372
|
+
|-------|--------|-------------------|
|
|
373
|
+
| Row counts match | {query comparison} | {exact match or known delta} |
|
|
374
|
+
| Referential integrity | {FK validation} | {zero orphans} |
|
|
375
|
+
| Business rule compliance | {rule validation} | {all rules pass on migrated data} |
|
|
376
|
+
| Calculation accuracy | {formula verification} | {results match within tolerance} |
|
|
377
|
+
|
|
378
|
+
## Rollback Plan
|
|
379
|
+
{How to roll back if migration fails — backup strategy, point-in-time recovery}
|
|
380
|
+
|
|
381
|
+
## Downtime Estimate
|
|
382
|
+
{How long the database will be unavailable during migration, if at all}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## Step 6: Sprint Breakdown
|
|
388
|
+
|
|
389
|
+
Turn phases into actionable sprints. Each sprint should be 1-2 weeks with clear deliverables.
|
|
390
|
+
|
|
391
|
+
### Output: `SPRINT_PLAN.md`
|
|
392
|
+
|
|
393
|
+
```markdown
|
|
394
|
+
# Sprint Plan
|
|
395
|
+
|
|
396
|
+
## Sprint Conventions
|
|
397
|
+
- **Duration**: {1 or 2 weeks}
|
|
398
|
+
- **Team**: {size and roles}
|
|
399
|
+
- **Definition of Done**: {what "done" means — tests passing, code reviewed, deployed to staging, etc.}
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
## Phase 0 Sprints
|
|
404
|
+
|
|
405
|
+
### Sprint 0.1: Project Bootstrap
|
|
406
|
+
**Goal**: Repo, CI/CD, and dev environment ready
|
|
407
|
+
|
|
408
|
+
| Task | Assignee Role | Points | Details |
|
|
409
|
+
|------|--------------|--------|---------|
|
|
410
|
+
| Initialize {framework} project | Full-stack | {pts} | {specifics} |
|
|
411
|
+
| Configure CI/CD pipeline | DevOps | {pts} | {specifics} |
|
|
412
|
+
| Set up database | Backend | {pts} | {specifics} |
|
|
413
|
+
| Configure linting, formatting, testing | Full-stack | {pts} | {specifics} |
|
|
414
|
+
|
|
415
|
+
**Sprint Capacity**: {total points}
|
|
416
|
+
**Risk**: {any sprint-specific risk}
|
|
417
|
+
|
|
418
|
+
### Sprint 0.2: Auth & Core Infrastructure
|
|
419
|
+
**Goal**: Authentication working, shared utilities built
|
|
420
|
+
|
|
421
|
+
| Task | Assignee Role | Points | Details |
|
|
422
|
+
|------|--------------|--------|---------|
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Phase 1 Sprints
|
|
427
|
+
|
|
428
|
+
### Sprint 1.1: {Module Name} — Data Layer & API
|
|
429
|
+
**Goal**: {module} backend complete with all endpoints and business rules
|
|
430
|
+
|
|
431
|
+
| Task | Assignee Role | Points | Details |
|
|
432
|
+
|------|--------------|--------|---------|
|
|
433
|
+
| Create {entity} models | Backend | {pts} | Fields: {from DATA_MODELS.md} |
|
|
434
|
+
| Implement {endpoint} | Backend | {pts} | Rules: {rule IDs from BUSINESS_RULES.md} |
|
|
435
|
+
| Write tests for {rules} | Backend | {pts} | Cover: {specific edge cases} |
|
|
436
|
+
|
|
437
|
+
### Sprint 1.2: {Module Name} — Frontend
|
|
438
|
+
**Goal**: {module} UI complete and connected to API
|
|
439
|
+
|
|
440
|
+
| Task | Assignee Role | Points | Details |
|
|
441
|
+
|------|--------------|--------|---------|
|
|
442
|
+
|
|
443
|
+
{Continue for all sprints across all phases}
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## Sprint Summary
|
|
448
|
+
| Sprint | Phase | Goal | Points | Modules Touched |
|
|
449
|
+
|--------|-------|------|--------|----------------|
|
|
450
|
+
| 0.1 | 0 | Bootstrap | {pts} | Infrastructure |
|
|
451
|
+
| 0.2 | 0 | Auth & Core | {pts} | Auth, Shared |
|
|
452
|
+
| 1.1 | 1 | {module} Backend | {pts} | {module} |
|
|
453
|
+
| ... | ... | ... | ... | ... |
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
---
|
|
457
|
+
|
|
458
|
+
## Step 7: Testing Strategy
|
|
459
|
+
|
|
460
|
+
### Output: `TESTING_STRATEGY.md`
|
|
461
|
+
|
|
462
|
+
```markdown
|
|
463
|
+
# Testing Strategy
|
|
464
|
+
|
|
465
|
+
## Approach
|
|
466
|
+
{How testing fits into the redevelopment — what gets tested when, by whom}
|
|
467
|
+
|
|
468
|
+
## Test Categories
|
|
469
|
+
|
|
470
|
+
### Unit Tests
|
|
471
|
+
- **Scope**: Every business rule from BUSINESS_RULES.md gets a unit test
|
|
472
|
+
- **Coverage target**: {percentage}
|
|
473
|
+
- **Key areas**: {list the modules with most complex logic}
|
|
474
|
+
|
|
475
|
+
### Integration Tests
|
|
476
|
+
- **Scope**: API endpoints, database queries, external service integrations
|
|
477
|
+
- **Focus**: Every endpoint in API_REGISTRY.md tested with happy path + error cases
|
|
478
|
+
|
|
479
|
+
### End-to-End Tests
|
|
480
|
+
- **Scope**: Critical user workflows
|
|
481
|
+
- **Workflows to cover**:
|
|
482
|
+
{List key workflows extracted from the intelligence package}
|
|
483
|
+
|
|
484
|
+
### Regression Tests
|
|
485
|
+
- **Purpose**: Verify new system matches legacy behavior
|
|
486
|
+
- **Method**: Run same inputs through both systems, compare outputs
|
|
487
|
+
- **Critical calculations**: {list formulas from BUSINESS_RULES.md that must match exactly}
|
|
488
|
+
|
|
489
|
+
### Data Migration Tests
|
|
490
|
+
- **Pre-migration**: Validate source data integrity
|
|
491
|
+
- **Post-migration**: Verify all data migrated correctly (see DATA_MIGRATION.md verification)
|
|
492
|
+
|
|
493
|
+
## Business Rule Test Matrix
|
|
494
|
+
| Rule ID | Rule Name | Test Type | Priority |
|
|
495
|
+
|---------|-----------|-----------|----------|
|
|
496
|
+
| {id} | {name} | Unit | {high/medium/low} |
|
|
497
|
+
|
|
498
|
+
{Map every extracted business rule to its test}
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## Step 8: Risk Register
|
|
504
|
+
|
|
505
|
+
### Output: `RISK_REGISTER.md`
|
|
506
|
+
|
|
507
|
+
```markdown
|
|
508
|
+
# Risk Register
|
|
509
|
+
|
|
510
|
+
| ID | Risk | Likelihood | Impact | Mitigation | Owner | Status |
|
|
511
|
+
|----|------|-----------|--------|------------|-------|--------|
|
|
512
|
+
| R1 | Undocumented business rules discovered mid-build | High | High | Intelligence package reduces this but can't eliminate it. Budget 15% buffer. Run legacy app in parallel for edge case discovery. | Tech Lead | Open |
|
|
513
|
+
| R2 | Data migration corrupts production data | Medium | Critical | Dry-run migrations on staging copy. Checksums on every table. Rollback plan tested. | DBA | Open |
|
|
514
|
+
| R3 | External API integrations behave differently than documented | Medium | High | Test each integration early in Phase 0. Contact external providers. | Backend Lead | Open |
|
|
515
|
+
| R4 | Team underestimates effort on {complex module} | High | Medium | Front-load complex modules. Spike tickets for unknowns. | PM | Open |
|
|
516
|
+
| R5 | Legacy system changes during migration (strangler fig) | Medium | Medium | Feature freeze on legacy modules being migrated. Sync protocol with stakeholders. | PM | Open |
|
|
517
|
+
|
|
518
|
+
{Add project-specific risks based on what the intelligence package revealed —
|
|
519
|
+
anti-patterns from RISK_REPORT.md, untested logic, security concerns, etc.}
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## Step 9: Assemble the Redevelopment Plan
|
|
525
|
+
|
|
526
|
+
Combine all outputs into a single `REDEVELOPMENT_PLAN.md` executive summary, then deliver the full package.
|
|
527
|
+
|
|
528
|
+
### Output: `REDEVELOPMENT_PLAN.md` (Executive Summary)
|
|
529
|
+
|
|
530
|
+
```markdown
|
|
531
|
+
# Redevelopment Plan: {Project Name}
|
|
532
|
+
## {Legacy Stack} → {Target Stack}
|
|
533
|
+
|
|
534
|
+
### Executive Summary
|
|
535
|
+
{2-3 paragraphs: what the legacy app does, why it's being rewritten, what the plan is,
|
|
536
|
+
how long it will take, key risks}
|
|
537
|
+
|
|
538
|
+
### Key Numbers
|
|
539
|
+
| Metric | Value |
|
|
540
|
+
|--------|-------|
|
|
541
|
+
| Legacy modules | {count} |
|
|
542
|
+
| Business rules to preserve | {count} |
|
|
543
|
+
| API endpoints to rebuild | {count} |
|
|
544
|
+
| Data entities to migrate | {count} |
|
|
545
|
+
| Estimated total effort | {developer-weeks} |
|
|
546
|
+
| Estimated timeline | {weeks/months} |
|
|
547
|
+
| Phases | {count} |
|
|
548
|
+
| Sprints | {count} |
|
|
549
|
+
|
|
550
|
+
### Migration Strategy
|
|
551
|
+
{Summary — see MIGRATION_STRATEGY.md for details}
|
|
552
|
+
|
|
553
|
+
### Architecture
|
|
554
|
+
{Summary — see TARGET_ARCHITECTURE.md for details}
|
|
555
|
+
|
|
556
|
+
### Phase Overview
|
|
557
|
+
| Phase | Duration | Deliverable |
|
|
558
|
+
|-------|----------|-------------|
|
|
559
|
+
|
|
560
|
+
### Top Risks
|
|
561
|
+
| Risk | Mitigation |
|
|
562
|
+
|------|------------|
|
|
563
|
+
|
|
564
|
+
### Detailed Plans
|
|
565
|
+
- MIGRATION_STRATEGY.md
|
|
566
|
+
- TARGET_ARCHITECTURE.md
|
|
567
|
+
- EFFORT_ESTIMATION.md
|
|
568
|
+
- PHASE_PLAN.md
|
|
569
|
+
- DATA_MIGRATION.md
|
|
570
|
+
- SPRINT_PLAN.md
|
|
571
|
+
- TESTING_STRATEGY.md
|
|
572
|
+
- RISK_REGISTER.md
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
### Final Output Folder Structure:
|
|
576
|
+
|
|
577
|
+
```
|
|
578
|
+
{project-name}-redevelopment-plan/
|
|
579
|
+
├── REDEVELOPMENT_PLAN.md ← Executive summary
|
|
580
|
+
├── MIGRATION_STRATEGY.md
|
|
581
|
+
├── TARGET_ARCHITECTURE.md
|
|
582
|
+
├── EFFORT_ESTIMATION.md
|
|
583
|
+
├── PHASE_PLAN.md
|
|
584
|
+
├── DATA_MIGRATION.md
|
|
585
|
+
├── SPRINT_PLAN.md
|
|
586
|
+
├── TESTING_STRATEGY.md
|
|
587
|
+
├── RISK_REGISTER.md
|
|
588
|
+
└── diagrams/
|
|
589
|
+
├── target-architecture.mermaid
|
|
590
|
+
├── migration-sequence.mermaid
|
|
591
|
+
├── phase-dependency.mermaid
|
|
592
|
+
└── data-migration-flow.mermaid
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
---
|
|
596
|
+
|
|
597
|
+
## Quality Gate
|
|
598
|
+
|
|
599
|
+
Before delivering, verify:
|
|
600
|
+
|
|
601
|
+
- [ ] **Every business rule** from BUSINESS_RULES.md is accounted for in at least one sprint task
|
|
602
|
+
- [ ] **Every API endpoint** from API_REGISTRY.md appears in the module mapping and sprint plan
|
|
603
|
+
- [ ] **Every data entity** from DATA_MODELS.md has a migration plan
|
|
604
|
+
- [ ] **Every external integration** from DEPENDENCIES.md has been planned for
|
|
605
|
+
- [ ] **Phase ordering** respects the dependency chain from REPRODUCTION_GUIDE.md
|
|
606
|
+
- [ ] **Effort estimates** are evidence-based (backed by rule counts, endpoint counts, not vibes)
|
|
607
|
+
- [ ] **Risks** from RISK_REPORT.md are addressed in the risk register
|
|
608
|
+
- [ ] **Sprint tasks** are specific enough to start working on immediately
|
|
609
|
+
- [ ] **Testing strategy** covers every extracted business rule
|
|
610
|
+
|
|
611
|
+
If any item fails, go back and fill the gap.
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
## Handling Incomplete Intelligence
|
|
616
|
+
|
|
617
|
+
If the intelligence package is missing files or has gaps:
|
|
618
|
+
|
|
619
|
+
1. Note which files are missing and what impact this has on planning confidence
|
|
620
|
+
2. Reduce estimation confidence accordingly and add larger risk buffers
|
|
621
|
+
3. Recommend running `codebase-legacy-intelligence` on the missing modules before finalizing the plan
|
|
622
|
+
4. Mark affected sprint tasks as "needs spike" — investigation tasks to fill the knowledge gaps
|