[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MDSTND07DP328Y2JZT6Q4T":3,"skill-same:01M6MDSTND07DP328Y2JZT6Q4T":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":22,"linkOnly":23,"markdownContent":24,"markdownBody":25,"frontMatter":26,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M6MDSTND07DP328Y2JZT6Q4T","xddp-fill-rulebook",null,"project-rulebook.md の未記入セクションをコード調査でドラフト生成し、人が確認・修正後に書き込む。「project-rulebook を埋めて」「リポジトリ構成を生成して」などで起動する。","tsuna44\u002FXddpSettings","tsuna44","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F84987382?v=4","01M6JWX5PY45PD3W2131F7VMF4","01M6JWX5VFK80TQBJJY8SHAE4N",1,"MIT","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-fill-rulebook\u002FSKILL.md",[],[18,19,20,21],"fill","xddp fill rulebook","生成","project","2026-11-10 10:12:30",false,"---\nname: xddp-fill-rulebook\ndescription: project-rulebook.md の未記入セクションをコード調査でドラフト生成し、人が確認・修正後に書き込む。「project-rulebook を埋めて」「リポジトリ構成を生成して」などで起動する。\nargument-hint: \"[repo名 \u002F cross]\"\n---\n\nYou are executing **XDDP Fill Steering — Auto-draft project-rulebook.md**.\n\n**Arguments:** $ARGUMENTS\n- No arguments → target the shared `project-rulebook.md`, all unwritten sections\n- `{repo}` (a repository name matching REPOS: key) → target `project-rulebook-{repo}.md`\n- `cross` → target `project-rulebook-cross.md`\n- `all` → target shared + all per-repo + cross (if REPOS: has ≥2 entries)\n- Section number (e.g., `2`, `6`) after an optional repo\u002Fcross\u002Fall → target only those sections (multiple allowed: `2 6`)\n\n> Examples:\n> - `\u002Fxddp-fill-rulebook` → draft shared project-rulebook.md\n> - `\u002Fxddp-fill-rulebook repo-a` → draft project-rulebook-repo-a.md\n> - `\u002Fxddp-fill-rulebook cross` → draft project-rulebook-cross.md (interface conventions)\n> - `\u002Fxddp-fill-rulebook all` → draft shared + all per-repo + cross\n\n---\n\n### 0. Parse arguments\n\nLet `RAW_ARGS` = trimmed $ARGUMENTS.\nLet tokens = split(RAW_ARGS).\n\nDetermine `TARGET_REPO`:\n- If first token is a section number (matches `^\\d`) → `TARGET_REPO` = `shared`, `TARGET_SECTIONS` = all tokens.\n- If first token is `all` → `TARGET_REPO` = `all`, `TARGET_SECTIONS` = remaining tokens (section numbers if any).\n- If first token is `cross` → `TARGET_REPO` = `cross`, `TARGET_SECTIONS` = remaining tokens.\n- If first token matches a REPOS: key (detected after reading xddp.config.md in Step 1) → `TARGET_REPO` = that token, `TARGET_SECTIONS` = remaining tokens.\n- If no arguments → `TARGET_REPO` = `shared`, `TARGET_SECTIONS` = [] (all sections).\n\nIf `TARGET_SECTIONS` is empty, treat as \"all sections\".\n\n### 1. Locate xddp.config.md\n\nRead `~\u002F.claude\u002Fskills\u002Fxddp-common\u002FSKILL.md`, apply \"## Load Config\" with:\n  NOT_FOUND_MESSAGE: `\"xddp.config.md が見つかりませんでした。\\`\u002Fxddp-01-init\\` を先に実行してください。\"`\n→ let `WORKSPACE_ROOT`, `XDDP_DIR`, `REPOS_KEYS`（他の戻り値は本スキルでは未使用）.\n\nLet `XDDP_ABS` = `{WORKSPACE_ROOT}\u002F{XDDP_DIR}`.\n\nNow resolve `TARGET_REPO` if it was set from the first argument (may need REPOS_KEYS to verify):\n- If first token matches a REPOS_KEYS entry → confirmed as `TARGET_REPO`.\n- If first token is not a section number, not `all`, not `cross`, and not in REPOS_KEYS → report error: \"指定された引数 '{token}' はリポジトリ名でも `all`\u002F`cross` でもありません。\" and stop.\n\n**Determine target files** (`TARGETS` = list of {repo → steering_file} pairs):\n- `TARGET_REPO = shared` → `[{shared: {XDDP_ABS}\u002Fproject-rulebook.md}]`\n- `TARGET_REPO = cross` → `[{cross: {XDDP_ABS}\u002Fproject-rulebook-cross.md}]`\n- `TARGET_REPO = {repo}` → `[{{repo}: {XDDP_ABS}\u002Fproject-rulebook-{repo}.md}]`\n- `TARGET_REPO = all` → shared + each repo in REPOS_KEYS + cross (if len(REPOS_KEYS)≥2)\n\n**Single-repo guard (standalone if block; placed after the \"Determine target files\" block completes, before Step 2 begins):**\n\nIf `len(REPOS_KEYS) == 1`:\n  - If `TARGET_REPO` matches a REPOS_KEYS entry:\n    Tell the user: \"シングルリポジトリ構成では project-rulebook-{repo}.md は生成されません。引数なしで `\u002Fxddp-fill-rulebook` を実行すると共通の project-rulebook.md を対象にします。\" and stop.\n  - If `TARGET_REPO = cross`:\n    Tell the user: \"シングルリポジトリ構成では project-rulebook-cross.md は生成されません。引数なしで `\u002Fxddp-fill-rulebook` を実行すると共通の project-rulebook.md を対象にします。\" and stop.\n  - If `TARGET_REPO = all`:\n    Set `TARGETS = [{shared: {XDDP_ABS}\u002Fproject-rulebook.md}]`.\n    Notify the user: \"シングルリポジトリ構成のため、`all` 指定でも project-rulebook.md のみを対象にします。\"\n    Continue with updated TARGETS.\n\n### 2. Locate\u002Fcreate target project-rulebook file(s)\n\nFor each target file in `TARGETS`:\n- If not found:\n  - `shared` → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-template.md`\n  - `cross` → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-cross-template.md`\n  - `{repo}` → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-repo-template.md`; replace `{REPO_NAME}` placeholder with actual repo name\n  - Tell the user \"（ファイル名）が存在しなかったためテンプレートからコピーしました。\" and continue.\n- If found: read it.\n\n### 3. Identify unwritten sections\n\nFor each target file, scan for placeholder strings:\n\n**Shared project-rulebook.md:**\n| Section | Placeholder strings |\n|---|---|\n| §1 | `（プロジェクト名）`、`（主要言語: Python \u002F TypeScript \u002F Go \u002F Java \u002F etc.）`、`（フレームワーク: FastAPI \u002F Next.js \u002F Spring Boot \u002F etc.）`、`（アーキテクチャ: モノリス \u002F マイクロサービス \u002F etc.）`、`（データベース: PostgreSQL \u002F MySQL \u002F DynamoDB \u002F etc.）`、`（テストフレームワーク: pytest \u002F Jest \u002F JUnit \u002F etc.）` |\n| §1.5 | テーブル行が `\\| （例）` で始まる（REPOS: ≥2 entries の場合のみスコープ） |\n| §2 | `（プロジェクト固有の命名規約をここに記述する）` |\n| §3 | `（プロジェクト固有のアーキテクチャ決定をここに記録する）` |\n| §4 | `（プロジェクト固有のパターンをここに記述する）` |\n| §5 | `（プロジェクト固有の禁止事項・注意事項をここに記述する）` |\n| §6 | `（プロジェクト固有のモジュール構成をここに記述する）` |\n\n**Per-repo project-rulebook-{repo}.md:**\n| Section | Placeholder strings |\n|---|---|\n| §1 | `（リポジトリ名 = xddp.config.md の REPOS: キー名と一致）`、`（主要言語: ...）` などの () 囲みプレースホルダー |\n| §2 | `（このリポジトリ固有の命名規約をここに記述する）`、`（このリポジトリ固有の DB・API 命名規約をここに記述する）` |\n| §5 | `（このリポジトリ固有のアーキテクチャ決定をここに記録する）` |\n| §4 | `（このリポジトリ固有のエラーハンドリングパターンをここに記述する）` など |\n| §6 | `（このリポジトリ固有の禁止事項・注意事項をここに記述する）` |\n| §6 | `（このリポジトリ固有のモジュール構成をここに記述する）` (if §6 exists) |\n\n**Cross project-rulebook-cross.md:**\n| Section | Placeholder strings |\n|---|---|\n| §1 | テーブル行が `\\| （例）` で始まる |\n| §2 | `（プロジェクト固有の SemVer 運用ルールをここに追記する）` |\n| §3 | `（プロジェクト固有の命名規則をここに追記する）` |\n| §4 | `（プロジェクト固有のエラーコード一覧をここに記述する）` |\n| §5 | `（プロジェクト固有の認証方式をここに記述する）` |\n| §6 | `（プロジェクト固有の移行期間ルールをここに記述する）` |\n\nIf `TARGET_SECTIONS` is specified: filter to only those sections.\nLet `UNWRITTEN` = sections to process.\nIf `UNWRITTEN` is empty for all targets: tell the user \"すべてのセクションが記入済みです。\" and stop.\n\n### 4. Investigate codebase and draft each section\n\nFor each section in `UNWRITTEN`, run the investigation and generate a draft.\n\n**§1 Project overview (shared):**\nRead `xddp.config.md` for already-set values. Then inspect:\n- `requirements.txt` \u002F `pyproject.toml` → Python project\n- `package.json` → Node\u002FTypeScript project\n- `go.mod` → Go project\n- `pom.xml` \u002F `build.gradle` → Java project\n- Root `README.md`\n\nDraft the 6 config fields: `PROJECT_NAME`, `LANGUAGE`, `FRAMEWORK`, `ARCHITECTURE`, `DB`, `TEST_FRAMEWORK`.\n\n**§1 Repository basic info (per-repo):**\nInspect the target repo's root files to draft `REPO_NAME`, `LANGUAGE`, `FRAMEWORK`, `BUILD_TOOL`, `TEST_FRAMEWORK`, `ROLE`, and the module map.\n\n**§1 \u002F §2 Cross-repo overview (cross):**\nFor each repo in `REPOS:`, investigate the `upstream-repos` \u002F `downstream-repos` relationships to draft the target repository table and dependency block.\n\n**§1.5 Repository structure (shared — only when len(REPOS_KEYS) ≥ 2):**\nFor each repo in `REPOS:`, investigate in parallel:\n- `requirements.txt` \u002F `pyproject.toml` \u002F `package.json` \u002F `go.mod` → main technologies\n- `src\u002F**\u002F*.py` \u002F `src\u002F**\u002F*.ts` import statements → inter-repo package dependencies\n- `httpx.post` \u002F `requests.post` \u002F `fetch` \u002F `axios` \u002F `RestTemplate` calls → HTTP call targets\n- `README.md` \u002F `main.py` \u002F `main.ts` \u002F `app.py` → service role\n\nDraft:\n1. Repository table (name \u002F role \u002F main tech)\n2. Dependency block (package deps + HTTP calls)\n\n**§2 Naming conventions:**\nSample 5–10 source files from each repo and examine:\n- File\u002Fdirectory names → naming pattern (snake_case, camelCase, kebab-case)\n- Class names → PascalCase or other\n- Function\u002Fmethod names → snake_case or camelCase\n- Constants → UPPER_SNAKE_CASE or other\n- DB table\u002Fcolumn names (look for ORM model definitions or migration files)\n- API endpoint paths (look for router definitions)\n\n**§6 Module structure:**\nRead directory structure. Then, based on `LANGUAGE` detected in §1:\n\n| LANGUAGE | Entry point files to read |\n|---|---|\n| Python | `__init__.py` in each package directory |\n| TypeScript \u002F JavaScript | `index.ts` \u002F `index.js` in each module directory |\n| Go | Top-level `*.go` files in each package directory |\n| Java | `src\u002Fmain\u002F` structure + `package-info.java` |\n| Rust | `lib.rs` \u002F `main.rs` |\n| Other (unknown) | Directory structure only; skip file content |\n\nDraft a concise module map showing each directory's role.\n\n**§5 (ADR — Architecture Decision Records):**\nRun the following git commands on `{REPO_PATH}`:\n```bash\ngit -C {REPO_PATH} log --oneline --all --extended-regexp --grep=\"refactor|revert|rework|migrate|redesign\" -20\n```\nAlso identify large-scope commits (many files changed across modules):\n```bash\ngit -C {REPO_PATH} log --oneline --all -30 --name-only --format=\"%H %s\"\n```\nAI judgment: if changed files span ≥3 distinct top-level directories → include as candidate.\n\nFor each identified candidate commit, draft one minimal ADR entry:\n```markdown\n#### ADR-候補-{hash[:7]}: {コミットメッセージから推定したタイトル}\n\n**状態:** ドラフト（git log から推定 — 人による確認・修正が必要）\n**コミット:** {hash} — {date}\n**推定内容:** {コミットメッセージから読み取れる設計上の判断や制約}\n```\n\nLimit to at most 5 ADR candidates to avoid overwhelming the user.\nIf no candidates found from git log: insert `（git log から候補を確認できませんでした。手動記入してください）`\n\n**§6 (not applicable):**\nInsert the note: `（コード調査から確認できなかったため手動記入してください）`\n\n**§4 (filled in during specout):**\nInsert the note: `（スペックアウト（工程4a）で調査・記入されます）`\n\n### 5. Present all drafts and accept diff instructions\n\nShow all drafted sections together in a single message:\n\n```\n以下のドラフトを生成しました。修正があればセクション番号と変更内容を指示してください。\n問題なければ「OK」と入力してください。\n\n---\n\n## §1 プロジェクト概要（ドラフト）\n\n{draft content}\n\n---\n\n## §1.5 リポジトリ構成（ドラフト）\n\n{draft content}\n\n---\n\n（以降、対象セクション分を続ける）\n```\n\nAccept the user's response:\n- `OK` \u002F `ok` \u002F `はい` \u002F `問題ない` → proceed to Step 6\n- Diff instructions (e.g., \"§2 の命名規約は〇〇に変えてください\") → apply changes and re-present the updated drafts\n- Repeat until the user confirms with OK\n\n### 6. Write to project-rulebook file(s)\n\nFor each target file in `TARGETS`, for each section in `UNWRITTEN`:\n- Replace the placeholder content in the target file with the confirmed draft.\n- Replace the entire section body (from the section heading to the next `---` separator) with the confirmed draft.\n\nSend a PushNotification:\n- title: \"xddp-fill-rulebook 完了\"\n- message: \"{書き込んだファイル名とセクション番号の一覧}への書き込みが完了しました。内容を確認してください。\"\n  （例: \"project-rulebook.md §1 §2 \u002F project-rulebook-repo-a.md §1 への書き込みが完了しました。内容を確認してください。\"）\n\nTell the user:\n```\n以下のファイルにセクションを記入しました:\n- {ファイル名}: §X {セクション名}（対象セクション分を列挙）\n\n次のステップ: 内容を確認し、必要に応じて手動で追記・修正してください。\nスペックアウトを開始する場合は `\u002Fxddp-04-specout {CR番号}` を実行してください。\n```\n","You are executing **XDDP Fill Steering — Auto-draft project-rulebook.md**.\n\n**Arguments:** $ARGUMENTS\n- No arguments → target the shared `project-rulebook.md`, all unwritten sections\n- `{repo}` (a repository name matching REPOS: key) → target `project-rulebook-{repo}.md`\n- `cross` → target `project-rulebook-cross.md`\n- `all` → target shared + all per-repo + cross (if REPOS: has ≥2 entries)\n- Section number (e.g., `2`, `6`) after an optional repo\u002Fcross\u002Fall → target only those sections (multiple allowed: `2 6`)\n\n> Examples:\n> - `\u002Fxddp-fill-rulebook` → draft shared project-rulebook.md\n> - `\u002Fxddp-fill-rulebook repo-a` → draft project-rulebook-repo-a.md\n> - `\u002Fxddp-fill-rulebook cross` → draft project-rulebook-cross.md (interface conventions)\n> - `\u002Fxddp-fill-rulebook all` → draft shared + all per-repo + cross\n\n---\n\n### 0. Parse arguments\n\nLet `RAW_ARGS` = trimmed $ARGUMENTS.\nLet tokens = split(RAW_ARGS).\n\nDetermine `TARGET_REPO`:\n- If first token is a section number (matches `^\\d`) → `TARGET_REPO` = `shared`, `TARGET_SECTIONS` = all tokens.\n- If first token is `all` → `TARGET_REPO` = `all`, `TARGET_SECTIONS` = remaining tokens (section numbers if any).\n- If first token is `cross` → `TARGET_REPO` = `cross`, `TARGET_SECTIONS` = remaining tokens.\n- If first token matches a REPOS: key (detected after reading xddp.config.md in Step 1) → `TARGET_REPO` = that token, `TARGET_SECTIONS` = remaining tokens.\n- If no arguments → `TARGET_REPO` = `shared`, `TARGET_SECTIONS` = [] (all sections).\n\nIf `TARGET_SECTIONS` is empty, treat as \"all sections\".\n\n### 1. Locate xddp.config.md\n\nRead `~\u002F.claude\u002Fskills\u002Fxddp-common\u002FSKILL.md`, apply \"## Load Config\" with:\n  NOT_FOUND_MESSAGE: `\"xddp.config.md が見つかりませんでした。\\`\u002Fxddp-01-init\\` を先に実行してください。\"`\n→ let `WORKSPACE_ROOT`, `XDDP_DIR`, `REPOS_KEYS`（他の戻り値は本スキルでは未使用）.\n\nLet `XDDP_ABS` = `{WORKSPACE_ROOT}\u002F{XDDP_DIR}`.\n\nNow resolve `TARGET_REPO` if it was set from the first argument (may need REPOS_KEYS to verify):\n- If first token matches a REPOS_KEYS entry → confirmed as `TARGET_REPO`.\n- If first token is not a section number, not `all`, not `cross`, and not in REPOS_KEYS → report error: \"指定された引数 '{token}' はリポジトリ名でも `all`\u002F`cross` でもありません。\" and stop.\n\n**Determine target files** (`TARGETS` = list of {repo → steering_file} pairs):\n- `TARGET_REPO = shared` → `[{shared: {XDDP_ABS}\u002Fproject-rulebook.md}]`\n- `TARGET_REPO = cross` → `[{cross: {XDDP_ABS}\u002Fproject-rulebook-cross.md}]`\n- `TARGET_REPO = {repo}` → `[{{repo}: {XDDP_ABS}\u002Fproject-rulebook-{repo}.md}]`\n- `TARGET_REPO = all` → shared + each repo in REPOS_KEYS + cross (if len(REPOS_KEYS)≥2)\n\n**Single-repo guard (standalone if block; placed after the \"Determine target files\" block completes, before Step 2 begins):**\n\nIf `len(REPOS_KEYS) == 1`:\n  - If `TARGET_REPO` matches a REPOS_KEYS entry:\n    Tell the user: \"シングルリポジトリ構成では project-rulebook-{repo}.md は生成されません。引数なしで `\u002Fxddp-fill-rulebook` を実行すると共通の project-rulebook.md を対象にします。\" and stop.\n  - If `TARGET_REPO = cross`:\n    Tell the user: \"シングルリポジトリ構成では project-rulebook-cross.md は生成されません。引数なしで `\u002Fxddp-fill-rulebook` を実行すると共通の project-rulebook.md を対象にします。\" and stop.\n  - If `TARGET_REPO = all`:\n    Set `TARGETS = [{shared: {XDDP_ABS}\u002Fproject-rulebook.md}]`.\n    Notify the user: \"シングルリポジトリ構成のため、`all` 指定でも project-rulebook.md のみを対象にします。\"\n    Continue with updated TARGETS.\n\n### 2. Locate\u002Fcreate target project-rulebook file(s)\n\nFor each target file in `TARGETS`:\n- If not found:\n  - `shared` → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-template.md`\n  - `cross` → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-cross-template.md`\n  - `{repo}` → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-repo-template.md`; replace `{REPO_NAME}` placeholder with actual repo name\n  - Tell the user \"（ファイル名）が存在しなかったためテンプレートからコピーしました。\" and continue.\n- If found: read it.\n\n### 3. Identify unwritten sections\n\nFor each target file, scan for placeholder strings:\n\n**Shared project-rulebook.md:**\n| Section | Placeholder strings |\n|---|---|\n| §1 | `（プロジェクト名）`、`（主要言語: Python \u002F TypeScript \u002F Go \u002F Java \u002F etc.）`、`（フレームワーク: FastAPI \u002F Next.js \u002F Spring Boot \u002F etc.）`、`（アーキテクチャ: モノリス \u002F マイクロサービス \u002F etc.）`、`（データベース: PostgreSQL \u002F MySQL \u002F DynamoDB \u002F etc.）`、`（テストフレームワーク: pytest \u002F Jest \u002F JUnit \u002F etc.）` |\n| §1.5 | テーブル行が `\\| （例）` で始まる（REPOS: ≥2 entries の場合のみスコープ） |\n| §2 | `（プロジェクト固有の命名規約をここに記述する）` |\n| §3 | `（プロジェクト固有のアーキテクチャ決定をここに記録する）` |\n| §4 | `（プロジェクト固有のパターンをここに記述する）` |\n| §5 | `（プロジェクト固有の禁止事項・注意事項をここに記述する）` |\n| §6 | `（プロジェクト固有のモジュール構成をここに記述する）` |\n\n**Per-repo project-rulebook-{repo}.md:**\n| Section | Placeholder strings |\n|---|---|\n| §1 | `（リポジトリ名 = xddp.config.md の REPOS: キー名と一致）`、`（主要言語: ...）` などの () 囲みプレースホルダー |\n| §2 | `（このリポジトリ固有の命名規約をここに記述する）`、`（このリポジトリ固有の DB・API 命名規約をここに記述する）` |\n| §5 | `（このリポジトリ固有のアーキテクチャ決定をここに記録する）` |\n| §4 | `（このリポジトリ固有のエラーハンドリングパターンをここに記述する）` など |\n| §6 | `（このリポジトリ固有の禁止事項・注意事項をここに記述する）` |\n| §6 | `（このリポジトリ固有のモジュール構成をここに記述する）` (if §6 exists) |\n\n**Cross project-rulebook-cross.md:**\n| Section | Placeholder strings |\n|---|---|\n| §1 | テーブル行が `\\| （例）` で始まる |\n| §2 | `（プロジェクト固有の SemVer 運用ルールをここに追記する）` |\n| §3 | `（プロジェクト固有の命名規則をここに追記する）` |\n| §4 | `（プロジェクト固有のエラーコード一覧をここに記述する）` |\n| §5 | `（プロジェクト固有の認証方式をここに記述する）` |\n| §6 | `（プロジェクト固有の移行期間ルールをここに記述する）` |\n\nIf `TARGET_SECTIONS` is specified: filter to only those sections.\nLet `UNWRITTEN` = sections to process.\nIf `UNWRITTEN` is empty for all targets: tell the user \"すべてのセクションが記入済みです。\" and stop.\n\n### 4. Investigate codebase and draft each section\n\nFor each section in `UNWRITTEN`, run the investigation and generate a draft.\n\n**§1 Project overview (shared):**\nRead `xddp.config.md` for already-set values. Then inspect:\n- `requirements.txt` \u002F `pyproject.toml` → Python project\n- `package.json` → Node\u002FTypeScript project\n- `go.mod` → Go project\n- `pom.xml` \u002F `build.gradle` → Java project\n- Root `README.md`\n\nDraft the 6 config fields: `PROJECT_NAME`, `LANGUAGE`, `FRAMEWORK`, `ARCHITECTURE`, `DB`, `TEST_FRAMEWORK`.\n\n**§1 Repository basic info (per-repo):**\nInspect the target repo's root files to draft `REPO_NAME`, `LANGUAGE`, `FRAMEWORK`, `BUILD_TOOL`, `TEST_FRAMEWORK`, `ROLE`, and the module map.\n\n**§1 \u002F §2 Cross-repo overview (cross):**\nFor each repo in `REPOS:`, investigate the `upstream-repos` \u002F `downstream-repos` relationships to draft the target repository table and dependency block.\n\n**§1.5 Repository structure (shared — only when len(REPOS_KEYS) ≥ 2):**\nFor each repo in `REPOS:`, investigate in parallel:\n- `requirements.txt` \u002F `pyproject.toml` \u002F `package.json` \u002F `go.mod` → main technologies\n- `src\u002F**\u002F*.py` \u002F `src\u002F**\u002F*.ts` import statements → inter-repo package dependencies\n- `httpx.post` \u002F `requests.post` \u002F `fetch` \u002F `axios` \u002F `RestTemplate` calls → HTTP call targets\n- `README.md` \u002F `main.py` \u002F `main.ts` \u002F `app.py` → service role\n\nDraft:\n1. Repository table (name \u002F role \u002F main tech)\n2. Dependency block (package deps + HTTP calls)\n\n**§2 Naming conventions:**\nSample 5–10 source files from each repo and examine:\n- File\u002Fdirectory names → naming pattern (snake_case, camelCase, kebab-case)\n- Class names → PascalCase or other\n- Function\u002Fmethod names → snake_case or camelCase\n- Constants → UPPER_SNAKE_CASE or other\n- DB table\u002Fcolumn names (look for ORM model definitions or migration files)\n- API endpoint paths (look for router definitions)\n\n**§6 Module structure:**\nRead directory structure. Then, based on `LANGUAGE` detected in §1:\n\n| LANGUAGE | Entry point files to read |\n|---|---|\n| Python | `__init__.py` in each package directory |\n| TypeScript \u002F JavaScript | `index.ts` \u002F `index.js` in each module directory |\n| Go | Top-level `*.go` files in each package directory |\n| Java | `src\u002Fmain\u002F` structure + `package-info.java` |\n| Rust | `lib.rs` \u002F `main.rs` |\n| Other (unknown) | Directory structure only; skip file content |\n\nDraft a concise module map showing each directory's role.\n\n**§5 (ADR — Architecture Decision Records):**\nRun the following git commands on `{REPO_PATH}`:\n```bash\ngit -C {REPO_PATH} log --oneline --all --extended-regexp --grep=\"refactor|revert|rework|migrate|redesign\" -20\n```\nAlso identify large-scope commits (many files changed across modules):\n```bash\ngit -C {REPO_PATH} log --oneline --all -30 --name-only --format=\"%H %s\"\n```\nAI judgment: if changed files span ≥3 distinct top-level directories → include as candidate.\n\nFor each identified candidate commit, draft one minimal ADR entry:\n```markdown\n#### ADR-候補-{hash[:7]}: {コミットメッセージから推定したタイトル}\n\n**状態:** ドラフト（git log から推定 — 人による確認・修正が必要）\n**コミット:** {hash} — {date}\n**推定内容:** {コミットメッセージから読み取れる設計上の判断や制約}\n```\n\nLimit to at most 5 ADR candidates to avoid overwhelming the user.\nIf no candidates found from git log: insert `（git log から候補を確認できませんでした。手動記入してください）`\n\n**§6 (not applicable):**\nInsert the note: `（コード調査から確認できなかったため手動記入してください）`\n\n**§4 (filled in during specout):**\nInsert the note: `（スペックアウト（工程4a）で調査・記入されます）`\n\n### 5. Present all drafts and accept diff instructions\n\nShow all drafted sections together in a single message:\n\n```\n以下のドラフトを生成しました。修正があればセクション番号と変更内容を指示してください。\n問題なければ「OK」と入力してください。\n\n---\n\n## §1 プロジェクト概要（ドラフト）\n\n{draft content}\n\n---\n\n## §1.5 リポジトリ構成（ドラフト）\n\n{draft content}\n\n---\n\n（以降、対象セクション分を続ける）\n```\n\nAccept the user's response:\n- `OK` \u002F `ok` \u002F `はい` \u002F `問題ない` → proceed to Step 6\n- Diff instructions (e.g., \"§2 の命名規約は〇〇に変えてください\") → apply changes and re-present the updated drafts\n- Repeat until the user confirms with OK\n\n### 6. Write to project-rulebook file(s)\n\nFor each target file in `TARGETS`, for each section in `UNWRITTEN`:\n- Replace the placeholder content in the target file with the confirmed draft.\n- Replace the entire section body (from the section heading to the next `---` separator) with the confirmed draft.\n\nSend a PushNotification:\n- title: \"xddp-fill-rulebook 完了\"\n- message: \"{書き込んだファイル名とセクション番号の一覧}への書き込みが完了しました。内容を確認してください。\"\n  （例: \"project-rulebook.md §1 §2 \u002F project-rulebook-repo-a.md §1 への書き込みが完了しました。内容を確認してください。\"）\n\nTell the user:\n```\n以下のファイルにセクションを記入しました:\n- {ファイル名}: §X {セクション名}（対象セクション分を列挙）\n\n次のステップ: 内容を確認し、必要に応じて手動で追記・修正してください。\nスペックアウトを開始する場合は `\u002Fxddp-04-specout {CR番号}` を実行してください。\n```\n",{"name":5,"description":7,"argument-hint":27},"[repo名 \u002F cross]","main","0719b3a37b134895da55968646acffe58aedce8f","ClaudeCode\u002F.claude\u002Fskills\u002Fxddp-fill-rulebook",0,"https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings","https:\u002F\u002Fgithub.com\u002Ftsuna44","2026-11-08 08:45:39",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add tsuna44\u002FXddpSettings --skill xddp-fill-rulebook",{"tool":41,"command":42},"bunx","bunx skills add tsuna44\u002FXddpSettings --skill xddp-fill-rulebook",{"tool":44,"command":45},"pnpm","pnpm dlx skills add tsuna44\u002FXddpSettings --skill xddp-fill-rulebook","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-fill-rulebook\u002FSKILL.md",true,[],[50,63,70,78,85,107],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":60,"publishedAt":22},"01M6MDVNN0ZX8D5KABK9G0067Z","demo.skill","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002Ftools\u002Fharness\u002Ftests\u002Ffixtures\u002Fbadrepo\u002FClaudeCode\u002F.claude\u002Fskills\u002Fdemo.skill\u002FSKILL.md",[55],{"categoryNo":56,"categoryName":57,"taxonomyType":58,"taxonomyTypeDesc":59},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[61,62],"demo skill","demo",{"skillNo":64,"name":65,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":22},"01M6MDVK20HAJYBMXM7VX50A3J","demo.noname","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002Ftools\u002Fharness\u002Ftests\u002Ffixtures\u002Fbadrepo\u002FClaudeCode\u002F.claude\u002Fskills\u002Fdemo.noname\u002FSKILL.md",[],[69,62],"demo noname",{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":22},"01M6MDVFS20532JT4V7WT779XH","demo.common","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002Ftools\u002Fharness\u002Ftests\u002Ffixtures\u002Fbadrepo\u002FClaudeCode\u002F.claude\u002Fskills\u002Fdemo.common\u002FSKILL.md",[],[76,77,62],"demo common","common",{"skillNo":79,"name":80,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":22},"01M6MDVCV2JFN66NJTFG1CCJS1","demo.badname","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002Ftools\u002Fharness\u002Ftests\u002Ffixtures\u002Fbadrepo\u002FClaudeCode\u002F.claude\u002Fskills\u002Fdemo.badname\u002FSKILL.md",[],[84,62],"demo badname",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":94,"publishedAt":22},"01M6MDV7CHGZGPXR0MQ44VC4C1","xddp-update-knowledge","任意のタイミングで baseline_docs\u002F の knowledge ディレクトリに知識を追加・更新する。CR 非依存。対話形式と引数形式に対応。「知識を登録して」「callgraph を記録して」「メモを保存して」などで起動する。","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-update-knowledge\u002FSKILL.md",[91],{"categoryNo":92,"categoryName":93,"taxonomyType":58,"taxonomyTypeDesc":59},"01JBSEEDCAT000000000000021","资料检索与研究",[95,96,97,98,99,100,101,102,103,104,105,106],"xddp update knowledge","update knowledge","knowledge","update","note","structure","constraint","lesson","glossary","baseline","flow","docs",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":121,"publishedAt":22},"01M6MDV2Q1Z02WAN4CZ2WVFZ27","xddp-sync-design","コードから DSN を再生成してリビジョンとして記録し、AIレビュー→人承認を実施する。「設計を同期して」「DSN を更新して」などで起動する。","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-sync-design\u002FSKILL.md",[113,116],{"categoryNo":114,"categoryName":115,"taxonomyType":58,"taxonomyTypeDesc":59},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":117,"categoryName":118,"taxonomyType":119,"taxonomyTypeDesc":120},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[122,123,124,20],"sync","xddp sync design","design"]