Skip to content

feat(skills): skill-scoped R56 cuts for /investigate and /review, plus /review blocker proof (GST-1088 lane C, candidate) - #3922

Closed
garrytan wants to merge 11 commits into
mainfrom
capy/gst-1088-lane-c
Closed

garrytan wants to merge 11 commits into
mainfrom
capy/gst-1088-lane-c

Conversation

@garrytan

@garrytan garrytan commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3922,
  "head": "9386a27adc1b1bf223775630288a92b10bd7f0dc",
  "version": "1.94.24.0",
  "base": "main",
  "gate": {
    "targeted": {
      "pass": 1577,
      "fail": 0,
      "skip": 2
    }
  },
  "session_kind": "unattended",
  "head_tree": "868b683591ad85dedb43879f4bb663b95c1d50da",
  "product_patch_id": "a1b4c6768909ac5bcef8d3ebfe97b17f2247195a",
  "gstack_version": "1.94.2.0",
  "review_depth": {
    "depth": "full",
    "class": "code",
    "runtime_lines": 214,
    "rules": "18dcd562316f56ed",
    "base": "1ccab0d8bccba50e69587672fb82ac0574638a65",
    "registry": "1ccab0d8bccba50e69587672fb82ac0574638a65",
    "gate_scan": {
      "tagged": 0,
      "head": "9386a27adc1b1bf223775630288a92b10bd7f0dc"
    },
    "reasons": [
      "risk:money",
      "runtime=214"
    ],
    "risk": [
      "money"
    ]
  },
  "pregate": "requires-remote cleared @868b683591ad (7 checks, current for 9386a27adc1b)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41671729875/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/41671309903/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=868b683591ad tests=34953 skipped=112 runs=41671729875/1 profiles=ci-reuse/free-tests heads=9386a27adc1b verified=2026-11-03T16:18:19.553Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, AGENTS.md, CLAUDE.md, CONTRIBUTING.md against base 1ccab0d8"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 1,
    "fixed": 5,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 2,
    "ledgers_read": 3,
    "dispatches": {
      "specialist": 1,
      "red-team": 1
    }
  },
  "review_targeted": {
    "classes": [
      "money"
    ],
    "rules": "c82addff6fb60fa0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "a1b4c6768909ac5bcef8d3ebfe97b17f2247195a",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

Candidate: do not merge until the GST-1089 measurement passes and GStack Minder confirms the crew behavior change. This is the after pin for GST-1088. It changes /review's prompts, so the crew no-loss rule applies (2026-10-30). It never boards a train on its own.

What changed

/review Step 4: every CRITICAL finding now needs a floor reason and proof, or it is reported as INFORMATIONAL

/review Step 4: every CRITICAL finding now needs a floor reason and proof, or it is reported as INFORMATIONAL. The marker paragraph pins the Dispatching lines that evals count.

/investigate drops its learnings search and the investigation learnings log

/investigate drops its learnings search and the investigation learnings log: 21,242 to 17,838 always-loaded bytes against v1.94.24.0.

/investigate loads about 3.4 KB less and /review about 3.3 KB less, and every blocking /review finding must now prove itself.

  • Skill-scoped R56 cuts. modules/cuts.json is a new cut ledger. Each entry is a part:<skill>/<name> module id that gstack-modules list shows with status cut. A cut applies in every loadout, full included, and on every host, but only to its own skill. modules/loadouts.json is unchanged, so no other skill loses anything. One cut, /review's repo-ownership section, is a preamble piece; preambleSections() drops it for /review alone. The rest are deleted from the two templates.
  • /review blocker proof (plan decision 5, CREW rule 23). A CRITICAL finding gets a floor reason (fails a test, breaks production, loses data or secrets, or one of the Sideways sweep's forced-CRITICAL classes) and proof: a repro with its output, a failing test, or a cited file:line with its consequence. /review verifies a forwarded finding (specialist, QA, adversarial or bot) and appends both itself, so the pinned reviewer briefs don't change. A CRITICAL nobody proves is INFORMATIONAL at Step 5, whatever its Blocks: line. The rule is in the Step 4 critical pass and in the review-only branch of the pre-emit verification gate (scripts/resolvers/confidence.ts).
  • Fixed dispatch lines. Specialist selection always prints one Dispatching N specialists: line, small diffs included, and the native adversarial pass prints Dispatching adversarial pass: native before its Agent call. These are for eval counting. The adversarial-pass contract item stays gated by match alone, exactly as on main. This PR adds no marker: to the frontmatter and doesn't touch the contract resolver. review/sections/review-army.md, review/sections/adversarial.md and their resolvers are unchanged, so the pinned reviewer briefs and /ship keep their bytes.
  • Ratchet. test/cut-ledger.test.ts fails when a cut piece comes back in its skill, its sections or the shared preamble file on any host, when a pinned size moves, when a cut names a skill other than /investigate or /review, or when review-only text shows up in any other skill.

Why

Opus 5.5 read these skills in full and still skipped their required steps (Run D, gstack-evals#140). The forced full /review caught 67.2% of blocking bugs but raised 2.71 false blockers per PR per pass (gstack-evals#120). The cuts take out text that nothing measured shows is doing work. The blocker-proof rule targets the false-blocker rate. GST-1089 (GEVA-214) decides whether either one keeps.

Blast radius

Durable scope test. test/cut-ledger.test.ts renders every host twice, once from the tree and once from a copy whose modules/cuts.json has no cuts, and asserts that every file outside the investigate and review trees is byte-identical. As a negative control, a cut added to the office-hours preamble failed it on all 12 non-Claude hosts. A second test checks that no preamble cut comes back through the shared sections/preamble.md on any host. As its negative control, appending ## Repo Ownership to review/sections/preamble.md failed it.

Pins (all lowered to measured at 9386a27, no headroom):

  • modules/cuts.json:72-73: investigate 17838, review 56716.
  • test/helpers/carve-guards.ts:493: /review maxSkeletonBytes 60,014 to 56,716. :496: maxSizeRatio 1.3283 to 1.2979 (140,849 / 108,523 = 1.29788). :898: /investigate minUnionBytes 55,000 to 54,778.
  • test/fixtures/skill-md-size-allowlist.json:9-55: nine */gstack-review pins lowered to measured. The values are agy 101,780, codex 100,964, copilot 101,398, cursor 119,875, factory 122,253, gemini 101,225, kiro 119,713, opencode 120,462 and slate 119,794.
  • Fixed caps unchanged: the 5,315-token context budget, DRIVER.md 12,288 B (now 12,245), the global skeleton cap of 61,420 (carve-guards.ts:164), module size 800 and PART_MAX 24,576.

Sibling trial merges (CREW rule 25 with the 2026-11-03 addendum), at 9386a27:

docs/troubleshooting.md merged cleanly with main. Its diff against v1.94.24.0 is only this PR's LOADOUTS_INVALID and MODULE_SPEC_INVALID cut wording.

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-11-03 Approve the GST-1088 plan (plan-v3, gate rev 2: skill-scoped diet for /investigate and /review, /review blocker proof, fixed markers) “do it” (Garry (via GStack Minder)) approved plan-v3 with gate rev 2 overrides I1, A1, B1 and the fixed markers; lane C builds the candidate PR, merged only after the GST-1089 measurement passes none

Documentation

Status: updated. One factual paragraph added to docs/skills.md; no blockers.

Scope. Ship candidate laneC-docs2-7370b4ba on capy/gst-1088-lane-c, base 1ccab0d to head 8cd564a: 28 committed files, with no staged, unstaged or untracked files. Docs inventory: 136 candidate docs, plus authored templates found with git ls-files (849 doc-type files). Banned terms: none (the repo keeps no list).

Documentation health

  • docs/skills.md: Updated. Added a /review Blocker proof paragraph: a CRITICAL needs a floor reason plus proof, /review checks forwarded findings, and an unproven CRITICAL is reported as INFORMATIONAL.
  • docs/loadouts.md: Current. The Cut term, the list status column and the Cuts section match modules/cuts.json, scripts/modules.ts, test/cut-ledger.test.ts and the live gstack-modules list output (7 part rows, status cut).
  • docs/troubleshooting.md: Current. The LOADOUTS_INVALID and MODULE_SPEC_INVALID cut wording matches validateLoadouts and selectModules.
  • docs/PROJECT_STRUCTURE.md: Current. The modules/ line names cuts.json, cut-ledger.ts and the ratchet.
  • docs/evals/judge-controls-2026-10.md: Current. It matches the scripts/judge-controls.ts cut to ## Step 3.5.
  • changelog.d/capy-gst-1088-lane-c.md: Reviewed, not edited (owned by the parent). Byte figures verified: /investigate 21,242 to 17,838 and /review 60,014 to 56,716 at base VERSION 1.94.24.0.
  • docs/review-policy.md: Current, not edited. Its floor text stays true, because blocker proof adds an evidence rule and does not move the floor.
  • docs/skill-routing-and-contracts.md: Current for the runtime checker (lib/skill-contract.ts honors an optional agent_dispatch marker).
  • ARCHITECTURE.md, learn/SKILL.md.tmpl: Current (see debt).

Coverage debt

  • /review blocker proof: reference only (skills.md, changelog fragment). docs/review-policy.md, the canonical blocking-floor doc, does not mention it. This is a common gap.
  • R56 cut ledger: reference, how-to and explanation in docs/loadouts.md. No tutorial, which is acceptable for a maintainer surface.
  • /review dispatch markers: reference only (the checker defaults in docs/skill-routing-and-contracts.md).
  • Pre-existing on base: docs/skill-routing-and-contracts.md lists marker as an optional agent_dispatch field. The gen-time parser in scripts/resolvers/contract-done-means.ts rejects that key, and /review's adversarial item declares only match.

Diagram drift: none. No ASCII or Mermaid entity in the reviewed docs names a cut piece.

Behavior changes

Removed from the generated skills, on every host and in every loadout:

Module id Skill What it was
part:investigate/learnings-search /investigate ## Prior Learnings: a learnings search plus the cross-project AskUserQuestion
part:investigate/capture-learnings /investigate ## Capture Learnings at the end of the run
part:investigate/investigation-log /investigate The Report step's gstack-learnings-log call with type: "investigation"
part:review/learnings-search /review ## Prior Learnings in Step 3.6
part:review/capture-learnings /review ## Capture Learnings after the final report
part:review/repo-ownership /review The preamble's ## Repo Ownership — See Something, Say Something
part:review/queue-status /review Step 3.4, the advisory VERSION queue line (gstack-next-version)
  • Kept: telemetry (gstack-skill-end). It writes the timeline's completed event with the real outcome and duration, and it drains artifacts sync (bin/gstack-skill-end:59-69).
  • No default flips. skill_routing and skill_contracts are untouched.

Always-loaded bytes (the Claude SKILL.md, frontmatter included):

Skill Before (v1.94.24.0, 1ccab0d) After (9386a27) With #3957 merged (trial)
/investigate 21,242 17,838 17,894
/review 60,014 56,716 56,772

Tests changed, with reasons:

  • test/cut-ledger.test.ts (new): the ledger ratchet, the durable scope test (every host, ledger vs empty ledger, byte-identical outside investigate and review) and the shared-preamble check.
  • test/learnings-callers-unavailable.test.ts, test/learnings.test.ts and test/gen-skill-docs.test.ts (LEARNINGS_SEARCH, LEARNINGS_LOG, operational type, Factory paths): these follow the ledger. A cut skill must render no learnings block, and the resolver-content checks read the first uncut sample skill instead. No assertion changes for any other skill.
  • test/review-workflow-clarity.test.ts: section-boundary tokens move from ## Step 3.4:, {{LEARNINGS_SEARCH}} and {{LEARNINGS_LOG}} to the next heading, because those markers were cut.
  • test/fixtures/workflow-required-steps.json: drops /review's pinned ## Step 3.4 step.
  • test/pr-dependencies.test.ts: the "a template invokes a bin" example moves from /review to /ship, because /review no longer calls gstack-next-version.
  • test/exercised-map.test.ts: adds scripts/cut-ledger.ts to REVIEWED_SUPERSET, because the preamble imports it.
  • test/setup-claude-code-migration.test.ts: the generator fixture also copies modules/, because rendering now reads modules/cuts.json.
  • test/review-fix-range.test.ts: its Step 3 slice ended at the cut ## Step 3.4:. It now ends at ## Step 3.5: and asserts that both anchors exist in order.
  • scripts/judge-controls.ts and docs/evals/judge-controls-2026-10.md: the review judge's defect bundle cut Step 3 up to ## Step 3.4, which made cut() throw. The end anchor is now ## Step 3.5, which removes the same text.
  • test/helpers/carve-guards.ts and test/fixtures/skill-md-size-allowlist.json: the pins listed under Blast radius.

Pre-Landing Review

REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=5 scope=frozen fix_checks=1

Pass 1 ran at full depth on 27052ff, with the money class from scripts/cut-ledger.ts. Its readers were a batched specialist, the Red Team, the native adversarial pass, the outside voice (GPT-6.1 Sol) and the targeted reader, and nothing reached the blocking floor. The fix round, 8cd564a, did three things. It dropped the adversarial marker:, because adversarial-native#1 showed the checker passing on the marker plus any later Agent call. It also added the shared-preamble check and restated the changelog against v1.94.24.0. One fix-check read it and raised one informational note: /review's saving rounds to 3.3 KB, not 3.2. That is fixed in e25b935. After the docs audit commit, the targeted reader read the final head, 9386a27, and found nothing.

Review notes

  • adversarial-native#4 (noted): scripts/resolvers/confidence.ts:52 still says "log the corrected pattern as a learning" even though /review's Capture Learnings section is cut. The shared preamble's learnings logger still gives the command.
  • Not changed in this PR: lib/skill-contract.ts:370-377 (lane A's checker) counts an agent_dispatch marker plus any later Agent call as met. No skill declares a marker now, but the checker behavior stands.

Eval Results

Not run in this PR. bun run eval:select falls back to every gate case and judge, because scripts/resolvers/preamble.ts is a shared input. That is far over the lane's $10 paid cap. This PR merges only after the GST-1089 no-loss replay.

Test plan

  • Targeted lane through gstack-ship-release finish: 1,577 tests, 0 fail, 2 skip. It covers the carve and size guards, the cut ledger, the skill fixture, review clarity and fix range, gen-skill-docs, review packets, the module-size ratchet, learnings, skill descriptions, the exercised map, bun entry isolation, the spawnsync tripwire, pr-dependencies, the setup migration, workflow required steps, skill-contract, the stop hook, skill-route, skill-validation and review-depth.
  • bun run typecheck exits 0, and gen:skill-docs --dry-run is fresh.
  • CI is the full free run (R65).

garrytan and others added 2 commits November 3, 2026 04:03
…s /review blocker proof (GST-1088 lane C, candidate)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…T-1088 lane C)

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

trunk-io Bot commented Nov 3, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

garrytan and others added 9 commits November 3, 2026 04:30
…ned reviewer briefs keep their no-loss-tested bytes (GST-1088 lane C)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… forced-CRITICAL findings, marker override, Step 3.5 anchors, E2E section bracket, pins lowered to measured)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…adout error codes (Step 14.5 audit)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…h the ledger and with an empty one, on every host

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…-1088-lane-c

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

# Conflicts:
#	test/fixtures/skill-md-size-allowlist.json
#	test/helpers/carve-guards.ts
…al agent_dispatch marker in the contract resolver), cap comments cite gate rev 2, pins at the combined measurement

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…r (match alone gates it), shared-preamble cut check, changelog at post-#3909 sizes, pins at measured (review 56,716, ratio 1.2979)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…g as /investigate

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…docs2-7370b4ba)

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

capy-ai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Closing: held since 11-03 for the GST-1089 before/after measurement, and its thread is archived. The branch is kept. If the measurement supports these cuts, the work is rebuilt on current main.

@capy-ai capy-ai Bot closed this Nov 9, 2026
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