feat(codex-fleet): synthetic-data demo of 8-agent fleet#160
Merged
Conversation
scripts/codex-fleet/demo/ — bring up the production tmux layout
populated by fake plan / pane / counter / quality-score files so the
real fleet-state / fleet-plan-tree / fleet-waves binaries render against
synthetic data. No real codex sessions, no API spend.
For design iteration: change a renderer, kill + restart the demo, see
the result.
Structure:
- up.sh seeds /tmp/claude-viz/, spawns tmux session
codex-fleet-demo with overview (8 worker panes) +
fleet/plan/waves/watcher dashboard windows, starts
tick simulator
- down.sh tears tmux down, removes synthetic state, deletes
runtime plan copy so working tree stays clean
- tick.sh mutates the runtime plan every 3s (configurable
via CODEX_FLEET_DEMO_TICK_INTERVAL): assign idle
agents, advance claimed → in_progress → completed,
refresh pane scrollback. Loops when all 12 tasks
complete (set CODEX_FLEET_DEMO_LOOP=0 to stop)
- agent-auth PATH shim so fleet-data::accounts::load_via_agent_auth()
reads 8 synthetic accounts instead of the real binary
- scenarios/refactor-wave/plan.json committed template; up.sh copies
to openspec/plans/<slug>/ at runtime
8 agents named after herbs; clover is scripted to be "capped" so the
PaneState::Capped branch is exercised. Plan has 12 tasks across 3
dependency waves modelled after the recent refactor PRs (#154-159).
Usage: bash scripts/codex-fleet/demo/up.sh
Prereqs: tmux, jq, release builds of fleet-state, fleet-plan-tree,
fleet-waves (+ optionally fleet-watcher) under rust/target/release/.
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.
Summary
New
scripts/codex-fleet/demo/directory that brings up the production codex-fleet tmux layout populated by synthetic data, so the realfleet-state/fleet-plan-tree/fleet-waves/fleet-watcherbinaries render against fake plan / pane / counter / quality-score files. No real codex sessions, no API spend.Intended for design iteration: change a renderer, kill + restart the demo, see the result.
Usage
Flags:
--no-attach,--no-tick(freeze state). Env:CODEX_FLEET_DEMO_TICK_INTERVAL=N(default 3s),CODEX_FLEET_DEMO_LOOP=0(stop instead of restart when all tasks complete).What's in the box
up.sh/tmp/claude-viz/, spawns tmux sessioncodex-fleet-demowith overview (8 worker panes, 4×2 grid) +fleet/plan/waves/watcherdashboard windows, starts tick simulatordown.shtick.shagent-authfleet-data::accounts::load_via_agent_auth()reads 8 synthetic accounts instead of the real binaryscenarios/refactor-wave/plan.jsonup.shcopies toopenspec/plans/<slug>/at runtime (anddown.shremoves the runtime copy)README.mdScenario
Modelled after the recent refactor PRs (#154–#159): 12 tasks across 3 dependency waves (toposort / scrape / tab_strip splits + CliConvention trait + shell helper lib + dependent follow-ups + a final docs/smoke gate). 8 agents named after herbs (
magnolia,sumac,yarrow,clover,thistle,fennel,mallow,borage).cloveris scripted to be "capped" when idle so thePaneState::Cappedbranch gets exercised.Why the runtime/template split
tick.shmutates the plan in place to drive animation. Committing a mutating file would dirty the working tree on every demo run. Solution: keep a pristine template atscenarios/refactor-wave/plan.json, copy toopenspec/plans/<slug>/plan.jsonat startup, remove on teardown. Working tree stays clean between runs.Test plan
bash -nclean on all 3 scriptsbash scripts/codex-fleet/demo/up.sh --no-attach— tmux session spawns with 5 windows; overview has 8 worker panes each tagged@panel=[codex-<aid>]fleet-staterenders 8 agents with correct 5h/weekly bars (verified againstagent-authshim output)fleet-plan-treerenders title + 3 waves (5+5+2 = 12 subtasks) at startup12 available→7 available(5 wave-1 tasks claimed by 5 agents). Worker scrollback runtime advanced 6s → 9sdown.shleaves a clean working tree (noopenspec/plans/demo-*/residue)Caveats
/tmp/claude-viz/fleet-tab-counters.json,fleet-quality-scores.json,plan-tree-pin.txt) share the same paths as the real fleet. Don't run the demo and the real fleet concurrently.fleet-tab-stripbinary was removed by PR Delete standalone fleet-tab-strip crate #107; the tab strip now renders inline inside the other dashboards viafleet_ui::tab_stripreadingfleet-tab-counters.json. The demo writes that counters file, so the inline strip will animate.refactor-wavearen't wired through yet —CODEX_FLEET_DEMO_SCENARIO=<name>is honored byup.shbuttick.shis hardcoded to the refactor-wave shape. Worth a follow-up.