atlas
CLAUDE.md4 starsChanged 5 months agoMITView on GitHub
Standalone Rust CLI that compiles a codebase into a token-budgeted structural map for LLM coding agents: every signature, type, export, and import edge — zero function bodies — packed into ~2k tokens by graph ranking. Full spec: docs/PRD.md. Development is benchmark-driven and milestone-gated; the agent-task benchmark (benchmark/README.md) is the arbiter of all ranking/budgeting changes. (The project was originally named repomap; the crate, binary, repo, ignore file, and cache dir are all atlas/.atlas now. See docs/MIGRATION.md if you hit a repomap-era…
In this repository8 other files it gives its agents.
- examples/AGENTS.mdAGENTS.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- adr-writingSkill
- benchmark-protocolSkill
- release-processSkill
- tree-sitter-queriesSkill
- atlas-orientSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Distinctive: line 29
All new dependencies require asking the maintainer first — even ones already named in the PRD.
- Very specific: line 33
Before declaring any task done: cargo fmt && cargo clippy -- -D warnings && cargo test — all green.
- Distinctive: line 36
When a NOW task completes, update STATUS.md.
≈ “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
atlas
Standalone Rust CLI that compiles a codebase into a token-budgeted structural map for LLM coding agents: every signature, type, export, and import edge — zero function bodies — packed into ~2k tokens by graph ranking. Full spec: docs/PRD.md. Development is benchmark-driven and milestone-gated; the agent-task benchmark (benchmark/README.md) is the arbiter of all ranking/budgeting changes.
(The project was originally named repomap; the crate, binary, repo, ignore file, and cache dir are all atlas/.atlas now. See docs/MIGRATION.md if you hit a repomap-era name or artifact.)
Pipeline (one stage = one module)
| Stage | What it does | Owner |
| discover | walk tree; .gitignore, .atlasignore, vendored defaults | src/discover.rs |
| parse | tree-sitter per file; extract declarations via queries/<lang>/tags.scm | src/parse.rs + src/lang/ |
| link | imports + defs↔refs into a directed file/symbol graph | src/link.rs |
| rank | personalized PageRank; --focus seeds the personalization vector | src/rank.rs |
| budget | greedy pack to N tokens; degradation ladder; exact BPE counts | src/budget.rs |
| render | markdown / json / xml; deterministic output | src/render/ |
src/cache.rs sits under parse: content-hash keyed, bincode, .atlas/cache. src/cli.rs drives the stages.
Beyond the map pipeline, the same parse output backs three more commands: atlas diff (src/diff.rs, src/render/diff.rs — structural delta between two trees/git revisions), atlas serve --mcp (src/mcp.rs + src/api.rs — stdio JSON-RPC MCP server), and atlas cache info|clean / atlas explain (src/cli.rs). The CLI exit-code contract is documented in docs/exit-codes.md.
Conventions
- Graphs are index-based:
Vec<Node>+usizehandles. No references, lifetimes,Rc, orRefCellin graph structures (ADR 0002). - Errors:
anyhowin binary code,thiserrorfor library error types. - No
.unwrap()/.expect()outside tests. - Unparseable files are skipped and counted, never a panic (FR-12).
- Output is deterministic (NFR-4): iterate sorted collections — BTreeMap, or sort before render. Never rely on HashMap iteration order.
- All new dependencies require asking the maintainer first — even ones already named in the PRD.
Workflow rules
- Before declaring any task done:
cargo fmt && cargo clippy -- -D warnings && cargo test— all green. - Ranking/budgeting changes are not done until
/benchhas run and the delta vs. benchmark/baseline.json is reported. - Out-of-scope ideas go to ideas.md, never into code.
- When a NOW task completes, update STATUS.md.
- Significant architecture decisions get an ADR via
/adr. ADRs are append-only; never edit an existing one.
Scope contract — decline these
Hard non-goals (PRD §3.2). If asked for one, decline plainly, park it in ideas.md, and suggest the in-scope alternative if one exists (/scope-check does this):
- Semantic search or embeddings — atlas is purely structural.
- Full code intelligence (go-to-definition, rename) — that's an LSP's job.
- IDE plugins or GUI — CLI and MCP only.
- Editing or generating code — read-only tool.
- Languages beyond the Tier 1/2 set (Section 6) — breadth comes after the ranking and budgeting core is right.
Where things are
- STATUS.md — current milestone, exit criteria, NOW/NEXT/NOT-YET board. Surfaced by the SessionStart hook.
- benchmark/README.md — the benchmark protocol; benchmark/history.md — append-only stats ledger of every measured change.
- docs/SELF_IMPROVEMENT.md — the autonomous improvement loop:
/improvefor one measured iteration,/loop /improvefor continuous; keep-or-revert is decided by stats, never vibes. - docs/adr/ — past decisions; read before redesigning anything.
- docs/PRD.md — requirements, milestones, risks, open questions.
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.

