Use a task spec contract between planner and subagents
A YAML spec the planner must emit and implementers echo back cut wrong-problem retries from 31% to 7% in a Claude Code loop.
Prompt for your agent
Goal: Stop zero-context implementer agents from solving the wrong problem. Setup: agents used in source: Claude; tools/MCPs stated: YAML. Steps: 1. Treat the handoff as an interface, not a message: the planner must emit one fenced block that validates against a schema (task_id, goal, target files, acceptance criteria…). 2. Have the implementer echo the spec back in its own words before touching code; reject mismatches. 3. Reuse the same spec as the input for the verifier agent. Rules: ask me before anything irreversible (sending, posting, paying, deleting); don’t invent data, results or tools I haven’t given you; tell me what you couldn’t verify. Based on: yureki_lab — https://dev.to/yureki_lab/how-i-built-a-task-spec-contract-between-my-planner-and-implementer-agents-e94
Steps are from the source. Includes a “Based on” credit line.
I tried this
Tell the next builder. One anonymous answer each; click again to undo.
Agents, models and tools only what the source states
- Agents
- Claude
- Tools
- YAML
Sources & credit
- yureki_lab @yureki_lab primaryDEV post · 20 Sep 2026https://dev.to/yureki_lab/how-i-built-a-task-spec-contract-between-my-planner-and-implementer-agents-e94