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): quote option-like starter folders [I1]
Corey Olson22858bee0da3
diff --git a/src/blueprints.js b/src/blueprints.jsindex 10ae1948..5763cfde 100644--- a/src/blueprints.js+++ b/src/blueprints.js@@ -84,7 +84,7 @@ export function starterCheck(blueprint, command, placement, config) {if (!BUNDLED.has(blueprint) || owns.length !== 1 || !owns[0].endsWith('/')) return command;const folder = owns[0].replace(/\/+$/u, '');if (!folder || /[*?{}\[\]]/u.test(folder)) return command;- const quoted = `'${folder.replaceAll("'", "'\\''")}'`;+ const quoted = `'./${folder.replaceAll("'", "'\\''")}'`;return `cd ${quoted} && (${command})`;}diff --git a/test/blueprint-starter-fixture.js b/test/blueprint-starter-fixture.jsindex f3eccb89..c29ac66e 100644--- a/test/blueprint-starter-fixture.js+++ b/test/blueprint-starter-fixture.js@@ -36,16 +36,18 @@ export function assertStarterChecks({ emptyRepo, freshBoard, json }) {}assert.equal(items.length, readBlueprint(name).items.length, `${name} files every starter`);}- const chosen = freshBoard({ lanes: { service: { owns: ['services/my api/'], specs: [] } } });- const folder = join(chosen.repo, 'services', 'my api');- mkdirSync(folder, { recursive: true });- const placed = json(chosen, 'blueprint', 'add', 'web-app');- const first = json(chosen, 'show', String(placed.items[0].id));- assert.equal(first.item_lane, 'service');- const ran = runFixtureChild('/bin/sh', ['-c', `trap 'printf "\\n__starter_cwd__%s\\n" "$(pwd -P)"' EXIT; ${first.item_check}`],- { cwd: chosen.repo, env: chosen.env, encoding: 'utf8' });- try { assert.equal(/__starter_cwd__([^\n]+)/u.exec(ran.stdout)?.[1], realpathSync(folder), 'the actual chosen lane folder, including spaces, is used'); }- catch (error) { failures.push(error); }+ for (const owned of ['services/my api/', "-app's/"]) {+ const chosen = freshBoard({ lanes: { service: { owns: [owned], specs: [] } } });+ const folder = join(chosen.repo, owned);+ mkdirSync(folder, { recursive: true });+ const placed = json(chosen, 'blueprint', 'add', 'web-app');+ const first = json(chosen, 'show', String(placed.items[0].id));+ assert.equal(first.item_lane, 'service');+ const ran = runFixtureChild('/bin/sh', ['-c', `trap 'printf "\\n__starter_cwd__%s\\n" "$(pwd -P)"' EXIT; ${first.item_check}`],+ { cwd: chosen.repo, env: chosen.env, encoding: 'utf8' });+ try { assert.equal(/__starter_cwd__([^\n]+)/u.exec(ran.stdout)?.[1], realpathSync(folder), `the actual chosen lane folder ${owned} is used without shell option or quote interpretation`); }+ catch (error) { failures.push(error); }+ }const ambiguous = freshBoard({ lanes: { app: { owns: ['src/', 'test/'], specs: [] } } });const rootItems = json(ambiguous, 'blueprint', 'add', 'web-app').items;assert.equal(json(ambiguous, 'show', String(rootItems[0].id)).item_check, 'npm test',diff --git a/test/blueprint.test.js b/test/blueprint.test.jsindex c8bf3b06..9d374a25 100644--- a/test/blueprint.test.js+++ b/test/blueprint.test.js@@ -247,7 +247,7 @@ test('every bundled starter item carries a criterion and a check [S1,I1]', () =>const items = readBlueprint(name, process.cwd()).items;assert.equal(added.items.length, items.length, `${name} files every starter`);assert.deepEqual(added.checksNotRun, added.items.map((item) => item.id), `${name}: every check is stored, none run`);- board.expected.push(...items.map((item) => [item.title, item.criterion, `cd 'app' && (${item.check})`]));+ board.expected.push(...items.map((item) => [item.title, item.criterion, `cd './app' && (${item.check})`]));}for (const { box, expected } of boards) {const filed = json(box, 'list', '--all').items.sort((a, b) => a.item_id - b.item_id);@@ -261,7 +261,7 @@ test('every bundled starter item carries a criterion and a check [S1,I1]', () =>const started = fresh.run('init', '--blueprint', 'web-app');assert.equal(started.status, 0, started.stdout + started.stderr);const startedItems = (JSON.parse(fresh.run('list', '--json').stdout).items ?? []).sort((a, b) => a.item_id - b.item_id);- assert.deepEqual(startedItems.map((item) => [item.item_title, item.item_criterion, item.item_check]), web.items.map((item) => [item.title, item.criterion, `cd 'app' && (${item.check})`]));+ assert.deepEqual(startedItems.map((item) => [item.item_title, item.item_criterion, item.item_check]), web.items.map((item) => [item.title, item.criterion, `cd './app' && (${item.check})`]));assert.match(started.stdout, new RegExp(`checks stored, not run: ${startedItems.map((item) => `#${item.item_id}`).join(', ')}; no check baseline ran`, 'u'));});