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.
Think4m
Plan6m
Build9m
Verify4m
Assertion ledger
15 claims, each independently verified. Showing 8 — show all →
| ID | Says | Matcher | |
|---|---|---|---|
| A001 | Resolves counting runs once before the output branch, not duplicated | verified | ok |
| A002 | JSON output includes resolves_claims when upstream findings resolve prior issues | verified | ok |
| A003 | Console output shows resolution claim count when upstream findings resolve prior issues | verified | ok |
| A004 | The startWork resume path reads the branch name using getCurrentBranch | verified | ok |
| A005 | Empty audit matrix values are defined once as a shared constant | verified | ok |
| A006 | Both empty audit paths use the shared constant instead of inline objects | verified | ok |
| A007 | pullBeforeRead is exported from the git utilities module | verified | ok |
| A008 | commitAndPushProofChanges is exported from the git utilities module | verified | ok |
Findings 5 total
obspackages/cli/src/commands/proof.ts→ closed
EMPTY_AUDIT_MATRIX is a mutable shared object — not frozen, callees could theoretically mutate it
obspackages/cli/src/commands/proof.ts→ closed
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
obs→ closed
Proof context finding upstream-finding-resolution-C1 (duplicated resolves counting) is now resolved by this build
obs→ closed
Proof context finding kind-aware-branch-prefixes-C6 (HEAD-reading duplication) is now resolved by this build
debtpackages/cli/src/utils/git-operations.ts→ closed
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