@anupamvijayvergia/intent-layer
v0.1.1
Published
Team memory for AI coding agents — captures intent behind every AI-assisted code change
Downloads
220
Maintainers
Readme
Intent Layer
Team memory for AI coding agents. Captures the intent behind every AI-assisted code change so the next session — yours or a teammate's — knows what was decided, what was rejected, and why.
Install
npm install -g @anupamvijayvergia/intent-layerThat's it. There are no API keys to configure, no Supabase URL to set,
no .env to fill in. Everything that needs a secret runs on the
dashboard you log in to.
Get started
Three commands, in this order:
intent-layer login # opens browser, authorizes this device
intent-layer install # registers a user-scope OS service that
# starts the watcher at login
intent-layer status # confirms the daemon is runningAfter intent-layer install, the watcher runs in the background and
auto-starts whenever you log in to your machine. There is nothing else
to do — every Claude Code or Codex session you run will have its
intents extracted and made available to your team's dashboard and to
the MCP server.
What the watcher does
The background daemon watches your Claude Code (~/.claude/projects)
and Codex (~/.codex/sessions) JSONL session files. When a session
finishes (either a 60-turn batch or 30 minutes of idle time), it:
- Chunks the session client-side (no LLM cost — pure text transform).
- POSTs each substantial chunk to your dashboard at
/api/v1/sessions/extractwith your device's bearer JWT. - The dashboard runs the extraction LLM, persists the resulting intent memory scoped to your tenant, and returns the parsed payload.
- Every 5 minutes the watcher pings
/api/v1/sessions/touchso the Devices page on the dashboard knows this device is alive.
The customer-side runtime never holds a Supabase service key, an LLM
API key, or any other infrastructure secret. After intent-layer
login your ~/.intent-layer/config.json contains only:
{
"jwt": "...",
"user_id": "[email protected]",
"org_slug": "your-team",
"device_name": "your-laptop",
"server_url": "https://your-dashboard.example.com"
}Day-to-day commands
| Command | What it does |
| --- | --- |
| intent-layer status | Prints config and daemon health (running / stopped / failed). Pass --json for machine-readable output. |
| intent-layer logs | Tails the daemon's platform-specific log (LaunchAgent log on macOS, journalctl on Linux, Windows Event Log). |
| intent-layer list | Lists recent intents for the last 30 days via the dashboard's read API. |
| intent-layer health | Confidence distribution + evolution counters. Read-only summary. |
| intent-layer uninstall | Reverses install — removes the OS service. Your config and stored intents stay. |
| intent-layer reset-local | Clears the watcher's local sync-state file so a re-run will re-process recent sessions. Does NOT touch the database. |
Per-repo setup (optional)
To enable the MCP get_file_intent / search_intent tools inside a
specific repo (so Claude Code/Cursor/Codex can query intent before
editing files), run from the repo root:
intent-layer setupThis writes .claude/CLAUDE.md, a PreToolUse hook, and .mcp.json
into the repo so any AI agent that opens the repo automatically gets
the intent-aware behavior.
Troubleshooting
Error: not logged in. Run intent-layer login first.— your device JWT expired or was revoked. Re-runintent-layer login.- Watcher not picking up sessions — check
intent-layer statusfor daemon state andintent-layer logsfor errors. Confirm the files actually live under~/.claude/projectsor~/.codex/sessions. - Verbose logging — set
INTENT_LAYER_DEBUG=truein the daemon's env (launchctl setenvon macOS, systemd drop-in on Linux). This is the only env var the watcher reads at runtime; everything else flows from the dashboard. - Switch dashboards — re-run
intent-layer loginand pick the new server when prompted; the JWT andserver_urlget rewritten atomically.
What's NOT here
The watcher is a thin client. It does not:
- Hold any database or LLM credentials. Compromising a dev laptop doesn't leak service-role access.
- Run background LLM calls on your machine (every extraction goes to the dashboard).
- Store intents locally in a way the rest of your team can't see.
If you're operating the dashboard side, see
intent-layer-dashboard/README.md (separate package) for deployment
and configuration.
