goldstandard: destructive-prepend prohibition as knowledge law + PreToolUse hook - #1084
Merged
Merged
Conversation
… law + hook Applies the Goldstandard board standards to #1083's rule, which had landed only as a CLAUDE.md block: - .claude/knowledge/never-truncate-a-file-you-still-need-to-read.md — title IS the rule; READ BY: header; Status CONTRACT locked 2026-08-30 with the operator's verbatim words; incident with evidence class (observed) and receipts (#1081 truncation, #1082 restore 82679c3, blob cdf8c15^1); machine-runnable falsifier (wc -l, shorter=defect) with its does-not-prove ceiling; retrieval footer. - CLAUDE.md: the 19-line P0 block trimmed to a 9-line pointer at the law (size rule: CLAUDE.md links out, absorbs no state). - hooks/anti-pattern-matching.sh: non-blocking PreToolUse guard now injects the rule when a Bash command combines open-for-write with .read() in one expression ('a falsifier without a hook is a hope'). Header cites its founding incident. Tested red-then-green: first regex missed the escaped-quote form (guard failed to fire — fixed); final form fires on -c and heredoc shapes, stays silent on read-only and clean commands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KCGhDYoQBXs3poaR7sFuqp
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_34471211-4ddf-43d0-9e69-505bfaefe32f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#1083 prohibited the destructive-prepend one-liner, but landed the law as another block in the already-oversized
CLAUDE.md— exactly the drowning pattern the Goldstandard (v3) names. This PR re-lands it at standard.What (Goldstandard rules applied, by number)
.claude/knowledge/never-truncate-a-file-you-still-need-to-read.md— title IS the rule,READ BY:header,Status: CONTRACT (locked by operator directive, 2026-08-30)82679c3a, blobcdf8c15a^1)observed; falsifier's ceiling stated (wc -lcatches truncation, NOT same-length corruption)wc -lpost-check — an append-only file that got SHORTER is always a defecthooks/anti-pattern-matching.shextended: non-blocking PreToolUse guard fires when a Bash command combines open-for-write with.read()in one expression; header cites its founding incidentpython3 -c "open(p, \"w\")…") — fixed; final form fires on-cand heredoc shapes, stays silent on read-only and clean commands (can-it-fire + can-it-stay-silent pair)CLAUDE.md's 19-line block trimmed to a 9-line pointer at the lawPost-check