agentleFS
rg11740-ship-itrg11740-ship-it/houserules/CLAUDE.md

houserules

CLAUDE.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…

The file

We split this CLAUDE.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
  1. Very specific:

    Do not add a runtime dependency without asking first.

    line 54
  2. Distinctive:

    Every error a user can hit names the file it came from and what to do about it.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md
<!-- 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 -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.