Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

step-03-triage.md 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ---
  2. ---
  3. # Step 3: Triage
  4. ## RULES
  5. - YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
  6. - Be precise. When uncertain between categories, prefer the more conservative classification.
  7. ## INSTRUCTIONS
  8. 1. **Normalize** findings into a common format. Expected input formats:
  9. - Adversarial (Blind Hunter): markdown list of descriptions
  10. - Edge Case Hunter: JSON array with `location`, `trigger_condition`, `guard_snippet`, `potential_consequence` fields
  11. - Acceptance Auditor: markdown list with title, AC/constraint reference, and evidence
  12. If a layer's output does not match its expected format, attempt best-effort parsing. Note any parsing issues for the user.
  13. Convert all to a unified list where each finding has:
  14. - `id` -- sequential integer
  15. - `source` -- `blind`, `edge`, `auditor`, or merged sources (e.g., `blind+edge`)
  16. - `title` -- one-line summary
  17. - `detail` -- full description
  18. - `location` -- file and line reference (if available)
  19. 2. **Deduplicate.** If two or more findings describe the same issue, merge them into one:
  20. - Use the most specific finding as the base (prefer edge-case JSON with location over adversarial prose).
  21. - Append any unique detail, reasoning, or location references from the other finding(s) into the surviving `detail` field.
  22. - Set `source` to the merged sources (e.g., `blind+edge`).
  23. 3. **Classify** each finding into exactly one bucket:
  24. - **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"`.
  25. - **patch** -- Code issue that is fixable without human input. The correct fix is unambiguous.
  26. - **defer** -- Pre-existing issue not caused by the current change. Real but not actionable now.
  27. - **dismiss** -- Noise, false positive, or handled elsewhere.
  28. If `{review_mode}` = `"no-spec"` and a finding would otherwise be `decision_needed`, reclassify it as `patch` (if the fix is unambiguous) or `defer` (if not).
  29. 4. **Drop** all `dismiss` findings. Record the dismiss count for the summary.
  30. 5. 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.
  31. 6. 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}`.)
  32. ## NEXT
  33. Read fully and follow `./step-04-present.md`