Three nested loops
- Macro · Pub/Sub bus. Four agents subscribe to AgentEvent kinds. Agent A discovers + parses gazettes, Agent B maps to RDTII via ReAct + Few-Shot, Agent C runs a red-team reverse-grounding pass, Agent D synthesizes the report and arbitrates expert instructions.
- Mid · Co-Pilot REPL. Mirrors the Claude-Code call chain: PromptInput → handlePromptSubmit → executeUserInput → onQuery → query() → queryLoop(). queryGuard ensures no two engines ever run concurrently (P-3).
- Micro · 33-step queryLoop. Streaming tool execution, autocompact / microcompact / contextCollapse compaction chain, unkillable error recovery with bounded retries (P-14), strict tool_use ↔ tool_result pairing (P-4), guaranteed termination (P-5).