Work

Engineering toolingOpen source

Compass: shared memory that stops AI coding agents working from stale notes

Compass · open-source project memory for AI coding agents

Compass in 40 seconds init, a hand edit failing the lint, sync restoring the rules
Terminal recording: compass init sets up the store and every tool’s instructions, a hand edit to a generated rules file makes compass lint fail, and compass sync restores the file so the lint passes.

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.

View on GitHub

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.

Working withAsia-Pacific, the Middle East and Europe, remote or on site
Based inIndonesia (UTC+7)