3.1 KiB
Step 3: Triage
RULES
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config
{communication_language}
INSTRUCTIONS
-
Normalize findings from all layers into a unified list where each finding has:
id-- sequential integersource-- theidof the layer that produced the finding (e.g.,blind-hunter), or merged sources joined with+(e.g.,blind-hunter+edge-case-hunter)title-- one-line summarydetail-- full descriptionlocation-- file and line reference (if available)
-
Deduplicate. Deduplicate only findings with the same claim and same required action. If two or more findings meet both conditions, merge them into one:
- Use the most specific finding as the base (prefer findings with a precise location over prose-only findings).
- Append any unique detail, reasoning, or location references from the other finding(s) into the surviving
detailfield. - Set
sourceto the merged sources (e.g.,blind-hunter+edge-case-hunter).
-
Then evaluate each remaining finding independently. Do not reject a finding because a related finding was rejected.
-
Read the code before rating. Before assigning severity, open the source at each finding's location and read enough surrounding code to judge reachability -- call sites, guards, and validation that live outside the diff hunk. Do not rate from the diff hunk alone. Severity reflects the real consequence at a real call site, not the worst theoretical reading.
-
Assign severity to each finding by consequence for the artifact's main consumer (software user, document reader, etc). Disregard any severity assigned by a reviewing subagent. Review subagents operate under by-design information asymmetry and do not have enough context to set final severity for this workflow.
low-- none or cosmeticmedium-- tolerablehigh-- intolerable
-
Route each finding into exactly one triage bucket:
- decision_needed -- There is an ambiguous choice that requires human input. The code cannot be correctly patched without knowing the user's intent. Only possible if
{review_mode}="full". - patch -- Code issue that is fixable without human input. The correct fix is unambiguous.
- defer -- Pre-existing issue not caused by the current change. Real but not actionable now.
- dismiss -- Noise, false positive, or handled elsewhere.
If
{review_mode}="no-spec"and a finding would otherwise bedecision_needed, reclassify it aspatch(if the fix is unambiguous) ordefer(if not). - decision_needed -- There is an ambiguous choice that requires human input. The code cannot be correctly patched without knowing the user's intent. Only possible if
-
Drop all
dismissfindings. Record the dismiss count for the summary. -
If
{failed_layers}is non-empty, report which layers failed before announcing results. If zero findings remain after dropping dismissed AND{failed_layers}is non-empty, warn the user that the review may be incomplete rather than announcing a clean review. -
If zero findings remain after triage (all rejected or none raised): state "✅ Clean review — all layers passed." (Step 3 already warned if any review layers failed via
{failed_layers}.)
NEXT
Read fully and follow ./step-04-present.md