Plan A: parallel MCP orchestration engine — coordination core - #5
Merged
Conversation
Full-replacement engine that makes three unbacked resume claims true and testable: an MCP state server (FastMCP/streamable-HTTP, SQLite/WAL), a six-phase dependency graph (Clarify->Design->Code->Test->Deploy->Iterate), and independent OS worker processes coordinating shared state without collision (serialized DB ops + versioned CAS). Preserves 16 agents, approval gates, and budget auto-downgrade. Survived three independent adversarial critique rounds (log appended).
… scheduler + budget)
…l_for; drop dead registry accessors
This was referenced Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan A — Coordination Core of the parallel MCP orchestration engine
Context. A publication-prep verification pass found three resume claims that the codebase did not actually back: an MCP-based state server, a six-phase dependency graph, and independent processes resolving execution order and shared state without collision. Rather than soften the claims, we're building the real architecture — a full replacement of the single-process LangGraph orchestrator — designed to be maximally parallelizable. Full design (3 rounds of adversarial critique) and plan are in
docs/superpowers/.This is Plan A of three. It delivers the spike-independent coordination core; Plans B (MCP server + worker processes) and C (live budget wiring, concurrency stress test, documented run, LangGraph cutover) follow.
What's in this PR
a6b7d0e) — proved FastMCP streamable-HTTP handles 8 concurrent client sessions × 100 tool calls (800/800), pinningmcp==1.28.1. The whole engine was gated on this.config/phases.yaml+backend/engine/phases.py— the six-phase source of truth: Clarify → Design → Code → Test → Deploy → Iterate, with the 13 phase-worker agents, intra-phase dependency edges, and approval gates after Clarify/Design.backend/engine/models.py— SQLite schema (runs/phases/tasks/state/spend/events) + typedClaimResult.backend/engine/scheduler.py— pure functions: readiness, phase advance, gate/seeding, budget model-resolution (with critical-agent skip-list).backend/engine/store.py— single-writer aiosqlite/WAL store, asyncio-lock +_txn(commit-on-success / rollback-on-exception) discipline: atomic task claim (single guardedUPDATE … RETURNING), versioned state CAS, single-transaction completion, owner-guarded heartbeat, version-bumping reaper, fail/retry with cap. These are the collision-freedom + exactly-once-effect primitives.BudgetGuard.downgrade_model_for+ authoritativedowngrade_pathsmoved intoconfig/budget.yaml; two dead registry accessors removed; engine settings added toconfig.py.Evidence
uv run pytest tests -q→ exit 0).fail_taskstatus guard, transaction-safety helper).b8f93b8) or carried forward to Plan B/C.Deferred to Plan B/C (by design — placeholders here, not broken paths)
_downgrade_confighook returns empty paths,events/current_phaseunwritten,spawn_tasksinert until dynamic expansion).MAX_ATTEMPTScap enforcement (onlyfail_taskenforces it today).