Hosting a More Efficient TeaParty
After the 13-hour POC, I rebuilt TeaParty as v0.99. Four architectural changes:
- CFA implemented as a skill graph. The Conversation-for-Action protocol (intent, plan, execute, phase gates, backtracks) is expressed as a skill graph rather than as custom orchestrator code. Each node is a skill; transitions are edges; the graph is the protocol.
- Bus-driven dispatch with session resume on wake. Parents sleep on the bus until a child message arrives, then resume their prior Claude session to handle it rather than starting a fresh one. No CPU burned waiting, and the conversation prefix stays cached across the wait. Replaces the POC's polling fan-in. The
[wake]and[send]rules and the per-instance state continuity (Claude session handle + worktree) live in the CFA engineering spec. - Bounded fan-out at every dispatching parent, capped at three children with bus-driven backpressure. The cap is per-parent, not global: with the project-lead fanning out to three team-leads and each team-lead fanning out to three specialists, up to nine specialist threads could run concurrently in principle. That ceiling has not been hit in practice; parents stagger their dispatches and the observed peak stays lower. Replaces the POC's unbounded burst dispatch that hit provider rate limits in wave 1. The cap (currently 3) lives in the CFA engineering spec.
- Configurable workgroups. In the POC, workers were generated on the fly with default prompts. In v0.99, the workgroup is part of the project configuration: each role has a committed
agent.md(system prompt), tool allowlist, model choice, and skill set. The stable per-role prompts give Anthropic's prompt cache a consistent prefix to key on across sessions. They also encode role-specific disciplines such as the POINT-NOT-PASTE rule (specialists reference files by path, never paste content into messages). See markdown-writer'sagent.mdfor an example.
This post compares v0.99's measured behavior against the POC's on the same prompt. Token-level numbers for both runs come from the Claude SDK's per-session stream archive (~/.claude/projects/...), which captures input/output/cache token counts per turn for every agent in either architecture. The May 2 run produced a 70,601-word manuscript in 10 hours 36 minutes of wall-clock, with zero rate-limit failures across 75 dispatches and 93% prompt-cache hit on input.