Fulcrum Fleet Rewire
The board asks for four things: more agent types, a hookish and MCP-integrated backend, everything unified under tmux and A2A, and state that can leave GitHub Discussions. This is where each one lands in the code that already exists — which turns out to be most of it.
Four forks, settled
Everything below follows from these. They are the load-bearing choices — change one and the plan changes shape.
Persistent core, ephemeral workers
Six roles get long-lived tmux panes and permanent A2A addresses. Work roles are spawned into throwaway panes and reaped at verdict.
Local DB is truth, GitHub mirrors
SQLite holds threads, comments and labels. A one-way worker keeps GitHub Discussions readable for humans. Agents stop calling GraphQL.
One role, two modes
One project: it manages the agent fleet. N projects: it manages Team
Leads. backend/fleet/discovery.py decides which.
Facade first, swap second
Wrap the existing scripts in MCP tools and freeze that contract. Then migrate the shell internals behind it, one script at a time.
Half of this board is already built
backend/a2a_broker.py is a
complete localhost A2A broker — per-agent bearer tokens, an authz
matrix by message kind, task cards, SSE push, JSONL persistence that
replays unread messages across restarts, and a 204-on-empty-inbox design
specifically so idle agents cost zero tokens. Three client scripts exist.
No startup path launches it. Phase 00 is: turn it on.
That is the shape of this whole design. It is not a greenfield build
— it is mostly a wiring job plus one genuinely new subsystem. The
spawn queue already enforces per-role concurrency caps and TTL reaping. The
read side of the state migration already has a seam in
discussion_cache.py. What is actually absent is the MCP layer
and a cross-pane event path.
The invariant that has to change
The single-spawner invariant cannot survive this —
persistent peers that message each other is the opposite of one top-level
spawner. Replace it with a single-admitter invariant: any
agent may request work over A2A, but only Fleet Lead may
admit it into a pane, through af-fleet.spawn, which
enforces the existing concurrency caps and budget. That keeps the property
the old rule was protecting — bounded, accounted concurrency —
while allowing the peer messaging the board asks for.
Sequence — and what it costs
Each phase leaves the system working. Nothing here requires a flag day, and the first two are small enough to do before committing to the rest.
-
00
Turn on what already exists
$75backend/a2a_broker.pyis a complete localhost A2A broker — per-agent bearer tokens, an authz matrix, task cards, SSE push, JSONL replay across restarts, and 204-on-empty so idle agents cost zero tokens. Grep every shell script, service file and module: nothing starts it. Start it fromstart-dashboard.shwith a health check and a watchdog. This is a day, and it de-risks everything downstream by proving the transport before anything depends on it. -
01
The tmux substrate
$150One session,
fulcrum. Window 0 holds the persistent core panes; work panes open in window 1+ and close when their agent emits its envelope.fleet-up.shcreates each pane, registers it with the broker’s admin port, and injects the bearer token. Pane titles carry the agent id, sotmux list-panesbecomes a free process registry andcapture-panea free screenshot path. -
02
The MCP facade
$350Six servers —
af-threads,af-fleet,af-state,af-stats,af-ci,af-repo— each shelling to the script that already does the job. Nothing rewrites logic. What changes is who knows the shape of that script: afterwards, only the MCP server does. Freeze the contract and write the parity tests that guard phase 06. -
03
The thread store
$400Discussions are load-bearing: 207 non-test files mention them and 38 shell out to
gh api graphql. So this is a seam, not a sweep.thread_store.pywith github and sqlite drivers, five tables instate.dbwith an FTS5 index, backfill preserving originalD#Nnumbers, a one-way mirror worker, and a reconciliation sweep — which is not optional, because GitHub stops being the backup the moment it stops being the truth. -
04
The monitor agents
$300Session Monitor, Display Agent and System Monitor come up as persistent panes on the event stream, and the cron sweeps they absorb get retired. The genuinely new part is error correction: watching a running agent and interrupting over A2A when a run goes off the rails, rather than filing a retro afterwards.
-
05
Review network and PR/CI manager
$250A coordinator over the reviewers that already exist, deciding which of the chain a given PR needs instead of the phase state machine walking every PR through all of them. The label gate and merge path move under PR & CI Manager. The two-gate and CI-status blocks stay hard blocks — they move, they do not soften.
-
06
Migrate the shell control plane
$475The knowledge graph puts 312 file-level nodes in the loop-orchestration layer, the largest non-test layer in the repo. Port it into Python behind the frozen MCP contract, one script at a time, each with a parity test. Open-ended on purpose: there is no deadline where the last shell script has to be gone.
Fund the whole rewire
$1750All seven phases. The parts add up to $2,000, so this is $250 less than buying them separately.
Still open
- Does GitHub need write-back? One-way is simple and reliable. Two-way needs a poller, conflict rules and identity mapping — a materially larger build.
- What auth does the fleet run under? Org API key, or a Pro/Max subscription over OAuth? This decides whether the Usage and Cost API can replace the local token estimator or whether it stays and just gets labelled honestly.
- What is Reality Check? Either it re-verifies a reviewer’s verdict adversarially, or it verifies claims against the running system — executing the guarded path rather than trusting a report. The second is the more useful agent, but they are different builds.
- How do persistent agents handle context? One long-lived
session per core pane grows context indefinitely. Restart-from-memory fits
context_manager.pybetter than server-side compaction. - Is Fleet Lead’s budget a hard cap or advisory? The circuit breaker already exists for the hard-stop case, so this is really about which one owns the decision.