Harness Intelligence Wiki
Domains

Source Capture Flow

How a supplied source becomes an immutable, committed and read-back original with a provenance record before any ingest.

Source Capture Flow

Capture runs before extraction and ingest, for every supplied source, also when ingest later finds nothing new. Each source ends with exactly one outcome. Spec authority: FLOW-002, AC-008–AC-015.

Trigger and actors

  • Trigger: a user supplies a file, pasted or exported text, a meeting export, or a URL to fetch.
  • Ingesting agent: acquires, preserves, commits and reads back.
  • User: supplies the source and decides any push. A local commit authorizes no push.

Steps

  1. Acquire the original bytes and compute their SHA-256 and byte count. A URL, a summary or an exit status is not proof; only bytes in hand count.
  2. Reuse or place. Search every source.json in the raw home for the SHA-256. On a match, read the record back; on OK, reuse the identical original and write no second copy. Without a match, create a new revision directory; a changed source becomes a new revision beside the older one.
  3. Preserve the bytes unchanged and write source.json. Normalization goes into derived files only.
  4. Commit only the revision directory: git add -- <dir>, then git commit --only -- <dir>. Hooks run. Unrelated staged and working-tree changes stay as they were.
  5. Read back with verify-captured-source.mjs. It reads the committed record and blobs at a ref (default HEAD) and checks SHA-256, byte count and each derived entry.
  6. Derive (optional, only after committed): write derived text, add its derived entry, then commit and read back again.

Terminal outcomes

OutcomeMeaning
not capturedNo original acquired; nothing written. The report names the gap.
saved-uncommittedFiles on disk without a verified commit. Retry from Commit.
unverifiedA commit exists, readback failed. Keep both; correct with a new commit.
committedReadback printed OK. Extraction or synthesis failure later keeps this outcome.

The record fields and layout are on the provenance record page.

Implemented behavior and evidence

  • Skill text and script: source-capture.md and verify-captured-source.mjs, skills commit 2319349; test tests/wiki-source-capture.contract.test.mjs.
  • First real run (T9, 2026-10-08): the pinned revision URL of the Karpathy source was fetched again (HTTP 200, 11985 bytes, SHA-256 dc3efe98…7401). The SHA-256 matched the existing record, readback printed OK … at HEAD (56c22bf8e54e), and the run reused the stored original unchanged. Outcome: committed, no new files (AC-012).

The new-revision path (AC-013), the commit step and the derive step have contract-test proof only; the T9 run exercised the reuse path.

On this page