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.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
feat(cli): add layered command help [N37,I1]
Corey Olsonb3df4b0f81db
diff --git a/src/cli.js b/src/cli.jsindex 7e37c1cf..66bdd1d9 100644--- a/src/cli.js+++ b/src/cli.js@@ -58,7 +58,7 @@ import { relayLinked, relayOff, relayOn, relayOperation, relayStatus, syncRelayconst PACKAGE = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));export const VERSION = PACKAGE.version;-export const HELP = `pullboard ${VERSION}: the local-first work board for teams of coding agents.+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@@ -154,6 +154,209 @@ ${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', 'whoami', 'lanes', 'status', 'resources', 'settings', 'view', 'view export',+ 'serve', 'relay', 'resume', 'hooks', 'add', 'edit', 'escalate', 'run', 'list', 'doctor', 'show', 'next',+ 'check', 'claim', 'release', 'submit', 'done', 'verify', 'shout', 'answer', 'pass', 'decisions', 'inbox', 'export', 'import',+ 'sweep', 'merged', 'withdraw', 'refreeze', 'hold', '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 commit-msg', 'hook pre-push', 'view export', 'version', 'lifecycle', 'help',+];++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',+ 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', log: 'pullboard log 12', ledger: 'pullboard ledger',+ edit: 'pullboard edit 12 --brief "Add the upload page"', release: 'pullboard release 12',+ 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|commit-msg|pre-push', source: 'hook' },+ 'hook pre-commit': { usage: 'pullboard hook pre-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',+ '--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)),+});++/** Find the nearest declared command for a useful typo hint. */+function closestHelpCommand(input) {+ const needle = input.toLowerCase();+ /** Measure edit distance between two command names for a useful typo hint. */+ const distance = (left, right) => {+ let row = Array.from({ length: right.length + 1 }, (_, index) => index);+ for (let i = 1; i <= left.length; i += 1) {+ const next = [i];+ for (let j = 1; j <= right.length; j += 1) {+ next[j] = Math.min(next[j - 1] + 1, row[j] + 1, row[j - 1] + (left[i - 1] === right[j - 1] ? 0 : 1));+ }+ row = next;+ }+ return row.at(-1);+ };+ return Object.keys(HELP.commands).sort((a, b) => distance(needle, a) - distance(needle, b) || a.localeCompare(b))[0];+}++/** Render one command's usage, one-line flags and a pasteable example from the help declaration. */+function commandHelp(name) {+ const entry = HELP.commands[name];+ if (!entry) return null;+ return [+ `Usage: ${entry.usages[0]}`,+ ...entry.usages.slice(1).map((usage) => ` ${usage}`),+ 'Flags:',+ ...(entry.flags.length ? entry.flags.map((flag) => ` ${flag}`) : [' none']),+ 'Example:',+ ` ${entry.example}`,+ ].join('\n');+}++/** 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');+}++/** Write a selected help view in text and the stable help:string JSON field. */+function printHelp(io, text) {+ io.result?.({ help: text });+ io.say(text);+ return 0;+}++/** Refuse an unknown command with its nearest declared spelling and a route to the full list. */+function unknownCommand(io, input) {+ const closest = closestHelpCommand(input);+ io.err(`pullboard: no command "${input}"; closest match is "${closest}". Run pullboard help --all for the full list.`);+ return 2;+}++/** Resolve overview, command detail or the preserved full list from one invocation. */+function selectedHelp(command, first, second, rest, values) {+ if (command === 'help') {+ if (values.all) return { text: HELP.all };+ const requested = [first, second, ...rest].filter(Boolean).join(' ');+ if (!requested || values.help && !first) return { text: HELP.overview };+ return { name: requested, text: commandHelp(requested) };+ }+ if (values.all && (!command || command === 'help')) return { text: HELP.all };+ if (!command) return { text: HELP.firstRun };+ if (values.help) {+ const words = [command, first, second, ...rest].filter(Boolean);+ const candidates = words.map((_, index) => words.slice(0, index + 1).join(' ')).filter((name) => HELP.commands[name]);+ const nested = candidates.at(-1) ?? command;+ return { name: nested, text: commandHelp(nested) };+ }+ return null;+}+const OPTIONS = {criterion: { type: 'string' },specs: { type: 'string' },@@ -1781,21 +1984,21 @@ async function runCommand(argv, io) {parsed = parseArgs({ args: argv, options: OPTIONS, allowPositionals: true });} catch (error) {io.refusal?.(new Refused('USAGE', `${error.message}; run pullboard help`));- io.err(`pullboard: ${error.message}\n\n${HELP}`);+ io.err(`pullboard: ${error.message}\nRun pullboard help --all for the full list.`);return 2;}const { values, positionals } = parsed;io.jsonMode?.(values.json);const [command = '', first, second, ...rest] = positionals;- if (values.version || command === 'version') {+ if ((values.version || command === 'version') && !values.help) {io.result?.({ release: VERSION });io.say(VERSION);return 0;}- if (values.help || !command || command === 'help') {- io.result?.({ help: HELP });- io.say(HELP);- return 0;+ const help = selectedHelp(command, first, second, rest, values);+ if (help) {+ if (help.text) return printHelp(io, help.text);+ return unknownCommand(io, help.name);}const args = { first, second, rest, values };try {@@ -1852,10 +2055,7 @@ async function runCommand(argv, io) {}const commands = { ...setupCommands(io, args), ...readCommands(io, args), ...workCommands(io, args) };const run = commands[command];- if (!run) {- io.err(`pullboard: no command "${command}"\n\n${HELP}`);- return 2;- }+ if (!run) return unknownCommand(io, command);return await run();} catch (error) {if (error instanceof Refused) {diff --git a/test/api.test.js b/test/api.test.jsindex 2024de3f..9f63b321 100644--- a/test/api.test.js+++ b/test/api.test.js@@ -459,6 +459,17 @@ test('[A1] refusals are one JSON document with exact public error fields', () =>assert.match(unknownDocument.error.message, /Unknown option '--not-a-real-flag'/);assert.equal(unknownDocument.error.next, 'run pullboard help');+ const unknownCommand = box.run(repo, 'cliam', '--json');+ assert.equal(unknownCommand.status, 2);+ assert.equal(unknownCommand.stderr, '');+ const unknownCommandDocument = JSON.parse(unknownCommand.stdout);+ assert.equal(unknownCommandDocument.version, 1);+ assertRequiredShape(unknownCommandDocument, JSON_SHAPES.error.required, 'error envelope');+ assertRequiredShape(unknownCommandDocument.error, JSON_SHAPES.errorFields, 'error');+ assert.equal(unknownCommandDocument.error.code, 'USAGE');+ assert.match(unknownCommandDocument.error.message, /no command "cliam"; closest match is "claim"/);+ assert.match(unknownCommandDocument.error.next, /pullboard help --all/);+const valid = readFileSync(join(repo, 'SPEC.md'), 'utf8');writeFileSync(join(repo, 'SPEC.md'), `${valid}\n- G2 [maybe, must] Bad status.\n`);const textCheck = box.run(repo, 'spec', 'check');diff --git a/test/cli-help.test.js b/test/cli-help.test.jsnew file mode 100644index 00000000..09665e7d--- /dev/null+++ b/test/cli-help.test.js@@ -0,0 +1,113 @@+/** The layered CLI help stays short, command-specific, and in parity with its declaration [N37,I1]. */+import assert from 'node:assert/strict';+import { mkdtempSync, rmSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join, resolve } from 'node:path';+import { spawnSync } from 'node:child_process';+import { after, test } from 'node:test';+import { HELP, resultCommands } from '../src/cli.js';++const BIN = resolve(import.meta.dirname, '../bin/pullboard.js');+const sandboxes = [];++after(() => {+ for (const folder of sandboxes) rmSync(folder, { recursive: true, force: true });+});++/** Run the real CLI in a temporary directory so help needs no initialized board. */+function run(...args) {+ const folder = mkdtempSync(join(tmpdir(), 'pullboard-help-'));+ sandboxes.push(folder);+ return spawnSync(process.execPath, [BIN, ...args], { cwd: folder, encoding: 'utf8' });+}++/** Read the flag rows between their heading and the example from one command's help. */+function flagsFrom(text) {+ const lines = text.split('\n');+ const start = lines.indexOf('Flags:');+ const end = lines.indexOf('Example:');+ return lines.slice(start + 1, end).map((line) => line.trim()).filter((line) => line !== 'none');+}++test('bare help is a short first-run overview generated from its command groups [N37,I1]', () => {+ const bare = run();+ const helpFlag = run('--help');+ const helpCommand = run('help');+ assert.equal(bare.status, 0, bare.stderr);+ assert.equal(bare.stdout, `${HELP.firstRun}\n`);+ assert.equal(helpFlag.stdout, bare.stdout);+ assert.equal(helpCommand.stdout, `${HELP.overview}\n`);+ const lines = bare.stdout.trimEnd().split('\n');+ assert.ok(lines.length <= 40, `${lines.length} lines`);+ assert.equal(lines[0], 'New here? pullboard tour, then pullboard init.');+ assert.match(lines[1], /^Pullboard is a local-first work board/);+ for (const [group, names] of HELP.groups) {+ assert.ok(lines.includes(group));+ for (const name of names) assert.ok(lines.includes(` pullboard ${name}`), `${group} includes ${name}`);+ }+ assert.equal(HELP.groups.reduce((total, [, names]) => total + names.length, 0), 12, 'the overview picks twelve commands');+ assert.ok(lines.at(-1).includes('pullboard help <command>') && lines.at(-1).includes('pullboard help --all'));+ assert.ok(lines.includes(' pullboard next'));+ const explicit = helpCommand.stdout.trimEnd().split('\n');+ assert.match(explicit[0], /^Pullboard is a local-first work board/);+ assert.notEqual(explicit[0], 'New here? pullboard tour, then pullboard init.');+ const jsonHelp = JSON.parse(run('--json', '--help').stdout).help;+ assert.equal(jsonHelp, HELP.firstRun);+ assert.ok(jsonHelp.includes('pullboard init') && jsonHelp.includes('pullboard next'));+ assert.equal(JSON.parse(run('--json').stdout).help, HELP.firstRun);+ assert.equal(JSON.parse(run('help', '--json').stdout).help, HELP.overview);+});++test('command help forms and flags match the declaration, with a full list only on --all [N37]', () => {+ for (const [name, declaration] of Object.entries(HELP.commands)) {+ const result = run('help', ...name.split(' '));+ assert.equal(result.status, 0, `${name}: ${result.stderr}`);+ assert.match(result.stdout, new RegExp(`^Usage: ${declaration.usages[0].replace(/[.*+?^${}()|[\]\\]/gu, '\\$&')}$`, 'm'));+ assert.deepEqual(flagsFrom(result.stdout), declaration.flags, `${name} flags`);+ assert.match(result.stdout, new RegExp(`^ ${declaration.example.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&')}$`, 'm'));+ }+ assert.equal(run('claim', '--help').stdout, run('help', 'claim').stdout);+ for (const name of resultCommands()) assert.ok(HELP.commands[name], `result command ${name} has a help declaration`);+ assert.deepEqual(HELP.commands.whoami.usages, ['pullboard whoami']);+ assert.deepEqual(HELP.commands.lanes.usages, ['pullboard lanes']);+ assert.deepEqual(HELP.commands.status.usages, ['pullboard status']);+ for (const name of ['whoami', 'lanes', 'status']) {+ const usages = run('help', name).stdout.match(/^Usage:.*$/gmu);+ assert.deepEqual(usages, [`Usage: pullboard ${name}`]);+ }+ const mustHaveFlags = [+ ['spec signoff', ['--note', '--note-file <file>']],+ ['verify', ['--reason TEST_FAILURE', '--note-file <file>']],+ ['escalate', ['--note-file <file>']],+ ['spec unmet', ['--must']],+ ];+ for (const [name, expected] of mustHaveFlags) {+ const text = run('help', ...name.split(' ')).stdout;+ for (const flag of expected) assert.ok(flagsFrom(text).some((line) => line.startsWith(flag)), `${name} documents ${flag}`);+ }+ for (const name of ['spec signoff', 'spec unmet']) {+ const flags = flagsFrom(run('help', ...name.split(' ')).stdout);+ assert.ok(flags.includes('--json — prints one versioned document'), `${name} keeps generic JSON help`);+ assert.ok(flags.includes('--help'), `${name} keeps generic help`);+ }+ const showSpecFlags = flagsFrom(run('help', 'spec', 'show').stdout);+ assert.ok(showSpecFlags.includes('--json — prints one versioned document'));+ assert.ok(showSpecFlags.includes('--help'));+ assert.ok(showSpecFlags.every((flag) => !['--must', '--by', '--note', '--note-file'].some((name) => flag.startsWith(name))), 'spec show excludes neighboring action flags');+ assert.ok(flagsFrom(run('help', 'spec signoff').stdout).some((flag) => flag.includes('keeps quotes, $ and backticks intact')));+ assert.ok(flagsFrom(run('help', 'spec unmet').stdout).every((flag) => !flag.startsWith('--no-items')));+ const all = run('help', '--all');+ assert.equal(all.status, 0, all.stderr);+ assert.equal(all.stdout, `${HELP.all}\n`);+ assert.match(all.stdout, /pullboard next --verify/);+});++test('an unknown command names its closest match and where to see every command [N37]', () => {+ const result = run('cliam');+ assert.equal(result.status, 2);+ assert.match(result.stderr, /no command "cliam"; closest match is "claim"/);+ assert.match(result.stderr, /pullboard help --all/);+ const help = run('help', 'cliam');+ assert.equal(help.status, 2);+ assert.match(help.stderr, /closest match is "claim"/);+});diff --git a/test/e2e.test.js b/test/e2e.test.jsindex a6593677..a2bbde55 100644--- a/test/e2e.test.js+++ b/test/e2e.test.js@@ -1369,7 +1369,7 @@ test('check runs the item\'s own check command, yours by default, and prints a dassert.equal(green.out.split('\n').filter(Boolean).length, 1);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').out, /pullboard check \[id\]/);+ assert.match(box.run(box.repo, 'help', '--all').out, /pullboard check \[id\]/);});test('submit leaves a dependency fast-forwarded in out of the files it records [N21]', () => {@@ -1409,12 +1409,12 @@ test('verify and escalate take a note from a file, exactly as written [V12]', ()box.run(light, 'claim', '2');assert.match(box.run(light, 'escalate', '2', '--note-file', join(box.dir, 'note.txt')).out, /#2 escalated light -> mid/);assert.match(box.run(box.repo, 'show', '2').out, /ran `npm test` with \$HOME unset: "it failed"/);- assert.match(box.run(box.repo, 'help').out, /--note-file <file>/);+ assert.match(box.run(box.repo, 'help', '--all').out, /--note-file <file>/);});test('the help keeps every command description apart from its usage [N37]', () => {const box = sandbox();- const help = box.run(box.dir, 'help').out;+ const help = box.run(box.dir, 'help', '--all').out;const commandLines = help.split('\n').filter((line) => line.startsWith(' pullboard '));for (const line of commandLines) {const hasDescriptionGap = / {2,}\S/.test(line.slice(' pullboard '.length));diff --git a/test/machine.test.js b/test/machine.test.jsindex cfb3d906..d0c6a455 100644--- a/test/machine.test.js+++ b/test/machine.test.js@@ -760,7 +760,7 @@ test('the page and the help follow the declaration: a new move appears in both [});test('pullboard help lists each role\'s moves from the declaration, and pullboard lifecycle prints the page [M1, P4]', () => {- const help = spawnSync(process.execPath, [BIN, 'help'], { encoding: 'utf8' });+ const help = spawnSync(process.execPath, [BIN, 'help', '--all'], { encoding: 'utf8' });assert.equal(help.status, 0, help.stderr);for (const role of MACHINE.roles) {const line = help.stdout.split('\n').find((text) => text.startsWith(` ${role} `));@@ -768,7 +768,7 @@ test('pullboard help lists each role\'s moves from the declaration, and pullboarconst listed = line.slice(role.length + 2).split(',').map((part) => part.trim().split(' ')[0]).filter(Boolean);assert.deepEqual(listed.sort(), MACHINE.moves.filter((move) => move.by.includes(role)).map((move) => move.verb).sort(), `${role}'s moves`);}- assert.ok(HELP.includes(lifecycleHelp()), 'the help screen carries the generated section, not a typed copy');+ assert.ok(HELP.all.includes(lifecycleHelp()), 'the full help screen carries the generated section, not a typed copy');const printed = spawnSync(process.execPath, [BIN, 'lifecycle'], { encoding: 'utf8' });assert.equal(printed.status, 0, printed.stderr);assert.equal(printed.stdout, lifecycleMarkdown());@@ -1139,8 +1139,8 @@ test('the lifecycle page and the help show the reservation: reserve, and reviewFassert.match(page, /^\| reserve \| submitted \| submitted \| agent, coordinator \| .*reviewFree \(REVIEW_HELD\) \|$/m);for (const verb of ['accept', 'reject']) assert.match(page, new RegExp(`^\\| ${verb} \\| submitted \\| .*policyAllows \\(COORDINATOR_VERIFIES\\), familyAllows \\(O2_FAMILY_MATCH\\), reviewFree \\(REVIEW_HELD\\), criterionUnchanged`, 'm'));assert.match(page, /^\| REVIEW_HELD \| no other agent holds its review under a live lease \| pullboard next --verify/m);- assert.match(HELP, /^ {2}agent +claim, release, submit, reserve, accept, reject, escalate$/m);- assert.match(HELP, /pullboard next --verify +reserve the next submitted item you can check/);+ assert.match(HELP.all, /^ {2}agent +claim, release, submit, reserve, accept, reject, escalate$/m);+ assert.match(HELP.all, /pullboard next --verify +reserve the next submitted item you can check/);});test('the two conditional guards behave as declared: a renewal passes a held lane, and only a freeze checks the rows [M1, M2]', () => {