Skip to content

docs: track and shorten the agent guidance - #57

Merged
sindredg merged 2 commits into
mainfrom
track-and-shorten-agent-guidance
Sep 17, 2026
Merged

sindredg merged 2 commits into
mainfrom
track-and-shorten-agent-guidance

Conversation

@sindredg

Copy link
Copy Markdown
Owner

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.

The claim the rest of the file rested on

It stated that main is protected, and that tests and ruff are required checks binding administrators too. Checked:

sky main -> protected: False
required_status_checks: {'enforcement_level': 'off', 'contexts': [], 'checks': []}

Neither holds. The history shows what that permits: 7683fdc Delete .github directory and 864a812 Rename project and simplify README content both went straight to main with 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 CI required 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

Removed Why
Azure hard rules: ARM_SUBSCRIPTION_ID, AcrPush, norwayeast, bootstrap identity split The Azure estate was deleted
Terraform conventions section terraform/ no longer exists
Layout tree Named styles.css which is gone, missed galaxy.py, and said test_places "arrives with PR #7"
"There is no Dockerfile and no compose file yet" Both exist
docs/decisions/ references Directory was deleted
WSL environment traps, ports, .superpowers/ sweeping Machine specific, belongs in the local notes that stay ignored
CONTEXT.md section Told agents to read it every session while it stayed ignored and absent on a fresh clone

Kept, 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_tracked fails if AGENTS.md is ignored or missing
  • test_no_em_dashes_in_tracked_markdown enforces the style rule that was previously prose

test_the_agent_notes_stay_ignored became test_the_local_agent_notes_stay_ignored, still covering CLAUDE.md, CONTEXT.md and docs/superpowers/.

Attribution and conventional commit prefixes were considered for tests and left as prose. Both need context pytest does not have: actions/checkout is shallow by default so git log sees 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.py was evaluated directly: all 12 pass. compileall clean, no line over 88 characters so ruff format has nothing to reflow, and git check-ignore confirms AGENTS.md is now trackable. CI on this pull request runs the full suite.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>


Generated by Claude Code

sindredg and others added 2 commits September 17, 2026 00:01
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>
@sindredg
sindredg merged commit 5ce941f into main Sep 17, 2026
2 checks passed
@sindredg
sindredg deleted the track-and-shorten-agent-guidance branch September 17, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant