add prior-analysis search to work-on-task-assistant Phase 6 - #107
Open
bborbe wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
{
"verdict": "request-changes",
"summary": "The PR correctly specifies Phase 6 query-4 behavior (all four queries, distinct ⚠️ CONFLICTING PRIOR WORK heading) in the agent definition and the CHANGELOG is properly updated under Unreleased. However, the success_criteria enforcement at line 452 is stated as a requirement in prose — it is not backed by any runner/wrapper implementation in scope — meaning an agent that skips query 4 would still pass Phase 6 without violating anything in this PR.",
"comments": [
{
"file": "agents/work-on-task-assistant.md",
"line": 452,
"severity": "critical",
"message": "Phase 6 enforcement (all four queries required, query 4 included) is stated in success_criteria but has no implementation. An agent that skips query 4 would still produce a \"clean guides\" result and pass Phase 6 — contradicting the self-check text. The calling runner/wrapper must track that query 4 was actually invoked, or this requirement will never be enforced."
},
{
"file": "agents/work-on-task-assistant.md",
"line": 452,
"severity": "major",
"message": "No regression test covers Phase 6 query-4 enforcement. If the runner is later updated to validate query-4 execution, there is no test asserting that a missing query 4 produces a FAIL verdict — the new behavior has no automated guard."
}
],
"concerns_addressed": [
"correctness: Phase 6 self-check enforcement — addressed: flagged as critical (no runner implementation)",
"correctness: Query 4 conflict results reported under ⚠️ CONFLICTING PRIOR WORK heading — not an issue: confirmed unambiguous in text",
"correctness: 'A clean guides result is not a pass if query 4 never ran' condition — addressed: same as first concern",
"tests: No integration/smoke tests for Phase 6 query-4 behavior — addressed: flagged as major"
]
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Phase 6's three semantic searches are all artifact-type-scoped:
They find runbooks and guides. A prior decision — recorded on a task or KB page — matches none of those framings, so it stays invisible even when indexed and highly relevant.
Observed failure (2026-08-24)
A task to deploy 12 new per-symbol candle handlers passed Phase 6 clean and shipped a merged PR before anyone noticed
[[Review candle-command-handler per-symbol design]]— a five-week-old analysis that had already identified that exact fleet as the cluster's top pod-count offender and decided to consolidate it.The page was indexed, scored 0.55 on a topic query, and was sitting on the same day's daily note. All three queries missed it because it is neither a runbook nor a guide. The conflict only surfaced when the human objected on capacity grounds — reaching, manually, the conclusion the vault already held.
Change
search_related("{task_title} prior analysis decision design", top_k=5)⚠️ CONFLICTING PRIOR WORKheading — deliberately not folded into the guides list, since a guide says how to proceed while this says whether to proceed at allDocs-only change to the agent definition.
make precommitPASS.