memory_crystalize · crystal_view

Memory Crystals

A Memory Crystal is a compact, structured snapshot of everything your Brain has learned — compressed by category so your AI gets dense wisdom, not raw lesson noise, at the start of every session.

Why crystals exist

After months of active use, your Brain can accumulate thousands of lessons. Sending all of them to every AI session bloats the context window and buries the signal. Crystallization distills thousands of lessons into a few dozen high-signal patterns — one per category — that fit comfortably in every briefing.

Without crystals
Raw lesson list grows unbounded → context bloat → signal dilution
With crystals
Dense category-grouped digest → clean briefing → AI acts on proven wisdom

How it works

  1. 1

    Accumulate lessons

    As you work, cachly stores every fix, revert, and architecture decision in your Brain via git hooks and session learning.

  2. 2

    Crystallize

    Call memory_crystalize() (or schedule it monthly). cachly reads all lessons, groups them by category — deploy, fix, debug, arch, perf — and compresses them into a structured digest.

  3. 3

    Recall at session start

    session_start automatically includes your latest crystal in every AI briefing. The AI arrives with compressed wisdom, not raw noise.

  4. 4

    Inspect with crystal_view

    crystal_view shows top patterns per category, lesson count, age, and optionally the raw JSON crystal data.

Tools

memory_crystalizeCreates or refreshes the crystal

Reads all lessons from your Brain, groups them by category, compresses into a crystal, and stores it at cachly:crystal:latest. Returns a digest of what was crystallized.

# Optional: label this crystal
memory_crystalize(label="Q1 2026")
# Without label — auto-generated from date
memory_crystalize()
Tip: run monthly, or after any major project milestone.
crystal_viewInspect the current crystal

Shows top patterns per category, total lesson count, crystal age, and when it was last refreshed. Pass show_raw: true to include the full JSON crystal data.

crystal_view()
# Full JSON for debugging
crystal_view(show_raw=true)

Crystal categories

deployDeploy

Deployment patterns, env issues, rollback triggers

fixFix

Recurring bugs, their root causes, and validated solutions

debugDebug

Debugging workflows, tool chains, log locations

archArchitecture

Design decisions, trade-offs, rejected approaches

perfPerformance

Bottlenecks found, optimizations applied, benchmarks

Recommended schedule

Run memory_crystalize at the end of each month or after completing a major project phase. New lessons always accumulate in the live Brain — crystallization compresses them into the briefing digest without discarding anything from the graph.

If you have not crystallized yet, session_start falls back to the raw lesson list (capped at 20 recent items). After your first crystal, the briefing switches to crystal mode automatically.

Ready to crystallize?

Open any MCP-connected AI session and call memory_crystalize().

MCP setup guide →