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
chore(merge): integrate accepted background baseline [V2,H16]
Corey Olson30a01761f146
diff --cc src/cli.jsindex 9a5a54eb,c0d16e39..dc23d502--- a/src/cli.js+++ b/src/cli.js@@@ -11,10 -11,11 +11,11 @@@ import { parseArgs } from 'node:util'import * as store from './board.js';import { CONFIG_FILE, COORDINATOR, loadConfig } from './config.js';import { doctrineHistory, loadDoctrine } from './doctrine.js';- import { requirePersonChannel } from './person.js';+ import { agentSessionDigest, requirePersonChannel } from './person.js';+ import { bindLocalSession } from './agent-session.js';import { decisionProjection, planRowApply, prepareRowDecisions, restoreRowApply, writeRowApply } from './row-decisions.js';import { digestOf, gateReport, runGate, runShell, withGateSlot } from './gate.js';-import { bareWorktreeFinding, contains, differFromHead, git, headCommit, headTree, isClean, mainCheckout, repoInfo, resolveCommit, tryGit, untracked } from './git.js';+import { bareWorktreeFinding, contains, differFromHead, git, gitChildEnv, headCommit, headTree, isClean, mainCheckout, repoInfo, resolveCommit, tryGit, untracked } from './git.js';import {FIX_NOTE,applyFixers,@@@ -71,34 -68,8 +72,35 @@@ import { executePersonRequests } from 'const PACKAGE = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));export const VERSION = PACKAGE.version;+ const CHECKOUT_LEASES = new WeakMap();+/**+ * Read the grandfather baseline from the primary checkout's attached branch, never a builder's head.+ *+ * @param {string} root+ * @param {string} path+ * @returns {{ status: number, stdout: string }}+ */+function coordinatorFile(root, path) {+ const commonDir = git(root, ['rev-parse', '--path-format=absolute', '--git-common-dir']);+ const coordinatorRoot = dirname(commonDir);+ const env = { ...gitChildEnv(root), GIT_NO_REPLACE_OBJECTS: '1' };+ const branch = spawnSync('git', ['symbolic-ref', '--quiet', 'HEAD'], {+ cwd: coordinatorRoot, env, encoding: 'utf8',+ });+ const ref = (branch.stdout ?? '').trim();+ if (branch.status !== 0 || !ref.startsWith('refs/heads/')) {+ throw new Refused(+ 'COORDINATOR_DETACHED',+ 'the primary checkout must be on its attached local branch to establish the collision baseline; the coordinator returns it to its branch',+ );+ }+ const result = spawnSync('git', ['--no-replace-objects', 'show', `${ref}:${path}`], {+ cwd: coordinatorRoot, env, encoding: 'utf8',+ });+ return { status: result.status ?? 1, stdout: result.stdout ?? '' };+}+const ALL_HELP = `pullboard ${VERSION}: the local-first work board for teams of coding agents.Nothing ships until a second agent verifies it.@@@ -2547,8 -2503,10 +2608,10 @@@ function rememberTrunk(io)export async function main(argv, streams) {const io = commandOutput(argv, streams);let sync = true;+ let parsed;+ let checkoutSession;try {- const parsed = parseCommandArgs(argv);- parsed = parseArgs({ args: argv, options: OPTIONS, allowPositionals: true });++ parsed = parseCommandArgs(argv);const command = parsed.positionals[0];io.relayCommand = { cliOperation: command === 'done' ? 'submit' : command, cwd: resolve(io.cwd),positionals: parsed.positionals.slice(1),@@@ -2563,22 -2520,39 +2625,42 @@@}catch (error) {if (!(error instanceof Refused)) throw error;- if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err(`pullboard: ${error.message}`);+ io.refusal(error);+ io.err(`pullboard: ${error.message}`);+ io.flush(1);+ return 1;}- };- rememberTrunk(io);- if (sync) {- await retry();- try { await executePersonRequests(io.cwd, io, main); }- catch (error) {- if (!(error instanceof Refused)) throw error;- if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err('pullboard: ' + error.message);+ }+ try {+ /** A network refusal preserves offline reads; linked mutation dispatch requires an acknowledgement. */+ const retry = async () => {- try { await syncRelay(io.cwd, io); }++ try {++ await syncRelay(io.cwd, io);++ await retryCheckBaselines(io.cwd, io);++ }+ catch (error) {+ if (!(error instanceof Refused)) throw error;+ if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err(`pullboard: ${error.message}`);+ }+ };+ rememberTrunk(io);+ if (sync) {+ await retry();+ try { await executePersonRequests(io.cwd, io, main); }+ catch (error) {+ if (!(error instanceof Refused)) throw error;+ if (!['NOT_A_REPO', 'NO_REPO', 'NO_CONFIG', 'CORE_BARE'].includes(error.code)) io.err('pullboard: ' + error.message);+ }}+ const code = await runCommand(argv, io);+ if (code === 0) await checkoutSession?.finish?.();+ if (sync && code === 0) await retry();+ io.flush(code);+ return code;+ } finally {+ CHECKOUT_LEASES.delete(io);+ checkoutSession?.lease?.release();}- const code = await runCommand(argv, io);- if (sync && code === 0) await retry();- io.flush(code);- return code;}/** Result-producing command names, including aliases, for API contract coverage (A1). */