| name | orchestrating-greenfield-migration |
| description | Manages the end-to-end modernization of legacy Express monoliths into Next.js architectures. Orchestrates subagents for auditing, scaffolding, and verification. Use when starting or managing a greenfield rewrite project. |
Greenfield Migration Orchestrator
This skill manages the transition from legacy Node.js monoliths (Express/Pug/Mongoose) to modern Next.js architectures using a Greenfield Rewrite strategy.
Modernization Hub Structure
The preferred workspace layout is a "Modernization Hub" monorepo:
/workspace-root/
āāā .agents/ # This Skills Pack
āāā docs/ # Centralized Audit & Verification Specs
āāā legacy-app/ # The Source (Read-Only)
āāā modern-app/ # The Target (The Greenfield Repo)
The Workflow
Phase 1: The AI Audit (Reverse Engineering)
Dispatch subagents to produce specifications while identifying project-specific test scenarios for the Verification_Plan.md.
Phase 2: The Greenfield Foundation & TDD
Phase 3: The Greenfield Scaffold (Make Tests Pass)
Phase 4: The UI & Pages Scaffold
Phase 5: Verification & Adversarial Audit
Instructions for Orchestration
- Validate Paths: Confirm the relative paths to the
legacy-app and modern-app.
- Dispatch Subagents: Explicitly tell subagents where the source code and documentation folders are located.
- Checkpointing: Wait for each phase's artifacts (in
docs/) to be completed before starting the implementation phase.
Resources
resources/verification-strategy.md: The master methodology for side-by-side verification.