| name | tier-review |
| description | Use after implementation to run tier-classified review agents and produce a consolidated verdict. |
| argument-hint | [--gated] [scope description] |
Review Gate
Run project review agents by tier taxonomy, consolidate findings, issue a verdict.
<Review_Protocol>
You are the review gate executor. Discover which project agents exist, match them
to the review scope, spawn by tier, and consolidate into a single verdict.
All paths below are relative to the user's project root (working directory), not the plugin.
## Phase 1 โ Discover Agents
1. Read the project's `.claude/rules/agents.md` for the Quick Reference table (agent, tier, purpose)
and the Consultation Matrix (task category โ agent mapping)
2. If agents.md not found, read `.claude/agents/*.md` โ look for tier in description
or Situation table. If tier is unclear, treat safety-related agents as tier 1,
domain-specific as tier 2, quality reviewers as tier 3.
3. If no agents found at all โ report "no review agents configured" and exit.
## Phase 2 โ Plan
1. Determine review scope from conversation context:
- Explicit argument โ use it
- Recent implementation in conversation โ those files
- Neither โ fall back to git diff (staged + unstaged)
2. For each agent, check against the scope:
- Consultation Matrix: is this task category โ agent mapping MANDATORY?
- Agent's Situation/Priority table: does the scope match?
3. Build an invocation table โ for each agent: INVOKE (with scope + focus) or SKIP (with reason)
- If all agents are SKIP โ report "no agents relevant to this scope" and exit.
4. Report the table before executing.
## Phase 3 โ Execute
Spawn only agents marked INVOKE in the table.
For each agent, pass: "Review [scope files] focusing on [focus from plan]."
**Default**: spawn ALL INVOKE agents in parallel, wait for all.
**With `--gated`** (cost-saving short-circuit โ use when API budget is tight):
1. Tier 1 (safety) โ spawn in parallel, wait for all to complete
- If ANY returns BLOCKING findings โ output REJECT verdict, STOP here
2. Tier 2 (domain) + tier 3 (quality) โ spawn in parallel, wait for all to complete
## Phase 4 โ Consolidate
Apply merge rules to all agent results:
1. **Verdict mapping**: agent PASS โ no BLOCKING; agent NEEDS WORK โ STRONG findings
2. **Dedup**: same file:line from multiple agents โ single entry, list all agents
3. **Severity**: agents disagree โ use higher severity
4. **Convergent signals**: same file flagged by multiple agents โ elevate priority
5. **Root cause**: tier 1 finding that explains tier 3 symptom โ connect and elevate
Issue final verdict:
| Condition | Verdict |
|-----------|---------|
| Any BLOCKING finding | REJECT |
| Multiple unresolved STRONG findings | NEEDS WORK |
| No BLOCKING, 1-2 STRONG items remaining | APPROVED WITH CONDITIONS |
| No BLOCKING, no unresolved STRONG | APPROVED |
| No BLOCKING, no STRONG, all agents report high quality | EXCEPTIONAL |
## Review: [scope]
| Tier | Agent | Status | Verdict | Key Findings |
|------|-------|--------|---------|--------------|
| {1/2/3} | {agent} | INVOKED/SKIPPED | PASS/FAIL/- | {summary or skip reason} |
### Strengths
- {Positive observations from agents with file:line evidence}
### Consolidated Findings
| # | Severity | Agent(s) | Location | Finding | Suggestion |
|---|----------|----------|----------|---------|------------|
| 1 | BLOCKING/STRONG/MINOR | {sources} | file:line | {issue} | {fix} |
### Verdict: [EXCEPTIONAL / APPROVED / APPROVED WITH CONDITIONS / NEEDS WORK / REJECT]
{justification}
</Output_Format>
</Review_Protocol>