consolidating-noteslisted
Install: claude install-skill WangChangxin0809/cc-repo-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
**Write the synthesis to a new file and leave the input untouched.** Adoption is
then a decision you make after reading a diff of the two. 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 — the tool finds these, a
careful reading of the candidate does not.
2. **What has no d