AGENTS.md Don’t Rules

Concept detailing the precise negative‑rule (“don’t” statements) found in AGENTS.md files across the top‑100 GitHub repositories. The field study enumerated 784 explicit bullets, most of which use strong modality (must, always, never) and cover topics such as commit messages, test handling, and AI disclosure.

Common Modalities

  • must – obligatory actions
  • always – perpetual enforcement
  • never – forbidden practices
  • cannot – disallowed state

Topic Categories

Category# Rules% of TotalRepresentative Rules
Commit Messages374.7%“Never use an emoji in a commit subject that is not a PR number.”
Testing11714.9%“Never skip a test when adding a feature.”
Build & CI789.9%“Always run spotlessCheck before commit.”
Language conventions9111.6%“Must format code with Prettier before commit.”
Security182.3%“Never commit secrets or credentials to source control.”
AI Disclosure111.4%“If AI was used in any commit, add a AI-assisted: <tool> trailer.”
Build tools425.3%“Never run go test without -race flag on CI.”
Documentation536.7%“Must document all public APIs in Markdown”
Git Workflow8911.3%“Always run git diff --name-only before git commit to verify changes.”
Miscellaneous658.3%“Never commit compiled artifacts.”

Detailed Bullets (Excerpt)

  • Never allow bun test to run when you haven’t installed dependencies.
  • Always add a brief commit message summarizing changes.
  • Must keep all tests under src/test/ or .../tests.
  • Never leave CI configuration files with hard‑coded secrets.
  • must run ./gradlew spotlessApply before committing in Java projects.
  • Always push code to a feature branch and create a PR.
  • Never merge a PR that fails the lint check.
  • Must reference any new module in the top‑level docs/ folder.
  • Always tag release commits with vX.Y.Z.
  • Never rely on unstaged changes to satisfy CI pre‑commit hooks.

Relationships

Implications

  • Cognitive overhead: Contributors must remember strong modality verbs that carry action requirements.
  • Automation potential: Rule sets can be fed into lint tools or Git hooks (e.g., pre‑commit, husky) to enforce compliance.
  • Onboarding speed: Clear disallowed actions reduce accidental infractions.
  • Cross‑project consistency: Uniform rule style aids teams that contribute to multiple repos.

Open Questions

  • Are there domains (e.g., data‑science, embedded) where specific rule categories dominate?
  • How effective are always vs. must in preventing regressions?
  • Can a machine‑learning model predict which rule categories drive highest issue frequency?

Sources

  • raw/prompts/articles/coldtea-agents-md-field-study.md – Field study page containing the original negative‑rule enumeration.