trw_review
Compute a code review verdict (pass/warn/block) and persist findings to review.yaml. Supports manual findings input, auto multi-reviewer analysis, and spec-vs-code reconciliation.
Instructions
Compute a structured code-review verdict and persist a review.yaml artifact.
Use when:
Gating a PR or delivery and you need a pass/warn/block verdict with receipts.
You have pre-collected findings from a reviewer subagent (auto mode).
You want to detect spec-vs-code drift between a PRD and git diff (reconcile).
Modes:
manual: caller passes
findings=[...]directly (backward compatible).auto: multi-reviewer analysis with confidence filtering.
cross_model: route diff to an external model family.
reconcile: compare PRD FRs against git diff.
Input:
findings: list[{category, severity, description}] — triggers manual mode.
run_path: explicit run directory; auto-detected when None.
mode: explicit mode override; auto-detected when None.
reviewer_findings: pre-collected findings from subagent layer (auto).
prd_ids: explicit PRD IDs; reconcile mode auto-discovers when None.
Output: dict with fields {verdict: "pass"|"warn"|"block", findings_count: int, categories: dict, review_path: str, run_id: str, mode: str}.
Example: trw_review(findings=[{"category":"security","severity":"high","description":"..."}]) → {"verdict": "block", "findings_count": 1, "review_path": ".../review.yaml", "mode": "manual"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| prd_ids | No | ||
| findings | No | ||
| run_path | No | ||
| reviewer_findings | No |