Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

chore(core): merge main with model declarations [O8,O3]

Corey Olson4eb7dea270c3
diff --cc docs/formats.md
index 8b7f5b4e,db2519d0..c0d572ff
--- a/docs/formats.md
+++ b/docs/formats.md
@@@ -79,7 -79,7 +79,7 @@@ The board file is in the repository's G
| `move engine` | `8` | `ENGINE_VERSION` in `src/machine.js`, carried as `engine` in every sealed executable move | Bump when a move's meaning changes, independently of the event log and sealed envelope. A newer engine is refused with `ENGINE_VERSION`, naming both versions and asking you to upgrade Pullboard. |
<!-- format-versions:end -->
- Pullboard 0.6.1 released engine 1. Engine 2 records a fresh explicit-build claim's skipped-review snapshot. Pullboard 0.8.1 released engine 3, including lane-sensitive graft refusals and authenticated relay senders. Engine 4 adds captured background-baseline completions through `completeCheckBaseline`; released engine-3 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Engine 5 requires a one-line reason when releasing a review and gives that reviewer a one-hour cooldown for the current submission. Each sealed move replays under its recorded engine version: engines 1 through 4 retain the original release event and review-reservation behavior. Engine 5 retains support for older moves, including engine-4 baseline completions. Pullboard 0.8.3 released engine 6, adding board-scoped machine credentials and permitting machine execution only for one exact, earlier authenticated phone request, including its payload digest. Engine 7 adds ordered item holds through `holdItem` and `releaseItemHold`; engine-6 clients stop with `ENGINE_VERSION` before interpreting either operation or advancing their replay cursor. Older request receipts retain their recorded engine semantics. Pullboard 0.8.4 released engine 7. Engine 8 is the shared 0.8.5 move version: registration retains declared model labels, every registered agent move records its model snapshot, merged-item exception notes are retained, and next review selection follows roadmap order. Engines 1 through 7 retain their original registration and event details without these model fields and their tier-first review selection. Upgrade every linked device before using the new moves.
-Pullboard 0.6.1 released engine 1. Engine 2 records a fresh explicit-build claim's skipped-review snapshot. Pullboard 0.8.1 released engine 3, including lane-sensitive graft refusals and authenticated relay senders. Engine 4 adds captured background-baseline completions through `completeCheckBaseline`; released engine-3 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Engine 5 requires a one-line reason when releasing a review and gives that reviewer a one-hour cooldown for the current submission. Each sealed move replays under its recorded engine version: engines 1 through 4 retain the original release event and review-reservation behavior. Engine 5 retains support for older moves, including engine-4 baseline completions. Pullboard 0.8.3 released engine 6, adding board-scoped machine credentials and permitting machine execution only for one exact, earlier authenticated phone request, including its payload digest. Engine 7 adds ordered item holds through `holdItem` and `releaseItemHold`; engine-6 clients stop with `ENGINE_VERSION` before interpreting either operation or advancing their replay cursor. Engine 8, shared by the 0.8.5 move changes, retains merged-item exception notes, selects the next review in roadmap order, and adds coordinator-only `reopen` for a submission returned without a verdict; engine-7 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Recorded engines 1 through 7 retain their original tier-first review selection. Engine 8 also adds durable refusal recovery for blocked relay positions; each explicit skip publishes the readable prefix even when another unsupported record follows. Older request receipts retain their recorded engine semantics. Upgrade every linked device before using the new moves. Each release shares one engine bump across its changed moves.
++Pullboard 0.6.1 released engine 1. Engine 2 records a fresh explicit-build claim's skipped-review snapshot. Pullboard 0.8.1 released engine 3, including lane-sensitive graft refusals and authenticated relay senders. Engine 4 adds captured background-baseline completions through `completeCheckBaseline`; released engine-3 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Engine 5 requires a one-line reason when releasing a review and gives that reviewer a one-hour cooldown for the current submission. Each sealed move replays under its recorded engine version: engines 1 through 4 retain the original release event and review-reservation behavior. Engine 5 retains support for older moves, including engine-4 baseline completions. Pullboard 0.8.3 released engine 6, adding board-scoped machine credentials and permitting machine execution only for one exact, earlier authenticated phone request, including its payload digest. Engine 7 adds ordered item holds through `holdItem` and `releaseItemHold`; engine-6 clients stop with `ENGINE_VERSION` before interpreting either operation or advancing their replay cursor. Engine 8, shared by the 0.8.5 move changes, retains merged-item exception notes, selects the next review in roadmap order, and adds coordinator-only `reopen` for a submission returned without a verdict; engine-7 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Recorded engines 1 through 7 retain their original tier-first review selection. Engine 8 also adds durable refusal recovery for blocked relay positions; each explicit skip publishes the readable prefix even when another unsupported record follows. Older request receipts retain their recorded engine semantics. Upgrade every linked device before using the new moves. Each release shares one engine bump across its changed moves. Engine 8 also retains declared model labels on registration and records each registered agent move's model snapshot; engines 1 through 7 retain their original registration and event details without these model fields.
The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.
A linked board requires at least engine 3 after issuing any agent token, including
diff --cc src/cli.js
index a87d5e12,fd73a3a9..6c0addf3
--- a/src/cli.js
+++ b/src/cli.js
@@@ -1213,8 -888,8 +952,9 @@@ function resumeHere(io)
};
});
card.relayProblems = unlinkedRelayProjects();
+ card.hookProblems = unwiredHookProblems(root);
const { me } = card;
+ const name = (id) => agentDisplayName(card.agents, ctx.config, id);
card.stale = staleFrozenItems(card.all, loadSpec(root, ctx.config).rows, ctx.doctrine.rows).map((item) => ({ ...item, ...staleItemFinding(item) }));
if (isMain) {
card.staleFollowUps = { count: card.stale.length + card.staleIntegrations.length,
@@@ -1224,8 -899,9 +964,9 @@@
}
const say = (line) => io.say(line);
for (const problem of card.relayProblems) say(problem.message);
+ for (const problem of card.hookProblems) say(`${problem.message}; ${problem.next}`);
const plural = (n, word) => `${n} ${word}${n === 1 ? '' : 's'}`;
- say(`resume: ${me.id}${me.family ? ` (${me.family})` : ''}, ${me.lane} lane${isMain ? ', the main checkout' : ''}, at ${root}`);
+ say(`resume: ${me.displayName}${me.family ? ` [family ${me.family}]` : ''}, ${me.lane} lane${isMain ? ', the main checkout' : ''}, at ${root}`);
const dirty = dirtyFiles(root).length;
if (!isMain) {
const branch = tryGit(root, ['rev-parse', '--abbrev-ref', 'HEAD']).stdout || 'HEAD';
@@@ -1453,7 -1125,7 +1194,7 @@@ async function worktreeFor(io, lane, ro
catch (error) {
const registered = withBoard(ctx, (board) => store.agentAt(board, root));
if (registered) {
-- io.err('pullboard: registration is already ordered; the worktree is preserved. Retry enrollment to obtain its credential: ' + cdTo(root) + ' pullboard join ' + lane + (route === 'strong' ? '' : ' --route ' + route) + (family ? ' --family ' + shellWord(family) : ''));
++ io.err('pullboard: registration is already ordered; the worktree is preserved. Retry enrollment to obtain its credential: ' + cdTo(root) + ' pullboard join ' + lane + ' --model ' + shellWord(model) + (route === 'strong' ? '' : ' --route ' + route) + (family ? ' --family ' + shellWord(family) : ''));
throw error;
}
// Only remove the clean worktree just created here; preserve it if another process changed it.
@@@ -1684,10 -1359,10 +1438,10 @@@ function readCommands(io, { first, seco
io.result(summary);
return 0;
}
- if (summary.relay.linked) io.say(`relay: sequence ${summary.relay.sequence}; ${summary.relay.behind} pending uploads`);
+ if (summary.relay.linked) io.say(`relay: sequence ${summary.relay.sequence}; ${summary.relay.behind} pending uploads${summary.relay.recovery?.pending ? `; recovery pending for sequence ${summary.relay.recovery.skip}; retry ${summary.relay.recovery.next}` : ''}`);
if (summary.relay.oversizedSnapshot && !summary.relay.refusedCheckpoint) io.say(formatSnapshotLimit(summary.relay.oversizedSnapshot));
const { items, accepted, rejected } = summary.stats;
- io.say(`${summary.me.id}: ${summary.unread} unread shouts; holding ${summary.mine.map((item) => `#${item.item_id}`).join(', ') || 'nothing'}`);
+ io.say(`${summary.me.displayName}: ${summary.unread} unread shouts; holding ${summary.mine.map((item) => `#${item.item_id}`).join(', ') || 'nothing'}`);
io.say(`board: ${items.open} open, ${items.claimed} claimed, ${items.submitted} awaiting verification, ${items.verified} verified, ${items.withdrawn} withdrawn`);
io.say(`verdicts: ${accepted} accepted, ${rejected} rejected`);
io.say(reviewQueueLine(ctx, summary.reviewQueue));
@@@ -2334,12 -2006,19 +2097,19 @@@ function workCommands(io, args)
else io.err('Run this check? [y/N]');
const answer = await firstInputLine(io.stdin);
if (!/^y(?:es)?$/iu.test(answer.trim())) {
- throw new Refused('CHECK_CONFIRM', `the check set by ${by} was not run: ${check}; run pullboard check ${item.item_id} --yes after reading the command, or answer yes at the prompt`);
+ throw new Refused('CHECK_CONFIRM', `the check set by ${authorName} was not run: ${check}; run pullboard check ${item.item_id} --yes after reading the command, or answer yes at the prompt`);
}
}
- const run = await withGateSlot(ctx.info.root, () => runShell(ctx.info.root, check), { itemCheck: true, onWait: gateWaitReporter(io) });
+ const run = await withGateSlot(ctx.info.root, (lease) => runProfiledShell(ctx.info.root, check, { waitMs: lease.waitMs, artifactPrefix: `pullboard-check-${item.item_id}`, persistLog: true, gateSlotHeld: true }), { itemCheck: true, onWait: gateWaitReporter(io) });
io.result?.({ id: item.item_id, green: run.isGreen, seconds: run.seconds, check, by, report: run.isGreen ? '' : digestOf(run.output) });
- io.say(`check ${run.isGreen ? 'green' : 'red'} in ${run.seconds}s: ${check}`);
+ const timings = timingDigest(run.profile);
+ const compact = timings && !run.profile.files.length
+ ? `; ${timings.replaceAll('\n', '; ')}; timing profile: ${run.profilePath}` : '';
+ io.say(`check ${run.isGreen ? 'green' : 'red'} in ${run.seconds}s: ${check}${compact}`);
+ if (timings && run.profile.files.length) {
+ io.say(timings);
+ io.say(`timing profile: ${run.profilePath}`);
+ }
if (!run.isGreen) io.say(digestOf(run.output).replace(/^/gm, ' '));
return run.isGreen ? 0 : 1;
},
@@@ -2933,7 -2644,7 +2739,7 @@@ async function runCommand(argv, io)
} catch (error) {
if (error instanceof Refused) {
io.refusal?.(error);
- io.err(`pullboard: ${displayedRefusal(io, error)}`);
- io.err(`pullboard: ${error.message}\nnext: ${refusalDocument(error).error.next}`);
++ io.err(`pullboard: ${displayedRefusal(io, error)}\nnext: ${refusalDocument(error).error.next}`);
return 1;
}
throw error;
@@@ -2985,7 -2696,7 +2791,7 @@@ async function runMain(argv, streams)
} catch (error) {
if (!(error instanceof Refused)) throw error;
io.refusal(error);
- io.err(`pullboard: ${displayedRefusal(io, error)}`);
- io.err(`pullboard: ${error.message}\nnext: ${refusalDocument(error).error.next}`);
++ io.err(`pullboard: ${displayedRefusal(io, error)}\nnext: ${refusalDocument(error).error.next}`);
io.flush(1);
return 1;
}
@@@ -2999,7 -2710,7 +2805,7 @@@
}
catch (error) {
if (!(error instanceof Refused)) throw error;
- if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err(`pullboard: ${displayedRefusal(io, error)}`);
- if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err(`pullboard: ${error.message}\nnext: ${refusalDocument(error).error.next}`);
++ if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err(`pullboard: ${displayedRefusal(io, error)}\nnext: ${refusalDocument(error).error.next}`);
}
};
if (needsRepo) rememberTrunk(io);
@@@ -3009,7 -2720,7 +2815,7 @@@
try { await executePersonRequests(io.cwd, io, main); }
catch (error) {
if (!(error instanceof Refused)) throw error;
- if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err(`pullboard: ${displayedRefusal(io, error)}`);
- if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err(`pullboard: ${error.message}\nnext: ${refusalDocument(error).error.next}`);
++ if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err(`pullboard: ${displayedRefusal(io, error)}\nnext: ${refusalDocument(error).error.next}`);
}
}
const code = await runCommand(argv, io);
diff --cc src/help.js
index 00000000,90df3fe9..0dc3631c
mode 000000,100644..100644
--- a/src/help.js
+++ b/src/help.js
@@@ -1,0 -1,325 +1,327 @@@
+ /** Help declarations and command phrases stay independent of CLI/server initialization [N26]. */
+ import packageData from '../package.json' with { type: 'json' };
+ import { lifecycleHelp } from './machine.js';
+
+ export const VERSION = packageData.version;
+
+ const ALL_HELP = `pullboard ${VERSION}: the local-first work board for teams of coding agents.
+ Nothing ships until a second agent verifies it.
+
+ Set up
+ pullboard tour see it work: a reject and its rework, scripted, in thirty seconds
+ pullboard init config, SPEC.md, agent instructions, git hooks, board
- pullboard worktree <lane> [--route light] [--family <name>] make and join a worktree for a new agent
- pullboard join <lane> [--route light] [--family <name>] register this worktree as an agent
- --route sets which work the model can take; --family records its name
++ pullboard worktree <lane> --model <name> [--route light] [--family <name>] make and join a worktree for a new agent
++ pullboard join <lane> --model <name> [--route light] [--family <name>] register this worktree as an agent
++ A model is required (or set PULLBOARD_MODEL); family is a separate declaration
++ pullboard.json agents.names: suffix (default) or prefix
+ pullboard whoami | lanes | status who you are, the lanes, the board at a glance
+ pullboard takeover rebind this checkout when the same agent starts a new session
+ pullboard resources local resource holders and their FIFO queues
+ pullboard settings [gateSlots <n>] view or set this machine's gate slots (default 2)
+ pullboard view [--port N] [--no-open] every project on this machine in your browser: items, shouts, doctrine,
+ agents and activity, live; add items, shout and hold lanes from it
+ pullboard view --export <dir> a read-only snapshot with event replay, for any static host
+ pullboard serve [--port N] local API v1: boards, state, moves, requests and live events,
+ behind the session secret in its printed address
+ pullboard relay [on|off|pair|join <code>] [--url <address>] link, inspect or unlink this board's sealed relay
+ on signs in through GitHub; the address defaults to https://app.pullboard.dev
+ pair prints a one-use machine code; join stores it in another clone
+ pullboard relay on --all [--url <address>] link every registered project after one sign-in; pair the phone once
+ keep this command open until pairing finishes; later projects link on registration
+ pullboard relay devices list paired device ids and their public-key fingerprints
+ pullboard relay revoke <device> stop future key delivery; already received keys remain known
+ pullboard relay tokens list this board's agent token ids, agents and expiry, never credentials
+ pullboard relay revoke <token-id> revoke one token from that list; other agents keep working
+ pullboard relay recover --skip <sequence> person-only recovery of one blocked next relay position
+ pullboard resume where you are: your claim, branch, uncommitted work, what came back,
+ unread shouts, what to do next; run it to start any session
+ pullboard hooks reinstall the git hooks (e.g. after a fresh clone)
+
+ Work
+ pullboard add <lane> <title> [--criterion "..."] [--specs G1.2,K3] [--after 3,4] [--parent <id>]
+ [--brief "..." | --brief-file <file>] [--route light|mid]
+ --after: claiming waits until those items are verified
+ --brief: what a cold agent needs; --route light: any model can build it
+ [--check "<command>"] [--wait] the command that proves it; --wait waits for its main baseline
+ with --criterion and a brief, --check is needed below strong
+ pullboard edit <id> [--brief "..." | --brief-file <file>] [--route light|mid|strong] [--criterion "..."] [--check "..."]
+ [--wait] wait for a new check's baseline; otherwise it runs in the background
+ pullboard escalate <id> --note "what was tried and how it failed" hand it one tier up
+ pullboard run --agent "<command>" [--attempts 3] [--minutes 15] [--items N] [--wait M]
+ build routed items unattended in this worktree: the agent command reads
+ the context pack at $PULLBOARD_PACK (and $PULLBOARD_CHECK, $PULLBOARD_ITEM,
+ $PULLBOARD_ATTEMPT, $PULLBOARD_TIER); green work is submitted, red escalated
+ [--agent-light "..."] [--agent-mid "..."] [--agent-strong "..."] a command per tier
+ pullboard list [lane] [--all] [--route light|mid|strong] open and active items; --all adds closed ones
+ pullboard roadmap ordered milestones and each item's live status
+ pullboard milestone add <name> [--note ...] [--items 1,2,3] create a milestone and optionally add items
+ pullboard milestone items <name> --add|--remove ids append or remove item references
+ pullboard milestone move <name> --before <other> reorder a milestone
+ pullboard milestone edit <name> [--name <new>] [--note <text>]
+ rename or update a milestone note
+ pullboard milestone remove <name> remove a milestone without changing its items
+ pullboard doctor check board integrity without changing it
+ pullboard skills --update refresh unchanged Claude Code skills from shipped versions
+ pullboard show <id> [--history] an item, the criterion frozen at claim, its verdicts: the latest in full,
+ earlier ones as one line; --history prints every note in full
+ pullboard fact <id> <kind> <text> [--supersedes <fact-id>] [--ref path:lines@full-sha]
+ append an observation or a holder/coordinator judgement to its thread
+ pullboard next [--wait <minutes>] offer an eligible review when reviews pile up, otherwise claim work
+ pullboard next --build claim a build explicitly, recording a skipped review offer
+ pullboard next --verify reserve the next submitted item you can check;
+ pullboard next --verify <id> reserve that submitted item instead
+ in the main checkout, verifying needs --as coordinator
+ pullboard check [id] [--yes] show and run your item's check; --yes confirms a check set by someone else
+ the command and its author print first; the project gate is pullboard gate
+ pullboard claim <id> take or renew a lease; the first claim freezes the criterion
+ pullboard release <id> [--note "why"] hand it back; a review release needs a one-line reason
+ pullboard submit <id> needs a clean tree, item check and affected tests green at HEAD (alias: done)
+ pullboard verify <id> accept --note "what you broke or which edge you tried, and what happened"
+ pullboard verify <id> reject --reason TEST_FAILURE --note "what failed"
+ any --note can be --note-file <file>, which keeps quotes, $ and backticks intact
+ pullboard shout <lane|agent|person|all> <text> pullboard inbox
+ pullboard shout [<to>] <text> --decision ask for a decision; defaults to your coordinator or the person
+ pullboard shout <to> <text> --evidence attempt|receipt --outcome <word> --item <id> --commit <rev>
+ pullboard answer <shout-id> <text> [--as person]
+ answer your decision; person mode is main-checkout only
+ pullboard pass <shout-id> <note> coordinator passes a decision to the person
+ pullboard decisions [--as person] shouts waiting for you; main checkout defaults to coordinator
+ pullboard export print the whole board as versioned JSON
+ pullboard import <file> restore a versioned export into an empty board
+
+ Coordinator
+ pullboard sweep --run "<checker>" --check "<checker on {file}>" [--route light] [--max 20] [--dry-run]
+ file one item per file a linter, type checker or test reporter flags
+ pullboard merged <id> <commit> record where verified work landed
+ pullboard withdraw <id> <reason> drop an item nobody should build
+ pullboard refreeze <id> re-freeze a criterion after its spec rows changed
+ pullboard reopen <id> --note "why" return a submission for criterion correction without a verdict
+ pullboard hold <lane> --reason "..." pause a lane: next there claims nothing and names the reason
+ pullboard hold <id> "reason" hold one item so next skips it
+ pullboard hold <lane|id> --off lift a lane or item hold
+
+ Receipts
+ pullboard stats [--since <date>] proof numbers from the event log; --json for sites and tools
+ pullboard ledger markdown: what was built, by whom, verified by whom
+ pullboard log [id] every move, in order
+
+ Spec
+ pullboard spec --json parsed SPEC.md and doctrine rows as JSON
+ pullboard forget <path> remove a repo from this machine's project list
+ pullboard spec check lint SPEC.md and the doctrine (house rules for agentic development)
+ pullboard spec view [--out file] the spec, open questions, sign-offs and doctrine as one page
+ pullboard spec show <id> | unmet [--must] | signoff <ids> [--by <principal>]
+ signoff: --note "what was checked" stays with the receipt
+ pullboard spec signers add [--key <path>] [--by <principal>] opt into SSH-signed sign-offs
+ principal defaults to Git user.email; --by overrides it
+ pullboard spec approve <ids> | decline <ids> --reason "why" the person's exact-row decision
+ approve <id> --text "new wording" approves an exact rewrite
+ pullboard spec apply coordinator applies recorded row decisions to the files
+
+ Role guides
+ pullboard prompt decompose|plan|signoff|review|verify how to do each role; Claude Code gets them as skills
+
+ Gate and hooks
+ pullboard gate [--landing] run the configured gate; prioritize a trunk landing in the machine queue
+ pullboard hook pre-commit|pre-merge-commit|commit-msg|pre-push git runs these
+
+ ${lifecycleHelp()}
+
+ Reject reasons: TEST_FAILURE, BEHAVIOR_MISMATCH, INSUFFICIENT_EVIDENCE, STALE_HEAD, OTHER.
+ --json prints one versioned document for every command; refusals include their code and next step.`;
+
+ const HELP_NAMES = [
+ 'tour', 'init', 'worktree', 'join', 'takeover', 'whoami', 'lanes', 'status', 'resources', 'settings', 'view', 'view export',
+ 'serve', 'relay', 'relay recover', 'resume', 'hooks', 'add', 'edit', 'escalate', 'run', 'list', 'doctor', 'skills', 'show', 'next',
+ 'check', 'claim', 'release', 'submit', 'done', 'verify', 'fact', 'shout', 'answer', 'pass', 'decisions', 'inbox', 'export', 'import',
+ 'sweep', 'merged', 'withdraw', 'refreeze', 'reopen', 'hold', 'stats', 'ledger', 'log', 'spec', 'spec check', 'spec view',
+ 'spec show', 'spec unmet', 'spec signoff', 'spec signers', 'spec signers add', 'forget', 'prompt', 'gate', 'hook',
+ 'hook pre-commit', 'hook pre-merge-commit', 'hook commit-msg', 'hook pre-push', 'view export', 'version', 'lifecycle', 'help',
+ 'roadmap', 'milestone',
+ ];
+
+ const HELP_GROUPS = [
+ ['Start', ['tour', 'init', 'worktree']],
+ ['Work', ['add', 'list', 'claim']],
+ ['Review', ['submit', 'next', 'verify']],
+ ['See', ['status', 'view', 'log']],
+ ];
+
+ const HELP_EXAMPLES = {
+ tour: 'pullboard tour', init: 'pullboard init', worktree: 'pullboard worktree web', resume: 'pullboard resume',
+ add: 'pullboard add web "Upload page" --specs G1', list: 'pullboard list web', show: 'pullboard show 12',
+ claim: 'pullboard claim 12', submit: 'pullboard submit 12', 'next --verify': 'pullboard next --verify',
+ fact: 'pullboard fact 12 measurement "The check passes in 8 seconds"',
+ verify: 'pullboard verify 12 accept --note "removed the fix; the test failed"',
+ answer: 'pullboard answer 12 "done"', pass: 'pullboard pass 12 "please decide"',
+ status: 'pullboard status', view: 'pullboard view', stats: 'pullboard stats --since 2026-10-08', log: 'pullboard log 12', ledger: 'pullboard ledger',
+ roadmap: 'pullboard roadmap', milestone: 'pullboard milestone add "0.7.0" --items 12,13',
+ edit: 'pullboard edit 12 --brief "Add the upload page"', release: 'pullboard release 12',
+ reopen: 'pullboard reopen 12 --note "correct the frozen criterion"',
+ escalate: 'pullboard escalate 12 --note "needs a manual step"', next: 'pullboard next',
+ run: 'pullboard run --agent "node agent.js"', 'view export': 'pullboard view --export ./site',
+ 'spec check': 'pullboard spec check',
+ 'spec view': 'pullboard spec view', 'spec show': 'pullboard spec show G1',
+ 'spec unmet': 'pullboard spec unmet', 'spec signoff': 'pullboard spec signoff G1',
+ 'spec signers add': 'pullboard spec signers add', help: 'pullboard help claim', version: 'pullboard --version',
+ };
+
+ const HELP_ALIASES = {
+ whoami: { usage: 'pullboard whoami', source: 'whoami' },
+ lanes: { usage: 'pullboard lanes', source: 'whoami' },
+ status: { usage: 'pullboard status', source: 'whoami' },
+ done: { usage: 'pullboard done <id>', source: 'submit <id>' },
+ inbox: { usage: 'pullboard inbox', source: null },
+ lifecycle: { usage: 'pullboard lifecycle', source: null },
+ escalate: { usage: 'pullboard escalate <id> --note "..." [--note-file <file>]', source: 'escalate <id> --note "what was tried and how it failed"', extraFlags: ['--note-file <file>'] },
+ 'view export': { usage: 'pullboard view --export <dir>', source: 'view' },
+ 'spec check': { usage: 'pullboard spec check', source: 'spec check' },
+ 'spec view': { usage: 'pullboard spec view [--out file]', source: 'spec view' },
+ 'spec show': { usage: 'pullboard spec show <id>', source: 'spec show', onlyFlags: [] },
+ 'spec unmet': { usage: 'pullboard spec unmet [--must]', source: 'spec show', onlyFlags: ['--must'] },
+ 'spec signoff': { usage: 'pullboard spec signoff <ids> [--by <principal>] [--note "..."] [--note-file <file>]', source: 'spec show', onlyFlags: ['--by', '--note', '--note-file'], extraFlags: ['--note-file <file>'] },
+ 'spec signers': { usage: 'pullboard spec signers add [--key <path>] [--by <principal>]', source: 'spec signers add' },
+ 'spec signers add': { usage: 'pullboard spec signers add [--key <path>] [--by <principal>]', source: 'spec signers add' },
+ hook: { usage: 'pullboard hook pre-commit|pre-merge-commit|commit-msg|pre-push', source: 'hook' },
+ 'hook pre-commit': { usage: 'pullboard hook pre-commit', source: 'hook' },
+ 'hook pre-merge-commit': { usage: 'pullboard hook pre-merge-commit', source: 'hook' },
+ 'hook commit-msg': { usage: 'pullboard hook commit-msg <file>', source: 'hook' },
+ 'hook pre-push': { usage: 'pullboard hook pre-push', source: 'hook' },
+ };
+
+ const HELP_FLAG_EXPLANATIONS = {
+ '--after': 'claiming waits until those items are verified',
+ '--brief': 'what a cold agent needs',
+ '--check': 'the command that proves it',
+ '--family': 'records the family name',
++ '--model': 'identifies the agent model; required unless PULLBOARD_MODEL is set',
+ '--landing': 'prioritizes a trunk landing in the machine gate queue',
+ '--json': 'prints one versioned document',
+ '--note': 'what was checked stays with the receipt',
+ '--note-file': 'keeps quotes, $ and backticks intact',
+ '--route': 'sets which work the model can take',
+ };
+
+ /** Build command-specific help rows from the preserved full list so its syntax stays authoritative. */
+ function commandHelpRows(fullHelp) {
+ const lines = fullHelp.split('\n');
+ const rows = [];
+ for (let index = 0; index < lines.length; index += 1) {
+ if (!lines[index].startsWith(' pullboard ')) continue;
+ const details = [lines[index].trim()];
+ for (let next = index + 1; next < lines.length && lines[next].startsWith(' ') && lines[next].trim() && !lines[next].startsWith(' pullboard '); next += 1) details.push(lines[next].trim());
+ rows.push({ usage: lines[index].trim().slice('pullboard '.length).split(/\s{2,}/, 1)[0].trim(), details });
+ }
+ return Object.fromEntries(HELP_NAMES.map((name) => {
+ const parts = name.split(' ');
+ const alias = HELP_ALIASES[name];
+ const matches = alias?.source ? rows.filter((row) => row.usage === alias.source || row.usage.startsWith(`${alias.source} `)) : alias ? [] : rows.filter((row) => {
+ const tokens = row.usage.split(/\s+/u);
+ if (!parts.every((part, index) => tokens[index] === part)) return false;
+ const next = tokens[parts.length];
+ return !next || next.startsWith('--') || next.startsWith('<') || next.startsWith('[') || next === '|';
+ });
+ const usages = alias ? [alias.usage] : matches.length ? [...new Set(matches.map((row) => `pullboard ${row.usage}`))] : [`pullboard ${name}`];
+ const foundFlags = [...matches.flatMap((row) => row.details.flatMap((line) => line.match(/--[a-z][a-z-]*(?:\s+(?:<[^>]+>|"[^"]*"|\[[^\]]+\]|[A-Za-z][A-Za-z0-9|_-]*))?/gu) ?? [])), ...(alias?.extraFlags ?? []), '--json', '--help', ...(name === 'help' ? ['--all'] : [])];
+ const flagMap = new Map();
+ for (const flag of foundFlags) {
+ const key = flag.split(/\s/u, 1)[0];
+ if (alias?.onlyFlags && !alias.onlyFlags.includes(key) && !['--json', '--help'].includes(key)) continue;
+ if (!flagMap.has(key) || flagMap.get(key).length < flag.length) flagMap.set(key, flag);
+ }
+ const flags = [...flagMap.values()].map((flag) => {
+ const explanation = HELP_FLAG_EXPLANATIONS[flag.split(/\s/u, 1)[0]];
+ return explanation ? `${flag} — ${explanation}` : flag;
+ });
+ const example = exampleFor(name, usages[0]);
+ return [name, Object.freeze({ usages, flags, example })];
+ }));
+ }
+
+ /** Render the short first-run overview, with command names grouped by when a person needs them. */
+ function overviewHelp(groups, firstRun = false) {
+ const pointer = 'New here? pullboard tour, then pullboard init.';
+ const description = 'Pullboard is a local-first work board for coding agents; nothing ships until a second agent verifies it.';
+ const lines = [
+ ...(firstRun ? [pointer, description] : [description, pointer]),
+ '',
+ ];
+ for (const [group, names] of groups) lines.push(group, ...names.map((name) => ` pullboard ${name}`));
+ lines.push('', 'More: pullboard help <command>; pullboard help --all for the full list.');
+ return lines.join('\n');
+ }
+
+ /** The one help declaration feeds the overview, command detail, JSON result and unchanged full list. */
+ export const HELP = Object.freeze({
+ overview: overviewHelp(HELP_GROUPS),
+ firstRun: overviewHelp(HELP_GROUPS, true),
+ all: ALL_HELP,
+ groups: HELP_GROUPS,
+ commands: Object.freeze(commandHelpRows(ALL_HELP)),
+ });
+
+ /** Replace help placeholders with ordinary values so every command receives a usable example. */
+ function exampleFor(name, usage) {
+ if (HELP_EXAMPLES[name]) return HELP_EXAMPLES[name];
+ return usage.split(/\s+\|\s+|\|/u, 1)[0]
+ .replace(/\s+\[[^\]]+\]/gu, '')
+ .replace(/<lane>/gu, 'web')
+ .replace(/<title>/gu, '"Example"')
+ .replace(/<id>/gu, '12')
+ .replace(/<file>/gu, 'board.json')
+ .replace(/<path>/gu, 'src/cli.js')
+ .replace(/<commit>/gu, '0123456')
+ .replace(/<principal>/gu, '[email protected]')
+ .replace(/<[^>]+>/gu, 'value');
+ }
+
+ /** Read literal command words before an argument, flag or optional segment. */
+ function commandWords(usage) {
+ const words = [];
+ for (const word of usage.trim().split(/\s+/u)) {
+ if (!/^[a-z][a-z0-9-]*(?:\|[a-z][a-z0-9-]*)*$/u.test(word)) break;
+ words.push(word);
+ }
+ return words;
+ }
+
+ /** Expand literal alternatives in a command phrase without including argument values. */
+ function expandWords(words) {
+ let phrases = [''];
+ for (const word of words) phrases = phrases.flatMap(prefix => word.split('|').map(choice => (prefix + ' ' + choice).trim()));
+ return phrases.filter(Boolean);
+ }
+
+ /** Read one printed usage, including sibling commands and optional literal subcommands. */
+ function usagePhrases(usage) {
+ const row = usage.replace(/^pullboard\s+/u, '').split(/\s{2,}/u, 1)[0];
+ const branches = row.split(/\s+\|\s+/u);
+ const first = commandWords(branches[0]);
+ const shared = branches.length > 1 ? first.slice(0, -1) : [];
+ const phrases = [];
+ for (const [index, branch] of branches.entries()) {
+ const inherited = index && !/^pullboard\s/u.test(branch) ? shared : [];
+ const command = branch.replace(/^pullboard\s+/u, '');
+ const words = [...inherited, ...commandWords(command)];
+ phrases.push(...expandWords(words));
+ const optional = command.match(/^(.*?)\[([^\]]+)\]/u);
+ if (optional && optional[2].includes('|') && !optional[2].trim().startsWith('-')) {
+ const prefix = [...inherited, ...commandWords(optional[1])];
+ for (const choice of optional[2].split('|')) phrases.push(...expandWords([...prefix, ...commandWords(choice)]));
+ }
+ }
+ return phrases;
+ }
+
+ /** Derive every printed command phrase and declared alias, with longer phrases before prefixes. */
+ export function commandPhrases(help = HELP) {
+ const phrases = new Set();
+ for (const line of help.all.split('\n')) {
+ if (line.startsWith(' pullboard ')) for (const phrase of usagePhrases(line.trim())) phrases.add(phrase);
+ }
+ for (const [name, declaration] of Object.entries(help.commands)) {
+ if (/^[a-z][a-z0-9-]*(?: [a-z][a-z0-9-]*)*$/u.test(name)) phrases.add(name);
+ for (const usage of declaration.usages) for (const phrase of usagePhrases(usage)) phrases.add(phrase);
+ }
+ return [...phrases].sort((left, right) => right.length - left.length || left.localeCompare(right));
+ }
diff --cc test/e2e-cli.test.js
index 4034489d,a567725e..9a09acaa
--- a/test/e2e-cli.test.js
+++ b/test/e2e-cli.test.js
@@@ -266,7 -268,8 +268,8 @@@ test('check runs the item\'s own check
assert.equal(green.code, 0, green.out);
assert.match(green.out, /^check green in \d+s: test -f web\/a.html/m);
assert.equal(green.out.split('\n').filter(Boolean).length, 2);
+ assert.match(green.out, /timing \(test\): wall [0-9.]+s, slot wait [0-9.]+s; per-test timing unavailable: output was not TAP or JUnit; timing profile: /);
- assert.match(green.out, /^check #1 set by coordinator:/);
+ assert.match(green.out, /^check #1 set by coordinator \(unknown\):/);
assert.equal(box.run(box.repo, 'check', '1').code, 1, 'named, from another checkout: there the file is missing');
assert.match(box.run(box.web, 'check', '2').err, /NO_CHECK.*#2 has no check command/);
assert.match(box.run(box.repo, 'help', '--all').out, /pullboard check \[id\]/);
diff --cc test/e2e-model-names.test.js
index 5c5c042d,00000000..2206b0d4
mode 100644,000000..100644
--- a/test/e2e-model-names.test.js
+++ b/test/e2e-model-names.test.js
@@@ -1,191 -1,0 +1,199 @@@
+/** CLI model labels, stable agent identities, and model-free scripted tours [O8,O3,N10]. */
+import assert from 'node:assert/strict';
+import { spawnSync } from 'node:child_process';
+import { existsSync, readFileSync, writeFileSync } from 'node:fs';
+import { join } from 'node:path';
+import { after, test } from 'node:test';
+import * as store from '../src/board.js';
+import { createE2eHelpers } from './e2e-helpers.js';
+import { runFixtureChild } from './fixture-child.js';
+
+const e2e = createE2eHelpers();
+after(e2e.cleanup);
+const { BIN, sandbox, project } = e2e;
+
+test('model names label CLI actors without changing IDs, messages, or the context prompt [O8,O3]', () => {
+ for (const style of ['suffix', 'prefix']) {
+ const box = sandbox();
+ box.env.PULLBOARD_MODEL = 'Test Model';
+ const repo = project('true', box);
+ const legacyJoin = box.run(repo.web, 'whoami', '--json');
+ assert.equal(legacyJoin.code, 0, legacyJoin.err || legacyJoin.out);
+ assert.equal(JSON.parse(legacyJoin.out).model, 'Test Model', 'the model environment identifies the initial join');
+
++ if (style === 'suffix') {
++ for (const command of ['join', 'worktree']) {
++ const help = box.run(repo.repo, 'help', command);
++ assert.equal(help.code, 0, help.err);
++ assert.ok(help.out.includes(`Usage: pullboard ${command} <lane> --model <name>`), help.out);
++ assert.match(help.out, /--model <name> — identifies the agent model; required unless PULLBOARD_MODEL is set/);
++ }
++ }
+ delete box.env.PULLBOARD_MODEL;
+ const missingWorktree = box.run(repo.repo, 'worktree', 'api', '--json');
+ assert.equal(missingWorktree.code, 1);
+ assert.equal(JSON.parse(missingWorktree.out).error.code, 'MODEL_REQUIRED');
+ assert.equal(existsSync(join(box.dir, 'repo-api-1')), false, 'a refused worktree leaves no folder');
+
+ const unjoined = join(box.dir, 'unjoined-web');
+ box.git(repo.repo, 'worktree', 'add', '-q', '-b', 'web/unjoined', unjoined);
+ const missingJoin = box.run(unjoined, 'join', 'web', '--json');
+ assert.equal(missingJoin.code, 1);
+ assert.equal(JSON.parse(missingJoin.out).error.code, 'MODEL_REQUIRED');
+
+ const configFile = join(repo.repo, 'pullboard.json');
+ const config = JSON.parse(readFileSync(configFile, 'utf8'));
+ config.agents = { names: style };
+ writeFileSync(configFile, `${JSON.stringify(config, null, 2)}\n`);
+ box.git(repo.repo, 'add', 'pullboard.json');
+ box.git(repo.repo, 'commit', '-q', '-m', 'chore(repo): choose agent names [G1]');
+ box.git(repo.web, 'merge', '-q', '--ff-only', 'main');
+
+ const joined = box.run(repo.web, 'join', 'web', '--model', 'Claude', '--json');
+ assert.equal(joined.code, 0, joined.err || joined.out);
+ assert.equal(JSON.parse(joined.out).agent, 'web-1');
+ const made = box.run(repo.repo, 'worktree', 'web', '--model', 'GPT 6', '--json');
+ assert.equal(made.code, 0, made.err || made.out);
+ const second = JSON.parse(made.out);
+ assert.equal(second.agent, 'web-2');
+
+ const builderName = style === 'suffix' ? 'web-1 (Claude)' : 'claude-web-1';
+ const otherName = style === 'suffix' ? 'web-2 (GPT 6)' : 'gpt-6-web-2';
+ const coordinatorName = style === 'suffix' ? 'coordinator (unknown)' : 'unknown-coordinator';
+ assert.ok(second.prompt.includes(`You are ${otherName}, in the web lane.`), second.prompt);
+ assert.ok(second.prompt.includes("Model: 'GPT 6'. This worktree joined with --model 'GPT 6'."), second.prompt);
+ assert.ok(second.prompt.includes("pass --model 'GPT 6' or set PULLBOARD_MODEL='GPT 6'"), second.prompt);
+
+ const wrongLane = box.run(repo.web, 'join', 'api', '--model', 'Claude');
+ assert.equal(wrongLane.code, 1);
+ assert.ok(wrongLane.err.includes(`this worktree is ${builderName} in the web lane`), wrongLane.err);
+
+ const selfShout = box.run(repo.web, 'shout', 'web-1', 'Keep web-1 literal');
+ assert.equal(selfShout.code, 1);
+ assert.ok(selfShout.err.includes(`sender ${builderName};`), selfShout.err);
+ const missingReader = box.run(repo.web, 'shout', 'web-99', 'Keep web-1 literal');
+ assert.equal(missingReader.code, 1);
+ assert.ok(missingReader.err.includes(style === 'suffix' ? '"web-99 (unknown)"' : '"unknown-web-99"'), missingReader.err);
+
+ const added = box.run(repo.repo, 'add', 'web', 'Model receipt', '--specs', 'G1', '--check', 'true', '--json');
+ assert.equal(added.code, 0, added.err || added.out);
+ const id = JSON.parse(added.out).item.item_id;
+ const claimed = box.run(repo.web, 'claim', String(id));
+ assert.equal(claimed.code, 0, claimed.err || claimed.out);
+ const held = box.run(second.path, 'claim', String(id));
+ assert.equal(held.code, 1);
+ assert.ok(held.err.includes(`held by ${builderName} until`), held.err);
+ const structuredHeld = box.run(second.path, 'claim', String(id), '--json');
+ assert.equal(JSON.parse(structuredHeld.out).error.code, 'HELD');
+ assert.match(JSON.parse(structuredHeld.out).error.message, /held by web-1 until/);
+
+ const check = box.run(repo.repo, 'check', String(id), '--yes', '--json');
+ assert.equal(check.code, 0, check.err || check.out);
+ assert.equal(JSON.parse(check.out).by, 'coordinator', 'the structured receipt keeps the stable actor ID');
+ assert.ok(check.err.includes(`set by ${coordinatorName}: true`), check.err);
+ const declinedCheck = spawnSync(process.execPath, [BIN, 'check', String(id)], {
+ cwd: second.path, env: box.env, encoding: 'utf8', input: 'n\n',
+ });
+ assert.equal(declinedCheck.status, 1);
+ assert.ok(declinedCheck.stderr.includes(`the check set by ${coordinatorName} was not run`), declinedCheck.stderr);
+
+ const asked = box.run(repo.repo, 'shout', 'web-1', 'Keep web-1 literal', '--decision', '--json');
+ assert.equal(asked.code, 0, asked.err || asked.out);
+ const ask = JSON.parse(asked.out).id;
+ const wrongAnswer = box.run(second.path, 'answer', String(ask), 'wrong agent');
+ assert.equal(wrongAnswer.code, 1);
+ assert.ok(wrongAnswer.err.includes(`addressed to ${builderName}, not your web lane (agent ${otherName})`), wrongAnswer.err);
+
+ assert.equal(box.run(repo.repo, 'hold', 'web', '--reason', 'Keep web-1 literal in the reason').code, 0);
+ const waiting = box.run(second.path, 'next', '--build');
+ assert.equal(waiting.code, 1);
+ assert.ok(waiting.err.includes(`${coordinatorName} holds the web lane: Keep web-1 literal in the reason`), waiting.err);
+ assert.equal(box.run(repo.repo, 'hold', 'web', '--off').code, 0);
+
+ const identity = box.run(repo.web, 'whoami', '--json');
+ assert.equal(identity.code, 0, identity.err || identity.out);
+ assert.equal(JSON.parse(identity.out).id, 'web-1');
+ assert.equal(JSON.parse(identity.out).displayName, builderName);
+ const log = box.run(repo.repo, 'log', '--json');
+ assert.equal(log.code, 0, log.err || log.out);
+ const claim = JSON.parse(log.out).events.find((event) => event.event_kind === 'claim' && event.item_id === id);
+ assert.equal(claim.event_by, 'web-1', 'event attribution stays the stable agent ID');
+ assert.equal(JSON.parse(claim.event_detail).model, 'Claude');
+
+ const statsText = box.run(repo.web, 'stats');
+ assert.equal(statsText.code, 0, statsText.err || statsText.out);
+ assert.ok(statsText.out.includes(`${builderName} (`), statsText.out);
+ const statsJson = box.run(repo.web, 'stats', '--json');
+ assert.ok(JSON.parse(statsJson.out).stats.agents.some((agent) => agent.id === 'web-1'));
+ const takeover = runFixtureChild(process.execPath, [BIN, 'takeover'], {
+ cwd: second.path, env: { ...box.env, CODEX_THREAD_ID: 'model-label-takeover-fixture' }, encoding: 'utf8',
+ });
+ assert.equal(takeover.status, 0, `${takeover.stdout}${takeover.stderr}`);
+ assert.ok(takeover.stdout.includes(`${otherName} took over`), takeover.stdout);
+ const displaced = runFixtureChild(process.execPath, [BIN, 'shout', 'coordinator', 'Refused session'], {
+ cwd: second.path, env: { ...box.env, CODEX_THREAD_ID: 'different-model-session-fixture' }, encoding: 'utf8',
+ });
+ assert.equal(displaced.status, 1);
+ assert.ok(displaced.stderr.includes(`belongs to ${otherName} in another agent session`), displaced.stderr);
+ const judgement = box.run(second.path, 'fact', String(id), 'decision', 'Wrong actor judgement');
+ assert.equal(judgement.code, 1);
+ assert.ok(judgement.err.includes(`live holder (${builderName})`), judgement.err);
+ const thread = box.run(repo.web, 'show', String(id));
+ assert.equal(thread.code, 0, thread.err || thread.out);
+ assert.ok(thread.out.includes(` ${builderName} claim`), thread.out);
+ const decision = box.run(repo.web, 'shout', 'coordinator', 'Keep web-1 literal in question', '--decision');
+ assert.equal(decision.code, 0, decision.err || decision.out);
+ const resume = box.run(repo.repo, 'resume');
+ assert.equal(resume.code, 0, resume.err || resume.out);
+ assert.ok(resume.out.includes(`from ${builderName} (`), resume.out);
+ assert.ok(resume.out.includes('Keep web-1 literal in question'), resume.out);
+
+ assert.equal(box.run(repo.web, 'release', String(id)).code, 0);
+ assert.equal(box.run(repo.repo, 'hold', String(id), 'Keep web-1 literal in item reason').code, 0);
+ for (const command of [['list', 'web'], ['show', String(id)]]) {
+ const heldText = box.run(repo.web, ...command);
+ assert.equal(heldText.code, 0, heldText.err || heldText.out);
+ assert.ok(heldText.out.includes(`held by ${coordinatorName}: Keep web-1 literal in item reason`), heldText.out);
+ }
+ const itemClaim = box.run(second.path, 'claim', String(id));
+ assert.equal(itemClaim.code, 1);
+ assert.ok(itemClaim.err.includes(`held by ${coordinatorName}: Keep web-1 literal in item reason`), itemClaim.err);
+ const noFree = box.run(second.path, 'next', '--build');
+ assert.equal(noFree.code, 1);
+ assert.ok(noFree.err.includes(`#${id} is held by ${coordinatorName}: Keep web-1 literal in item reason`), noFree.err);
+ const noFreeJson = box.run(second.path, 'next', '--build', '--json');
+ assert.ok(JSON.parse(noFreeJson.out).error.message.includes(`#${id} is held by coordinator: Keep web-1 literal in item reason`));
+ const available = box.run(repo.repo, 'add', 'web', 'Other model receipt', '--specs', 'G1', '--json');
+ assert.equal(available.code, 0, available.err || available.out);
+ const selected = box.run(second.path, 'next', '--build');
+ assert.equal(selected.code, 0, selected.err || selected.out);
+ assert.ok(selected.out.includes(`#${id} is held by ${coordinatorName}: Keep web-1 literal in item reason`), selected.out);
+ const freeId = JSON.parse(available.out).item.item_id;
+ assert.equal(box.run(second.path, 'release', String(freeId)).code, 0);
+ const selectedJson = box.run(second.path, 'next', '--build', '--json');
+ assert.ok(JSON.parse(selectedJson.out).reasons.includes(`#${id} is held by coordinator: Keep web-1 literal in item reason`));
+
+ const board = store.openBoard(join(repo.repo, '.git', 'pullboard', 'board.sqlite'));
+ try { board.db.prepare('DELETE FROM board_meta WHERE meta_key = ?').run('agent_model:web-2'); }
+ finally { store.closeBoard(board); }
+ const legacy = box.run(second.path, 'whoami', '--json');
+ assert.equal(legacy.code, 0, legacy.err || legacy.out);
+ assert.equal(JSON.parse(legacy.out).id, 'web-2');
+ assert.equal(JSON.parse(legacy.out).displayName, style === 'suffix' ? 'web-2 (unknown)' : 'unknown-web-2');
+ }
+});
+
+test('the scripted tour names its model without PULLBOARD_MODEL [N10,O8]', () => {
+ const box = sandbox();
+ const env = { ...box.env, TMPDIR: box.dir };
+ delete env.PULLBOARD_MODEL;
+ delete env.NO_COLOR;
+ delete env.FORCE_COLOR;
+ const startedAt = Date.now();
+ const result = runFixtureChild(process.execPath, [BIN, 'tour'], { cwd: box.dir, env, encoding: 'utf8' });
+ assert.equal(result.status, 0, `${result.stdout}${result.stderr}`);
+ assert.ok(Date.now() - startedAt < 30_000, 'the tour remains a short scripted example');
+ assert.match(result.stdout, /app-1 \(Scripted\) \$ pullboard next/);
+ assert.match(result.stdout, /sent back: #1 BEHAVIOR_MISMATCH by review-1 \(Scripted\):/);
+ assert.match(result.stdout, /\| 1 \| app \| Greeting \| G1 \| app-1 \(Scripted\) \| review-1 \(Scripted\) \|/);
+});