From 9072bec8dced227a4f6e0f271530bb1e94185b15 Mon Sep 17 00:00:00 2001 From: okash1n <48118431+okash1n@users.noreply.github.com> Date: Fri, 12 Jun 2026 14:41:20 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20user-*=20=E5=90=8D=E5=89=8D=E7=A9=BA?= =?UTF-8?q?=E9=96=93=E3=82=92=E5=80=8B=E4=BA=BA=E8=A8=AD=E5=AE=9A=E7=94=A8?= =?UTF-8?q?=E3=81=AB=E4=BA=88=E7=B4=84=EF=BC=88v0.71.1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kit は rules/user-*.md 等を配布しない規約を CLAUDE.md に明文化し CI で強制。 個人の常時ロードルールを ~/.claude/rules/user-*.md に置いた場合の update 時無確認上書きを構造的に防止する --- CHANGELOG.md | 5 +++++ CLAUDE.md | 1 + tests/unit/test-content-cleanup.sh | 10 ++++++++++ 3 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6dd432..16538b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/). +## [0.71.1] - 2026-06-12 + +### Added +- **`user-*` 名前空間の予約を規約化**: kit は `rules/user-*.md` 等の `user-*` 名のファイルを配布しないことを CLAUDE.md の Key Conventions に明文化し、CI テストで強制。ユーザーが個人の常時ロードルールを `~/.claude/rules/user-*.md` に置いても、将来の kit 更新で同名配布による無確認上書き(`_update_file()` は snapshot のない kit 新規ファイルを確認なしでコピーする)が起きないことを保証する + ## [0.71.0] - 2026-06-12 v0.57.0〜v0.70.0 の累積差分に対する multi-agent 通しレビュー(8 次元 + 14 Issue 受け入れ照合 + 敵対的検証)のフォローアップ(#138)。 diff --git a/CLAUDE.md b/CLAUDE.md index 8aa4021..c1a0167 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -191,6 +191,7 @@ Rules to remember: verify fresh install, `setup.sh --update`/`/update-kit`, and - **Prerequisites auto-install**: The main setup flow requires `git`, `jq`, `curl`, GNU `sed`, GNU `awk`, `bash 4+`, `node`, `tmux`, and `gh`. Stage 1 bootstrap (`wizard/wizard.sh`, `lib/colors.sh`, `lib/detect.sh`, `lib/prerequisites.sh`) remains Bash 3.2 compatible so the kit can auto-install or detect Bash 4+ and re-exec before Stage 2 (`declare -A`, `readarray`, etc.). Only show manual install commands after automatic installation fails. - **Variable naming**: `ENABLE_*` (feature toggles), `INSTALL_*` (component flags), `STR_*` (i18n strings), `_*` prefixed functions (private/internal) +- **Reserved user namespace**: the kit MUST NOT ship files matching `rules/user-*.md` (or `user-*` trees under other managed dirs). Users place personal always-loaded rules there; `_update_file()` would silently overwrite a same-named user file on update because a kit-new file has no snapshot baseline. - **Boolean handling**: `_bool_normalize()` accepts true/1/yes/on → "true". Use `is_true()` for checks. - **No eval**: All dynamic variable assignment uses `printf -v` and `${!var}` (indirect expansion) to prevent injection. - **Ghostty detection**: Use `[[ -x "/Applications/Ghostty.app/Contents/MacOS/ghostty" ]]` to detect Ghostty. Never use `-d "/Applications/Ghostty.app"` or `command -v ghostty` (both produce false positives). diff --git a/tests/unit/test-content-cleanup.sh b/tests/unit/test-content-cleanup.sh index c2626b8..9f07eee 100644 --- a/tests/unit/test-content-cleanup.sh +++ b/tests/unit/test-content-cleanup.sh @@ -110,3 +110,13 @@ fail "$test_name" fi } + +{ + test_name="content-cleanup: kit never ships files in the reserved user-* namespace" + if ! find "$PROJECT_DIR/rules" "$PROJECT_DIR/agents" "$PROJECT_DIR/commands" "$PROJECT_DIR/skills" \ + -name 'user-*' -print 2>/dev/null | grep -q .; then + pass "$test_name" + else + fail "$test_name" + fi +}