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(cli): verify and escalate take --note-file [V12]
Corey Olson2431308d9617
diff --git a/src/cli.js b/src/cli.jsindex 2ff82667..92ea416c 100644--- a/src/cli.js+++ b/src/cli.js@@ -82,6 +82,7 @@ Workpullboard submit <id> needs a clean tree and the gate green at HEAD (alias: done)pullboard verify <id> accept --note "what you broke or which edge you tried, and what happened"pullboard verify <id> reject --reason TEST_FAILURE --note "what failed"+ any --note can be --note-file <file>, which keeps quotes, $ and backticks intactpullboard shout <lane|agent|all> <text> pullboard inboxCoordinator@@ -119,6 +120,7 @@ const OPTIONS = {reason: { type: 'string' },off: { type: 'boolean' },note: { type: 'string' },+ 'note-file': { type: 'string' },by: { type: 'string' },out: { type: 'string' },after: { type: 'string' },@@ -168,23 +170,34 @@ function idArg(text, what = 'an item id') {const idList = (text) => (text ?? '').split(',').map((id) => id.trim()).filter(Boolean);/**- * The brief a command was given, from --brief or --brief-file, or undefined when neither.+ * Text a command was given as --<name> "..." or as --<name>-file <file>, or undefined when neither.+ * A file carries text past the shell exactly: backticks, dollar signs and quotes included.** @param {any} io* @param {any} values+ * @param {string} name* @returns {string | undefined}*/-function briefArg(io, values) {- const path = values['brief-file'];- if (values.brief !== undefined && path !== undefined) {- throw new Refused('USAGE', 'give the brief once: --brief "..." or --brief-file <file>');+function textArg(io, values, name) {+ const path = values[`${name}-file`];+ if (values[name] !== undefined && path !== undefined) {+ throw new Refused('USAGE', `give the ${name} once: --${name} "..." or --${name}-file <file>`);}- if (path === undefined) return values.brief;+ if (path === undefined) return values[name];const file = resolve(io.cwd, path);if (!existsSync(file)) throw new Refused('NO_FILE', `no file ${path}`);return readFileSync(file, 'utf8');}+/**+ * The brief a command was given, from --brief or --brief-file.+ *+ * @param {any} io+ * @param {any} values+ * @returns {string | undefined}+ */+const briefArg = (io, values) => textArg(io, values, 'brief');+/*** The start of a command an agent can paste anywhere: agent shells often start each command in the* main checkout, so every command pullboard suggests names its folder (I5).@@ -739,7 +752,7 @@ function verifyHere(ctx, id, { second, values }) {agentId: me.id,decision,reason: values.reason,- note: values.note ?? '',+ note: textArg(ctx.io, values, 'note') ?? '',head,digest,policy: ctx.config.verify,@@ -930,9 +943,10 @@ function workCommands(io, args) {}),escalate: () => act((ctx, board, me) => {const id = idArg(first);- const moved = store.escalate(board, id, { agentId: me.id, note: values.note ?? '' });+ const note = textArg(io, values, 'note') ?? '';+ const moved = store.escalate(board, id, { agentId: me.id, note });if (me.id !== COORDINATOR) {- store.shout(board, { from: me.id, to: COORDINATOR, text: `#${id} escalated ${moved.from} -> ${moved.to}: ${values.note}`, lanes: laneNames(ctx.config) });+ store.shout(board, { from: me.id, to: COORDINATOR, text: `#${id} escalated ${moved.from} -> ${moved.to}: ${note}`, lanes: laneNames(ctx.config) });}io.say(`#${id} escalated ${moved.from} -> ${moved.to}; it is open for a ${moved.to} agent`);return 0;diff --git a/test/e2e.test.js b/test/e2e.test.jsindex 765fd698..d76456b9 100644--- a/test/e2e.test.js+++ b/test/e2e.test.js@@ -786,3 +786,25 @@ test('submit leaves a dependency fast-forwarded in out of the files it records [assert.equal(box.run(second, 'submit', '2').code, 0);assert.equal(JSON.parse(box.run(box.repo, 'show', '2', '--json').out).item_files, 'web/page.html');});++test('verify and escalate take a note from a file, exactly as written [V12]', () => {+ const box = project();+ box.run(box.repo, 'add', 'web', 'Page', '--specs', 'G1');+ box.run(box.web, 'claim', '1');+ commitFile(box, box.web, 'web/a.html', 'a', 'feat(web): page [G1]');+ box.run(box.web, 'submit', '1');+ const note = 'ran `npm test` with $HOME unset: "it failed"\nthen restored it';+ writeFileSync(join(box.dir, 'note.txt'), `${note}\n`);+ box.git(box.repo, 'switch', '-q', '--detach', 'web/one');+ assert.match(box.run(box.repo, 'verify', '1', 'reject', '--reason', 'TEST_FAILURE', '--note', 'x', '--note-file', join(box.dir, 'note.txt'), '--as', 'coordinator').err, /USAGE\] give the note once/);+ assert.match(box.run(box.repo, 'verify', '1', 'reject', '--reason', 'TEST_FAILURE', '--note-file', join(box.dir, 'nope.txt'), '--as', 'coordinator').err, /NO_FILE/);+ assert.match(box.run(box.repo, 'verify', '1', 'reject', '--reason', 'TEST_FAILURE', '--note-file', join(box.dir, 'note.txt'), '--as', 'coordinator').out, /rejected #1/);+ assert.equal(JSON.parse(box.run(box.repo, 'show', '1', '--json').out).verdicts[0].verdict_note, note);+ box.git(box.repo, 'switch', '-q', 'main');+ box.run(box.repo, 'add', 'web', 'Light', '--route', 'light', '--criterion', 'says hi', '--check', 'true', '--brief', LIGHT_BRIEF);+ const light = box.run(box.repo, 'worktree', 'web', '--route', 'light').out.match(/^made (\S+) /)[1];+ box.run(light, 'claim', '2');+ assert.match(box.run(light, 'escalate', '2', '--note-file', join(box.dir, 'note.txt')).out, /#2 escalated light -> mid/);+ assert.match(box.run(box.repo, 'show', '2').out, /ran `npm test` with \$HOME unset: "it failed"/);+ assert.match(box.run(box.repo, 'help').out, /--note-file <file>/);+});