Files
paperspec/docs/overview.md
T
alexmandClaude ea0a7efa78 feat: zipped packages, target set, checklists, audit fixes and a stress test
Features for the next six months (accessible HTML export, paperpack and
Lode on packages, the personal bundle):

- Zipped packages: the oracle writes and reads `.sct.zip` archives under
  the rules of spec/12 §12.2; validate.py and load.py accept them; a
  byte-identical zip of the tiny package joins the fixtures, and two
  broken archives (traversal, symbolic link) join fixtures/invalid.
- The target set of targeted F3 (spec/08 §8.10) is computed by the
  oracle and pinned by vectors/targets.jsonl under each digit rule; the
  rule now covers cells as well as sentences and the leaves of anchored
  containers, and defines a node's section.
- scienting-checklist/1 (provisional): a conformance check of an export,
  covered by a receipt as ["checklist", id, hash] (spec/08 §8.11), with a
  WCAG 2.1 AA fixture and its receipt.
- QA reports are signed like receipts (spec/08 §8.9).
- A `description` annotation body with role alt or long, so an
  accessible export can find a confirmed figure description; the layer
  fixture carries one, and the store's body-kind constraint allows it.
- scienting-spot-check/1, the seed payload, is registered with a schema.
- exercise, submission and grade are provisional until a course has
  used them.

Audit fixes, each with a vector or a broken package where one was
missing:

- Folder packages: symbolic links are refused on validate and load,
  manifest paths must not collide under case folding, listed files are
  matched by exact name, files are hashed in chunks under a size limit.
- Files are compared byte for byte, so CR LF, a byte order mark, NaN,
  a lone surrogate or invalid UTF-8 is refused instead of translated;
  integers beyond 2^53 are read as doubles, as canonical JSON writes them.
- Receipts: signature.key must equal by and the key must be valid when
  signed; a qa receipt's nodes must be the sample at the original's
  hashes, its scope must name qa.of, its errors must be sampled nodes;
  statuses are computed once, iteratively, so chains of spot-checks
  hundreds deep settle; Base64 and manifest shape errors become refusals
  instead of tracebacks; counts and the fidelity of roster-less packages
  are recomputed.
- The gate enforces rule 11 of spec/11 §11.4: changed nodes are
  validated against the node schema and the references between nodes
  are checked, so a set to a bad value, an insert with unknown
  properties or a delete of a referenced header cell is refused; a
  relabel to null drops the label; a reclassify drops foreign
  attributes; a split strips whitespace across runs; ids.jsonl order
  follows spec/04 §4.4 in every state; a move after itself is refused.
- Anchors: the relabel rule requires that nothing else changed below the
  node; an alias chain ending in a deletion no longer crashes resolve.
- Notation: a script after an empty group applies to the previous atom
  ({}^{14}C); letters are defined by Unicode block in spec/05 §5.4 and
  the oracle; \left) is complex.
- Page fingerprints delete whitespace before folding, so "10 -20" and
  "10-20" fold alike (spec/07 §7.1).
- Grades are summed with exact decimals; the reviewer error bound is
  computed with integer arithmetic.
- receipts and revocations are keyed by (doc_key, id) in SQL, since one
  revocation may be carried by several packages.

Checking:

- tools/stress.py: seeded randomized property tests over canonical JSON,
  normalization, notation, random correction walks, anchor resolution,
  Merkle roots, spot-check samples, error bounds, fingerprints, mutated
  archives and packages, rights and spot-check chains; CI runs it.
- check.py verifies every count and version the prose states against
  the repository, the zipped fixture and crafted archives, the checklist
  coverage, and nine more broken packages.
- CONTRIBUTING.md gains a release checklist.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 20:07:22 -04:00

12 KiB

The manuspec formats

This page serves three readers. A student new to the problem will find each term defined where it first appears. A developer who will write a reader, writer, converter or checker will find each topic pointing to its chapter. A researcher or standards author will find the status, the limits and a comparison stated outright.

The idea

Scientists who rely on a paper keep asking two questions.

  1. Does the cited passage say what is claimed? A citation to a real paper can still be inaccurate, incomplete or beside the point, so a reader needs to see the exact sentence it rests on.
  2. Where did this number come from, and how far was it checked? A force constant in a table, a value read off a plot, a parameter in a model: each should lead back to the cell or sentence it came from, with a record of who compared it with the page.

Most tools for scientific literature aggregate. They index hundreds of millions of papers and answer questions over all of them, shallowly. manuspec does the opposite.

A team working on a focused question cares more about fifty papers it understands completely than about the world's literature. Those fifty papers deserve to be converted once, corrected once, split down to the sentence, annotated by the people who know them, linked to checked claims, and kept.

A model can summarize a paper. It cannot give you a signed statement that a named person checked a passage, IDs that never move, or a store its owner controls. The formats supply those three, and they are worth most at the scale of one team.

manuspec is a set of file formats for scientific papers that have been converted, split into addressable pieces and checked. The repository is at https://git.scient.ing/infra/manuspec. It is version 0.1.0 and defines 29 formats; in registry/formats.json, 18 are candidate and 11 are provisional.

Who it is for

User Example
One researcher A thesis student, a science writer or fact-checker, a Wikipedia editor checking a citation, a scientist keeping a deep personal library.
An academic lab A research group, a thesis committee, a journal club reading one annotated paper together.
A course An instructor whose students learn to check whether a source supports a claim, with answers that are addresses and can be graded.
An industrial team A computational chemistry or materials group that needs to show which passage of which paper each parameter came from.

"Team" throughout means roughly five to twenty people with a few dozen to a few hundred papers that matter. The design targets that scale: hundreds of documents (500 papers come to about a million and a half database rows).

What the repository contains

The repository defines files and checks them. It holds no application.

The formats are identified as scienting-<name>/<major>, such as scienting-doc/1. That prefix is the formats' namespace. It appears inside hashed data and test vectors, and it is separate from the repository's name.

Folder Holds
spec/ The specification, in 23 chapters (00 to 22). Normative.
schemas/ 39 JSON (plain-text data format) Schemas for the files and records.
registry/ The list of formats, the rule IDs a checker reports, download-stamp rules, and default rights requirements.
tools/ Reference programs: check.py checks everything, build.py rebuilds the fixtures and vectors, load.py loads packages into SQLite, and oracle/ is a compact implementation of every rule.
vectors/ 21 files of test vectors: inputs and the exact outputs every implementation must compute.
fixtures/ Five valid example packages, one of them also as a zip, 28 deliberately broken ones that each break one named rule, example records, and the test keys that signed them. All text is synthetic.
sql/ Tables for SQLite, Dolt and PostgreSQL, and a SQLite bundle with full-text search.
context/ The JSON-LD context that makes annotation layers W3C Web Annotations.
docs/ Guides, including this page.

Roles

The formats serve five roles. A role is a job someone could implement. The repository ships reference tools only for the checker and store roles.

Role Does
Reader Opens a package, resolves addresses and anchors, and shows text, annotations and each passage's fidelity level.
Writer Produces files in these formats: nodes, corrections, receipts, annotations, datasets.
Converter Turns a witness (a PDF, JATS XML, the article format publishers use, a LaTeX source archive, an HTML page, an EPUB or a Typst project) into a package and raises doubtful readings as suspects (flagged disagreements awaiting review).
Checker Recomputes hashes, validates files against their schemas and reports broken rules by rule ID. tools/check.py does this for the repository.
Store Keeps packages and records in a database a team can clone. tools/load.py loads packages into SQLite.

The specification's reading paths say which chapters each role needs.

How a paper moves through the formats

  1. Acquire. A witness arrives with a rights record that says how the team holds it and what that allows. A witness is one file of one version of a paper, such as the publisher's PDF, identified by the SHA-256 hash of its bytes.
  2. Read and reconcile. A converter reads the witness with one or more backends, aligns the readings sentence by sentence and compares them. Each page gets a fingerprint with download stamps removed, and differently stamped downloads of one page are recognized as the same.
  3. Segment and mint. Text is split into sentences. Every node (a section, paragraph, sentence, figure, panel, caption, table, row, cell, equation, footnote or reference) gets a permanent ID and five content hashes. A hash is a fixed-length fingerprint of content: change one character and it changes.
  4. Review. Disagreements between readings become suspects with page crops. A person or a model answers each as a correction, and the gate refuses any correction that changes a digit without image evidence. In the example paper the first reading has a cell 3l0.0 where the page says 310.0.
  5. Package. The result is a package: a folder of canonical JSON files (JSON written in one fixed form, so equal content gives equal bytes) with a manifest whose hash pins the whole. Five files are required (MANIFEST.json, document.json, nodes.jsonl, witnesses.json, provenance.json). These are optional: pages.jsonl, locations.jsonl, references.jsonl, corrections.jsonl, receipts.jsonl, ids.jsonl, suspects.jsonl, roster.json, assets/, datasets/ and derived/ (chapter 12).
  6. Use. A store loads the package into a database. A reader renders it with layers of annotations. Anchors (stored references to a sentence, with its hash and a quotation) let a claim, a dataset value or a draft's citation point at a passage. Datasets, drafts, views, projects, exercises and checklists are provisional formats.
  7. Check and sign. People proofread what matters and sign receipts; second reviewers spot-check them. A passage is at level F3 (proofread) only while a valid receipt lists it at its current hash. Every level counts only at the current text.

The walkthrough follows one paper through every step.

Principles

Principle Means
Quality over quantity A small corpus processed to a stated and checkable fidelity beats a large one processed to an unknown one.
Do the work once Conversion, correction, segmentation and digitization are recorded and kept. A fresh conversion of the same input mints the same IDs. A different converter's reading is aligned with the established text: sentences the alignment pairs keep their IDs, and every difference becomes a suspect.
Address everything Every node has a permanent ID and five content hashes. Table columns and figure-text items also have IDs. They are not nodes and have no five hashes. IDs encode no page, ordinal or kind; each is minted once from the document key, kind, text hash and occurrence, then frozen.
Keep source and commentary apart What a source says is stored as the source said it. Everything people or models add is stored beside it and points at it.
Count only what was done A level says how far something was checked, and it falls back when the checked content changes.
Models propose, people sign Models may draft, segment, gloss and digitize, and a model's annotation stays proposed until a person confirms it. The proofread level comes only from a receipt signed by a named person.
The team owns its data Packages are folders of JSON files, the database form is plain SQL tables, and every format is documented in the specification. A team can clone, read and keep its data without anyone's software.

How it compares

manuspec adds to existing standards and replaces none of them. The comparison page has the full account; five points follow.

The formats are at version 0.1.0, the repository names no outside adopter, and the reference tools belong to the same repository. The formats do not replace publisher interchange formats. They also do not fix what a converter reads wrongly; they record it and make it checkable.

What it is not

It is not a search engine over all literature, a citation index, a recommendation feed or a chat-with-any-PDF tool. Tools may import from Crossref, OpenAlex, PubMed Central or arXiv, and none should depend on them to work.

Where next