[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JWXBGP1B41G6F2DARSHK53":3,"skill-same:01M6JWXBGP1B41G6F2DARSHK53":59},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M6JWXBGP1B41G6F2DARSHK53","xddp-01-init",null,"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-01-init\u002FSKILL.md",[],[17,18],"init","xddp 01 init","2026-11-10 10:12:30",false,"---\nname: xddp-01-init\ndescription: XDDP フェーズ0: CRワークスペースを初期化する。CR番号・タイトルを引数に取り、成果物フォルダ・progress.md・テンプレートから生成した要求書（REQ-{CR}.md）を作成する。`--profile {full|quick}` で CR プロファイル（工程テーラリング）を指定できる。引数省略時はAIが対話的に質問する。「ワークスペースを初期化して」「CRを開始して」などで起動する。\nargument-hint: \"CR番号 タイトル [要求書.md] [--profile {full|quick}]\"\n---\n\nYou are executing **XDDP Step 01 — Initialize CR Workspace**.\n\n**Arguments:** $ARGUMENTS\n- 1st token: CR number (e.g. `REQ-2026-001`)\n- 2nd token: title (自由記述のタイトル文字列)\n- 3rd token (optional): path to an existing requirements note (メモ・チケット・議事録等。あれば参照コピーする)\n- `--profile {full|quick}` (optional, 位置非依存): CR プロファイル（工程テーラリング）。省略時は\n  `xddp.config.md` の `CR_PROFILE`（未設定なら `full`）。下記 Step 0 で `$ARGUMENTS` から除去してから\n  位置引数を解決する\n\n---\n\n### 0. Resolve CR_PROFILE from arguments\n\n1. Scan `$ARGUMENTS` tokens for the exact string `--profile` (position-independent).\n2. If found:\n   - The next token must exist and be `full` or `quick`. If missing or invalid, report error and stop.\n   - Set `CR_PROFILE` = that value.\n   - Remove both `--profile` and its value token from `$ARGUMENTS`; the remaining tokens become the new `$ARGUMENTS` for positional parsing.\n3. If not found:\n   - Set `CR_PROFILE` from `xddp.config.md` (if exists and key is set), otherwise `full`.\n4. Validate `CR_PROFILE` is `full` or `quick`; otherwise fallback to `full` with a warning.\n5. `CR_PROFILE` は本ステップで一度だけ解決する。以降の Step 1（無引数時の対話質問）では\n   `CR_PROFILE` を再確認しない（未設定なら `full`）。\n\n**注記:** 本ステップでは `CR_PROFILE` のみを解決する。`XDDP_DIR` \u002F `REPOS` \u002F `DOCS_DIR` の解決は既存の Step 1.5 \u002F 4 \u002F 4.5 で引き続き実施するため、同じキーの重複読み込みは発生しない。\nworkspace root は `xddp.config.md` を含むディレクトリとし、Step 1.5 と一致させる。\n\nLet `CR` = 1st token, `TITLE` = 2nd token, `REQ_FILE` = 3rd token (optional).\n\n### 1. Resolve CR \u002F title (ask if missing)\n**このステップは既存 Step 1.5「Resolve XDDP_DIR」より前に実行する**（Step 1.5 が `CR_PATH = {XDDP_ABS}\u002F{CR}` を確定するため、その前に `CR` を必ず確定させる。無引数実行時に空 `CR` で `CR_PATH` を組んでしまう順序矛盾を防ぐ）。\n- If $ARGUMENTS has no tokens at all（完全な無引数実行）:\n  Ask the user in Japanese for: CR番号、タイトル、既存の要求書ファイルパス（任意。手元になければ空欄でよい旨を伝える）。\n  Set `CR`, `TITLE` from the answers. Set `REQ_FILE` from the answer only if the user provided a path.\n- Else if `CR` is set but `TITLE` is missing:\n  Ask the user in Japanese for the title only. Set `TITLE` from the answer.\n- `REQ_FILE` is never prompted for when `CR` and `TITLE` were both supplied — it remains optional in that case.\n\n### 1.5. Resolve XDDP_DIR\n\nCheck if `xddp.config.md` exists in the current working directory.\n- If exists, read it and extract `XDDP_DIR` (default: `xddp` if the key is absent).\n- If not exists (first run), use `XDDP_DIR = xddp`.\n\nResolve paths relative to the directory containing `xddp.config.md` (= workspace root).\nLet `XDDP_ABS` = resolved absolute path of `{cwd}\u002F{XDDP_DIR}`.\nLet `CR_PATH`  = `{XDDP_ABS}\u002F{CR}`.\n\n### 2. Create folder structure\nCreate directories (use `mkdir -p` via Bash):\n```\n{CR_PATH}\u002F01_requirements\u002F\n{CR_PATH}\u002F02_analysis\u002F\n{CR_PATH}\u002F03_change-requirements\u002F\n{CR_PATH}\u002F04_specout\u002F\n{CR_PATH}\u002F05_architecture\u002F\n{CR_PATH}\u002F06_design\u002F\n{CR_PATH}\u002F07_coding\u002F\n{CR_PATH}\u002F08_code-review\u002F\n{CR_PATH}\u002F09_test-spec\u002F\n{CR_PATH}\u002F10_test-results\u002F\n{CR_PATH}\u002Freview\u002F\n```\n\n### 3. Create requirements file from template\n**冪等性ガード:** If `{CR_PATH}\u002F01_requirements\u002FREQ-{CR}.md` already exists → do NOT overwrite it. Skip Step 3 and Step 3.6 entirely, and report to the user that the existing requirements file was preserved（既存CRへの再実行時に人の編集内容を保護するため。既存 Step 4「Create xddp.config.md (if not exists)」と同じ \"if not exists\" 方針）。\nOtherwise, copy `~\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002F01_req-template.md` to `{CR_PATH}\u002F01_requirements\u002FREQ-{CR}.md`.\nIn the copied file, apply the following literal text replacements:\n- `REQ-{YYYY}-{NNN}` → `{CR}`（文書番号はCR番号をそのまま機械的に流用する。連番管理は行わない）\n- `{変更タイトル}` → `{TITLE}`\n- `{YYYY-MM-DD}` → today's date（メタデータ欄の「作成日」と、末尾「8. 変更履歴」表の初版行の日付、両方の出現箇所に適用される。同じ日付でよいため区別しない）\n`{氏名}`（作成者欄・変更履歴の変更者欄）と「版数：1.0」はプレースホルダーのまま変更しない（人が編集する）。\n\n### 3.5. Create latest-specs\u002F (if not exists)\nCheck if `{XDDP_DIR}\u002Flatest-specs\u002F` exists in the current working directory.\nIf not found, create it and place a `{XDDP_DIR}\u002Flatest-specs\u002FREADME.md` with the following content:\n```\n# 最新仕様書\n\nこのディレクトリには `\u002Fxddp-11-specs` で生成された最新仕様書を格納します。\nリポジトリ別サブディレクトリ（例: repo-a\u002F、repo-b\u002F）に分けて格納します。\nクロスリポジトリのインタフェース仕様は cross\u002Finterfaces\u002F に格納します。\n初回の `xddp-04-specout` 実行時は空でも問題ありません。\n```\n\n### 3.6. Attach reference requirements file (if provided)\n（Step 3 が冪等性ガードでスキップされた場合は、本ステップもスキップする。）\nIf `REQ_FILE` is set:\n- Copy `REQ_FILE` as-is into `{CR_PATH}\u002F01_requirements\u002F`, keeping its original filename.\n  - If the source filename is literally `REQ-{CR}.md`（Step 3で作成したファイルと衝突する場合）→ 拡張子の前に `-original` を付与してリネームコピーする（例: `REQ-{CR}-original.md`）。\n- Append the following line to `{CR_PATH}\u002F01_requirements\u002FREQ-{CR}.md`. 挿入位置は **メタデータ最終行 `**版数：** 1.0` の直後、最初の `---` の前** の1箇所に固定する（記入ガイダンス blockquote より前）:\n  ```\n  **参照:** \u003C{コピー後のファイル名}を参照>\n  ```\nIf `REQ_FILE` is not set → skip Step 3.6 entirely（参照注記は追加しない）。\n\n### 4. Create xddp.config.md (if not exists)\nCheck if `xddp.config.md` exists in the current working directory.\nIf not found, copy `~\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002Fxddp.config.md` to `.\u002Fxddp.config.md`.\nIf already exists, leave it untouched.\n\n### 4.5. Create DOCS_DIR structure (if not exists)\n\n1. Read `DOCS_DIR` from `xddp.config.md` (just created\u002Fconfirmed in Step 4).\n   Default: `baseline_docs` if the key is absent.\n   Let `DOCS` = resolved absolute path of `{cwd}\u002F{DOCS_DIR}`.\n2. Read `REPOS:` mapping from `xddp.config.md`. Let `REPOS_KEYS` = list of all repository names.\n   If `REPOS:` is absent or empty, show: \"xddp.config.md の REPOS: を設定してから再実行してください。\"\n   and skip Step 4.5 (skip DOCS_DIR init and continue).\n3. If `{DOCS}` does not exist → create the following:\n   - For each `{repo}` in `REPOS_KEYS`:\n     - `{DOCS}\u002F{repo}\u002Fspecs\u002FREADME.md` (initial content: see below)\n     - `{DOCS}\u002F{repo}\u002Fknowledge\u002Flessons-learned.md` (empty table)\n     - `{DOCS}\u002F{repo}\u002Fcrs\u002FREADME.md` (initial content: see below)\n     - `{DOCS}\u002F{repo}\u002Ftest\u002FREADME.md` (initial content: see below)\n4. If `{DOCS}` exists → for each `{repo}` in `REPOS_KEYS`:\n   - If `{DOCS}\u002F{repo}\u002F` does not exist → create only:\n     - `{DOCS}\u002F{repo}\u002Fspecs\u002FREADME.md`\n     - `{DOCS}\u002F{repo}\u002Fknowledge\u002Flessons-learned.md`\n     - `{DOCS}\u002F{repo}\u002Fcrs\u002FREADME.md`\n     - `{DOCS}\u002F{repo}\u002Ftest\u002FREADME.md`\n5. If `{DOCS}` and all per-repo dirs exist → skip.\n6. If 3. or 4. created anything, or `{DOCS}\u002FAI_INDEX.md` does not exist → run:\n   `PY=$(command -v python3 || command -v python) && \"$PY\" ~\u002F.claude\u002Fskills\u002Fxddp-common\u002Fscripts\u002Fai_index.py build --docs {DOCS} --repos-keys {REPOS_KEYS をカンマ区切り} {REPOS_KEYS が2件以上の場合のみ}--is-multi`\n   If it fails, show stderr and continue（AI_INDEX は後の close・survey・update-knowledge か `ai_index.py build` の再実行で作られる）.\n   （5. で AI_INDEX.md もある場合は build しない。2. で Step 4.5 をスキップした場合は 6. も行わない）\n\n**Initial file contents:**\n\n`{DOCS}\u002F{repo}\u002Fspecs\u002FREADME.md` (substitute actual {repo} name):\n````markdown\n# 承認済み仕様書: {repo}\nxddp-close で latest-specs\u002F{repo}\u002F から昇格した承認済みの最新仕様書を格納します。\n````\n\n`{DOCS}\u002F{repo}\u002Fcrs\u002FREADME.md`:\n````markdown\n# 変更要求仕様書アーカイブ: {repo}\nxddp-close で各 CR の変更要求仕様書（CRS）を格納します。ファイル命名規則: CRS-{CR}.md\n````\n\n`{DOCS}\u002F{repo}\u002Ftest\u002FREADME.md`:\n````markdown\n# テスト仕様書アーカイブ: {repo}\nxddp-close で各 CR の TSP を格納します。ファイル命名規則: TSP-{CR}.md\n````\n\n`{DOCS}\u002F{repo}\u002Fknowledge\u002Flessons-learned.md` (per-repository):\n````markdown\n# 知見ログ: {repo}\n> xddp-close が CR クローズ時に自動追記します。\n\n## エントリ一覧\n| ID | タイトル | タグ | CR | 日付 |\n|---|---|---|---|---|\n| （xddp-close 実行後に追記） | — | — | — | — |\n````\n\n### 4.6. Initialize project-rulebook files (knowledge hub priority)\n\nRead `REPOS:` (already read in 4.5). Let `REPOS_KEYS` = list of all repository names.\nLet `DOCS` = resolved absolute path of `{cwd}\u002F{DOCS_DIR}` (already resolved in 4.5).\n\n**【共通 project-rulebook.md の初期化】**\n- If `{XDDP_DIR}\u002Fproject-rulebook.md` does not exist:\n  - If `{DOCS}\u002Fproject-rulebook.md` exists → copy it (inherit knowledge from previous CRs).\n  - Otherwise → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-template.md`; replace `YYYY-MM-DD` with today, `CR番号` with `{CR}`.\n- If already exists → leave untouched.\n\n**【リポジトリ別 project-rulebook の初期化（REPOS: に2つ以上エントリがある場合のみ）】**\n- If `len(REPOS_KEYS) >= 2`:\n  - For each `{repo}` in `REPOS_KEYS`:\n    - If `{XDDP_DIR}\u002Fproject-rulebook-{repo}.md` does not exist:\n      - If `{DOCS}\u002F{repo}\u002Fproject-rulebook.md` exists → copy it.\n      - Otherwise → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-repo-template.md`; replace `{REPO_NAME}` with `{repo}`, `YYYY-MM-DD` with today, `{CR}` with `{CR}`.\n    - If already exists → leave untouched.\n\n**【cross\u002F project-rulebook の初期化（REPOS: に複数エントリがある場合のみ）】**\n- If `len(REPOS_KEYS) >= 2`:\n  - If `{XDDP_DIR}\u002Fproject-rulebook-cross.md` does not exist:\n    - If `{DOCS}\u002Fcross\u002Fproject-rulebook.md` exists → copy it.\n    - Otherwise → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-cross-template.md`; replace `YYYY-MM-DD` with today, `{CR}` with `{CR}`.\n  - If already exists → leave untouched.\n\n### 5. Create progress.md\n**冪等性ガード:** If `{CR_PATH}\u002Fprogress.md` already exists → do NOT overwrite it. Skip Step 5 entirely（既存CRへの再実行時に、人が手動で更新した工程ステータス（工程1の ✅ 完了 等）を保護するため。Step 3・Step 4 と同じ \"if not exists\" 方針）。\nOtherwise, read `~\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002F00_progress-management-template.md`, then create `{CR_PATH}\u002Fprogress.md`:\n- Replace all `{CR番号}` with `{CR}`.\n- Replace `{変更タイトル}` with `{TITLE}`（progress.md のタイトル欄。REQ-{CR}.md 側と同じタイトルを記入し、生プレースホルダーが残らないようにする）。\n- Replace `{CRプロファイル}` with `{CR_PROFILE}`（§3.3 で追加するヘッダ行。上記手順 0 で解決済みの値、未設定なら `full`）。\n- Set today's date as 開始日 and 最終更新.\n- Step 1 (要求書作成) → ? 進行中, 詳細ステップ → `テンプレート配置済み・要編集`, 完了日 → `-`.\n- `## 備考・メモ` セクションのプレースホルダー `{特記事項・ブロッカー・判断事項等}` を次の文言で **置換** する（追記ではなく置換。生プレースホルダーを残さない）:\n  `ℹ️ 工程1: REQ-{CR}.md はテンプレートを元に文書番号・タイトル・作成日を自動記入した状態です。内容を編集し、編集が終わったら本ファイルの工程1のステータスを手動で ✅ 完了 に更新してください。`\n- 次に実行すべきコマンド → `\u002Fxddp-02-analysis {CR}`\n- All other steps → ⬜ 未着手.\n\n### 6. Report in Japanese\nTell the user what was created and show the next command to run.\n- If Step 3 が新規に `REQ-{CR}.md` を生成した場合（冪等性ガード非発火）:\n  - `{CR_PATH}\u002F01_requirements\u002FREQ-{CR}.md` はテンプレートに文書番号・タイトル・作成日を自動記入したものです。内容を編集してから次のコマンドを実行してください。編集が終わったら `progress.md` の工程1のステータスも手動で `✅ 完了` に更新してください。\n  - If `REQ_FILE` was set: `{コピー後のファイル名}` を `01_requirements\u002F` に参照資料としてコピーし、`REQ-{CR}.md` から参照注記でリンクしました。\n- If Step 3 の冪等性ガードが発火した場合（既存 `REQ-{CR}.md` を保持した場合）:\n  - 既存の `REQ-{CR}.md` を検出したため上書きせず保持しました（テンプレートからの再生成・参照コピーの追記は行っていません）。内容を確認し、必要なら手動で編集してください。\nIf `xddp.config.md` was newly created, mention:\n- Edit `REPOS:` to list all target repositories (1 entry = single-repo, multiple entries = multi-repo).\n- `REPOS:` keys must be the actual repository folder names, not abbreviations (e.g., `api:` → NG, `tasksaas-api:` → OK).\n- `cross` is reserved and cannot be used as a repository name.\nIf project-rulebook files were newly created, mention:\n- `{XDDP_DIR}\u002Fproject-rulebook.md` — fill with project-wide naming conventions and ADRs (run `\u002Fxddp-fill-rulebook` to auto-draft).\n- If `len(REPOS_KEYS) >= 2`: `{XDDP_DIR}\u002Fproject-rulebook-{repo}.md` — fill with per-repo coding conventions (run `\u002Fxddp-fill-rulebook {repo}` to auto-draft).\n- `{XDDP_DIR}\u002Fproject-rulebook-cross.md` (if created) — fill with cross-repo interface conventions (run `\u002Fxddp-fill-rulebook cross`).\nIf `{XDDP_DIR}\u002Flatest-specs\u002F` was newly created, mention that it will be populated by `\u002Fxddp-11-specs` in per-repo subdirectories.\n","You are executing **XDDP Step 01 — Initialize CR Workspace**.\n\n**Arguments:** $ARGUMENTS\n- 1st token: CR number (e.g. `REQ-2026-001`)\n- 2nd token: title (自由記述のタイトル文字列)\n- 3rd token (optional): path to an existing requirements note (メモ・チケット・議事録等。あれば参照コピーする)\n- `--profile {full|quick}` (optional, 位置非依存): CR プロファイル（工程テーラリング）。省略時は\n  `xddp.config.md` の `CR_PROFILE`（未設定なら `full`）。下記 Step 0 で `$ARGUMENTS` から除去してから\n  位置引数を解決する\n\n---\n\n### 0. Resolve CR_PROFILE from arguments\n\n1. Scan `$ARGUMENTS` tokens for the exact string `--profile` (position-independent).\n2. If found:\n   - The next token must exist and be `full` or `quick`. If missing or invalid, report error and stop.\n   - Set `CR_PROFILE` = that value.\n   - Remove both `--profile` and its value token from `$ARGUMENTS`; the remaining tokens become the new `$ARGUMENTS` for positional parsing.\n3. If not found:\n   - Set `CR_PROFILE` from `xddp.config.md` (if exists and key is set), otherwise `full`.\n4. Validate `CR_PROFILE` is `full` or `quick`; otherwise fallback to `full` with a warning.\n5. `CR_PROFILE` は本ステップで一度だけ解決する。以降の Step 1（無引数時の対話質問）では\n   `CR_PROFILE` を再確認しない（未設定なら `full`）。\n\n**注記:** 本ステップでは `CR_PROFILE` のみを解決する。`XDDP_DIR` \u002F `REPOS` \u002F `DOCS_DIR` の解決は既存の Step 1.5 \u002F 4 \u002F 4.5 で引き続き実施するため、同じキーの重複読み込みは発生しない。\nworkspace root は `xddp.config.md` を含むディレクトリとし、Step 1.5 と一致させる。\n\nLet `CR` = 1st token, `TITLE` = 2nd token, `REQ_FILE` = 3rd token (optional).\n\n### 1. Resolve CR \u002F title (ask if missing)\n**このステップは既存 Step 1.5「Resolve XDDP_DIR」より前に実行する**（Step 1.5 が `CR_PATH = {XDDP_ABS}\u002F{CR}` を確定するため、その前に `CR` を必ず確定させる。無引数実行時に空 `CR` で `CR_PATH` を組んでしまう順序矛盾を防ぐ）。\n- If $ARGUMENTS has no tokens at all（完全な無引数実行）:\n  Ask the user in Japanese for: CR番号、タイトル、既存の要求書ファイルパス（任意。手元になければ空欄でよい旨を伝える）。\n  Set `CR`, `TITLE` from the answers. Set `REQ_FILE` from the answer only if the user provided a path.\n- Else if `CR` is set but `TITLE` is missing:\n  Ask the user in Japanese for the title only. Set `TITLE` from the answer.\n- `REQ_FILE` is never prompted for when `CR` and `TITLE` were both supplied — it remains optional in that case.\n\n### 1.5. Resolve XDDP_DIR\n\nCheck if `xddp.config.md` exists in the current working directory.\n- If exists, read it and extract `XDDP_DIR` (default: `xddp` if the key is absent).\n- If not exists (first run), use `XDDP_DIR = xddp`.\n\nResolve paths relative to the directory containing `xddp.config.md` (= workspace root).\nLet `XDDP_ABS` = resolved absolute path of `{cwd}\u002F{XDDP_DIR}`.\nLet `CR_PATH`  = `{XDDP_ABS}\u002F{CR}`.\n\n### 2. Create folder structure\nCreate directories (use `mkdir -p` via Bash):\n```\n{CR_PATH}\u002F01_requirements\u002F\n{CR_PATH}\u002F02_analysis\u002F\n{CR_PATH}\u002F03_change-requirements\u002F\n{CR_PATH}\u002F04_specout\u002F\n{CR_PATH}\u002F05_architecture\u002F\n{CR_PATH}\u002F06_design\u002F\n{CR_PATH}\u002F07_coding\u002F\n{CR_PATH}\u002F08_code-review\u002F\n{CR_PATH}\u002F09_test-spec\u002F\n{CR_PATH}\u002F10_test-results\u002F\n{CR_PATH}\u002Freview\u002F\n```\n\n### 3. Create requirements file from template\n**冪等性ガード:** If `{CR_PATH}\u002F01_requirements\u002FREQ-{CR}.md` already exists → do NOT overwrite it. Skip Step 3 and Step 3.6 entirely, and report to the user that the existing requirements file was preserved（既存CRへの再実行時に人の編集内容を保護するため。既存 Step 4「Create xddp.config.md (if not exists)」と同じ \"if not exists\" 方針）。\nOtherwise, copy `~\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002F01_req-template.md` to `{CR_PATH}\u002F01_requirements\u002FREQ-{CR}.md`.\nIn the copied file, apply the following literal text replacements:\n- `REQ-{YYYY}-{NNN}` → `{CR}`（文書番号はCR番号をそのまま機械的に流用する。連番管理は行わない）\n- `{変更タイトル}` → `{TITLE}`\n- `{YYYY-MM-DD}` → today's date（メタデータ欄の「作成日」と、末尾「8. 変更履歴」表の初版行の日付、両方の出現箇所に適用される。同じ日付でよいため区別しない）\n`{氏名}`（作成者欄・変更履歴の変更者欄）と「版数：1.0」はプレースホルダーのまま変更しない（人が編集する）。\n\n### 3.5. Create latest-specs\u002F (if not exists)\nCheck if `{XDDP_DIR}\u002Flatest-specs\u002F` exists in the current working directory.\nIf not found, create it and place a `{XDDP_DIR}\u002Flatest-specs\u002FREADME.md` with the following content:\n```\n# 最新仕様書\n\nこのディレクトリには `\u002Fxddp-11-specs` で生成された最新仕様書を格納します。\nリポジトリ別サブディレクトリ（例: repo-a\u002F、repo-b\u002F）に分けて格納します。\nクロスリポジトリのインタフェース仕様は cross\u002Finterfaces\u002F に格納します。\n初回の `xddp-04-specout` 実行時は空でも問題ありません。\n```\n\n### 3.6. Attach reference requirements file (if provided)\n（Step 3 が冪等性ガードでスキップされた場合は、本ステップもスキップする。）\nIf `REQ_FILE` is set:\n- Copy `REQ_FILE` as-is into `{CR_PATH}\u002F01_requirements\u002F`, keeping its original filename.\n  - If the source filename is literally `REQ-{CR}.md`（Step 3で作成したファイルと衝突する場合）→ 拡張子の前に `-original` を付与してリネームコピーする（例: `REQ-{CR}-original.md`）。\n- Append the following line to `{CR_PATH}\u002F01_requirements\u002FREQ-{CR}.md`. 挿入位置は **メタデータ最終行 `**版数：** 1.0` の直後、最初の `---` の前** の1箇所に固定する（記入ガイダンス blockquote より前）:\n  ```\n  **参照:** \u003C{コピー後のファイル名}を参照>\n  ```\nIf `REQ_FILE` is not set → skip Step 3.6 entirely（参照注記は追加しない）。\n\n### 4. Create xddp.config.md (if not exists)\nCheck if `xddp.config.md` exists in the current working directory.\nIf not found, copy `~\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002Fxddp.config.md` to `.\u002Fxddp.config.md`.\nIf already exists, leave it untouched.\n\n### 4.5. Create DOCS_DIR structure (if not exists)\n\n1. Read `DOCS_DIR` from `xddp.config.md` (just created\u002Fconfirmed in Step 4).\n   Default: `baseline_docs` if the key is absent.\n   Let `DOCS` = resolved absolute path of `{cwd}\u002F{DOCS_DIR}`.\n2. Read `REPOS:` mapping from `xddp.config.md`. Let `REPOS_KEYS` = list of all repository names.\n   If `REPOS:` is absent or empty, show: \"xddp.config.md の REPOS: を設定してから再実行してください。\"\n   and skip Step 4.5 (skip DOCS_DIR init and continue).\n3. If `{DOCS}` does not exist → create the following:\n   - For each `{repo}` in `REPOS_KEYS`:\n     - `{DOCS}\u002F{repo}\u002Fspecs\u002FREADME.md` (initial content: see below)\n     - `{DOCS}\u002F{repo}\u002Fknowledge\u002Flessons-learned.md` (empty table)\n     - `{DOCS}\u002F{repo}\u002Fcrs\u002FREADME.md` (initial content: see below)\n     - `{DOCS}\u002F{repo}\u002Ftest\u002FREADME.md` (initial content: see below)\n4. If `{DOCS}` exists → for each `{repo}` in `REPOS_KEYS`:\n   - If `{DOCS}\u002F{repo}\u002F` does not exist → create only:\n     - `{DOCS}\u002F{repo}\u002Fspecs\u002FREADME.md`\n     - `{DOCS}\u002F{repo}\u002Fknowledge\u002Flessons-learned.md`\n     - `{DOCS}\u002F{repo}\u002Fcrs\u002FREADME.md`\n     - `{DOCS}\u002F{repo}\u002Ftest\u002FREADME.md`\n5. If `{DOCS}` and all per-repo dirs exist → skip.\n6. If 3. or 4. created anything, or `{DOCS}\u002FAI_INDEX.md` does not exist → run:\n   `PY=$(command -v python3 || command -v python) && \"$PY\" ~\u002F.claude\u002Fskills\u002Fxddp-common\u002Fscripts\u002Fai_index.py build --docs {DOCS} --repos-keys {REPOS_KEYS をカンマ区切り} {REPOS_KEYS が2件以上の場合のみ}--is-multi`\n   If it fails, show stderr and continue（AI_INDEX は後の close・survey・update-knowledge か `ai_index.py build` の再実行で作られる）.\n   （5. で AI_INDEX.md もある場合は build しない。2. で Step 4.5 をスキップした場合は 6. も行わない）\n\n**Initial file contents:**\n\n`{DOCS}\u002F{repo}\u002Fspecs\u002FREADME.md` (substitute actual {repo} name):\n````markdown\n# 承認済み仕様書: {repo}\nxddp-close で latest-specs\u002F{repo}\u002F から昇格した承認済みの最新仕様書を格納します。\n````\n\n`{DOCS}\u002F{repo}\u002Fcrs\u002FREADME.md`:\n````markdown\n# 変更要求仕様書アーカイブ: {repo}\nxddp-close で各 CR の変更要求仕様書（CRS）を格納します。ファイル命名規則: CRS-{CR}.md\n````\n\n`{DOCS}\u002F{repo}\u002Ftest\u002FREADME.md`:\n````markdown\n# テスト仕様書アーカイブ: {repo}\nxddp-close で各 CR の TSP を格納します。ファイル命名規則: TSP-{CR}.md\n````\n\n`{DOCS}\u002F{repo}\u002Fknowledge\u002Flessons-learned.md` (per-repository):\n````markdown\n# 知見ログ: {repo}\n> xddp-close が CR クローズ時に自動追記します。\n\n## エントリ一覧\n| ID | タイトル | タグ | CR | 日付 |\n|---|---|---|---|---|\n| （xddp-close 実行後に追記） | — | — | — | — |\n````\n\n### 4.6. Initialize project-rulebook files (knowledge hub priority)\n\nRead `REPOS:` (already read in 4.5). Let `REPOS_KEYS` = list of all repository names.\nLet `DOCS` = resolved absolute path of `{cwd}\u002F{DOCS_DIR}` (already resolved in 4.5).\n\n**【共通 project-rulebook.md の初期化】**\n- If `{XDDP_DIR}\u002Fproject-rulebook.md` does not exist:\n  - If `{DOCS}\u002Fproject-rulebook.md` exists → copy it (inherit knowledge from previous CRs).\n  - Otherwise → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-template.md`; replace `YYYY-MM-DD` with today, `CR番号` with `{CR}`.\n- If already exists → leave untouched.\n\n**【リポジトリ別 project-rulebook の初期化（REPOS: に2つ以上エントリがある場合のみ）】**\n- If `len(REPOS_KEYS) >= 2`:\n  - For each `{repo}` in `REPOS_KEYS`:\n    - If `{XDDP_DIR}\u002Fproject-rulebook-{repo}.md` does not exist:\n      - If `{DOCS}\u002F{repo}\u002Fproject-rulebook.md` exists → copy it.\n      - Otherwise → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-repo-template.md`; replace `{REPO_NAME}` with `{repo}`, `YYYY-MM-DD` with today, `{CR}` with `{CR}`.\n    - If already exists → leave untouched.\n\n**【cross\u002F project-rulebook の初期化（REPOS: に複数エントリがある場合のみ）】**\n- If `len(REPOS_KEYS) >= 2`:\n  - If `{XDDP_DIR}\u002Fproject-rulebook-cross.md` does not exist:\n    - If `{DOCS}\u002Fcross\u002Fproject-rulebook.md` exists → copy it.\n    - Otherwise → copy `~\u002F.claude\u002Fskills\u002Fxddp-common\u002Ftemplates\u002Fproject-rulebook-cross-template.md`; replace `YYYY-MM-DD` with today, `{CR}` with `{CR}`.\n  - If already exists → leave untouched.\n\n### 5. Create progress.md\n**冪等性ガード:** If `{CR_PATH}\u002Fprogress.md` already exists → do NOT overwrite it. Skip Step 5 entirely（既存CRへの再実行時に、人が手動で更新した工程ステータス（工程1の ✅ 完了 等）を保護するため。Step 3・Step 4 と同じ \"if not exists\" 方針）。\nOtherwise, read `~\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002F00_progress-management-template.md`, then create `{CR_PATH}\u002Fprogress.md`:\n- Replace all `{CR番号}` with `{CR}`.\n- Replace `{変更タイトル}` with `{TITLE}`（progress.md のタイトル欄。REQ-{CR}.md 側と同じタイトルを記入し、生プレースホルダーが残らないようにする）。\n- Replace `{CRプロファイル}` with `{CR_PROFILE}`（§3.3 で追加するヘッダ行。上記手順 0 で解決済みの値、未設定なら `full`）。\n- Set today's date as 開始日 and 最終更新.\n- Step 1 (要求書作成) → ? 進行中, 詳細ステップ → `テンプレート配置済み・要編集`, 完了日 → `-`.\n- `## 備考・メモ` セクションのプレースホルダー `{特記事項・ブロッカー・判断事項等}` を次の文言で **置換** する（追記ではなく置換。生プレースホルダーを残さない）:\n  `ℹ️ 工程1: REQ-{CR}.md はテンプレートを元に文書番号・タイトル・作成日を自動記入した状態です。内容を編集し、編集が終わったら本ファイルの工程1のステータスを手動で ✅ 完了 に更新してください。`\n- 次に実行すべきコマンド → `\u002Fxddp-02-analysis {CR}`\n- All other steps → ⬜ 未着手.\n\n### 6. Report in Japanese\nTell the user what was created and show the next command to run.\n- If Step 3 が新規に `REQ-{CR}.md` を生成した場合（冪等性ガード非発火）:\n  - `{CR_PATH}\u002F01_requirements\u002FREQ-{CR}.md` はテンプレートに文書番号・タイトル・作成日を自動記入したものです。内容を編集してから次のコマンドを実行してください。編集が終わったら `progress.md` の工程1のステータスも手動で `✅ 完了` に更新してください。\n  - If `REQ_FILE` was set: `{コピー後のファイル名}` を `01_requirements\u002F` に参照資料としてコピーし、`REQ-{CR}.md` から参照注記でリンクしました。\n- If Step 3 の冪等性ガードが発火した場合（既存 `REQ-{CR}.md` を保持した場合）:\n  - 既存の `REQ-{CR}.md` を検出したため上書きせず保持しました（テンプレートからの再生成・参照コピーの追記は行っていません）。内容を確認し、必要なら手動で編集してください。\nIf `xddp.config.md` was newly created, mention:\n- Edit `REPOS:` to list all target repositories (1 entry = single-repo, multiple entries = multi-repo).\n- `REPOS:` keys must be the actual repository folder names, not abbreviations (e.g., `api:` → NG, `tasksaas-api:` → OK).\n- `cross` is reserved and cannot be used as a repository name.\nIf project-rulebook files were newly created, mention:\n- `{XDDP_DIR}\u002Fproject-rulebook.md` — fill with project-wide naming conventions and ADRs (run `\u002Fxddp-fill-rulebook` to auto-draft).\n- If `len(REPOS_KEYS) >= 2`: `{XDDP_DIR}\u002Fproject-rulebook-{repo}.md` — fill with per-repo coding conventions (run `\u002Fxddp-fill-rulebook {repo}` to auto-draft).\n- `{XDDP_DIR}\u002Fproject-rulebook-cross.md` (if created) — fill with cross-repo interface conventions (run `\u002Fxddp-fill-rulebook cross`).\nIf `{XDDP_DIR}\u002Flatest-specs\u002F` was newly created, mention that it will be populated by `\u002Fxddp-11-specs` in per-repo subdirectories.\n",{},"main","c15454fe190ba8cf0d4fe93871d77bf4e8dffabf","ClaudeCode\u002F.claude\u002Fskills\u002Fxddp-01-init",0,"https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings","https:\u002F\u002Fgithub.com\u002Ftsuna44","2026-11-08 08:45:39",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add tsuna44\u002FXddpSettings --skill xddp-01-init",{"tool":37,"command":38},"bunx","bunx skills add tsuna44\u002FXddpSettings --skill xddp-01-init",{"tool":40,"command":41},"pnpm","pnpm dlx skills add tsuna44\u002FXddpSettings --skill xddp-01-init","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-01-init\u002FSKILL.md",true,[45,51,55],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"templates\u002F00_progress-management-template.md","REFERENCE","参考文档",2876,"https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002F00_progress-management-template.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"templates\u002F01_req-template.md",5300,"https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002F01_req-template.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"templates\u002Fxddp.config.md",42564,"https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-01-init\u002Ftemplates\u002Fxddp.config.md",[60,68,75,83,90,109],{"skillNo":61,"name":62,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M6MDVNN0ZX8D5KABK9G0067Z","demo.skill","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002Ftools\u002Fharness\u002Ftests\u002Ffixtures\u002Fbadrepo\u002FClaudeCode\u002F.claude\u002Fskills\u002Fdemo.skill\u002FSKILL.md",[],[66,67],"demo skill","demo",{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M6MDVK20HAJYBMXM7VX50A3J","demo.noname","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002Ftools\u002Fharness\u002Ftests\u002Ffixtures\u002Fbadrepo\u002FClaudeCode\u002F.claude\u002Fskills\u002Fdemo.noname\u002FSKILL.md",[],[74,67],"demo noname",{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M6MDVFS20532JT4V7WT779XH","demo.common","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002Ftools\u002Fharness\u002Ftests\u002Ffixtures\u002Fbadrepo\u002FClaudeCode\u002F.claude\u002Fskills\u002Fdemo.common\u002FSKILL.md",[],[81,82,67],"demo common","common",{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M6MDVCV2JFN66NJTFG1CCJS1","demo.badname","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002Ftools\u002Fharness\u002Ftests\u002Ffixtures\u002Fbadrepo\u002FClaudeCode\u002F.claude\u002Fskills\u002Fdemo.badname\u002FSKILL.md",[],[89,67],"demo badname",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"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",[],[97,98,99,100,101,102,103,104,105,106,107,108],"xddp update knowledge","update knowledge","knowledge","update","note","structure","constraint","lesson","glossary","baseline","flow","docs",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M6MDV2Q1Z02WAN4CZ2WVFZ27","xddp-sync-design","コードから DSN を再生成してリビジョンとして記録し、AIレビュー→人承認を実施する。「設計を同期して」「DSN を更新して」などで起動する。","https:\u002F\u002Fgithub.com\u002Ftsuna44\u002FXddpSettings\u002Fblob\u002Fmain\u002FClaudeCode\u002F.claude\u002Fskills\u002Fxddp-sync-design\u002FSKILL.md",[],[116,117,118,119],"sync","xddp sync design","design","生成"]