feat: add adversarial review agents for code and documents (#403)
This commit is contained in:
@@ -73,7 +73,7 @@ Routing rules:
|
||||
|
||||
## Reviewers
|
||||
|
||||
14 reviewer personas in layered conditionals, plus CE-specific agents. See the persona catalog included below for the full catalog.
|
||||
15 reviewer personas in layered conditionals, plus CE-specific agents. See the persona catalog included below for the full catalog.
|
||||
|
||||
**Always-on (every review):**
|
||||
|
||||
@@ -95,6 +95,7 @@ Routing rules:
|
||||
| `compound-engineering:review:api-contract-reviewer` | Routes, serializers, type signatures, versioning |
|
||||
| `compound-engineering:review:data-migrations-reviewer` | Migrations, schema changes, backfills |
|
||||
| `compound-engineering:review:reliability-reviewer` | Error handling, retries, timeouts, background jobs |
|
||||
| `compound-engineering:review:adversarial-reviewer` | Diff >=50 changed non-test/non-generated/non-lockfile lines, or auth, payments, data mutations, external APIs |
|
||||
|
||||
**Stack-specific conditional (selected per diff):**
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Persona Catalog
|
||||
|
||||
14 reviewer personas organized into always-on, cross-cutting conditional, and stack-specific conditional layers, plus CE-specific agents. The orchestrator uses this catalog to select which reviewers to spawn for each review.
|
||||
15 reviewer personas organized into always-on, cross-cutting conditional, and stack-specific conditional layers, plus CE-specific agents. The orchestrator uses this catalog to select which reviewers to spawn for each review.
|
||||
|
||||
## Always-on (4 personas + 2 CE agents)
|
||||
|
||||
@@ -22,7 +22,7 @@ Spawned on every review regardless of diff content.
|
||||
| `compound-engineering:review:agent-native-reviewer` | Verify new features are agent-accessible |
|
||||
| `compound-engineering:research:learnings-researcher` | Search docs/solutions/ for past issues related to this PR's modules and patterns |
|
||||
|
||||
## Conditional (5 personas)
|
||||
## Conditional (6 personas)
|
||||
|
||||
Spawned when the orchestrator identifies relevant patterns in the diff. The orchestrator reads the full diff and reasons about selection -- this is agent judgment, not keyword matching.
|
||||
|
||||
@@ -33,6 +33,7 @@ Spawned when the orchestrator identifies relevant patterns in the diff. The orch
|
||||
| `api-contract` | `compound-engineering:review:api-contract-reviewer` | Route definitions, serializer/interface changes, event schemas, exported type signatures, API versioning |
|
||||
| `data-migrations` | `compound-engineering:review:data-migrations-reviewer` | Migration files, schema changes, backfill scripts, data transformations |
|
||||
| `reliability` | `compound-engineering:review:reliability-reviewer` | Error handling, retry logic, circuit breakers, timeouts, background jobs, async handlers, health checks |
|
||||
| `adversarial` | `compound-engineering:review:adversarial-reviewer` | Diff has >=50 changed non-test, non-generated, non-lockfile lines, OR touches auth, payments, data mutations, external API integrations, or other high-risk domains |
|
||||
|
||||
## Stack-Specific Conditional (5 personas)
|
||||
|
||||
|
||||
@@ -48,6 +48,12 @@ Analyze the document content to determine which conditional personas to activate
|
||||
- Scope boundary language that seems misaligned with stated goals
|
||||
- Goals that don't clearly connect to requirements
|
||||
|
||||
**adversarial** -- activate when the document contains:
|
||||
- More than 5 distinct requirements or implementation units
|
||||
- Explicit architectural or scope decisions with stated rationale
|
||||
- High-stakes domains (auth, payments, data migrations, external integrations)
|
||||
- Proposals of new abstractions, frameworks, or significant architectural patterns
|
||||
|
||||
## Phase 2: Announce and Dispatch Personas
|
||||
|
||||
### Announce the Review Team
|
||||
@@ -73,6 +79,7 @@ Add activated conditional personas:
|
||||
- `compound-engineering:document-review:design-lens-reviewer`
|
||||
- `compound-engineering:document-review:security-lens-reviewer`
|
||||
- `compound-engineering:document-review:scope-guardian-reviewer`
|
||||
- `compound-engineering:document-review:adversarial-document-reviewer`
|
||||
|
||||
### Dispatch
|
||||
|
||||
@@ -90,7 +97,7 @@ Pass each agent the **full document** -- do not split into sections.
|
||||
|
||||
**Error handling:** If an agent fails or times out, proceed with findings from agents that completed. Note the failed agent in the Coverage section. Do not block the entire review on a single agent failure.
|
||||
|
||||
**Dispatch limit:** Even at maximum (6 agents), use parallel dispatch. These are document reviewers with bounded scope reading a single document -- parallel is safe and fast.
|
||||
**Dispatch limit:** Even at maximum (7 agents), use parallel dispatch. These are document reviewers with bounded scope reading a single document -- parallel is safe and fast.
|
||||
|
||||
## Phase 3: Synthesize Findings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user