SuperAPI AI Directory

tree-ring-memory-cn

Agents & models

View repository

Updated 10-16 09:22

About this skill

Tree Ring Memory

Overview

Use this skill to operate Tree Ring Memory as a lifecycle-aware memory layer for AI Agents. It is suitable for storing long-term useful decisions, experience, warnings, project conventions, user preferences, and future seeds, rather than storing complete chat logs, and it is not a background automatic scraper.

The core idea is to let Agent memory age intentionally:

  • Work still in progress can retain more detail
  • Older experience should be compressed into stable summaries
  • Important failures and warnings should remain visible
  • Durable preferences and project facts should become high-confidence memories
  • Unconfirmed follow-up ideas should be kept separate from facts
  • Sensitive information should be blocked, redacted, or forgotten by default

When to use

Use this skill in the following scenarios:

  • The user asks to remember, recall, merge, redact, or forget.
  • The current task depends on past project decisions, preferences, or warnings.
  • The Agent is starting or resuming a repository with Tree Ring Memory or a project-local .tree-ring directory.
  • Tests, incidents, PRs, benchmarks, reviews, or run records have produced experience useful for the future.
  • AGENTS.mdSource documents such as , DOX, or Revolve contain long-term guidance that should be summarized into memory.
  • The Agent needs to audit saved memories before high-risk changes.

Do not use

Do not use this skill as the primary guide in the following scenarios:

  • Short-term drafts that should disappear after the task ends.
  • Raw chain of thought or hidden reasoning.
  • Secrets, credentials, tokens, private keys, payment information, or other sensitive values.
  • Saving complete conversations instead of concise experience or decisions.
  • Treating unverified claims as durable project facts.
  • Replacing source documents, tests, Issues, PRs, or release records.

Usage instructions

When Tree Ring Memory can improve continuity, follow the process below. For simple tasks, perform only narrow recall, and write to memory only when the experience clearly has long-term value. For high-risk tasks, add source checks, evidence-based records, and a closing retrospective.

Workflow

  1. When historical context may affect the task, recall before acting.
  2. Prefer narrow, project-level queries and avoid broad global recall.
  3. If source documents exist, they must be read directly; memory cannot replace AGENTS.md, project documentation, tests, Issues, PRs, or release records.
  4. Save only concise experience, decisions, warnings, and preferences that will genuinely help in the future.
  5. If the experience comes from a reviewed run, evaluation, checkpoint, incident, branch, PR, Issue, or test artifact, prefer evidence-based records.
  6. Redact, replace, or delete outdated or sensitive memories; do not retain known-wrong context.

Command reference

First check the local help to ensure the commands match the currently installed version:

tree-ring --help
tree-ring evidence --help
tree-ring dox sync --help
tree-ring revolve sync --help

If the project has a local Tree Ring configuration, first read .tree-ring/SKILL.md and .tree-ring/CLI.md, and do not directly assume the global configuration applies to the current repository. When you need to explicitly specify project storage, use the local root:

tree-ring --root .tree-ring recall --query "release decisions"
tree-ring --root .tree-ring evidence --help

Use dry-run before writing source adapter summaries:

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

Only perform the actual write when the summary is concise, useful, sourced, and privacy-safe.

Tree-ring model

Use the tree-ring model to determine retention strength:

  • cambium: current active task context
  • outer: recent decisions and lessons
  • inner: older compressed project knowledge
  • heartwood: high-confidence, long-term stable facts and preferences
  • scar: important failures, regressions, rejected approaches, and warnings
  • seed: unresolved ideas, hypotheses, and follow-ups

Do not promote weakly evidenced content to heartwood. Before user confirmation or sufficiently strong evidence, prefer using outer or seed。

Privacy gatekeeping rules

Never save:

  • secrets, credentials, tokens, private keys, or payment information
  • raw chain of thought
  • temporary drafts
  • claims treated as persistent facts without verification
  • sensitive health, financial, legal, or personally identifying information without the user's explicit instruction
  • copyrighted text beyond the scope of short excerpts

If a useful memory contains sensitive material, retain only a redacted operational summary sufficient to avoid repeating the mistake.

Wrap-up checklist

Before ending meaningful work, check:

  • What decisions did we make?
  • What did we learn?
  • What should future Agents avoid repeating?
  • Has the user expressed a long-term preference?
  • Are there seeds worth revisiting in the future?
  • Are any memories erroneous, outdated, private, or better left unsaved?

Record only answers that are persistent, useful, sourced, and safe.