Plan — Council-cost reduction for review-pr-worker.md (lite council for docs-only PRs)
Issue: #7663 (Cut review-pr burn) — scope item 4.
Status: PROPOSAL — awaiting human apply. The target file
infra/agent-prompts/review-pr-worker.md is protected: true
(change-policy: PRODUCTION — human confirmation required before ANY edit), so a dev-issue
worker must not edit it. This plan carries the change as a git apply-able diff for a human to
apply after review.
Why
Each review-pr run spawns a 9-perspective Haiku council + a Sonnet judge. On a docs-only PR
(a *.md / docs/ / CHANGELOG.md change) six of those lenses — Performance, Quality & Tests,
Security, Reuse & Duplication, Simplicity & Scope-fit, Value & Quick-wins — have essentially
nothing to analyse in prose, yet they still cost a Haiku call each. Those low-risk PRs were a large
share of the 2026-10-08 burn that hit both accounts’ subscription limits.
The other half of #7663 (dedup by head sha, throttle, conflict skip in scan_prs_for_review() and
dedup.ts) stops re-reviewing the same diff. This change reduces the cost of a single review
for the PRs where a full council adds no value.
What
Add a Phase 0.4 — Council mode step that classifies the PR’s changed-file list once:
lite— every changed file is documentation → spawn a 3-lens council:Correctness,Risk,Secrets & Credentials. The Secrets lens is retained unconditionally because a secret pasted into prose is exactly the #7439 leak class.full— any non-docs file is touched, or the file list can’t be fetched (fail-safe) → the existing 9-lens council, unchanged.
Everything downstream (Phase 1.5 secret-scrub gate, the judge, Phase 4 merge/cleanup) already
operates on whatever REPORTING_LENSES contains, so a lite run needs no other special-casing.
Full-council behaviour for every code PR is byte-for-byte unchanged.
Lens-selection rationale
| Dropped lens (lite) | Why safe to drop on a docs-only diff |
|---|---|
| Performance | No runtime code path in prose. |
| Quality & Tests | No logic module / test file to correlate. |
| Security | Injection/auth surfaces are code, not docs (secret-leak risk stays via the Secrets lens). |
| Reuse & Duplication | No utility/service to reinvent. |
| Simplicity & Scope-fit | Prose scope-fit is low-value and judge-covered. |
| Value & Quick-wins | Advisory-only; never blocks — safe to omit. |
Apply instructions (human, after confirming the edit)
# from the repo root, on a branch:
git apply docs/plans/plan-7663-review-council-lite.patch
# review, then commit as the human/owner identity per docs/playbooks/git-identity-and-roles.mdRebase note (updated 2026-10-14): #7628 landed as v3.5.0 (#7823). This patch has been rebased against
main at review-pr-worker.md v3.5.0 (current) and bumps it to v3.6.0. The previous patch
(v3.4.0 → v3.5.0) no longer applied after #7823 merged. Patch verified git apply --check clean
against the current file.
The diff (rebased against v3.5.0, 2026-10-14)
See docs/plans/plan-7663-review-council-lite.patch for the git apply-able diff.
The patch below is also reproduced here for reference:
diff --git a/infra/agent-prompts/review-pr-worker.md b/infra/agent-prompts/review-pr-worker.md
index a37666c5..91c3e4cf 100644
--- a/infra/agent-prompts/review-pr-worker.md
+++ b/infra/agent-prompts/review-pr-worker.md
@@ -1,13 +1,13 @@
---
-purpose: autonomous queue worker — 9-perspective Haiku council + Sonnet judge PR review, with auto-merge on APPROVE
+purpose: autonomous queue worker — adaptive Haiku council (9 lenses full / 3 lenses lite for docs-only PRs) + Sonnet judge PR review, with auto-merge on APPROVE
consumers: queue-dispatcher-loop.py (job_type=review-pr)
model: claude-sonnet-4-6
job_type: review-pr
-version: 3.5.0
+version: 3.6.0
state: production
protected: true
-last-modified: 2026-10-13
-changelog: "3.5.0 — #7823: approve et-op PRs as p24-reviewer..."
+last-modified: 2026-10-14
+changelog: "3.6.0 — #7663: adaptive council — docs-only PRs run a 3-lens LITE council; 3.5.0 — #7823: ..."
change-policy: PRODUCTION — human confirmation required before ANY edit to this file.
---
@@ -161,12 +161,50 @@ on the same PR never confuses its own comments with this run's.
---
-## Phase 1 — Spawn the council (9 perspectives, parallel, foreground, Haiku)
+## Phase 0.4 — Council mode: full (9 lenses) or lite (3 lenses) — #7663
-Spawn all 9 `Agent()` calls below in a **single message** (parallel tool calls), each with
+A docs-only PR does not need a performance / reuse / simplicity / value scan — those lenses have
+nothing to analyse in prose, yet they were burning 9 Haiku calls per review on exactly the
+low-risk PRs that dominated the 2026-10-08 subscription-limit burn. Classify the diff once here and
+run a **LITE** 3-lens council when every changed file is documentation; otherwise the **FULL**
+9-lens council is unchanged.
+
+[Phase 0.4 content — see the .patch file for the full diff]
+
+---
+
+## Phase 1 — Spawn the council (9 perspectives full / 3 lite, parallel, foreground, Haiku)
+
+Spawn the `Agent()` calls below... When `COUNCIL_MODE=lite` (Phase 0.4) spawn ONLY the
+`Correctness`, `Risk`, and `Secrets & Credentials` perspectives; when `full`, spawn all 9.