Skip to content

feat(work-items): route an undiagnosed bug through diagnosis before the fix - #8042

Merged
kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-6314-39098751974-1
Oct 18, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-6314-39098751974-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #6314

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The Agent Brief template gains a bug-only Root cause field. Triage writes it when it briefs a bug, and /work-items:work runs /debugging:debug (or /testing:diagnose for a failing test) before implementing when the field reads unknown. A named cause or a missing field goes straight to the fix.

Not verified

  • Briefs written before this change have no Root cause field and are treated as known, so they skip the gate (as the issue specifies). No eval run was added; the issue puts a paid eval out of scope.

Fix

  • plugins/work-items/reference/agent-brief.md: Root cause field in the template plus a section defining its values
  • plugins/work-items/skills/triage/SKILL.md: states triage writes the Root cause field on every bug brief
  • plugins/work-items/skills/work/SKILL.md: Step 3b root-cause gate (after claim, before dispatch) and a CI-mode pointer to it
  • .changes/work-items/issue-6314-root-cause-gate-3f9a2c1e.md: minor changelog fragment

Verification

The run reports:

Left out: the items under Not verified.

Related

#6314

…he fix

Add a bug-only Root cause field to the Agent Brief template, have triage write it, and gate /work-items:work on it: unknown runs /debugging:debug (or /testing:diagnose) before implementing.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Comment thread plugins/work-items/skills/work/SKILL.md Resolved
Comment thread plugins/work-items/skills/work/SKILL.md Resolved
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 017816854248b52639703b5baa0b5130be9ecdc3: 0 finding(s), 0 as inline comments.

Security review (incremental, plugins/work-items/skills/work/SKILL.md, head 0178168): no security issues found.

I read .claude-lane/incremental.diff, which covers only the change since 1f51b92. It does two things:

  • CI mode. Step 3 now runs the root-cause gate inline. The gate reads the code and docs the symptom points at, runs no command from the checkout, and stops with a reason when it can't name a cause. The inline gate is more restrictive than the old pointer to Step 3b, not less. The no-execution rule also keeps a hostile issue body from steering command execution during diagnosis.
  • Interactive mode. The old Step 3b gate moved into Step 5 as a sub-step. It runs with the claim held, after the staleness pre-check and before the implementation dispatch. It still escalates to the human queue when no cause can be named, and its text points CI mode at its own inline gate.

I checked the diff as an instruction-surface change. The diff removes Step 3b, but both modes still have a root-cause gate with the same stop-on-unknown behavior, so no rule was deleted or weakened. The gate is also a quality control, not one of the protected classes in the instruction exception register, so removing it would not open a new unchecked action. I did not read the register file.

No permission, credential, token, injection or trust-boundary surface changed. The text sends no new untrusted data to a privileged step. The Step 5 sub-step still quotes the diagnosed cause "as data" in the dispatch brief.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 017816854248b52639703b5baa0b5130be9ecdc3: 0 finding(s), 0 as inline comments.

Incremental review of plugins/work-items/skills/work/SKILL.md since 1f51b92 (head 0178168). I found nothing to block and posted no inline comments.

What changed: The Step 3b root-cause gate is gone. Its logic now sits in two places:

  • CI mode, step 3: an inline gate. The run reads the code and docs the symptom points at, runs no command from the checkout, and names the cause. It uses /debugging:debug or /testing:diagnose only if one resolves, and stops with a reason when it cannot name a cause.
  • Interactive path, Step 5: a new sub-step after the claim and branch-name sub-steps and before Execute. It escalates to the human queue when diagnosis cannot name a cause.

Checks I ran with tools:

  • No dangling Step 3b reference remains in plugins/work-items, in .changes/work-items/, or in the triage skill.
  • The CI-mode stopped exit and its reason field match the work-outcome.json contract at SKILL.md lines 87-88.
  • The Step 5 sub-step runs after the claim sub-step (SKILL.md:263) and after the Step 4 staleness pre-check, as its text says.
  • The changelog fragment and the triage text (triage/SKILL.md:236) still describe the behaviour correctly. Neither names Step 3b.

Observations, not findings (low confidence, judgment):

  • The interactive gate escalates to the human queue with the seam claim and lease still held. Nothing in the diff releases or hands off the lease. I did not trace whether the reclaim path covers this, so I did not raise it as a finding.
  • The PR body still says "Step 3b root-cause gate … and a CI-mode pointer to it". That is now out of date, because the gate is inline in CI step 3 and is a Step 5 sub-step otherwise. The body is not a reviewed file, so a refresh of the description would help readers.

Closing issue #6314:

  • Acceptance criteria 2 and 3: met, as far as I read them. The work skill states the diagnosis step, the skill it routes to, and that a named cause or a missing field skips it.
  • Criteria 1 and 4: their files (agent-brief.md, the changelog fragment) did not change in this increment. I looked at the triage text and the fragment only to check consistency.
  • Test coverage: the issue puts a paid eval out of scope, and the PR says no eval was added. I found no automated test that would fail if the gate broke.

I did not run check-changelog-fragments or check-skill myself. The PR body's claims about them are author-reported.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of 3 on 0178168.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: risk MED at head 017816854248b52639703b5baa0b5130be9ecdc3. Only LOW merges without a human; this pull request waits for one.

MED findings:claude-review: 1 open

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: the verifier verdict refuses verify:earlier-fail at head 017816854248b52639703b5baa0b5130be9ecdc3. That refusal needs a human, who merges in person; the pr-merge lane will not merge this pull request.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 18, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit a29674e Oct 18, 2026
31 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-6314-39098751974-1 branch October 18, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(work-items): route an undiagnosed bug through diagnosis on the autonomous path

1 participant