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.0.tar.gz (71.7 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.0-py3-none-any.whl (60.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cherry_docs-0.4.0.tar.gz
  • Upload date:
  • Size: 71.7 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.0.tar.gz
Algorithm Hash digest
SHA256 f86e33e9359346668119cf8b2fd2132b96e8b05e6186294ce656797780ccbdd1
MD5 a6e1c7037cbabe3f04bc61da508e470c
BLAKE2b-256 cccec7f94e4f844df4e5bd17c7f7024878b548355c80c369b70be976ba0589e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cherry_docs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 60.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74cad62fe8b001746150ac5e5a6d65120488dda8c5da703f31874ff6707f60c7
MD5 fc32458c968aab5cd04746e3b8da2490
BLAKE2b-256 f0c53c7b400b2c105f70b397212bc69e063b351df8fdf894b6464fa2ae93c280

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