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.

fix(init): no placeholder spec rows; the readme fits init [I1,S8]

Corey Olson51ded390a42a
diff --git a/README.md b/README.md
index 39c5098d..d309b177 100644
--- a/README.md
+++ b/README.md
@@ -70,10 +70,10 @@ pullboard init # pullboard.json, SPEC.md, PRACTICE.md, AGENTS.md
git add -A && git commit -m "chore: set up pullboard"
```
-Write requirements in `SPEC.md`, one row per line, and set your test command as the gate in `pullboard.json`:
+`SPEC.md` starts with its sections and the row format. Write each requirement as a row under its section, and set your test command as the gate in `pullboard.json`:
```markdown
-## G · Goals
+## G · Goals: what the client asked for
- G1 [approved, must] An upload of the same file twice is a no-op. | gate: test/upload.test.js
- G2 [draft, aim] Show a diff when a month is restated. | serves: G1
```
@@ -103,7 +103,7 @@ cd ../<repo>-web-1 && pullboard next
pullboard submit 1 # clean tree, gate green at HEAD
```
-A different agent verifies it. `next --verify` names the item and prints the command that checks out its commit:
+A different agent verifies it. `next --verify` names the item, reserves its review for that agent for 30 minutes so no other verifier takes it, and prints the command that checks out its commit:
```sh
pullboard worktree review && cd ../<repo>-review-1
diff --git a/src/templates.js b/src/templates.js
index fa05c7f4..081e4b3c 100644
--- a/src/templates.js
+++ b/src/templates.js
@@ -41,11 +41,16 @@ Every requirement is a row with an id. Agents build against approved rows; commi
Statuses: approved = decided · draft = proposed · pending = open question · fact = true today · wont = won't build, decided and kept · retired = no longer applies, kept. Ids are permanent: never delete or renumber a row. Tiers: must · aim.
+Write each requirement as one row under its section, in this format. The fence keeps the example out of the spec, so no placeholder id is ever committed; your own rows go below, outside it.
+
+\`\`\`text
+- G1 [draft, must] The first thing the client needs, in one line. | gate: the test that proves it
+- K1 [draft, must] A constraint, e.g. runs locally with no account. | gate: review
+\`\`\`
+
## G · Goals: what the client asked for
-- G1 [draft, must] Replace with the first thing the client needs, in one line. | gate: the test that proves it
## K · Constraints
-- K1 [draft, must] Replace with a constraint, e.g. runs locally with no account. | gate: review
`;
}
diff --git a/test/e2e.test.js b/test/e2e.test.js
index ebff2c7d..ab92a395 100644
--- a/test/e2e.test.js
+++ b/test/e2e.test.js
@@ -19,6 +19,7 @@ import { request } from 'node:http';
import { connect } from 'node:net';
import { join, resolve } from 'node:path';
import { after, test } from 'node:test';
+import { parseSpec } from '../src/spec.js';
const BIN = resolve(import.meta.dirname, '../bin/pullboard.js');
const cockpitSource = () => readFileSync(resolve(import.meta.dirname, '../src/cockpit.js'), 'utf8');
@@ -133,6 +134,25 @@ test('init writes config, spec, agent docs and hooks once, and never clobbers [I
assert.match(second.out, /kept the Claude Code skills/);
});
+test("init's spec has its sections and no rows, and the README's example fits under them as written [I1, S8]", () => {
+ const box = sandbox();
+ const repo = join(box.dir, 'fresh');
+ mkdirSync(repo);
+ box.git(repo, 'init', '-q', '-b', 'main');
+ assert.equal(box.run(repo, 'init').code, 0);
+ const spec = readFileSync(join(repo, 'SPEC.md'), 'utf8');
+ assert.deepEqual(parseSpec(spec).rows, [], 'no placeholder row, so no placeholder id is ever committed and made permanent');
+ assert.deepEqual(parseSpec(spec).sections.map((section) => section.name), ['G · Goals: what the client asked for', 'K · Constraints']);
+ const readme = readFileSync(join(import.meta.dirname, '..', 'README.md'), 'utf8');
+ const example = /```markdown\n([\s\S]*?)```/.exec(readme.slice(readme.indexOf('## Quick start')))?.[1] ?? '';
+ const [heading, ...rows] = example.trim().split('\n');
+ assert.ok(rows.length > 0 && spec.includes(`${heading}\n`), `the README's example heading is one init writes: ${heading}`);
+ writeFileSync(join(repo, 'SPEC.md'), spec.replace(`${heading}\n`, `${heading}\n${rows.join('\n')}\n`));
+ const check = box.run(repo, 'spec', 'check');
+ assert.equal(check.code, 0, check.out);
+ assert.match(check.out, new RegExp(`SPEC.md: ${rows.length} rows, 0 errors`));
+});
+
test('spec check lints both files; spec view writes one page into the git dir [S6, S7]', () => {
const box = project();
writeFileSync(join(box.repo, 'PRACTICE.md'), '# Practice\n\n## C · Code\n- C1 [approved, must] Functions under 60 lines.\n');