Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ 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.72.0] - 2026-06-12

個人設定の置き場所ガイダンスと監査コマンドを追加(v0.71.1 の `user-*` 予約規約の活用面)。

### Added
- **`/audit-config` コマンドを新設**: ユーザー所有の設定(CLAUDE.md ユーザーセクション・`rules/user-*.md`・プロジェクト CLAUDE.md)を「現行モデルに必要か」の観点で監査する。判定レンズは babysitting / over-prescription / stale-premise / context-tax の 4 分類。削りすぎ防止を組み込み済み: モデルが推測できない個人選好は削除対象にしない、context-tax 判定は settings / harness の実確認を伴う場合のみ、出力は提案のみで適用はユーザー承認後(コマンド数 20 → 21)
- **README に個人設定の推奨配置を明記(ja/en)**: 個人の常時ロード指示は CLAUDE.md ユーザーセクションより `~/.claude/rules/user-*.md` 推奨(kit が配布しない予約名のため update と完全分離、ファイル単位で管理可能。コンテキストコストは同一であることも明記)
- **update 時の非ブロック tip**: CLAUDE.md ユーザーセクションに実コンテンツ(スキャフォールド以外)がある場合のみ、update の CLAUDE.md 処理直後に `rules/user-*.md` への移設案内を info 1 行で表示(プロンプトなし・nag なし)。検出ヘルパー `_claude_md_user_section_has_content` のユニットテスト付き

## [0.71.1] - 2026-06-12

### Added
Expand Down
7 changes: 4 additions & 3 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Claude Code Starter Kit bootstraps a consistent, high-quality Claude Code enviro
- **3 profiles**: Minimal, Standard (recommended), Full
- **9 agents**: planner, architect, tdd-guide, code-reviewer, security-reviewer, build-error-resolver, e2e-runner, refactor-cleaner, doc-updater
- **8 rules**: coding-style, git-workflow, performance, security, testing, agents, anti-patterns, permissions-guide
- **20 slash commands**: /plan, /tdd, /build-fix, /e2e, /verify, /research, /web-article, /oss-analyze, /web-source-review, /handover, /update-kit, and more
- **21 slash commands**: /plan, /tdd, /build-fix, /e2e, /verify, /research, /web-article, /oss-analyze, /web-source-review, /handover, /update-kit, and more
- **12 skill modules**: backend-patterns, frontend-patterns, security-review, tdd-workflow, prompt-patterns, and more
- **11 optional hooks/settings**: safety net (cc-safety-net), auto update, web content update, tmux reminder, doc blocker, Prettier or Biome formatting, PR creation log, pre-compact snapshot (opt-in), statusline, doc size guard, feature recommendation
- **14 plugins** from multiple marketplaces: security-guidance, commit-commands, pr-review-toolkit, feature-dev, code-review, claude-md-management, superpowers, code-simplifier, document-skills, example-skills, typescript-lsp, gopls-lsp, pyright-lsp, rust-analyzer-lsp
Expand Down Expand Up @@ -252,6 +252,7 @@ After restarting your terminal, start `claude` in your project directory. The in
/oss-analyze # Analyze an OSS repo/doc URL for tech + adoption decisions
/web-source-review # Evaluate a URL's credibility as an information source
/handover # Structured session handover document
/audit-config # Audit personal config for outdated model-babysitting instructions
/update-kit # Manually update starter kit to latest version
```

Expand Down Expand Up @@ -393,7 +394,7 @@ claude-code-starter-kit/
│ └── ja/ # Japanese templates & strings
├── agents/ # Agent definitions (9 files)
├── rules/ # Rule files (8 files)
├── commands/ # Slash commands (20 files)
├── commands/ # Slash commands (21 files)
└── skills/ # Skill modules (12 dirs)
```

Expand All @@ -402,7 +403,7 @@ claude-code-starter-kit/
After installation, you can extend or modify any component:

- **Add an agent**: Create a new `.md` file in `~/.claude/agents/`
- **Add a rule**: Create a new `.md` file in `~/.claude/rules/`
- **Add a rule**: Create a new `.md` file in `~/.claude/rules/` (for personal always-loaded preferences, `user-*.md` is recommended — the kit reserves that namespace and never ships such files, so updates can never collide with yours)
- **Add a command**: Create a new `.md` file in `~/.claude/commands/`
- **Add a skill**: Create a new directory under `~/.claude/skills/` with a `SKILL.md`
- **Modify hooks**: Edit `~/.claude/settings.json` hooks section
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ cd claude-code-starter-kit
| **refactor-cleaner** | コード整理 | 不要なコードの削除・整理 |
| **doc-updater** | ドキュメント更新 | README やドキュメントの更新 |

### 💬 スラッシュコマンド(20個
### 💬 スラッシュコマンド(21個

スラッシュコマンドは、Claude に **ワンタッチで指示を出すショートカット** です。
Claude Code のチャットで `/` に続けて入力します。
Expand All @@ -451,6 +451,7 @@ Claude Code のチャットで `/` に続けて入力します。
| `/web-source-review` | URL を抽出し情報源としての信頼性を評価 |
| `/handover` | セッション引き継ぎドキュメントの生成 |
| `/update-kit` | スターターキットを手動で最新版に更新 |
| `/audit-config` | 個人設定(CLAUDE.md ユーザーセクション・user-*.md)に旧モデル向けの不要な指示が残っていないか監査 |

### 🌐 Web 取得スキル(web-content-extraction)

Expand Down Expand Up @@ -867,6 +868,7 @@ NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/cloudna
> **CLAUDE.md のカスタマイズ**:
> - `~/.claude/CLAUDE.md` は kit 管理セクション(`<!-- BEGIN STARTER-KIT-MANAGED -->` 〜 `<!-- END STARTER-KIT-MANAGED -->`)とユーザーセクション(`# ユーザー設定`)に分かれています
> - ユーザーセクションに自由にカスタム指示を追加できます。update 時も kit セクションのみ更新され、ユーザーセクションは保持されます
> - **おすすめ**: 個人の常時ロード指示は、CLAUDE.md のユーザーセクションよりも `~/.claude/rules/user-<名前>.md` として置くのがおすすめです。kit は `user-*` 名のファイルを配布しないことを保証している(CI で強制)ため、update のマージ対象から完全に外れ、ファイル単位で整理・バージョン管理できます。コンテキストコストはどちらも同じ(常時ロード)です
> - 既存の CLAUDE.md にマーカーがない場合、初回 update 時に対話的にマイグレーションが行われます
>
> **既存ユーザー向け**:
Expand Down Expand Up @@ -899,7 +901,7 @@ NONINTERACTIVE=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/cloudna
| やりたいこと | 方法 |
|---|---|
| エージェントを追加 | `~/.claude/agents/` に `.md` ファイルを作成 |
| ルールを追加 | `~/.claude/rules/` に `.md` ファイルを作成 |
| ルールを追加 | `~/.claude/rules/` に `.md` ファイルを作成(個人設定は `user-*.md` 推奨 — kit が配布しない予約名で update と衝突しない) |
| コマンドを追加 | `~/.claude/commands/` に `.md` ファイルを作成 |
| スキルを追加 | `~/.claude/skills/{name}/` に `SKILL.md` + 必要に応じて `references/`, `scripts/`, `assets/` を作成 |
| フックを変更 | `~/.claude/settings.json` の hooks セクションを編集 |
Expand Down Expand Up @@ -1102,7 +1104,7 @@ claude-code-starter-kit/
│ └── ja/ # 日本語
├── agents/ # AI エージェント定義(9種)
├── rules/ # コーディングルール(8種)
├── commands/ # スラッシュコマンド(20個
├── commands/ # スラッシュコマンド(21個
└── skills/ # スキルモジュール(12個)
```

Expand Down
55 changes: 55 additions & 0 deletions commands/audit-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
description: Audit your personal Claude Code config for outdated, model-babysitting, or redundant instructions.
argument-hint: [global|project|all]
---

# /audit-config — Personal Config Audit

Audit user-owned configuration for instructions that no longer help (or
actively hurt) current-generation models. Kit-managed files are NOT in
scope — the kit audits its own content upstream.

## Scope

- `global` (default): the user section of `~/.claude/CLAUDE.md` (content
outside the STARTER-KIT-MANAGED markers) and user-owned rule files
(`~/.claude/rules/user-*.md` and any rules file not shipped by the kit)
- `project`: the current project's `CLAUDE.md` / `.claude/` config
- `all`: both

## Audit Lenses

Classify each instruction (line or section) into:

1. **babysitting** — countermeasures for old-model failure modes that no
longer occur (e.g. tool-call format reminders, "fix errors immediately",
forced step-by-step rituals)
2. **over-prescription** — rigid procedures that override the model's own
judgment where it is now reliable (blanket TDD/coverage mandates,
fixed command pipelines, arbitrary numeric gates)
3. **stale-premise** — references to old models, retired features, or
superseded mechanics (thinking keywords, old model names, obsolete
context-management lore)
4. **context-tax** — always-loaded lines duplicating what the harness or
settings already enforce (language settings, parallel tool calls,
risk reporting). Verify the duplication against the actual settings
file or documented harness behavior before claiming it — cite what
you checked.

## Preservation Rules (do not over-delete)

- **Genuine personal preferences stay.** Anything the model could not
infer on its own — naming/secrecy rules, confirmation gates, response
formats, workflow phrases — is the user's voice, not babysitting.
- When unsure whether something is preference or babysitting, keep it
and say why you were unsure.
- Only mark `context-tax` removals when you actually verified the
duplication (e.g. read `settings.json`, confirmed the harness ships
the behavior). No speculation-based deletions.

## Output (proposal only — never edit without approval)

Produce a table: `target | verdict (keep/remove/rewrite/merge) | reason`,
followed by the full proposed replacement text for every rewrite/merge.
End with a summary of what gets shorter and what is preserved. Apply
changes only after the user approves them.
1 change: 1 addition & 0 deletions i18n/en/strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ STR_UPDATE_TITLE="Updating Claude Code Starter Kit"
STR_UPDATE_SETTINGS="Checking settings.json..."
STR_UPDATE_SETTINGS_UPDATED="settings.json updated"
STR_UPDATE_SETTINGS_UNCHANGED="settings.json unchanged (kit has no changes)"
STR_UPDATE_USER_RULES_TIP="Tip: personal instructions in the CLAUDE.md user section can also live in ~/.claude/rules/user-*.md (a namespace reserved for you — kit updates never ship or touch user-* files). See README > Customization."
STR_UPDATE_SETTINGS_MERGING="Merging settings.json (both you and kit have changes)..."
STR_UPDATE_SETTINGS_MERGED="settings.json merged successfully"
STR_UPDATE_CLAUDEMD="Checking CLAUDE.md..."
Expand Down
1 change: 1 addition & 0 deletions i18n/ja/strings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ STR_UPDATE_TITLE="Claude Code Starter Kit を更新中"
STR_UPDATE_SETTINGS="settings.json を確認中..."
STR_UPDATE_SETTINGS_UPDATED="settings.json を更新しました"
STR_UPDATE_SETTINGS_UNCHANGED="settings.json に変更なし(kit 側の変更なし)"
STR_UPDATE_USER_RULES_TIP="ヒント: CLAUDE.md ユーザーセクションの個人設定は ~/.claude/rules/user-*.md にも置けます(user-* は kit が配布しない予約名で、update が干渉しません)。詳細は README のカスタマイズ節へ。"
STR_UPDATE_SETTINGS_MERGING="settings.json をマージ中(あなたと kit の両方に変更あり)..."
STR_UPDATE_SETTINGS_MERGED="settings.json のマージが完了しました"
STR_UPDATE_CLAUDEMD="CLAUDE.md を確認中..."
Expand Down
26 changes: 26 additions & 0 deletions lib/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,25 @@ _update_phase_settings() {
_strip_retired_hook_entries "$current_settings"
}

# _claude_md_user_section_has_content - Returns 0 when the user section of a
# deployed CLAUDE.md (everything after the END marker) contains real content
# beyond the scaffold (section heading, HTML comments, blank lines).
_claude_md_user_section_has_content() {
local file="$1"
[[ -f "$file" ]] || return 1
_has_kit_markers "$file" || return 1
awk '
{ gsub(/\r$/, "") }
found && NF {
if ($0 ~ /^[[:space:]]*<!--/) next
if ($0 == "# ユーザー設定" || $0 == "# User Settings") next
has = 1; exit
}
$0 == "<!-- END STARTER-KIT-MANAGED -->" { found = 1 }
END { exit has ? 0 : 1 }
' "$file"
}

# --- Phase 2/5: CLAUDE.md (section-aware) -------------------------------------
_update_phase_claude_md() {
local claude_dir="$1"
Expand Down Expand Up @@ -830,6 +849,13 @@ _update_phase_claude_md() {
fi
fi

# Non-blocking tip: personal always-loaded instructions live better in
# ~/.claude/rules/user-*.md (reserved namespace the kit never ships) than
# in the CLAUDE.md user section. One info line, no prompt, no nag loop.
if _claude_md_user_section_has_content "$current_claude_md"; then
info "${STR_UPDATE_USER_RULES_TIP:-Tip: personal instructions in the CLAUDE.md user section can live in ~/.claude/rules/user-*.md instead (reserved for you; never touched by updates). See README.}"
fi

# Older releases deployed AGENTS.md into ~/.claude. The starter kit no
# longer manages that file, so remove the stale copy during update.
local legacy_agents_md="${claude_dir}/AGENTS.md"
Expand Down
36 changes: 36 additions & 0 deletions tests/unit/test-update-refactor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,39 @@
fail "$test_name (helper_uses=$helper_uses inline_has=$inline_has)"
fi
}

{
test_name="update: user-section content detection drives the rules/user-* tip"
_ust_tmp="$(mktemp -d)"
_SETUP_TMP_FILES+=("$_ust_tmp")
# scaffold only (heading + placeholder comment) → no tip
Comment on lines +98 to +102
cat > "$_ust_tmp/scaffold.md" <<'MD'
<!-- BEGIN STARTER-KIT-MANAGED -->
# Global Settings
<!-- END STARTER-KIT-MANAGED -->

# User Settings

<!-- Add your custom instructions below -->
MD
# real user content → tip
cat > "$_ust_tmp/content.md" <<'MD'
<!-- BEGIN STARTER-KIT-MANAGED -->
# Global Settings
<!-- END STARTER-KIT-MANAGED -->

# ユーザー設定

- 個人ルールがここにある
MD
# markerless → no tip (migration path handles it)
printf '# my own file\n- stuff\n' > "$_ust_tmp/markerless.md"
_ust_rc_scaffold=0; _claude_md_user_section_has_content "$_ust_tmp/scaffold.md" || _ust_rc_scaffold=$?
_ust_rc_content=0; _claude_md_user_section_has_content "$_ust_tmp/content.md" || _ust_rc_content=$?
_ust_rc_markerless=0; _claude_md_user_section_has_content "$_ust_tmp/markerless.md" || _ust_rc_markerless=$?
if [[ "$_ust_rc_scaffold" -ne 0 ]] && [[ "$_ust_rc_content" -eq 0 ]] && [[ "$_ust_rc_markerless" -ne 0 ]]; then
pass "$test_name"
else
fail "$test_name (scaffold=$_ust_rc_scaffold content=$_ust_rc_content markerless=$_ust_rc_markerless)"
fi
}
Loading