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

+8 -1
View File
@@ -12,10 +12,16 @@
Levels apply to leaves.
The pipeline records F0, F1 or F2 in a leaf's `fidelity`; F3 comes only from receipts.
A correction that changes a leaf drops it back: the gate's crop evidence makes it F1 at most, until it is corroborated or proofread again.
An `emend`, `relink` or `resolve` ([11.1](11-corrections.md#111-operations)) never does, because a level measures the reading against its witnesses and the page.
An emend corrects the authors, not the reading, and leaves the leaf as printed ([3.6](03-nodes.md#36-the-plain-projection)) as it was; a relink or a resolve changes no text, and the references a citation names are not text a witness corroborates.
Whatever compares a leaf with a witness or with the page compares the leaf as printed: alignment and its suspects ([5.6](05-hashes.md#56-alignment)), corroboration by `match_hash`, a proofreader who signs a receipt, and a spot-check's `errors`.
So an emendation is never reported as a misreading.
## 8.2 Levels
A leaf's level is the highest of its recorded `fidelity` and the levels of every valid receipt ([8.6](#86-receipt-status)) that lists it at its current `node_hash`.
A leaf's level is the highest of its recorded `fidelity` and the levels of every valid receipt ([8.6](#86-receipt-status)) that lists it at its current `node_hash`, or at a `node_hash` that only `emend`, `relink` and `resolve` corrections of the leaf have changed since.
To find those hashes, walk the document's corrections back from the last: one of those three that targets the leaf and whose `after` is the hash reached so far leads back to its `before`, and any other correction that names the leaf, as its `target` or in `touched`, `path`, `to_path`, `created` or `retired`, ends the walk.
A receipt at a lower level never lowers a node; only a revocation, a failed spot-check or a correction does.
A spot-check's `qa:` receipt ([8.8](#88-spot-checks)) raises the nodes it sampled, except those its `errors` name.
A document reports, in `document.json`, the lowest level among its leaves and the count at each level.
@@ -45,6 +51,7 @@ A paper has thousands of nodes, and nobody signs thousands of times, so people s
A receipt lists nodes, records, or both.
A correction invalidates a receipt for the corrected node only, because the node's `node_hash` no longer matches; the rest still counts.
An emend, relink or resolve invalidates none ([8.2](#82-levels)).
A receipt shared outside the team cannot carry plain node hashes, which would leak short texts, and its signature covers them.
So an export re-issues it: a new receipt with `export_of`, values under the export's key, signed by the original reviewer or a team key with the `export` purpose.