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(spec): refuse ignored view flag [P4,S14]
Corey Olson5884a409f6f6
diff --git a/src/cli.js b/src/cli.jsindex 9391aa9d..5d7fe308 100644--- a/src/cli.js+++ b/src/cli.js@@ -1346,7 +1346,7 @@ function specCommand(io, { first, second, rest, values }) {signoff: ['by', 'note', 'note-file'],}[first ?? '--json'];if (!commandFlags) throw new Refused('USAGE', 'use pullboard spec --json | check | view | show <id> | unmet [--must] | signoff <ids> --by <name> [--note "..."]');- const allowedFlags = [...new Set([...commandFlags, 'json'])];+ const allowedFlags = commandFlags;for (const flag of Object.keys(values)) {if (!allowedFlags.includes(flag)) {const next = flag === 'must' ? 'use --must with spec unmet' : 'use a flag accepted by this spec command';diff --git a/test/spec.test.js b/test/spec.test.jsindex a38eed11..773573c6 100644--- a/test/spec.test.js+++ b/test/spec.test.js@@ -312,6 +312,27 @@ test('signoff refuses a flag it does not take [P4]', (t) => {assert.match(unsupported.stderr, /FLAG_NOT_ALLOWED.*spec signoff.*--must/);});+test('spec view handles --json or refuses it instead of silently ignoring it [P4]', (t) => {+ const box = specBox(t);+ const htmlFile = join(box.root, 'requested-spec.html');+ const jsonAdapter = existsSync(resolve(import.meta.dirname, '../src/json.js'));+ const result = box.run('view', '--json', '--out', htmlFile);++ if (jsonAdapter) {+ assert.equal(result.status, 0, result.stderr);+ assert.equal(result.stderr, '');+ const document = JSON.parse(result.stdout);+ assert.equal(document.version, 1);+ assert.equal(document.path, htmlFile);+ assert.ok(existsSync(htmlFile));+ return;+ }++ assert.equal(result.status, 1);+ assert.match(result.stderr, /FLAG_NOT_ALLOWED.*spec view does not take --json/);+ assert.equal(existsSync(htmlFile), false, 'refusal happens before creating the HTML output');+});+test('spec unmet and signoff do not create a board when reading a repo without one [S14, P4]', (t) => {const box = specBox(t);const boardDir = join(box.root, '.git', 'pullboard');