Replace the comment rules in CLAUDE.md with the mutation test #100
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-08-23]
~/.claude/CLAUDE.mdcurrently says both "Comments show why, not how" and "Write assumptions down as comments". The second is what produced a 27% comment-to-code ratio. Trialled a replacement on eight packages (branchcomment-audit, 546 lines removed,make ci+ boot-gate green) and the rule that survived contact is mechanical rather than stylistic.Proposed replacement for the
## CodeblockThis drops "Write assumptions down as comments" and redirects it.
Why each clause is there
TestAwaitingHostCertDoesNotSpendRetryBudget). In a package where tests are namedTestAdopt1the rule would destroy information and replace it with nothing.TestLifecycleIsNeverReadByAControlLoop, which names the axes to branch on instead.RevokedCert.Serialwidened touint64fails at a call site two files away withcannot use string as uint64and no hint why.ST1020does the same for an exported symbol's godoc summary — that one bit this very branch.Evidence it is affordable
Reduction tracks coverage, inverted —
guestAddr/resolveGuestCIDRnear full coverage gave up nearly every comment;RunCLI/newPlatformat 0% gave up none.api/capacity.goandapi/networks.goneeded zero deletions: they were written this way already.This is a change to the user's own working rules, so it is filed rather than applied.
Migrated from git-collab issue
e145d242ea5c514d85f341686e78c1d386d8359d.Original author: a73x dev@a73x.sh.
Close reason: [claude 2026-08-23] Applied — see comment above.
[claude 2026-08-23] Applied to ~/.claude/CLAUDE.md (backup: CLAUDE.md.bak-20260823).
Landed as written, with two edits for the file's register:
"Write assumptions down as comments" is gone. Its replacement is the second clause: the assumption still gets written down, it just gets written down somewhere that fires.