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(blueprint): a plain Node project fits the stack question [A8]
Corey Olsonc7e4fa49b55a
diff --git a/src/blueprint-fit.js b/src/blueprint-fit.jsindex c8a0876e..8ec4d5cb 100644--- a/src/blueprint-fit.js+++ b/src/blueprint-fit.js@@ -168,6 +168,9 @@ export function fitTargets(blueprint, spec, items) {return targets;}+/** The choice that takes a stack no named choice covers (#916). */+const OTHER_CHOICE = 'Something else';+/*** Check one proposal against its target and give the text it would apply: the new row text, the* answered question's row text or the item's new criterion, or null for keep and drop.@@ -190,7 +193,9 @@ function checkProposal(target, { decision, text, reason }) {if (!line(text)) throw new Refused('FIT_PROPOSAL', `an ${decision} proposal needs --text, one nonempty line without a | character`);if (decision === 'adapt') return { decision, text: text.trim(), reason: reason.trim() };if (target.kind !== 'question') throw new Refused('FIT_PROPOSAL', `${target.target} is no question; only a question takes an answer, so use keep, adapt or drop`);- if (!target.choices.includes(text.trim())) throw new Refused('FIT_PROPOSAL', `${text.trim()} is not one of ${target.target}'s choices (${target.choices.join(', ')})`);+ // A stack no named choice covers fits Something else, which takes the stack's name as its answer (#916).+ const named = target.choices.includes(text.trim()) || target.choices.includes(OTHER_CHOICE);+ if (!named) throw new Refused('FIT_PROPOSAL', `${text.trim()} is not one of ${target.target}'s choices (${target.choices.join(', ')})`);return { decision, text: questionText({ ask: target.ask, choices: target.choices, default: text.trim() }), reason: reason.trim() };}diff --git a/test/blueprint.test.js b/test/blueprint.test.jsindex ae902c5d..dc9d7de2 100644--- a/test/blueprint.test.js+++ b/test/blueprint.test.js@@ -1477,3 +1477,12 @@ test('an agent cannot approve its own fit proposal [S1,E3,B26]', () => {const approved = ok(box.run('spec', 'fit', 'approve', third.batch, '--json'), 'the person approves');assert.deepEqual(approved.decisions.map((record) => [record.id, record.decision]), [[W3, 'decline'], [W4, 'approve']]);});++test('a Something else answer that names the stack fits a plain Node project [A8]', () => {+ // A plain Node project is not one of A8's named frameworks, so Something else takes the stack's name (#916).+ const { seat, key } = fitBoard();+ const stack = 'Node.js with built-in node:http and node:test';+ const proposal = ok(seat('blueprint', 'fit', 'web-app', key('Q1'), 'answer', '--text', stack, '--reason', 'a plain Node project with no web framework', '--json'), 'answer the stack question').proposals[0];+ assert.equal(proposal.decision, 'answer');+ assert.equal(proposal.text, `The app is built with: ${stack}. Choices: Next.js, SvelteKit, Rails, Something else.`);+});