docs: track and shorten the agent guidance - #57
Merged
Merged
Conversation
AGENTS.md was gitignored, so no rule in it reached a fresh clone. An agent working here read the code and inferred the conventions instead, which is how the file drifted two renames behind without anyone noticing. Most of it described a project that no longer exists. Removed: the Azure hard rules for ARM_SUBSCRIPTION_ID, AcrPush, norwayeast and the bootstrap identity split, the Terraform conventions section, the layout tree naming files that moved or went, "there is no Dockerfile and no compose file yet" when both exist, docs/decisions references to a deleted directory, and the WSL environment traps, which are machine specific and belong in the local notes that stay ignored. Corrected the claim the rest of the file rested on. It stated that main is protected and that tests and ruff are required checks that bind administrators. Neither holds: protected is false and enforcement_level is off. The file now says so, and cites 7683fdc, which deleted .github directly on main with no pull request. Kept what is judgment and cannot be checked: the agent authority boundary, tests assert properties rather than copies, the stacked pull request lesson from #18 and #19, and the writing rules. Re-drew the examples in the properties section from live code, since the originals cited Terraform that is gone. Two rules became tests rather than prose, because a rule in prose is skimmed and a rule in a test fails the build: test_the_shared_agent_guidance_is_tracked and test_no_em_dashes_in_tracked_markdown. Cost: 140 lines against roughly 300, so some genuine nuance went. The attribution reasoning and the merge ordering economics are shorter than they were. CONTEXT.md is no longer mentioned, because the file told agents to read it every session while it stayed ignored and absent on a fresh clone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
140 lines was still too long. The rule applied here: if the README says it, or the code says it, or a test enforces it, it does not belong in this file. That removed the local development commands, which duplicated the README's Verify section and were the copy this repository already warns against; the layout tree, which an agent gets from ls; and the style list, since test_no_em_dashes_in_tracked_markdown enforces the only part of it a machine can check and a failing test explains itself. Also replaced the paragraph asking agents to check before touching a version pin, ruff.toml, filterwarnings or the base image. It was written last night and it would have blocked two of the three changes that got CI green that same night: the pytest.ini ignore, without which no test runs at all, and pinning ruff, without which nothing lints. A rule that blocks the fixes on the night they are needed gets deleted, and takes the rules around it with it, which is how .github went. What replaces it names the direction rather than the files. Narrowing a check to make it honest is fine and must be explained. Weakening one to make red go away is not. Kept one line about astronomy.js and world.js holding data tables and an encoded coastline, because nothing else records that their long lines are deliberate, and the formatter work still to come would otherwise reflow them. 64 lines against 140, and against roughly 300 before. 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.
AGENTS.mdwas gitignored, so no rule in it reached a fresh clone. An agent working here read the code and inferred the conventions instead, which is how the file drifted two renames behind without anyone noticing.The claim the rest of the file rested on
It stated that
mainis protected, and that tests and ruff are required checks binding administrators too. Checked:Neither holds. The history shows what that permits:
7683fdc Delete .github directoryand864a812 Rename project and simplify README contentboth went straight tomainwith no pull request. The first removed CI along with the workflows, and 26 tests asserted on missing files for ten days before anything ran them again.The file now states the real position and cites that commit. Turning on branch protection with
CIrequired is the change that makes the original sentence true, and it is a repository setting, not something a commit can do.Removed, as describing a project that no longer exists
ARM_SUBSCRIPTION_ID,AcrPush,norwayeast, bootstrap identity splitterraform/no longer existsstyles.csswhich is gone, missedgalaxy.py, and saidtest_places"arrives with PR #7"docs/decisions/references.superpowers/sweepingCONTEXT.mdsectionKept, as judgment that cannot be checked
The agent authority boundary, "tests assert properties, not copies", the stacked pull request lesson from #18 and #19, and the writing rules. The examples in the properties section were re-drawn from live code, since the originals cited Terraform that is gone.
Two rules became tests
A rule in prose is skimmed. A rule in a test fails the build.
test_the_shared_agent_guidance_is_trackedfails ifAGENTS.mdis ignored or missingtest_no_em_dashes_in_tracked_markdownenforces the style rule that was previously prosetest_the_agent_notes_stay_ignoredbecametest_the_local_agent_notes_stay_ignored, still coveringCLAUDE.md,CONTEXT.mdanddocs/superpowers/.Attribution and conventional commit prefixes were considered for tests and left as prose. Both need context pytest does not have:
actions/checkoutis shallow by default sogit logsees one commit, and a pull request title is not visible from inside the suite. Those belong in a CI step if they are worth enforcing.Cost
140 lines against roughly 300, so some genuine nuance went. The attribution reasoning and the merge ordering economics are shorter than they were.
Verified
Every assertion in
test_repository_contract.pywas evaluated directly: all 12 pass.compileallclean, no line over 88 characters soruff formathas nothing to reflow, andgit check-ignoreconfirmsAGENTS.mdis now trackable. CI on this pull request runs the full suite.Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Generated by Claude Code