mirror of
https://github.com/CharlesWiltgen/Axiom.git
synced 2026-09-20 19:58:20 +08:00
5ed60b9e05
`claude-code.json`'s skills array and the `/axiom:ask` built from it are both generated from router frontmatter, but that generation lived inline in `set-version.js` — a version script that refuses to run without a version argument. A one-line description edit therefore had no regeneration path that did not look like a release action, and the failing check pointed at the version script. On 2026-09-17 that cost four consecutive red CI runs. `scripts/manifest.ts` now owns the generation. Both callers share it: `npm run build:manifest` for a content-only regeneration, and `set-version.js` for a release, which folds the same write set into its existing atomic pass. Versions are untouched by the former. The generator had no test at all, which is the reason moving it looked risky. It now has five, covering contracts that have actually broken: the agent list must come from disk rather than the manifest's always-empty `agents` array (it once shipped "0 autonomous agents" that way), every manifest skill must appear, no template placeholder may survive rendering, generation must be deterministic, and a stale committed description must be replaced by the frontmatter's. Verified byte-identical to the pre-refactor output: the no-op run and a full regeneration both reproduce the committed files exactly, and `set-version.js` through the shared function does too. The tests were shown to fail — injecting the historical agent-list defect fails the guard and nothing else. CI now calls `npm run check:ci` (unit suite plus content gate), so the local and CI gates are one definition instead of two that drift. Verified: npm test (static clean), npm run check:ci (524/524, leak scan clean).