Command File Duplication Cleanup

Clean up duplicated and misplaced logic in work.ts and proof.ts — the two largest command files (~2500 and ~2400 lines). Four extractions plus one module move. All pure refactors, zero behavior changes.

verdict PASSscore 15 / 15findings 5 (0 risk · 1 debt · 4 obs)duration 32mrejection cycles 0shipped May 21, 2026surface cli

Pipeline timeline

Intent to proven code in 32m across Think, Plan, Build, and Verify.

Think
4m
Plan
6m
Build
9m
Verify
4m

Assertion ledger

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

IDSaysMatcher
A001Resolves counting runs once before the output branch, not duplicatedverifiedok
A002JSON output includes resolves_claims when upstream findings resolve prior issuesverifiedok
A003Console output shows resolution claim count when upstream findings resolve prior issuesverifiedok
A004The startWork resume path reads the branch name using getCurrentBranchverifiedok
A005Empty audit matrix values are defined once as a shared constantverifiedok
A006Both empty audit paths use the shared constant instead of inline objectsverifiedok
A007pullBeforeRead is exported from the git utilities moduleverifiedok
A008commitAndPushProofChanges is exported from the git utilities moduleverifiedok

Findings 5 total

obspackages/cli/src/commands/proof.tsclosed
EMPTY_AUDIT_MATRIX is a mutable shared object — not frozen, callees could theoretically mutate it
obspackages/cli/src/commands/proof.tsclosed
proof.ts imports pullBeforeRead and commitAndPushProofChanges from git-operations.ts but only uses them as pass-through calls — no local usage justifies the import beyond maintaining the existing call sites
obsclosed
Proof context finding upstream-finding-resolution-C1 (duplicated resolves counting) is now resolved by this build
obsclosed
Proof context finding kind-aware-branch-prefixes-C6 (HEAD-reading duplication) is now resolved by this build
debtpackages/cli/src/utils/git-operations.tsclosed
Pre-existing lint warning at git-operations.ts:198 (unused eslint-disable directive) — 10+ verify cycles old, not introduced by this build

Integrity seal

scopesha256:d7ac9c2fd734a...
contractsha256:493324dfc0c77...
plansha256:6608a8705453a...
specsha256:403cebe21b5ff...
build-reportsha256:6c22e72228c7a...
build-datasha256:cd2f6ca57b50a...
verify-reportsha256:31a6e4addcdf5...
verify-datasha256:93017ae4c2ae9...
audit cmd$ ana proof audit command-duplication-cleanup   → all hashes match