Design deterministic hub-and-spoke subagent orchestration plans with AgentDefinition plus Task dispatch, fresh-session context isolation, typed spoke errors, local recovery, coverage-gap aggregation, and bounded partial-failure behavior.
Design deterministic hub-and-spoke coordinators that dispatch isolated subagents via AgentDefinition + Task, then aggregate typed spoke results without hiding partial failures. Output is an architecture plan, code skeleton, or review packet where context isolation, model/tool assignment, and error propagation are verifiable offline. [DOC]
prompt-chaining-design) when subtasks are sequential, share state, or a lone summary/SQL count would do — forcing fan-out onto one task is an anti-pattern the validator rejects as a false positive. [INFERENCIA]assets/orchestration-contract.json, passing scripts/validate_orchestration_plan.py, plus a prose rationale stating whether fan-out is justified. [CONFIG]Validate every plan with scripts/validate_orchestration_plan.py against assets/orchestration-contract.json. A valid plan MUST include: [CONFIG]
last_message_only). [CONFIG]AgentDefinition fields, minimal tools, an explicit model role, and Task dispatch. [CONFIG]fresh_session context isolation for every spoke. [CONFIG]failure_type, attempted_query, partial_results, suggested_alternatives. [CONFIG]coverage_gaps. [CONFIG]valid_empty result type distinct from access_failure. [CONFIG]offline=true, network_required=false, deterministic=true. [CONFIG]prompt-chaining-design. [DOC]AgentDefinition(description, prompt, tools, model) and its Task dispatch; assign the cheapest model that meets the spoke's bar. [INFERENCIA]fresh_session isolation and last_message_only consumption. [CONFIG]valid_empty from access_failure explicitly. [CONFIG]assets/isolation-policy.json, assets/error-propagation-policy.json, assets/aggregation-policy.json, assets/anti-pattern-policy.json. [CONFIG]assets/quality-rubric.json (mirrored by assets/checklist.md); see assets/README.md. [CONFIG]success + []. [CONFIG]Task dispatch, typed-error fields, local recovery, or coverage_gaps. [CONFIG]coverage_gaps, returns partial success. [DOC][]: classify as valid_empty only if access succeeded; otherwise access_failure. [CONFIG]Re-open the design if you catch yourself: sharing context to "save tokens"; returning [] for an error; aborting siblings on one failure; assigning a tool/model a spoke never uses; or claiming parallelism without proof. Each maps to a named blocker above — fix and re-validate. [INFERENCIA]
validate_orchestration_plan.py exits 0 on the plan. [CONFIG]check.sh passes; flags show offline/deterministic=true. [CONFIG]Task dispatch. [CONFIG]coverage_gaps present. [CONFIG]valid_empty ≠ access_failure; no swallowed errors; no unjustified fan-out. [CONFIG]Company enrichment, 3 spokes — finder→extractor→ranker, each AgentDefinition+Task, fresh session, Haiku for finder/extractor, Sonnet coordinator. One failed extractor records coverage_gaps:[{unit, failure_type:"access_failure", attempted_query, suggested_alternatives}]; hub still ranks the rest and returns partial success. [INFERENCIA]
python3 skills/subagent-orchestration/scripts/validate_orchestration_plan.py --input <plan.json>
bash skills/subagent-orchestration/scripts/check.shThe validator is offline and rejects shared context, missing Task dispatch, missing typed error fields, missing local recovery, missing coverage gaps, fail-fast aggregation, swallowed errors, and false-positive single-pass plans. [CONFIG]
katas-hub-and-spoke-isolationkatas-multiagent-error-propagationstructured-output-designprompt-chaining-designhuman-escalation-designfdad39c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.