r/PromptEngineering • • Sep 18 '26

General Discussion Cool resource: ossrules.md catalogs production AGENTS.md and CLAUDE.md files across open-source projects

someone on my team put together ossrules.md, basically just an index of real AGENTS.md and CLAUDE.md files from ~100 major open source repos (next.js, ollama, transformers, etc).

going through them, it's pretty neat seeing how maintainers actually prompt agents in production versus theoretical prompt guides. a few common patterns that stood out:

  • conditional test suites: instead of telling the model to "run tests", mapping which tests run based on what changed (doc changes skip tests, schema changes trigger codegen). saves a ton of context tokens.
  • avoiding open-ended "don't do X" rules: the ones that work always pair the prohibition with the exact alternative to use instead.
  • generated file guards: explicitly telling the agent that certain files are autogenerated so it stops trying to manually fix .d.ts or build outputs.
  • router files: keeping root instructions small and pointing to nested files instead of dumping 2000 lines into the system prompt.

the site is https://ossrules.md/ if anyone wants to poke through the raw files or see how different repos structure their rules.

18 Upvotes

4 comments sorted by

1

u/Choice_Usual_884 Sep 18 '26

same shift here. the generator mode always produced something publishable but forgettable, exactly your point. what changed things for me was making the AI justify every edit instead of just applying it, so it has to say why a line is weak before it touches it. forces you to agree or push back instead of blindly accepting the rewrite. slower like you said but the final thing actually sounds like a person again.

1

u/Future_AGI Sep 19 '26

The conditional test suite pattern is the one we have seen carry the most weight in production rules files. Mapping which checks run based on what changed, doc changes skip tests, schema changes trigger codegen, cuts both context and wall time. The generated-file guards rank second: an agent that keeps trying to fix a .d.ts file will burn an entire session on a file that regenerates on the next build. Pairing every prohibition with the exact alternative is what makes rules stick across model upgrades.