Review Team
Goal
Run six specialist reviewers in parallel and return one evidence-backed, deduplicated report.
Inputs
- Review target (patch, PR diff, staged/uncommitted changes, or module).
- Stack/runtime context and constraints.
- Risk profile (auth, compliance, data integrity, availability).
- Scope exclusions.
Workflow
1. Scope and ambiguity rules
Default mode: changed-files-first.
- Review changed files.
- Expand to immediate dependencies.
- Expand to high-risk call paths only when evidence requires it.
If scope is ambiguous, proceed with explicit assumptions only for non-safety-critical paths.
If ambiguity affects security/auth/compliance/destructive operations/data integrity, stop and request clarification.
2. Build shared context packet
Include:
- Scope mode and assumptions.
- Change universe (
working-tree or commit-range, plus exact range if known).
- Changed files + relevant tests/config.
- Commit allowlist/out-of-scope list (for downstream commit workflows).
- Severity/evidence policy.
3. Launch six roles in parallel
Lead Architect
- Check layering boundaries, coupling hotspots, and abstraction leakage.
Security Expert
- Check authn/authz, input validation, secrets handling, and reachable OWASP-class risks.
Performance & Optimization Engineer
- Check hot-path complexity, redundant I/O, and memory churn.
Readability & Maintainability Guru
- Check naming clarity, modularity/cohesion, and maintenance burden.
Edge-Case & Testing Specialist
- Check null/empty paths, partial failures, races, and scale edge cases.
Pragmatism & Simplicity Reviewer
- Check over-abstraction/indirection and propose behavior-preserving simplifications.
Guardrails:
- No speculative high-severity claims.
- Findings must cite concrete evidence.
- Anti-slop findings must provide behavior-preserving simplification.
4. Per-agent output schema
For each finding include:
- Severity (
Critical|High|Medium|Low)
- Confidence (
High|Medium|Low)
- Verification (
Confirmed|Likely|Hypothesis)
- Title, Evidence, Impact, Suggested fix
- Diff (when feasible)
- Validation evidence (or explicit unverified disclosure)
- Behavior preservation note (required for anti-slop)
- Dependency policy note (required when the fix adds/changes external dependencies; cite approval or pre-approved policy)
- Regression test addition (required for Critical/High)
If no findings: explicit no-findings statement + residual risks.
Severity gates:
Critical/High require strong evidence + Confidence: High.
Hypothesis cannot exceed Medium.
- Anti-slop defaults to
Low/Medium.
- Anti-slop cannot be
Critical by itself.
5. Agent failure handling
- Wait for all six role outputs (or retry outcomes) before consensus synthesis.
- Retry failed role once.
- If a safety-critical role remains unavailable for in-scope risk, stop and request clarification before high-confidence conclusions.
- Otherwise continue with role marked
Unavailable and apply confidence penalty.
6. Consensus
- Deduplicate by root cause/component/risk type.
- Merge overlaps and list contributing roles.
- Escalate severity by at most one level with corroboration.
- Remove style-only nits unless impact is material.
- Keep disagreements under
Open Questions.
Final Output Contract
Return one consolidated report with sections:
Executive Summary
Scope Reviewed (must include change universe)
Coverage Limits
Role Coverage (for each of 6 roles: Completed|No findings|Unavailable)
Findings (Critical -> High -> Medium -> Low) with global Issue N numbering
Quick Wins
Suggested Diffs
Regression Test Additions
Open Questions
Residual Risks
Quality gates:
- Every finding has evidence, impact, fix, and validation evidence/unverified disclosure.
- Critical/High satisfy strict evidence rules.
- Anti-slop findings include behavior-preservation note.
- Numbering is gap-free and uncapped.
Compatibility
- Generator skills (for example
d2lang) own final user-facing output; review-team output becomes internal analysis input.
- With
commit (and no generator), append Commit Scope after Residual Risks and keep staging allowlisted.
- With generator +
commit, pass Commit Scope as internal handoff data (not appended section).
pr and review-team must run as separate flows. Do not co-trigger or merge output contracts in one response.
1---2name: review-team3description: Launch a six-role parallel agent team to perform comprehensive code review of attached changes, pull requests, or codebase sections. Use for deep multi-role analysis that requires high-precision, evidence-backed findings, severity ranking, global issue numbering, concrete fixes, and patch-style diffs.4---56# Review Team78## Goal910Run six specialist reviewers in parallel and return one evidence-backed, deduplicated report.1112## Inputs1314- Review target (patch, PR diff, staged/uncommitted changes, or module).15- Stack/runtime context and constraints.16- Risk profile (auth, compliance, data integrity, availability).17- Scope exclusions.1819## Workflow2021### 1. Scope and ambiguity rules2223Default mode: `changed-files-first`.241. Review changed files.252. Expand to immediate dependencies.263. Expand to high-risk call paths only when evidence requires it.2728If scope is ambiguous, proceed with explicit assumptions only for non-safety-critical paths.29If ambiguity affects security/auth/compliance/destructive operations/data integrity, stop and request clarification.3031### 2. Build shared context packet3233Include:34- Scope mode and assumptions.35- Change universe (`working-tree` or `commit-range`, plus exact range if known).36- Changed files + relevant tests/config.37- Commit allowlist/out-of-scope list (for downstream commit workflows).38- Severity/evidence policy.3940### 3. Launch six roles in parallel41421. `Lead Architect`43 - Check layering boundaries, coupling hotspots, and abstraction leakage.442. `Security Expert`45 - Check authn/authz, input validation, secrets handling, and reachable OWASP-class risks.463. `Performance & Optimization Engineer`47 - Check hot-path complexity, redundant I/O, and memory churn.484. `Readability & Maintainability Guru`49 - Check naming clarity, modularity/cohesion, and maintenance burden.505. `Edge-Case & Testing Specialist`51 - Check null/empty paths, partial failures, races, and scale edge cases.526. `Pragmatism & Simplicity Reviewer`53 - Check over-abstraction/indirection and propose behavior-preserving simplifications.5455Guardrails:56- No speculative high-severity claims.57- Findings must cite concrete evidence.58- Anti-slop findings must provide behavior-preserving simplification.5960### 4. Per-agent output schema6162For each finding include:63- Severity (`Critical|High|Medium|Low`)64- Confidence (`High|Medium|Low`)65- Verification (`Confirmed|Likely|Hypothesis`)66- Title, Evidence, Impact, Suggested fix67- Diff (when feasible)68- Validation evidence (or explicit unverified disclosure)69- Behavior preservation note (required for anti-slop)70- Dependency policy note (required when the fix adds/changes external dependencies; cite approval or pre-approved policy)71- Regression test addition (required for Critical/High)7273If no findings: explicit no-findings statement + residual risks.7475Severity gates:76- `Critical/High` require strong evidence + `Confidence: High`.77- `Hypothesis` cannot exceed `Medium`.78- Anti-slop defaults to `Low/Medium`.79- Anti-slop cannot be `Critical` by itself.8081### 5. Agent failure handling8283- Wait for all six role outputs (or retry outcomes) before consensus synthesis.84- Retry failed role once.85- If a safety-critical role remains unavailable for in-scope risk, stop and request clarification before high-confidence conclusions.86- Otherwise continue with role marked `Unavailable` and apply confidence penalty.8788### 6. Consensus8990- Deduplicate by root cause/component/risk type.91- Merge overlaps and list contributing roles.92- Escalate severity by at most one level with corroboration.93- Remove style-only nits unless impact is material.94- Keep disagreements under `Open Questions`.9596## Final Output Contract9798Return one consolidated report with sections:991. `Executive Summary`1002. `Scope Reviewed` (must include change universe)1013. `Coverage Limits`1024. `Role Coverage` (for each of 6 roles: `Completed|No findings|Unavailable`)1035. `Findings (Critical -> High -> Medium -> Low)` with global `Issue N` numbering1046. `Quick Wins`1057. `Suggested Diffs`1068. `Regression Test Additions`1079. `Open Questions`10810. `Residual Risks`109110Quality gates:111- Every finding has evidence, impact, fix, and validation evidence/unverified disclosure.112- Critical/High satisfy strict evidence rules.113- Anti-slop findings include behavior-preservation note.114- Numbering is gap-free and uncapped.115116## Compatibility117118- Generator skills (for example `d2lang`) own final user-facing output; `review-team` output becomes internal analysis input.119- With `commit` (and no generator), append `Commit Scope` after `Residual Risks` and keep staging allowlisted.120- With generator + `commit`, pass `Commit Scope` as internal handoff data (not appended section).121- `pr` and `review-team` must run as separate flows. Do not co-trigger or merge output contracts in one response.