refactor(claude-config): エージェント定義・スキル設定の汎用化と SSOT 整理#85
Draft
coil398 wants to merge 4 commits into
Draft
Conversation
Add new step N1.5 between N1 (log reading) and N2 (registry update) that detects sibling project-memory directories under ~/.claude/projects/ caused by inconsistent sanitized-cwd computation (hyphen vs period form, e.g. -...-github-com-... vs -...-github.com-...). If sibling found, insert warning section at top of N11 retrospective report. Also update N11 report template: - Insert N1.5 warning section after N9 untracked-skills reminder (if any) - Add プロジェクトメモリディレクトリ整合性 single line to ### 今サイクル recording the check result even when no sibling exists Why: planner step 1.5 (existing-rule cross-check) and N4.4 (existing-rule verification) reference PROJECT_MEMORY_DIR. When 2 directory variants coexist, each protocol sees only one variant, leading to incomplete rule coverage (hyphen form has 35 files / period form has 26 files for motitan-api; their MEMORY.md and feedback_*.md differ). Auto-merge avoided due to data-loss risk; retrospector responsibility is detection and notification only. Structural root-fix (common script for sanitized-cwd) is out of scope. Source pattern: project-memory-dir-divergence (registry entry at line 1143) Backup: ~/.claude/memory/meta_retro_backups/20260511T134221Z/
…rendering
macOS の /bin/bash (3.2.57) には、'$(...)' 内で単一引用符で囲まれた jq
フィルタ中の '{ X, Y }' をブレース展開してしまうバグがある。これにより
mcp-servers.json の env を含むサーバー (brave-search / github) で
.codex/config.toml の env 行が空の '"env = "' に分裂し、Codex CLI から
API キーが渡せなくなっていた。
中間変数 env_rendered に $(jq ...) の結果を一旦受けることで、ブレース
展開のトリガーとなる引数位置を回避する。bash 4+ では元コードでも動作
していたが、macOS 環境を考慮して中間変数版を恒久対応とする。
直近の meta-retro / pir-retro 系コミット (db592e5, d0d3aca, d1e7703 等) で 更新された SSOT (.claude/CLAUDE.md, .claude/agents/, .claude/skills/) に 追従して .codex/ を再生成する。 - AGENTS.md: 意見聴取と修正アクション要求の見分け / 候補提示前の セルフチェック を反映 - agents/planner.md: ステップ 1.5 既存ルール照合 + 3.1b 探索時点鮮度確認 - agents/retrospector.md: N4.4 既存ルール適用検証 (自動測定) - skills/pir2/SKILL.md: ステップ 4.6 別案の字義解釈確認ゲート
- 公開リポへの個人情報露出を除去 (retrospector.md) - グローバル汎用性違反を汎用化: planner / reviewer / refactor-advisor - explorer 並列上限の矛盾解消 (pir2 / debug → CLAUDE.md「上限なし」に統一) - pir2async / debug に refactor-advisor ゲート追加 - REVIEWER_SET 自動選定アルゴリズムを pir2/references/reviewer-set-algorithm.md に SSOT 化 - Fan-Out Gate テンプレートを pir2/references/fan-out-gate.md に集約 (6 スキル参照化) - CLAUDE.md / agents/ の二重説明圧縮 - settings.json の Bash 重複整理 (ls/grep/find/rg/fd/tree) - settings.local.json に Edit(.claude/**) / Write(.claude/**) を追加 (subagent 用) https://claude.ai/code/session_01S14epqhJfDVH3ZLiLZQXt2
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.
Summary
Phase 1 / 4 of the dotfiles codebase refactor (PIR² output). Touches
.claude/agents・skills・CLAUDE.md・settings.json only..codex/配下は SSOT 自動同期分。主な変更
agents/retrospector.mdに残っていた個人 GitHub ID / 所属組織 / リポ識別子の例示ハードコードをプレースホルダー化 (公開リポへの個人情報露出を除去)agents/planner.md:AutoMigrate/User/Scene/Course/Global/make golden/make apigen等の Go・ORM 固有例を汎用記述へagents/reviewer.md:class_id/stage_id/Preferencesを「外部キー属性 / 階層構造のある絞り込みキー / 絞り込み条件」へagents/refactor-advisor.md:scene_id/talkIDsを仮名 A 型 / B 型へskills/pir2/SKILL.md・skills/debug/SKILL.md: explorer 並列上限「最大3体」を削除し CLAUDE.md「上限なし」参照に統一skills/pir2async/SKILL.md・skills/debug/SKILL.md: refactor-advisor ゲート (ステップ 5.5) を追加 (pir2 と等価機能)skills/pir2/references/reviewer-set-algorithm.mdに SSOT 化、ir / debug / review-pr / reviewer の 4 SKILL.md から参照skills/pir2/references/fan-out-gate.mdに集約、6 スキル (pir2 / pir2async / debug / ir / review-pr / reviewer) から参照CLAUDE.mdの reviewer / refactor-advisor 運用ガイド二重説明を圧縮し agent.md 参照に一本化settings.jsonの Bash 重複整理 (ls / grep / find / rg / fd / tree のcmd:*形式をcmd *に集約)settings.local.jsonにEdit(.claude/**)/Write(.claude/**)追加 (subagent が.claude/配下を編集できるようにする)PIR² メトリクス
スコープ外 (後続 PR で対応予定)
sync-scripts(sync-codex.sh が submodule 経由 skill (ai-design-system / ai-diary / ai-ltm) を孤児判定する問題を含む)shell-scriptsnvim-shellsettings.local.jsonの既存kawasetakumi/kawase/astran-jpパスは origin/master 継承の既存問題で本 PR 責任外Test plan
python3 -c 'import json; json.load(open(".claude/settings.json"))'→ 構文 OKpython3 -c 'import json; json.load(open(".claude/settings.local.json"))'→ 構文 OKkawasetakumi/astran-jp/motitan-api) → ゼロ件 (本 PR 変更ファイル内)AutoMigrate/class_id/stage_id/scene_id/talkIDs/TestFoo/make golden/make apigen) → ゼロ件https://claude.ai/code/session_01S14epqhJfDVH3ZLiLZQXt2
Generated by Claude Code