M17-3: Reviewer specialization in practice #154

Closed
opened 2026-04-20 14:50:20 +00:00 by code-lead · 0 comments
Collaborator

As an operator, I want reviewer-security (opus, match area:security) and reviewer-fast (haiku, match type:chore) instances running alongside the default reviewer, so that security-sensitive PRs get the strongest model and trivial chores don't burn opus.

Acceptance criteria

Agent instances

  • Create two new SQLite agent rows via the dashboard CRUD (NOT config/agents.json):
    • reviewer-security — model claude-opus-4-7[1m], match_labels: ["area:security"]
    • reviewer-fast — model claude-haiku-4-5-20251001, match_labels: ["type:chore"]
  • reviewer-default's match_labels stays empty (catch-all)

Labels

  • Add area:security to config/labels.json
  • Label exists in every repo the fleet serves (per #M17-1's iteration; if #M17-1 hasn't landed yet, seed it manually for the current repo)

Routing

  • Pool scheduler (dispatchByType in pool.ts) verifiably routes an issue's linked PR to reviewer-security when the issue has area:security — even when other reviewer instances are idle and earlier in round-robin

Tests

  • pool.test.ts — 3 reviewer instances, issue with area:security label → picks reviewer-security even if others idle and earlier in round-robin
  • webhook-handlers.test.ts — review dispatch on an area:security-labeled PR routes to the security instance

Docs

  • CLAUDE.md "Roles" — document "how to add a specialised reviewer instance"

Smoke

  • After merge, file an area:security issue on this repo and paste the live-service routing log line in the PR body

Out of scope

  • Label-only routing for boss / dev (different pattern — tied to issue body / PR scope, not ad-hoc labels)
  • Budget per specialisation (#M17-2 covers total usage)

Dependencies

  • Blocks on #M17-5 — uses the CRUD endpoint with model override shipped there.

References

  • Spec: specs/m17-multi-repo-and-observability.md §Story M17-3
  • Milestone 16 A3: match_labels routing shipped in pool scheduler
As an operator, I want `reviewer-security` (opus, match `area:security`) and `reviewer-fast` (haiku, match `type:chore`) instances running alongside the default reviewer, so that security-sensitive PRs get the strongest model and trivial chores don't burn opus. ## Acceptance criteria ### Agent instances - [ ] Create two new SQLite agent rows via the dashboard CRUD (NOT `config/agents.json`): - [ ] `reviewer-security` — model `claude-opus-4-7[1m]`, `match_labels: ["area:security"]` - [ ] `reviewer-fast` — model `claude-haiku-4-5-20251001`, `match_labels: ["type:chore"]` - [ ] `reviewer-default`'s `match_labels` stays empty (catch-all) ### Labels - [ ] Add `area:security` to `config/labels.json` - [ ] Label exists in every repo the fleet serves (per #M17-1's iteration; if #M17-1 hasn't landed yet, seed it manually for the current repo) ### Routing - [ ] Pool scheduler (`dispatchByType` in `pool.ts`) verifiably routes an issue's linked PR to `reviewer-security` when the issue has `area:security` — even when other reviewer instances are idle and earlier in round-robin ### Tests - [ ] `pool.test.ts` — 3 reviewer instances, issue with `area:security` label → picks `reviewer-security` even if others idle and earlier in round-robin - [ ] `webhook-handlers.test.ts` — review dispatch on an `area:security`-labeled PR routes to the security instance ### Docs - [ ] CLAUDE.md "Roles" — document "how to add a specialised reviewer instance" ### Smoke - [ ] After merge, file an `area:security` issue on this repo and paste the live-service routing log line in the PR body ## Out of scope - Label-only routing for boss / dev (different pattern — tied to issue body / PR scope, not ad-hoc labels) - Budget per specialisation (#M17-2 covers total usage) ## Dependencies - Blocks on **#M17-5** — uses the CRUD endpoint with model override shipped there. ## References - Spec: `specs/m17-multi-repo-and-observability.md` §Story M17-3 - Milestone 16 A3: `match_labels` routing shipped in pool scheduler
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#154
No description provided.