← all artifacts
skillv1.0.0tested

Witness Integrator

witness-integrator

Integrate the Witness tamper-evident capture protocol into a new surface while preserving chain integrity, capture identity and verification. Use only in projects where the Witness protocol, core, storage and SDK already exist — this skill is not portable to projects without them.

Provenance

Derived procedure. The source project remains authoritative for its own doctrine; nothing here governs it.

Source project
Atlas Project
Snapshot
02260d7e
Source paths
  • src/witness/protocol/
  • src/witness/core/
  • src/witness/storage/
  • src/witness/sdk.ts
  • src/witness/README.md
  • src/witness/__tests__/
Harvested
2026-09-10
Evidence standing
known
Predecessor
unknown
Supersedes
nothing
Superseded by
unknown

Compatibility and state

Compatible targets
Atlas
Runtime needs
Witness protocol; Witness core; Witness storage adapter; Witness SDK
Dependencies
  • Witness protocol installation — required · Not portable. In a target without Witness the skill stops and routes to provenance-guardian.
Tests
structural-and-fixtures-passing (last verified 2026-09-10)
Content hash
pending_export
Consumers
not_searched — No activation survey has been performed across target projects.
Transformation
Deliberately NOT generalised. Atlas-specialised by declaration rather than marketed as portable. Incompatible targets are declared in agents/openai.yaml and here.

Files in the artifact

  • SKILL.md
  • agents/openai.yaml

Agent metadata

display_name: Witness Integrator
summary: Integrates the Witness tamper-evident capture protocol into a new surface without breaking chain integrity or overstating what it proves.
category: evidence
artifact_class: skill
artifact_portability: project-specific
requires:
  - Witness protocol, core, storage adapter and SDK present in the target project
incompatible_targets:
  - generic
  - harmony-hub
  - htc-hub
when_to_use:
  - Adding tamper-evident capture to a surface in a Witness-equipped project
  - Reviewing an existing Witness integration for chain or verification defects
when_not_to_use:
  - The project has no Witness installation - use Provenance Guardian
  - The need is ordinary document provenance rather than tamper-evidence

SKILL.md

Witness Integrator

Dependency declaration, read first. This skill requires an existing Witness installation: the protocol definition, core, storage adapter and SDK. It is Atlas-specialised and is not portable to a project without them. In a target whose profile reports witnessProtocol: "absent", stop and say so — do not reimplement Witness, and do not approximate it with hashes bolted onto an upload form. A partial implementation of a tamper-evident chain is worse than none, because it produces evidence that looks verifiable and is not.

Confirm before proceeding:

rg -l "witness" src/witness/protocol src/witness/core src/witness/storage src/witness/sdk.ts

If those paths do not exist, this skill does not apply. Report inaccessible or absent and route the provenance requirement to provenance-guardian, which is portable.

Hard rules

  • Never write to Witness storage directly. Go through the SDK. Direct writes bypass chain construction and silently break verification.
  • Never re-hash or re-encode a capture after it enters the chain.
  • Never backfill a capture into the past. Late arrival is recorded as late arrival: occurred_at and recorded_at both, honestly.
  • A broken chain is reported, never repaired. Repair destroys the only signal that something went wrong.
  • Verification result is displayed, not assumed. A surface that shows captures without their verification state is misrepresenting evidence.
  • Capture identity and subject identity are separate. The capture is evidence about the subject; it is not the subject.

What Witness provides, and what it does not

Provides: tamper-evidence. You can tell whether a capture has changed since it entered the chain, and where it sits in the chronology.

Does not provide: proof that the capture is true, that the device was not pointed at the wrong thing, or that the operator was honest. Never describe Witness output as proof of fact. It is proof of integrity. Saying more than that in a UI label is the most damaging mistake available here.

Integration procedure

  1. Confirm the dependency as above. Record the Witness version in use.
  2. Name the capture type and what it is evidence of. If you cannot say what claim it substantiates, the surface does not need Witness.
  3. Establish capture identity at the moment of capture, before any processing: capture id, subject reference, capture type.
  4. Record source and device identity where applicable — operator, device, application version, and, where the protocol supports it, the capture conditions. Where device identity is unavailable, type it (unknown, inaccessible), never omit the field.
  5. Submit through the SDK so the chain link is constructed by the protocol. Never construct a link by hand.
  6. Preserve chronology. Captures are ordered by the chain, not by row insertion order and not by a client clock. Do not sort a captures view by created_at and present it as the chain order.
  7. Draw the transformation boundary. Anything derived from a capture — a crop, a transcript, an OCR pass, a thumbnail — is a derivative, lives outside the chain, and links back to the capture id. It never re-enters the chain as if it were an original. This is where provenance-guardian takes over.
  8. Verify on read, and surface the result: verified, unverified, chain broken, or verification unavailable. Four states, all visible. Never collapse them to a green tick.
  9. Handle failure. Verification service down → verification_unavailable, and the surface must not imply verification succeeded.

Worked example

Request: "add photo evidence to the inspection screen."

  1. Dependency. Witness present in this target. Version recorded.
  2. Capture type. inspection_photo, evidence for the claim "this defect existed at this property at this time".
  3. Identity. capture id issued at shutter; subject = the inspection reference, not the property directly — the property link travels through the inspection.
  4. Device. Operator user reference plus device id from the SDK. On a desktop upload where no device identity exists, device: { state: "unknown" } — the capture is still admissible, but its standing is visibly weaker.
  5. Submission. SDK call; chain link returned; nothing written to storage by the feature code.
  6. Derivatives. The screen shows a thumbnail. The thumbnail is generated outside the chain, is labelled derived, and links to the capture id. Clicking it retrieves the original from Witness, not the thumbnail source.
  7. Display. Each photo shows its verification state. A photo whose chain is broken renders with that stated plainly — it stays visible, because hiding it would destroy the evidence that tampering occurred.

Pressure tests

  • Can any code path write a capture without the SDK? Trace every write.
  • What does the surface show when verification fails, and could a viewer mistake it for success?
  • Does any derived artifact re-enter the chain as an original?
  • Is the displayed order the chain order, or a database sort?
  • If a capture arrives three days late, is that distinguishable from a capture taken three days ago?
  • Does any label claim the capture proves the underlying fact rather than its own integrity?

Stop conditions

  • Witness is absent from the target — stop; do not approximate it.
  • The requirement is generic provenance, not tamper-evidence — use provenance-guardian instead; Witness is heavier and has real dependencies.
  • The design would repair, regenerate or hide a broken chain.
  • Captures would be mutable after submission.
  • The surface cannot display verification state.