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.

Think
91m
Plan
35m
Build
21m
Verify
6m

Assertion ledger

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

IDSaysMatcher
A001Re-initializing replaces a customized Claude agent's instructions with the current versionverifiedok
A002Re-initializing replaces a customized Codex agent's instructions with the current versionverifiedok
A003Each AI tool keeps its own version of the agent that differs between toolsverifiedok
A004A customer's chosen model for a Claude agent survives re-initializingverifiedok
A005A customer's Codex model, sandbox, and reasoning settings survive re-initializingverifiedok
A006Codex agent identity and instruction-pointer fields are refreshed to the current versionverifiedok
A007Re-initializing refreshes CLAUDE.md to the current templateverifiedok
A008Refreshed CLAUDE.md still shows the project's name and detected stackverifiedok

Findings 6 total

debtpackages/cli/tests/commands/init/template-propagation.test.tsscope
`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.tsscope
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.tsmonitor
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.tsscope
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.tsmonitor
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