init
Create the .agents/modernization/ directory with an interactive wizard.
npx modernizespec init [options]What It Does
Section titled “What It Does”- Prompts for project metadata (name, framework, language, LOC, entities, endpoints)
- Prompts for target architecture (language, architecture style, migration pattern)
- Optionally scans the codebase for bounded context suggestions
- Optionally runs complexity analysis for hotspot detection
- Generates all spec files in
.agents/modernization/
Options
Section titled “Options”| Flag | Description | Default |
|---|---|---|
--dir <path> | Target directory | Current directory |
--no-analyze | Skip codebase analysis | Analysis enabled |
--json <path> | Non-interactive mode (read answers from JSON file) | Interactive |
--force | Overwrite existing files | Prompt before overwrite |
Examples
Section titled “Examples”Interactive
Section titled “Interactive”npx modernizespec initNon-Interactive
Section titled “Non-Interactive”npx modernizespec init --json init-config.jsonWhere init-config.json contains:
{ "project": "ERPNext", "legacy": { "framework": "frappe", "language": "python", "loc": 316000, "entities": 521, "endpoints": 768, "age_years": 20 }, "target": { "language": "go", "architecture": "hexagonal", "pattern": "strangler-fig" }, "analyze": true, "complexityAnalysis": true}In a Specific Directory
Section titled “In a Specific Directory”npx modernizespec init --dir /path/to/legacy-projectOutput
Section titled “Output”Next Steps After Init
Section titled “Next Steps After Init”- Review and adjust
domains.json— the analysis is a starting point - Fill in
extraction-plan.jsonwith your phased approach - Validate:
npx modernizespec validate - Commit:
git add .agents/modernization/
See Also
Section titled “See Also”- Init Walkthrough — Step-by-step guide with screenshots
- Quick Start — 5-minute setup guide