Skip to content

feat(codex-fleet): synthetic-data demo of 8-agent fleet#160

Merged
NagyVikt merged 1 commit into
mainfrom
feat/codex-fleet-demo
May 16, 2026
Merged

feat(codex-fleet): synthetic-data demo of 8-agent fleet#160
NagyVikt merged 1 commit into
mainfrom
feat/codex-fleet-demo

Conversation

@NagyVikt
Copy link
Copy Markdown
Contributor

Summary

New scripts/codex-fleet/demo/ directory that brings up the production codex-fleet tmux layout populated by synthetic data, so the real fleet-state / fleet-plan-tree / fleet-waves / fleet-watcher binaries 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

cd rust && cargo build --release -p fleet-state -p fleet-plan-tree -p fleet-waves -p fleet-watcher
bash scripts/codex-fleet/demo/up.sh         # bring up + auto-attach
bash scripts/codex-fleet/demo/down.sh       # tear down

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

File Role
up.sh seeds /tmp/claude-viz/, spawns tmux session codex-fleet-demo with overview (8 worker panes, 4×2 grid) + 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: assign idle agents → claim → in_progress → completed. Refreshes per-pane scrollback fixtures. Loops when all 12 tasks complete
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 (and down.sh removes the runtime copy)
README.md full docs incl. file contract table, extension points, caveats

Scenario

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). clover is scripted to be "capped" when idle so the PaneState::Capped branch gets exercised.

Why the runtime/template split

tick.sh mutates 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 at scenarios/refactor-wave/plan.json, copy to openspec/plans/<slug>/plan.json at startup, remove on teardown. Working tree stays clean between runs.

Test plan

  • bash -n clean on all 3 scripts
  • bash 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-state renders 8 agents with correct 5h/weekly bars (verified against agent-auth shim output)
  • fleet-plan-tree renders title + 3 waves (5+5+2 = 12 subtasks) at startup
  • Tick simulator: after 10s, plan went from 12 available7 available (5 wave-1 tasks claimed by 5 agents). Worker scrollback runtime advanced 6s → 9s
  • down.sh leaves a clean working tree (no openspec/plans/demo-*/ residue)

Caveats

  • Demo state files (/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.
  • The standalone fleet-tab-strip binary was removed by PR Delete standalone fleet-tab-strip crate #107; the tab strip now renders inline inside the other dashboards via fleet_ui::tab_strip reading fleet-tab-counters.json. The demo writes that counters file, so the inline strip will animate.
  • Scenarios beyond refactor-wave aren't wired through yet — CODEX_FLEET_DEMO_SCENARIO=<name> is honored by up.sh but tick.sh is hardcoded to the refactor-wave shape. Worth a follow-up.

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/.
@NagyVikt NagyVikt merged commit 142bdc7 into main May 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant