# Deterministic phase loop implementation Implemented `bin/task-phase-loop`. ## Added - `bin/task-phase-loop` ## Updated - `docs/task-phase-machine.md` - `tsconfig.json` ## Behavior - repeatedly calls `task-phase-run` - stops on terminal phase: - `done` - `blocked` - `needs_user_decision` - stops on runner failure - stops on no material progress fingerprint - writes loop artifacts under `artifacts/phase-loop-runs//` - keeps transition authority in `task-phase-run`, not in the loop ## Output Prints: - `task_dir=` - `loop_dir=` - `passes=` - `stop_reason=` - `final_phase=` - `evidence_link=` ## Validation - `bun run typecheck` passes - loop structure and artifact generation verified locally ## Note This loop is shaped around the deterministic phase-machine need, not the old generic prompt loop model. It is a thin controller over the gate-enforcing runner.