feat: trace annotation body for traced citations; paperspec.traces
A trace follows one citation of a sentence of a citing paper to a passage of the cited paper (spec/18 section 18.5). Minor change: a new body kind, optional properties and two rules, with no valid file made invalid. - annotation schema branch (source, selector, reference, note, verdict, proposer; proposer required for a Software creator); body_kind in sql/store.sql; the note and proposer terms of the JSON-LD context; rules layer.trace.source and layer.trace.target. - paperspec.traces: resolve(annotation, citing_state, cited_state, same_as) gives current, changed, stale, unlinked or misresolved with open and cites; problems, disputes, disputed. - fixtures/records/traces/ on writer2027fixed-ynr7.v3 and vectors/traces.jsonl (29 cases); check.py runs the record checks over both layers; counts, glossary, examples and CHANGELOG updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uy4ZYbWRoCdUtWLEfigysY
This commit is contained in:
25 files changed
+966
-50
No files matched your search
@@ -15,6 +15,50 @@
|
||||
"feedback",
|
||||
"resource"
|
||||
]
|
||||
},
|
||||
"selector": {
|
||||
"description": "A selector of a passage: the AnchorSelector, or the standard TextQuoteSelector that repeats the anchor's plain quote for tools that do not know ours (spec/18 §18.3).",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "AnchorSelector"
|
||||
},
|
||||
"anchor": {
|
||||
"$ref": "anchor.schema.json"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"anchor"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "TextQuoteSelector"
|
||||
},
|
||||
"exact": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
},
|
||||
"suffix": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"exact"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
@@ -423,6 +467,79 @@
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "SpecificResource"
|
||||
},
|
||||
"kind": {
|
||||
"const": "trace"
|
||||
},
|
||||
"source": {
|
||||
"description": "The cited document, as a target's source names a document.",
|
||||
"type": "string",
|
||||
"pattern": "^tag:scient\\.ing,2026:doc:[a-z0-9][a-z0-9._-]*/[a-z][a-z0-9]*-[0-9a-hjkmnp-tv-z]{4,51}(\\.[a-z0-9][a-z0-9-]*)*$"
|
||||
},
|
||||
"selector": {
|
||||
"description": "The passage of the cited document: an AnchorSelector, then a TextQuoteSelector when the anchor's quote is plain.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/selector"
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"reference": {
|
||||
"description": "The reference node of the citing document that the target's sentence cites and the trace is about.",
|
||||
"$ref": "common.schema.json#/$defs/nodeId"
|
||||
},
|
||||
"note": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"verdict": {
|
||||
"enum": [
|
||||
"supports",
|
||||
"partly",
|
||||
"does-not",
|
||||
"cannot-tell"
|
||||
]
|
||||
},
|
||||
"proposer": {
|
||||
"description": "The tool that proposed the trace, required when the annotation's creator is Software (spec/18 §18.4).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
"$ref": "common.schema.json#/$defs/model"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"score": {
|
||||
"$ref": "common.schema.json#/$defs/decimal"
|
||||
},
|
||||
"rank": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"model",
|
||||
"run"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type",
|
||||
"kind",
|
||||
"source",
|
||||
"selector",
|
||||
"reference"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -764,6 +881,46 @@
|
||||
"receipt"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "A tool's trace names the tool and the run that proposed it (spec/18 §18.4).",
|
||||
"if": {
|
||||
"properties": {
|
||||
"creator": {
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "Software"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "trace"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"kind"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"creator",
|
||||
"body"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"body": {
|
||||
"required": [
|
||||
"proposer"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user