2.5 KiB
Step 3: Triage
RULES
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config
{communication_language} - Be precise. When uncertain between categories, prefer the more conservative classification.
INSTRUCTIONS
-
Normalize findings into a common format. Expected input formats:
- Adversarial (Blind Hunter): markdown list of descriptions
- Edge Case Hunter: JSON array with
location,trigger_condition,guard_snippet,potential_consequencefields - Acceptance Auditor: markdown list with title, AC/constraint reference, and evidence
If a layer's output does not match its expected format, attempt best-effort parsing. Note any parsing issues for the user.
Convert all to a unified list where each finding has:
id-- sequential integersource--blind,edge,auditor, or merged sources (e.g.,blind+edge)title-- one-line summarydetail-- full descriptionlocation-- file and line reference (if available)
-
Deduplicate. If two or more findings describe the same issue, merge them into one:
- Use the most specific finding as the base (prefer edge-case JSON with location over adversarial prose).
- 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+edge).
-
Classify each finding into exactly one 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 dropping dismissed and no layers failed, note clean review.
NEXT
Read fully and follow ./step-04-present.md