Agency
CLAUDE.md11 starsChanged 54 days agoApache-2.0View on GitHub
Agency is a Tauri 2 desktop app: a Rust backend in crates/ and a React + Vite frontend in ui/. See README.md for the layout and build instructions, and docs/ for the design record. These two rules exist because both have already been broken here, and both are expensive to fix after the fact. - No AI attribution, ever. No Co-Authored-By: Claude trailer, no "Generated with" line, no session URL, in a commit message or a PR body. Write the…
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
No competitor product name anywhere in the repo: Not in a commit message, a branch name, a PR title, or a document.
- Distinctive: line 34
Commit subjects are imperative and lower-case after the first word.
- Distinctive: line 76
If a glyph has an emoji presentation, pin it with U+FE0E.
- Distinctive: line 110
Keep injected context prompt-cache-stable: No timestamps, UUIDs or counters in the stable prefix.
- Distinctive: line 112
Default-deny allowlists for anything imported or shared: If we ever accept a shared agent profile, run config or deep link, allowlist exact …
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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 repo
Agency is a Tauri 2 desktop app: a Rust backend in crates/ and a React + Vite
frontend in ui/. See README.md for the layout and build instructions, and
docs/ for the design record.
Git hygiene
These two rules exist because both have already been broken here, and both are expensive to fix after the fact.
- No AI attribution, ever. No
Co-Authored-By: Claudetrailer, no "Generated with" line, no session URL, in a commit message or a PR body. Write the message and stop. Every commit has to be attributable to a person who can license it, and an agent cannot; a trailer is a claim against that. It applies to the author and committer fields as much as the message — eight commits authored by an agent reachedmainthrough merged PRs before anyone noticed, becausecommit-msgis never passed those fields. Theauthorshipjob in.github/workflows/ci.ymlchecks them on every PR; the hook cannot. - No competitor product name anywhere in the repo. Not in a commit message, a branch name, a PR title, or a document. This was once scoped to git metadata alone, on the grounds that the design record was private and could name names freely. Publishing the repo removed that exemption, and the named readings moved out of the tree entirely. Describe the observation, not who it is about: "a self-hosted alternative to the hosted agent runners", never the product's name.
.githooks/commit-msg enforces both in messages, and ./dev.sh points
core.hooksPath at it. The hook only knows the distinctive names. Competitors
whose names are ordinary English words are deliberately left out of it: a guard
that trips on everyday prose is a guard that gets bypassed into uselessness.
Those are your judgment call, not the hook's.
Commit subjects are imperative and lower-case after the first word. Branch names describe the work.
Build and test
cargo fmt # rustfmt.toml: max_width 100, small_heuristics Max
cargo test -p agency-core -p agency-app
./dev.sh # builds the termd sidecar, then tauri devFrontend, from the repo root:
pnpm --dir ui install
ui/node_modules/.bin/tsc --noEmit
ui/node_modules/.bin/vite build- Use
pnpm, nevernpm. The lockfile is pnpm's, and npm churns it. - Invoke the frontend binaries directly, as above. pnpm 11's
exec/test/buildwrappers exit 1 on an esbuild ignored-build even when the underlying command succeeded, so a green build looks red. ./dev.sh, nottauri dev. Tauri'sbeforeDevCommandstarts Vite only; it does not build theagency-termddaemon, andAppState::new()fails without it. A staletarget/debug/agency-termdis worse than a missing one: it runs old daemon code silently. Rebuild it when you touch anything undercrates/agency-core/src/term/.- Tests leak orphan
agency-termdprocesses. Never kill the one under Application Support; that is the user's live daemon. - Regenerate the notices after any dependency change.
python3 scripts/third-party.py(needsui/node_modulesinstalled) rewritesTHIRD-PARTY.md, which reproduces the licence of every crate and package the .app ships. MIT wants its notice in every copy and Apache-2.0 s4(a) wants the licence to travel with the binary, and a linked binary is both; before this existed the bundle carried 315 crates and 111 packages and not one of their copyright notices. Theappjob in.github/workflows/ci.ymlfails a PR whose notices file has fallen behind.
User-facing copy
- No emoji anywhere in the UI. Icons are monochrome text glyphs (
◈ ⇋ ≳ ∥). If a glyph has an emoji presentation, pin it with U+FE0E. - No em dashes in UI copy. Split the sentence, or use a comma, semicolon, colon or parentheses. Docs are exempt; strings the user reads are not.
- Sentence case, second person, present tense.
- Say "no first-party data collection", never "nothing leaves your machine".
Wherever the claim appears, say in the same breath that the agents are third
party and talk to their own providers; the app's whole job is launching them,
so a claim that omits them is the one a reader catches. On the site, where the
claim is made in full, the GitHub update check appears with it too. In the app
it does not have to: it is one toggle in Settings, and a starter note is not a
privacy page.
guide.rsholds the canonical wording asOPENING, and a test pins it; that const is the reference, not any prose elsewhere.
Code conventions
The house style is a pure, heavily unit-tested transition function with the side
effects hoisted to the caller: looper.rs, notifier.rs, activity.rs and
mcp.rs are the models to copy. If new logic needs a repo, a daemon or a running
app to test, it is probably in the wrong layer.
- Name the observed failure in the comment above the fix. Not "handle the
edge case" but what actually happened, with the number if there is one: "2,417
duplicate rows observed", "claude does not exit on resume-failure in a PTY, so
the daemon's early-exit fallback cannot recover it". The code then reads as a
changelog of what really broke, and the next person can tell a load-bearing
workaround from a stale one.
resume_probe.rsandmcp.rs::launch_flagare the standard. - Verify, do not trust, any operation where a model rewrites a user's file. Back up, transform, verify structurally, then swap atomically. A pass that fails verification is a pure no-op. Applies to condensing, migrating or reformatting anything the user owns.
- Push live state into an agent's context; do not tell it to go read a file. "Instructed to read" is not "knows". Anything we inject at dispatch is injected with its facts already in it.
- Keep injected context prompt-cache-stable. No timestamps, UUIDs or counters in the stable prefix. Volatile facts go through a per-turn channel.
- Default-deny allowlists for anything imported or shared. If we ever accept a shared agent profile, run config or deep link, allowlist exact values. A denylist leaks, and it leaks quietly.
- Never silently escalate an agent's permissions. Any autonomy feature keeps the gate visible and chosen. This is a positioning commitment, not a preference.
- Anything Agency writes into a user's worktree must be excluded from git, or it
turns up in every diff and every PR. See
worktree.rs::ensure_agency_excludes. - Agency writes inside the workspace only. Never mutate a user's global config.
Testing the app
Drive the UI by hand. Never use osascript, CGEvent or any other synthetic
desktop input to click through the app.
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.

