Skip to content
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
441f63a
implement(documenter): R1 single-body submission + E2 pr-context stag…
Jul 3, 2026
c2279b6
implement(coder): R8(a) versioned structured finding schema + validator
Jul 3, 2026
6a85827
implement(tester): unit tests for R8(a) finding schema/validator (tas…
Jul 3, 2026
107e956
implement(tester): unit tests for R8(a) finding schema/validator (tas…
Jul 3, 2026
8826894
Persist BRC history for slice-1 (#2548)
Jul 3, 2026
c02da14
slice-1: prettier fixes + changeset
jwbron Jul 3, 2026
b119a01
slice-1: drop BRC history artifacts from slice PR
jwbron Jul 3, 2026
b9508a6
review: address slice-1 feedback (empty body, lib distribution, comme…
jwbron Jul 6, 2026
123a10f
review: drop lib install step; scripts run via npx tsx
jwbron Jul 7, 2026
e637ece
implement(coder): R8(b) computed verdict + R8(c) Conventional-Comment…
Jul 3, 2026
8819339
implement(tester): R8(b)/R2 verdict truth-table + R8(c) rendering sna…
Jul 3, 2026
545e711
implement(tester): prettier-format task-2-4 test files (lint gate)
Jul 3, 2026
40efb53
implement(coder): prettier 2.6.2 lint fixes for slice-2 + finding-sch…
Jul 3, 2026
f618d2a
Persist BRC history for slice-2 (#2548)
Jul 3, 2026
6058d86
slice-2: changeset
jwbron Jul 3, 2026
da5b450
slice-2: drop BRC history artifacts from slice PR
jwbron Jul 3, 2026
0950bf2
review: address slice-2 feedback (verdict precedence, hold UX, empty …
jwbron Jul 6, 2026
6cfe3e3
implement(documenter): wire deterministic router into Step 3; drop re…
Jul 3, 2026
7959787
implement(documenter): fix router invocation path to lib/router.ts (r…
Jul 3, 2026
d96789d
implement(coder): R10 deterministic router + tier-scaled budget (slic…
Jul 3, 2026
3f919f3
implement(tester): R10 router unit tests — classification, lens, tier…
Jul 3, 2026
f3130ec
implement(coder): router CLI entrypoint + routing.json serialization …
Jul 3, 2026
a6984f1
Persist BRC history for slice-3 (#2548)
Jul 3, 2026
c41a812
implement(tester): cover router v2 serialization + CLI (toRoutingJson…
Jul 3, 2026
cb8d714
slice-3: replace satisfies with prettier-2-compatible check, changeset
jwbron Jul 3, 2026
29f2b6f
slice-3: drop BRC history artifacts from slice PR
jwbron Jul 3, 2026
abdf46c
review: address slice-3 feedback (consumer-owned routing config)
jwbron Jul 6, 2026
06cbb2e
review: last-match-wins tier precedence; move ROUTING format doc to R…
jwbron Jul 7, 2026
06ac3ee
implement(documenter): E1/E3/E5/E6/E7/R3b reliability prompt edits (s…
Jul 3, 2026
5bb941d
Persist BRC history for slice-4 (#2548)
Jul 3, 2026
a21b4ce
slice-4: changeset
jwbron Jul 3, 2026
fdf05d2
slice-4: drop BRC history artifacts from slice PR
jwbron Jul 3, 2026
798016b
review: address slice-4 feedback (steering text, touched-lines scoping)
jwbron Jul 6, 2026
238a355
implement(documenter): R9 bounded-investigation instructions for revi…
Jul 3, 2026
e5d1fd2
implement(coder): R9 per-finding investigation tool-call cap (slice-5)
Jul 3, 2026
8074db2
implement(tester): R9 per-finding tool-call cap tests (task-5-3)
Jul 3, 2026
a01c756
implement(tester): cover check() refusal previews (per-finding + run-…
Jul 3, 2026
1340a42
slice-5: prettier fix + changeset
jwbron Jul 3, 2026
7599eea
review: address slice-5 feedback (wire the investigation cap to its c…
jwbron Jul 6, 2026
3f01827
review: investigation-cap call sites run via npx tsx
jwbron Jul 7, 2026
4e62371
implement(documenter): slice-6 roster framework — always-on reviewers…
Jul 3, 2026
8d21077
Persist BRC history for slice-6 (#2548)
Jul 3, 2026
481198d
slice-6: changeset
jwbron Jul 3, 2026
33de326
slice-6: drop BRC history artifacts from slice PR
jwbron Jul 3, 2026
46228e0
review: rework slice-6 roster to opt-in (no new default cost)
jwbron Jul 6, 2026
8f8cb7c
review: genericize orchestrator (uniform findings contract, roster de…
jwbron Jul 7, 2026
6ae06ac
Merge remote-tracking branch 'origin/main' into egg/pipeline-dcdad92d…
jwbron Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/review-computed-verdict.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"review": minor
---

Make the review verdict a deterministic computation instead of a model judgment: structured findings flow through a computed verdict (severity/confidence truth table, with a hold-for-human outcome for policy conflicts), templated comment rendering, and a missing-dimension gate that refuses to conclude when a required review dimension produced no findings and no explicit all-clear. The model authors findings; code decides the verdict and renders the comments.
5 changes: 5 additions & 0 deletions .changeset/review-deterministic-router.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"review": minor
---

Add the deterministic review router (`workflows/review/lib/router.ts`): pure TypeScript that classifies changed files (generated vs source via .gitattributes), selects which specialist lenses to spawn by touched paths, maps owning teams from REVIEWERS rules (subsuming the old reviewer-mapper sub-agent), assigns per-file risk tiers, and computes one run budget scaled by the highest touched tier with a misrouted-PR floor. Diff-direction-dependent tiers are deferred to a single small-model call instead of guessed.
5 changes: 5 additions & 0 deletions .changeset/review-finding-schema-foundations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"review": minor
---

Add the versioned structured finding schema (`workflows/review/lib/finding-schema.ts`): every sub-agent finding now carries id, lens, anchor (line/range/file/pr-level), severity, confidence, evidence trace, optional suggested patch and pre-merge obligation, validated against an exported `FINDING_SCHEMA_VERSION`. Review submission is standardized on a single robust `submit-pull-request-review` call with a guaranteed non-empty body (the empty-body retry fallback is removed), and PR context (`pr-context.json`) is staged on disk once per run for all sub-agents, extending the existing diff staging.
5 changes: 5 additions & 0 deletions .changeset/review-investigation-cap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"review": minor
---

Bound reviewer investigation (R9): sub-agents get explicit instructions for cheap targeted verification (grep callers, trace the call chain, one targeted check per finding), and `workflows/review/lib/investigation-cap.ts` enforces a deterministic per-finding and per-run tool-call cap sourced from the router's run budget. Over-cap calls are refused with fixed reason codes and refusals never mutate state.
5 changes: 5 additions & 0 deletions .changeset/review-roster-framework.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"review": minor
---

Restructure the reviewer roster: five always-on reviewers (holistic, completeness, test-adequacy, first-principles, conventions) with explicit trust and advisory constraints and named mandates; launch-default model and effort assignments per role (Opus 4.8 workhorse, xhigh for the security lens and claim validation, Fable 5 for first-principles); and the kept gates (pattern-triage, claim-validator plus refuter panel, deterministic dedup, verdict bookends, thread-reconciler) wired to the new roster.
5 changes: 5 additions & 0 deletions .changeset/review-wave1-prompt-edits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"review": patch
---

Reliability and quality prompt edits (wave 1): high-risk triggers are named then judged in one line (E1); prompt-injection attempts in the diff or PR description are themselves blocking findings (E3); deletions are findings (E5); bot threads are judged against the whole reply chain and a conceded point is never re-raised (E6); open human threads are deferred to instead of duplicated (E7); and pre-existing bugs on touched lines are in scope (R3b).
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@
"fast-glob": "^3.3.3",
"memfs": "^4.51.0",
"prettier": "^2.6.2",
"typescript": "^5.9.3",
"vitest": "^4.0.10"
},
"packageManager": "pnpm@10.0.0+sha512.b8fef5494bd3fe4cbd4edabd0745df2ee5be3e4b0b8b08fa643aa3e4c6702ccc0f00d68fa8a8c9858a735a0032485a44990ed2810526c875e416f001b17df12b",
"dependencies": {
"@swc-node/register": "^1.11.1",
"typescript": "^5.9.3"
}
"packageManager": "pnpm@10.0.0+sha512.b8fef5494bd3fe4cbd4edabd0745df2ee5be3e4b0b8b08fa643aa3e4c6702ccc0f00d68fa8a8c9858a735a0032485a44990ed2810526c875e416f001b17df12b"
}
13 changes: 6 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions workflows/review/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ locally at compile/run time, not from this repo). Create them under
| `risk-classification.md` | **Required** | Your High/Medium/Low/Trivial file patterns, imported into the `correctness-reviewer` sub-agent, which assigns each reviewed file a risk level. |
| `ci-tooling.md` | **Required** | The lint/format/type/test issues your CI already catches. Imported into `correctness-reviewer` so it doesn't flag them, and into `claim-validator` so it drops any correctness claim that flags a CI-caught issue. |
| `skills.md` | **Required** | The catalog of best-practice skill files (and when each applies). Imported into `skill-auditor` to evaluate the diff against, and into `claim-validator` so it can verify a flagged skill violation against the skill's actual rule. |
| `ROUTING` | Optional | The machine-readable path map the deterministic router reads (see below). Without it the router spawns no specialist lenses and floors the run budget, and the review notes the missing config on the PR. |

All four are **required**, but validated at different times. `config.md` is a
frontmatter import, embedded and checked at **compile time** — `gh aw compile` fails if
Expand All @@ -77,6 +78,77 @@ Repo-specific frontmatter that imports can't merge (e.g. an `if:` condition to s
deploy/automation branches or forks) goes directly in your installed `review.md` as
a local edit; `gh aw update` preserves it.

### The `ROUTING` file

`.github/aw/review/ROUTING` is parsed deterministically by the router
(`lib/routing-config.ts`), `REVIEWERS`-style: blanks and `#` comments skipped, one
rule per line:

```
# <pattern> [lens=<lens>,…] [tier=trivial|low|medium|high] [direction-dependent]
# enable <reviewer>[,<reviewer>…]
services/**/migrations/** tier=high lens=data-migrations
**/*.graphql lens=api-federation-compat
pkg/auth/** tier=high direction-dependent lens=security-auth
services/**/testdata/** tier=trivial
docs/** tier=trivial
enable holistic,test-adequacy
```

- `lens=` names the specialist lenses to spawn when the pattern is touched; when
several rules match a path their lenses are unioned (lenses are additive).
- `enable` lines turn on the opt-in whole-change reviewers (`holistic`,
`completeness`, `test-adequacy`, `first-principles`, `conventions`). Neither
lenses nor opt-in reviewers run anywhere by default: a repo opts into each
explicitly, and the policy is that a reviewer earns its line here through the
eval suite.
- `tier=` assigns the path a risk tier. When several rules match, the **last
matching rule in file order wins** (gitignore/CODEOWNERS-style): write the broad
rule first and its exceptions after it, as with `services/**` and
`services/**/testdata/**` above.
- `direction-dependent` marks a tier that cannot be finalised from the path alone
(tightening vs. loosening a check); the router emits the file as a pending risk
question instead of guessing, and it applies only when its own rule is the
winning tier rule for the path.

Glob semantics are a practical subset of gitignore/CODEOWNERS: `**` crosses
directories, `*` and `?` stay within a segment, a trailing `/` matches everything
under a directory, and a pattern without `/` matches the basename anywhere.
Malformed lines produce a parse warning (surfaced as a `Note:` on the PR review)
and are skipped; routing degrades to fewer lenses, never to a crashed review.

`ROUTING` is the machine-readable complement to `risk-classification.md`, which
stays the model-facing prose about file *contents*; team ownership stays in
`.github/REVIEWERS`, unchanged.

### Models and effort per role

Each sub-agent pins its model in its own definition inside `review.md` (with a
launch-default `effort:` annotation; the gh-aw Claude engine exposes no per-agent
effort field yet). The orchestrator prompt deliberately says nothing about
sub-agent models — this table is the human-facing summary:

| Role | Model | Effort | Why |
| --- | --- | --- | --- |
| orchestrator | `claude-opus-4-8` | high | Owns every GitHub/safe-output decision |
| `pattern-triage` | `claude-sonnet-4-6` | medium | Cheap first-pass triage |
| `thread-reconciler` | `claude-opus-4-8` | medium | Reconciliation |
| `correctness-reviewer` | `claude-opus-4-8` | high | Whole-change reviewer |
| `skill-auditor` | `claude-opus-4-8` | high | Whole-change reviewer |
| `holistic` | `claude-opus-4-8` | high | Opt-in whole-change reviewer (`enable` in `ROUTING`) |
| `completeness` | `claude-opus-4-8` | high | Opt-in whole-change reviewer (`enable` in `ROUTING`) |
| `test-adequacy` | `claude-opus-4-8` | high | Opt-in whole-change reviewer (`enable` in `ROUTING`) |
| `conventions` | `claude-opus-4-8` | medium | Opt-in advisory targeted check (`enable` in `ROUTING`) |
| `first-principles` | `claude-fable-5` | high | Opt-in advisory-only; reviews the change's justification |
| `claim-validator` | `claude-opus-4-8` | xhigh | Adversarial claim validation |
| specialist lenses | `claude-opus-4-8` | high | Opt-in via `lens=` in `ROUTING`; the security & auth lens is xhigh |

Only the orchestrator and the default roster (`pattern-triage`,
`correctness-reviewer`, `skill-auditor`, `thread-reconciler`, `claim-validator`)
run by default; every other row is opt-in via `ROUTING` and earns its line through
the eval suite. Per-role Fable-5 / Sonnet experiment arms are eval-suite
measurements to run after the suite exists.

### Required secrets / variables

- `ANTHROPIC_API_KEY` — used by the `claude` engine.
Expand Down
Loading
Loading