INDEX is read every iteration and is the first thing a new reader meets, and I had admitted three times to never auditing it. Found by accident: I was about to spend a boot measuring whether A skips a movie because INDEX said 🟡, when movie-binding.md had it settled since 2026-08-28 with a three-boot baseline and a delivery counter, and HANDOFF carried it correctly. The staleness was in the index alone. Three stale rows fixed: movie skippability, SE audio extractability, and B leaving the main menu. Five other hits read and left alone -- index and page were talking about different clauses. One of the three should have been caught by check_refuted.py: REFUTED holds the same dead claim with a different second clause, and the register matches exact wording. Its docstring documents that weakness; this is the first live instance. Also flags a within-page contradiction not fixed here: menu-audio-cues.md line 81 still heads a section saying SE audio is not extractable, which its own line 189 refutes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
61 lines
2.2 KiB
Python
61 lines
2.2 KiB
Python
#!/usr/bin/env python3
|
|
"""Does an INDEX.md row's status agree with the page it links?
|
|
|
|
`INDEX.md` is read every iteration by both agents and is the first thing a new
|
|
reader meets. sylpheed-port's phrase for it is "an index is an amplifier": a
|
|
status that is wrong there is wrong everywhere it is quoted from.
|
|
|
|
Found by accident: INDEX called movie skippability 🟡 unsettled while
|
|
`movie-binding.md` had it ✅ settled since 2026-08-28, with a three-boot baseline
|
|
and delivery confirmation -- and HANDOFF carried the answer correctly. The stale
|
|
row is in the index alone.
|
|
|
|
⚠️ THIS PRINTS A LISTING, NOT A VERDICT. An audit that invents defects is worse
|
|
than no audit, because its false positives are indistinguishable from its true
|
|
ones until each is opened by hand (sylpheed-port paid for that, and so did I with
|
|
a 7-candidate/0-real sweep). A row can legitimately say 🟡 about one clause while
|
|
its page says ✅ about another. Every hit here is a PROMPT TO READ.
|
|
|
|
index_vs_pages.py [--all]
|
|
"""
|
|
import re
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path("docs/re")
|
|
idx = (ROOT / "INDEX.md").read_text().splitlines()
|
|
LINK = re.compile(r"\[`([^`]+\.md)`\]\(([^)]+)\)")
|
|
|
|
rows = []
|
|
for n, line in enumerate(idx, 1):
|
|
if not line.startswith("|"):
|
|
continue
|
|
m = LINK.search(line)
|
|
if not m:
|
|
continue
|
|
target = (ROOT / m.group(2)).resolve()
|
|
if not target.exists():
|
|
rows.append((n, m.group(1), "MISSING PAGE", ""))
|
|
continue
|
|
page = target.read_text()
|
|
# the page's own headline status, if it declares one
|
|
st = ""
|
|
ms = re.search(r"\*\*Status:\*\*\s*(.+)", page)
|
|
if ms:
|
|
st = ms.group(1).strip()
|
|
idx_unsure = ("🟡" in line) or ("❔" in line)
|
|
page_sure = bool(re.search(r"^##+ ✅[^\n]*(settled|SETTLED|decoded|DECODED|measured)",
|
|
page, re.M))
|
|
if idx_unsure and page_sure:
|
|
rows.append((n, m.group(1), st[:70], "index unsure / page has a ✅ settled heading"))
|
|
elif "--all" in sys.argv:
|
|
rows.append((n, m.group(1), st[:70], ""))
|
|
|
|
print(f"{len(rows)} row(s) to READ (not defects):\n")
|
|
for n, name, st, why in rows:
|
|
print(f" INDEX.md:{n} {name}")
|
|
if why:
|
|
print(f" {why}")
|
|
if st:
|
|
print(f" page Status: {st}")
|