You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 1.0.0 | Minds: Gene Kim, Reinertsen, Goldratt, Deming, Pedro Valério | Status: Active
Overview
The Dispatch Squad is the execution backbone of AIOS. It receives stories, PRDs, or task lists, decomposes them into atomic sub-tasks, optimizes into DAG-based waves, routes to the correct agents/models, and executes in parallel via subagents — all while keeping the main Opus context clean.
Core philosophy: "Never contaminate the main context. Always subagents. Always."
Cost savings: ~43-58x cheaper than executing in the main Opus context.
Batch Phase 2: circuit breaker + cost control (VB2.*)
Templates
Template
Purpose
execution-plan-tmpl.yaml
Plan output structure
wave-manifest-tmpl.yaml
Wave definition
task-prompt-tmpl.md
Enriched prompt for subagent
execution-report-tmpl.md
Post-execution report
cost-report-tmpl.md
Cost breakdown
dispatch-state-tmpl.json
Initial state structure
Scripts (CODE > LLM)
Script
Purpose
wave-optimizer.py
DAG topological sort (Kahn's algorithm)
build-command-registry.py
Scan all squads → command-registry.yaml
cost-tracker.py
Track actual costs per run
validate-dispatch-gate.sh
Veto condition checker
validate-wave-results.py
Post-execution verification
enrich-task.py
KB injection (template fill)
dispatch-health-score.py
Calculate 12-point health score
Optimization Scripts (v1.1 — CODE > LLM)
Script
Purpose
Replaces
route-tasks.py
Full routing pipeline orchestrator
60% of task-router LLM
select-model.py
Q1-Q4 model decision tree
LLM model selection
assign-enrichment.py
MINIMAL/STANDARD/FULL assignment
LLM enrichment logic
assign-timeout.py
Timeout + max_turns assignment
LLM timeout logic
batch-size-optimizer.py
Reinertsen U-curve batch sizing
LLM batch decisions
critical-chain-analyzer.py
Goldratt critical chain + slack
LLM critical path
estimate-batch-cost.py
Per-story + total cost estimation
LLM cost calculation
validate-haiku-prompt.py
14-rule ALWAYS/NEVER validation
Manual checklist
Hooks Scripts
Script
Hook Event
Purpose
log-task-start.py
SubagentStart
Track wave progress
check-wave-complete.py
SubagentStop
Trigger next wave
save-dispatch-state.py
PreCompact
Auto-save before compaction
reload-dispatch-context.py
SessionStart(compact)
Re-inject context
log-task-failure.py
PostToolUseFailure
Log + retry logic
Data Files
File
Purpose
domain-registry.yaml
Domain → Agent → KB mapping (extensible)
model-selection-rules.yaml
When Haiku vs Sonnet vs Opus
veto-conditions.yaml
All blocking conditions (V0., V1., V2.*)
enrichment-rules.yaml
MINIMAL/STANDARD/FULL definitions
timeout-rules.yaml
Per-task, per-wave, per-run timeouts
haiku-patterns.yaml
6 validated prompt patterns
dispatch-heuristics.yaml
Gate classification, self-healing, health score
dispatch-kb.md
Consolidated knowledge base
Quick Start
# Dispatch from story (PREFERRED)*new plan/stories/story-feature.md
# Dry run — see plan without executing*analyze plan/stories/story-feature.md
# Quick cost estimate*estimate plan/stories/story-feature.md
# Resume interrupted dispatch*resume
# Check dispatch health*health