Skip to content

Code review reads the design checklist and your repo's agents/ folder (#3924) - #4711

Merged
capy-ai[bot] merged 5 commits into
mainfrom
review-reads-design-checklist-and-repo-agents-folder
Nov 22, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
review-reads-design-checklist-and-repo-agents-folder

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Code review now checks frontend changes against the design checklist, and the second-model review now reads code in a repository's own agents/ folder.
Before, the design reviewer was pointed at a file that doesn't exist, and the second-model review skipped every agents/ folder (#4410, #3924).
Nothing to do as a user; it arrives with the next gstack update.

What changed

People reported two blind spots in code review. For a frontend diff, /ship and /review sent the design reviewer to review/specialists/design.md, a file that doesn't exist, so the design checklist was never read (#4410, reported by @nfitzsimmons). One resolver in lib/review-pass.ts now maps the design reviewer to the real review/design-checklist.md, for the staged review and for gstack-review-dispatch render alike, and an unknown checklist name now stops the render instead of pointing at a missing file.

The second-model review told the reviewer not to read any agents/ folder, so code in a repository's own agents/ folder went unreviewed (#3924, reported by @kolla23). It now keeps the reviewer out of installed skill folders only (~/.claude/, ~/.agents/, .claude/skills/, .agents/) and any agents/openai.yaml, and says the rest of a repository's agents/ folder is code to review: the same words #4686 gave /codex.

Why

Code review should read everything a change touches. Both bugs silently skipped part of the review, and nobody saw a warning.

Blast radius

The boundary sentence is one shared constant, so the fix reaches every prompt that uses it: /ship's and /review's second-model review, the plan-ceo, plan-eng and plan-devex reviews, the /office-hours second opinion and the /document-release review. No other prompt text changed. A replay of the existing review test panel found no lost blockers with the new wording (details in the notes below).

Pre-Landing Review

The batched specialist found nothing. The two second-model readers raised five notes, none fixed here: one is about code this PR didn't change and four are below the blocking bar (both listed below). The outside reviewer's verdict was FINDINGS, with one blocker that this review deferred. Its claim is that an installed gstack points readers at checklists outside the checkout they review. That holds for every checklist since the workspace rule was added; this PR moves the design path to the same root the others already use.

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/review-brief.ts:238 The design checklist path comes from the gstack install root, but every brief asks readers to read only paths under the checkout under review, so an installed gstack reviewing another project points readers outside their workspace. Lead judgment: the defect lives in workspaceParagraph (lib/review-brief.ts:238), unchanged by this PR; main's pass and render CLI already join every checklist (testing, security, red-team, targeted) to the same install root, so this PR moves the design path to that same root and adds no new out-of-workspace read.
Review notes

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

  • INFORMATIONAL lib/review-pass.ts:229 review/design-checklist.md prescribes its own clean reply ('Design Review: No issues found.') and AUTO-FIX prose; a batched reader that follows it instead of the outer brief's NO FINDINGS marker is not a clean reply.
  • INFORMATIONAL lib/review-pass.ts:204 The design checklist was written for the lead /review agent (AUTO-FIX, detector probes, its own output format); a specialist reader could follow those instructions.
  • INFORMATIONAL crew/scripts/review-dispatch-compare.ts:42 The dispatch cost-comparison script sizes the design specialist from review/specialists/design.md, which does not exist, so it counts the design reader as free.
  • INFORMATIONAL lib/review-pass.ts:229 checklistFile throws mid-loop in renderStage, leaving earlier readers rendered and logged but the manifest unsaved; only a hand-edited manifest can reach it.
Documentation

Scope: The audit covered base 5962f0d..HEAD dee6154 (5 commits, 22 files) on reviewed tree 386a2a9b5424476448364cdd3f02c756cd0d3813, with nothing staged, unstaged or untracked. The branch makes two changes. First, the design reviewer now reads review/design-checklist.md through checklistFile() and refuses unknown checklist names. Second, the second-model filesystem boundary no longer excludes the repo's own agents/ folder.

Result: The docs are current, so I made no edits. docs/skills.md:636, ARCHITECTURE.md:371, CLAUDE.md:124, CONTRIBUTING.md:114,831 and docs/PROJECT_STRUCTURE.md:30,54 already point at review/design-checklist.md. No authored doc outside the generated SKILL.md files mentions review/specialists/design.md. I excluded CHANGELOG.md from that search, and I left the changelog fragment out of the finding because it names the old path on purpose to describe the bug. codex/SKILL.md.tmpl and codex/sections/challenge-mode.md.tmpl already contain the narrowed boundary. The banned-terms check returned none, because main has no .gstack/banned-terms.json.

Debt: This review was search-based. I read the changelog fragment in full, but for the other docs I matched the relevant lines and their context and did not read each of the 156 docs end to end. The changed review, ship, plan, office-hours and document-release section .md files are generated from scripts/resolvers/outside-voice-steps.ts, so the parent still has to confirm that the generated output is fresh.

Tests
Agent notes
  • No-loss replay (CREW rule 15), replay id GSTA-812, preregistered before any paid dispatch. Deterministic: of 40 main-vs-branch brief pairs on the GST-2495 eight-branch panel, 32 are byte-identical, and 8 outside-voice pairs differ only by the boundary sentence. Paid: detection 32/32 on treatment and 8/8 on control. Clean-branch blocking rows per reply were 0.25 on both arms. Evidence is kept in the crew's handoff for GSTA-812.
  • Size caps (Captain GStack Minder ruling A, 2026-11-22): the boundary sentence is shared and closes a review blind spot, it adds 90 bytes to each skill that carries it, and the replay measured these exact bytes. /review maxSizeRatio goes from 1.3421 to 1.3429. The ruling was extended to the other skills that carry the sentence and cross their caps by the same 90 bytes: plan-ceo-review 1.1014 to 1.1020, plan-devex-review 1.0911 to 1.0912 and office-hours 1.2157 to 1.2164. /ship gets one size-ledger entry (+90), and the 27 per-host size pins for the review, plan-eng-review and plan-devex-review skills that this sentence reaches each go up by 90.
  • The Step 14.5 documentation section is inserted as the audit wrote it except one word ("carry" became "contain") that the plain-body check refuses above the notes.
  • Not measured: a blocker inside a repository's own agents/ folder (the panel has none).
  • REVIEW_LOOP: passes=1 blocking_found=1 deferred=1 noted=4 fixed=1 scope=frozen dispatches=3
  • Gate edits: none detected (17 listed, 11 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)

Fixes #4410
Fixes #3924
Refs #4686

Approvals

Approved: yes (record r-126f430932b1). The full approval record stays private.
Plan: exempt: bug fix with failing-first tests (R65)
Plan check: exempt bug fix

{
  "schema_version": 1,
  "pr": 4711,
  "head": "dee61546f7088dc4f06e7e0e78cc3ea5c4c183d2",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1770,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 45045043907,
      "attempt": 1,
      "tree": "386a2a9b5424476448364cdd3f02c756cd0d3813"
    }
  ],
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/gstack/ship-gsta812",
  "head_tree": "386a2a9b5424476448364cdd3f02c756cd0d3813",
  "product_patch_id": "3df8e87a089bcbce8feb2d70003f7f38668d2f91",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 26,
    "rules": "33831f8248a814fd",
    "base": "5962f0d4f3296ce77a7bef51b53fed021559e21c",
    "registry": "5962f0d4f3296ce77a7bef51b53fed021559e21c",
    "gate_scan": {
      "tagged": 0,
      "head": "dee61546f7088dc4f06e7e0e78cc3ea5c4c183d2"
    },
    "reasons": [
      "runtime=26"
    ],
    "risk": [],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @386a2a9b5424 (8 checks, current for dee61546f708)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/45045043907/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/45045043961/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=386a2a9b5424 tests=39169 skipped=104 runs=45045043907/1 profiles=ci-reuse/free-tests heads=dee61546f708 verified=2026-11-22T16:52:53.373Z"
  ],
  "issues": {
    "fixes": [
      3924,
      4410
    ],
    "refs": [
      4686
    ],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, AGENTS.md (156 docs) against base 5962f0d"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 1,
    "deferred": 1,
    "noted": 4,
    "fixed": 1,
    "scope": "frozen",
    "rounds": 1,
    "dispatches": {
      "specialist": 3
    }
  },
  "gate_dispositions": []
}

garrytan and others added 4 commits November 22, 2026 16:11
… the second-model review skips the repo agents/ folder (#4410, #3924)

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

The design specialist now reads review/design-checklist.md through one
resolver shared by the pass and the render CLI; an unknown checklist name
refuses. The shared second-model boundary skips only installed skill folders
and any agents/openai.yaml, as /codex does since #4686.

Replay: GSTA-812
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ytes (#3924)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ndary sentence (#3924)

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.

Review-Finding: test/review-depth.test.ts:226:test-pin reader=core
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 16:57
@capy-ai
capy-ai Bot merged commit 00a6b7a into main Nov 22, 2026
53 of 54 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

1 participant