TL;DR
What It Does
Delegates tasks to one or more sub-agents using Cowork’s Task tool, with CRAFT-aware context passing and structured result verification. Supports four workflow patterns: Builder-Validator (one agent creates, another reviews), parallel research (multiple agents investigate different angles simultaneously), sequential handoff (output of one agent feeds the next), and single delegate (one task, one agent).
How It Works
The AI constructs a self-contained task specification for each sub-agent — because sub-agents do not inherit your CLAUDE.md or session context, every prompt must include project identity, workspace paths, output conventions, and target files. After delegation, the AI collects results, verifies output files exist and are non-empty, runs a quality review for content-creation tasks, and integrates findings back into your session. For Builder-Validator workflows, the Validator agent independently reviews the Builder’s output without seeing the Builder’s conversation.
What To Expect
Results in 5–20 minutes depending on workflow complexity and agent count. The AI reports which agents were spawned, what files they created, validation verdicts, and any issues found during post-delegation verification. If verification fails, you choose whether to re-delegate, accept with warnings, or review manually.
Best Results When You
Choose the right workflow for your task. Builder-Validator works best for content creation where quality matters. Parallel research fits when a question has multiple angles to investigate simultaneously. Sequential handoff suits multi-stage pipelines where each stage depends on the previous. Single delegate is for straightforward tasks. Keep max_agents at 3–5 for reliability.
Typical Time
5–20 minutes (single delegate: 5 min; Builder-Validator: 10 min; parallel research with 3–5 agents: 10–20 min; sequential chains: varies by stage count).
Difficulty
Advanced — you choose the workflow pattern, define the task, and manage the results. The AI handles prompt construction, agent spawning, and verification, but the task decomposition for parallel and sequential workflows requires clear thinking about how to split the work.
How To Start
Choose a workflow pattern that matches your task structure, then provide a clear task description. The AI handles agent spawning, context injection, result collection, and verification.
STEP 1Choose a Workflow and Describe the Task
Select one of the four workflow patterns and describe what you want done. Specify target files the sub-agents need to read and an output file path if you want written results.
Available parameters
-
workflow
· string · required
The delegation pattern. Options: builder_validator (one agent creates, another reviews), parallel_research (2–5 agents investigate different angles), sequential_handoff (chained stages), single_delegate (one task, one agent).
-
task_description
· string · required
Human-readable description of the work to delegate. Be specific — sub-agents have no session context beyond what you provide here.
-
target_files
· list · optional
Workspace file paths the sub-agents need to read or modify.
-
output_file
· string · optional
Path where the primary output should be written. If omitted, results are returned as text summaries only.
-
max_agents
· integer · optional · default: 3
Maximum concurrent sub-agents (1–5). More than 5 causes reliability issues and token waste.
-
isolation
· string · optional · default: “shared”
“shared” means agents use the same workspace. “worktree” creates a git worktree per agent — use when multiple agents modify the same files.
-
called_by
· string · optional
Recipe ID of the calling recipe (for audit logging).
Example invocations
Builder-Validator
#H->AI::Directive: (Delegate task via CWK-008 with workflow=builder_validator, task="Write a project status report from the last 5 handoffs", target_files=[project/CFT-PROJ-CP-067_AI-CHAT-HISTORY.txt], output_file=research/status-report.md)
Parallel research
#H->AI::Directive: (Delegate task via CWK-008 with workflow=parallel_research, max_agents=3, task="Research WPRM plugin alternatives for recipe pages", target_files=[research/P067-H001-WEBSITE-AUDIT.txt])
Single delegate
#H->AI::Directive: (Delegate task via CWK-008 with workflow=single_delegate, task="Audit all image alt-text on CRAFTFramework.ai", output_file=research/alt-text-audit.txt)
STEP 2Review Agent Decomposition
For parallel research and sequential handoff workflows, the AI decomposes your task into separate angles or stages and shows you the plan before spawning agents. For Builder-Validator and single delegate, agents are spawned directly after validation.
STEP 3Monitor Results and Verification
The AI collects results from all sub-agents, verifies output files (existence, non-empty, correct format), and runs a quality review via Fernand for content-creation tasks. If the Builder-Validator workflow produces a FAIL verdict, you choose whether to fix manually, re-run with feedback, or accept despite failure.
STEP 4Integrate and Continue
The AI synthesizes results (for parallel research), reports the final output location, and asks what to do next — review files, run another delegation, commit results, or continue with other work. If called by another recipe, control returns to the caller automatically.
Usage Examples
Two scenarios — a Builder-Validator workflow for content creation, and parallel research across multiple investigation angles.
Example 1 · Builder-Validator for a status report
User:
#H->AI::Directive: (Delegate task via CWK-008 with workflow=builder_validator, task="Write a project status report covering H046 through H050", output_file=research/status-report.md)
AI:
Pre-delegation validation complete. Spawning Builder agent. Builder will read chat history and produce status report.
AI:
Builder complete — 2 files created. Spawning Validator agent with independent context.
AI:
Validator verdict: PASS_WITH_NOTES. Notes: “Section on SP10 progress could be more specific about recipe counts.” Output verification: structural PASSED, quality VERIFIED. Report ready at research/status-report.md.
[User reviews report, applies validator notes if desired]
Example 2 · Parallel research with 3 agents
User:
#H->AI::Directive: (Delegate task via CWK-008 with workflow=parallel_research, max_agents=3, task="Research WordPress recipe plugin alternatives to WPRM")
AI:
Decomposed into 3 research angles: (1) Feature comparison of top 5 recipe plugins, (2) Performance and compatibility with Kadence theme, (3) Migration path from WPRM. Spawning 3 Explore agents.
AI:
All 3 agents complete. Synthesizing findings. 8 key findings across agents, 1 contradiction (pricing data differs between agents 1 and 3), 2 HIGH-confidence, 5 MEDIUM, 1 LOW. Structural verification: PASSED. Quality review: VERIFIED.
[AI presents synthesized findings with confidence rankings]
How AI Reads This Recipe
When this recipe is triggered, the AI orchestrates sub-agent delegation with full context injection and result verification. The AI should:
- VALIDATE the delegation request: confirm workflow is one of the four supported patterns, cap max_agents at 5, verify worktree isolation requires a git repo, and check that target files exist.
- BUILD a self-contained task specification for each sub-agent that includes project identity, workspace path, output conventions, target files, and explicit instructions to report all file paths created or modified. Sub-agents do NOT inherit CLAUDE.md — every prompt must be fully self-contained.
- EXECUTE the appropriate workflow pattern:
- Builder-Validator: spawn Builder, collect output, spawn independent Validator, collect verdict.
- Parallel research: decompose task into angles, spawn Explore agents in parallel, synthesize across results.
- Sequential handoff: decompose into stages, chain agents where each stage receives the previous output.
- Single delegate: select agent type based on task, spawn one agent.
- VERIFY all sub-agent outputs: structural checks (files exist, non-empty, correct format, parseable) always run. For qualitative tasks (content creation, analysis, recommendations), route through Fernand quality review via CWK-024.
- INTEGRATE results back into the session: handle validator verdicts (PASS/PASS_WITH_NOTES/FAIL), synthesize parallel research, report sequential chain results.
- LOG the delegation event with workflow type, agent count, isolation mode, files created, and verification results.
The AI should NOT allow sub-agents to spawn their own sub-agents (nesting is prohibited). The context block injected into every sub-agent prompt is critical — without it, sub-agents operate blind to project conventions. Post-delegation verification must run even when sub-agents report success — trust but verify.
When to Use This Recipe
Use this recipe when you:
- Need independent validation of created content (Builder-Validator).
- Have a research question with multiple angles that benefit from parallel investigation.
- Want to pipeline a multi-stage task where each stage depends on the previous one.
- Need to delegate a single task while maintaining CRAFT context.
- Want the AI to handle prompt construction, context injection, and result verification for sub-agent work.
Do not use this recipe when:
You have a simple task that the main AI can handle in one response. Sub-agent delegation adds overhead (prompt construction, agent spawning, result collection, verification). Only delegate when the task genuinely benefits from independent agents — parallel investigation, creator-reviewer separation, or pipeline stages. If you can describe the task in one sentence and it takes less than 5 minutes, just ask the main AI directly.
Recipe FAQ
Q.Why can’t sub-agents just read my CLAUDE.md?
Sub-agents run in isolated contexts. They do not inherit your session’s CLAUDE.md, persona state, or conversation history. This recipe constructs a self-contained context block that gives each sub-agent the project information it needs — think of it as a portable briefing document.
Q.How many agents should I use for parallel research?
3 is the default and works well for most tasks. 4–5 is fine for broad investigations. More than 5 causes reliability issues and wastes tokens without proportional quality improvement.
Q.What is the difference between “shared” and “worktree” isolation?
In shared mode, all agents work in the same workspace — fine when agents read different files or write to different outputs. In worktree mode, each agent gets its own git worktree — use this when multiple agents might modify the same files to prevent conflicts.
Q.What happens if the Validator fails the Builder’s output?
You get three options: review the validation report and fix manually, re-run the Builder with the Validator’s feedback appended to the task, or accept the Builder’s output despite the failure. The AI does not automatically overrule the Validator.
Q.Can sub-agents call other recipes?
Sub-agents should not call complex recipes or spawn their own sub-agents. They receive a focused task and produce output. The parent session handles recipe orchestration.
Q.How does the quality review work?
For qualitative tasks (content creation, analysis, recommendations), the AI routes sub-agent output through CWK-024 (Verification Gate) using Fernand persona for quality assessment. Mechanical tasks (file copies, format conversions) skip the quality review — only structural checks apply.
Q.What if a sub-agent creates files I did not expect?
The recipe requires sub-agents to report all file paths in their response summary. The post-delegation verification checks every reported file. Unexpected files are visible in the delegation summary — review them before committing.
Version History
Changes to this recipe over time. Most recent first.
v1.01a
2026-03-10
Added post-delegation output verification gate. Structural checks on all output files. Fernand quality review via CWK-024 for qualitative tasks. Verification decision tree with re-delegate, accept-with-warning, and manual-review options.
v1.00a
2026-02-28
Initial release. Four workflow patterns (builder_validator, parallel_research, sequential_handoff, single_delegate). Self-contained context injection. File-based context bridges. File path reporting requirement. Max 5 concurrent agents.