# Retrospective phase implementation Added explicit final `retrospective` phase to the deterministic task-phase machine. ## Changes - phase model now includes: - `retrospective` - `closed` - `closed` is now the only fully terminal phase - `done`, `blocked`, and `needs_user_decision` can flow into `retrospective` - retrospective cannot repair the main deliverable; it must create follow-up tasks instead - runner now enforces retrospective completion before `retrospective -> closed` - init now creates `RETROSPECTIVE.md` - state schema now tracks: - `Retrospective required` - `Retrospective status` - `Preventive changes needed` - `Observed failures summary` - `Observed failures` - `Preventive changes proposed` - `Follow-up tasks created` ## Validation - `bun run typecheck` passes - `task-phase-init` smoke test created the new retrospective artifacts successfully ## Effect The phase machine can now end with a deterministic learning tail that captures failure modes and spawns follow-up tasks without inflating or reopening the original task.