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(next): give idle seats ranked work and reasons [N2,I6,N25]
Corey Olsonad72a9aded59
diff --git a/src/commands/next.js b/src/commands/next.jsindex a612bc60..07378f88 100644--- a/src/commands/next.js+++ b/src/commands/next.js@@ -20,6 +20,7 @@ import {nextOnce,sayBrief,span,+ whoAmI,withBoard,withBoardRead,} from '../cli.js';@@ -91,7 +92,8 @@ export async function nextHere(io, values) {if (!found.retry && (found.laneWork || Date.now() >= deadline)) {if (values.verify) refuseWhileBuilding(ctx);const agents = withBoardRead(ctx, (board) => store.listAgents(board));- return refuseNextIdle(io, found.reasons, found.reasons.map((reason) => displayedWait(reason, agents, ctx.config)), { minutes, verify: values.verify, laneWork: found.laneWork });+ const seat = withBoardRead(ctx, (board) => whoAmI(ctx, board));+ return refuseNextIdle(io, found.reasons, found.reasons.map((reason) => displayedWait(reason, agents, ctx.config)), { minutes, verify: values.verify, laneWork: found.laneWork, lane: seat.lane, route: seat.route });}if (!found.retry) await new Promise((done) => setTimeout(done, 5000));}diff --git a/src/commands/resume.js b/src/commands/resume.jsindex 60f9983d..89aae755 100644--- a/src/commands/resume.js+++ b/src/commands/resume.js@@ -337,12 +337,12 @@ export async function resumeHere(io, view, diagnostics = false, { json = false }if (!diagnostics && next.startsWith('merge #')) next = 'pullboard land (checks current verdicts before merging)';}else if (card.holding.length) next = buildNext(card);- else if (card.sentBack.length) next = reworkNext(card);- else if (card.hold) next = 'wait for the hold to lift: pullboard next --wait 9 (minutes)';+ else if (card.sentBack.length) next = `pullboard next; ${reworkNext(card)}`;+ else if (card.hold) next = 'pullboard next --wait 9 (minutes); the lane hold must lift before its work is available';else if (ready) next = `pullboard next (${ready} ready in your lane)`;else if (inLane.length) next = `pullboard next --wait 9 (minutes); ${inLane.length} in your lane ${inLane.length === 1 ? 'waits' : 'wait'} on other work`;else if (card.awaiting.length) next = 'pullboard next --wait 9 (minutes); a rejected item comes back to your lane';- else next = 'nothing open in your lane; pullboard next --verify names work you can check';+ else next = 'pullboard next; take its ranked work, including eligible reviews or work in another lane';if (card.setup) next = card.setup.agentNext ?? card.setup.command;if (card.commits) next = commitFirst(card.commits, next);if (card.inbox) next = inboxFirst(card.inbox, next);diff --git a/src/next-steps.js b/src/next-steps.jsindex 18842fb5..7bc03fb9 100644--- a/src/next-steps.js+++ b/src/next-steps.js@@ -51,12 +51,13 @@ export function mainLaneWork(items) {}/** Preserve empty-queue refusals while sending a main-checkout newcomer to existing lane work. */-export function refuseNextIdle(io, reasons, displayed, { minutes, verify, laneWork }) {+export function refuseNextIdle(io, reasons, displayed, { minutes, verify, laneWork, lane, route }) {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}`);+ const scope = lane && route ? `lane ${lane}, route ${route}: ` : '';+ io.refusal?.(new Refused('NOTHING_FREE', scope + reasons.join('; ') + repair, laneWork?.next));+ io.err(`pullboard: [NOTHING_FREE] ${scope}${displayed.join('; ')}${repair}`);return 1;}import { existsSync } from 'node:fs';diff --git a/src/templates.js b/src/templates.jsindex 1e26fbe9..33a86398 100644--- a/src/templates.js+++ b/src/templates.js@@ -132,7 +132,7 @@ It prints the folder to work in and what to run there first. Every join needs th**The loop.**1. \`pullboard resume\` at the start of every session and after your context is compacted: your claim, what came back, unread shouts and the next step. Then \`pullboard inbox\`.-2. \`pullboard next\` claims the next free item your session can take across the lanes, by release and queue rank. It names the lane worktree to use and opens one when your session has none there; begin subsequent commands in that folder. Each worktree still owns only its lane’s files. Joining associates the seat with the invoking agent session automatically; no person setup is needed. When everything is waiting on other work, \`pullboard next --wait 9\` keeps looking for up to 9 minutes, which fits one tool call with a ten-minute timeout; run it again to keep waiting. A claim is a 2-hour lease; claim again to renew. The criterion freezes now: \`pullboard show <id>\` is the bar your work is judged against, and its brief says how to start. \`pullboard why <id>\` lists the decisions that changed it, newest first. When your own answer, verdict or fact changes other items, name them with \`--implies <ids>\` so each one carries it. A claim or submit refused as CRITERION_PROVES_NOTHING names a check that already passes on main, so it proves nothing: shout the coordinator for a check that fails before the work. Only the person accepts a check as it stands, with \`pullboard check accept <id>\` from the main checkout or the view.+2. If you have no active claim, run \`pullboard next\` now and take what it returns; never wait for an assignment. \`pullboard next\` claims the next free item your session can take across the lanes, by release and queue rank. It names the lane worktree to use and opens one when your session has none there; begin subsequent commands in that folder. Each worktree still owns only its lane’s files. Joining associates the seat with the invoking agent session automatically; no person setup is needed. When everything is waiting on other work, \`pullboard next --wait 9\` keeps looking for up to 9 minutes, which fits one tool call with a ten-minute timeout; run it again to keep waiting. A claim is a 2-hour lease; claim again to renew. The criterion freezes now: \`pullboard show <id>\` is the bar your work is judged against, and its brief says how to start. \`pullboard why <id>\` lists the decisions that changed it, newest first. When your own answer, verdict or fact changes other items, name them with \`--implies <ids>\` so each one carries it. A claim or submit refused as CRITERION_PROVES_NOTHING names a check that already passes on main, so it proves nothing: shout the coordinator for a check that fails before the work. Only the person accepts a check as it stands, with \`pullboard check accept <id>\` from the main checkout or the view.3. Build inside your lane's folders (\`pullboard lanes\`). Pre-commit refuses anything else; shout the owner instead.4. Commit, then \`pullboard submit <id>\`. It needs a clean tree and the gate green at HEAD.5. A different agent verifies: \`pullboard next --verify\` names the next item to check. It checks out the submitted commit and runs \`pullboard verify <id> accept --note "how it proved it"\`, or \`pullboard verify <id> reject --reason TEST_FAILURE --note "what failed"\`.diff --git a/test/e2e-cli.test.js b/test/e2e-cli.test.jsindex 65562f9c..771ad3ca 100644--- a/test/e2e-cli.test.js+++ b/test/e2e-cli.test.js@@ -388,7 +388,7 @@ test('every wait pullboard suggests names its unit and fits one ten-minute toolassert.match(box.run(box.web, 'next').err, /To keep looking: pullboard next --wait 9 \(minutes; give the command a ten-minute timeout\)/);assert.match(box.run(box.web, 'resume').out, /next: pullboard next --wait 9 \(minutes\); 1 in your lane waits on other work/);box.run(box.repo, 'hold', 'web', '--reason', 'G1 is changing');- assert.match(box.run(box.web, 'resume').out, /next: wait for the hold to lift: pullboard next --wait 9 \(minutes\)/);+ assert.match(box.run(box.web, 'resume').out, /next: pullboard next --wait 9 \(minutes\); the lane hold must lift/);const agents = readFileSync(join(box.repo, 'AGENTS.md'), 'utf8');assert.match(agents, /`pullboard next --wait 9` keeps looking for up to 9 minutes, which fits one tool call with a ten-minute timeout/);assert.doesNotMatch(agents, /--wait 30/);