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
fix(help): every printed subcommand has help [N2]
Corey Olsonb139b5e86e20
diff --git a/src/help.js b/src/help.jsindex 676aceb0..d24bd785 100644--- a/src/help.js+++ b/src/help.js@@ -357,6 +357,8 @@ function commandHelpRows(fullHelp, commandNames) {...Object.keys(HELP_ALIASES),...Object.keys(HELP_EXAMPLES).filter((name) => /^[a-z][a-z0-9-]*(?: [a-z][a-z0-9-]*)*$/u.test(name)),...rows.map((row) => commandWords(row.usage)[0]).filter(Boolean),+ // Every printed subcommand phrase (milestone items, relay devices) is a name too, so its help exists [N2].+ ...lines.filter((line) => line.startsWith(' pullboard ')).flatMap((line) => usagePhrases(line.trim())).filter((phrase) => phrase.includes(' ')),])];return Object.fromEntries(names.map((name) => {const parts = name.split(' ');diff --git a/test/cli-help.test.js b/test/cli-help.test.jsindex 64e44a42..5408ee59 100644--- a/test/cli-help.test.js+++ b/test/cli-help.test.js@@ -137,10 +137,10 @@ test('help names come from the command declarations [C7,N37]', async (t) => {assert.equal(all.status, 0, all.failure);assert.equal(overview.stdout, HELP.overview + '\n');assert.equal(all.stdout, HELP.all + '\n');- const undocumented = run('help', 'milestone', 'items');- assert.equal(undocumented.status, 2, 'the existing undocumented help stays refused');+ const undocumented = run('help', 'milestone', 'bogus');+ assert.equal(undocumented.status, 2, 'a name the CLI does not dispatch stays refused');assert.equal(undocumented.stdout, '');- assert.equal(undocumented.stderr, 'pullboard: no command "milestone items"; closest match is "milestone order". Run pullboard help --all for the full list.\n');+ assert.equal(undocumented.stderr, 'pullboard: no command "milestone bogus"; closest match is "milestone items". Run pullboard help --all for the full list.\n');t.diagnostic('help overview bytes ' + JSON.stringify(overview.stdout));const directory = resolve(import.meta.dirname, '../src');@@ -228,3 +228,18 @@ test('help add example runs on a fresh board [I1,L3]', (t) => {assert.equal(result.status, 0, `${line}\n${result.failure ?? `${result.stdout}${result.stderr}`}`);}});++test('help covers every dispatched subcommand [N2]', () => {+ // Every printed subcommand phrase is one the CLI dispatches; each must have help, and an unknown name still refuses.+ const subcommands = helpDeclaration.commandPhrases(HELP).filter((phrase) => phrase.includes(' '));+ assert.ok(subcommands.includes('milestone items') && subcommands.includes('relay devices') && subcommands.includes('spec approve'),+ 'the walk covers the subcommands that were refused before');+ for (const phrase of subcommands) {+ const result = run('help', ...phrase.split(' '));+ assert.equal(result.status, 0, `help ${phrase} exits 0: ${result.stderr}`);+ assert.match(result.stdout, /^Usage: pullboard /u, `help ${phrase} prints a Usage line`);+ }+ const unknown = run('help', 'milestone', 'bogus');+ assert.equal(unknown.status, 2, 'an unknown subcommand still exits 2');+ assert.equal(unknown.stdout, '');+});