Conversation
…lace "Comments and rationale" said history and rejected alternatives are not deleted, only labelled. In practice that reads as permission to keep them, and the result is source that narrates its own debugging: mutation counts, a design that was tried and rejected, a corpus measurement taken while investigating, an explanation of code that has since been deleted. The default is now to cut. The pull request and the issue already hold that material, they outlive the session that produced it, and neither can silently contradict the code the way a comment can. Labelling stays for what genuinely has to remain in the source, which is the narrow case the existing `History:` / `Why not X:` convention was written for. Adds one test for the judgement call: write what would still be true if the bug had never happened. An invariant, an unusual flag, a non-obvious exit code and the sibling owning the other half of a check all pass it; how the defect was found does not. Three lines. The surrounding bullets already implied this -- "the measurement, the rejected design and the argument belong in the issue" -- so this makes the lead agree with them rather than introducing a new rule. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NwVE7osYo39KaUe7CEitFJ
Collaborator
Author
|
Closing: not needed. AGENTS.md already requires this — "the tail points, it does not narrate" sends the measurement and the rejected design to the issue, numbers need a gate or a repro, and anything past about six lines should be a decision record. The verbose docstrings that prompted this broke those rules rather than exposing a gap in them. The fix is to follow the file, which #720 and #721 now do. |
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.
Changes three lines in Comments and rationale so the section's lead agrees with the bullets under it.
The problem
The lead currently says:
Read as a default, that is permission to keep them, and the result is source that narrates its own debugging. Concretely, from a recent branch:
Twenty-seven lines, of which about six describe the invariant. The rest is a transcript of how it was found: pass counts, a rejected design, a corpus measurement, and justification for a test that no longer exists.
Nothing there violates the "label it" rule — it is all accurate. It is just material that belongs to the change rather than to the file.
The change
The default becomes cut, with labelling kept for the narrow case it was written for.
Label anything that is not current→Prefer removing what is not current; label what survives, naming the four things that most often should go (mutation counts, rejected designs, debugging measurements, explanations of deleted code).Why this is a correction, not a new rule
The bullets already said it, which is what makes the lead worth fixing rather than extending:
The lead was the one sentence pointing the other way, so it is the one that got followed.
No new section, and nothing about audits or reports —
Research artifacts are working materialalready covers those, including the retention bar and the instruction not to write a closure document.Verification
test_docs_consistency,test_adr_index,test_build_validationAdoption
Deliberately not a repo-wide rewrite. The existing verbose docstrings stay until something else edits them; new and touched code follows the terser style, which means the two will coexist for a while. #720 and #721 already do it this way.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NwVE7osYo39KaUe7CEitFJ