Skip to content

chore: user-* 名前空間を個人設定用に予約(v0.71.1)#141

Merged
okash1n merged 1 commit into
mainfrom
chore/reserve-user-rules-prefix
Jun 12, 2026
Merged

chore: user-* 名前空間を個人設定用に予約(v0.71.1)#141
okash1n merged 1 commit into
mainfrom
chore/reserve-user-rules-prefix

Conversation

@okash1n

@okash1n okash1n commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

概要

個人のグローバル設定を ~/.claude/CLAUDE.md のユーザーセクションではなく ~/.claude/rules/user-*.md(ユーザー所有ファイル)として置く運用を安全にするため、kit 側で user-* 名前空間を予約する。

背景

retired 掃除(_remove_retired_managed_files)は manifest 記載の kit 配布ファイルしか触らないためユーザーファイルは安全だが、kit が将来同名ファイルを配布した場合_update_file() が「snapshot なし = kit 新規ファイル」とみなして無確認で上書きする。命名規約の予約でこの衝突を構造的に排除する。

変更内容

  • CLAUDE.md の Key Conventions に「kit は rules/user-*.md(および他の managed ディレクトリの user-*)を配布しない」を追加
  • tests/unit/test-content-cleanup.sh に rules/agents/commands/skills 配下の user-* 不在を検証するテストを追加(unit 349/349)

ドキュメント + テストのみのため patch(0.71.1)。

kit は rules/user-*.md 等を配布しない規約を CLAUDE.md に明文化し CI で強制。
個人の常時ロードルールを ~/.claude/rules/user-*.md に置いた場合の
update 時無確認上書きを構造的に防止する
Copilot AI review requested due to automatic review settings June 12, 2026 05:41
@okash1n okash1n merged commit 83f191c into main Jun 12, 2026
12 checks passed
@okash1n okash1n deleted the chore/reserve-user-rules-prefix branch June 12, 2026 05:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in CLAUDE.md Key Conventions.
  • Add a unit test ensuring the kit repo does not contain user-* entries under managed content roots.
  • Add a 0.71.1 changelog 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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants