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.

chore(core): merge setup guidance into rowless flow [S1,B26]

Corey Olson18b492fb4d42
diff --cc src/cli.js
index 2e51121b,09581ceb..572a4b89
--- a/src/cli.js
+++ b/src/cli.js
@@@ -176,7 -181,7 +181,8 @@@ import { Refused } from './refused.js'
import {
applyStep,
personAsk,
+ requirementStep,
+ withStarterWork,
} from './setup-rows.js';
import { personNeeds } from './needs.js';
import { personNeedsState } from './needs-state.js';
@@@ -1746,8 -1754,7 +1753,8 @@@ async function resumeHere(io, view)
if (view.state !== 'running' && backgroundViewLine(view)) say(backgroundViewLine(view));
if (card.inbox) for (const line of coordinatorInboxLines(card.inbox, name, (at) => span(ctx, at), firstLine)) say(line);
say(`New agent worktrees: ${card.newWorktreeLocation}`);
- card.setup = boardSetup(ctx, card, setupScope);
+ card.setup = withBoard(ctx, board => withStarterWork(boardSetup(ctx, card, setupScope), { board, me, main: isMain, config: ctx.config, root, seat: ctx.io.callerRole() === 'seat' }));
+ if (!loadSpec(root, ctx.config).rows.length && card.all.length) say('Spec rows are optional; add a requirement later: pullboard spec draft "<text>".');
if (card.setup) {
say(`Setting up: step ${card.setup.step} of 5`);
say(card.setup.question);
diff --cc src/setup-rows.js
index cff99c49,7e0e8083..1431acd7
--- a/src/setup-rows.js
+++ b/src/setup-rows.js
@@@ -3,17 -3,34 +3,44 @@@
* coordinator's spec apply, never for the person again, and each open row gets the command that
* decides it, approve for a draft and answer for a pending question.
*/
+ import { nextFor } from './board.js';
+ import { proposeLanes } from './init.js';
+
+ /** Show available starter work beside undecided rows, without changing any approval or apply move [S1,B26]. */
+ export function withStarterWork(setup, { board, me, main, config, root, seat }) {
+ if (setup?.waitingOn !== 'person-approval') return setup;
+ const 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.';
+ const waiting = { ...setup, meanwhile };
+ const proposed = main ? proposeLanes(root, config) : [];
+ const lanes = Object.entries(config.lanes).filter(([, lane]) => lane.owns.length).map(([name]) => name);
+ if (!main && !lanes.includes(me.lane)) return waiting;
+ const item = nextFor(board, { agentId: me.id, lane: me.lane,
+ ...(main ? { lanes: [...lanes, ...proposed.map(lane => lane.name)] } : {}) }).item;
+ if (!item || (main && ![...lanes, ...proposed.map(lane => lane.name)].includes(item.item_lane))) return waiting;
+ /** Quote a configured path only when the command needs it. */
+ const word = value => /^[A-Za-z0-9._/,-]+$/u.test(value) ? value : "'" + value.replaceAll("'", "'\\''") + "'";
+ const proposal = proposed.find(lane => lane.name === item.item_lane);
+ const command = !main ? `pullboard claim ${item.item_id}` : !Object.hasOwn(config.lanes, item.item_lane)
+ ? `pullboard lane add ${item.item_lane} --owns ${word(proposal.owns.join(','))}`
+ : `pullboard worktree ${item.item_lane} --model "<model name>"`;
+ return { ...waiting,
+ buildNow: { item: item.item_id, lane: item.item_lane, title: item.item_title, command },
+ meanwhile: `Starter items can be claimed and built now while the person decides these rows in parallel. First: #${item.item_id} ${item.item_title}. Start: ${command}`,
+ agentNext: main && setup.approvedRowIds?.length ? 'pullboard spec apply' : command };
+ }
+/** Keep spec setup optional on a working rowless board, retaining approval guidance for real rows. */
+export function requirementStep({ rows, drafted, toApply, completed, hasItems }) {
+ const optional = rows.length === 0 && hasItems;
+ return { number: 1, done: optional || (rows.some(row => row.status === 'approved') && ((!drafted.length && !toApply.length) || completed)),
+ question: optional ? 'Spec rows are optional on this working board; add a requirement later with pullboard spec draft "<text>".'
+ : 'Ask the person: what are we building, and who will use it? Draft a few requirements, then ask the person to approve them.',
+ command: 'pullboard spec draft "<text>"',
+ afterAnswer: 'Record each answer with pullboard spec draft "<text>"; the person approves the returned ids in Pullboard View or runs pullboard spec approve <ids> in their own terminal; then the coordinator runs pullboard spec apply.' };
+}
+
/**
* The setup step once every open row has a person decision that spec apply has not written yet.
*