- 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.9 KiB
VERDICT: add-goal-mode
Status: PASS
Task delivers goal-oriented loop extensions: work-source dispatch (single/audit/backlog), verifier prompt token plumbing ({task_brief}, {acceptance_criteria}, {next_hint}), next_hint feedback loop closure, --audit --json machine-readable mode, and ci-triage template updates. All changes are in scripts/loop-runner.py, scripts/status.py, templates/loops/ci-triage/loop.json, and tests/test_goal_mode.py.
Requirement coverage
| Req | Status | Tests |
|---|---|---|
| R1 find_work dispatch | delivered | TestFindWorkDispatch (3) |
| R2 audit work_source | delivered | TestAuditWorkSource (4) |
| R3 backlog work_source | delivered | TestBacklogWorkSource (3) |
| R4 verifier tokens | delivered | TestVerifierTokens (4) |
| R5 _truncate_tokens | delivered | TestTruncateTokens (3) |
| R6 next_hint feedback loop | delivered | TestNextHintFeedback (2) |
| R7 loop.json schema additions | delivered | TestLoopJsonSchemaAdditions (3) |
| R8 --audit --json | delivered | TestAuditJson (3) |
| Regression backward compat | delivered | TestRegressionBackwardCompat (1) |
Tests: 26 new. Full suite: 354 passed (was 328 + 26 new). No regressions.
Goal-mode loop closure
- Work discovery:
single(unchanged),audit(highest-severity violation),backlog(top unchecked BACKLOG.md item). Missing/unknown falls back tosinglewith WARNING. - Goal injection:
{task_brief}from RESEARCH/DESIGN/SPEC.md,{acceptance_criteria}from loop.json,{next_hint}from last verdict -- all truncated and fed to both Implement and Verify roles. - Feedback loop: tick N's verifier
next_hintbecomes tick N+1's{next_hint}context. First tick / post-approve: empty string (no KeyError). - Audit integration:
--audit --jsonproduces the violation list theauditwork source consumes. Self-healing: violations without tasks trigger--create-task.
Defense against loop death modes -- unchanged
The runner's brake enforcement is unchanged from task 3. Goal-mode additions are purely additive to the work-discovery and token-substitution layers; they do not touch gate logic, state-write atomicity, or halt semantics. The no_work skip reason is a clean scheduler exit (exit 0, no state advance) -- same pattern as no_current_task.
Agnosticism preserved
- Harness-agnostic: new tokens are substitution placeholders in
harness.command; only active when the operator's command template includes them. Default command unchanged. - OS-agnostic: no platform-specific code added.
--audit --jsonis pure Python. - Model-agnostic: runner still never inspects model size/provider. Goal tokens are text content, not model directives.
Doc impact landed
CHANGELOG.md[unreleased]entry foradd-goal-mode(test counts updated to actual).design/loops/technical.mdschema section already documentswork_sourceandacceptance_criteria.design/loops/functional.mdalready documents the fields.templates/loops/ci-triage/loop.jsonupdated with explicit fields.
No code-doc mismatches.
Hardening items deferred (tracked in BUG_REPORT + ADVERSARIAL_BUG_REPORT)
work_source.areapath-traversal validation (A3) -> v1.1 defense-in-depth.current_taskfrom audit JSON path-traversal validation (A5) -> v1.1 defense-in-depth._truncate_tokensmarker edge case with tiny budgets (O5) -> v1.1.
All three are explicit follow-ups; none block this task.
Resolution
PASS -- proceed to complete. Task 4 closes the goal-oriented loop on the runner side. With work-source dispatch, acceptance-criteria injection, and next_hint feedback, the runner can now drive loops that discover their own work (audit/backlog) and improve across ticks. Remaining tasks: 5 (blast-radius-scheduler), 6 (templates-onboarding), 7 (self-improvement-loop), 8 (install-update-flow), 9 (move-completed-tasks).