feat: comment categories; emend, relink and resolve corrections

scienting-layer/1: an optional, fixed category on comment, caveat and
question bodies (comment, context, critique, question, correction,
feedback, resource).

Corrections: emend fixes the authors' own slip and keeps what was printed
(a run's printed), never lowering fidelity or a witness match; relink sets
or removes what a citation names; resolve sets a reference's resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017R7sgDNvUGWY2zFPCq2JH6
This commit is contained in:
alexmandClaude committed 2026-10-17 06:17:10 -04:00
1 parent 4d59b29b63
commit 8b5ee87275
33 files changed
+726 -80

No files matched your search

+2
View File
@@ -105,6 +105,8 @@ The result is `{result, node, node_hash?, span?, drift?, via?, reason?}`: the ou
A `moved` or `reattached` anchor is re-pinned to the live node, and the move is recorded.
Checks are stricter than readers: an extract is a span or leaf anchor and never accepts `changed-below`, because a check is about exact words.
An `emend` changes a leaf's `node_hash` and plain projection as a `replace` does ([11.6](11-corrections.md#116-emendations)), so an anchor on the leaf is judged as after a replace: a quote outside the emended text that occurs once is `reattached` with its new position, and a quote that spans the emended text is `stale`.
A `relink` changes the leaf's `node_hash` but not its plain projection, so an anchor on it is `reattached` by its quote; a `resolve` changes no node, so an anchor on the reference stays `current`.
`resolve.jsonl` resolves seventeen anchors made at revision 0 against `fixtures/packages/hale2026harmonic-damb` at revision 12, with every outcome.
## 6.6 Drift