Compass: shared memory that stops AI coding agents working from stale notes
Compass · open-source project memory for AI coding agents

The problem
AI coding agents start every session knowing nothing about the project. They either read too much, which is slow and expensive, or too little, and work confidently from the wrong picture. Notes written to help them go stale without anyone noticing, and every tool keeps its own copy of the rules.
What I built
Compass keeps the project’s memory as a tiered Markdown store in docs/compass/. For each task, an agent reads a short map entry, one capsule of at most 60 lines and the source files it points to, not the whole codebase. The source code always wins over a note.
- Two routines: start, to orient before work, and close, to record only what has changed durably
- A lint that treats stale memory as a build failure: dead links and paths, notes that duplicate code, a plan that has moved ahead of its status file, and generated rules edited by hand
- One compass.config.json generates the instructions for Claude Code, Cursor, Gemini, Antigravity and any tool that reads AGENTS.md, so every tool works from the same memory
- No database, plugins or dependencies: Node 18.17+ and git
- A CI workflow and a pre-commit hook, with tests on Linux, Windows and macOS
Why it matters
It is the guardrail on most of my current projects. It is also the precursor to Keystone, which takes the same idea further by compiling the exact context each task needs.
Compass is open source under the MPL-2.0 licence. The demo on this page runs in about 40 seconds: init sets up every tool, a hand edit to the generated rules fails the lint, and sync restores them.
Built with
Node.js with no dependencies; Markdown store in git; GitHub Actions CI and a git pre-commit hook; tested on Linux, Windows and macOS; MPL-2.0.
Have a challenge like this one?
A free 20-minute conversation about your business, what’s getting in the way, and what it would take to fix it.