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

+23
View File
@@ -3,6 +3,20 @@
"$id": "https://paperspec.scient.ing/schemas/annotation.schema.json",
"title": "Annotation",
"description": "One line of annotations.jsonl in scienting-layer/1: a W3C Web Annotation; spec/18-layers.md.",
"$defs": {
"category": {
"description": "What a comment, caveat or question is about (spec/18 §18.4).",
"enum": [
"comment",
"context",
"critique",
"question",
"correction",
"feedback",
"resource"
]
}
},
"type": "object",
"properties": {
"@context": {
@@ -173,6 +187,9 @@
},
"kind": {
"const": "comment"
},
"category": {
"$ref": "#/$defs/category"
}
},
"required": [
@@ -203,6 +220,9 @@
},
"kind": {
"const": "caveat"
},
"category": {
"$ref": "#/$defs/category"
}
},
"required": [
@@ -240,6 +260,9 @@
"group",
"authors"
]
},
"category": {
"$ref": "#/$defs/category"
}
},
"required": [
+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": {
+22
View File
@@ -3,6 +3,13 @@
"$id": "https://paperspec.scient.ing/schemas/runs.schema.json",
"title": "Inline runs",
"description": "The runs of a sentence, cell, reference, authors or keywords node; spec/03-nodes.md.",
"$defs": {
"printed": {
"description": "The run's text as the paper prints it, kept by an emend correction (spec/03 §3.5, spec/11 §11.1).",
"type": "string",
"minLength": 1
}
},
"type": "array",
"minItems": 1,
"items": {
@@ -31,6 +38,9 @@
},
"minItems": 1,
"uniqueItems": true
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"required": [
@@ -79,6 +89,9 @@
"text": {
"type": "string",
"minLength": 1
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"required": [
@@ -110,6 +123,9 @@
"text": {
"type": "string",
"minLength": 1
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"required": [
@@ -138,6 +154,9 @@
"text": {
"type": "string",
"minLength": 1
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"required": [
@@ -159,6 +178,9 @@
"text": {
"type": "string",
"minLength": 1
},
"printed": {
"$ref": "#/$defs/printed"
}
},
"required": [