← ClaudeAtlas

consolidating-noteslisted

Merge an accumulated pile of agent notes, memories, or scratch documents into repository knowledge — freezing the input, synthesizing into a separate output, diffing, and routing each surviving entry to a doc, a guard, a subtree CLAUDE.md, or the small remainder that really is user-scoped. Also covers pruning docs and code the same way. Use this when notes contradict each other, when memory has drifted, when a note references something that no longer exists, when someone asks to clean up or compact memory, or when knowledge is trapped in a private note pile instead of the repo.
WangChangxin0809/repo-agent-harness · ★ 2 · Code & Development · score 75
Install: claude install-skill WangChangxin0809/repo-agent-harness
# Consolidation Governs: shared/scripts/consolidate.py Notes accumulate faster than they are corrected. After a few months a pile contains contradictions, entries about flags that were removed, and — buried in it — the measurements that are the only reason any of it is worth keeping. The mechanism that fixes this is a synthesis pass over a frozen input, producing a separate output you compare before adopting. Claude's Dreams API implements exactly this shape and never mutates its input; the same shape works by hand, and is what the scripts here do. ## The invariant **Never synthesize in place.** The input is frozen, the output is new, and adoption is a decision you make after reading a diff. In-place editing destroys the evidence needed to tell a good merge from a lossy one, and lossy merges are the normal failure — they read beautifully. ```bash python3 ${CLAUDE_PLUGIN_ROOT}/shared/scripts/consolidate.py prepare --notes .agent-notes --sessions .agent-sessions # snapshot is chmod'd read-only; the synthesis writes to .consolidation/candidate/ only python3 ${CLAUDE_PLUGIN_ROOT}/shared/scripts/consolidate.py diff ``` `diff` reports three things, in the order they matter: 1. **What is gone.** Every measurement, commit hash, and path present in the input and absent from the candidate, quoted. This is the check the whole invariant exists to enable, and it is mechanical — do not do it by eye. 2. **What has no destination.** Entries that survived without a `ROUTE:` line