Skip to content

Prompt router stops naming your bug-fix skill on bug reports, and CLAUDE.md drops the failing-test-first step - #4707

Merged
capy-ai[bot] merged 5 commits into
mainfrom
stop-naming-bug-fix-skill
Nov 22, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
stop-naming-bug-fix-skill

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

gstack's prompt hook no longer names an installed bug-fix skill (prove-it and the like) on bug reports, and the CLAUDE.md bug line drops "a focused failing test first".
Why: in gstack-evals#426, on 183 real Python bugs, naming that skill got its steps followed in 80% of sessions against 3%, but fixed no more bugs (-1.5 points, 95% interval -3.8 to +0.9).
Nothing to do: /review, /qa and /verify route exactly as before.

What changed

Until now, when a prompt read like a bug report and you had a bug-fix skill installed, the hook told the model to run that skill, alone, and named it first even beside /verify. The hook now names no skill for that reason. A third-party trigger that names only a bug and fixing it ("fix this bug", "reproduce the bug in a test") no longer routes at all, so the skill is not named through its own triggers either; a trigger with its own target ("fix lint errors", "fix postgres bugs") still routes. The CLAUDE.md bug line now reads "fix them directly: one read-only check of the cause, then fix it", in this repo's CLAUDE.md and in the test copy of the routing section older projects still have.

Two pieces stay. The bug-report signs added in #4674 and the feature-title rule from #4694 still decide whether a prompt reads as a bug report. That reading no longer names a skill, but it still keeps a reported defect away from /review and /qa unless it asks for them in their own trigger words, and it decides whether a defect word counts as an everyday word when scoring. Removing either would change how gstack's own skills route, so both stay, with their fixtures; their tests now check the classification directly. The guard against routing messages from other agents (#4423) is unchanged.

Why

gstack-evals#426 (B2) compared the bug-fix skill named by the hook against plain gstack on Opus 5.5, GPT-6.2 Sol and particle-1. The steps were followed (80% against 3%) but passes moved -1.5 points [-3.8, +0.9] and passes with a regression test +1.6 [-1.0, +4.3]. Garry cut both pieces on 2026-11-22. B1f (gstack-evals#432) found the hook is the only reliable route to its other skills, so the rest of it stays.

Blast radius

Only the routing hook, gstack-skill-route --explain and the CLAUDE.md line change. A before/after replay of all 222 prompts in the router's fixtures (60 synthetic, 60 first-draft, 8 QA-overlap, 34 feature-title probes, 60 plain), on Claude and Codex, with and without prove-it installed (888 decisions), ran the real routePrompt on main (f528f5b) and this branch: with gstack's skills alone, 0 of 444 decisions change; with prove-it installed, 234 change, every one from naming prove-it to exactly what main routes without it (224 to no skill, 10 to /verify). prove-it is named on 0 prompts, and bugReport() gives the same answer on all 222. --explain --json no longer prints bug_report, and the routing log no longer writes bug_report=true; nothing in this repository reads either.

Pre-Landing Review

Light depth, one full pass (specialists, then a Claude adversarial reader and a second-model review on GPT-6.2 Sol). The two specialist notes were fixed in the docs and changelog. The second-model review raised two findings it called blocking. One, a generic crash report reaching a narrower repair skill on a repair verb alone, is how main already routes when no generic bug-fix skill is installed (code this PR does not change), so it is deferred below. The other, that "test" counts as a generic word so a test-diagnostics trigger such as "debug failing tests" no longer routes, was skipped: main already treated exactly those triggers as a bug-fix skill's and named that skill alone on every bug report, which is the behavior this change cuts. Neither would fail a test, break production or lose data. The docs/skills.md note below was fixed by the documentation audit.

Deferred findings

Blocking findings in code this PR did not change (review scope: frozen). They stay on this PR and are not filed as issues.

  • Deferred: CRITICAL lib/skill-route.ts:395 a generic crash report can route to a scoped repair skill on a repair verb alone
Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL lib/skill-route.ts:554 claimsBugReports also drops triggers that name tests or a crash as their target
  • INFORMATIONAL lib/skill-route.ts:554 a skill whose triggers are all dropped is silent in --explain
  • INFORMATIONAL docs/skills.md:665 docs/skills.md still describes the failing-test-first clause in the CLAUDE.md routing block
  • INFORMATIONAL bin/gstack-skill-route:49 bug_report key removed from --json and the routing log
  • INFORMATIONAL lib/skill-route.ts:424 reproducing stems to reproduc, so that spelling of a generic trigger is not suppressed
TODOS

No TODO items completed in this PR.

Documentation

Status: updated. One factual fix; no blockers.

Scope: 12 committed files on stop-naming-bug-fix-skill (base f528f5b, head dc6555d), plus every authored doc grepped for stale bug-report routing claims (bug_report, the bug-fix skill named first, a failing test first). Staged, unstaged and untracked content were empty.

Documentation health:

  • docs/skill-routing-and-contracts.md: Current. The branch already updated it: the bug-report rule is gone, and the --json and routing-log mentions of bug_report were removed.
  • CLAUDE.md: Current. The bugs line was updated in the branch.
  • docs/skills.md: Updated. The /investigate section no longer says the CLAUDE.md routing block keeps a failing-test-first step.
  • changelog.d/stop-naming-bug-fix-skill.md: Current. Not edited, because it is protected.
  • README.md, docs/install.md, docs/proactive.md: Current. They only link to the routing doc.

Coverage debt: gstack-skill-route --json no longer prints bug_report. That change is covered in reference docs (the routing doc and the changelog); no how-to is needed. No new public surface.

Diagram drift: none. No diagrams reference the router.

Tests
  • bun test test/skill-route.test.ts: 38 pass, 0 fail
  • bun test test/skill-validation.test.ts: 320 pass, 0 fail
  • bun test test/setup-skill-hooks-gate.test.ts: 29 pass, 0 fail
  • 15 more focused test files (CLAUDE.md size, parity, prompt-size and module-size budgets, Codex hooks, Bun isolation, subprocess timeouts): all pass
  • bun run typecheck and bun run typecheck:test: clean
  • The full free suite runs in CI at the final head.
Agent notes

Agent notes

Refs GST-3538. Owner thread GSTA-807 (GStack Minder crew).

Replay: ~/.capy/work/replay/{main,branch}.jsonl on the lane machine; script ~/.capy/work/replay/replay.ts.

Gate edits: 15 listed, 15 read, 0 findings — 0 kept, 0 restored, 0 open

REVIEW_LOOP: passes=1 blocking_found=2 deferred=1 noted=5 fixed=2 scope=frozen ledgers_read=2 dispatches=1

Skipped (lane decision, flagged to the Captain): outside-voice#2 lib/skill-route.ts:425.

Approvals

Approved: yes (record r-fb6e69b8dd7b). The full approval record stays private.
Plan: approved (record r-f3dabfe2e1e6)
Plan check: approved (record r-f3dabfe2e1e6)

{
  "schema_version": 1,
  "pr": 4707,
  "head": "08f61fcf275bbed7605ec32a105f7a0375fa85e6",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1765,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 45033722543,
      "attempt": 1,
      "tree": "9d7a5269478baf2d0a960e2889dd975176008224"
    }
  ],
  "calls": 23,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/ship807/run",
  "head_tree": "9d7a5269478baf2d0a960e2889dd975176008224",
  "product_patch_id": "44ad73509de514ffc25b722c15a27f81581d7425",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 96,
    "rules": "33831f8248a814fd",
    "base": "45e33b5e7b13614cb89e7d6e155e349755dd1e8f",
    "registry": "45e33b5e7b13614cb89e7d6e155e349755dd1e8f",
    "gate_scan": {
      "tagged": 0,
      "head": "08f61fcf275bbed7605ec32a105f7a0375fa85e6"
    },
    "reasons": [
      "runtime=96"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @9d7a5269478b (8 checks, current for 08f61fcf275b)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/45033722543/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/45033722543/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/45032255597/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=9d7a5269478b tests=39124 skipped=104 runs=45033722543/1 profiles=ci-reuse/free-tests heads=08f61fcf275b verified=2026-11-22T14:43:14.489Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, CLAUDE.md, README.md, AGENTS.md (12 changed files; authored docs grepped for stale bug-report routing claims)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 2,
    "deferred": 1,
    "noted": 5,
    "fixed": 2,
    "scope": "frozen",
    "rounds": 1,
    "ledgers_read": 2,
    "dispatches": {
      "specialist": 1
    }
  },
  "gate_dispositions": []
}

Open in Capy

garrytan and others added 2 commits November 22, 2026 14:04
…AUDE.md bug line drops the failing-test-first step

In a preregistered test on 183 real Python bugs (gstack-evals#426), naming
the bug-fix skill got its steps followed in 80% of sessions against 3%,
but fixed no more bugs (-1.5 points, 95% interval -3.8 to +0.9).

The hook still routes /review, /qa and /verify as before.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 22, 2026 14:07
… supersedes them

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/specialist-batched#1 reader=red-team
Review-Finding: p1/specialist-batched#2 reader=api-contract
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ps a failing-test-first step

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot marked this pull request as ready for review November 22, 2026 14:46
@capy-ai

capy-ai Bot commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Ruled note on the second-model review's finding #2 (lib/skill-route.ts:425: "test" is treated as a generic word, so a third-party "debug failing tests" trigger is dropped): main already named such a skill by itself on every bug report. Narrowing GENERIC_CLAIM_WORDS waits until a real trigger is lost. Finding #1 (lib/skill-route.ts:395) stays deferred, because main does the same when no generic fixer exists.

@capy-ai
capy-ai Bot merged commit ab5abf0 into main Nov 22, 2026
86 of 87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant