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(view): the feed shows open decisions as their own queue [N26]
Corey Olsonea306da77ac7
diff --git a/src/cockpit.js b/src/cockpit.jsindex d55b111f..bbb35103 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -193,7 +193,7 @@ ${hostedLocal && !snapshot ? '<div class="hosted-mark" aria-hidden="true"><svg v</section><section data-pane="shouts" class="two narrow" id="shouts-pane"><div class="primary">- <div class="card-panel shouts-card"><form id="shout-form" class="shout-form"><p class="answering" id="answering" hidden><span>Answering <b id="answering-who"></b>: <span id="answering-q"></span></span><button class="ghost" id="answer-cancel" type="button">Cancel</button></p><div class="composer"><input id="shout-to" type="hidden" value="coordinator"><span class="to-chip" id="shout-to-chip" hidden></span><textarea id="shout-text" required rows="1" placeholder="Shout to the coordinator" aria-label="Message"></textarea><button class="send" id="shout-send" type="submit" aria-label="Shout" title="Shout (Enter; Shift+Enter for a new line)"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" d="M8 13V3M3.5 7.5 8 3l4.5 4.5"/></svg></button></div><span class="asks-slot" id="asks-slot"></span></form><section class="needs-you" id="decisions" aria-label="Decisions needed" hidden></section><div class="feed" id="feed"></div></div>+ <div class="card-panel shouts-card"><form id="shout-form" class="shout-form"><p class="answering" id="answering" hidden><span>Answering <b id="answering-who"></b>: <span id="answering-q"></span></span><button class="ghost" id="answer-cancel" type="button">Cancel</button></p><div class="composer"><input id="shout-to" type="hidden" value="coordinator"><span class="to-chip" id="shout-to-chip" hidden></span><textarea id="shout-text" required rows="1" placeholder="Shout to the coordinator" aria-label="Message"></textarea><button class="send" id="shout-send" type="submit" aria-label="Shout" title="Shout (Enter; Shift+Enter for a new line)"><svg viewBox="0 0 16 16" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" d="M8 13V3M3.5 7.5 8 3l4.5 4.5"/></svg></button></div><span class="asks-slot" id="asks-slot"></span></form><section class="needs-you" id="coordinator-decisions" aria-label="Coordinator decision queue" hidden></section><section class="needs-you" id="decisions" aria-label="Decisions needed" hidden></section><div class="feed" id="feed"></div></div></div><aside class="card-panel detail" aria-label="Agents and lanes"><div><h3 class="panel-head">Agents<button class="link" data-agents-toggle type="button">hide</button></h3><div id="agents"></div><section id="credentials" aria-label="Agent credentials"></section></div>@@ -580,7 +580,7 @@ function replayProject(index) {const shouted = new Set(log.map((event) => JSON.parse(event.event_detail).shout).filter(Boolean));p.shouts = p.shouts.filter((shout) => shouted.has(shout.shout_id));p.decisions = p.decisions.filter((shout) => shouted.has(shout.shout_id));- p.asked = p.asked.filter((shout) => shouted.has(shout.shout_id));+ p.asked = p.asked.filter((shout) => shouted.has(shout.shout_id)); p.decisionQueue = (p.decisionQueue || []).filter((shout) => shouted.has(shout.shout_id));const held = new Map();for (const event of log) {const detail = JSON.parse(event.event_detail);@@ -1357,11 +1357,11 @@ function render() {const card = (x, tail = '', inFeed = true) => '<article class="shout h' + hue(x.shout_from) + (lead(x.shout_from) ? ' lead' : '') + (openShouts.has(x.shout_id) ? ' open' : '') + (inFeed && x.shout_id === view.shout ? ' found' : '') + '"' + (inFeed ? ' id="shout-' + x.shout_id + '"' : '') + ' data-shout-id="' + x.shout_id + '">'+ (lead(x.shout_from) ? '<span class="avatar">' + LEAD + '</span>' : '<span class="avatar' + (initials(x.shout_from).length > 3 ? ' wide' : '') + '" aria-hidden="true">' + esc(initials(x.shout_from)) + '</span>') + '<div class="shout-main">' + (inFeed && x.shout_id === view.shout ? '<h2 class="visually-hidden">Shout #' + x.shout_id + '</h2>' : '') + '<header><b class="who">' + (x.shout_from === 'person' ? 'you' : shoutAgentName(x.shout_from)) + '</b><span class="to">→ ' + shoutTo(x.shout_to) + '</span>'+ (itemOf(x) ? '<span class="item">#' + esc(itemOf(x)) + '</span>' : '') + mark(x) + '<time class="long" data-ago="' + esc(x.shout_at) + '" title="' + esc(when(x.shout_at)) + '">' + agoLong(x.shout_at) + '</time></header>'- + '<div class="text">' + rich(x.shout_text, titles) + '</div><button class="more" data-more type="button">' + (openShouts.has(x.shout_id) ? 'less' : 'more') + '</button>' + (inFeed ? band(x) + heardBy(x) : '') + evidence(x) + tail + '</div></article>';+ + '<div class="text">' + rich(x.shout_text, titles) + (x.options ? '<ol>' + x.options.map((option) => '<li>' + esc(option) + '</li>').join('') + '</ol>' : '') + '</div><button class="more" data-more type="button">' + (openShouts.has(x.shout_id) ? 'less' : 'more') + '</button>' + (inFeed ? band(x) + heardBy(x) : '') + evidence(x) + tail + '</div></article>';$('feed').innerHTML = (view.shout !== null && !feedShouts.some((entry) => entry.shout_id === view.shout) ? '<p class="empty" id="shout-address-status" role="status">' + esc(addressed?.error || 'Loading shout #' + view.shout + '…') + '</p>' : '') + bar + (heard.length ? dayRules(heard, (x) => x.shout_at, card) : '<div class="empty">' + (unread ? 'No unread shouts.' : view.agent ? 'No shouts with ' + esc(agentName(view.agent)) + ' among the last forty.' : 'No shouts yet.') + '</div>');foldShouts();- // Each ask waits here until it is answered (B21); the answer itself is typed in the form below. The- // person answers the ones passed up to them; the rest wait on whoever holds them (B26).+ // Each ask waits here until answered (B21), typed in the form below; the person answers those passed up, the rest wait on their holder (B26).+ const coordinatorQueue = p.decisionQueue || []; $('coordinator-decisions').hidden = !coordinatorQueue.length; $('coordinator-decisions').innerHTML = coordinatorQueue.length ? '<div class="head"><i></i>Coordinator decisions</div>' + coordinatorQueue.map((d) => card(d, !readOnly && !requests && !snapshot ? '<button class="ghost answer" data-go="coordinate:' + d.shout_id + '" type="button">Answer as coordinator</button>' : '', false)).join('') : '';$('decisions').hidden = !p.decisions.length && !(p.asked.length && view.open.waiting);// The asks waiting on others are a toggle at the end of the composer's line, beside Show agents while the panel is hidden.$('asks-slot').innerHTML = (p.asked.length ? '<button class="asks-toggle" data-fold="waiting" type="button" aria-expanded="' + Boolean(view.open.waiting) + '" title="' + esc('Asks between agents, waiting on others: ' + p.asked.map((d) => agentName(d.shout_from) + ' asks ' + agentName(d.shout_to)).join(', ')) + '">' + p.asked.length + (p.asked.length === 1 ? ' ask' : ' asks') + ' waiting <span aria-hidden="true">' + (view.open.waiting ? '▴' : '▾') + '</span></button>' : '')diff --git a/src/serve.js b/src/serve.jsindex f43c8de2..faf38a58 100644--- a/src/serve.js+++ b/src/serve.js@@ -359,6 +359,7 @@ export function projectState(root, { seen = null, board: providedBoard = null, i// Every ask still waiting for an answer, however far back the forty shouts reach (B21): the// person's to answer here, and the rest with who holds them (B26).decisions: store.openDecisions(board, store.PERSON),+ decisionQueue: store.openDecisions(board, COORDINATOR),asked: store.openDecisions(board).filter((ask) => ask.shout_to !== store.PERSON),events: log,agents: store.listAgents(board).map((agent) => ({ ...agent, model: agent.agent_model ?? 'unknown', displayName: displayAgentName(agent, config.agents.names), lastMoveAt: lastMove.get(agent.agent_id) ?? null })),diff --git a/src/view/page-script-4.js b/src/view/page-script-4.jsindex c49ccae5..b47af3b7 100644--- a/src/view/page-script-4.js+++ b/src/view/page-script-4.js@@ -203,11 +203,11 @@ function addressTo(to) {* its To and its button change. The To the person had comes back when the answer is done. An answer* belongs to the project whose question it shows: leaving that project leaves answer mode.*/-function answer(id) {- const ask = id === null ? null : data.project.decisions.find((d) => d.shout_id === id) || null;+function answer(id, ordinary = false) {+ const ask = id === null ? null : (ordinary ? data.project.decisionQueue || [] : data.project.decisions).find((d) => d.shout_id === id) || null;if (ask && !view.answering) view.to = $('shout-to').value;if (!ask && view.answering) addressTo(view.to);- view.answering = ask ? { root: view.root, id: ask.shout_id } : null;+ view.answering = ask ? { root: view.root, id: ask.shout_id, ordinary } : null;$('answering').hidden = !ask;$('answering-who').textContent = ask ? agentName(ask.shout_from) : '';const question = ask ? linked(ask.shout_text, new Map(data.project.items.map((i) => [String(i.id), i.title]))) : '';@@ -257,6 +257,7 @@ function go(target, root = view.root) {else if (kind === 'doctrine') { tab = 'doctrine'; view.row.doctrine = id; view.rows.doctrine = 'all'; }else if (kind === 'shout') { tab = 'shouts'; view.agent = null; view.unread = null; }else if (kind === 'tab') tab = id;+ else if (kind === 'coordinate') { tab = 'shouts'; answer(Number(id), true); }else if (kind === 'decide') { tab = 'shouts'; answer(Number(id)); }if (kind === 'item') { view.tab = 'items'; view.itemsView = 'list'; pick(Number(id), root); }else { openTab(tab, ['spec', 'doctrine', 'shout'].includes(kind) ? id : null); render(); }@@ -426,6 +427,7 @@ function pageMove(command, args = {}) {return { body: { verb: 'add', args: fields }, label: label.join(' ') };}if (command === 'shout') return { body: { verb: 'shout', args: { to: text(args.to), text: text(args.text) } }, label: ['shout', text(args.to), text(args.text)].join(' ') };+ if (command === 'coordinator-answer') return { body: { verb: 'answer', item: Number(args.id), args: { text: text(args.text) } }, label: ['answer', text(args.id), text(args.text)].join(' ') };if (command === 'answer') return { body: { verb: 'answer', item: Number(args.id), args: { text: text(args.text), as: 'person' } }, label: ['answer', text(args.id), text(args.text), '--as', 'person'].join(' ') };if (command === 'hold') return { body: { verb: 'hold', args: { lane: text(args.lane), reason: text(args.reason) } }, label: ['hold', text(args.lane), '--reason', text(args.reason)].join(' ') };if (command === 'release') return { body: { verb: 'hold', args: { lane: text(args.lane), off: true } }, label: ['hold', text(args.lane), '--off'].join(' ') };@@ -1042,7 +1044,7 @@ $('shout-form').addEventListener('submit', async (event) => {const answerRoot = ask?.root ?? null;const answerId = ask?.id ?? null;if (ask && ask.root !== view.root) return answer(null);- if (!(await (ask ? act('answer', { id: ask.id, text }, event.currentTarget) : ($('shout-to').value === 'coordinator' ? act('request', { text }, event.currentTarget) : act('shout', { to: $('shout-to').value, text }, event.currentTarget))))) return;+ if (!(await (ask ? act(ask.ordinary ? 'coordinator-answer' : 'answer', { id: ask.id, text }, event.currentTarget) : ($('shout-to').value === 'coordinator' ? act('request', { text }, event.currentTarget) : act('shout', { to: $('shout-to').value, text }, event.currentTarget))))) return;const currentAnswer = view.answering;// An older completion must not erase a newer draft or answer selection.if (view.root !== root || $('shout-text').value !== text || (currentAnswer?.root ?? null) !== answerRoot