Template Propagation — Lock-Stock Refresh of Machine-Owned Templates on Re-init
**The disease, in one sentence:** machine-owned template content (agent definitions, CLAUDE.md) can never reach existing customers, because re-init conservatively skips every file that already exists — it cannot tell an untouched stock template from a user-customized one, so it preserves all of them and refreshes none.
verdict PASSscore 30 / 30findings 6 (0 risk · 3 debt · 3 obs)duration 2h 51mrejection cycles 0shipped Jun 6, 2026
Pipeline timeline
Intent to proven code in 2h 51m across Think, Plan, Build, and Verify.
Think91m
Plan35m
Build21m
Verify6m
Assertion ledger
30 claims, each independently verified. Showing 8 — show all →
| ID | Says | Matcher | |
|---|---|---|---|
| A001 | Re-initializing replaces a customized Claude agent's instructions with the current version | verified | ok |
| A002 | Re-initializing replaces a customized Codex agent's instructions with the current version | verified | ok |
| A003 | Each AI tool keeps its own version of the agent that differs between tools | verified | ok |
| A004 | A customer's chosen model for a Claude agent survives re-initializing | verified | ok |
| A005 | A customer's Codex model, sandbox, and reasoning settings survive re-initializing | verified | ok |
| A006 | Codex agent identity and instruction-pointer fields are refreshed to the current version | verified | ok |
| A007 | Re-initializing refreshes CLAUDE.md to the current template | verified | ok |
| A008 | Refreshed CLAUDE.md still shows the project's name and detected stack | verified | ok |
Findings 6 total
debtpackages/cli/tests/commands/init/template-propagation.test.ts→ scope
`tools` config-key preservation is untested — CLAUDE_AGENT_CONFIG_KEYS includes 'tools' but no test sets a tools frontmatter key and asserts it survives re-init; only `model` (A004) is exercised
debtpackages/cli/tests/commands/init/template-propagation.test.ts→ scope
CLAUDE.md overwrite-of-a-user-edit is not directly tested — A007 is verified only by presence of interpolation; no test mutates CLAUDE.md body then proves re-init resets it to stock
obspackages/cli/src/commands/init/assets.ts→ monitor
atomicWriteFile SHA-256 integrity-failure branch (hash mismatch throw + temp cleanup) is untested — A011 is verified only indirectly via a passing happy-path write
debtpackages/cli/tests/commands/init/template-propagation.test.ts→ scope
Changed-files warning test (A014) does not assert the exact set — it checks ana-build.md present and CLAUDE.md absent, but an unchanged agent erroneously appearing in the warning would not be caught
obspackages/cli/src/commands/init/index.ts→ monitor
Refresh-warning git-recovery hint hardcodes '.claude/agents/ana-build.md' regardless of which files changed — a Codex-only user, or one whose only change was CLAUDE.md, gets a Claude-path example. Echoes the hardcoded-'.claude/'-path pattern of gitignore-disclosure-and-hardening-C1
+1more findings
Integrity seal
scopesha256:491958647be4e...
contractsha256:4680e8e4e2139...
plansha256:afdc643f48a4b...
specsha256:6031804f3ff90...
build-reportsha256:cba7b4b7d6963...
build-datasha256:f66eed1394873...
verify-reportsha256:6eb23d533b15e...
verify-datasha256:f75e791cfd5ea...
audit cmd$ ana proof audit template-propagation → all hashes match