headroom
AGENTS.md83 starsChanged 11 days agoMITView on GitHub
Headroom is a self-hosted web dashboard for AI account allowances, balances and usage. This repository contains the working application and its specification and research.
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 repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- app-api-compatibilitySkill
- pr-ciSkill
- provider-connectorSkill
- pr-showcaseSkill
- verify-webSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
13 rules. About 1 is common, 6 are distinctive, and 6 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 6
Read docs/README.md for the document map and current implementation status.
- Very specific: line 7
Before implementing a provider, read its dossier in docs/providers/ and the validation plan.
- Distinctive: line 8
Read ADR 0001 before changing architecture: an official CLI may run once for sign-in.
- Common: line 10
Keep provider credentials, cookies, authorization codes, personal account identifiers and raw account responses out of source, fixtures, …
- Distinctive: line 12
Treat an unavailable metric as unknown, not zero.
- Very specific: line 16
Run mise run check before claiming any change is done.
- Very specific: line 18
Before changing the Mac app API (packages/view-model/src/app-feed.ts, apps/server/src/routes/app.ts, scripts/app-contract.ts), Mac code …
- Very specific: line 19
Start every commit subject with a Conventional Commit type (feat:, fix:, docs: and so on).
- Distinctive: line 21
Before opening or updating a pull request that changes web or Mac views or server, connector, package or HeadroomKit behaviour, follow the …
- Distinctive: line 22
Before changing, adding or reviewing a provider connector, follow the provider connector skill.
- Very specific: line 23
After changing apps/web/src, see the change on screen with the verify web skill.
- Distinctive: line 24
Before calling a pull request green or ready, or when its CI fails, stalls or falls behind main, follow the PR CI skill.
- Very specific: line 25
Do not add copied global skills or speculative infrastructure.
≈ “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
Working in Headroom
Headroom is a self-hosted web dashboard for AI account allowances, balances and usage. This repository contains the working application and its specification and research.
- Read docs/README.md for the document map and current implementation status.
- Before implementing a provider, read its dossier in
docs/providers/and the validation plan. - Read ADR 0001 before changing architecture: an official CLI may run once for sign-in; refresh and collection are always direct HTTP from TypeScript.
- For account linking, persistence or security, read the connection design and the data model. Use its enumerations by name; do not invent state names in dossiers or code.
- Keep provider credentials, cookies, authorization codes, personal account identifiers and raw account responses out of source, fixtures, logs and shared artifacts. Use synthetic fixtures.
- Require a separate connection identity and credential boundary for every linked account. A folder path alone is not tenant isolation.
- Treat an unavailable metric as unknown, not zero. Keep monetary balances, credits, percentages and reset inventories in separate units.
- Preserve evidence labels: documented, source-inspected, prior observation, validated, and unvalidated. Label every metric
officialorprivate. A successful login does not prove quota access. - Monitoring must not generate model requests, redeem resets or purchase credits. A mutating account action needs an explicit owner action: a confirmed press in the dashboard, or a rule the owner configured or kept at its owner-approved default, such as use-before-expiry (ADR 0003). Every rule still needs "Allow Account Actions". Agents never enable a rule or run a mutation with real credentials.
- Zed is outside the current scope. A laptop helper is not part of the connection design. Headroom is personal self-hosted software and must not be designed as a hosted multi-user service.
- Run
mise run checkbefore claiming any change is done; it covers docs, format, type-aware lint, typecheck, Knip and tests. Usemise run <task>ormise exec -- <command>, never a global Bun. Update the docs index when adding a document. - Enumerations live in
packages/core/src/enums.ts. Add a state there and in the data model together, never in only one place. - Before changing the Mac app API (
packages/view-model/src/app-feed.ts,apps/server/src/routes/app.ts,scripts/app-contract.ts), Mac code that reads a server, or a supported version, follow the app API compatibility skill. - Start every commit subject with a Conventional Commit type (
feat:,fix:,docs:and so on). Release-please sets the version from it; see Releases. - Pin every dependency to an exact version. Fix a lint or type error at its cause; do not add a disable directive without a one-line reason.
- Before opening or updating a pull request that changes web or Mac views or server, connector, package or HeadroomKit behaviour, follow the PR showcase skill.
- Before changing, adding or reviewing a provider connector, follow the provider connector skill.
- After changing
apps/web/src, see the change on screen with the verify web skill. - Before calling a pull request green or ready, or when its CI fails, stalls or falls behind main, follow the PR CI skill.
- Do not add copied global skills or speculative infrastructure. Record material implementation choices in
docs/decisions/.
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.

