SOTA multi-agent coding (AOrchestra, +16pp pass@1 on SWE-Verified/GAIA/Terminal-Bench)
auto-GENERATES specialized sub-agents from a task rather than hand-writing them, runs
them by dependency, and synthesizes. agent-joule had the execution substrate
(worktree sessions, attenuable grants, fanout) but not the specialization + scheduling
layer. This adds it, deterministic-first and sovereign.
- joule_core::subagents: SubagentSpec (role + focus + tools + depends_on) and
parse_plan, which VALIDATES a model-proposed decomposition — bounded (MAX_SUBAGENTS),
unique ids, no dangling dependency, no cycle — so nothing downstream runs a malformed
plan. execution_waves topologically schedules the plan into parallel waves (Kahn's
algorithm, cycle-detecting, deterministic). synthesis_context frames the final
merge; decomposition_prompt is the deterministic decomposition ask. The model only
proposes; scheduling, capability attenuation, and synthesis framing are deterministic.
- joule_coded: an `orchestrate` control method decomposes a task, runs each sub-agent
in wave order as a metered run_loop_metered pass with its focused intent (each's
energy captured), synthesizes, and seals an OrchestrationReport (plan + per-sub-agent
results + energy) for `orchestration`. So a multi-agent run reports the joules the
whole fleet of sub-agents spent — energy-metered orchestration no one else measures.
Verified: 7 subagents unit tests (parse+schedule, parallel waves, cycle/dangling/dup/
empty/oversize rejection, synthesis); lean + l3 daemon builds; the control methods
validate + model-gate correctly.