chore: user-* 名前空間を個人設定用に予約(v0.71.1)#141
Merged
Merged
Conversation
kit は rules/user-*.md 等を配布しない規約を CLAUDE.md に明文化し CI で強制。 個人の常時ロードルールを ~/.claude/rules/user-*.md に置いた場合の update 時無確認上書きを構造的に防止する
There was a problem hiding this comment.
Pull request overview
This PR reserves the user-* namespace so users can safely store personal always-loaded rules as ~/.claude/rules/user-*.md without risk of future kit updates overwriting them.
Changes:
- Document the reserved
user-*namespace constraint inCLAUDE.mdKey Conventions. - Add a unit test ensuring the kit repo does not contain
user-*entries under managed content roots. - Add a
0.71.1changelog entry describing the convention + CI enforcement.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/unit/test-content-cleanup.sh | Adds a unit test to enforce absence of user-* in shipped content directories. |
| CLAUDE.md | Documents the reserved user-* namespace policy and the rationale (prevent silent overwrite on update). |
| CHANGELOG.md | Records the new convention and the CI test enforcement in v0.71.1. |
Comment on lines
+114
to
+122
| { | ||
| 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 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
個人のグローバル設定を
~/.claude/CLAUDE.mdのユーザーセクションではなく~/.claude/rules/user-*.md(ユーザー所有ファイル)として置く運用を安全にするため、kit 側でuser-*名前空間を予約する。背景
retired 掃除(_remove_retired_managed_files)は manifest 記載の kit 配布ファイルしか触らないためユーザーファイルは安全だが、kit が将来同名ファイルを配布した場合は
_update_file()が「snapshot なし = kit 新規ファイル」とみなして無確認で上書きする。命名規約の予約でこの衝突を構造的に排除する。変更内容
rules/user-*.md(および他の managed ディレクトリのuser-*)を配布しない」を追加user-*不在を検証するテストを追加(unit 349/349)ドキュメント + テストのみのため patch(0.71.1)。