---
name: corpus-and-anti-drift
description: Where the Index of MUSTs lives + how the rules-index gate works + the exact steps to add a MUST
metadata:
  type: project
---

The MUST corpus is the `docs/standards/*.md` family docs (each with a Rules box
of anchored rules `<a id="XX-NN">`). The **Index of MUSTs** — the single cross-doc
grep target — lives in `docs/standards/README.md` under `## Index of MUSTs`.

**The anti-drift gate** is `scripts/gen_rules_index.py`:
- `gen_rules_index.py --check` → CI gate: every anchored rule must be either in
  the Index (a MUST) or in the script's `SHOULD_ALLOWLIST` (a SHOULD/DRAFT).
  Index ⇎ Rules-box drift is a hard error. Run it before every release.
- `gen_rules_index.py` (no flag) → rewrites `docs/standards/rules.json` (the
  machine companion).

**To add a MUST (same commit — DOC-18 / AG-14):**
1. Anchor it in the family doc's Rules box: `| <a id="XX-NN"></a>**XX-NN** | … |`.
2. Add its row to the README `## Index of MUSTs` table (`| XX-NN | FAMILY | … |`).
3. Add a `## What's new in v2.NN` entry + bump the maintenance-note count.
4. Walk the family doc's `Propagation (DOC-18)` header — e.g. AG-* rules also
   ripple to the `AGENTS_BRIEFING` constant `mgf-fed agents` prints (lives in
   the **mgf-common** repo — cross-repo ripple) + the STARTHERE mirror.
5. `python scripts/gen_rules_index.py` to regen `rules.json`; then
   `gen_rules_index.py --check` must print GREEN.

Promoting a SHOULD→MUST = add the Index row AND remove it from
`SHOULD_ALLOWLIST`, same commit.
