Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

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

someiyoshino-lab4a4fa907f5f1
diff --git a/rules/common/agents.md b/rules/common/agents.md
index d7dd1be92..4d1dfb4cb 100644
--- a/rules/common/agents.md
+++ b/rules/common/agents.md
@@ -41,6 +41,16 @@ Launch 3 agents in parallel:
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
For complex problems, use split role sub-agents: