Skip to content

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.

Merge commit '5731332b730960c6bcf4d79afa11e1864db9114b' into HEAD

Corey Olson1f4af84a77e9
diff --cc src/init.js
index 7c22c502,31c53eb3..24b66202
--- a/src/init.js
+++ b/src/init.js
@@@ -4,8 -4,9 +4,9 @@@
* the main checkout as the coordinator. It runs again safely and never overwrites a file it did not
* write.
*/
-import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
+import { accessSync, appendFileSync, constants as fsConstants, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
- import { delimiter, basename, join, resolve } from 'node:path';
++import { delimiter, basename, isAbsolute, join, parse, relative, resolve, sep } from 'node:path';
+ import { userInfo } from 'node:os';
-import { basename, isAbsolute, join, parse, relative, resolve, sep } from 'node:path';
import { CONFIG_FILE, COORDINATOR, doctrineFile, loadConfig } from './config.js';
import { loadDoctrine } from './doctrine.js';
import { installHooks } from './hooks.js';
@@@ -259,10 -318,9 +379,10 @@@ export function initRepo({ info, openBo
const { root } = info;
const doctrine = existsSync(join(root, CONFIG_FILE)) ? loadConfig(root).practice : doctrineFile(root);
const gate = detectGate(root);
+ const configured = configuredGate(root);
const written = [];
/** Record only paths setup actually writes; unrelated files never enter its staging command. */
- const onWrite = (path) => written.push(path);
+ const onWrite = (path) => { if (!written.includes(path)) written.push(path); };
const notes = [
writeNew(join(root, CONFIG_FILE), configTemplate(gate, detectFixers(root)), CONFIG_FILE, onWrite),
writeNew(join(root, 'SPEC.md'), specTemplate(basename(root), gate), 'SPEC.md', onWrite),
@@@ -273,10 -331,11 +393,15 @@@
...installSkills(root, onWrite),
writeSessionHook(root, onWrite),
];
+ if (gate && (!configured || configured === gate)) {
+ const gateNote = missingGateNote(root, gate);
+ if (gateNote) notes.push(gateNote);
+ }
+ if (permissions) {
+ const gateForPermissions = configuredGate(root) || gate;
+ notes.push(writeClaudeLoopPermissions(root, gateForPermissions, onWrite));
+ notes.push(writeCodexLoopRules(root, gateForPermissions, onWrite));
+ }
const board = openBoardHere();
try {
register(board, { lane: COORDINATOR, path: root, model });