Use diagnose when the agent is stuck on a concrete failure.
Required loop:
- Quote the exact failure signal.
- Search the exact error or behavior.
- Read the original material, not a summary.
- List assumptions and verify each one.
- Propose at least three materially different next moves.
Use recover when the task is stalled but the root cause is unclear.
Recovery loop:
- Decide whether the problem is direction, method, context, or assumption.
- Pick the smallest action that can produce new information.
- Expand only one ring at a time.
- Re-check the task after each action.
Use ship before claiming anything is done.
Checklist:
- Run build, test, curl, or the real user path.
- Inspect adjacent code for repeated defects.
- Call out uncovered edge cases.
- State remaining risks explicitly.
Use audit when platform constraints are likely to matter.
Audit targets:
- runtime and filesystem limits
- package and native dependency constraints
- build-time versus run-time differences
- network, permissions, and deployment assumptions