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(merge): a lone newcomer can start their reviewer with one [V1,B26]
Corey Olson7a4f98cafe63
diff --cc src/cli.jsindex 5ef36abd,f857f188..a1dd2e47--- a/src/cli.js+++ b/src/cli.js@@@ -35,10 -35,7 +35,11 @@@ importimport { performance } from 'node:perf_hooks';import { pathToFileURL } from 'node:url';import { parseArgs } from 'node:util';+import {+ mainLaneWork,+ refuseNextIdle,+} from './next-steps.js';+ import { reviewerStartup } from './next-steps.js';import * as store from './board.js';import {CONFIG_FILE,diff --cc src/next-steps.jsindex 787aa870,bb3f3ac8..f037345c--- a/src/next-steps.js+++ b/src/next-steps.js@@@ -8,32 -8,31 +8,57 @@@* every code raised in src/ has a row here.*/import { RECORDED_GENERIC_NEXT } from './recorded-refusal.js';+import { Refused } from './refused.js';++/** Name open build lanes without claiming their work as the coordinator [N2,B26]. */+export function mainLaneWork(items) {+ const counts = new Map();+ for (const item of items) {+ if (item.item_status !== 'open' || item.item_lane === 'coordinator') continue;+ counts.set(item.item_lane, (counts.get(item.item_lane) ?? 0) + 1);+ }+ const lanes = [...counts].sort(([a], [b]) => a.localeCompare(b));+ if (!lanes.length) return null;+ return {+ summary: lanes.map(([lane, count]) => `${count} ${count === 1 ? 'item' : 'items'} open in lane ${lane}`).join('; '),+ next: `pullboard worktree ${lanes[0][0]} --model "<model name>"`,+ };+}++/** Preserve empty-queue refusals while sending a main-checkout newcomer to existing lane work. */+export function refuseNextIdle(io, reasons, displayed, { minutes, verify, laneWork }) {+ const waited = minutes ? ` after ${minutes} minutes` : '';+ const repair = laneWork ? `. ${laneWork.summary}. Start there: ${laneWork.next}`+ : `${waited}. To keep looking: pullboard next --wait 9${verify ? ' --verify' : ''} (minutes; give the command a ten-minute timeout)`;+ io.refusal?.(new Refused('NOTHING_FREE', reasons.join('; ') + repair, laneWork?.next));+ io.err(`pullboard: [NOTHING_FREE] ${displayed.join('; ')}${repair}`);+ return 1;+}+ import { existsSync } from 'node:fs';+ import {+ basename,+ dirname,+ join,+ } from 'node:path';++ /** Give a separate agent session one pasteable startup line, without claiming or verifying for it [V1,B26]. */+ export function reviewerStartup(root, config, id) {+ if (!root) return 'ask the coordinator to locate the main checkout for a different agent session; the reviewer must not be the builder';+ const lanes = Object.entries(config.lanes).filter(([name]) => name !== 'coordinator');+ const lane = lanes.find(([, value]) => !value.owns.length)?.[0] ?? lanes[0]?.[0];+ if (!lane) return 'ask the coordinator to declare a reviewer lane for a different agent session; the reviewer must not be the builder';+ /** Quote the whole path so spaces, apostrophes and dollar signs remain literal. */+ const quote = value => "'" + value.replaceAll("'", "'\\''") + "'";+ /** Respect the configured placement while avoiding an existing checkout. */+ const location = number => config.worktrees === 'inside'+ ? join(root, '.claude', 'worktrees', `reviewer-${number}`)+ : join(dirname(root), `${basename(root)}-reviewer-${number}`);+ let number = 1;+ while (existsSync(location(number))) number++;+ const path = location(number);+ const command = `cd ${quote(root)} && mkdir -p ${quote(dirname(path))} && git worktree add --detach ${quote(path)} HEAD && cd ${quote(path)} && pullboard join ${lane} --model "<model name>" && pullboard next --verify${id ? ' ' + id : ''}`;+ return `Use a different agent session; the reviewer must not be the builder. Run: ${command}`;+ }/** The coordinator carries every seat's request for a person decision [B26]. */export const COORDINATOR_PERSON_REQUEST = 'ask the coordinator to bring it to the person: pullboard shout coordinator "<what is needed>" --decision';