You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(rsr): finish template instantiation + enforce it (#56) (#90)
Closes both acceptance criteria of #56 — though the second was already
satisfied, and the first was mis-scoped.
## Criterion 1 — template residue
The issue recorded *"5 `{{PLACEHOLDER}}` files + 8 `rsr-template-repo`
references"*. Re-measured: **8** files matched `{{...}}` and **21**
lines matched the template name — but most were **meta-references**:
files *describing* the debt, not carrying it.
Three would have been damaged by a naive search-and-replace:
| File | Why it must not be touched |
|---|---|
| `src/rust/src/eval.rs` | `"...add{{}} block"` is a Rust `format!`
**escape** — `{{}}` renders as a literal `{}`, naming the `add{}`
language construct. Working code. |
| `methodology.a2ml` | The token appears inside `reject-if-contains` —
the rule that *forbids* it. |
| `AFFIRMATION.adoc`, `docs/identity-fabric/` | Prose recording the
debt. |
**The genuine residue, now cleared:** `{{DEPS}}`,
`{{BUILD_OUTPUT_PATH}}`, `{{PACKAGE_NAME}}`, `{{LANG_STACK}}`,
`{{BUILD_CMD}}`, `{{TEST_CMD}}`, `{{MUST_INVARIANTS}}`,
`{{PROJECT_UNIQUE_STRENGTH}}` — plus four contractiles and the citation
guide whose **subject was still the template**. `Intentfile` asserted
*"This repository is the canonical template for Rhodium Standard
Repository compliance"*; `CITATIONS.adoc` credited *"Polymath, Hyper"*
for *"RSR-template-repo"* in all five citation formats.
## A worse class, found while fixing it
All three QUICKSTARTs documented commands that **do not exist** — `just
build`, `just test`, `just lint`, `just panic-scan`, `just setup-dev`,
`just build-release`, `just install`, `just run`, `just heal`, `just
setup`, `just uninstall`, `just stapeln-run` — asserted an
`$XDG_CONFIG_HOME/tangle/config.toml` the compiler never reads, and
carried a *"Multi-Instance Deployment"* section for what is a single
stateless binary.
Documentation that fails when followed is worse than none. Every command
now shown is verified to exist, and the worked example shows the
**real** output (8 `assertion passed` lines, exit 0) rather than the
template's invented `Tangle started successfully.`
## Criterion 2 — already satisfied by #78
`README.adoc` carries the correction and `AFFIRMATION.adoc` has
*"Erratum — 2026-07-21 / Correction 1 — the stack does not exist"*.
Worth noting: the criterion as worded — *"does the simplified diagram
supersede, or re-state, the nuance?"* — presupposed the stack was real.
**Both options were wrong.** `KRL → TangleIR → …` describes a dependency
that never existed (`TangleIR` appears in no source file in either
repo). It was withdrawn, not reconciled.
## Making the rule real
`methodology.a2ml` has always declared `reject-if-contains = [...,
"rsr-template-repo"]` — and **nothing enforced it**, which is precisely
how the contractiles stayed mis-instantiated. Adds
`scripts/check-rsr-instantiation.sh` (plus `just rsr-check` and a CI
step), using an explicit allowlist so meta-references and the Rust
escape aren't false-positived.
**Verified adversarially:**
| Attack | Caught |
|---|---|
| Reintroduce a `{{PLACEHOLDER}}` | ✅ |
| Claim to be `rsr-template-repo` | ✅ |
| Document a phantom `just` recipe | ✅ |
| Rust `format!` escape `add{{}}` | ✅ correctly **ignored** |
It earned itself immediately: on first run it flagged
`QUICKSTART-USER.adoc`, a file I had not inspected, with six phantom
recipes.
## Also
`AFFIRMATION.adoc` gains a dated **Erratum — 2026-07-29** (Corrections
3–5) recording the residue clearance, that the OCaml compiler is no
longer unbuilt (#87/#89 — the previous erratum's closing line said it
was), and that `==` is no longer list equality (#50/#87).
All gates pass locally: build, corpus, rsr-check, `must-check`,
`trust-verify`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
0 commit comments