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(presence): summarize status and opt into gone seats [B3,N37]
Corey Olson3a6a810f9cfc
diff --git a/src/commands/status.js b/src/commands/status.jsindex 412f63e8..49da0b07 100644--- a/src/commands/status.js+++ b/src/commands/status.js@@ -37,8 +37,11 @@ export async function run(io, { values }) {const me = identifyCaller(ctx, board, { environmentAgent: environment?.environmentAgent ?? (() => null),relayLinked: relay?.relayLinked ?? (() => false) }, readers);const mine = store.itemsInStatus(board, 'claimed', me.id);+ const agents = store.listAgents(board);+ const presenceCounts = { live: 0, idle: 0, gone: 0 };+ for (const seat of agents) presenceCounts[seat.presence] += 1;const approvalState = personNeedsSummary(ctx.info.root, { board, config: ctx.config });- return { me, mine, agents: store.listAgents(board), ruleCounts: ruleProofCounts(ctx.info.root, board, approvalState.spec), needs: approvalState.needs, specApprovalBaseline: approvalState.specApprovalBaseline, specApprovalEvidenceErrors: approvalState.specApprovalEvidenceErrors, stats: store.stats(board), reviewQueue: { ...store.reviewQueue(board), ...store.reviewQueueBreakdown(board) }, unread: store.unreadCount(board, me.id), relay: relay ? relay.relayStatus(ctx.info.root) : unlinkedRelayStatus(),+ return { me, mine, agents, presenceCounts, ruleCounts: ruleProofCounts(ctx.info.root, board, approvalState.spec), needs: approvalState.needs, specApprovalBaseline: approvalState.specApprovalBaseline, specApprovalEvidenceErrors: approvalState.specApprovalEvidenceErrors, stats: store.stats(board), reviewQueue: { ...store.reviewQueue(board), ...store.reviewQueueBreakdown(board) }, unread: store.unreadCount(board, me.id), relay: relay ? relay.relayStatus(ctx.info.root) : unlinkedRelayStatus(),submitInvariantProposals: submitInvariantProposals(store.submitInvariantEvents(board, ctx.config), ctx.config) };});if (values.json) {@@ -53,7 +56,8 @@ export async function run(io, { values }) {if (summary.specApprovalBaseline?.pending) io.say('approval baseline pending: the next coordinator or person command in the main checkout records the existing approved rows; lane work may continue and none are flagged until then');if (summary.specApprovalBaseline?.invalid) io.say('approval baseline unreadable: existing rows need approval evidence; restore a known-good board export to recover the original baseline');io.say(reviewQueueLine(ctx, summary.reviewQueue, span));- for (const seat of summary.agents) io.say(`${seat.agent_id}: ${seat.presence}${seat.heartbeatAt ? ` (heartbeat ${seat.heartbeatAt})` : ' (no local heartbeat)'}`);+ io.say(`seats: ${summary.presenceCounts.live} live, ${summary.presenceCounts.idle} idle, ${summary.presenceCounts.gone} gone`);+ for (const seat of summary.agents.filter(seat => values.all || seat.presence !== 'gone')) io.say(`${seat.agent_id}: ${seat.presence}${seat.heartbeatAt ? ` (heartbeat ${seat.heartbeatAt})` : ' (no local heartbeat)'}`);for (const proposal of summary.submitInvariantProposals) io.say(submitInvariantLine(proposal));for (const need of summary.needs.filter(need => need.kind === 'agent-approved')) io.say(`${need.text}; ${need.what}`);if (!summary.relay.linked && !originRepository(ctx.info.root, { optional: true })) {diff --git a/src/help.js b/src/help.jsindex 40f52217..8d15e373 100644--- a/src/help.js+++ b/src/help.js@@ -338,7 +338,7 @@ const HELP_ALIASES = {lanes: { usage: 'pullboard lanes', source: 'whoami' },agents: { usage: 'pullboard agents', source: 'whoami' },lane: { usage: 'pullboard lane add <name> --owns <path>[,<path>]', source: 'lane add' },- status: { usage: 'pullboard status', source: 'whoami' },+ status: { usage: 'pullboard status [--all]', source: 'whoami' },done: { usage: 'pullboard done <id>', source: 'submit <id>' },inbox: { usage: 'pullboard inbox', source: null },'check accept': { usage: 'pullboard check accept <id>', source: 'check accept' },@@ -389,6 +389,10 @@ const HELP_FLAG_EXPLANATIONS = {/** Lines a command's own help adds after its example. */const HELP_NOTES = {+ status: [+ 'Counts include live, idle and gone identities; plain text lists only live and idle seats.',+ '--all includes gone seats. JSON retains the full identity history and presence counts.',+ ],resume: ['Ordinary resume reads the current work card and recorded health without running diagnostics or watches.','Use --diagnostics explicitly for setup, hooks, dirty files and stale-work checks.',diff --git a/src/json.js b/src/json.jsindex b213b691..ce8b24ee 100644--- a/src/json.js+++ b/src/json.js@@ -45,7 +45,7 @@ export const JSON_SHAPES = {badge: shape({ items: 'number', checked: 'number', percent: 'number|null', changed: 'array' }),status: shape({ me: 'object', mine: 'array', ruleCounts: 'object', stats: 'object', reviewQueue: 'object', unread: 'number', relay: 'object' }),doctor: shape({ problems: 'array' }),- heartbeat: shape({ seat: 'string', presence: 'string', heartbeatAt: 'string' }),+ heartbeat: shape({ seat: 'string|null', presence: 'string', heartbeatAt: 'string|null' }),health: shape({ asOf: 'string', thresholds: 'object', stuck: 'array', waiting: 'array' }),'sentinel propose': shape({ sentinel: 'object' }),'sentinel approve': shape({ sentinel: 'object' }),diff --git a/test/cli-help.test.js b/test/cli-help.test.jsindex 16370771..e3acc539 100644--- a/test/cli-help.test.js+++ b/test/cli-help.test.js@@ -77,10 +77,10 @@ test('command help forms and flags match the declaration, with a full list onlyfor (const name of resultCommands()) assert.ok(HELP.commands[name], `result command ${name} has a help declaration`);assert.deepEqual(HELP.commands.whoami.usages, ['pullboard whoami']);assert.deepEqual(HELP.commands.lanes.usages, ['pullboard lanes']);- assert.deepEqual(HELP.commands.status.usages, ['pullboard status']);+ assert.deepEqual(HELP.commands.status.usages, ['pullboard status [--all]']);for (const name of ['whoami', 'lanes', 'status']) {const usages = run('help', name).stdout.match(/^Usage:.*$/gmu);- assert.deepEqual(usages, [`Usage: pullboard ${name}`]);+ assert.deepEqual(usages, [`Usage: pullboard ${name}${name === 'status' ? ' [--all]' : ''}`]);}const mustHaveFlags = [['spec signoff', ['--note', '--note-file <file>']],