The 'resurrected old names' check was non-functional: it ran in a pipeline
subshell (fail/pass counts and --strict exit were lost), accumulated hit files
with literal \\n (so the per-file filter never matched), and hardcoded the old
names — already stale (missing usb_nodes, the rename that motivated this).
Planting hermes-agent + usb_nodes + COLIBRI_AUTOSPAWN_PI in a source file
passed clean under --strict.
Rewrite:
- Parse old names from the Shipped table of naming-decisions.md (self-updating;
no hardcoded list to rot).
- Loop in the main shell (read from a file) so counters and --strict propagate.
- xargs grep -nHF across the file list; filter legit contexts case-insensitively
(migration/rename/back-compat/alias/changelog) so the serde alias and the
setup-mother migration code don't false-positive.
- Move usb_nodes → hive_nodes from In-flight to Shipped (colibri #161 merged) so
it is now enforced.
Verified: clean run exits 0 (PASS 37); planting hermes-agent/usb_nodes/
COLIBRI_AUTOSPAWN_PI now FAILs and --strict exits 1. Fixed a serde-alias
false-positive (multi-line attribute). sh -n + markdown gate green.
Three checks (no LLM, CI-friendly, portable /bin/sh):
1. Dangling references — every file path cited in docs/wiki/*.md
must exist (short names resolved via find fallback). Skips
cross-repo paths (clawdie-iso/*), example paths (path/to/*),
and wiki-documented absences (ADR-agent-harness-consolidation.md).
2. Resurrected old names — the five "Shipped" renames from
naming-decisions.md must not reappear in code outside the wiki.
Filters out legitimate migrations (setup-mother.sh sed line,
lib.rs #[serde(alias)]) and SQL migration boilerplate.
3. Orphan pages — every docs/wiki/*.md is linked from index.md.
Advisory by default (exit 0); --strict gates with non-zero exit.
Added to AGENTS.md alongside ci-checks.sh.
FreeBSD-portable: find-based file discovery instead of GNU greps
--exclude-dir; temp files instead of process substitution.