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(spec): move approval bootstrap out of CLI [S1,H16]
Corey Olson59a7b45c0ba0
diff --git a/src/cli.js b/src/cli.jsindex 3f17f381..81d83547 100644--- a/src/cli.js+++ b/src/cli.js@@ -214,7 +214,10 @@ import {unmetRows,} from './spec.js';import { refuseAgentApprovedRows } from './spec-approval.js';-import { initialSpecApprovalBaseline } from './spec-approval-bootstrap.js';+import {+ ensureSpecApprovalCoordinator,+ initialSpecApprovalBaseline,+} from './spec-approval-bootstrap.js';import {answerQuestion,landBlueprint,@@ -902,11 +905,7 @@ export async function ordered(ctx, board, operation, args) {() => store.recordSpecApprovalBaseline(board, ...values)): store.recordSpecApprovalBaseline(board, ...values);};- // A hand-configured local project's first command may create a worktree before any seat exists.- // Establish its local coordinator first; linked and recovered moves retain relay authority.- if (initialBaseline && ctx.info.isMain && !relayLinked(ctx.info.root) && !relayRecovered(ctx.info.root)) {- store.ensureCoordinator(board, ctx.info.root);- }+ ensureSpecApprovalCoordinator(ctx, board, initialBaseline);const actor = ctx.info.isMain ? COORDINATOR : store.agentAt(board, ctx.info.root)?.agent_id;if (initialBaseline && actor) await recordBaseline(actor);const result = await withItemSession(ctx.info, operation, args, () => relayLinked(ctx.info.root) || relayRecovered(ctx.info.root)diff --git a/src/spec-approval-bootstrap.js b/src/spec-approval-bootstrap.jsindex 527504f4..4f2c4c62 100644--- a/src/spec-approval-bootstrap.js+++ b/src/spec-approval-bootstrap.js@@ -1,9 +1,21 @@/** Keep one compatibility setup move recoverable without stealing an interrupted work result [S1,H16]. */-import { specApprovalBaselineExists } from './board.js';+import {+ ensureCoordinator,+ specApprovalBaselineExists,+} from './board.js';import { loadConfig } from './config.js';-import { relayRecovered } from './relay.js';+import {+ relayLinked,+ relayRecovered,+} from './relay.js';import { captureSpecApprovalBaseline } from './spec-approval.js';+/** Establish cold local authority inside the checkout lease; linked and recovered moves keep relay authority. */+export function ensureSpecApprovalCoordinator(ctx, board, baseline) {+ if (!baseline || !ctx.info.isMain || relayLinked(ctx.info.root) || relayRecovered(ctx.info.root)) return;+ ensureCoordinator(board, ctx.info.root);+}+/** Reuse the exact interrupted setup payload; only a main-checkout command can establish it. */export function initialSpecApprovalBaseline(ctx, board, operation) {if (!ctx.info.isMain || operation === 'recordSpecApprovalBaseline') return null;