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
refactor(queue): the queue command lives in queue.js [N2]
Corey Olson42bb39b981eb
diff --git a/src/cli.js b/src/cli.jsindex 170b675a..173ed7e4 100644--- a/src/cli.js+++ b/src/cli.js@@ -2426,13 +2426,7 @@ function readCommands(io, { first, second, rest, values }) {else filtered.forEach((item) => io.say(itemLine(item, (id) => agentDisplayName(agents, ctx.config, id), merging.has(item.item_id))));return 0;},- queue: () => {- if (first || second || rest.length) throw new Refused('USAGE', 'pullboard queue takes no arguments');- const queue = withBoard(context(io), (board) => queueView.workQueue(board));- io.result?.(queue);- queueView.sayQueue(io, queue);- return 0;- },+ queue: () => queueView.queueCommand(io, [first, second, ...rest], (work) => withBoard(context(io), work)),roadmap: () => {if (first || second || rest.length) throw new Refused('USAGE', 'pullboard roadmap takes no arguments');const ctx = context(io);diff --git a/src/queue.js b/src/queue.jsindex 79cba514..b7a0c0cf 100644--- a/src/queue.js+++ b/src/queue.js@@ -5,6 +5,7 @@* get from next now. The order is the board's own buildOrder, never a second copy, so the queue and* next cannot disagree. It is for agents and coordinators; the person reads the Roadmap instead.*/+import { Refused } from './refused.js';import {buildOrder,canTake,@@ -91,3 +92,19 @@ export function sayQueue(io, queue) {if (!queue.releases.length && !queue.unreleased.length) io.say('nothing in the queue');io.say(`next now: ${Object.entries(queue.first).map(([route, id]) => `${route} → ${id === null ? 'nothing' : `#${id}`}`).join(', ')}`);}++/**+ * The pullboard queue command: no arguments; prints the queue and sets its JSON result.+ *+ * @param {any} io+ * @param {(string | undefined)[]} words+ * @param {(work: (board: any) => any) => any} read - opens the board for one read+ * @returns {number}+ */+export function queueCommand(io, words, read) {+ if (words.some((word) => word !== undefined)) throw new Refused('USAGE', 'pullboard queue takes no arguments');+ const queue = read((board) => workQueue(board));+ io.result?.(queue);+ sayQueue(io, queue);+ return 0;+}