- Archive 79 completed framework-dev tasks from tasks/ -> tasks/complete/ - status.py: add --cleanup-done and --install-cleanup-schedule commands - Add scripts/automaton-cleanup.sh for periodic task archiving - Dashboard: rename 'Background' tab -> 'Agent', 'Cleanup' agent -> 'Completed Task Archiver', remove redundant group headers and pill badges, dim inactive agent placeholders - .rules.md: add Self-Documenting UI Names rule - New tests: test_cleanup_done.py, expanded test_app.py and test_task.py
3.3 KiB
Verdict: add-status-brakes
Status: PASS
The task delivers the loop-engineering brakes layer (R1–R10) entirely inside status.py, with no new dependencies and no second enforcement surface. It is the foundation that tasks 3–7 build on; everything those tasks need to call (--check-gate, --can-continue, --approve --loop, --can-edit --loop, --create-loop, --install-schedule, --loop-list, .state.log) is now in place and unit-tested.
Requirement coverage
| Req | Delivered | Tests |
|---|---|---|
R1 .state.loop schema |
All 13 fields, atomic tmp+rename | TestStateLoopSchema (2) |
R2 --create-loop |
kebab/dup/template rejection, name patch | TestCreateLoop (5) |
R3 --version, --approve --loop |
version regex; only halt-clear; resumed_count++ |
TestVersionAndApprove (4) |
R4 --can-continue |
running-only probe | TestCanContinue (3) |
R5 --check-gate (6 gates) |
First-failure halts + JSON | TestCheckGate (10) |
R6 --install-schedule |
Darwin/Linux/Windows dispatch + stub | TestInstallSchedule (3) |
R7 --can-edit --loop [--loop-worktree] |
Root residency + file_scope | TestCanEditLoop (4) |
R8 --transition halt refusal |
Owned-task scan | TestTransitionHaltRefusal (3) |
R9 --audit Cat-6 + --loop-list |
Runs even when no tasks; untracked/halted flag | TestAuditAndList (6) |
R10 .state.log tick trail |
ISO timestamps | TestTickLog (3), TestPauseResume (3) |
Total: 46 new tests. Suite: 310 passed (was 264 + 46 new). No regressions. python3 -m py_compile scripts/status.py clean.
Defense against the five loop deaths
- drift →
_gate_worktree_drift(R5) - runaway →
_gate_iterations(R5) - bad verifier →
_gate_score_plateau(R5) - resource burn →
_gate_budget(R5, remote-only informational) - undetected halt → R8 transition refusal + Cat-6 audit + gate halt-write
Harness / OS / model agnosticism preserved
- All surface reachable via
status.pysubprocess +--json. No harness-specific code. Works with opencode or any harness (D8). platform.system()dispatches launchd/cron/schtasks; missing tools degrade gracefully (warn + skip, not crash). D13 honored.- Framework never inspects model capability/size/provider —
--loop-modealready refused sub-16k in task 1; this task does not consult any model field.
Doc impact landed
AGENTS.mdHarness Integration modes block extended with the--loopworktree-scope mode (mode 5).AGENTS.mdnew "State Enforcement — Loops (v1)" section.README.mdnew "Loop Engineering (beta)" subsection with quick-reference commands.CHANGELOG.md[unreleased]entry for the brakes layer.
Hardening items deferred (tracked)
- A6
fcntllock on.state.loop→ v1.1. - A2
--claim-loop-taskatomic ownership → task 3. - O3
blast_radius.base_branchdrift parameterization → task 5. - O4
_enable_scheduleLinux parity → task 5 / v1.1.
All four are explicit follow-ups in BUG_REPORT.md and ADVERSARIAL_BUG_REPORT.md; none block this task.
Resolution
PASS — proceed to complete. Task add-status-brakes is the foundation for the loop v1 implementation. Tasks 3, 4, 5, 6, 7 can now be unblocked, each relying on the standardized .state.loop schema and the brakes gates this task ships.