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
/** The pullboard fact command, in its own module so an item adding another command never edits these lines. */
import {
parseImplies,
} from '../implies.js';
import {
requirePersonChannel,
} from '../person.js';
import {
requireSignedPerson,
} from '../person-signing-cli.js';
import {
Refused,
} from '../refused.js';
import {
actOn,
idArg,
ordered,
personMode,
} from '../cli.js';
/** Run `pullboard fact` and return its exit code. */
export async function run(io, { first, second, rest, values }) {
const act = (work) => actOn(io, work);
return act(async (ctx, board, me) => {
if (!first || !second || rest.length !== 1) throw new Refused('USAGE', 'pullboard fact <id> <kind> <text> [--answers <bar-check-fact-id>] [--supersedes <fact-id>] [--ref path:lines@full-sha] [--implies <ids>] [--cause <key> --never-again --as person]');
const id = idArg(first);
const implies = parseImplies(values.implies);
const asPerson = values.as === 'person' && personMode(ctx, me, values);
if (asPerson || values['never-again'] || values.cause !== undefined) {
const confirmed = await requireSignedPerson(ctx, board, me, { verb: 'fact', item: id, args: { kind: second, text: rest[0], as: 'person',
...(values.supersedes === undefined ? {} : { supersedes: String(values.supersedes) }), ...(values.ref === undefined ? {} : { ref: String(values.ref) }),
...(values.implies === undefined ? {} : { implies: String(values.implies) }), ...(values.cause === undefined ? {} : { cause: String(values.cause) }),
...(values['never-again'] ? { 'never-again': true } : {}) } });
if (confirmed !== null) return confirmed;
}
if (asPerson) requirePersonChannel(ctx.io.personChannel);
const marked = asPerson || values['never-again'] || values.cause !== undefined
? { cause: values.cause ?? null, neverAgain: Boolean(values['never-again']), asPerson, channel: ctx.io.personChannel ?? 'terminal' } : {};
const fact = await ordered(ctx, board, 'appendFact', [id, { agentId: me.id, kind: second,
text: rest[0], supersedes: values.supersedes ?? null, answers: values.answers ?? null,
ref: values.ref ?? null, ...(implies ? { implies } : {}), ...marked }]);
io.result?.({ item: id, fact });
io.say(`fact ${fact.id} appended to #${id} as ${fact.kind}`);
return 0;
});
}