anatrace-core integration (provenance swap + behavioral attestation)

Replace Anatomia's hand-rolled transcript forensics with the published `anatrace-core` package, then build a behavioral-attestation layer on top of it. In the user's words: "properly use and test anatrace within anatomia... use the real anatrace package, test it, and even expand what we currently do by leveraging anatrace."

verdict PASSscore 26 / 26findings 13 (0 risk · 5 debt · 8 obs)duration 3h 15mrejection cycles 0shipped Jun 14, 2026surface cli

Pipeline timeline

Intent to proven code in 3h 15m across Think, Plan, and 2 Build→Verify phases.

Think
34m
Plan
23m
Build 1
75m
Verify 1
7m
Build 2
36m
Verify 2
11m

Assertion ledger

26 claims, each independently verified. Showing 8 — show all →

IDSaysMatcher
A001Provenance counts come from the published anatrace engine, pinned to a known versionverifiedok
A002Anatomia no longer hand-parses agent transcriptsverifiedok
A003Each provenance record states which engine version produced itverifiedok
A004Deriving the same session twice produces an identical recordverifiedok
A005A captured session records a fingerprint of the transcript it was derived fromverifiedok
A006An unreadable transcript still records who ran, never guessed numbersverifiedok
A007Older proof records written before this change still loadverifiedok
A008Codex sessions now report the files they changedverifiedok

Findings 13 total

debtpackages/cli/tests/commands/proof-card-golden.test.tsmonitor
Golden snapshot fixture INPUTS were changed (cache_read 80k→1M, 900k→1M; model gpt-5-codex→gpt-5) to keep the card within 80 columns once the wider real table-version label is shown — so the golden test no longer proves cost-invariance for unchanged inputs.
obspackages/cli/src/utils/forensics.tsmonitor
captureProvenanceAtSave no longer calls deriveTranscript — it re-reads bytes and calls deriveCountsFromBytes directly so the transcript_hash attests the same bytes (read-once). deriveTranscript is now reachable only from tests. Intentional, but the read-bytes+basename+derive sequence is duplicated across the two functions.
debtpackages/cli/src/utils/forensics.tsmonitor
AC13 totality (a core call throwing mid-capture must not break the save) has no explicit test that forces parseSession/deriveCounts to throw. Covered structurally by the outer try/catch in captureProvenanceAtSave and by the unreadable-transcript omit test, but not directly exercised.
obspackages/cli/tests/commands/work-proof-process.test.tsacknowledge
Stray indentation in the prov() shape helper: derive_version sits at 6 spaces while sibling keys are at 8. Lint passes (eslint indent not enforced inside this object literal) but it is inconsistent with the file.
obsclosed
parseTestCounts best-effort regex (session-capture-C12) is resolved: the helper is deleted and test/failure counting is delegated to anatrace-core's command-tool-gated derive. Codex files_touched=0 build concern is also resolved (A008 now derives from a real patch_apply_end body).
+8more findings

Provenance

Who ran what, and what it cost. Recomputable estimates from the shared price table — subordinate to the verdict, never gating.

model claude-opus-4-8
sessionturnstoolsinoutcachecost
ana118506.9k64.7k5.0M$5.15
plan85366.7k92.0k3.8M$5.34
build27012513.9k127.2k19.0M$14.16
verify68296.4k22.9k1.6M$1.97
build 229515010.5k110.1k19.6M$15.08
verify 276346.5k23.6k1.5M$1.83
TOTAL 6 sessions$43.53 (table 2026-06-14)
churn 25 files · +1648/−522
completeness ✓ complete (plan 1/1 · build 2/2 · verify 2/2)

Integrity seal

scopesha256:e52c193b8c21e...
contractsha256:59f34b3847157...
plansha256:f37f61b5a1682...
spec-1sha256:62b72a2bb2d97...
spec-2sha256:385d24894d461...
spec-3sha256:1903173ce13f8...
build-report-1sha256:a5e3830f27fe9...
build-data-1sha256:ce5198342dce1...
verify-report-1sha256:2468292d62463...
verify-data-1sha256:6f7ce7af07ef6...
build-report-2sha256:7cf9f05a2fe98...
build-data-2sha256:252222dab95f8...
verify-report-2sha256:d1ac9654bb249...
verify-data-2sha256:3e19da5c10cb5...
audit cmd$ ana proof audit anatrace-core-integration   → all hashes match