add-golden-fixture
Skill0 starsChanged 56 days agoMITView on GitHub
Add or regenerate a golden Plan→Manifest fixture in packages/testkit/golden so a digest is pinned and compared across ubuntu/windows/macos in CI. Use when a new Plan shape (new source kind, op, blob transport, edge-case path) needs a determinism lock, or when a deliberate manifest-format change requires re-pinning expected digests.
In this repository4 other files it gives its agents.
- add-mcp-toolSkill
- add-predicateSkill
- debug-apply-journalSkill
- release-axiomSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Inspect the diff: only *your* new file should appear.
- Very specific: line 39
Changeset: only if a *schema/canon/plan* package changed.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a golden fixture
Golden fixtures are the cross-OS determinism contract: plan-<name>.plan.json
compiles to a manifestDigest that must be byte-identical on every OS
(CI job golden-cross-os in .github/workflows/ci.yml). Changing an
.expected.json is a format change and belongs in a reviewed, changeset-ed
commit — never "just update it to make CI green".
Steps
- Write the plan at
packages/testkit/golden/<name>.plan.json— a validPlan(schema:packages/schema/schemas/Plan.schema.json). Keep it small and targeted at the one shape you want pinned (e.g. NFC path,deleteop, empty file, 256 KiB blob boundary, CAS source). Use only inline sources unless the fixture is about CAS/ref. No timestamps or machine-specific values. - Generate the expected file:
pnpm --filter @codai/axiom-testkit update-golden(packages/testkit/scripts/update-golden.ts→compileGolden()inpackages/testkit/src/golden.ts). It writes<name>.expected.jsonwithmanifestDigest,planDigest,artifacts[{path, sha256}]and prints the digest to stderr. - Inspect the diff: only your new file should appear. If an existing
.expected.jsonchanged, you have altered canonicalisation — stop, confirm that is intended (PLAN.md §2 invariant 1), and say so in the changeset. - Sanity-check the digest by hand once:
node -e "…"is not enough — run the golden testpnpm --filter @codai/axiom-testkit test(packages/testkit/src/golden.test.tsrecompiles every fixture and compares digests). - Guard:
node scripts/check-golden-digests.mjs— every plan has an expected file with a well-formedsha256:digest, no orphans. - Cross-OS proof: push; the
golden-cross-osjob rerunsupdate-golden.tson ubuntu-24.04 / windows-2025 / macos-15 and fails ongit diff. Do not merge on one green OS. - Changeset only if a schema/canon/plan package changed. Fixture-only
additions in the private
testkitneed none (check-changeset-presentignorespackages/testkit). - Record the fixture's purpose in one line at the top of
packages/testkit/README.md(fixture table).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

