houserules
AGENTS.md0 starsChanged 3 months agoMITView on GitHub
Content outside the houserules markers belongs to the user. A file that exists without markers is left untouched and reported, never overwritten. --overwrite is the only path that replaces a file, and the user has to type it. Phase 0 compiles rules to instruction files. Scope filtering is phase 1, checks are phase 2, capture is phase 3. Frontmatter fields for later phases are parsed and preserved now so the file format never has to break, but nothing acts on…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/code--checks-skip-our-own-files.mdcCursor rule
- .cursor/rules/code--cost-is-honest.mdcCursor rule
- .cursor/rules/code--errors-name-the-file.mdcCursor rule
- .cursor/rules/code--no-new-dependencies.mdcCursor rule
- .cursor/rules/code--output-is-deterministic.mdcCursor rule
- .cursor/rules/code--tests-are-typechecked.mdcCursor rule
- .cursor/rules/process--errors-are-usage-or-failure.mdcCursor rule
- .cursor/rules/process--never-clobber.mdcCursor rule
- .cursor/rules/process--no-control-characters.mdcCursor rule
- .cursor/rules/process--phase-discipline.mdcCursor rule
- .cursor/rules/process--rules-come-from-sources.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 54
Do not add a runtime dependency without asking first.
- Distinctive: line 71
Every error a user can hit names the file it came from and what to do about it.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
<!-- houserules:start --><!-- Generated by houserules. Do not edit between these markers - edit rules/ and run `houserules build`. --><!-- source d2a226e80779 -->Process
Never destroy hand-written content
Content outside the houserules markers belongs to the user. A file that exists
without markers is left untouched and reported, never overwritten. --overwrite
is the only path that replaces a file, and the user has to type it.
Stay inside the current phase
Phase 0 compiles rules to instruction files. Scope filtering is phase 1, checks are phase 2, capture is phase 3. Frontmatter fields for later phases are parsed and preserved now so the file format never has to break, but nothing acts on them yet. If a change only makes sense because of a later phase, it does not belong yet.
No stray control characters in source
Applies to: src/**
A literal control character in a source file makes git treat it as binary and
hides the change from review. Sentinels and separators are written as escapes
(\\u0000), never typed directly. This has already bitten twice.
Rules load from a source, not a directory
Applies to: src/source.ts, src/load.ts, src/engine.ts
A local directory is one RuleSource, not the only way rules can arrive.
Packs installed from a registry become a second implementation, so nothing
above the source interface may assume rules came from the filesystem. Ids are
checked for collisions across all sources together, so an installed pack can
never quietly shadow a rule the project wrote itself.
Exit 2 for usage, 1 for failure, 0 for success
Applies to: src/cli.ts
A wrong command or a missing argument is exit 2 - the user needs to type something different. A rule that failed to parse, a stale file, or drift is exit 1 - the tool worked and the answer is no. Scripts and CI depend on the difference, so never collapse the two.
Code
Ask before adding a dependency
Applies to: src/**, package.json
Do not add a runtime dependency without asking first. Say what it is for and
what it replaces, then wait for an answer. yaml is the only runtime
dependency this project has, and that is deliberate.
Generated output is deterministic
Applies to: src/compile.ts, src/engine.ts
The same rules must always compile to byte-identical output. Sort explicitly
and never depend on filesystem ordering, the clock, or randomness. check
works by recompiling and comparing, so any nondeterminism turns into a false
failure in someone's CI.
Errors name the file and the fix
Applies to: src/**
Every error a user can hit names the file it came from and what to do about it. Collect parse failures across all files and report them together rather than throwing on the first one, so a broken rule never hides its neighbours.
Checks never examine our own output
Applies to: src/verify.ts, src/health.ts
A rule's own text contains whatever it forbids, so scanning the rulebook makes
every absent rule fail against itself. The rules directory, installed packs
and every generated instruction file are excluded from what a check reads.
Estimated numbers say they are estimated
Applies to: src/cost.ts, src/cli.ts
Token counts here are an approximation, not a tokenizer, and every surface that shows one says so. A precise-looking wrong number is worse than an honest rough one, because someone will put it in a budget.
Tests are typechecked, not just run
Applies to: package.json, tsconfig*.json
Vitest transpiles without checking types, so a test file can be quietly wrong
about the shapes it builds. npm run typecheck covers src and test both.
<!-- houserules:end -->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.

