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
test(doctrine): use canonical collision fixtures [A5,I1]
Corey Olson34ec41bcf23a
diff --git a/test/e2e.test.js b/test/e2e.test.jsindex 49fb6628..1dba7a6a 100644--- a/test/e2e.test.js+++ b/test/e2e.test.js@@ -177,18 +177,18 @@ test('init writes config, spec, agent docs and hooks once, and never clobbers [Iassert.equal(readFileSync(join(repo, 'CLAUDE.md'), 'utf8'), '@AGENTS.md\n');assert.equal(box.git(repo, 'config', '--get', 'core.hooksPath'), '.githooks');for (const hook of ['pre-commit', 'commit-msg', 'pre-push']) assert.ok(existsSync(join(repo, '.githooks', hook)));- const practice = readFileSync(join(repo, 'DOCTRINE.md'), 'utf8');- assert.ok(practice.startsWith('# Doctrine'));- assert.deepEqual(parseSpec(practice).rows, [], 'fresh init copies no standard rules [D4]');- assert.equal(parseSpec(practice).sections.length, 6);- assert.equal(practice.split('Inherits Pullboard standard doctrine version 1.').length, 2);+ const doctrine = readFileSync(join(repo, 'DOCTRINE.md'), 'utf8');+ assert.ok(doctrine.startsWith('# Doctrine'));+ assert.deepEqual(parseSpec(doctrine).rows, [], 'fresh init copies no standard rules [D4]');+ assert.equal(parseSpec(doctrine).sections.length, 6);+ assert.equal(doctrine.split('Inherits Pullboard standard doctrine version 1.').length, 2);assert.equal(box.run(repo, 'spec', 'check').code, 0, 'fresh init has no repeated ids [A5]');const specRows = parseSpec(readFileSync(join(repo, 'SPEC.md'), 'utf8'));- const practiceRows = parseSpec(practice);+ const doctrineRows = parseSpec(doctrine);const specPrefixes = specRows.sections.map(({ name }) => /^([A-Z])\s/u.exec(name)?.[1]).filter(Boolean);- const practicePrefixes = parseSpec(practice).sections.map(({ name }) => /^([A-Z])\s/u.exec(name)?.[1]).filter(Boolean);- assert.equal(specPrefixes.some((prefix) => practicePrefixes.includes(prefix)), false, 'init assigns distinct row prefixes to SPEC and PRACTICE');- for (const [file, parsed] of [['SPEC.md', specRows], ['PRACTICE.md', practiceRows]]) {+ const doctrinePrefixes = doctrineRows.sections.map(({ name }) => /^([A-Z])\s/u.exec(name)?.[1]).filter(Boolean);+ assert.equal(specPrefixes.some((prefix) => doctrinePrefixes.includes(prefix)), false, 'init assigns distinct row prefixes to SPEC and DOCTRINE');+ for (const [file, parsed] of [['SPEC.md', specRows], ['DOCTRINE.md', doctrineRows]]) {const source = readFileSync(join(repo, file), 'utf8');const additions = parsed.sections.map(({ name }) => {const prefix = /^([A-Z])\s/u.exec(name)?.[1];@@ -294,16 +294,16 @@ test('items and commit headers cite doctrine rows by namespace; bare collisionsassert.equal(namespaced.code, 0, namespaced.err);assert.doesNotMatch(namespaced.out, /warning:/u);- const practice = readFileSync(join(box.repo, 'PRACTICE.md'), 'utf8');- writeFileSync(join(box.repo, 'PRACTICE.md'), `${practice}\n## Local\n- G1 [draft] A local rule colliding with SPEC.md.\n`);+ const doctrine = readFileSync(join(box.repo, 'DOCTRINE.md'), 'utf8');+ writeFileSync(join(box.repo, 'DOCTRINE.md'), `${doctrine}\n## Local\n- G1 [draft] A local rule colliding with SPEC.md.\n`);writeFileSync(message, 'feat(web): use the product rule [G1]\n');const warning = box.run(box.repo, 'hook', 'commit-msg', message);assert.equal(warning.code, 0, warning.err);- assert.match(warning.out, /warning: G1 is a known collision at SPEC\.md:4 and PRACTICE\.md:\d+; bare ids cite SPEC\.md/u);+ assert.match(warning.out, /warning: G1 is a known collision at SPEC\.md:4 and DOCTRINE\.md:\d+; bare ids cite SPEC\.md/u);assert.match(warning.out, /use doctrine:G1 for a doctrine row/u);const check = box.run(box.repo, 'spec', 'check');assert.equal(check.code, 1);- assert.match(check.out, /duplicate id; also appears at PRACTICE\.md:/u);+ assert.match(check.out, /duplicate id; also appears at DOCTRINE\.md:/u);});test('the board lives in the git common dir; every worktree sees it; nothing is committed [B1, B3]', () => {diff --git a/test/hooks.test.js b/test/hooks.test.jsindex c7bae752..d8b24cb8 100644--- a/test/hooks.test.js+++ b/test/hooks.test.js@@ -50,7 +50,7 @@ test('feat and fix cite ids; cited ids exist and are not retired [C2]', () => {test('doctrine citations are namespaced; a colliding bare id warns that it resolves to SPEC.md [A5]', () => {const doctrine = {- name: 'PRACTICE.md',+ name: 'DOCTRINE.md',repo: { rows: [{ id: 'G1', line: 4 }] },rows: [{ id: 'G1', status: 'approved' }, { id: 'PB1', status: 'approved' }],};@@ -58,7 +58,7 @@ test('doctrine citations are namespaced; a colliding bare id warns that it resolassert.deepEqual(commitMsgProblems('feat(web): add the rule [doctrine:G1]', { rules: RULES, spec: SPEC, doctrine }), []);assert.match(commitMsgProblems('fix(web): add the rule [doctrine:missing]', { rules: RULES, spec: SPEC, doctrine })[0], /doctrine:missing is not in doctrine/u);assert.deepEqual(commitCitationWarnings('feat(web): patch the rule [G1]', { spec: SPEC, doctrine }), [- 'G1 is a known collision at SPEC.md:2 and PRACTICE.md:4; bare ids cite SPEC.md, use doctrine:G1 for a doctrine row',+ 'G1 is a known collision at SPEC.md:2 and DOCTRINE.md:4; bare ids cite SPEC.md, use doctrine:G1 for a doctrine row',]);});