[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115328":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":13,"stars7d":15,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":16,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":23,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},115328,"atlas","bloodfeast\u002Fatlas","bloodfeast","Local project memory and token savings for Claude Code: an MCP server and hooks",null,"Rust",139,18,1,0,33,9,65.64,"Apache License 2.0",false,"main",true,[],"2026-11-23 01:06:04","2026-11-23 18:45:21","# atlas\n\natlas makes long Claude Code sessions cheaper without changing how you work. It is a local MCP server and a\nset of Claude Code hooks: large tool output stays on disk under a short handle and the model gets a digest,\ncode reads get exact item ranges instead of guessed windows, and memory (rules, decisions, journals,\nhandoffs) is recalled by relevance instead of loaded whole. It runs on your machine, has two direct\ndependencies, SQLite (`rusqlite`) and an ed25519 signature check, plus the crates those two pull in (every one\nis in `Cargo.lock`), and makes no network calls at query time.\n\n**You do not need Obsidian.** A vault is any folder of Markdown files: atlas reads and writes the files\nitself and never touches Obsidian's `.obsidian` settings folder. Obsidian is optional, as a reader for the\nsame folders. The one Obsidian-specific output is that `make_link` writes `obsidian:\u002F\u002Fopen` links between\nvaults, which open only in Obsidian (elsewhere they are plain text); links within a vault are standard\n`[[wikilinks]]`.\n\n**Languages.** Memory, recall and history, search over Markdown notes and sources, discussions, the work\nqueue, projects and multi-repo, and the hooks work whatever programming language a project uses, as does `.proto` indexing (rpc call\nsites are found in any language's files). The code index (`symbol`, item ranges on reads, grep annotations)\ncovers Rust, WGSL, `.proto`, Go, TypeScript, JavaScript, C#, Python, Java and Kotlin (through scip-go,\nscip-typescript, scip-dotnet, scip-python and scip-java when they are installed, or a prebuilt `index.scip`\nfrom CI, WSL or Docker, else an owned scanner), and any language with a SCIP indexer from a `.scip` file.\nBuild and test digests recognise `cargo test`, `nextest`, `go test` (plain and `-json`), jest, vitest,\n`dotnet test`, pytest, Maven and Gradle output, and other runners get the generic digest.\nRanked search (`fts`, `sections`, `recall`) splits words on spaces and punctuation, so text written without\nspaces (Chinese, Japanese, Thai) is found with `search` in `substring` mode or `grep` instead.\n\n## What it saves\n\nEvery assistant turn re-reads the whole context, so a result that enters at turn 10 of a 300-turn session is\nprocessed 290 more times. Measured on real sessions:\n\n| | Without atlas | With atlas |\n|---|---|---|\n| The tool list, loaded with every session | 47 tools, 5,930 tokens (v0.1) | 14 tools, 6,118 bytes (about 1,530 tokens at 4 bytes a token, measured at v0.6.1); the full reference is one fetched resource |\n| A lookup (7,067 answers against 96 lookups done before atlas, measured at v0.6.0) | grep, then read the files | 6.4x fewer tokens in all (ratio of sums); 10.9x median per answer |\n| Memory questions (100-question evaluation, at v0.6.0) | the whole rulebook loaded | 100\u002F100 answered when the agent follows a result to its source, 99\u002F100 reading only the first result; median 506 tokens each |\n\nShell reads are 36% of what a builder session processes and startup context another 35%; those are the\nbuckets atlas targets. `atlas --token-report` measures your own store the same way: it takes its baseline from\nyour Claude Code transcripts from before atlas, by itself in the background, and nets what atlas puts into\ncontext (the tool list, hook injections, tool output) against what it saves. How each number was measured, and\nhow to measure your own sessions with `cargo xtask attrib`, is on [Token savings and method](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FToken-savings-and-method).\n\n## Beyond the savings\n\n- **Orchestrated mode**, asked at setup and never on by default: an `orchestrate` skill teaches the main session\n  to delegate through lanes and lean briefs, and the hooks cap how many agents of each kind run at once and\n  hand an agent off at its context limit to a fresh one.\n- **`atlas backlog`** lists ruled work that fell out of the queue, aging items first, each with the rulings\n  behind it. It only proposes; the queue's written order never changes.\n- **Pull request reviews.** In a `gh pr diff` file read, context far from a change is one marker line that\n  `recall h:ID lines=A-B` opens, and `atlas pr-events serve` wakes the session that waits on a review.\n- **Long sections are searched whole.** Semantic search embeds a long section as overlapping windows, so a\n  question answered deep inside it finds it.\n- **`atlas worktrees`** keeps an append-only ledger of which lane owns which worktree.\n- **A fresh install teaches Claude atlas.** The server's instructions and a bundled `atlas` skill carry the\n  habits (recall before asking, journal decisions, hand off before stopping), and atlas tells you at session\n  start when an update arrives.\n\n## Install\n\natlas is a Claude Code plugin with prebuilt binaries for Windows x86_64, Linux x86_64 and aarch64, and macOS\n(Apple Silicon and Intel). In Claude Code:\n\n```\n\u002Fplugin marketplace add bloodfeast\u002Fatlas\n\u002Fplugin install atlas@atlas\n```\n\nRestart Claude Code. On its first start atlas writes a starter configuration, `atlas.json`, in your\nconfiguration folder (`%APPDATA%\\atlas`, `~\u002FLibrary\u002FApplication Support\u002Fatlas` or `~\u002F.config\u002Fatlas`) and\ndownloads the embedding model (about 35 MB) in the background, checked against its pinned SHA-256. Until the\nmodel is in place, search and recall are lexical. Updates are signed and on by default (`atlas settings off\nupdate` turns them off). Building from source, uninstalling and the data folders are on\n[Install and setup](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FInstall-and-setup).\n\n## Quickstart (5 minutes)\n\n1. Install the plugin (above) and restart Claude Code.\n2. Optionally run the setup in the foreground to see each step; Claude can run it for you, since the plugin's\n   `bin` folder is on the Bash tool's `PATH` (not on your own terminal's):\n\n   ```sh\n   atlas --setup\n   ```\n\n   Run by Claude, it has no terminal, so it lists its questions instead of asking them and records nothing;\n   Claude puts them to you at the next session. In auto mode, Claude Code's classifier may block `atlas --setup`\n   and `atlas settings` commands (with \"No reason provided\") until you tell Claude you allow them.\n\n3. Open a session in your project. Claude asks you about atlas: *create a vault for this project at\n   `\u003Cpath>`? yes \u002F other folder \u002F no*, and, unless `atlas --setup` asked already, whether to work in orchestrated mode (caps on how many\n   agents run at once; no is fine; on yes the caps and compile slots start from this machine's cores, see the wiki's Orchestration page). It may also offer Claude Code settings. Say yes to the first: its Markdown becomes a searchable source, a folder holding code becomes\n   a code root, and a new vault (an Obsidian-compatible folder) holds the project's notes and discussion threads.\n   `atlas settings undo` reverts it all; it never deletes a note. A question you do not answer comes back at your\n   next new session, until you answer it, and Claude may not always put it. A session with no user (`claude -p`, the\n   SDK) asks nothing and counts as nothing asked, and atlas stays silent if it could not record your answer. `atlas settings add-project .` and\n   `atlas settings orchestrate` do the same from a terminal. The vault question is per folder.\n4. Work as usual. Large Bash, Read and Grep results now arrive as digests with a handle; Claude pulls what it\n   needs with `recall key=h:ID item=NAME` or `failures=true`. Grep and Read results name the enclosing item and\n   its line range.\n5. Ask Claude to remember a decision (`remember`), and start the next session: relevant records are recalled\n   on each prompt, within a 600-token budget (`recall.budget_tokens`). The recall defaults (600 tokens, a 0.53\n   `recall.cos_floor`) were chosen by a sweep that measured off-topic records as well as on-topic recall.\n6. Optionally, `atlas settings offer` proposes the Claude Code settings that cut cost (the 1-hour subagent\n   cache, fewer goal check-ins). Nothing is written without a yes, and `atlas settings undo` reverts (it shows the change and asks first;\n   `--yes` without a terminal).\n   With the compaction features on (the default; `\"compact\": {\"enabled\": false}` or `atlas settings off compact`\n   turns them off), `atlas settings compact-md` offers a Compact instructions block for a project's `CLAUDE.md` the same way.\n   For a project with no rules, `atlas --setup` and `atlas settings rules-template` offer a starter `CLAUDE.md` and\n   `.claude\u002Fatlas-rules.md` ([the rules template](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FMemory-and-rule-files#the-rules-template)).\n\n## Projects\n\nOne install serves several projects, each with its own index and memory store; recall, the hooks and the\nwork queue see only the active project. A shared user layer is imported into every project.\n\n**One repository.** Open Claude Code in it and answer yes, or run:\n\n```sh\natlas settings add-project --vault .      # or --vault-at FOLDER; without either, no vault\n```\n\n**A folder of repositories.** Open Claude Code in the folder that holds them (each one level down). atlas\noffers to make it a project, or run:\n\n```sh\natlas settings add-project --new .\n```\n\nThat writes `atlas.project.json`, listing each repository by path and remote, and creates the project's vault\nbeside atlas's configuration (`--vault-at FOLDER` for another folder, `--no-vault` for none); commit the file so the whole team\ngets the same layout. Describe how the repositories relate, and a prompt that names one gets its role and\nneighbours, while recall puts records about the repository you are working in first:\n\n```json\n{\n  \"name\": \"acme\",\n  \"repos\": [\n    {\"name\": \"billing\", \"path\": \"billing\", \"role\": \"invoices and payments\", \"talks_to\": [\"auth\", \"ledger\"]},\n    {\"name\": \"gateway\", \"path\": \"gateway\", \"role\": \"public API edge\", \"talks_to\": [\"billing\"]},\n    {\"name\": \"ledger\", \"remote\": \"https:\u002F\u002Fgit.example\u002Facme\u002Fledger\"}\n  ]\n}\n```\n\nOn a fresh install, `add-project --new` first moves the current setup into a project of its own (shown, backed\nup, and reversed by the same `atlas settings undo`). In a terminal it asks for that project's name; otherwise the\nname is the folder holding `atlas.json`, made a valid project name (`-2` if the new project takes it). An existing\nsetup moves into a project of another name with `atlas settings migrate-projects NAME`. Everything else is on\n[Projects and multi-repo](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FProjects-and-multi-repo).\n\n## Minimal configuration\n\n`atlas.json`, with relative paths taken from its folder. Every key is checked, so a misspelt key is an error.\n\n```json\n{\n  \"vaults\": [{\"name\": \"notes\", \"path\": \"..\u002FNotes\"}],\n  \"sources\": [{\"name\": \"docs\", \"root\": \"..\u002Fmy-project\", \"include\": [\"**\u002F*.md\"], \"exclude\": [\"target\u002F**\"]}],\n  \"code\": {\"roots\": [{\"name\": \"app\", \"root\": \"..\u002Fmy-project\"}]}\n}\n```\n\nVaults are folders atlas may add to; sources are folders it only indexes; code roots feed `symbol`. After an\nedit, run `\u002Fmcp` and reconnect atlas, or restart Claude Code. Every key is on\n[Configuration reference](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FConfiguration-reference).\n\n## Security in brief\n\n- **Local only.** One process over stdio. No HTTP client or DNS in the code or its dependencies, and one socket:\n  `atlas pr-events serve`, run only from the command line, listens on 127.0.0.1 for signed GitHub events and\n  never connects out; the events reach it through `gh webhook forward`, which it starts with `gh`. Nothing\n  reaches the network at query time. The model download at setup and the update\n  check go through the system `curl`, to pinned `https` URLs, and are verified (SHA-256, and an ed25519\n  signature for updates).\n- **Confined.** Every path is checked to stay inside a configured folder, lexically and after resolving links;\n  dot folders are refused.\n- **A fixed deny-list.** `.env*`, keys, keystores and credential files are never read, whatever the\n  configuration says: not in a source, not in a vault (nor written there), not by `atlas digest` or `atlas crop`.\n  A file Claude Code reads with such a name is never kept as a handle, and neither is the output of a shell command,\n  `atlas run` or Grep that names one. That catches named files only, since a shell command can hide a path.\n- **Nothing lost.** No delete or rename tool exists; writes are additive or exact, atomic and audited with a\n  stated reason. The memory store is append-only.\n\nThe threat model and every defence are on [Security model](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FSecurity-model).\nReport vulnerabilities privately, as [SECURITY.md](SECURITY.md) describes.\n\n## Documentation\n\nThe wiki is the full manual:\n\n- [Overview](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FOverview): what atlas is and the rules it is built to\n- [Install and setup](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FInstall-and-setup): install, updates, uninstall, build from source\n- [Configuration reference](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FConfiguration-reference): every key of `atlas.json`\n- [Projects and multi-repo](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FProjects-and-multi-repo): scoped projects and repository graphs\n- [Token savings and method](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FToken-savings-and-method): where the tokens go and how it is measured\n- [Handles and digests](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FHandles-and-digests): routing, `recall h:ID`, `atlas run`\n- [Tools reference](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FTools-reference): every MCP tool and the answer format\n- [Code index](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FCode-index): `symbol`, item ranges and language coverage\n- [Semantic search](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FSemantic-search): the owned embedder and hybrid search\n- [Identifiers and freshness](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FIdentifiers-and-freshness): the registry, freshness and misses\n- [Memory store and hooks](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FMemory-store-and-hooks): the store, exports, sync and the hooks\n- [Memory tree](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FMemory-tree): the memory index as a tree\n- [Memory and rule files](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FMemory-and-rule-files): experimental, off by default: what atlas does with your rules and memories once you turn it on, and how to turn it off\n- [Orchestration](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FOrchestration): orchestrated mode: lanes, kinds and caps, starter resources\n- [Discussions](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FDiscussions): reviewer threads and the decision queue\n- [Generated indices](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FGenerated-indices): indices between markers\n- [Cross-vault links](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FCross-vault-links): links between vaults\n- [Security model](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FSecurity-model): threat model and defences\n- [SQLite store](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FSQLite-store): the database and the audit log\n- [Testing and coverage](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FTesting-and-coverage): the suite, adversarial tests, coverage\n- [Releasing](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FReleasing): the changelog rule, release notes and the wiki\n- [Changelog](https:\u002F\u002Fgithub.com\u002Fbloodfeast\u002Fatlas\u002Fwiki\u002FChangelog): every release\n\n## License\n\nApache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).\n","atlas 是一个本地运行的 MCP（Model Control Protocol）服务器及配套钩子工具，专为优化 Claude Code 的长会话成本而设计。它通过磁盘缓存大体积工具输出、按需读取代码精确行范围、基于语义相关性召回项目记忆（规则\u002F日志\u002F交接记录等）来显著降低 token 消耗。项目完全离线，仅依赖 SQLite 和 ed25519 签名验证，支持多语言代码索引（Rust\u002FTS\u002FPython\u002FGo 等）和 Markdown 笔记检索，兼容任意文件夹作为知识库。适用于需要高频调用 Claude Code 进行多轮、跨文件、跨仓库开发协作的本地 AI 编程场景。",2,"2026-11-24 04:50:41","CREATED_QUERY"]