repo-mailbox/hooks
Kjell Tore Guttormsen bf11cbf89d docs(hooks): document the absolute-path assumption in state-line-guard
currentLineCountOf() swallows a read failure as current=0. A relative
file_path resolving against the wrong cwd would silently collapse the
ratchet back to a flat gate (Write) or disable enforcement entirely
(Edit). The Write/Edit tool contracts require an absolute file_path, so
this can't happen in practice -- noted advisor concern, verified against
the tool schemas, recorded in the hook's own comment so a future change
doesn't harden this without re-reading why it was never needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0186kZGKddxfA9N84HqMLbb2
2026-08-14 17:12:59 +02:00
..
scripts docs(hooks): document the absolute-path assumption in state-line-guard 2026-08-14 17:12:59 +02:00
hooks.json feat(hooks): enforce STATE.md's ~60-line convention with a PreToolUse guard 2026-08-14 17:01:20 +02:00