docs: expand AGENTS.md with git workflow, boundaries and code style examples - #5526
Draft
jamescrosswell wants to merge 2 commits into
Draft
docs: expand AGENTS.md with git workflow, boundaries and code style examples#5526jamescrosswell wants to merge 2 commits into
jamescrosswell wants to merge 2 commits into
Conversation
…xamples Fills the gaps against the six areas that matter for agent instruction files: commands, testing, project structure, code style, git workflow and boundaries. - Git Workflow: the PR title is the changelog line, so document the conventional-commit format and the prefix -> CHANGELOG section mapping from .github/release.yml. The previous wording pointed at "commit message conventions" without ever stating the format. - Boundaries: collect the five never-edit paths (generated, vendored or CI-guarded) into one table with what to do instead; add never-commit-secrets and an ask-first tier. - Code Style: name .editorconfig as authoritative, dotnet format as the enforcer, and show the no-comments rule as good/bad snippets. - Before you're done: the build/test/format gate, plus a note that the API approval tests self-rewrite their snapshots on a local run. - Promote Code Intelligence to a top-level heading; it was nested under Commit Attribution. CLAUDE.md and .github/copilot-instructions.md are symlinks to AGENTS.md and pick these up unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
#skip-changelog
Audits
AGENTS.mdagainst the six areas that GitHub's analysis of agent instruction files found separate the ones that work from the ones that don't — commands, testing, project structure, code style, git workflow, boundaries — and fills the gaps. The file was already strong on commands, testing and structure; this covers the other three.Git Workflow (new)
The biggest gap. The old Changelog section said entries are "generated automatically from Commit message conventions" and linked out, but never stated the format — so an agent reading only this file couldn't write a compliant one. It was also slightly wrong: squash-merge means the PR title becomes the commit message and therefore the changelog line, not the individual commits. The new section says that explicitly and adds the prefix → CHANGELOG section table taken from
.github/release.yml, including the!→ Breaking Changes case.Also documents the
git add -Asubmodule hazard (staging stale working copies undermodules/silently reverts a recorded pointer inside an unrelated commit) and the auto-close keyword requirement for issue links.Boundaries (new)
The never-edit rules all existed already, but were scattered across four sections, so absorbing them required reading the whole file. Now one table —
*.slnf,CHANGELOG.md, the Cocoa bindings,modules/**,*.verified.*— each with what to do instead. Adds never-commit-secrets and an ask-first tier for breaking public API, new dependencies, and CI workflow changes.Code Style
Was three paragraphs of prose about comments and nothing else. Now names
.editorconfigas authoritative anddotnet formatas the enforcer, and demonstrates the no-comments rule with ❌/✅ snippets. The ✅ example is a real comment fromsrc/Sentry/Internal/DebugStackTrace.csrather than an invented one.Before you're done
CONTRIBUTING.mdtells humans to run./build.shbefore pushing;AGENTS.mdnever said what "finished" means. Adds the build/test/format gate, plus agit statusnote — the API approval tests call Verify'sAutoVerify(test/Sentry.Testing/ApiExtensions.cs), so a local run silently rewrites*.verified.txtand still reports green.Notes for review
CLAUDE.mdand.github/copilot-instructions.mdare symlinks toAGENTS.md, so this one file covers all three agent vendors — no drift to keep in sync.samples/has a real DSN for a Sentry demo project), so the secrets rule is worded without it..github/agents/*.agent.md), so its YAML frontmatter / persona / "create six named agents" advice is deliberately not applied here. Only the six-areas finding transfers to a repo-rootAGENTS.md.