Skip to main content

Decision records for AI coding agents — the AI logs decisions, attempts, and conclusions; the knowledge stays with the project.

Project description

CherryDocs

Decision records for AI coding agents. The AI writes them; the company keeps them.

When a developer leaves, the architecture decisions usually leave with them. CherryDocs fixes that: the AI agent records every decision, failed attempt, and conclusion at the moment it happens — first-person, with full provenance — and the knowledge stays with the project forever.

No API key. No cloud. No LLM middleman. The AI's own words are the record.

log → promote → retrieve → export

Setup (once, ~1 minute)

pip install cherry-docs
cherry install            # wires Claude Code hooks + MCP server globally

That's it. Open any project in Claude Code — CherryDocs is active. Verify anytime with cherry status.

What the AI gets

Tool When the AI uses it
onboard Session start — top memories + recent session state in one call
answer "Why is this code here?" "What did we already try?" "What failed before?"
log_activity A decision, pivot, fix, or refactor — promoted directly to durable memory
save_checkpoint Structured handoff a blind AI can continue from

Every memory carries provenance: session, branch, commit, files, and the raw evidence events that support it.

What the company gets

cherry export --out docs/DECISIONS.md

An ADR-style markdown decision log — Decisions, Attempts & Pivots, Conclusions, Warnings — each with rationale, date, branch, commit, and files. Commit it to the repo and the knowledge belongs to the company, not to a tool, an account, or the developer who left.

How a session flows

  1. AI calls onboard() — gets project memory instantly
  2. Work happens normally; hooks capture prompts, tool use, and shell results as the raw evidence trail
  3. When the AI logs a decision/pivot/fix/refactor, it lands in durable memory immediately — the AI's first-person testimony, no re-summarization
  4. Any future session asks answer("why did we switch to X?") and gets the decision with its rationale and evidence

Memory quality, enforced

  • First-person records — memories are written by the AI that made the decision, not inferred afterwards by another model
  • No transient noise — test counts, CI status, commit counts, session summaries never become permanent memories
  • Self-healing storecherry consolidate merges near-duplicates and archives junk
  • Relevance-first retrieval — token relevance dominates ranking; trust and past-retrieval utility can't carry an irrelevant memory to the top

Check store health: cherry eval --no-llm

CLI

cherry install      # wire into Claude Code globally
cherry status       # hooks + MCP health
cherry export       # write the decision log as markdown (--out FILE)
cherry consolidate  # merge duplicate memories, archive junk
cherry eval         # memory quality report (add --no-llm for heuristic only)
cherry why <file>   # memories anchored to commits touching <file>
cherry uninstall    # remove hooks + MCP entry

Architecture

  • Store: local JSON at ~/.cherrydocs/promoted/{project_id}.json — no cloud, no DB
  • Transport: MCP over stdio (FastMCP), 4 tools
  • Capture: Claude Code hooks (UserPromptSubmit, PostToolUse, Stop) — raw evidence trail
  • Privacy: secrets detected and redacted before anything persists

Project-scoped first, branch-aware second.

Development

pip install -e '.[dev]'
python -m pytest tests/ -q
python scripts/check_size_limits.py
bash scripts/local_pr_gate.sh fast     # before opening a PR

The canonical source for generated agent rules is docs/agent_protocol.toml. More: Product Brief · System Deep Dive


The test that matters: would another AI keep this turned on because it helps?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cherry_docs-0.4.1.tar.gz (74.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cherry_docs-0.4.1-py3-none-any.whl (63.1 kB view details)

Uploaded Python 3

File details

Details for the file cherry_docs-0.4.1.tar.gz.

File metadata

  • Download URL: cherry_docs-0.4.1.tar.gz
  • Upload date:
  • Size: 74.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cherry_docs-0.4.1.tar.gz
Algorithm Hash digest
SHA256 632261cc7622fe48eda6c028dc070bc0e63a3d3bd456a433630996e158bb3537
MD5 6a3ba41a0e18b1110244805f32b4ba28
BLAKE2b-256 8cfe658b66795c94904abe47cb288555ebc94f4b766f0cf3ffa14576d25a77bf

See more details on using hashes here.

File details

Details for the file cherry_docs-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: cherry_docs-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 63.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for cherry_docs-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7fc7a0ddfcbae6188c92e3343e8cd37c4008a0f312472f03b69ee5155ee05247
MD5 4088e161a2c03a1e44ed188a6391a489
BLAKE2b-256 a34ea6fdb62fbdb942998256be55e09cd0dd8714a6569e0770a0d989a940a8b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page