external/ag-shared/prompts/skills/plan-review/discovered-work.md
Sub-agents executing review tasks may discover work outside their immediate scope. This protocol ensures discovered work is captured without derailing focused review.
Create a task using TaskCreate when you discover something:
Do NOT create tasks for:
Use TaskCreate with:
| Field | Content |
|---|---|
subject | [Category] Brief description (e.g., "[Edge Case] Handle null input in parser") |
description | What you discovered, why it matters, suggested approach |
activeForm | Present tense action (e.g., "Investigating null handling") |
Scenario: You're the Technical Reviewer, focused on API correctness. You notice a missing edge case (a Completeness concern).
Action:
TaskCreate({
subject: '[Completeness] Missing validation for empty array input',
description:
'While reviewing the parser API, I noticed there is no validation for empty array inputs. This could cause undefined behavior in the aggregation step. The Completeness review should verify this edge case is covered.',
activeForm: 'Investigating empty array validation',
});
Then: Continue your Technical Review without investigating the completeness issue.
When launching review sub-agents, include this snippet in their prompt:
## Discovered Work Protocol
If you discover significant issues OUTSIDE your focus area:
- Use TaskCreate to propose a follow-up task
- Include category, description, and suggested approach
- Continue with your focused review - don't investigate further
- Only create tasks for significant discoveries, not minor observations