Provenance Record
The raw-home layout and the source.json record that identify one captured source revision and its derived files.
Provenance Record
A provenance record identifies one revision of a captured source. It is the source.json file beside the original, written by the capture flow. Spec authority: AC-008–AC-015; plan decision P8.
Layout
raw/<origin>/<slug>/<revision12>/
<file> # the original, byte-for-byte
source.json # provenance record
<derived files> # optionalorigin: source class, for exampleexternal.slug: stable kebab-case name, kept across revisions.revision12: first 12 characters of the upstream revision ID, else of the original SHA-256.
Fields
source.json is one JSON object; a value the source does not have is null.
- Identity:
sha256(original, lowercase hex),bytes,file,media_type. - Origin:
title,author,kind,original_url,revision,retrieved_url. - Capture:
captured_on,supplied_via,preservation. derived(optional): one entry per derived file, withfile,sha256,from_sha256(the original'ssha256) andmethod.
Invariants
- The original never changes. Normalization, frontmatter and re-encoding go into derived files only.
- One SHA-256 is one revision. Identical bytes reuse the existing record; changed bytes get a new revision directory beside the older one.
- A record counts only after
verify-captured-source.mjsreads the committed blobs back and printsOK. raw/is outside the Fumadocs collection: no route or HTTP export serves it.
Example
The Karpathy source: raw/external/karpathy-llm-wiki/ac46de1ad27f/ holds llm-wiki.md (11985 bytes, SHA-256 dc3efe98…7401, gist revision ac46de1a…) and its source.json (repository-only).
Implemented behavior and evidence
- Skill text and readback script:
source-capture.md, skills commit2319349. - Project check:
check:healthverifies that eachsource.jsonnames an existing file with matching SHA-256 and size (commit1b6aa37fa).
Wiki Contract
The six fields a project declares in its wiki-root AGENTS.md so every docs-ingest branch knows where wiki knowledge lives and who owns it.
Knowledge Freshness
The recorded source identities that let ingest tell fresh knowledge from stale, the three ingest outcomes, and the single log rule.