fix(release): version-bump write regenerates the version-stamped agents digest

agents-digest/gstack-AGENTS.md embeds VERSION in its first line and is
byte-freshness-gated (test/agents-digest.test.ts + Skill Docs Freshness CI),
but nothing in the release path regenerated it — every version-bumping ship
of this repo would land red. write now spawns the repo's own generator when
present (agentsDigest true/false/null in the output JSON), and ship's
evidence gate allow-lists the digest alongside VERSION/package.json.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-29 05:18:34 +00:00
co-authored by Claude Fable 5
parent 87e64f69ba
commit e40faaea75
4 changed files with 102 additions and 12 deletions
+5 -3
View File
@@ -898,15 +898,17 @@ EOF
The evidence ledger is the mechanical arm of this law. Check it FIRST:
```bash
~/.claude/skills/gstack/bin/gstack-evidence check --label tests --expect-cmd '<exact tests-lane command from Step 5>' --label vitest --expect-cmd '<exact vitest-lane command from Step 5>' --max-age 24 --allow-paths CHANGELOG.md,VERSION,package.json
~/.claude/skills/gstack/bin/gstack-evidence check --label tests --expect-cmd '<exact tests-lane command from Step 5>' --label vitest --expect-cmd '<exact vitest-lane command from Step 5>' --max-age 24 --allow-paths CHANGELOG.md,VERSION,package.json,agents-digest/gstack-AGENTS.md
```
Pass each `--expect-cmd` the exact command string the wrapped Step 5 lane ran —
that binds FRESH to the real suite (a green `echo ok` recorded under the label
can never satisfy the check). Residual risk, accepted: `package.json` sits on
the allow-list because Step 12's version bump writes its version field between
the test run and this gate; a behavior-changing package.json edit in that
window would not invalidate evidence. The check is advisory either way.
the test run and this gate (and, in the gstack repo, regenerates the
version-stamped `agents-digest/gstack-AGENTS.md`); a behavior-changing
package.json edit in that window would not invalidate evidence. The check is
advisory either way.
- **Every line FRESH (exit 0):** the recorded runs were green and the working-tree
content is identical to what was tested, modulo the allow-listed release files
+5 -3
View File
@@ -378,15 +378,17 @@ EOF
The evidence ledger is the mechanical arm of this law. Check it FIRST:
```bash
~/.claude/skills/gstack/bin/gstack-evidence check --label tests --expect-cmd '<exact tests-lane command from Step 5>' --label vitest --expect-cmd '<exact vitest-lane command from Step 5>' --max-age 24 --allow-paths CHANGELOG.md,VERSION,package.json
~/.claude/skills/gstack/bin/gstack-evidence check --label tests --expect-cmd '<exact tests-lane command from Step 5>' --label vitest --expect-cmd '<exact vitest-lane command from Step 5>' --max-age 24 --allow-paths CHANGELOG.md,VERSION,package.json,agents-digest/gstack-AGENTS.md
```
Pass each `--expect-cmd` the exact command string the wrapped Step 5 lane ran —
that binds FRESH to the real suite (a green `echo ok` recorded under the label
can never satisfy the check). Residual risk, accepted: `package.json` sits on
the allow-list because Step 12's version bump writes its version field between
the test run and this gate; a behavior-changing package.json edit in that
window would not invalidate evidence. The check is advisory either way.
the test run and this gate (and, in the gstack repo, regenerates the
version-stamped `agents-digest/gstack-AGENTS.md`); a behavior-changing
package.json edit in that window would not invalidate evidence. The check is
advisory either way.
- **Every line FRESH (exit 0):** the recorded runs were green and the working-tree
content is identical to what was tested, modulo the allow-listed release files