Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 5 additions & 82 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,91 +4,14 @@ on:
push:
pull_request:

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- name: Validate SKILL.md
run: |
python3 - <<'PY'
from pathlib import Path
import re

text = Path("SKILL.md").read_text(encoding="utf-8")
readme = Path("README.md").read_text(encoding="utf-8")
if not text.startswith("---\n"):
raise SystemExit("SKILL.md must start with YAML frontmatter")

_, frontmatter, body = text.split("---", 2)
required = ["name:", "description:", "version:", "tags:", "triggers:"]
missing = [field for field in required if field not in frontmatter]
if missing:
raise SystemExit(f"Missing frontmatter fields: {', '.join(missing)}")

version_match = re.search(
r"^version:\s*(\d+)\.(\d+)\.(\d+)\s*$",
frontmatter,
flags=re.MULTILINE,
)
if not version_match:
raise SystemExit("SKILL.md must declare a semantic version")
version = tuple(int(part) for part in version_match.groups())
if version < (0, 13, 0):
raise SystemExit("Multi-agent guidance requires skill version >= 0.13.0")

if "# Tree Ring Memory" not in body:
raise SystemExit("Missing Tree Ring Memory heading")

required_frontmatter = [
'"multi-agent"',
'"fan-out"',
'"fan-in"',
'"idempotency"',
'"coordination"',
'- "multi-agent memory"',
]
missing_frontmatter = [
marker for marker in required_frontmatter if marker not in frontmatter
]
if missing_frontmatter:
raise SystemExit(
"Missing v0.13 tags/triggers: " + ", ".join(missing_frontmatter)
)

required_guidance = {
"operation-id idempotency": r"--operation-id",
"coordinator capability": r"TREE_RING_COORDINATOR_TOKEN",
"protected shared writes":
r"project, global, workflow, session, or other shared/non-agent writes",
"protected lifecycle writes":
r"ring changes and supersede/delete/redact lifecycle operations",
"protected maintenance": r"maintenance with apply or repair flags",
"same-host/local-filesystem boundary":
r"one host using a local\s+filesystem",
"schema-v3 old-writer fence":
r"schema v3 fences\s+memory inserts, updates, and deletes from old writers",
"mixed-version rejection":
r"all mixed-version\s+operation is unsupported",
}
missing_guidance = [
label
for label, pattern in required_guidance.items()
if re.search(pattern, body) is None
]
if missing_guidance:
raise SystemExit(
"Missing v0.13 guidance: " + ", ".join(missing_guidance)
)

if "0.13.0 or newer" not in readme:
raise SystemExit("README.md must require Tree Ring CLI 0.13.0 or newer")

blocked = ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "sk-", "BEGIN PRIVATE KEY"]
for marker in blocked:
if marker in text:
raise SystemExit(f"Potential secret marker found: {marker}")

print("SKILL.md validation passed")
PY
- name: Validate SKILL.md and publication contracts
run: python3 scripts/validate.py
17 changes: 17 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Tree Ring Memory Skill Privacy Notice

Effective August 23, 2026

This repository contains agent instructions only. It does not operate a hosted
service, collect analytics, send telemetry, or include a remote MCP server.

When an agent runs the separately installed Tree Ring Memory CLI, the CLI stores
the memory content the user chooses in a local SQLite database under the
configured Tree Ring root. The project does not receive that database or its
contents. Data leaves the local environment only when the user or another tool
explicitly exports, syncs, publishes, or otherwise transmits it.

The skill instructs agents to avoid transcripts, credentials, secrets, private
keys, raw chain-of-thought, and unnecessary sensitive personal data. These
safeguards do not replace the privacy and data-use terms of the AI host,
operating system, source-control provider, or another tool the user invokes.
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,18 @@ brew install tree-ring
Or use the canonical project install guide:
<https://github.com/TerminallyLazy/Tree-Ring-Memory#install>

The multi-agent, Coordinated-policy, and schema-v3 guidance in this skill
requires Tree Ring Memory CLI **0.13.0 or newer**. Before a v0.13 process opens
an existing store, stop all Tree Ring processes, checkpoint and back up the
database, and upgrade every CLI, plugin, and bundled worker. Do not use v0.12
against an upgraded schema-v3 root; all mixed-version operation is unsupported.
The receipt-backed harness, multi-agent, Coordinated-policy, and schema-v3
guidance in this skill requires Tree Ring Memory CLI **0.14.0 or newer**. Before
a current process opens a pre-v0.13 store, stop all Tree Ring processes,
checkpoint and back up the database, and upgrade every CLI, plugin, and bundled
worker. Do not use v0.12 against an upgraded schema-v3 root; all mixed-version
operation is unsupported.

If the CLI is absent or older, the skill reports the limitation. It does not
install or upgrade software, edit shell configuration, or claim that recall or
another memory action ran without explicit user permission and observed command
output. On a host without local shell access, it remains useful as
memory-lifecycle guidance.

## What It Teaches

Expand All @@ -51,6 +58,8 @@ against an upgraded schema-v3 root; all mixed-version operation is unsupported.
- Use rings deliberately: cambium, outer, inner, heartwood, scar, and seed.
- Prefer evidence records for evaluated outcomes.
- Treat source documents as authoritative when memory and source files disagree.
- Read the applicable DOX-style `AGENTS.md` chain before editing, preview DOX
sync output, and never let recalled summaries override or rewrite contracts.
- Redact, delete, or supersede stale or unsafe memory.
- Give same-host fan-out workers unique agent profiles and logical operation
IDs while sharing workflow and attempt-level session IDs.
Expand All @@ -68,14 +77,26 @@ against an upgraded schema-v3 root; all mixed-version operation is unsupported.
- Keep the shared-root claim bounded to concurrent processes on one host and a
local filesystem; use per-host stores and explicit evidence-preserving fan-in
across hosts.
- Distinguish project-local harness configuration from activation, which
requires a fresh matching receipt from scoped recall and safe context
injection in a new session.
- Report exact non-active states such as `configured-awaiting-proof`,
`needs-trust`, `needs-plugin`, `needs-project-mount`, and `needs-user-review`
without modifying trust or manufacturing receipts.
- Distinguish installed-CLI harness and recall-quality evidence from the full
repository-only `scripts/certify-tree-ring.sh` release suite.

## Source Project

- Framework: <https://github.com/TerminallyLazy/Tree-Ring-Memory>
- v0.14 release: <https://github.com/TerminallyLazy/Tree-Ring-Memory/releases/tag/v0.14.0>
- Claude plugin wrapper:
<https://github.com/TerminallyLazy/tree-ring-memory-claude-plugin>
- Skill file: [`SKILL.md`](SKILL.md)

## License

MIT. See [`LICENSE`](LICENSE).

See [`PRIVACY.md`](PRIVACY.md), [`TERMS.md`](TERMS.md), and
[`SECURITY.md`](SECURITY.md) for data handling, use terms, and disclosures.
145 changes: 140 additions & 5 deletions SKILL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
name: tree-ring-memory
description: Guides AI agents in using Tree Ring Memory for durable recall, project decisions, user preferences, warnings, future seeds, privacy-safe memory capture, and lifecycle-aware forgetting.
version: 0.13.0
tags: ["memory", "agents", "recall", "privacy", "projects", "dox", "revolve", "skills", "cli", "multi-agent", "fan-out", "fan-in", "idempotency", "coordination"]
version: 0.14.0
license: MIT
tags: ["memory", "agents", "recall", "privacy", "projects", "dox", "revolve", "skills", "cli"]
triggers:
- "remember this"
- "recall what we decided"
Expand All @@ -15,9 +16,6 @@ triggers:
- "sync Revolve"
- "evidence loop"
- "multi-agent memory"
- "fan-out memory"
- "fan-in memory"
- "coordinated memory"
---

# Tree Ring Memory
Expand All @@ -33,6 +31,51 @@ Tree Ring Memory preserves meaningful agent learning like tree rings:
- speculative future work stays as seeds
- sensitive data is blocked, redacted, or kept out by default

## Runtime Preflight

Before running a Tree Ring command:

1. Read project-local `.tree-ring/SKILL.md` and `.tree-ring/CLI.md` when they
exist. They describe the configured root and exact installed commands.
2. Confirm that the local runtime is available:

```bash
tree-ring --version
```

3. This package targets Tree Ring Memory CLI 0.14.0 or newer. If the command is
missing or older, do not invent results, edit shell configuration, or install
or upgrade software without the user's explicit permission. Explain the
limitation and point to the canonical install guide:
<https://github.com/TerminallyLazy/Tree-Ring-Memory#install>

If the current host cannot execute a local shell or access project files, use
this skill only as memory-lifecycle guidance. Do not claim that recall, capture,
audit, activation, or forgetting occurred unless the corresponding command ran
and its result was observed.

## Agent Operating Loop

Use this sequence for meaningful project work:

1. Resolve the project root and read its local Tree Ring contract when present.
2. Run the runtime preflight, then recall narrowly scoped, source-linked memory
before making a material decision or repeating a failure-prone workflow.
3. Treat recalled memory as context, not authority. Recheck facts that may have
changed and defer to current source files, tests, policies, and user input.
4. Do the work. Do not write memory merely because a session is active.
5. At a natural checkpoint or closeout, capture only durable decisions,
corrections, validated lessons, warnings, or future seeds. Never store raw
transcripts, secrets, or sensitive data.
6. Observe the command result and report the actual outcome. A proposed memory,
dry run, bridge file, or generated marker is not proof that a durable write,
sync, activation, correction, or deletion occurred.

In a Coordinated store, do not attempt persistent writes without the required
coordinator capability. If the capability is unavailable, provide a concise
candidate memory for an authorized coordinator instead of claiming it was
stored.

## When To Recall

Recall memory before:
Expand Down Expand Up @@ -99,6 +142,98 @@ as a pointer only. Read the project-local `.tree-ring/SKILL.md` and
Do not assume a global Tree Ring setup applies to the current repo unless the
user explicitly configured it.

## DOX Contract Flow

When a project uses DOX-style `AGENTS.md` contracts:

1. Read the applicable contract chain from the project root down to the working
directory before editing files. More specific child contracts may refine the
parent contract.
2. Treat those current source files as authoritative. A recalled DOX summary is
only a navigation and continuity aid; it never overrides the live contract.
3. Preview the adapter output first with
`tree-ring dox sync --source-root <path> --dry-run` and inspect every summary
and source reference.
4. Persist only concise, useful summaries. In a Coordinated store, persistence
requires coordinator authority; dry-run discovery does not.
5. Never use the adapter to rewrite a root or child `AGENTS.md`, copy whole
contract trees into memory, or weaken child instructions. Re-run the dry run
after a source contract changes and re-read the chain before the next edit.

## Harness Activation

For a new project, begin with the safe, project-local default:

```bash
tree-ring init
tree-ring integrations status
```

Do not ask the user to copy a bridge or run `integrations link` for ordinary
setup. `init` configures only safe project-local adapter material by creating
absent final bridge and manifest paths. It never replaces or removes an existing
entry, including during deactivation; contested entries stay untouched and
report `needs-user-review`. A bridge, marker, generated skill, or successful
`init` is not activation proof: `active` requires a fresh, matching receipt from
a new session's scoped recall and safe context injection.
Treat `configured-awaiting-proof`, `active-isolated`, `needs-trust`,
`needs-project-mount`, `needs-plugin`, `needs-user-review`, `unsupported`,
and `failed` as their exact non-active outcomes. Never say Hermes or another
unverified runtime is active.

If publication durability becomes indeterminate, do not delete or rewrite the
published path. Preserve disk material, keep changed harnesses marked
`needs-user-review` in the returned in-memory manifest, and leave any activation
manifest already published on disk intact for explicit reconciliation.

Pi trust is the user's decision: report `needs-trust` rather than changing
global trust. Agent Zero is separate: `tree-ring init` writes only Tree Ring's
passive Agent Zero binding with `needs-plugin`. The user installs/enables the
compatible `tree_ring_memory` plugin and selects the mounted project; the plugin
then owns its absolute, non-project `activation-capability.json` descriptor and
passes it internally. Only descriptor-scoped plugin status can derive
`configured-awaiting-proof`, and only its new-session preflight receipt can
make the runtime `active`.

Never create a generic marker, copy or hand-author that descriptor, set its
internal transport, modify Agent Zero core, or call a different plugin store
shared. A missing, invalid, disabled, or release-incompatible descriptor stays
`needs-plugin`; a different reachable store is `active-isolated`; an
unavailable root is `needs-project-mount`. A passive binding, source checkout,
or stale bundled CLI is not installed capability.

Receipts prove a privacy-safe preflight check, not durable memory creation or a
security boundary. They exclude raw prompts, recalled content, secrets,
sensitive values, paths, and coordinator capabilities. Shared-store claims are
limited to same-host local-filesystem processes whose receipts match the
canonical project `store_id`; they do not apply across hosts or network
filesystems. For diagnostics use `tree-ring integrations status --verbose`;
for advanced controlled work use `integrations activate --harness <id>
--dry-run`, `integrations certify`, or `integrations deactivate --harness
<id>`.

## Certification Boundary

For an installed Tree Ring runtime, use the self-contained CLI evidence paths:

```bash
tree-ring integrations certify --source-root .
tree-ring recall-quality --source-root .
```

Harness certification is non-mutating and writes JSON/Markdown evidence under
`target/tree-ring-certification/`; it does not activate a harness or prove that
an agent used recalled context. Keep receipt-backed status as a separate gate.

`sh scripts/certify-tree-ring.sh` is the full framework release suite. Run it
only from a canonical Tree Ring Memory source checkout where that file, the Rust
workspace, `install.sh`, fixtures, and build tooling are all present. Do not
copy it into another project, download it automatically, or claim full release
certification from the smaller installed-CLI checks. In the TUI, `/evidence
refresh` only displays this external source-checkout command; it does not run
certification. If the script is absent, report that boundary and use the
self-contained CLI commands above when they fit the user's request.

Evidence outcome mapping:

- `promoted`: durable heartwood from supported evidence
Expand Down
13 changes: 13 additions & 0 deletions TERMS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Tree Ring Memory Skill Terms of Use

Effective August 23, 2026

This Tree Ring Memory skill is open-source software distributed under the MIT
License. It provides agent instructions only and is not a hosted memory,
backup, access-control, medical-record, or legal-record service.

The user is responsible for choosing what to store, maintaining backups,
controlling local filesystem access, reviewing agent actions, and complying
with applicable policies and law. The skill is provided without warranty to
the maximum extent permitted by law. The limitations in the included MIT
License apply.
Loading