fix(hooks): raise state-line-guard MAX_LINES from 60 to 120
Operator decision 2026-08-14: the STATE.md convention's line limit moved from ~60 to ~120 (global CLAUDE.md already updated). Re-bases every selftest fixture and boundary value that encoded 60 as a literal, including section 8's ratchet fixtures, so they still exercise the ratchet rather than degenerating into a flat gate at the new threshold. Re-verified the real-tree justification at 120: 13 files over the limit, one at 1496 (was 23 over 60, one at 1405 — left as historical record). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194eV8b6BXNv6aKLovP8TP6
This commit is contained in:
parent
09fd4b74fa
commit
44fb34ab72
3 changed files with 60 additions and 43 deletions
18
CLAUDE.md
18
CLAUDE.md
|
|
@ -52,8 +52,9 @@ marketplace plugin. Three components, one boundary:
|
|||
`coord-inbox.sh` and emits the `hookSpecificOutput.additionalContext`
|
||||
envelope. No mailbox logic lives here. Always exits 0.
|
||||
- **Hook (`hooks/scripts/pre-state-line-guard.mjs`):** a `PreToolUse` hook on
|
||||
`Write|Edit` that enforces the STATE.md convention's `maks ~60 linjer`
|
||||
(global CLAUDE.md) mechanically. It exists because the prose limit alone
|
||||
`Write|Edit` that enforces the STATE.md convention's `maks ~120 linjer`
|
||||
(global CLAUDE.md; raised from `~60` by operator decision 2026-08-14 —
|
||||
see the dated paragraph below) mechanically. It exists because the prose limit alone
|
||||
failed: a real STATE.md drifted to 155-156 lines before an /insights sweep
|
||||
of 160 sessions noticed, and one trim pass on it *increased* the line count
|
||||
instead of shrinking it. org-ops dispatched the work order
|
||||
|
|
@ -106,6 +107,19 @@ marketplace plugin. Three components, one boundary:
|
|||
shrink-while-still-over-limit allows, same-size-rewrite allows, grow-an-
|
||||
already-oversized-file still denies, and create-new-oversized-file still
|
||||
denies.
|
||||
|
||||
**`MAX_LINES` raised 60 -> 120, operator decision 2026-08-14 (evening),
|
||||
reported via coord by `.claude` after the global CLAUDE.md prose was
|
||||
already updated.** The ratchet mechanics above are unchanged - only the
|
||||
constant moved, plus every selftest fixture and boundary value that
|
||||
encoded 60 as a literal. Re-verified empirically against the real tree at
|
||||
the new threshold (2026-08-14): `wc -l ~/repos/*/STATE.md
|
||||
~/repos/*/*/STATE.md | awk '$1 > 120'` found 13 files already over 120
|
||||
lines, one at 1496 - the historical 23-files-over-60/one-at-1405 figures
|
||||
above describe the tree as it was at the moment the ratchet bug was found,
|
||||
not the current threshold, and are left as-is rather than rewritten.
|
||||
`session-start.mjs`'s 160-line injection window still covers the new
|
||||
120-line limit with room to spare, so no change was needed there.
|
||||
- **Board (`scripts/board.sh`):** cross-repo attention board. Reads STATE.md
|
||||
next-step blocks + board lines, `git status`, and mailbox pending counts, and
|
||||
prints one line per repo. Read-only by construction: it writes to no repo, no
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue