Skip to content

init

Create the .agents/modernization/ directory with an interactive wizard.

Terminal window
npx modernizespec init [options]
  1. Prompts for project metadata (name, framework, language, LOC, entities, endpoints)
  2. Prompts for target architecture (language, architecture style, migration pattern)
  3. Optionally scans the codebase for bounded context suggestions
  4. Optionally runs complexity analysis for hotspot detection
  5. Generates all spec files in .agents/modernization/
FlagDescriptionDefault
--dir <path>Target directoryCurrent directory
--no-analyzeSkip codebase analysisAnalysis enabled
--json <path>Non-interactive mode (read answers from JSON file)Interactive
--forceOverwrite existing filesPrompt before overwrite
Terminal window
npx modernizespec init
Terminal window
npx modernizespec init --json init-config.json

Where 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
}
Terminal window
npx modernizespec init --dir /path/to/legacy-project
  1. Review and adjust domains.json — the analysis is a starting point
  2. Fill in extraction-plan.json with your phased approach
  3. Validate: npx modernizespec validate
  4. Commit: git add .agents/modernization/