docs: create AGENTS.md with CI-enforced rules for coding agents#754
docs: create AGENTS.md with CI-enforced rules for coding agents#754sergio-sisternes-epam wants to merge 3 commits intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a repository-root AGENTS.md intended to be the authoritative, agent-readable checklist of CI-enforced rules and conventions for working in this codebase (closing #695), and ensures it is tracked and documented.
Changes:
- Add new
AGENTS.mdwith setup steps, pre-commit checklist, and pointers to.github/instructions/*. - Update
.gitignoreto unignore/AGENTS.mdwhile keeping otherAGENTS.mdfiles ignored. - Add a changelog entry under
## [Unreleased].
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
AGENTS.md |
New agent contract/checklist and pointers to detailed instruction files. |
.gitignore |
Ensures the root AGENTS.md is tracked despite a broader ignore pattern. |
CHANGELOG.md |
Records the addition of AGENTS.md under Unreleased/Added. |
Closes microsoft#695 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address Copilot review feedback -- encoding check now covers all staged text files, not just .py files, matching the encoding rule scope.
Update docs/cli-reference.md (non-existent) to the actual path docs/src/content/docs/reference/cli-commands.md in two places.
0f6ba1e to
9006087
Compare
Apm Review Panel — REQUEST CHANGES (revised: dogfood-first)
Synthesis after a second pass with the panel: the right move is bigger than "swap one hand-authored file for another." APM exists to compile one source into N agent-tool formats. This repo should prove that on its own contributing guide. The dogfood-first ask
Why the reframeThree things made the panel pivot: Format fragmentation isn't slowing down. AGENTS.md is OpenAI-aligned. CLAUDE.md is Claude Code (highest market share). Copilot reads scoped APM already supports two of the three formats out of the box. The release-notes story changes shape entirely. Original PR: "APM the OSS project ships an AGENTS.md." Revised PR: "APM the OSS project ships its contributing guide as Suggested sequence
To SergioI owe you an apology. My first pass on this PR asked for a content port; my second pass asked for the legacy file deleted; this third pass moves the goalposts again to "use APM itself for this." That's three iterations of feedback and I'm aware that's painful. The reason I think it's worth the third iteration: the original direction was right — close issue #695 — but the implementation shape of "hand-author another instructions file" is the exact problem APM was built to solve. If we ship that shape, every reviewer who reads our repo sees a contradiction. Whereas if we ship the dogfood shape, every reviewer sees the proof. If you'd rather hand off, ping me and I'll take it from here. If you want to stay with it, #792 is the prerequisite — happy to pair on it or have a maintainer pick it up so this PR isn't blocked on it for long. Either way, thank you for the patience and for raising the issue in the first place. Closing #695 is the right outcome; just need to land it as a proof-of-product rather than a doc add. Earlier panel feedback (still partially applies):
|
There was a problem hiding this comment.
Strategic REQUEST CHANGES — full reasoning in the panel verdict above (#754 (comment)).
TL;DR: don't hand-author AGENTS.md. Move the contributing-instructions content into .apm/instructions/contributing.md and let apm compile generate AGENTS.md, CLAUDE.md, and .github/copilot-instructions.md (the last one is the dogfood gap I just filed as #792, marked good-first-issue). Then delete .github/copilot-instructions.md as a hand-authored file.
Sequence: land #792 first (small lift), rebase this PR on top so it ships as proof-of-product rather than a doc add. Release-notes story becomes 'APM now compiles its own contributing guide — one source, three agent-tool outputs.'
Plus one inline fix: the Setup section's uv sync --extra dev --extra build is the CI command. Default for human contributors should be uv sync --extra dev (--extra build only when building the release binary).
Sergio — apology for the third iteration of feedback shift is in the panel comment. Offer to hand off stands. Either way, thank you for raising #695 in the first place; closing it is the right outcome.
|
Closing in favour of the dogfood-first approach. After re-reading the panel review and #792, hand-authoring Instead of splitting the work into "land #792, then port AGENTS.md content," I'd like to go one step further and turn microsoft/apm's entire existing primitive surface (
Will draft a fresh issue scoping that package (structure, compile targets, dependencies on #792, CI staleness guard, migration plan) and link it here once it's up. #695 stays open as the "root AGENTS.md exists" outcome — it'll close automatically when the new package lands and Sergio closing this PR; happy to pick up #792 as the prerequisite or pair on it. |
Summary
Creates
AGENTS.mdat the repository root -- the single authoritative entry point for AI coding agents working in this repository.Closes #695
What this file provides
A concise, machine-scannable contract covering every CI-enforced rule that agents could violate:
uv syncand verification commands.github/instructions/*.instructions.mdfilesDesign decisions
Top-level entry point, not a duplicate -- AGENTS.md contains directives and points to
.github/instructions/for detailed per-module rules. No content duplication.ASCII-only -- the entire file stays within printable ASCII (U+0020-U+007E), consistent with the encoding rules it documents.
103 lines -- concise and scannable. Agents get rules, not rationale.
CLI docs path corrected -- issue [FEATURE] Create root AGENTS.md documenting all CI-enforced rules for coding agents #695 referenced
docs/cli-reference.mdwhich doesn't exist. Used the actual path:docs/src/content/docs/reference/cli-commands.md..gitignoreupdated --AGENTS.mdwas in.gitignore(local development section). Added!/AGENTS.mdnegation to track the root file while keeping subdirectory AGENTS.md files ignored.Changes
AGENTS.md.gitignore!/AGENTS.mdnegation patternCHANGELOG.md[Unreleased] > AddedValidation
grep -Pn '[^\x09\x0a\x0d\x20-\x7e]')uv run pytest tests/unit tests/test_console.py -n auto --dist worksteal)