aboutsummaryrefslogtreecommitdiff
path: root/claude-rules/subagents.md
Commit message (Collapse)AuthorAgeFilesLines
* docs(rules): add pre-dispatch availability and cost checksCraig Jennings2026-05-221-0/+27
| | | | subagents.md assumed the Agent tool exists. A new "Pre-Dispatch Checks" section adds two gates before any spawn: Availability (no Agent capability means do the work in the main thread under the same scope and constraints the contract would enforce) and Cost (when writing the full contract costs more than the task, do it inline). Both cross-reference the existing "Don't Subagent At All" guidance rather than duplicating it.
* feat(rules): add subagents.md — when, how, and when not to delegateCraig Jennings2026-04-191-0/+126
Cross-cutting rule covering subagent hygiene: - Decision table: parallel-safe (read-only investigation, independent test failures, multi-domain research) vs sequential-with-review (plan execution, coupled edits) vs never-parallel (concurrent writes) vs don't-subagent-at-all (target known, work fits in ~10 tool calls). - Prompt contract: scope / pasted context / explicit 'do NOT' list / required output format. Missing any field yields shallow work. - Context-pollution rule: subagents absorb noise the main thread shouldn't carry. When one fails, dispatch a fix-agent with the failure report — do not retry in the orchestrator. - Review-gate cadence: after each sequential task, or every ~3 in parallel batches. - Anti-patterns including parallel implementation on overlapping files, broad 'fix all the tests' prompts, timeout-tuning to mask flakes, and letting the agent decide scope. Added one-line cross-references to subagents.md from debug/, review-code/, and finish-branch/ SKILL.md — the skills that most rely on delegation. Clean-room synthesis from NeoLabHQ/context-engineering-kit's subagent-driven-development pattern (MIT).