fix: update.sh 不再覆蓋客製 pre-write-guard.sh(issue #3)+ bump 1.3.1

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>
This commit is contained in:
2026-06-25 20:47:46 +08:00
parent ba247428a8
commit c0a6b6a465
3 changed files with 51 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
1.3.0
1.3.1