Contract index

Truth hierarchy: on-disk project + page results are authoritative for each notebook today. Archive SQLite is disposable derived state (rebuildable search/timeline cache). Analysis outputs are authoritative only inside the managed project’s analysis/ tree. Bulk-import generation adds a workspace corpus index + ImportRun authority (runtime-normative; see activation gate). Invariants live in the CONTRACT docs below — not in README, guides, or architecture.

Concept

Authority

Supported entrypoints (CLI / UI / scripts)

public_surfaces.md

Corpus hierarchy, notebook_id, ordering, corpus index, workspace locks

contracts/notebook-corpus.md

Managed originals, fingerprints, duplicates, source/render invariants

contracts/source-asset.md

ImportRun / ImportPlan lifecycle, idempotency, crash/resume

contracts/import-run.md

Multi-notebook OCR batch (OcrBatchRun)

contracts/ocr-batch-run.md

Multi-notebook Analyse batch (AnalysisBatchRun)

contracts/analysis-batch-run.md

Corpus/notebook doctor invariants, repair boundaries, bulk-import acceptance gate

contracts/corpus-integrity.md

Project directory layout, project.json, ingest journal, locks, optional analysis/

contracts/project-on-disk.md

Page results, attempts, edits, fingerprints, prefer/compare (persisted)

contracts/page-result.md

OCR multipass job records, rank/composite phases

contracts/ocr-multipass.md

OCR preference ledger / rollup

contracts/ocr-preference.md

Fine-tune dataset export package

contracts/finetune-export.md

Portable notebook export

contracts/notebook-export.md

Canonical analysis input, content fingerprint, source_ref, spans

contracts/analysis-document.md

Analysis result envelope, outcomes vs attempts, capability UI states, provenance, evidence

contracts/analysis-result.md

Analysis persistence, cache identity, hard/optional parents, atomic publish

contracts/analysis-run-storage.md

Prompt definitions, rendering boundary, schema identity

contracts/prompt-definition.md

Organisation tag catalog (slugs / labels / colours; TX copy-boundary)

contracts/tag-catalog.md

Detector definitions, scope, candidate strategy

contracts/detection-definition.md

Detection findings, cross-page spans, review status

contracts/detection-finding.md

Detection result envelope, outcomes, capability

contracts/detection-result.md

Detection persistence, cache identity, aggregation

contracts/detection-run-storage.md

Page ink / blankness / hue metrics (Pillow; active renders)

contracts/page-metrics.md

Sole notebook eligibility policy (notebook_eligibility_v1)

contracts/notebook-eligibility.md

Durable UI action-menu prefs (interface_menus.json schema v1)

contracts/interface-menus.md

Workspace settings (analysis / llm / ocr / ingest / export / ui), profiles, knob precedence, analysis config versions

contracts/workspace-settings.md

Full-workspace backup ZIP / restore (role roots, verify, replace-only)

contracts/workspace-backup.md

Future TranscriptX handoff (non-shipped)

INTEGRATION_SEAM.md

Schema identity and version gates in code: transcribe.persistence.schema.SUPPORTED (transcribe.project, transcribe.page-result, transcribe.notebook, transcribe.analysis-document, transcribe.analysis-result, transcribe.detection-result, transcribe.prompt-definition, transcribe.page-metrics, plus transcribe.corpus-index, transcribe.import-run, transcribe.ocr-batch-run, transcribe.ingest-journal, transcribe.workspace-backup, personal_corpus.tag-catalog, transcribe.detection-auto-tag — all version 1 today). Interface menus use a separate envelope (schema_version 1) under data/config/interface_menus.json — see the interface-menus contract. Corpus formats are runtime-normative for bulk import (activation gate satisfied) but are not required for transcribe.project v1 notebooks that lack corpus registration.