integrations

Claude Code Integration

Set up Claude Code so it starts from the same local memory as every other coding agent on your machine, with skills, project-aware recall, lifecycle capture, and writable MCP.

Updated

Install the skills

docmancer agent install claude-code

docmancer setup already does this for a detected Claude Code, along with recall and capture hooks. Run the command directly when you want to reinstall or refresh one agent.

This installs the docmancer and docmancer-memory skills under ~/.claude/skills/, then adds a managed recall block to ~/.claude/CLAUDE.md. The installed guidance teaches Claude Code to ask about prior decisions when they matter, write durable memory only when you explicitly ask, and keep documentation separate from personal memory.

Use --project to install the skill under the current repository instead.

Add read-only recall hooks

docmancer agent install claude-code --hooks

Recall hooks use SessionStart and UserPromptSubmit. They pass the current working directory so matching project memory can join global context while unrelated repositories stay out. Weak matches, malformed events, timeouts, and stale indexes produce no output and cannot block a turn.

Remove recall without changing capture:

docmancer agent remove claude-code --hooks

Manage capture separately

docmancer agent install claude-code --capture-hooks

Claude Code capture uses PostCompact and SessionEnd. It redacts a bounded local payload or transcript tail, extracts the durable conclusions, and stores only those personal Markdown records under ~/.docmancer/memories. It never copies a raw transcript or calls a hosted model.

Remove capture without changing recall:

docmancer agent remove claude-code --capture-hooks

Install the local MCP

pipx install "docmancer[mcp]"
docmancer mcp install claude-code

Add --project to write a project-local .mcp.json instead of the user config. The stdio server exposes grounded Ask, canonical-memory reads and pinning, hash-guarded curated-memory operations, delivery and projection inspection, the decision timeline, and separate documentation search. Mutating and destructive operations retain explicit tool annotations and confirmation boundaries. The MCP server is local and does not require a hosted account.

Verify

docmancer status
docmancer ask "what did we decide?" --project "$PWD"

Verify with one prompt

Ask Claude Code: Before changing deployment code, recall what we decided about production hosting.

The expected behaviour is a project-scoped docmancer ask before edits, followed by a concise answer that cites its sources. If the decision changes, ask Claude Code to record the new durable decision after the work.