consolidating-noteslisted
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