docs(rules): add Delegation Completion Contract to agent orchestration rules (#2471)

The 'Parallel Task Execution' rule encourages agents to spawn subagents,
but defines no completion contract. Observed failure mode: subagents
followed the rule, spawned their own children, and returned 'waiting
for background agents' as their final answer. All children completed
successfully, but their results were orphaned because a parent whose
turn has ended cannot receive completion notifications - leaving
zombie 'running' tasks and lost work.

Adds three rules that apply at every delegation depth:
1. Your final message IS the deliverable (never end with 'waiting')
2. If you delegate, you own collection (no fire-and-forget)
3. Decompose only when work cannot fit in one context
This commit is contained in:
someiyoshino-lab 2026-07-21 04:39:55 +09:00 committed by GitHub
parent 56d2913f38
commit 4a4fa907f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,6 +41,16 @@ Launch 3 agents in parallel:
First agent 1, then agent 2, then agent 3 First agent 1, then agent 2, then agent 3
``` ```
## Delegation Completion Contract
Applies to every agent at every depth (parent, child, grandchild):
1. **Your final message IS the deliverable.** Never end your turn with "waiting for background agents" — a spawned task is not a completed task. Ending your turn while children are running orphans their results (completed children cannot notify a parent whose turn has ended).
2. **If you delegate, you own collection.** Wait for results, integrate them, then return. Fire-and-forget delegation is forbidden.
3. **Decompose only when the work cannot fit in one context.** Do not re-delegate a task already sized for a single agent — depth is an outcome, not a plan.
> Rationale: observed failure mode — research agents followed "Parallel Task Execution" above, spawned children, and returned "waiting" as their final answer. All children completed successfully but their results were orphaned. The parallel rule without a completion contract produces zombie tasks.
## Multi-Perspective Analysis ## Multi-Perspective Analysis
For complex problems, use split role sub-agents: For complex problems, use split role sub-agents: