Skip to content

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.

fix(cli): ask agents to answer pending setup questions [S1,I1,P6]

Corey Olsonfaf0a7ff97ef
diff --git a/src/cli.js b/src/cli.js
index 5a74e524..bc362f3d 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -1635,13 +1635,13 @@ function boardSetup(ctx, card, identity) {
const names = rowIds.join(', ');
const command = `pullboard spec show ${rowIds[0]}`;
// A pending question takes an answer, a draft row an approval: each gets the command that decides it.
- const { personCommand, verb } = personAsk(drafted);
+ const { personCommand, verb, seatQuestion, seatNext } = personAsk(drafted);
return { step: 1, total: 5, ...current, steps, waitingOn: 'person-approval', rowIds, ...(toApply.length ? { approvedRowIds: toApply.map(row => row.id) } : {}),
- question: seat ? `Waiting for the coordinator to bring approval of ${names} to the person.` : `Waiting for the person to ${verb} ${names}.`, command,
+ question: seat ? seatQuestion : `Waiting for the person to ${verb} ${names}.`, command,
personCommand,
afterAnswer: (toApply.length ? `The person already approved ${toApply.map(row => row.id).join(', ')}; pullboard spec apply writes them. ` : '') + 'The person approves draft rows and answers questions in Pullboard View or their own terminal; then the coordinator runs pullboard spec apply.',
meanwhile: seat ? 'While waiting, review independent approved work or send questions to the coordinator with pullboard shout coordinator "<what is needed>" --decision.' : 'While waiting, the agent may review independent approved work or prepare questions for the person.',
- agentNext: seat ? `ask the coordinator to bring approval of ${names} to the person: pullboard shout coordinator "approve ${names}" --decision; meanwhile ${command}` : (toApply.length ? 'pullboard spec apply for the approved rows; then ' : '') + `wait for the person to ${verb} ${names}; meanwhile ${command}` };
+ agentNext: seat ? seatNext : (toApply.length ? 'pullboard spec apply for the approved rows; then ' : '') + `wait for the person to ${verb} ${names}; meanwhile ${command}` };
}
return current ? { step: current.number, total: 5, ...current, steps } : null;
}
diff --git a/src/setup-rows.js b/src/setup-rows.js
index 0cd64faa..eaf6a7e5 100644
--- a/src/setup-rows.js
+++ b/src/setup-rows.js
@@ -24,11 +24,16 @@ export function applyStep(rowIds, seat) {
* answer for pending questions, decide for a mix.
*
* @param {{id: string, status: string}[]} rows The open rows with no person decision.
- * @returns {{personCommand: string, verb: string}}
+ * @returns {{personCommand: string, verb: string, seatQuestion: string, seatNext: string}}
*/
export function personAsk(rows) {
const questions = rows.filter(row => row.status === 'pending').map(row => row.id);
const drafts = rows.filter(row => row.status !== 'pending').map(row => row.id);
const personCommand = [drafts.length ? `pullboard spec approve ${drafts.join(',')}` : '', ...questions.map(id => `pullboard spec answer ${id} "<choice>"`)].filter(Boolean).join('; ');
- return { personCommand, verb: !questions.length ? 'approve' : drafts.length ? 'decide' : 'answer' };
+ const verb = !questions.length ? 'approve' : drafts.length ? 'decide' : 'answer';
+ const names = rows.map(row => row.id).join(', ');
+ const request = verb === 'approve' ? `bring approval of ${names} to the person` : `ask the person to ${verb} ${names}`;
+ return { personCommand, verb,
+ seatQuestion: `Waiting for the coordinator to ${request}.`,
+ seatNext: `ask the coordinator to ${request}: pullboard shout coordinator "${verb} ${names}" --decision; meanwhile pullboard spec show ${rows[0].id}` };
}
diff --git a/test/spec.test.js b/test/spec.test.js
index f6902bd9..7a8298d4 100644
--- a/test/spec.test.js
+++ b/test/spec.test.js
@@ -960,3 +960,34 @@ test('an approved row waits for apply, not for the person [S1,I1,P6]', (t) => {
const after = resume();
assert.doesNotMatch(after, /spec apply|Waiting for the person to (approve|decide|answer)/u, 'once applied and committed, setup moves on');
});
+
+
+test('a joined seat requests answers for pending questions [S1,I1,P6]', t => {
+ for (const mixed of [false, true]) {
+ const source = '# Spec\n\n## Q · Setup\n- Q1 [pending, must] It deploys to: Vercel. Choices: Vercel, Netlify. | gate: review\n'
+ + (mixed ? '- A1 [draft, must] Every page works at phone width. | gate: review\n' : '');
+ const box = specBox(t, { specSource: source });
+ const configPath = join(box.root, 'pullboard.json');
+ const config = JSON.parse(readFileSync(configPath, 'utf8'));
+ config.lanes.build = { owns: ['app/'] };
+ writeFileSync(configPath, JSON.stringify(config));
+ box.git('add', 'pullboard.json');
+ box.git('commit', '-q', '-m', 'chore: configure the setup fixture lane');
+ const builder = join(box.root, 'builder');
+ box.git('worktree', 'add', '-q', '-b', 'build/setup', builder);
+ const joined = runIn(box, builder, ['join', 'build', '--model', 'Fixture']);
+ assert.equal(joined.status, 0, joined.stderr + joined.stdout);
+ const read = runIn(box, builder, ['resume', '--json']);
+ assert.equal(read.status, 0, read.stderr + read.stdout);
+ const card = JSON.parse(read.stdout);
+ assert.match(card.setup.personCommand, /pullboard spec answer Q1 "<choice>"/u);
+ assert.doesNotMatch([card.setup.question, card.setup.agentNext, card.next].join('\n'), /approv/iu,
+ 'pending-only or mixed joined-seat guidance never asks for approval of a question');
+ const expected = mixed ? 'decide Q1, A1' : 'answer Q1';
+ assert.ok(card.setup.question.includes(expected), card.setup.question);
+ assert.ok(card.setup.agentNext.includes(expected), card.setup.agentNext);
+ assert.equal(card.next, card.setup.agentNext);
+ if (mixed) assert.match(card.setup.personCommand, /pullboard spec approve A1; pullboard spec answer Q1/u,
+ 'the draft still gets approval while the question gets its answer');
+ }
+});