Rewrite plan Spec §20.3 / §21.3.2: scenario 4 (design → deliverable production code) requires a contract-shaped rewrite plan before the agent starts editing files. The plan is the audit trail every subsequent stage references; without it the patch path slides into "refactor everything that looks wrong" and the build breaks in unreviewable ways. Inputs - from . - from . - The active design system DESIGN.md (already in prompt). - The user's tune intent (typically a short brief). Output is the input reads one entry per iteration. is the source of truth for "which files belong to a single compone…