Files
superpaper/assets/ledger.schema.yaml
dela 3a322aa8dc feat: land superpaper v1 notes scaffold
Add the ledger schema, class router, lint codes, ingest/build
pipeline, and three work-tree examples: align derivation,
superfig delegation, and supertensor delegation.
2026-08-17 10:01:30 +08:00

211 lines
6.6 KiB
YAML

$schema: "http://json-schema.org/draft-07/schema#"
$id: "https://local/superpaper.ledger/v1"
type: object
required: [schema, paper, coverage]
additionalProperties: true
properties:
schema: {const: superpaper.ledger/v1}
retired_ids:
type: array
items: {type: string, pattern: "^(C|Q|D|A|L|E|DER|F|SA)[1-9][0-9]*$"}
paper:
type: object
required: [id, title, source]
additionalProperties: true
properties:
id: {type: string, minLength: 1}
title: {type: string}
authors: {type: array, items: {type: string}}
year: {type: integer}
venue: {type: string}
notes_language: {type: string, enum: [zh, en]}
degraded:
type: array
items: {type: string, enum: [scanned, no-eprint, no-pdftotext]}
source:
type: object
required: [kind]
additionalProperties: true
properties:
kind: {enum: [arxiv, pdf, tex, excerpt, markdown]}
arxiv: {type: string}
local_pdf: {type: string}
pages: {type: integer, minimum: 1}
language: {type: string}
coverage:
type: object
required: [mode]
additionalProperties: true
properties:
mode: {enum: [full, excerpt, body-only]}
sections_in: {type: array, items: {type: string}}
sections_skipped: {type: array, items: {type: string}}
skip_reasons:
type: array
items:
type: object
required: [section, reason]
properties:
section: {type: string}
reason: {type: string}
questions:
type: array
items:
type: object
required: [id, text]
properties:
id: {type: string, pattern: "^Q[1-9][0-9]*$"}
text: {type: string}
source: {type: string}
claims:
type: array
items:
type: object
required: [id, text, kind, status]
properties:
id: {type: string, pattern: "^C[1-9][0-9]*$"}
text: {type: string}
kind: {enum: [contribution, theoretical, empirical, methodological]}
status: {enum: [core, supporting, dropped]}
supports: {type: array, items: {type: string}}
depends_on: {type: array, items: {type: string}}
evidence: {type: array, items: {type: string}}
source: {type: string}
definitions:
type: array
items:
type: object
required: [id, name, text]
properties:
id: {type: string, pattern: "^D[1-9][0-9]*$"}
name: {type: string}
text: {type: string}
source: {type: string}
assumptions:
type: array
items:
type: object
required: [id, text]
properties:
id: {type: string, pattern: "^A[1-9][0-9]*$"}
text: {type: string}
source: {type: string}
used_by: {type: array, items: {type: string}}
lemmas:
type: array
items:
type: object
required: [id, text]
properties:
id: {type: string, pattern: "^L[1-9][0-9]*$"}
text: {type: string}
depends_on: {type: array, items: {type: string}}
used_by: {type: array, items: {type: string}}
source: {type: string}
symbols:
type: array
items:
type: object
required: [name, latex, meaning, kind]
properties:
name: {type: string}
latex: {type: string}
meaning: {type: string}
domain: {type: string}
kind:
enum: [value, score, probability, index, rank, count, id, mask,
permutation, "shape parameter", scalar, set]
introduced: {type: string}
used: {type: array, items: {type: string}}
aliases: {type: array, items: {type: string}}
derivations:
type: array
items:
type: object
required: [id, claim, title, expand]
properties:
id: {type: string, pattern: "^DER[1-9][0-9]*$"}
claim: {type: string}
title: {type: string}
source: {type: string}
expand: {type: boolean}
figure: {type: ["string", "null"]}
steps:
type: array
items:
type: object
required: [id, from, to, rule]
properties:
id: {type: string}
from: {type: string}
to: {type: string}
rule:
enum: [definition, substitute, cancel, factor, scale,
take-limit, approx, cite, rearrange, introduce]
cite: {type: string}
justify: {type: string}
figures:
type: array
items:
type: object
required: [id, claim, title, grammar, toolkit, signals, status]
properties:
id: {type: string, pattern: "^F[1-9][0-9]*$"}
claim: {type: string}
title: {type: string}
grammar:
enum: [architecture, pipeline, data-flow, state, time, dependency,
argument-map, tensor-face, derivation, screenshot, plot,
notation, none]
toolkit:
enum: [superfig, supertensor, superderive, screenshot,
matplotlib, none, align]
signals: {type: array, items: {type: string}}
source_fig: {type: string}
source_pages: {type: array, items: {type: integer, minimum: 1}}
crop_bbox:
type: ["array", "null"]
minItems: 4
maxItems: 4
items: {type: number}
request: {type: ["string", "null"]}
include: {type: ["string", "null"]}
status: {enum: [planned, delegated, built, included, dropped]}
drop_reason: {type: ["string", "null"]}
evidence:
type: array
items:
type: object
required: [id, kind, source, supports, handling]
properties:
id: {type: string, pattern: "^E[1-9][0-9]*$"}
kind: {enum: [table, plot, ablation, theorem, example]}
source: {type: string}
supports: {type: array, items: {type: string}}
handling:
enum: [redraw-superfig, redraw-supertensor, redraw-superderive,
screenshot, matplotlib, omit]
terms:
type: array
items:
type: object
required: [canonical]
properties:
canonical: {type: string}
aliases: {type: array, items: {type: string}}
first_defined: {type: string}
source_assets:
type: array
items:
type: object
required: [id, kind, handling]
properties:
id: {type: string, pattern: "^SA[1-9][0-9]*$"}
kind: {enum: [figure, table]}
paper_ref: {type: string}
handling:
enum: [redraw-superfig, redraw-supertensor, redraw-superderive,
screenshot, matplotlib, omit]
pages: {type: array, items: {type: integer}}
note: {type: string}