augment research
foundry
ARF Provenance Engine

Protocol reference / ARF v1

The ARF provenance record

A coding agent asks to update a release branch. ARF checks the agent’s grant against the operation and its target. If policy calls for human review, the operator sees the request and can approve or deny it. The executor sends the authorized change. A read of the branch shows which revision reached the repository. The ledger writer signs the records a reviewer needs to trace that revision back to the request.

The signed wrapper

Field JSON type Meaning
event object The v1 event. The persisted native record retains its exact canonical bytes.
leaf_hash string SHA-256 with the leaf domain byte, written as 64 lowercase hexadecimal characters.
key_id string Identifier for the key used to sign the event.
signature string 128 lowercase hexadecimal characters containing the 64-byte Ed25519 signature.

Each line contains exactly these four fields. The reader rejects an unknown field in either the wrapper or the event. The event’s payload holds source-specific evidence.

Every event field

The writer assigns an event ID, sequence, recording time and signing identity. Read events in sequence order. Two events can have the same wall-clock time.

Field Type and presence Definition
schema string, required Writer emits arf.dev/event/v1.
event_id string, required Ledger-assigned UUIDv7.
sequence u64 integer, required Monotonic ledger order.
ts string, required Ledger-assigned RFC 3339 timestamp.
agent closed enum, required claude-code, codex, gemini, antigravity, human, arf, unknown.
agent_identity string, required Identity key ID assigned by the writer.
source string, required Open source identifier, such as a capture surface name.
source_role closed enum, required primary or backstop.
source_event string or null, optional Native event name when supplied. Writer emits null when absent; serde readers also accept omission.
session_id string or null, optional Session correlation. The writer emits null when empty. The reader also accepts omission.
turn_id string or null, optional Turn correlation. The writer emits null when empty. The reader also accepts omission.
project_id string or null, additive Option Optional tenant context. Omitted when absent. Readers accept null or omission.
user_id string or null, additive Option Optional tenant context. Omitted when absent. Readers accept null or omission.
parents array of strings or null, additive Option Ledger graph references. If present, empty means genesis, one is a linear parent, and two or more sorted unique references define a merge frontier. Absent means legacy implicit previous record. Omitted when absent.
grant_ref string or null, additive Option Reference to the authorizing grant node. Omitted when absent.
submitted_by string or null, additive Option Verified submitting surface key ID. Omitted when absent.
submission_id string or null, additive Option Durable idempotency reference. Omitted when absent.
kind closed enum, required One of the event kinds listed below.
tool_name string or null, optional Tool associated with the event. Writer null when absent. Readers accept omission.
tool_input any JSON value or null, optional Structured tool input. Writer null when absent. Readers accept omission.
tool_response any JSON value or null, optional Structured tool response. Writer null when absent. Readers accept omission.
decision closed enum or null, optional allow, deny, ask, defer, hold. Null means this event was not an enforcement point.
decision_reason string or null, optional Reason associated with the decision.
hold_state any JSON value or null, optional Verbatim hold state when the decision is hold.
cwd string or null, optional Working directory context.
payload_hash string, required SHA-256 hex binding the original governed bytes. The field is distinct from the event leaf hash.
payload any JSON value or null, optional Structured event evidence. Writer null when absent. Readers accept omission.
speculative boolean, required Marks uncertain source attribution or observation.

The writer fills the original optional fields with JSON null when they have no value. It omits six later additions when empty. These are project_id, user_id, parents, grant_ref, submitted_by and submission_id. Readers accept both an omitted optional field and an explicit null. The downloadable schema describes the reader and includes the writer’s field lists.

Closed event kinds

prompt, tool_call, tool_result, tool_failure, session_start, session_end, subagent_start, subagent_end, turn_start, turn_end, file_change, ref_update, policy_decision, permission_request, config_change, hook_install, hook_removal, hook_disable, policy_hash_change, key_rotation, anchor, enrollment, revocation, compact, notification, AUDIT_GAP, merge, authority_grant.

Canonical bytes, signatures and hashes

The writer serializes the event once using RFC 8785 JSON Canonicalization Scheme (JCS). Those exact bytes are retained in the signed record, hashed as a leaf, and signed with Ed25519. The leaf is SHA-256(0x00 || event_bytes). An interior Merkle node is SHA-256(0x01 || left_32_bytes || right_32_bytes). The different prefix bytes keep leaf and interior-node inputs in separate hash domains.

A verifier extracts the exact bytes of the event value from the stored line. It looks up the signer in the trust record, checks the signature over those bytes, recomputes the leaf and walks the parent references in sequence. Indenting the event changes its signed bytes. The inspector formats a copy for reading and keeps the download in its original line format.

Each capture source defines its payload. A source may bind its original bytes; payload_hash commits the source-specific payload. The event’s leaf hash also covers the writer’s metadata, parent references and payload digest.

Trace an agent’s action

Start at the repository observation and look for the revision it names. Find the executor’s tool call for that branch and the policy decision that let it proceed. If an operator approved the request, check which target and change they saw. A later push to the same branch may have come from a different worker.

Use session_id and turn_id when present to find related records. Follow event.parents by leaf hash to trace the signed ledger history. To find what prompted a particular action, look for the decision or request reference in the producer’s payload. Two events next to each other in the ledger can belong to different jobs.

Try it in the Decision Press

Open the release example and stamp an action. Its Receipt Tray draws the graph from the same signed events you can download as JSONL. The browser creates a signing key for the run. Its identifier uses the first 80 bits of SHA-256 over the raw public key, encoded in lowercase Base32.

  1. Use each leaf_hash as the node’s identity. The short label, such as E014, comes from the example-specific event.payload.press.id field.
  2. Draw an arrow from each hash in event.payload.causes to the current leaf. The short IDs in press.parents name those same events in the same order. A finding can have two parents when both a test and a reviewer contributed to it.
  3. Switch to ledger order by drawing the references in event.parents. This sample run has one writer, so its records form a chain even when the work itself branched.
  4. Read the operator.request deadline and default together with the response. A click records operator.response. An elapsed deadline records operator.timeout. Both lead to a recorded decision.
  5. Follow a denial to run.end or run.restricted. A restriction names every remaining permitted step and the steps cancelled. File events carry the path and the before- and after-images for that operation.

The JSONL download contains the records shown in the tray. Save the public key file with it for independent verification.

Six signed native records

The native ARF policy-action command dispatched three notify actions to numbered test targets. In the first record, payload.action_id names the dispatch. In the next, payload.unfulfilled.action_id names that same action. Its reason says no signed result came back. The same pair appears for the other two targets. The native reader verified all six signatures and their lineage.

Download six-record JSONLDownload public trust fileRead verifier outputDownload v1 JSON Schema

provenance: ok (6 signed events verified: signatures + sequence + lineage)

Trust and observation source

A capture surface signs the observation it submits. ARF assigns the event ID and sequence, records the observation under its own signing identity, and issues a signed receipt. The resulting chain identifies who submitted the observation, who accepted it and which ledger includes it.

An enrolled public key tells a verifier whose signature to accept. An independent witness can keep a signed tree head. Comparing a later export with that earlier head gives an auditor evidence of continuity across the two observations.

Read how file bytes, change events and restorable evidence fit together.