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(api): fold the two-blueprint catalog add into one exercise [S1,I1]
Corey Olsonb04c9bf2a8bc
diff --git a/test/api.test.js b/test/api.test.jsindex 7b23827a..bf4e9b77 100644--- a/test/api.test.js+++ b/test/api.test.js@@ -625,14 +625,8 @@ test('[A1] command results match the catalog across roots and subcommands', () =json(box, repo, 'spec', ['show', 'G1'], 'show');json(box, repo, 'spec', ['unmet'], 'unmet');assert.equal(json(box, repo, 'spec', ['draft', 'A draft API catalogue row'], 'draft').id, 'G2');- writeFileSync(join(box.dir, 'catalog-blueprint.json'), `${JSON.stringify({ blueprint: 1, name: 'catalog', title: 'Catalog', version: 1, rules: [{ key: 'R1', text: 'A catalog rule.', why: 'the API lists it.' }] })}\n`);- assert.equal(json(box, repo, 'blueprint', ['add', join(box.dir, 'catalog-blueprint.json')], 'add').rows[0].status, 'draft');- // Two blueprints in one add give one catalog result, the shared rule drafted once (#720).- const pair = (name, kind, rules) => writeFileSync(join(box.dir, `${name}.json`), `${JSON.stringify({ blueprint: 1, name, title: name, version: 1, kind, rules })}\n`);- pair('catalog-product', 'product', [{ key: 'R1', text: 'A paired catalog rule.', why: 'the API lists it.' }]);- pair('catalog-practice', 'practice', [{ key: 'R1', text: 'A paired catalog rule.', why: 'the API lists it.' }, { key: 'R2', text: 'A practice catalog rule.', why: 'the API lists it.' }]);- const paired = json(box, repo, 'blueprint', ['add', join(box.dir, 'catalog-product.json'), '--blueprint', join(box.dir, 'catalog-practice.json')], 'add');- assert.deepEqual([paired.rows.length, paired.blueprints.length, paired.blueprints[1].shared.length], [2, 2, 1], 'two blueprints land as one result');+ for (const [name, kind, rules] of [['catalog', undefined, [['R1', 'A catalog rule.']]], ['catalog-practice', 'practice', [['R1', 'A catalog rule.'], ['R2', 'A practice catalog rule.']]]]) writeFileSync(join(box.dir, `${name}-blueprint.json`), `${JSON.stringify({ blueprint: 1, name, title: name, version: 1, kind, rules: rules.map(([key, text]) => ({ key, text, why: 'the API lists it.' })) })}\n`);+ assert.deepEqual((({ rows, blueprints }) => [rows[0].status, rows.length, blueprints.length, blueprints[1].shared.length])(json(box, repo, 'blueprint', ['add', join(box.dir, 'catalog-blueprint.json'), '--blueprint', join(box.dir, 'catalog-practice-blueprint.json')], 'add')), ['draft', 2, 2, 1], 'two blueprints in one add land as one result, a shared rule drafted once (#720)');mkdirSync(join(repo, 'test'));writeFileSync(join(repo, 'test', 'proof.test.js'), "import { test } from 'node:test';\ntest('proof [G1]', () => {});\n");box.git(repo, 'add', 'SPEC.md', 'test/proof.test.js');