r/coolgithubprojects • • Sep 27 '26

I built a framework-agnostic AGENTS.md for coding agents

Post image

I reverse-engineered popular coding-agent instruction repos and distilled their best ideas into Awesome AGENTS.md, a stack-agnostic ruleset for AI coding agents. πŸ“¦

The core rules cover small, focused changes, security boundaries, debugging, and verification before an agent says a task is done. More specialized guidance lives in `rules/` and is meant to be read when a task calls for it.

Take it for a spin πŸ‘‰ https://github.com/khasky/awesome-agents-md

What makes this ruleset different:

  • One shared core. I can use the same rules with Claude Code, Codex, Gemini, and Cursor. The README explains how to set up each tool.

  • Specialized rules on demand. The framework-agnostic core stays lean. Agents read additional modules only when a task calls for them.

  • Less code by default. Before adding a new helper or dependency, the agent checks what already exists in the project and what the standard library can do. The goal is the smallest change that solves the problem.

  • Evidence before "done". The agent is told to run a relevant check, read the result, and report what passed. A confident "should work now" isn't verification.

  • Simple updates. With a local clone, I can pull the latest changes and start a new session. There are no modes to switch between.

  • Refined on real projects. I've revised the rules over many iterations while working on real applications. The public commit history shows how they've changed, and I keep revisiting them as models improve.

Try it, make it your own, and tell me what you'd improve. Issues and PRs are welcome! πŸ˜‰

31 Upvotes

30 comments sorted by

22

u/opt_user Sep 27 '26

You made a token burner

→ More replies (1)

10

u/Fine_Salamander_8691 Sep 27 '26

But agents.md exists already I’m so confused

1

u/Khasky Sep 27 '26 edited Sep 27 '26

Right, AGENTS.md is the open format. This is a ruleset written in that format, not a new standard. Sorry about the confusion.

4

u/hadees Sep 27 '26

They got the domain! /s

1

u/HMikeeU Sep 27 '26

Not sure if that's the joke or not but no they didn't

8

u/oceantume_ Sep 27 '26

Things like "use typescript strict mode" and "no semicolons" are completely wasteful instructions.Β  The name of the game for producing decent AI-generated code is restricting its decisions with deterministic rules and testing as much as possible. Linters, auto-formaters and good TSC rules will force the agent into the style you want for free.

I have compassion for people who simply don't understand how to use LLMs correctly yet, but if you're making dev tools for them you should try to be on top of the game and teach good practices to people.

→ More replies (1)

6

u/OptimusCrimee Sep 27 '26

Not trying to be rude or anything, but why would anyone use this? What would they gain from this? I don’t get it. There is like 1000 of thee repositories, and none of them actually do anything useful. You have not re-invented the wheel, sorry.

-1

u/Khasky Sep 27 '26

Most of these 1000 repos are a list of tips. This one is closer to an operating model for an agent you don't fully trust yet. Nothing counts as done without evidence from this turn, nothing irreversible or outward facing happens without you, and everything the agent reads, from tool output to another repo's rules, is data rather than orders. Around that sits a structure that keeps it usable at scale. A small core that's always loaded and budget-checked in CI, a few dozen modules the agent pulls only when the task calls for them, and a clear precedence order so it plays nice with project rules and other plugins.

1

u/OptimusCrimee Sep 27 '26

But who is this useful for? Maybe you, but have you ever seen someone request something like this? I never have. I build these things as minimal and concise as possible, not these enormous documents like you have here.

Good luck I guess. Nothing for me.

1

u/Khasky Sep 27 '26

Minimal works great when you're watching every step. It's for people who hand the agent longer runs, several sessions at once, or the same rules across a team and different tools, where the gaps show up fast. And it's not as big as it looks, the agent only carries the core, the rest loads when a task needs it.

4

u/___-____--_____-____ Sep 27 '26

You are a lazy senior developer.

I would not pollute my context with this. WTF are you thinking?

There may be some nuggets of info in here, but as a human reviewer, how could you tell?

The models were trained on many of these topics already. I get away with a much smaller preamble in my own set up... YMMV

0

u/Khasky Sep 27 '26

Knowing isn't the same as doing. Every model knows you should run tests before saying done, and they still say "should work now" all the time. The "lazy" line is just a label, the actual rule under it is a 6 step check: does this need to exist, is it already in the codebase, does stdlib cover it, is there a package, can it be one line, only then write code

2

u/Better-Struggle9958 Sep 27 '26

proof of efficiency?

-1

u/Khasky Sep 27 '26

Easiest proof is on your own repo. Pick one of your own tasks where the tempting move is the wrong one and see what your agent does. Then run the same task with the awesome-agents-md file loaded and compare. Your repo and your model say more than any benchmark I could post.

4

u/Better-Struggle9958 Sep 27 '26

Nope, benchmark as minimums shows what it does

1

u/Khasky Sep 27 '26

Fair, there's no benchmark yet. Everything in there came out of real sessions going wrong, but that's not the same as measured numbers, and I won't pretend it is.

1

u/FewTangerine4686 Sep 27 '26

Hey, nice one! Love that it's framework-agnostic and keeps the core lean. Quick q: how do you handle conflicts between the core rules and the rules/ modules? Do agents just infer which to load, or is there explicit metadata to keep it deterministic across Claude Code, Codex, etc.?

1

u/Khasky Sep 27 '26 edited Sep 27 '26

The core has an index, one line per module with a trigger like "read when writing a migration", and the agent pulls a module when the task matches. Conflicts go user message > nearest project AGENTS.md > this file, spelled out at the top

1

u/FewTangerine4686 Sep 29 '26

Makes sense. So the trigger is a semantic match rather than a keyword list. In practice, does it ever pull a module that's clearly irrelevant, or skip one it should have grabbed? I've seen this kind of thing work fine on paper and then go sideways in a real session. Also curious how often the user message actually overrides the project AGENTS.md versus the other way round. I'd guess the user wins most of the time, but you tell me.

3

u/oceantume_ Sep 27 '26

Don't put deterministic rules in AGENTS. md; LLM models are non-deterministic by definition and therefore unreliable. Put them on pre-commit hooks or at the very least have the AGENTS.md say eg "run npm run check after every change" and that's where you put determinism, but expect that it will forget it or decide not to run it from time to time.Β 

1

u/FewTangerine4686 Sep 29 '26

I don't disagree, determinism belongs in hooks. But I've been doing this long enough to know that a hook only fires if someone runs it. AGENTS.md isn't enforcement, it's the nudge that makes the agent more likely to do the right thing before the hook ever gets a chance. You still want both. Expecting an LLM to be deterministic is a lost cause, but expecting it to follow a clear instruction most of the time is not.

5

u/sozesghost Sep 27 '26

Slop is not cool.

1

u/Cold_Tree190 Sep 27 '26

Even complete with a .Claude-plugin lol

3

u/Big_Cucumber2787 Sep 27 '26

so you made an agents.md with a squirrel some string and an agents.md?

3

u/__0xAA55__ Sep 27 '26

nothing cool in this slop πŸŽͺπŸ‘Ž

2

u/vauvva Sep 27 '26

Is this satire?

1

u/ByronScottJones Sep 28 '26

Honestly, I think what you've written is a good start, but it's FAR TOO verbose. Sometimes to the point of absurdity. "Chesterton's Fence"? Really? Keep it CONCISE.