c0a6b6a465
update.sh 原把 pre-write-guard.sh 列在無條件覆蓋區,會用模板空殼 無聲蓋掉下游已客製的 guardrail,且 update_file 無 .bak 備份。 改法(issue 方案 1):新增 keep_with_template()——原檔永不覆蓋, 最新模板版另存 pre-write-guard.template.sh 旁邊,結尾印 diff 指令供採納。 首次安裝(原檔不存在)才走 update_file 抓本體。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>