/upfront:re-architect
What it does
Section titled “What it does”/upfront:re-architect executes the evolution plan produced by /upfront:architect. It restructures code phase by phase — moving files, updating imports, fixing layer violations — with test verification at phase boundaries.
When to use it
Section titled “When to use it”- After
/upfront:architecthas produced an evolution plan - When you have a clear structural change to make (module splits, layer fixes)
How it works
Section titled “How it works”- Load the plan — reads
specs/ARCHITECTURE-EVOLUTION.md - Phase execution — works through each phase sequentially
- Tests break mid-phase — that’s expected when moving files and updating imports
- Phase boundary verification — all existing tests must pass at the end of each phase
- Commit per phase — each completed phase gets its own commit
Key difference from /upfront:build
Section titled “Key difference from /upfront:build”/upfront:build runs tests after every edit and uses TDD. /upfront:re-architect expects tests to break during a phase as you restructure — it only verifies at phase boundaries. No new tests are written; existing tests must pass after restructuring.
- No behavior changes — restructuring only. If tests fail after a phase, the restructuring introduced a bug.
- No new features — if you find something that needs a feature, note it and move on.
- No new tests — existing tests are the contract. If they pass, the restructuring is correct.
- One phase at a time — human reviews and approves each phase before the next begins.
Output
Section titled “Output”- Restructured codebase with clean commits per phase
- Updated
specs/ARCHITECTURE.mdwith new structure - Updated
specs/LEARNINGS.mdwith restructuring observations