Skip to main content

Run artifacts and export

What a run writes​

Every run creates runs/<run-id>/ (or wherever work_record.output_dir / --output-dir points) and fills it with, at minimum, the files below. The exception is a run refused before it starts — no WRIT_ROOT_KEY with --production, a paid mission with no positive budget.total_sats, or a model.endpoint the URL guard refuses. That run creates no directory and writes no files; the refusal is printed instead.

FileWhat it is
Named step outputs (e.g. dossier.md, infra.json)Whatever each step's output: field named.
work-record.jsonlThe signed, hash-chained receipt chain: one JSON object per line, one per completed capability call.
run.jsonA machine-readable run summary: outcome, spend, receipt count, chain head, signer info, model provider.
report.htmlA human-readable report of the same information.
usage.jsonModel token/cost usage. Written wherever run.json is, with zero totals when no model call reported usage (see the manifest reference for which providers report it).
writ.dbThe run's private SQLite database: the ledger, credentials, and audit trail. Never exported.
progress.jsonlThe run's progress journal, which writ resume reads to continue the run.
run.lockThe lock that keeps a second writ run or writ resume process out of this run while one holds it.
signer-identity.json, rotations.jsonl, revocations.jsonlCopied in when the run used key-file or env signing: see Keys and verification.
head-attestation.jsonPresent after writ record publish-head.

Private by default​

Everything under runs/<run-id>/ can carry capability responses and model output that contain private business data. Writ creates the runs root, every run directory, and every file in it owner-only: 0700 directories and 0600 files on Linux and macOS, and on Windows an access control list with inheritance removed that grants only the current user. If the file system can't express the restriction, Writ prints a warning to stderr and continues; a completed run is never turned into a failed one over a permissions error.

Sharing a run is therefore a deliberate action.

writ record export​

Without --out, record export prints the signed chain (work-record.jsonl) to stdout, one receipt per line, for piping into another tool.

With --out <dir>, it writes a shareable bundle with ordinary file permissions. The bundle holds what a recipient needs to verify the run, and leaves the private working data out. For the key-signed run in Keys and verification:

$ writ record export keyed-demo-20261117-002151-f665d63865054f42a2bdc7b8c21c7a32 --out share-bundle
Exported run 'keyed-demo-20261117-002151-f665d63865054f42a2bdc7b8c21c7a32' to <your directory>/share-bundle
work-record.jsonl (1504 bytes, sha256 fa86bd0a321fab11f05de3add6c78c3c1837d2091ffa89ad200ee651ed8cd8c8)
run.json (2115 bytes, sha256 75baefa915634c7c24bde4744ad36123eed0f76c867b17df02f2a255f45f6ea5)
report.html (3776 bytes, sha256 b17704f88a3431762f97ae5219c1a28cb6d5330c0f39936a2ec9b67e40f18b38)
usage.json (182 bytes, sha256 e230184836060050d94f7016905ac25349993f830db241a16e2379a6737d2cae)
signer-identity.json (531 bytes, sha256 a7e7fefe3d966d03e2e2685516f1376bb3248600245affa9364bdb46231d2a07)
manifest.json
Chain head: 0:526ba45c4d925e41bb7845bc2910150a2994e9367cc6537298adac7d074b4c3a (1 receipts).
Not included (never exported): writ.db and its sidecars, key material, and step outputs.
Recipient check: writ verify <this directory> --pubkey <signer pubkey hex> --expect-head 0:526ba45c4d925e41bb7845bc2910150a2994e9367cc6537298adac7d074b4c3a

The bundle contents​

FileWhat it is
work-record.jsonlThe signed receipt chain.
run.jsonThe machine summary, with the signed terminal commitment writ verify checks the chain's end against.
report.htmlThe human-readable report.
usage.jsonModel usage.
signer-identity.jsonThe signer's public identity record, for a run signed with key-file or env.
rotations.jsonl, revocations.jsonlThe signer's rotation and revocation records, when the run has them.
manifest.jsonEvery other file's name, size, and SHA-256, the chain head, and the recipient's writ verify command.

manifest.json lists exactly the files the bundle holds:

{
"runId": "keyed-demo-20261117-002151-f665d63865054f42a2bdc7b8c21c7a32",
"exportedAt": "2026-11-17T00:22:10.5399381+00:00",
"tool": "writ record export",
"receiptCount": 1,
"chainHead": {
"sequence": 0,
"hash": "526ba45c4d925e41bb7845bc2910150a2994e9367cc6537298adac7d074b4c3a"
},
"files": [
{"name": "work-record.jsonl", "bytes": 1504, "sha256": "fa86bd0a..."},
{"name": "run.json", "bytes": 2115, "sha256": "75baefa9..."},
{"name": "report.html", "bytes": 3776, "sha256": "b17704f8..."},
{"name": "usage.json", "bytes": 182, "sha256": "e2301848..."},
{"name": "signer-identity.json", "bytes": 531, "sha256": "a7e7fefe..."}
],
"verify": "writ verify <this directory> --pubkey <signer pubkey hex> --expect-head 0:526ba45c4d925e41bb7845bc2910150a2994e9367cc6537298adac7d074b4c3a"
}

Never included: writ.db and its sidecar files (the ledger, credentials, and internal audit trail), any private key material, and the step outputs (dossier.md, lookup.json, and so on). The bundle carries the evidence, not a copy of the run's private working data.

The recipient's check​

A recipient verifies the bundle directory with the bundle and the signer's public key, and no access to your systems. Give them the public key separately, through a channel they already trust (for example, the output of writ keys show sent to them directly), never only inside the bundle they are checking:

$ writ verify share-bundle --pubkey 1f9a25988803ebda461fc30b4e29f9149b94b95d4c2d885179ab7ce082b214ca
OK — verified 1 receipt(s).
Chain head: 0:526ba45c4d925e41bb7845bc2910150a2994e9367cc6537298adac7d074b4c3a
Terminal commitment verified — this export cannot be truncated undetected.
Signed by Example Operator (https://operator.example) <ops@operator.example>, key 48d196ae736139f2 — identity record verified and bound to the chain.

For a dev-ephemeral run, add --signer-mode dev-ephemeral; verify then warns that the record is not production evidence.

Next steps​