plan · round 6 · every decision settled · nothing built2026-10-19

baton v8: a universal Claude Code mod for Claude Workflows

baton v8 is a watcher, infrastructure and guidance for Claude Workflows. It doesn't manage them. Its core is a graph memory with catalogs as the entry points, and the memory is plain files, so it works with or without the mod installed.

Round 6 (on top) settles every open decision, D8–D11 and D15–D18, asked through baton itself. Rounds 4–5 settle universality, Codex, the press-release stage, the single-family roles file and guardrails. Round 3 (the memory design) and rounds 1–2 follow. The decision record is at the bottom.

Round 6: your answers (2026-10-19)

Every open decision is settled

#answerwhat it means for the build
D8Read on demandRulings are catalog nodes agents Read at start. AGENTS.md / CLAUDE.md carry one pointer line, never the rulings.
D9Committed .baton/ (changed from the hidden git ref)Catalogs and durable nodes are committed under .baton/; volatile session and env rows are git-ignored. Universal-first decided it: any agent reads plain files, and they travel with the repo.
D10Copy, A/B, swapYour memory migrates in a copy, is A/B'd on 10 real session openers, then swapped, with the originals archived. Waits until your sessions free up.
D11Rule + mod hookA rule in ~/.claude/CLAUDE.md, plus a mod hook that refiles stray root lines. Possible now that the mod is installed.
D15User default + overrideA roles node in the user catalog, single family by default; a project catalog may override single lines.
D16RatchetBaseline today's violations, fail only new ones; lint config and CI files protected; suppressions need a reason and an expiry.
D17Verifier onlyBuilders may add tests but not change or delete existing ones.
D18PRs on, issues opt-inThe core is files. The PR adapter stays on (checks, merge-ready, /approve from a PR comment). Issues as goals, labels, boards and TEAM: github become an opt-in adapter, kept and tested but not grown in v8. Options page archived at decisions/D18-github.html.
Round 6 · settled · how baton asks

A question dialog, a page for anything complex, and an archive once it's decided

You set the default: ask with the AskUserQuestion dialog, recommended option first. When a concept is complex, write a temporary HTML page that lays out the options (one slide per decision: title, description, visual, options), open it, and name it in the question. Once the answer is in, archive the page in the repo with the choice marked, under docs/designs/<version>/decisions/ here, and under _orch/brief/ in a run.

tested liveresult
The prime asks D8–D11 and D15–D17 in two dialogsworked. Each answer became a decision note in the run's memory.
A garbled instruction (a paste cut mid-text)the prime stopped and asked instead of inventing the missing options.
A worker's git pushthe approval gate asked first, naming the agent path (prime › worker) and offering approve, approve for the run, or refuse; the approval was noted.
A worker's hand-back messagenoted as the operator's words, so a rule-shaped message from an agent could become a ruling. Fixed in PR #56: only prompts whose origin is you count.
Rounds 4–5: your answers (2026-10-12 to 10-15)

What's settled since round 3

you saidwhat it means for the build
Make it universal: AGENTS.md, every harness and providerD12, universal-first. baton is a memory and generic workflow accelerator made of plain files and process: the catalog graph, templates, rulings, preflight, close/resume and the run record. Any agent reads it through AGENTS.md. The Claude Code mod is the visibility layer and accelerator on top.
Top tier for Claude, but don't leave Codex friends behindD14, Codex is the second adapter. An AGENTS.md entry plus a baton watch terminal view rebuilt from ~/.codex/sessions/…/rollout-*.jsonl (each rollout names its parent thread), refreshed by Codex's notify turn-ended hook. Codex gets no pane and no spawn deny; those need Claude's mod system.
Build the press release before the project, then build, then validateD13, a new first stage. The press release's claims become the build's acceptance criteria, and the final gate redraws the same page with each claim stamped. See the next slide.
(from measurement, not a question) prompt-cache findingsD8 revised to "read, don't import." CLAUDE.md is frozen at session start and imports load in full, so catalogs, rulings and the session node are files agents Read on demand. The roles file gets a cache TTL column: 1 hour only for roles that sit idle on long commands.
Primarily single family; multiple as an option, since not everyone pays for several subscriptionsThe roles file defaults to one provider's tiers. A cross-family verifier is one optional line. See the roles slide.
Strict linters that reduce the AI's flexibility, under the theory of constraintsA guardrails node in every project catalog, plus enforcement the mod accelerates. See the guardrails slide; D16 and D17 are open.
"Holy baton sprawl"All v8 work lives in the repo: this page at docs/designs/v8/plan.html, the press release at docs/releases/v8/.
D13 · settled · the press-release stage

Promise first, build against the promise, then stamp every claim

Before any code, a run writes _orch/release/release.html: a sales hero per value area, side panels for detail, measured numbers tagged apart from targets. You approve the page. Each claim on it becomes one acceptance criterion. At the final gate the same page is redrawn from the ledger, with every claim stamped.

1 · Press release claims with targets you approve the page cheap to iterate 2 · Build each unit names its claim claim = acceptance line no claim, no unit 3 · Validate same page, redrawn proven · missed · changed evidence from the ledger missed → a new unit, or the claim changes
claim statemeaning on the final page
provenThe verify step ran on the real artifact and the ledger row points at the evidence.
missedNot met. The page says by how much and what blocked it.
changedYou changed the claim during the build; the old wording stays, struck through, with the reason.
Round 5 · the roles file · D15

One provider's tiers by default; a second family is one optional line

Not everyone pays for two subscriptions, so baton defaults to a single family. The roles file maps each role to a full model ID and a cache TTL. doctor fills it only with IDs it has confirmed are available, and the mod compares the model that actually served each agent against it.

roleClaude (default)Codex (default)cache TTL
judgment, verifier, designclaude-opus-5-5its strongest model5 min
builderclaude-sonnet-5-5its default coding model5 min
mechanical, curator, digestsclaude-haiku-5-5its smallest model5 min
runner (long commands, benches)claude-sonnet-5-5its default coding model1 hour
cross-family verifier (optional)off unless you add the line, for example a Codex model verifying Claude's builds5 min
Full IDs only. The haiku alias served claude-haiku-4-5-20251001 for 405 turns in onCrack round 4; a full ID plus the mod's served-model check would have caught it on the first turn.
Round 5 · guardrails · the theory of constraints · D16, D17

Your review is the constraint; anything a machine can catch never reaches it

With agents writing the code, the bottleneck is your attention for review and verification. Strict checks narrow what an agent can do, so it converges faster, and they move every mechanical catch off your desk. The project catalog's guardrails node lists each rule, what enforces it, and the proof that it fails.

Per edit · seconds · inside the agent's turn formatter · incremental type check · lint on the changed file · error says what to use instead At the gate · minutes · the verify step full tests · architecture rules · UI journeys · suppression count Your review · judgment only
rule (example)enforced byproof it fails
Every PR targets maina CI check on the PR's base brancha test PR opened against a feature branch is refused
Never push to mainbranch protection, plus a mod deny on git push … mainthe denied call appears in the ledger
Build outputs share one target directorythe env preflightpreflight fails on a checkout with its own target directory

Enforce at the highest level that works: architecture (one owner, one supported way) → types → a lint whose error names the fix → a test → a written rule last, because nothing fails when an agent skips a doc.

Round 3: your answers

What's settled now

you saidwhat it means for the build
The mod is a watcher + infrastructure/guidance, not a managerThe mod watches agents, keeps the catalogs current, draws the pane and nudges. It never steers a Workflow. This settles D5 as option 1 (meter + nudge; the strict prime is opt-in).
"…IF the workflow can use the mod"Design rule: files are the source of truth, the mod is an accelerator. Workflow agents can always Read the catalogs. Whether they can also call the mod's memory tools goes into the step-0 spike.
Catalogs for each project, each technology, and catalogs of catalogsReplaces D7. Root catalog → user / project / technology / tool catalogs → sub-memories.
Catalogs are entry points into a graph of sub-memoriesA catalog row is a pointer into the graph. Nodes link to nodes, and catalogs are just the nodes an agent starts from.
Close/resume belongs in the project catalogYes: the project's session node, written continuously and checked on resume.
The environment check belongs in the project catalogSettles D6 as option 1: the project's env node, a learned preflight.
Replace and work with MEMORY.md; rebuild the existing files this wayMEMORY.md becomes the root catalog. The 64 existing files are migrated into the graph (slide after next).
Round 3 · the memory design

A graph of small memories, entered through catalogs

Every memory is a node: one fact, a few hundred bytes to a couple of KB, with [[links]] to other nodes. A catalog is also a node, but its body is only rows of the form "name: one-line hook → link". An agent loads the root, follows one or two catalog rows, and reads only the nodes it lands on.

root (MEMORY.md)≈1 KB, always loaded userhow you work project: samenpicked by cwd tech: rustpicked by Cargo.toml tool: cmuxpicked by doctor decision tables session ● env ● shared target dir screenshot recipe ADR-053 state PLT leak (history) ENOSPC lesson
catalogloaded whenholds rows for
root (MEMORY.md)always (Claude Code already loads it)one row per catalog
useralways (small)how you work: decision tables, PRs to main, never push after handoff, cheap models for fan-outs
project: <repo>cwd is inside itsession (close/resume), env (preflight), how to test, rulings, open PRs, ADR state
tech: <stack>a marker file is present (Cargo.toml, mix.exs, *.fsproj, go.mod)cross-project lessons for that stack
tool: <tool>doctor finds it installedcmux, Claude Workflows, mods, gh: recipes and gotchas, plus the plugin skill to load
Round 3 · rebuilding your existing memory · D10

Your memory is already a graph; it needs entry points and smaller nodes

The 64 memory files have 112 [[links]] between them, only 3 broken links and 2 files with no links at all, so the graph exists. What's missing is the entry points (MEMORY.md is a flat list of all of them, loaded whole) and node size: the biggest files are session logs, not facts.

todaybecomes
22 feedback_* files (the most-linked: fan-out serialization 11 inbound, no push after handoff 8, gate tasks in foreground 7)The user catalog. A few move to tool or tech catalogs (cmux screenshots → tool:cmux; clean Rust builds → tech:rust).
32 project_* filesOne project catalog each, plus a session and an env node for each
6 reference_* filesTech and tool catalogs (model landscape → tech:claude-models; sudo via osascript → tool:macos)
The 4 largest: samen ADR-048 coverage 37 KB, samen foundry 35 KB, baton v2 30 KB, prettyPresentations 29 KBSplit: one current-state node plus dated history nodes
Everything sits in one folder because you always launch from ~/Desktop/projectsCatalogs are chosen by the repo under cwd, not by the launch folder
1.Migrate a copy, A/B, then swapRecommendedBuild the graph in a copy. Replay 10 real session openers against old vs new and compare tokens loaded and facts found. Swap only if new ≥ old on facts. Keep the originals archived.
2.Migrate in placeFaster. Rollback is from a git snapshot of the memory folder.
3.Grow into itNew memories go into catalogs; old files move when touched.
Round 1: your answers

What's settled

#you saidwhat it means for the build
D11Fix prices and pin full model IDs; move the mod's internal calls to Haiku 5.5; pre-register the Haiku worker-tier test.
D21, universalbaton v8 is a Claude Code mod over Workflows. Nothing assumes cmux, any one browser or any one OS; cmux is the first adapter.
D32The view is the mod pane. That is the universal choice: the same pane draws in the terminal, desktop, VS Code and mobile ($.ui.resolve(e) per surface). No local HTML.
P1a feed per agent update, clickableA "what changed" row each time an agent edits, commits, runs a test or returns, with Enter to drill in. The API supports it (next slide).
P2worried it breaks WorkflowsSettled in round 3: meter + nudge by default, the wall is opt-in.
P3agreedA unit-loop template: build → verify → fix → re-verify, break on failure, a round cap that is logged, and a finding that recurs across rounds spawns a design unit.
P4agreed, with other UI-test adapters; bundle the cmux skillsA UI-check interface with drivers; cmux skills ship in the plugin and are found through the tools index (below).
P5agreedA merge queue: independent units continue behind an open PR; a merged PR resumes the run by itself.
P6doesn't memory resolve this?Partly. The gaps are below → D8. Round 3: rulings become nodes in the user / project catalogs.
P7close/resume session/baton close and /baton resume, built on memory (below).
P8ABSOLUTELYEvery agent row shows its served model ID next to its name, and turns red when that differs from what was asked.
P9didn't followSettled in round 3: learned preflight in the project catalog.
P10not yetParked.
Found in the mod API (Claude Code 2.1.296 types)

The mod can watch every Workflow agent, but it cannot change one

This one fact decides how rulings and the model map reach Workflow agents. The mod can see a spawn and can refuse it, but it cannot rewrite the agent's prompt or model. So whatever an agent must know has to reach it another way: through files every agent loads (CLAUDE.md and its imports), through agent definitions the script names (agentType), or through the template's args.

The mod wants to…API
know a Workflow agent started, its run and positionagent.spawn fires with e.workflow = { runId, agentIndex }yes
see what each agent does (edits, commands)tool.call events carry the Workflow agent's agentIdyes
refuse an agent (e.g. one on an unmapped model){ deny } from agent.spawn: "only a deny applies there"yes
inject rulings or lessons into its prompt"a change to its content is ignored"no
set its modelsame: content is not rewritable for Workflow agentsno
list the run's agents$.agent.list(): "a workflow's are not" listed. Build the tree from spawn events plus wf_*.json instead.no
know which model actually servedEach agent's transcript records .message.model, and the run JSON has it per agentyes, from files
P2 · round 2 · settled in round 3 as option 1

Keep the prime, but make it a meter by default, not a wall

Your worry is right. Workflows assume a hybrid main session: scout inline first (list files, read the diff, scope the work), then launch the script. v7's guard refuses every non-dispatch tool during a run, which would block the scouting.

The prime still pays: the itsjusthtml main thread burned 5.9B cache-read tokens over 10 compactions doing grunt work. That's a cost problem, not a quality one (v7 measured no rot on Opus 5.5). So the default should watch cost and suggest, and refuse only when you ask it to.

1.Meter + nudge; wall opt-inRecommendedThe band counts main-thread work since the last dispatch (tool calls, context size). Past a threshold it offers "dispatch this?" or "close + resume". /baton prime turns the v7 wall on for a session.
2.Wall by defaultv7's behavior. It stays lean, but it fights the scout-then-orchestrate pattern and plain chat.
3.No prime conceptDrop it; rely on Workflows and memory alone.
P6 · "doesn't our memory resolve this?" · D8

In design yes; in practice it never reached the agents doing the work

v7 already lifts standing rules out of your prompts, keeps the newest, leads every wake with them, and can enforce one as a refusal. Four gaps kept that from helping in the sessions I read:

  1. The mod never ran live. The rollout switch was off, so no session had rulings.
  2. Scope. Rulings live in project memory, but the rules you repeat cross projects (decision-table shape, decisions are issues, cheap models, cmux screenshots). Those survive today only because Claude's own MEMORY.md carries them.
  3. Reach. Rulings lead the prime's wake. Workflow agents can't be prompt-injected (the "mod can watch" slide), and each script re-pasted a COMMON block by hand.
  4. Agents don't know they exist. Lessons are injected at spawn for Agent-tool agents only.
1.Generated rules file + pinned agent typesRecommendedThe mod writes active rulings to a generated .claude/baton/rulings.md, imported by CLAUDE.md, which every agent (Workflow agents included) loads. Templates use baton agentTypes with full model IDs.
2.Template args onlyThe template passes rulings in args as the COMMON block. This works only for baton templates, not hand-written scripts.
3.Prime wake onlyLeave it as v7; agents learn rules only through the prompts the prime writes.
P7 · round 2 · now the project catalog's session node · storage → D9

/baton close writes one session row; /baton resume reads it

Today continuity is a hand-written session-prompt file plus Workflow surgery: resumeFromRunId, results pasted into scripts, and a Monitor on journal.jsonl. Close and resume make that one step each, and memory does the remembering.

/baton close records/baton resume does
open runs: run ID, script path, the next unfinished agentIndex, any agent still in flight (warns before a stop)offers the one-line resume per run (scriptPath + resumeFromRunId)
open PRs and the merge queuechecks gh for merges since close and continues the units they unblock
rulings added this session, plus a decisions-pending listwakes with the index heads, then the session row
the project catalog's session node, rewritten at every agent completion (not only on close), pointing at the notes belowdescends only where you ask
This fits your global handoff rule: close can also write the session-prompt file and print the one line Read @/abs/path and execute, with that file's body being "run /baton resume".
P9 · round 2 · settled: the project catalog's env node

Preflight: a 20-second environment check before a long run

Several runs failed hours in for reasons that had nothing to do with the code: the disk filled, a toolchain wasn't on PATH, a database or the Docker VM wasn't up, or a stale dev server held the port. Each failure cost an agent's work and a resume. A preflight checks those once, before the first agent starts, and stops with a clear message instead.

The useful part is that it learns. When a run fails on something environmental (ENOSPC, command not found, EADDRINUSE), baton adds that check to the project catalog's env node. Next run, it's checked up front.

seen in your sessionspreflight check that would have caught it
tinker: No space left on device ×8 mid-buildfree disk ≥ project threshold; offer the known cleanup (cargo clean, old targets)
tinker: Rust not on PATH (/opt/homebrew/opt/rustup/bin)cargo --version
tinker: postgres failed to startpg_isready
Campfire: colima disk at 15GB, Docker VM memorydocker info, VM disk free
itsjusthtml: stale process held :44100 (exit 7)port free, or owned by our dev server
1.Learned preflightRecommendedPart of /baton doctor and the first stage of every template; failures add checks to the project's env node.
2.Static checklistChecks you write by hand per project.
3.Drop itHandle environment failures when they happen.
P4 · UI verification, universal

One UI-check interface; cmux first, others as drivers

The verifier asks for the same things whatever the browser: screenshots at desktop and phone width, run these interactions (hover, click, fullscreen enter/exit, close panel), report console errors, and confirm the live URL is not empty. A driver does the how.

driverforships as
cmux (default for you)cmux browser open/goto/click/eval/screenshot, in a tab in the existing pane, never a new splitplugin skill baton:ui-cmux carrying the cmux rules you've taught me
PlaywrightCI and anyone without cmuxskill baton:ui-playwright
Claude in Chrome / built-in browserdesktop app usersskill that defers to those tools' own skills
none foundheadless serversHTTP fetch + HTML structure checks; the verdict says "no visual check"

On "bundle the cmux skills with memory or AGENTS.md": I'd ship them as plugin skills (loaded on demand, versioned with baton) and put one row per skill in the tool catalog (tool:cmux etc.), so an agent finds the right driver through memory without carrying every skill in context. AGENTS.md / CLAUDE.md would load all of it into every agent.

Order of work (round 5)

A spike, then memory first, because everything else hangs off it

  1. Spike (findings note, no PR). Is the mods rollout on? Can Workflow agents call the mod's memory tools? Is agent.spawn with e.workflow and tool.call attribution seen live? Does a CLAUDE.md import reach agents started later?
  2. Model truth (D1, P8) + the roles file (D15). A single-family roles file with full IDs and cache TTLs, checked by doctor. Price rows for Sonnet 5.5 and Haiku 5.5 (Haiku priced per request on prompt size); MECH → claude-haiku-5-5; full IDs; doctor shows alias resolution; the served model ID next to every agent name. Small, and safe to ship first.
  3. Memory graph format + tools. Node and catalog file format, links, supersedes, stale marking, the orphan check, cwd/marker-file catalog selection, the Haiku curator. A CLI that works without the mod (baton mem …), plus the mod's memory tools on top.
  4. Migrate your memory (D10, D11). Built in a copy; A/B on 10 real session openers; swap; archive the originals; the CLAUDE.md rule against root re-flattening.
  5. Project catalog: session + env (P7, P9, D9). Continuous session writes, /baton close, /baton resume with drift checks, learned preflight.
  6. Watcher pane (D3, P1). Run tree from spawn events + wf_*.json; a live per-agent "what changed" feed; Enter drills in; changes also land in the graph.
  7. Rulings reach every agent (D8, read, don't import) + templates (P3, P5). unit-loop, the merge queue, pinned agent types, required brief fields.
  8. Guardrails (D16, D17). The guardrails node, baseline and ratchet, protected configs and tests, suppression count on the meter, curator promotion of repeat rulings.
  9. The press-release stage (D13). release.html before the build, claims as acceptance lines, the stamped page at the final gate, with the verify node's feature map as the proof.
  10. UI-check drivers (P4, the verify node) and the Haiku experiment (D1). The cmux driver first; the experiment needs a budget from you.
Decision record

Every decision settled (2026-10-19)

Settled so far: D1:1 · D2:1 (universal) · D3:2 (mod pane) · D5:1 (meter, from "watcher, not manager") · D6:1 (env in the project catalog) · D7 replaced by the catalog graph · D12 universal-first · D13 press release → build → validate · D14 Codex as the second adapter.

#questionoptions
D8How do rulings reach Workflow agents? (revised: read, don't import)1. Rulings are catalog nodes agents Read at start; AGENTS.md / CLAUDE.md carry one pointer line, never the rulings; templates pin agent types with full model IDs Chosen
2. A generated rules file imported by CLAUDE.md (frozen at session start, loaded in full)
3. Template args only
D9Where do project catalogs live?1. Committed under .baton/ in the repo; volatile session and env rows git-ignored Chosen
2. A hidden git ref (refs/baton/catalog), the round-3 pick, dropped because agents need git commands to read it
3. Local only, under ~/.claude/baton/projects/<repo>/
D10How do we migrate the existing 64 memory files?1. Migrate a copy, A/B on 10 real session openers, swap, archive the originals Chosen
2. Migrate in place with a git snapshot
3. Grow into it: move files as they're touched
D11How do we stop sessions re-flattening MEMORY.md?1. A rule in ~/.claude/CLAUDE.md + a mod hook that refiles stray root lines Chosen
2. The CLAUDE.md rule only
3. A periodic curator pass only
D15Where does the roles file live?1. A roles node in the user catalog for your defaults, single family; a project catalog may override single lines Chosen
2. One global file only
3. Per template, in its args
D16How strict are guardrails by default?1. Ratchet: baseline today's violations, fail only new ones; lint config and CI files protected; suppressions need a reason and expiry Chosen
2. Advisory: count on the meter, block nothing
3. Strict from day one: fail on every violation
D17Who may edit existing tests during a build unit?1. The verifier only; builders may add new tests but not change or delete existing ones Chosen
2. Anyone; the verifier reviews every test diff
3. Nobody until you unlock them
D18How much of baton lives on GitHub?1. Files first; the PR adapter on, issues, labels, boards and TEAM: github opt-in Chosen
2. GitHub-native core: issue → PR → board by default
3. Local only