Skip to content

goldstandard: destructive-prepend prohibition as knowledge law + PreToolUse hook - #1084

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/goldstandard-prepend-law
Aug 30, 2026
Merged

goldstandard: destructive-prepend prohibition as knowledge law + PreToolUse hook#1084
AdaWorldAPI merged 1 commit into
mainfrom
claude/goldstandard-prepend-law

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Aug 30, 2026

Copy link
Copy Markdown
Owner

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)

Goldstandard rule applied as
Knowledge-file format (Part II) .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)
No incident, no law receipts cited: #1081 truncation (5876→32), #1082 restore (82679c3a, blob cdf8c15a^1)
Evidence classes + does-not-prove (III.a/III.b) incident marked observed; falsifier's ceiling stated (wc -l catches truncation, NOT same-length corruption)
Machine-runnable falsifier (rule 4) wc -l post-check — an append-only file that got SHORTER is always a defect
"A falsifier without a hook is a hope" (Part IV) hooks/anti-pattern-matching.sh extended: non-blocking PreToolUse guard fires when a Bash command combines open-for-write with .read() in one expression; header cites its founding incident
Red-then-green (III.c) the first regex FAILED to fire on the escaped-quote form (python3 -c "open(p, \"w\")…") — fixed; final form fires on -c and heredoc shapes, stays silent on read-only and clean commands (can-it-fire + can-it-stay-silent pair)
Size rule (Part I) CLAUDE.md's 19-line block trimmed to a 9-line pointer at the law
Retrieval footer (III.e) PR numbers, merge SHAs, board entry id, census trap 10

Post-check

⊘ Body edited after merge: the knowledge file as merged here carried the operator's words verbatim (following the Goldstandard's quote-and-lock pattern), and this body advertised that. The operator has since prohibited reproducing their words in committed or public artifacts; the file was corrected in #1097 and this body updated to match. The Goldstandard's "quoted verbatim and marked locked" rule is overridden by the operator ruling for this workspace.

… 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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AdaWorldAPI
AdaWorldAPI merged commit 25dd18b into main Aug 30, 2026
@cursor

cursor Bot commented Aug 30, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants