Require a matched line before reporting daily-note tracking - #103
Conversation
There was a problem hiding this comment.
The mechanical funnel produced 0 findings across 74 rule YAMLs. The changed files are CHANGELOG.md and agents/work-on-task-assistant.md (an agent definition, not code). No Go, Python, JS/TS, or other rule-relevant files are changed. This diff cannot match any rule in the index.
Selector mode — no adjudication needed.
Step 5: Consolidated Report
Must Fix (Critical): None.
Should Fix (Important): None.
Nice to Have (Optional): None.
Step 7: Manual Review
Reviewed the diff in full:
CHANGELOG.md— Correctly documents the bug (unverified "Already tracked" claim) with a dated## Unreleasedentry. Conforms to changelog conventions.agents/work-on-task-assistant.md— The added constraint on line 149 is precise: the search result is the only basis for the report, and the matched line must be quoted verbatim. The observed case (2026-08-22) is cited inline. The fix is logically sound and correctly scoped to Phase 4 only.
No issues found.
Notes: The PR acknowledges this change cannot be test-covered (model-driven behavior only observable in production). This is a known limitation and acceptable given the fix is a constraint on the agent's own self-reporting — it removes an incorrect capability rather than adding a new one.
Traceability (Selector Mode)
- Candidates: 0 rules matched by Step 4b-i glob filter
- Applicable: 0
- Skipped: N/A — no candidates
{
"verdict": "approve",
"summary": "The fix correctly constrains Phase 4 to only report 'Already tracked' when a matching line is in hand, quoting it verbatim. CHANGELOG entry is correctly formatted. No code findings.",
"comments": [],
"concerns_addressed": [
"tests: acknowledged — model-driven behavior cannot be unit-tested; the fix removes an incorrect capability rather than adding one, making it self-verifying"
]
}
Problem
work-on-task-assistantPhase 4 can report a task as already tracked on the daily note when the note contains no reference to it.The phase does search correctly (
Search for [[{task_name}]] or {jira_id}), but nothing binds the report to the search result. Theℹ️ Already trackedbranch can therefore be emitted on no evidence, and it reads identically to a real match.Observed
2026-08-22. The agent reported:
The note contained nothing matching —
grep -n "MoneyMoney" 2026-08-22.mdreturned zero lines, and the Must section held five unrelated items. The task stayed absent from the day's record for ~3 hours until/vault-cli:sync-progressadded it.The failure is silent by construction: a false "already tracked" produces exactly the output a correct one does, and the operator has no reason to re-check.
Change
Phase 4 now states that the search is the only admissible basis for the claim, and requires the matched line to be quoted verbatim (
ℹ️ Already tracked: <matched line>). A report naming a section but no line is unverified.Docs-only change to the agent prompt.
make precommitexits 0.Note on verification
This cannot be proven by a test run: the bug only surfaces when a task genuinely is not on the daily note, and the assistant's behaviour there is model-driven. The change removes the ambiguity that allowed the unevidenced claim; confirmation comes from the next real occurrence showing a quoted line.