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 + Cursor hooks and the MCP server globally

That's it. Open any project in Claude Code or Cursor — 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 + Cursor 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) and Cursor hooks (beforeSubmitPrompt, afterFileEdit, stop) — raw evidence trail, vendor-neutral
  • 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.5.0.tar.gz (84.8 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.5.0-py3-none-any.whl (71.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cherry_docs-0.5.0.tar.gz
  • Upload date:
  • Size: 84.8 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.5.0.tar.gz
Algorithm Hash digest
SHA256 2528d2244a243767e574138bf187be83fedf6cc99d188a1b60ac7bdc443e7776
MD5 9b33f9a39f823c7013f1f380ae19e19e
BLAKE2b-256 34f44a94c64d53eb1e8087739688434a2521e0d6b2ce292483247979a1434d5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cherry_docs-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 71.0 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb8b7d516a1e0ebadee7c07bdbffc5ccee9a9cba0500f3f8ef05344a1cface2
MD5 6b8c8c6f685b28f83a9e807f4b5e8418
BLAKE2b-256 15fe19a0770ded7453d445aa6f35d0341ab436b99956f26c323d91343094ff4f

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