Docs: Add Code Authoring Principles for agents#34835
Merged
Merged
Conversation
Distilled from recurring failure modes in agent-authored PRs: comments as investigation transcript, bending production to the test harness, unproven environment assumptions, over-engineered defensive tests, convention drift in generated files, and speculative generality. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a "Code Authoring Principles" subsection to AGENTS.md documenting recurring agent failure modes and concrete do/don't guidelines for comments, empirical verification of assumptions, contract-focused tests, and preferring deletion/simplicity over speculative generality. ChangesAgent Code Authoring Principles Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Comment |
Sidnioulz
reviewed
May 20, 2026
Sidnioulz
reviewed
May 20, 2026
Sidnioulz
reviewed
May 20, 2026
Sidnioulz
approved these changes
May 22, 2026
This was referenced May 22, 2026
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.
What
Adds a Code Authoring Principles For Agents section to
AGENTS.md, distilled from recurring failure modes observed in agent-authored PRs (concretely, the review of #34833).Why
These six patterns showed up repeatedly and each cost a review round. Writing them into the canonical agent instruction file makes them preventable instead of caught-after-the-fact:
AC-X2,Probe B), how-I-figured-it-out narrative, fragile cross-file line refs that rot.Each is a short rule + one-line rationale, placed just before Maintenance Rules For Agents. Docs-only; no code changes.
CLAUDE.mdalready referencesAGENTS.md, so no duplication.🤖 Generated with Claude Code
Summary by CodeRabbit