Backlog triage Part B: 125 finished rows + 20 id-less rows moved to CLOSED-ITEMS (full text at 9e2786c); open rows normalised to one 6-column shape; narratives archived verbatim; closed_register_gate RULE 3 refuses a finished row in OPEN-ITEMS (decoys, seen red); rules rehomed to CONTEXT + 07 §11; loose notes triaged; R-814..R-819 filed; register 444 -> 325
gates / gates (push) Successful in 30s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-10-03 09:17:22 +02:00
parent 9e2786c907
commit 71b8c8c62b
22 changed files with 1080 additions and 815 deletions
+31 -2
View File
@@ -2,11 +2,24 @@
# -*- coding: utf-8 -*-
"""closed_register_gate.py — CLOSED-ITEMS.md holds closed work ONLY (R-405, 2026-08-31).
WHAT IT CONVICTS ON (a FAIL, exit 1), two rules and nothing else:
WHAT IT CONVICTS ON (a FAIL, exit 1), three rules and nothing else:
RULE 1 — no row in `CLOSED-ITEMS.md` may carry an OPEN state word (READY, OPEN, BLOCKED,
WATCHING, WAITING-ON-OPERATOR) as the LEADING VERDICT of its state cell.
RULE 2 — no `R-` identifier may have a table row in BOTH `CLOSED-ITEMS.md` and `OPEN-ITEMS.md`.
RULE 3 — (2026-10-03) no row in `OPEN-ITEMS.md` may carry a CLOSED-family word (CLOSED, SHIPPED,
FIXED, KILLED, DECIDED, ANSWERED, SUPERSEDED, …; the list is `register_table.CLOSED_FAMILY`)
as the LEADING VERDICT of its `State` cell. A finished row moves to `CLOSED-ITEMS.md` IN THE
SAME COMMIT that finishes it.
WHY RULE 3, and the cost that bought it. RULES 1–2 guard the closed file and nothing guarded the open
one. `PROMPT-TEMPLATE.md` §N.7 has said since 2026-08-22 "compress what this session closed … it moves
to `CLOSED-ITEMS.md`", and it was followed only sometimes: on 2026-10-03 the open register held **113
rows whose leading verdict was finished** (107 CLOSED, plus SHIPPED, FIXED, RULED, EXECUTED, ANSWERED,
DECIDED) among 442 — a quarter of the file, at 824 KB. A rule without a gate is a wish. RULE 3 reads
the `State` column BY NAME from the table's header (`register_table.rows`), never a fixed index, and
it reads the LEADING verdict only — R-378's lesson applies here exactly as in RULE 1: the open row
`READY — RE-RANKED UP (R-86 closed)` must pass, and does (decoy `closed-register/open-row-closed-word`).
WHY IT EXISTS, and the cost that bought it. The 2026-08-22 compression sweep (commit `ef6ac6f`,
R-376..R-378) moved finished work out of `OPEN-ITEMS.md`. Its classifier matched a status word
@@ -50,6 +63,9 @@ import os
import re
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import register_table # noqa: E402 — the shared row reader (2026-10-03)
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
CLOSED = os.path.join(ROOT, "documentation", "backlog", "CLOSED-ITEMS.md")
OPEN = os.path.join(ROOT, "documentation", "backlog", "OPEN-ITEMS.md")
@@ -137,6 +153,19 @@ def main():
for rid in sorted(closed_ids & set(open_ids), key=lambda r: (int(re.sub(r"\D", "", r)), r)):
convicted.append((open_ids[rid], rid, "", "has a row in BOTH registers"))
# RULE 3 — a finished row left in the OPEN register (2026-10-03)
finished_in_open = []
for n, rid, columns, cells, _ in register_table.rows(OPEN):
state = register_table.cell(columns, cells, "State")
if state is None:
continue # an unreadable row is register_shape_gate.py's conviction, not a pass here
verdict = register_table.leading_verdict(state)
if register_table.CLOSED_FAMILY.match(verdict):
finished_in_open.append((n, rid, verdict))
for n, rid, verdict in finished_in_open:
convicted.append((n, rid, verdict, "OPEN-ITEMS.md row whose leading verdict is FINISHED — move "
"it to CLOSED-ITEMS.md in the same commit that closes it"))
print("closed-register gate — %d closed rows with a readable state cell, %d open rows, "
"%d convicted, %d warnings" % (checked, len(open_ids), len(convicted), len(warnings)))
@@ -145,7 +174,7 @@ def main():
if convicted:
print()
print("CONVICTED — CLOSED-ITEMS.md is for closed work only:")
print("CONVICTED — CLOSED-ITEMS.md is for closed work only, OPEN-ITEMS.md for open work only:")
for n, rid, verdict, why in convicted:
print(" L%-5d %-7s %s%s" % (n, rid, why, (" — verdict %r" % verdict) if verdict else ""))
print()