ObsidAgent
AGENTS.md1 starsChanged 3 months agoMITView on GitHub
Entry point for Codex, and for any agent that reads AGENTS.md rather than CLAUDE.md. Claude Code reads the same rules through notes.md and .claude/. This folder is a vault: durable markdown notes plus the engine that searches and indexes them. Nothing here loads on its own. Fetching context is your job, and so is putting it back. Read notes.md. It is the full convention: the five folders and what each one holds, frontmatter, linking rules, how to decide between editing…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- add-sourceSkill
- analyze-videoSkill
- archive-projectSkill
- clean-projectSkill
- code-standardsSkill
- global-heartbeatSkill
- map-projectSkill
- notes-heartbeatSkill
- researchSkill
- resolve-projectSkill
- sleepSkill
- test-projectSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 65
Every index.md is generated.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Entry point for Codex, and for any agent that reads AGENTS.md rather than CLAUDE.md. Claude Code reads the same rules through notes.md and .claude/.
This folder is a vault: durable markdown notes plus the engine that searches and indexes them. Nothing here loads on its own. Fetching context is your job, and so is putting it back.
Before you read or write a note
Read notes.md. It is the full convention: the five folders and what each one holds, frontmatter, linking rules, how to decide between editing an existing note and adding one, and when writing nothing is the right outcome. The rest of this file is the mechanical layer.
Search first, always
python3 .scripts/notes.py -m "the question you actually have"Ask in your own words. The ranking fuses BM25 with local embeddings, so a plain question works and does not need the vault's jargon. -m returns one line per note: score, last-updated, path, description, and the body line that earned the hit. Twenty rows is roughly 1,400 tokens, cheap enough to search several times before writing.
| Flag | Effect |
-n 40 | more or fewer than the default 20 |
-x | lexical only, for an exact filename or symbol |
--dense | semantic only, to see what meaning alone retrieves |
<topic> <topic> | every note either index topic groups |
-a | everything, unranked |
| no argument | index topics and their counts, about 70 tokens |
Each ranker fails at what the other is for. BM25 cannot find am i well positioned for this, because that query and the note answering it share no word. Embeddings cannot find CGSSetWindowShape, because no model has seen the symbol. Search wide before writing: several phrasings, the jargon and the plain words. A near-duplicate that scores 8 when you expected 20 is still a near-duplicate.
Following a link
[[stem]] names a file by stem, never by path. The target is the note whose filename is stem.md, wherever it sits.
find . -name '<stem>.md' -not -path '*/.*'Strip the decorations first: [[stem|display text]], [[stem#Heading]], and [[folder/stem]] all target stem.md.
Close the turn once, not once per file
python3 .scripts/reindex.pyRewrites every index from frontmatter, then prints only what it will not guess at, each line naming its own fix. dangling and orphan are worth stopping for. A dangling link is fine when it marks a note worth writing and a hole when its target was deleted.
Then, whenever a turn added, deleted, or edited a note, in this order:
python3 .scripts/notes.py -m "warm embeddings" # then
python3 .scripts/colorize.pycolorize.py skips any note with no cached vector rather than embedding it. Editing a note invalidates its vector, so running the colouriser alone after a writing turn leaves exactly the notes you just touched grey. The search call is what warms them; its output is discardable.
Colour is not decoration. Hue, lightness, and chroma come from the embedding, the link neighbourhood, and distance from the vault centroid, and they are rank-normalised across every note, so adding or deleting notes shifts all of them. A partial run makes new notes read as unrelated to everything.
What you must not write
compass/ holds the vault owner's standing goals and principles. It is read-only to every agent, enforced by .claude/hooks/notes-immutable.py. A note carrying immutable: true in its frontmatter is the same. Propose changes in chat; never make them.
sources/ is read-only once written. A source that turns out wrong gets contradicted in the note citing it, never corrected in place.
Every index.md is generated. Editing one by hand is work the next reindex overwrites.
Scope
Touch the note you changed and the notes that directly cite it. Do not follow those notes' links onward, re-fold every topic they touch, or start closing gaps in the graph. Each of those opens two more, and a one-line memory write becomes an hour of rewriting. When a change clearly wants a deeper pass, say so in one line and let the owner call it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

