agentleFS
fkenmarfkenmar/atlas/CLAUDE.md

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…

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
  1. Distinctive:

    All new dependencies require asking the maintainer first — even ones already named in the PRD.

    line 29
  2. Very specific:

    Before declaring any task done: cargo fmt && cargo clippy -- -D warnings && cargo test — all green.

    line 33
  3. Distinctive:

    When a NOW task completes, update STATUS.md.

    line 36

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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)

StageWhat it doesOwner
discoverwalk tree; .gitignore, .atlasignore, vendored defaultssrc/discover.rs
parsetree-sitter per file; extract declarations via queries/<lang>/tags.scmsrc/parse.rs + src/lang/
linkimports + defs↔refs into a directed file/symbol graphsrc/link.rs
rankpersonalized PageRank; --focus seeds the personalization vectorsrc/rank.rs
budgetgreedy pack to N tokens; degradation ladder; exact BPE countssrc/budget.rs
rendermarkdown / json / xml; deterministic outputsrc/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> + usize handles. No references, lifetimes, Rc, or RefCell in graph structures (ADR 0002).
  • Errors: anyhow in binary code, thiserror for 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 /bench has 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: /improve for one measured iteration, /loop /improve for 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.

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.