agentglass
CLAUDE.md330 starsChanged 2 months agoMITView on GitHub
Rules that cost something the day they were broken. They are short because each one is a scar, not a preference. Everything below follows from that one fact. - No private conversation ever reaches a file, a commit message, a pull request body, or a comment on one. Not quoted, not translated, not paraphrased with "reported by". A comment owes the next reader the defect and how it was measured; who mentioned it, and in what words, is not documentation.…
- Reads credentials
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- landing/llms.txtllms.txt
- browser-useSkill
- orchestratorSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
No real names: Not in a comment, not in an example, not in test data.
- Distinctive: line 25
Nothing in the tree that is not the change: No design notes, no scratch files, no implementation plans, no screenshots of a conversation.
- Distinctive: line 57
Prefer pulling a decision out of a screen and testing it there.
- Very specific: line 75
Before pushing, make ci-docker: the CI jobs in a container that is the runner (ubuntu 24.04, tmux 3.4, python 3.12, the bun ci.yml pins, …
- Very specific: line 123
No dynamic import() between modules that already import each other.
- Very specific: line 125
Prefer the house tokens (ICON/HIT in web/src/lib/iconSize.ts, --surface-* in web/src/index.css, LAYER in web/src/lib/layers.ts) over new …
≈ “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.
Files
Working in this repository
Rules that cost something the day they were broken. They are short because each one is a scar, not a preference.
This repository is public
Everything below follows from that one fact.
- No private conversation ever reaches a file, a commit message, a pull request body, or a comment on one. Not quoted, not translated, not paraphrased with "reported by". A comment owes the next reader the defect and how it was measured; who mentioned it, and in what words, is not documentation. Write "the strip did not follow the computer", never "somebody said the strip did not follow the computer".
- No real names. Not in a comment, not in an example, not in test data. Chat notifications and task boards carry other people's names — replace them with a placeholder before the example goes in.
- No links to an assistant session. They are private URLs and they belong in nobody's git history. The GitHub tooling can append one to a pull request body when the pull request is CREATED: after opening one, read the body back and strip it. Editing a body never adds one.
- One signature per pull request body, at most. Two is what happens when a footer is written by hand and appended by a tool as well.
- Nothing in the tree that is not the change. No design notes, no scratch files, no implementation plans, no screenshots of a conversation. A working document lives outside the repository.
bun test in server/ runs test/private-content.test.ts, and it fails the
build rather than trusting anybody to remember. It checks two of the five:
the session links, which are a fixed shape; and a quoted conversation, by language — this codebase is written in English, so three distinct Spanish function words inside one pair of quotes in a comment is not an accident. The comment is flattened first, because a quote wrapped across two lines is one quote to a reader.
A real name it cannot check, and pretending otherwise is worse than saying so: there is no scan that separates a person from an identifier. That one rests on whoever writes the example, and the place it has come from every time is a chat notification or a task board open on the other screen.
The other two — a paraphrase with "reported by", and a working document committed by accident — are the same: read before you commit, because nothing here will stop you.
Commits
- End the message with
Co-Authored-By:and nothing else. No session trailer. - One reason per commit, and the message says why rather than what — the diff already says what.
Tests
- A test's fixture should be the shape of something real, and its comment should say what went wrong without saying who it went wrong for.
- Prefer pulling a decision out of a screen and testing it there. There is no renderer in this project, and a rule about source is asserted against source.
Verify
make checkis the bar, neverbun testalone:bun testdoes not typecheck, and a green suite with a redtschas happened.make ciruns everything CI runs;make smokeboots the production bundle in headless Chrome and fails on a blank screen or a console error.- A check that failed because of the environment (missing
node_modules, noLANG, noTERM) is not a check that passed. Note it and rerun it. - Neither is a check that SKIPPED.
bun testexits 0 with tests it never ran: a fresh worktree withoutmobile/node_modulesreported "586 pass, 0 fail" out of 723 in three seconds.make checknow prints each tranche's total (tranche server: N pass, ...) and fails a tranche that ran fewer than its floor inscripts/tranche-floors.txt, the one place those numbers live. A commit that adds tests may raise a floor; one that removes tests lowers it on purpose. Read the line, not the exit code, when it is missing. - Before pushing,
make ci-docker: the CI jobs in a container that is the runner (ubuntu 24.04, tmux 3.4, python 3.12, the bunci.ymlpins, Chrome, noTERM, a non-root user) on the tree as it is now. It runs every step and names each one that failed.make ciruns on this machine's tmux and python, which is how a commit passed here and failed there.
Tests share one process
bun testruns every file in a single process. Globals a test sets leak into the others: stub the minimum and restore inafterAll. Known leaks:AGENTGLASS_ROOT,__setPrivateTermsPath, anything on PATH, the scope cache, and a proxy variable: Bun 1.3.14 goes on using anHTTPS_PROXYdeleted fromprocess.env, so a function that reads one takes the env as an argument.Bun.whichresolves with the PATH the process started with; changingprocess.env.PATHin a hook does nothing. A stub agent goes in a child process with the PATH already set, and the test asserts it ran against the stub.bun testwrites its verdict to stderr; read both pipes withPromise.all.beforeAllgets 5 s by default. Servers boot withSERVER_BOOT_MSfromserver/test/serverBoot.tsas the hook's second argument.expect(m).toBeDefined()on amatch()always passes. Usenot.toBeNull(). Break every new guard on purpose and watch it go red before trusting it.- Tests that read source as text: match
"async function foo("with the paren, slice to the function's own closing brace (never a fixed window), strip comment lines before asserting a word is absent, and keepawait Bun.file(...)at module level. - Isolation in every test that starts the server:
XDG_CONFIG_HOME,XDG_DATA_HOME,XDG_CACHE_HOME,AGENTGLASS_STATE_DIR,AGENTGLASS_DB,TMUX_TMPDIR. Onlybun testsetsNODE_ENV=test; abun -ethat importsdb.tsopens the real database. - tmux in tests:
-f /dev/null, an explicit-L agx-<name>socket under a privateTMUX_TMPDIR,env -u TMUX,sleepas the window command, andkill-serverbefore restoringTMUX_TMPDIR. Nevertmux kill-serverwithout-L.
Editing
- Stage by explicit path; never
git add -A. Other sessions may be editing the same tree. - Work notes (
TASKS.md,DECISIONS.md,*_AUDIT.md,NOTES.md) never go in the tree. Product docs live inREADME.md,SECURITY.md,CONTRIBUTING.mdanddocs/. - A pre-commit hook rejects private terms. Fixtures and comments use invented
names (
acme/orbit,ORBIT-1042). - A backtick inside a comment inside a template literal closes the literal;
a bare
\sin a template literal collapses tos. - Replacing a block in a large file: delimit it by its own closing brace and
check
git diff --statbefore committing. - No dynamic
import()between modules that already import each other; the bundler emits an undefined helper and the compiled server dies on line one. - Prefer the house tokens (
ICON/HITinweb/src/lib/iconSize.ts,--surface-*inweb/src/index.css,LAYERinweb/src/lib/layers.ts) over new numbers; count what the repo already uses before adding a size.
Before adding code
A ladder. Take the rungs in order and stop at the first one that answers.
- Does this need to exist? A thing nobody asked for is a thing somebody maintains.
- Does the repo already do it? Count what is there before adding a size, a helper, a colour or a store — the canon is usually already written, and the second copy is the one that drifts.
- Does the platform or the standard library do it?
- Does something already installed do it? No new dependency for one function.
- Can it be a few lines where the caller already is, instead of a module?
Then write it.
- A deliberate simplification names its ceiling. Say what the smaller thing
cannot do — "nested groups are the next thing after this and are not here" —
so the next person can tell a limit that was chosen from a gap that was
missed.
simplify:in the subject when that is the whole change. - The measured why is still written, and this one is not negotiable. Deleting code is not deleting the paragraph that says what was measured and why the obvious version does not work. That paragraph is what makes this repo readable six months later, and it is the first thing a "shortest diff wins" reflex eats.
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.

