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

+110 -2
View File
@@ -3,6 +3,18 @@
"$id": "https://paperspec.scient.ing/schemas/correction.schema.json",
"title": "Correction",
"description": "scienting-correction/1: a line of corrections.jsonl, or a proposal; spec/11-corrections.md.",
"$defs": {
"emendKind": {
"enum": [
"typo",
"spelling",
"grammar",
"punctuation",
"wording",
"other"
]
}
},
"type": "object",
"properties": {
"format": {
@@ -25,7 +37,10 @@
"move",
"reclassify",
"relabel",
"set"
"set",
"emend",
"relink",
"resolve"
]
},
"target": {
@@ -71,7 +86,38 @@
"type": "string"
},
"kind": {
"$ref": "common.schema.json#/$defs/nodeKind"
"description": "A reclassify's new node kind, or what an emend corrects.",
"anyOf": [
{
"$ref": "common.schema.json#/$defs/nodeKind"
},
{
"$ref": "#/$defs/emendKind"
}
]
},
"note": {
"type": "string",
"minLength": 1
},
"refs": {
"description": "A relink's references: reference node IDs, or null to unlink.",
"anyOf": [
{
"type": "array",
"items": {
"$ref": "common.schema.json#/$defs/nodeId"
},
"minItems": 1,
"uniqueItems": true
},
{
"type": "null"
}
]
},
"resolution": {
"$ref": "reference.schema.json#/properties/resolution"
},
"label": {
"anyOf": [
@@ -287,12 +333,74 @@
}
},
"then": {
"properties": {
"kind": {
"$ref": "common.schema.json#/$defs/nodeKind"
}
},
"required": [
"target",
"kind"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "emend"
}
}
},
"then": {
"properties": {
"replace": {
"type": "string",
"minLength": 1
},
"kind": {
"$ref": "#/$defs/emendKind"
}
},
"required": [
"target",
"find",
"replace",
"kind"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "relink"
}
}
},
"then": {
"required": [
"target",
"run",
"refs"
]
}
},
{
"if": {
"properties": {
"op": {
"const": "resolve"
}
}
},
"then": {
"required": [
"target",
"resolution"
]
}
},
{
"if": {
"properties": {