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(init): an agent adds the first lane and tells the person [I1,I2,L1]
Corey Olsonacd0875803c4
diff --git a/src/blueprint-set.js b/src/blueprint-set.jsindex 04bc93ca..ed0fc29e 100644--- a/src/blueprint-set.js+++ b/src/blueprint-set.js@@ -207,7 +207,7 @@ export async function landEach(list, add) {* @returns {string[]}*/export function initBlueprintLines(added, laneNotes) {- const proposed = added.proposedLanes.length ? ` in the ${added.proposedLanes.map((lane) => lane.name).join(' and ')} lane, proposed above and not written until the person accepts` : '';+ const proposed = added.proposedLanes.length ? ` in the ${added.proposedLanes.map((lane) => lane.name).join(' and ')} lane, proposed above; add it with the command printed there` : '';return [`added the ${added.blueprint.title} blueprint: ${added.rows.length} ${added.rows.length === 1 ? 'row waits' : 'rows wait'} for your approval in SPEC.md (${added.section}), `+ `${added.items.length} starter ${added.items.length === 1 ? 'item' : 'items'} filed${proposed}${added.gate ? `, gate set to ${added.gate}` : ''}`,...laneNotes.map((note) => ` ${note}`),diff --git a/src/init.js b/src/init.jsindex 4ab9606d..59e5303e 100644--- a/src/init.js+++ b/src/init.js@@ -125,8 +125,8 @@ function laneNameFor(folder) {/*** The lanes init proposes from the repo's layout (I1, I2): one lane per top-level package for a* packages/* or apps/* layout, and one app lane owning the top-level folders otherwise. Nothing is- * proposed once any lane owns a folder. Proposals are never written: the person accepts each one- * by running its `pullboard lane add` command.+ * proposed once any lane owns a folder. Init never writes them: the agent in the main checkout adds them+ * with the printed `pullboard lane add` command and tells the person (#914).** @param {string} root* @param {any} [config] - The repo's config; read from root when omitted.@@ -156,7 +156,7 @@ export function proposeLanes(root, config = loadConfig(root)) {* so a starter filed there had to be withdrawn and filed again (blueprint trial, finding 3). In* order: the starter's own lane when it exists or is proposed, else the first declared lane that* owns folders, else the first lane init proposes. A proposed lane is used by name and never- * written: the person accepts it with its `pullboard lane add` command, and the starters are+ * written: the agent adds it with its `pullboard lane add` command, and the starters are* waiting in it from then on.** @param {string | undefined} wanted - The lane the blueprint names for this starter, if any.@@ -202,7 +202,7 @@ export function askedLaneNotes(placed, config) {/*** The lines blueprint add prints when its starters went into a proposed lane: where they are,- * and the one command that accepts the lane.+ * and the one command that adds the lane.** @param {{ name: string, owns: string[] }[]} proposed - The proposed lanes starters were filed in.* @returns {string[]}@@ -210,7 +210,7 @@ export function askedLaneNotes(placed, config) {export function starterLaneNotes(proposed) {if (!proposed.length) return [];const [, accept] = laneProposalNotes(proposed);- return [`starter items filed in the ${proposed.map((lane) => lane.name).join(' and ')} lane, proposed, not written until the person accepts`, accept];+ return [`starter items filed in the ${proposed.map((lane) => lane.name).join(' and ')} lane, proposed; add it to start them`, accept];}/**@@ -222,7 +222,7 @@ export function starterLaneNotes(proposed) {const shellWord = (word) => (/^[A-Za-z0-9_./,@%+=:-]+$/u.test(word) ? word : `'${word.replaceAll("'", "'\\''")}'`);/**- * The init lines that show proposed lanes and the one command that accepts them.+ * The init lines that show proposed lanes and the one command that adds them; the agent runs it and tells the person.** @param {{ name: string, owns: string[] }[]} proposals* @returns {string[]}@@ -230,8 +230,9 @@ const shellWord = (word) => (/^[A-Za-z0-9_./,@%+=:-]+$/u.test(word) ? word : `'$export function laneProposalNotes(proposals) {if (!proposals.length) return [];return [- `proposed lanes, not written until the person accepts: ${proposals.map((lane) => `${lane.name} owns ${lane.owns.join(' ')}`).join('; ')}`,- `ask the person; to accept, run: ${proposals.map((lane) => `pullboard lane add ${shellWord(lane.name)} --owns ${shellWord(lane.owns.join(','))}`).join(' && ')}`,+ `proposed lanes: ${proposals.map((lane) => `${lane.name} owns ${lane.owns.join(' ')}`).join('; ')}`,+ // An agent adds the first lanes itself and says so; stopping to ask stalled every model in the #849 trial (#914).+ `add them from the main checkout, then tell the person which lanes you made: ${proposals.map((lane) => `pullboard lane add ${shellWord(lane.name)} --owns ${shellWord(lane.owns.join(','))}`).join(' && ')}`,];}diff --git a/test/blueprint.test.js b/test/blueprint.test.jsindex ae902c5d..2a93a3ae 100644--- a/test/blueprint.test.js+++ b/test/blueprint.test.js@@ -895,13 +895,13 @@ test('starter items land in a build lane, never the coordinator lane [S1,I1]', (const configLanes = (box) => JSON.parse(readFileSync(join(box.repo, 'pullboard.json'), 'utf8')).lanes ?? {};// A fresh init with a blueprint: init proposes the app lane and the starters are filed in it.- // The proposal stays unwritten until the person runs the command init prints.+ // The proposal stays unwritten until the agent runs the command init prints, then tells the person (#914).const fresh = emptyRepo();const started = fresh.run('init', '--blueprint', 'web-app');assert.equal(started.status, 0, started.stdout + started.stderr);assert.deepEqual(lanesOf(fresh), Array(PUBLISHED.items.length).fill('app'), 'init files every starter in the lane it proposes');- assert.match(started.stdout, /starter items filed in the app lane, proposed above and not written until the person accepts/u, 'init says the lane is a proposal');- assert.match(started.stdout, /to accept, run: pullboard lane add app --owns app\//u, 'init prints the command that accepts it');+ assert.match(started.stdout, /starter items filed in the app lane, proposed above; add it with the command printed there/u, 'init says the lane is a proposal');+ assert.match(started.stdout, /then tell the person which lanes you made: pullboard lane add app --owns app\//u, 'init prints the command that accepts it');assert.deepEqual(Object.keys(configLanes(fresh)).filter((name) => name === 'app'), [], 'the proposed lane is not written');const accepted = fresh.run('lane', 'add', 'app', '--owns', 'app/');assert.equal(accepted.status, 0, accepted.stdout + accepted.stderr);@@ -949,8 +949,8 @@ test('starter items land in a build lane, never the coordinator lane [S1,I1]', (const again = freshBoard();const said = again.run('blueprint', 'add', 'web-app');assert.equal(said.status, 0, said.stdout + said.stderr);- assert.match(said.stdout, /starter items filed in the app lane, proposed, not written until the person accepts/u, 'blueprint add says the lane is a proposal');- assert.match(said.stdout, /to accept, run: pullboard lane add app --owns app\//u, 'blueprint add prints the command that accepts it');+ assert.match(said.stdout, /starter items filed in the app lane, proposed; add it to start them/u, 'blueprint add says the lane is a proposal');+ assert.match(said.stdout, /then tell the person which lanes you made: pullboard lane add app --owns app\//u, 'blueprint add prints the command that accepts it');});/** The bundled blueprint of this name, as its file says. */diff --git a/test/lane-add.test.js b/test/lane-add.test.jsindex b739d4d3..571b1778 100644--- a/test/lane-add.test.js+++ b/test/lane-add.test.js@@ -31,9 +31,9 @@ test('lane add creates a lane and init proposes lanes from the layout [I1,I2,L1]const box = project(t, ['packages/web/src', 'packages/api', 'docs']);const init = box.run('init');assert.equal(init.status, 0, init.stderr);- assert.match(init.stdout, /^proposed lanes, not written until the person accepts: api owns packages\/api\/; web owns packages\/web\/$/mu);- assert.match(init.stdout, /^ask the person; to accept, run: pullboard lane add api --owns packages\/api\/ && pullboard lane add web --owns packages\/web\/$/mu);- assert.deepEqual(Object.keys(box.lanes()), ['review'], 'init writes no proposed lane before the person accepts');+ assert.match(init.stdout, /^proposed lanes: api owns packages\/api\/; web owns packages\/web\/$/mu);+ assert.match(init.stdout, /^add them from the main checkout, then tell the person which lanes you made: pullboard lane add api --owns packages\/api\/ && pullboard lane add web --owns packages\/web\/$/mu);+ assert.deepEqual(Object.keys(box.lanes()), ['review'], 'init itself writes no proposed lane; the agent adds it with the printed command');const rerun = box.run('init', '--json');assert.equal(rerun.status, 0, rerun.stderr);assert.deepEqual(JSON.parse(rerun.stdout).proposedLanes, [@@ -82,17 +82,29 @@ test('lane add creates a lane and init proposes lanes from the layout [I1,I2,L1]const apps = project(t, ['apps/mobile', 'apps/site']);const appsInit = apps.run('init');assert.equal(appsInit.status, 0, appsInit.stderr);- assert.match(appsInit.stdout, /^proposed lanes, not written until the person accepts: mobile owns apps\/mobile\/; site owns apps\/site\/$/mu);+ assert.match(appsInit.stdout, /^proposed lanes: mobile owns apps\/mobile\/; site owns apps\/site\/$/mu);assert.deepEqual(Object.keys(apps.lanes()), ['review']);// Any other layout gets one app lane.const plain = project(t, ['src', 'test']);const plainInit = plain.run('init');assert.equal(plainInit.status, 0, plainInit.stderr);- assert.match(plainInit.stdout, /^proposed lanes, not written until the person accepts: app owns src\/ test\/$/mu);- assert.match(plainInit.stdout, /^ask the person; to accept, run: pullboard lane add app --owns src\/,test\/$/mu);+ assert.match(plainInit.stdout, /^proposed lanes: app owns src\/ test\/$/mu);+ assert.match(plainInit.stdout, /^add them from the main checkout, then tell the person which lanes you made: pullboard lane add app --owns src\/,test\/$/mu);assert.deepEqual(Object.keys(plain.lanes()), ['review']);const accepted = plain.run('lane', 'add', 'app', '--owns', 'src/,test/');assert.equal(accepted.status, 0, accepted.stderr);assert.deepEqual(plain.lanes().app, { owns: ['src/', 'test/'] });});++test('init lets the agent add the first lane and tell the person, never stop to ask [I1,I2,L1]', (t) => {+ const box = project(t, ['server', 'test']);+ const init = box.run('init');+ assert.equal(init.status, 0, init.stderr);+ const lanes = init.stdout.split('\n').filter((line) => /lane/u.test(line));+ assert.ok(lanes.some((line) => /^add them from the main checkout, then tell the person which lanes you made: pullboard lane add app --owns server\/,test\/$/u.test(line)), lanes.join('\n'));+ assert.equal(lanes.some((line) => /ask the person|until the person accepts|to accept, run/u.test(line)), false, 'no line tells the agent to wait for the person before the first lane');+ const added = box.run('lane', 'add', 'app', '--owns', 'server/,test/');+ assert.equal(added.status, 0, 'the agent in the main checkout can run the printed command itself: ' + added.stderr);+ assert.deepEqual(box.lanes().app.owns, ['server/', 'test/']);+});