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.

test(skills): pin legacy release fixtures [C7,I11]

Corey Olson75d5cfa5c55e
diff --git a/test/fixtures/skills-0.8.1/pullboard-decompose/SKILL.md b/test/fixtures/skills-0.8.1/pullboard-decompose/SKILL.md
new file mode 100644
index 00000000..e6bcebe5
--- /dev/null
+++ b/test/fixtures/skills-0.8.1/pullboard-decompose/SKILL.md
@@ -0,0 +1,67 @@
+---
+name: pullboard-decompose
+description: Turn a client's ask into SPEC.md rows together with the person, one question at a time. Use when a project starts, when a brief or new requirements arrive, or when the person says "break this down" or "spec this out".
+---
+
+# Decompose an ask into the spec
+
+You turn what the client asked for into SPEC.md rows. You draft; the person decides.
+
+## Before you start
+
+- Read every document in `ask/`, or the brief the person points you to. Read SPEC.md and DOCTRINE.md (or PRACTICE.md when it is the only legacy file) if they exist.
+- Run `pullboard spec check`, so you start from a clean spec.
+
+## The row format
+
+One requirement per line:
+
+```
+- G1.2 [draft, must] Same file twice is a no-op. | gate: idempotency test | serves: G1
+```
+
+- **id:** a track letter and a number. Ids are permanent: once a row is committed, commits and items may cite it, so it is never deleted, renumbered or reused.
+- **status:** `approved` only on the person's word. Your rows are `draft`. An open question is `pending`, with its text phrased as the question; a pending row has no gate. `wont` is a row the person cut: it stays, with its id and text, and nothing builds it. `retired` is a row that no longer applies.
+- **tier:** `must` or `aim`.
+- **text:** one requirement, under 20 words.
+- **gate:** the test or check that would prove it.
+
+## How to work
+
+1. Group the ask into tracks: the goals, the main things the product handles, money, people and roles, constraints, outside dependencies. One `##` section per track.
+2. Draft rows track by track. Each row traces to something the client said. Nothing the client did not ask for is ever approved.
+3. Sort what the ask leaves open:
+ - **A sensible default exists and a wrong guess is cheap:** write a draft row that states the assumption, such as "Reminders go by text; email can come later." The person can flip it.
+ - **It changes scope, money, safety or a must-row:** write a pending row phrased as a question.
+
+ Ask only what blocks a must-row; a spec with forty questions is a spec nobody answers.
+ - **Ask at most five questions.** If you have more, keep the five with the most at stake (money, data loss, safety, what the client will see) and turn the rest into draft rows that state your assumption.
+ - **A question must change something the client sees.** If either answer would suit them, decide, and state it in a draft row. How the product stores or numbers things internally is yours to decide.
+ - **Optional (aim) features get one question at most:** is it in scope now?
+ - **If the ask shows an example,** such as a date or a command, the example answers the format question.
+4. Look hard for what clients leave out:
+ - two statements that cannot both be true
+ - a number the system needs that nobody gave
+ - a need nobody mentioned: refunds, privacy, what happens when something runs out
+ - an outside party nobody chose: payments, an existing system
+ - a nice-to-have phrased as a must, or the reverse
+ - what happens on bad input: an unknown id, a malformed value
+ - whether ids or numbers are ever reused
+ - what an empty list or first run shows
+
+ - dates and times: compared to what, and in whose time zone
+
+ When you restate a constraint, quote the client's words; a paraphrase can change its meaning.
+
+ Every must-row must be testable without a guess. Name the exact word, format, number or comparison it means: not "overdue tasks are flagged" but "a task due before today's local date shows the word overdue". If the client did not say, write your assumption into the draft row; the person will flip it if it is wrong.
+5. Show the person one track at a time. Ask the pending questions one at a time, the most consequential first, each with your recommended answer.
+6. After each answer, update the row and keep its id: pending becomes approved with the answer as its text, or draft becomes approved. Run `pullboard spec check`.
+7. Never mark a row approved without the person saying so. Never delete or renumber a row, even to tidy the numbering. When the person cuts one, mark it `wont`; when one stops applying, mark it `retired`. The commit refuses a deleted row.
+
+## Done
+
+- Every part of the ask is covered by a row, or by a stated reason it is out of scope.
+- Every approved must-row names its gate.
+- For every must-row you could write the exact check: the command, the input and the expected output.
+- What remains pending is only the questions the person has not answered yet.
+- `pullboard spec check` passes, and the spec is committed with a `docs(spec): ...` message. Docs commits need not cite row ids.
diff --git a/test/fixtures/skills-0.8.1/pullboard-plan/SKILL.md b/test/fixtures/skills-0.8.1/pullboard-plan/SKILL.md
new file mode 100644
index 00000000..125fe337
--- /dev/null
+++ b/test/fixtures/skills-0.8.1/pullboard-plan/SKILL.md
@@ -0,0 +1,54 @@
+---
+name: pullboard-plan
+description: Turn a project's approved spec rows into work items on the board, in the right lanes and in the right order, so builder agents can pick them up without colliding. Use when rows have just been approved, when the board is empty, or when asked to plan, break work into items, or set up lanes.
+---
+
+# Plan the work
+
+You turn approved rows into items builders can claim. You do not build.
+
+1. Read SPEC.md (approved rows only; rows marked `wont` or `retired` are never built or cited), DOCTRINE.md (or PRACTICE.md when it is the only legacy file) and `pullboard lanes`. If the lanes do not fit the work, propose a change to `pullboard.json` to the person rather than forcing items into the wrong lane. Read the repo's conventions too, and write every brief in them: the module system (`"type"` in package.json), the test runner, where tests live.
+2. **Contracts first.** Find what two lanes will share: a data shape, a module's functions, a file format. Make one item for each shared contract, in the lane that will own it, and add the items that use it with `--after <its id>`. A builder waiting on a contract claims something else; nobody copies another lane's code.
+3. **One item per verifiable piece.** Each item:
+ - sits in the lane that owns its files
+ - cites with `--specs` only the rows it meets in full; a verifier rejects an item that cites a row it does not meet
+ - has a `--criterion` a stranger could check without asking you, with the exact command, input and expected output
+ - has a `--brief` (or `--brief-file`) when a builder starting cold would need more than the criterion. The criterion says what; the brief says how. Write it in four labelled parts:
+
+ ```
+ Files:
+ - src/store.js
+ - test/store.test.js
+ Change:
+ - add(text) returns the new task's number; numbers start at 1 and are never reused
+ Test:
+ - in test/store.test.js, two adds return 1 and 2, and a remove then an add returns 3
+ Out of scope: every other file; no new dependencies
+ ```
+
+ Builders commit and submit their own work, so a brief never forbids git. Only the packs `pullboard run` writes say so, because there the runner commits.
+ - has a `--check` when it can: the one command that proves it, such as `node --test test/store.test.js`.
+4. **Route each item to the cheapest model that can build it.** Every item an expensive model builds that a cheaper one could have is waste.
+ - `--route light`: a small or local model can build it from the brief alone. Mechanical work: wiring, a field through three files, a test for a stated case, a rename.
+ - `--route mid`: a capable model such as Haiku or Sonnet: a small feature, a bug with a known cause.
+ - Leave on the default strong route what needs judgment: a shared contract, a design choice, an edge the brief cannot settle.
+ - Route for the builders who will join. An item routed above every builder's tier is never built: make it lighter with a full brief, or tell the person the fleet needs a stronger builder.
+ - Below strong, an item needs `--criterion`, `--check`, and a brief whose Files sit in the item's lane and whose Test says what it asserts; `add` refuses it otherwise. Agents take their own tier first, then lighter ones; a builder that cannot get an item green escalates it one tier up.
+5. **Order with `--after`.** An item that needs another's result waits for it. Keep the chains short; parallel lanes are the point.
+6. **Simplest version first.** Plan the smallest thing that meets the rows. Every addition needs a row that asks for it.
+7. **Real inputs early.** If the project has real inputs (files, an API, data), plan an early item that runs on them, so surprises surface before everything else is built.
+8. Rows gated by review (style, constraints) need no item of their own unless there is work to do; list them in your report.
+
+```
+pullboard add store "Task file format and store module" --specs G7,D3 --criterion "store.add('x') returns 1 and writes the file in TODO_FILE"
+pullboard add cli "todo add prints the new number" --specs G1 --after 1 --criterion "todo add 'buy milk' exits 0 and prints 1"
+pullboard add cli "todo help lists every command" --specs G9 --after 2 --route light \
+ --criterion "todo help exits 0 and names add, list, done and remove" \
+ --brief "Add a help case to the command switch in src/cli.js, next to add. Copy how add prints. Test it in test/cli.test.js the way the add test runs the CLI."
+```
+
+To change a brief or a route later: `pullboard edit <id> --brief "..."` or `--route strong|light`. The criterion changes only by `pullboard refreeze`.
+
+## Done
+
+Every approved must-row is cited by an item, or named in your report with the reason it needs none. `pullboard list` shows the order through `after`.
diff --git a/test/fixtures/skills-0.8.1/pullboard-spec-review/SKILL.md b/test/fixtures/skills-0.8.1/pullboard-spec-review/SKILL.md
new file mode 100644
index 00000000..487f8e00
--- /dev/null
+++ b/test/fixtures/skills-0.8.1/pullboard-spec-review/SKILL.md
@@ -0,0 +1,29 @@
+---
+name: pullboard-spec-review
+description: Review the spec, and the product built from it, against the client's ask, the way the client or an evaluator will see them. Use before a handoff, demo or submission, or when the person asks "what will they think of this".
+---
+
+# Spec review
+
+Verification checks the work against the spec. This checks the spec, and what was built from it, against the client. Read as the client will, not as the builder did.
+
+## Read
+
+- The ask (`ask/`, or the brief), SPEC.md, DOCTRINE.md (or PRACTICE.md when it is the only legacy file) and the README.
+- The product itself: run it, open it, use it as the client would.
+
+## Look for
+
+- Asks with no row, and rows nobody asked for.
+- Rows deleted or renumbered. Every id ever committed must still be there (`pullboard spec check` lists any that are gone); a cut row is marked `wont`, never removed.
+- Rows met to the letter that miss what the client meant.
+- A number the client cares about shown blank or zero because an input is missing. Demonstrate the mechanism with a labelled assumption instead.
+- Test or demo data that borrows real names from the client's world.
+- Text meant for people that shows ids, field names, raw values or jargon.
+- Alerts with nothing at stake, and rankings that disagree with each other.
+- Docs that describe code that does not exist, and a README that no longer matches the product.
+- Anything that addresses the evaluator instead of the work.
+
+## Report
+
+Rank the findings by what the client would notice first. For each: what it is, where it is (a file and line, or a screen), why it matters to the client, and the fix. Put decisions that belong to the person at the top. Write the report to a file the person can hand to the build's coordinator.
diff --git a/test/fixtures/skills-0.8.1/pullboard-verify/SKILL.md b/test/fixtures/skills-0.8.1/pullboard-verify/SKILL.md
new file mode 100644
index 00000000..2430c809
--- /dev/null
+++ b/test/fixtures/skills-0.8.1/pullboard-verify/SKILL.md
@@ -0,0 +1,26 @@
+---
+name: pullboard-verify
+description: Verify another agent's submitted item at its exact commit, against the criterion frozen when it was claimed, and record a typed verdict. Use when an item awaits verification, or when asked to verify, check or review a submitted item.
+---
+
+# Verify a submitted item
+
+You never verify your own work. You judge the frozen criterion as written, at the commit that was submitted.
+
+Work only in your own worktree, the one `pullboard worktree review` made. Your shell may start each command in the main checkout, which is the coordinator's, so begin every command with `cd <your worktree> &&`. Never switch the main checkout to another commit.
+
+1. `pullboard next --verify` names the next submitted item you did not build, and its commit. `pullboard show <id>` gives the criterion as frozen at claim.
+2. Check out exactly that commit, in your worktree: `cd <your worktree> && git switch --detach <commit>`.
+3. Run the gate. Then test the criterion itself, with the strongest proof you can get:
+ - **Break it and watch it fail.** Revert or break the change, show the check fails, restore it, show it passes.
+ - **Use the method the criterion names.** If it says "two real processes" or "after a restart", use exactly that; a weaker stand-in is not proof.
+ - **Run the behavior** and read the output.
+ - **Read the code** only when the criterion is about the code itself. It is the weakest proof.
+ - **Check the house rules too.** Read the approved rows of DOCTRINE.md (or PRACTICE.md when it is the only legacy file) that the change touches. A broken one is a reject with reason OTHER, naming the row.
+ - **Try the edges.** Today and yesterday for dates; zero, one and the limit for numbers; empty for lists; the first and the last. Most bugs live at an edge the builder's tests skipped.
+ - **Keep checks contained.** Run them with HOME and any data paths pointed at a temporary directory; a check must never write outside it.
+4. Decide:
+ - Every row the item cites must be met. If it cites a row it does not serve, reject with OTHER and name the row, so the coordinator fixes the citation; never accept around it.
+ - `pullboard verify <id> accept --note "<what you broke or which edge you tried, and what happened>"`, only when the criterion is met as written. The note is required: passing tests alone are not proof.
+ - `pullboard verify <id> reject --reason <CODE> --note "<what failed, and the proof that would settle it>"`. The codes are TEST_FAILURE, BEHAVIOR_MISMATCH, INSUFFICIENT_EVIDENCE, STALE_HEAD and OTHER.
+5. If the check could not run for reasons that are not the work's fault, such as a broken environment or a flaky run under load, do not reject. Shout the coordinator what happened.
diff --git a/test/skills.test.js b/test/skills.test.js
index 97b5d05e..61733b39 100644
--- a/test/skills.test.js
+++ b/test/skills.test.js
@@ -52,14 +52,14 @@ function project() {
return { dir, root, env, git, run };
}
-/** Return the exact legacy file bytes for the four skills changed in 0.8.1. */
-function legacySkill(role) {
+/** Return the earlier skill bytes derived from an immutable 0.8.1 fixture. */
+function legacySkill(role, testRoot = import.meta.dirname) {
const name = ROLES[role];
- const file = resolve(import.meta.dirname, `../skills/${name}/SKILL.md`);
- const current = readFileSync(file, 'utf8');
+ const file = resolve(testRoot, `fixtures/skills-0.8.1/${name}/SKILL.md`);
+ const release = readFileSync(file, 'utf8');
const [currentSnippet, oldSnippet] = LEGACY_SNIPPETS[role];
- assert.ok(current.includes(currentSnippet), `${role} ships the doctrine migration phrase`);
- return current.replace(currentSnippet, oldSnippet);
+ assert.ok(release.includes(currentSnippet), `${role} 0.8.1 fixture contains the doctrine migration phrase`);
+ return release.replace(currentSnippet, oldSnippet);
}
/** Hash the file bytes using the release catalog's SHA-256 contract. */
@@ -84,6 +84,42 @@ function json(box, ...args) {
return JSON.parse(result.stdout);
}
+test('legacy skill fixtures match the 0.8.1 release [C7,I11]', () => {
+ for (const role of ['decompose', 'plan', 'review', 'verify']) {
+ const releaseDigests = Object.entries(SHIPPED_SKILL_DIGESTS[role])
+ .filter(([, versions]) => versions.includes('0.8.1'))
+ .map(([shippedDigest]) => shippedDigest);
+ assert.equal(releaseDigests.length, 1, `${role} has one catalog digest for 0.8.1`);
+ const name = ROLES[role];
+ const fixture = readFileSync(resolve(import.meta.dirname, `fixtures/skills-0.8.1/${name}/SKILL.md`));
+ assert.equal(digest(fixture), releaseDigests[0], `${role} fixture matches its 0.8.1 release digest`);
+ }
+});
+
+test('a current skill change leaves the legacy fixtures alone [C7,I11]', () => {
+ const box = project();
+ const testRoot = join(box.dir, 'test');
+ const currentRoot = join(box.dir, 'skills');
+ const roles = ['decompose', 'plan', 'review', 'verify'];
+ const before = {};
+ for (const role of roles) {
+ const name = ROLES[role];
+ const fixture = resolve(import.meta.dirname, `fixtures/skills-0.8.1/${name}/SKILL.md`);
+ const scratchFixture = join(testRoot, 'fixtures', 'skills-0.8.1', name, 'SKILL.md');
+ const scratchCurrent = join(currentRoot, name, 'SKILL.md');
+ mkdirSync(join(testRoot, 'fixtures', 'skills-0.8.1', name), { recursive: true });
+ mkdirSync(join(currentRoot, name), { recursive: true });
+ writeFileSync(scratchFixture, readFileSync(fixture));
+ const current = readFileSync(resolve(import.meta.dirname, `../skills/${name}/SKILL.md`));
+ writeFileSync(scratchCurrent, current);
+ before[role] = digest(legacySkill(role, testRoot));
+ writeFileSync(scratchCurrent, Buffer.concat([current, Buffer.from('\nLocal scratch-only skill note.\n')]));
+ assert.notEqual(digest(readFileSync(scratchCurrent)), digest(current), `${role} current skill changed in the scratch copy`);
+ }
+ const after = Object.fromEntries(roles.map((role) => [role, digest(legacySkill(role, testRoot))]));
+ assert.deepEqual(after, before, 'legacy test inputs still come from the immutable release fixtures');
+});
+
test('doctor names a skill older than this Pullboard [I2]', () => {
const box = project();
const expectedOld = {