Home / Market / tree ring memory

tree ring memory

Use Tree Ring Memory for local-first AI-agent memory lifecycle work: recall, evidence, audit, forgetting, and consolidation without transcript dumping.

skill★ 507600 dlgithubCC-BY-4.0 content; MIT code; upstream exceptions applyInstall in CosmosUpstream Source

Documentation & Preview

--- name: tree-ring-memory description: "Use Tree Ring Memory for local-first AI-agent memory lifecycle work: recall, evidence, audit, forgetting, and consolidation without transcript dumping." category: development risk: critical source: community source_repo: TerminallyLazy/Tree-Ring-Memory source_type: community date_added: "2026-07-08" author: TerminallyLazy tags: [agent-memory, local-first, recall, privacy, codex, sqlite, cli] tools: [claude, codex, cursor, gemini, antigravity, opencode] license: "MIT" license_source: "https://github.com/TerminallyLazy/Tree-Ring-Memory/blob/main/LICENSE"

---

Tree Ring Memory

Overview

Tree Ring Memory is a framework-agnostic, local-first memory lifecycle layer for AI agents. Use this skill when an agent should recall, preserve, audit, or forget durable project memory without treating raw conversation transcripts as memory.

The public runtime is a Rust CLI/TUI with local SQLite/FTS storage, scoped recall, evidence records, audit, deterministic consolidation, maintenance, DOX/Revolve source adapters, framework discovery, redaction, and explicit forgetting.

When to Use This Skill

or failed approaches may matter.

agent-memory behavior.

consolidate agent memory.

future agents should preserve.

other Tree Ring bridge files.

How It Works

Step 1: Discover Local Guidance

Check whether the current project already has Tree Ring guidance:

test -f .tree-ring/SKILL.md && sed -n '1,220p' .tree-ring/SKILL.md
test -f .tree-ring/CLI.md && sed -n '1,220p' .tree-ring/CLI.md

Treat project-local .tree-ring files as more authoritative than generic examples in this skill. If the CLI is installed, inspect the current command surface before assuming flags:

tree-ring --help
tree-ring recall --help
tree-ring remember --help
tree-ring evidence --help
tree-ring audit --help
tree-ring forget --help

If Tree Ring is not installed, resolve the actual project root and explain the exact project-local download before obtaining explicit approval to fetch it. Download the official, version-pinned v0.15.0/install.sh to a temporary file, verify its SHA-256 is ef0d5eb8f09cbe2e4c3abe80ee9a98a56759c89ad4ddd103d6c68314cd653ade, inspect it, then run it. The pinned source is https://raw.githubusercontent.com/TerminallyLazy/Tree-Ring-Memory/v0.15.0/install.sh.

cd <project-root>
sh <verified-installer-path> --project --init --release v0.15.0 --no-animation

Do not pipe a network response directly to a shell. After verification and inspection, show the exact installer command and obtain explicit approval again before executing it. For an installed global CLI, initialize from the project root with tree-ring --root .tree-ring init; for a project-local CLI, use .tree-ring/bin/tree-ring --root .tree-ring init.

Check for a newer release without changing files using tree-ring update --check. Run tree-ring update only with user authorization, then rerun init in each project root to refresh managed guidance while preserving custom content.

Step 2: Recall Before Risky Work

Use narrow, project-scoped recall first:

tree-ring recall "release behavior" --project example-service
tree-ring recall "sqlite migration" --project example-service
tree-ring recall "user preference"

Use recalled memory as context, not authority. Verify it against current source files, tests, docs, issues, pull requests, logs, and runtime state before making changes.

Step 3: Write Only Durable Memory

Write concise memory only when it is likely to help future agents:

tree-ring remember "Run project-scoped recall before release changes." --event-type lesson --scope project

Prefer specific event types when supported locally:

Store the durable lesson, decision, warning, or follow-up. Do not store the full conversation.

Step 4: Record Evidence for Evaluated Outcomes

Use evidence records for test runs, incidents, reviewed changes, or other evaluated outcomes:

tree-ring evidence \
  "Installer smoke test passed in an isolated HOME." \
  --outcome observed \
  --evidence-ref "ci/install-smoke/2026-07-08"

Outcome guidance:

Do not promote weak, stale, or unreviewed claims to durable truth.

Step 5: Use Source Adapters Carefully

When a repo has structured source records, run dry runs first:

tree-ring dox sync --source-root . --dry-run
tree-ring revolve sync --source-root revolve --dry-run
tree-ring integrations scan --source-root .

Only write adapter summaries when they are concise, source-linked, useful, and privacy-safe. Imported memory does not replace the underlying AGENTS.md, Revolve record, test, pull request, issue, or documentation.

Ring Selection

Use the smallest durable ring that fits:

Prefer outer or seed unless the user confirms durability or the evidence is strong.

Best Practices

preference.

runs, or docs paths.

memory.

sensitive, or replaced by a newer decision.

Security & Safety Notes

chain-of-thought, or temporary scratchpad content.

retention boundary is safe.

explicit user approval and a clear target environment.

guaranteed command surfaces.

Limitations

documentation, tests, logs, or live runtime verification.

the current project before using them to make changes.

guidance and tree-ring --help over copied command examples.

compliance retention, or unreviewed collection of sensitive personal data.

CLI or read project-local guidance files.

Common Pitfalls

Solution: Treat source files, tests, docs, and runtime evidence as authoritative; supersede or forget stale memory.

Solution: Store only durable decisions, warnings, preferences, outcomes, and follow-ups.

Solution: Store a redacted summary or do not store it.

Related Skills

Additional Resources