@k2works/claude-code-booster 5.1.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/assets/.claude/skills/migrating-ai-dlc/SKILL.md +243 -0
- package/lib/assets/.claude/skills/migrating-ai-dlc/evals/evals.json +60 -0
- package/lib/assets/.claude/skills/migrating-ai-dlc/references/artifact-templates.md +258 -0
- package/lib/assets/.claude/skills/migrating-ai-dlc/scripts/aidlc_check.py +372 -0
- package/lib/assets/CLAUDE.md +23 -1
- package/lib/assets/docs/index.md +37 -37
- package/lib/assets/docs/log.md +15 -0
- package/lib/assets/docs/reference/AI-DLC/345/260/216/345/205/245/343/202/254/343/202/244/343/203/211.md +782 -0
- package/lib/assets/docs/reference/AI-DLC/347/224/250/350/252/236/351/233/206.md +207 -0
- package/lib/assets/docs/reference/index.md +6 -0
- package/lib/assets/docs/reference//343/202/263/343/203/274/343/203/207/343/202/243/343/203/263/343/202/260/343/201/250/343/203/206/343/202/271/343/203/210/343/202/254/343/202/244/343/203/211_AI-DLC/347/211/210.md +981 -0
- package/lib/assets/docs/reference//343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/344/275/234/346/210/220/343/202/254/343/202/244/343/203/211_AI-DLC/347/211/210.md +1167 -0
- package/lib/assets/docs/reference//343/203/252/343/203/252/343/203/274/343/202/271/343/203/273/343/202/244/343/203/206/343/203/254/343/203/274/343/202/267/343/203/247/343/203/263/350/250/210/347/224/273/343/202/254/343/202/244/343/203/211_AI-DLC/347/211/210.md +793 -0
- package/lib/assets/docs/reference//351/226/213/347/231/272/343/202/254/343/202/244/343/203/211_AI-DLC/347/211/210.md +492 -0
- package/lib/assets/gulpfile.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""AI-DLC 移行の適合性検査。
|
|
3
|
+
|
|
4
|
+
対象プロジェクトの docs/ と CLAUDE.md、apps/、各スキルの PROJECT.md を読み、
|
|
5
|
+
AI-DLC の運用に必要な成果物とガードレールが揃っているかを報告する。
|
|
6
|
+
|
|
7
|
+
ERROR: 移行が完了していない(必須の成果物が無い)
|
|
8
|
+
WARN : 運用の中で埋めればよい(欄の欠け、割合の不足、承認記録・索引の漏れ、成果物間の矛盾の一部)
|
|
9
|
+
|
|
10
|
+
本スクリプトはファイルとキーワードの有無を見る。成果物同士の矛盾や中身の妥当性の多くは
|
|
11
|
+
見ないので、SKILL.md の「スクリプトが見ない点を読んで確かめる」に従って人が読む。
|
|
12
|
+
|
|
13
|
+
使い方:
|
|
14
|
+
python aidlc_check.py --project <project> [--docs docs] [--apps apps] [--claude-md CLAUDE.md] [--skills .claude/skills]
|
|
15
|
+
--project を省略すると docs/<category>/ 直下を単一プロジェクトとして検査する。
|
|
16
|
+
終了コード: ERROR があれば 1、無ければ 0。
|
|
17
|
+
"""
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import argparse
|
|
21
|
+
import re
|
|
22
|
+
import sys
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
REQUIRED_GUIDES = [
|
|
26
|
+
"AI-DLC導入ガイド.md",
|
|
27
|
+
"開発ガイド_AI-DLC版.md",
|
|
28
|
+
"リリース・イテレーション計画ガイド_AI-DLC版.md",
|
|
29
|
+
"ユースケース作成ガイド_AI-DLC版.md",
|
|
30
|
+
"コーディングとテストガイド_AI-DLC版.md",
|
|
31
|
+
"AI-DLC用語集.md",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
UNIT_FIELDS = ["目的", "ストーリー", "NFR", "リスク", "測定基準", "推奨 Bolt", "エントロピー", "AI の仮定"]
|
|
35
|
+
|
|
36
|
+
TDD_KEYWORDS = ["三原則", "Three Laws", "失敗するテスト"]
|
|
37
|
+
|
|
38
|
+
FRONTEND_FILES = {"package.json"}
|
|
39
|
+
FRONTEND_EXTS = {".tsx", ".jsx", ".vue", ".svelte"}
|
|
40
|
+
|
|
41
|
+
NON_STORY_DOCS = {"index.md", "units.md", "risk_register.md"}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class Report:
|
|
45
|
+
def __init__(self) -> None:
|
|
46
|
+
self.errors: list[str] = []
|
|
47
|
+
self.warns: list[str] = []
|
|
48
|
+
self.oks: list[str] = []
|
|
49
|
+
|
|
50
|
+
def error(self, msg: str) -> None:
|
|
51
|
+
self.errors.append(msg)
|
|
52
|
+
|
|
53
|
+
def warn(self, msg: str) -> None:
|
|
54
|
+
self.warns.append(msg)
|
|
55
|
+
|
|
56
|
+
def ok(self, msg: str) -> None:
|
|
57
|
+
self.oks.append(msg)
|
|
58
|
+
|
|
59
|
+
def print(self) -> None:
|
|
60
|
+
for m in self.oks:
|
|
61
|
+
print(f"OK {m}")
|
|
62
|
+
for m in self.warns:
|
|
63
|
+
print(f"WARN {m}")
|
|
64
|
+
for m in self.errors:
|
|
65
|
+
print(f"ERROR {m}")
|
|
66
|
+
print()
|
|
67
|
+
print(f"ERROR {len(self.errors)} / WARN {len(self.warns)}")
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def read(path: Path) -> str:
|
|
71
|
+
try:
|
|
72
|
+
return path.read_text(encoding="utf-8")
|
|
73
|
+
except (FileNotFoundError, IsADirectoryError, UnicodeDecodeError):
|
|
74
|
+
return ""
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def project_dir(base: Path, project: str | None) -> Path:
|
|
78
|
+
return base / project if project else base
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def frontmatter(text: str) -> str:
|
|
82
|
+
if not text.startswith("---"):
|
|
83
|
+
return ""
|
|
84
|
+
parts = text.split("---", 2)
|
|
85
|
+
return parts[1] if len(parts) >= 3 else ""
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def check_claude_md(rep: Report, claude_md: Path) -> None:
|
|
89
|
+
text = read(claude_md)
|
|
90
|
+
if not text:
|
|
91
|
+
rep.error(f"{claude_md}: 見つからない")
|
|
92
|
+
return
|
|
93
|
+
if "AI-DLC を採用" in text:
|
|
94
|
+
rep.ok(f"{claude_md}: AI-DLC 採用の節がある")
|
|
95
|
+
else:
|
|
96
|
+
rep.error(f"{claude_md}: 「AI-DLC を採用する」節が無い(移行ステップ 1)")
|
|
97
|
+
if "開発ガイド_AI-DLC版.md" in text:
|
|
98
|
+
rep.ok(f"{claude_md}: ペルソナが開発ガイド(AI-DLC 版)を参照している")
|
|
99
|
+
else:
|
|
100
|
+
rep.warn(f"{claude_md}: ペルソナの参照先が開発ガイド(AI-DLC 版)になっていない(移行ステップ 1)")
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def check_guides(rep: Report, docs: Path) -> None:
|
|
104
|
+
ref = docs / "reference"
|
|
105
|
+
missing = [g for g in REQUIRED_GUIDES if not (ref / g).exists()]
|
|
106
|
+
if missing:
|
|
107
|
+
rep.error(f"{ref}: AI-DLC ガイドが不足: {', '.join(missing)}(npx boost --update を先に実行する)")
|
|
108
|
+
else:
|
|
109
|
+
rep.ok(f"{ref}: AI-DLC ガイド {len(REQUIRED_GUIDES)} 本が揃っている")
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def check_migration_plan(rep: Report, docs: Path, project: str | None) -> None:
|
|
113
|
+
path = project_dir(docs / "development", project) / "aidlc_migration_plan.md"
|
|
114
|
+
if path.exists():
|
|
115
|
+
rep.ok(f"{path}: 移行計画がある")
|
|
116
|
+
else:
|
|
117
|
+
rep.warn(f"{path}: 移行計画が無い(--plan で作る)")
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def check_risk_register(rep: Report, docs: Path, project: str | None) -> None:
|
|
121
|
+
path = project_dir(docs / "requirements", project) / "risk_register.md"
|
|
122
|
+
text = read(path)
|
|
123
|
+
if not text:
|
|
124
|
+
rep.error(f"{path}: 見つからない(移行ステップ 2)")
|
|
125
|
+
return
|
|
126
|
+
rep.ok(f"{path}: ある")
|
|
127
|
+
if "In/Out" in text or "渡せる範囲" in text or "渡せない" in text:
|
|
128
|
+
rep.ok(f"{path}: AI に渡せる範囲が書かれている")
|
|
129
|
+
else:
|
|
130
|
+
rep.error(f"{path}: AI に渡せる範囲(In/Out)が書かれていない(移行ステップ 2)")
|
|
131
|
+
if "確認必須" in text:
|
|
132
|
+
rep.ok(f"{path}: 確認必須の操作が書かれている")
|
|
133
|
+
else:
|
|
134
|
+
rep.error(f"{path}: 確認必須の操作が書かれていない(移行ステップ 2)")
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def check_glossary(rep: Report, docs: Path, project: str | None) -> None:
|
|
138
|
+
ddir = project_dir(docs / "design", project)
|
|
139
|
+
candidates = (list(ddir.glob("*glossary*.md")) + list(ddir.glob("*用語集*.md"))) if ddir.exists() else []
|
|
140
|
+
if candidates:
|
|
141
|
+
rep.ok(f"{candidates[0]}: ドメイン用語集がある")
|
|
142
|
+
else:
|
|
143
|
+
rep.warn(f"{ddir}: ドメイン用語集(glossary.md)が無い(移行ステップ 3)")
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def app_dirs(apps: Path, project: str | None) -> list[Path]:
|
|
147
|
+
if not apps.exists():
|
|
148
|
+
return []
|
|
149
|
+
if project:
|
|
150
|
+
return [d for d in sorted(apps.iterdir()) if d.is_dir() and d.name.startswith(project)]
|
|
151
|
+
return [apps]
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def has_frontend(dirs: list[Path]) -> bool:
|
|
155
|
+
for d in dirs:
|
|
156
|
+
for p in d.rglob("*"):
|
|
157
|
+
if "node_modules" in p.parts:
|
|
158
|
+
return True
|
|
159
|
+
if p.is_file() and (p.name in FRONTEND_FILES or p.suffix in FRONTEND_EXTS):
|
|
160
|
+
return True
|
|
161
|
+
return False
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def check_brownfield(rep: Report, docs: Path, dirs: list[Path], project: str | None) -> None:
|
|
165
|
+
if not any(any(p.is_file() for p in d.rglob("*")) for d in dirs):
|
|
166
|
+
rep.ok("apps: コード無し(グリーンフィールド)。静的・動的モデルは不要")
|
|
167
|
+
return
|
|
168
|
+
ddir = project_dir(docs / "design", project)
|
|
169
|
+
static = (list(ddir.glob("*static*.md")) + list(ddir.glob("*静的モデル*.md"))) if ddir.exists() else []
|
|
170
|
+
dynamic = (list(ddir.glob("*dynamic*.md")) + list(ddir.glob("*動的モデル*.md"))) if ddir.exists() else []
|
|
171
|
+
if static and dynamic:
|
|
172
|
+
rep.ok(f"{ddir}: 静的モデルと動的モデルがある")
|
|
173
|
+
else:
|
|
174
|
+
rep.warn(f"{ddir}: ブラウンフィールドだが静的・動的モデルが揃っていない(移行ステップ 4)")
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def story_sections(text: str, id_pattern: re.Pattern) -> dict[str, str]:
|
|
178
|
+
"""見出しにストーリー ID を含む節を ID ごとに返す。"""
|
|
179
|
+
sections: dict[str, str] = {}
|
|
180
|
+
parts = re.split(r"^(#{1,4}\s+.*)$", text, flags=re.M)
|
|
181
|
+
# parts = [前置き, 見出し1, 本文1, 見出し2, 本文2, ...]
|
|
182
|
+
for i in range(1, len(parts) - 1, 2):
|
|
183
|
+
heading, body = parts[i], parts[i + 1]
|
|
184
|
+
m = id_pattern.search(heading)
|
|
185
|
+
if m:
|
|
186
|
+
sections[m.group(0)] = sections.get(m.group(0), "") + body
|
|
187
|
+
return sections
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def check_stories(rep: Report, docs: Path, project: str | None, id_pattern: re.Pattern) -> None:
|
|
191
|
+
rdir = project_dir(docs / "requirements", project)
|
|
192
|
+
if not rdir.exists():
|
|
193
|
+
rep.warn(f"{rdir}: requirements ディレクトリが無い")
|
|
194
|
+
return
|
|
195
|
+
files = [p for p in rdir.glob("*.md") if p.name not in NON_STORY_DOCS]
|
|
196
|
+
all_ids: set[str] = set()
|
|
197
|
+
sections: dict[str, str] = {}
|
|
198
|
+
for p in files:
|
|
199
|
+
t = read(p)
|
|
200
|
+
all_ids.update(id_pattern.findall(t))
|
|
201
|
+
for k, v in story_sections(t, id_pattern).items():
|
|
202
|
+
sections[k] = sections.get(k, "") + v
|
|
203
|
+
if not all_ids:
|
|
204
|
+
rep.warn(f"{rdir}: ストーリー ID({id_pattern.pattern})が見つからない。--story-id で ID の形式を指定する")
|
|
205
|
+
return
|
|
206
|
+
with_ac = sorted(i for i, s in sections.items() if "受入条件" in s or "受け入れ条件" in s)
|
|
207
|
+
with_gwt = sorted(i for i in with_ac if re.search(r"Given.*When.*Then", sections[i], flags=re.S))
|
|
208
|
+
total = len(all_ids)
|
|
209
|
+
msg = f"{rdir}: ストーリー {total} 本のうち受入条件あり {len(with_ac)} 本、Given/When/Then {len(with_gwt)} 本"
|
|
210
|
+
if len(with_gwt) == total:
|
|
211
|
+
rep.ok(msg)
|
|
212
|
+
else:
|
|
213
|
+
rep.warn(msg + "(移行ステップ 5)")
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def check_units(rep: Report, docs: Path, project: str | None, id_pattern: re.Pattern) -> set[str]:
|
|
217
|
+
"""units.md を検査し、未配置のストーリー ID を返す。"""
|
|
218
|
+
units = project_dir(docs / "requirements", project) / "units.md"
|
|
219
|
+
text = read(units)
|
|
220
|
+
if not text:
|
|
221
|
+
rep.error(f"{units}: 見つからない(移行ステップ 6)")
|
|
222
|
+
return set()
|
|
223
|
+
rep.ok(f"{units}: ある")
|
|
224
|
+
sections = re.split(r"^###\s+", text, flags=re.M)[1:]
|
|
225
|
+
unit_sections = [s for s in sections if re.match(r"(U-\d+|Unit)", s)]
|
|
226
|
+
if not unit_sections:
|
|
227
|
+
rep.warn(f"{units}: Unit の見出し(### U-01:…)が見つからない")
|
|
228
|
+
for s in unit_sections:
|
|
229
|
+
name = s.splitlines()[0].strip()
|
|
230
|
+
lacking = [f for f in UNIT_FIELDS if f not in s]
|
|
231
|
+
if lacking:
|
|
232
|
+
rep.warn(f"{units}: {name} に欄が欠けている: {', '.join(lacking)}(移行ステップ 6)")
|
|
233
|
+
if "依存 DAG" in text or "依存DAG" in text:
|
|
234
|
+
rep.ok(f"{units}: 依存 DAG がある")
|
|
235
|
+
else:
|
|
236
|
+
rep.warn(f"{units}: 依存 DAG が無い(移行ステップ 6)")
|
|
237
|
+
if "ストーリーマップ" in text:
|
|
238
|
+
rep.ok(f"{units}: ストーリーマップがある")
|
|
239
|
+
else:
|
|
240
|
+
rep.warn(f"{units}: ストーリーマップが無い(移行ステップ 6)")
|
|
241
|
+
unplaced: set[str] = set()
|
|
242
|
+
for line in text.splitlines():
|
|
243
|
+
if "未配置" in line:
|
|
244
|
+
unplaced.update(id_pattern.findall(line))
|
|
245
|
+
return unplaced
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def check_release_plan(rep: Report, docs: Path, project: str | None, unplaced: set[str]) -> None:
|
|
249
|
+
ddir = project_dir(docs / "development", project)
|
|
250
|
+
path = ddir / "release_plan.md"
|
|
251
|
+
text = read(path)
|
|
252
|
+
if not text:
|
|
253
|
+
rep.warn(f"{path}: 見つからない")
|
|
254
|
+
return
|
|
255
|
+
if "エントロピー" in text:
|
|
256
|
+
rep.ok(f"{path}: エントロピー評価がある")
|
|
257
|
+
else:
|
|
258
|
+
rep.warn(f"{path}: エントロピー評価が無い(移行ステップ 7)")
|
|
259
|
+
if "テスト戦略" in text:
|
|
260
|
+
rep.ok(f"{path}: テスト戦略の選択がある")
|
|
261
|
+
else:
|
|
262
|
+
rep.warn(f"{path}: テスト戦略の選択が無い(移行ステップ 7)")
|
|
263
|
+
scheduled = sorted(i for i in unplaced if re.search(re.escape(i) + r"(?!\d)", text))
|
|
264
|
+
if scheduled:
|
|
265
|
+
rep.warn(f"{path}: units.md で未配置のストーリーが計画に割り当てられている: {', '.join(scheduled)}(移行ステップ 6・7)")
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
def check_bolt_plans(rep: Report, docs: Path, project: str | None) -> None:
|
|
269
|
+
ddir = project_dir(docs / "development", project)
|
|
270
|
+
plans = sorted(ddir.glob("bolt_plan-*.md")) if ddir.exists() else []
|
|
271
|
+
if not plans:
|
|
272
|
+
rep.warn(f"{ddir}: bolt_plan-N.md が無い(移行ステップ 8。進行中のイテレーションが無ければ不要)")
|
|
273
|
+
return
|
|
274
|
+
for p in plans:
|
|
275
|
+
t = read(p)
|
|
276
|
+
lacking = [label for key, label in (("仮説", "確認したい仮説"), ("ゲート", "ゲート密度")) if key not in t]
|
|
277
|
+
if lacking:
|
|
278
|
+
rep.warn(f"{p}: 欠けている: {', '.join(lacking)}(移行ステップ 8)")
|
|
279
|
+
else:
|
|
280
|
+
rep.ok(f"{p}: 仮説とゲート密度がある")
|
|
281
|
+
n = p.stem.split("-")[-1]
|
|
282
|
+
old = ddir / f"iteration_plan-{n}.md"
|
|
283
|
+
if old.exists() and "deprecated" not in frontmatter(read(old)):
|
|
284
|
+
rep.warn(f"{old}: bolt_plan-{n}.md に読み替えたが deprecated になっていない(移行ステップ 8)")
|
|
285
|
+
if not any("ウォーキングスケルトン" in read(p) for p in plans):
|
|
286
|
+
rep.warn(f"{ddir}: ウォーキングスケルトンを明記した Bolt 計画が無い(移行ステップ 8)")
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
def migration_artifacts(docs: Path, project: str | None) -> list[Path]:
|
|
290
|
+
req = project_dir(docs / "requirements", project)
|
|
291
|
+
des = project_dir(docs / "design", project)
|
|
292
|
+
dev = project_dir(docs / "development", project)
|
|
293
|
+
paths = [req / "units.md", req / "risk_register.md", dev / "aidlc_migration_plan.md"]
|
|
294
|
+
if des.exists():
|
|
295
|
+
paths += list(des.glob("*glossary*.md")) + list(des.glob("*static*.md")) + list(des.glob("*dynamic*.md"))
|
|
296
|
+
if dev.exists():
|
|
297
|
+
paths += sorted(dev.glob("bolt_plan-*.md"))
|
|
298
|
+
return [p for p in paths if p.exists()]
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def check_verified_and_index(rep: Report, docs: Path, project: str | None) -> None:
|
|
302
|
+
artifacts = migration_artifacts(docs, project)
|
|
303
|
+
unverified = [p.name for p in artifacts if "verified" not in frontmatter(read(p))]
|
|
304
|
+
if not artifacts:
|
|
305
|
+
return
|
|
306
|
+
if unverified:
|
|
307
|
+
rep.warn(f"移行成果物に人の承認記録(verified)が無い: {', '.join(unverified)}(apply-okf verify)")
|
|
308
|
+
else:
|
|
309
|
+
rep.ok(f"移行成果物 {len(artifacts)} 件すべてに verified がある")
|
|
310
|
+
unindexed = []
|
|
311
|
+
for p in artifacts:
|
|
312
|
+
index = p.parent / "index.md"
|
|
313
|
+
if index.exists() and p.name not in read(index):
|
|
314
|
+
unindexed.append(f"{p.parent.name}/{p.name}")
|
|
315
|
+
if unindexed:
|
|
316
|
+
rep.warn(f"index.md に登録されていない移行成果物: {', '.join(unindexed)}(移行ステップ 10)")
|
|
317
|
+
else:
|
|
318
|
+
rep.ok("移行成果物はすべて index.md に登録されている")
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def check_guardrails(rep: Report, skills: Path, frontend: bool) -> None:
|
|
322
|
+
targets = ["developing-backend"] + (["developing-frontend"] if frontend else [])
|
|
323
|
+
if not frontend:
|
|
324
|
+
rep.ok("apps: フロントエンドが見つからないため developing-frontend は検査対象外")
|
|
325
|
+
for s in targets:
|
|
326
|
+
path = skills / s / "PROJECT.md"
|
|
327
|
+
text = read(path)
|
|
328
|
+
if not text:
|
|
329
|
+
rep.warn(f"{path}: 無い(移行ステップ 9)")
|
|
330
|
+
continue
|
|
331
|
+
if any(k in text for k in TDD_KEYWORDS):
|
|
332
|
+
rep.ok(f"{path}: TDD の三原則が書かれている")
|
|
333
|
+
else:
|
|
334
|
+
rep.warn(f"{path}: TDD の三原則が書かれていない(移行ステップ 9)")
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
def main() -> int:
|
|
338
|
+
try:
|
|
339
|
+
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
340
|
+
except Exception: # noqa: BLE001
|
|
341
|
+
pass
|
|
342
|
+
ap = argparse.ArgumentParser(description="AI-DLC 移行の適合性検査")
|
|
343
|
+
ap.add_argument("--project", default=None, help="プロジェクト識別子(docs/<category>/<project>/ のサブディレクトリ名)")
|
|
344
|
+
ap.add_argument("--docs", default="docs", help="ドキュメントバンドルのルート(既定 docs)")
|
|
345
|
+
ap.add_argument("--apps", default="apps", help="アプリケーションのルート(既定 apps)")
|
|
346
|
+
ap.add_argument("--claude-md", default="CLAUDE.md", help="CLAUDE.md のパス")
|
|
347
|
+
ap.add_argument("--skills", default=".claude/skills", help="スキルディレクトリ")
|
|
348
|
+
ap.add_argument("--story-id", default=r"US-\d+", help="ストーリー ID の正規表現(既定 US-\\d+)")
|
|
349
|
+
args = ap.parse_args()
|
|
350
|
+
|
|
351
|
+
docs = Path(args.docs)
|
|
352
|
+
id_pattern = re.compile(args.story_id)
|
|
353
|
+
dirs = app_dirs(Path(args.apps), args.project)
|
|
354
|
+
rep = Report()
|
|
355
|
+
check_claude_md(rep, Path(args.claude_md))
|
|
356
|
+
check_guides(rep, docs)
|
|
357
|
+
check_migration_plan(rep, docs, args.project)
|
|
358
|
+
check_risk_register(rep, docs, args.project)
|
|
359
|
+
check_glossary(rep, docs, args.project)
|
|
360
|
+
check_brownfield(rep, docs, dirs, args.project)
|
|
361
|
+
check_stories(rep, docs, args.project, id_pattern)
|
|
362
|
+
unplaced = check_units(rep, docs, args.project, id_pattern)
|
|
363
|
+
check_release_plan(rep, docs, args.project, unplaced)
|
|
364
|
+
check_bolt_plans(rep, docs, args.project)
|
|
365
|
+
check_verified_and_index(rep, docs, args.project)
|
|
366
|
+
check_guardrails(rep, Path(args.skills), has_frontend(dirs))
|
|
367
|
+
rep.print()
|
|
368
|
+
return 1 if rep.errors else 0
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
if __name__ == "__main__":
|
|
372
|
+
sys.exit(main())
|
package/lib/assets/CLAUDE.md
CHANGED
|
@@ -12,10 +12,31 @@
|
|
|
12
12
|
|
|
13
13
|
あなたは @docs/reference/ロジカルシンキング.md に従い論理的に考え、問題を分析し、解決策を構築します。
|
|
14
14
|
|
|
15
|
-
あなたは @docs/reference
|
|
15
|
+
あなたは @docs/reference/開発ガイド_AI-DLC版.md に従いソフトウェア開発を手段として問題解決に取り組みます。
|
|
16
16
|
|
|
17
17
|
あなたは既存のソフトウエア開発のベストプラクティスと最新の AI テクノロジーを融合させることによりソフトウエア開発にイノベーションをもたらします。
|
|
18
18
|
|
|
19
|
+
## 開発方法論:AI-DLC を採用する
|
|
20
|
+
|
|
21
|
+
本プロジェクトは **AI-DLC(AI-Driven Development Lifecycle)** を採用します。XP の規律(TDD・リファクタリング・シンプルな設計・小さなリリース)はそのまま残し、その上で「AI が実行し、人が監督する」構図で開発を進めます。原則と用語は `docs/reference/AI-DLC導入ガイド.md` を、各活動のガイドは次を参照してください。
|
|
22
|
+
|
|
23
|
+
| 活動 | ガイド |
|
|
24
|
+
| :--- | :--- |
|
|
25
|
+
| 開発ライフサイクル全体 | `docs/reference/開発ガイド_AI-DLC版.md` |
|
|
26
|
+
| 計画(リリース・Bolt) | `docs/reference/リリース・イテレーション計画ガイド_AI-DLC版.md` |
|
|
27
|
+
| ユースケース・ユーザーストーリー | `docs/reference/ユースケース作成ガイド_AI-DLC版.md` |
|
|
28
|
+
| コーディングとテスト | `docs/reference/コーディングとテストガイド_AI-DLC版.md` |
|
|
29
|
+
| 用語集 | `docs/reference/AI-DLC用語集.md` |
|
|
30
|
+
|
|
31
|
+
AI-DLC で守ること:
|
|
32
|
+
|
|
33
|
+
- **AI が計画し、人が検証する** — 作業の前にチェックボックス付きの計画を書き、人の承認を得てから 1 ステップずつ実行する。重要な判断は勝手にしない。情報が足りなければ仮定で埋めずに質問する
|
|
34
|
+
- **単位は Intent → Unit → Bolt** — Intent を疎結合な Unit に分解し、時間〜日単位の Bolt で実装する。最初の Bolt はウォーキングスケルトンにする
|
|
35
|
+
- **承認ゲートは損失関数** — 「確認必須」の操作(新規ファイル作成・構造変更・外部連携・セキュリティ・データベース・本番環境)は承認ゲートとして必ず人の判断を仰ぐ
|
|
36
|
+
- **TDD の三原則を変えない** — テストを書き、失敗を確認してから最小限を実装する。先回りして実装しない
|
|
37
|
+
- **成果物は契約であり、コンテキストである** — ユーザーストーリーと受入条件は人と AI の契約。生成した成果物は `docs/` に永続化し、次のステップのコンテキストにする
|
|
38
|
+
- **修正はガードレールにする** — 人に修正された振る舞いは `CLAUDE.md`・`PROJECT.md`・スキルに反映し、同じ修正を繰り返さない
|
|
39
|
+
|
|
19
40
|
## Skills 体系
|
|
20
41
|
|
|
21
42
|
`.claude/skills/` に定義された Skills がタスクに応じて自動発動します。詳細な指示は各スキルの SKILL.md を参照してください。
|
|
@@ -109,6 +130,7 @@
|
|
|
109
130
|
| `creating-release-report` | リリース完了報告書作成 |
|
|
110
131
|
| `creating-iteration-report` | イテレーション完了報告書作成 |
|
|
111
132
|
| `migrating-okf` | プロジェクトドキュメントの OKF 知識バンドルへの移行・仕様バージョンアップ・適合性検証 |
|
|
133
|
+
| `migrating-ai-dlc` | XP ベースの既存プロジェクトを AI-DLC の運用(Unit 分解・Bolt 計画・リスク台帳・ガードレール)へ移行・適合性検証 |
|
|
112
134
|
| `apply-okf` | 文書の作成・更新・レビュー・廃止時に OKF 規約(フロントマター・verified・index/log)を適用 |
|
|
113
135
|
| `apply-docs-structure` | ドキュメント構成ガイド(単一企業・統合戦略・複数プロジェクト)に基づく配置判断・新プロジェクトのディレクトリ一式作成・構成検証 |
|
|
114
136
|
|
package/lib/assets/docs/index.md
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
---
|
|
2
|
-
okf_version: "0.2"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# プロジェクトドキュメント
|
|
6
|
-
|
|
7
|
-
プロジェクトで管理しているドキュメントの入口です。
|
|
8
|
-
|
|
9
|
-
## まずこれを読もうリスト
|
|
10
|
-
|
|
11
|
-
- [戦略](./strategy/index.md) - ビジネス構造やプロジェクトの方向性を整理します。
|
|
12
|
-
- [要件](./requirements/index.md) - RDRA 2.0 ベースで要件を定義します。
|
|
13
|
-
- [設計](./design/index.md) - アーキテクチャ、モデル、品質方針を整理します。
|
|
14
|
-
- [開発](./development/index.md) - リリース計画とイテレーション管理の入口です。
|
|
15
|
-
- [運用](./operation/index.md) - 環境構築、デプロイ、運用関連の入口です。
|
|
16
|
-
- [記事](./article/index.md) - 学習用の記事シリーズの入口です。
|
|
17
|
-
|
|
18
|
-
## ドキュメント構成
|
|
19
|
-
|
|
20
|
-
| カテゴリ | 概要 | 状況 |
|
|
21
|
-
| :--- |:------------------------------------| :--- |
|
|
22
|
-
| [戦略](./strategy/index.md) | 企業分析、経営戦略、ビジネスアーキテクチャ、インセプションデッキの整理 | `index.md` を整備済み |
|
|
23
|
-
| [要件](./requirements/index.md) | RDRA 2.0 とユースケース整理の入口 | `index.md` を整備済み |
|
|
24
|
-
| [設計](./design/index.md) | アーキテクチャ、モデル、テスト、非機能の整理 | `index.md` を整備済み |
|
|
25
|
-
| [開発](./development/index.md) | リリース計画、イテレーション計画、進捗管理 | `index.md` を整備済み |
|
|
26
|
-
| [運用](./operation/index.md) | 環境構築、デプロイ、運用手順の整理 | `index.md` を整備済み |
|
|
27
|
-
| [レビュー](./review/index.md) | 分析・開発レビュー結果の記録 | `index.md` を整備済み |
|
|
28
|
-
| [ADR](./adr/index.md) | Architecture Decision Records の管理 | `index.md` を整備済み |
|
|
29
|
-
| [記事](./article/index.md) | 学習用の記事シリーズ一覧 | `index.md` を整備済み |
|
|
30
|
-
| [リファレンス](./reference/index.md) | 開発ガイドラインやベストプラクティス |
|
|
31
|
-
| [テンプレート](./template/index.md) | 各種ドキュメントの作成テンプレート | 18 件のテンプレートを配置 |
|
|
32
|
-
|
|
33
|
-
## 補足
|
|
34
|
-
|
|
35
|
-
- `strategy/`、`requirements/`、`design/`、`development/`、`operation/` は現時点ではカテゴリ索引が中心です。
|
|
36
|
-
- `journal/` は作業ログ用の予約ディレクトリです。
|
|
37
|
-
- `assets/` は MkDocs 用のスタイル・スクリプトを格納しています。
|
|
1
|
+
---
|
|
2
|
+
okf_version: "0.2"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# プロジェクトドキュメント
|
|
6
|
+
|
|
7
|
+
プロジェクトで管理しているドキュメントの入口です。
|
|
8
|
+
|
|
9
|
+
## まずこれを読もうリスト
|
|
10
|
+
|
|
11
|
+
- [戦略](./strategy/index.md) - ビジネス構造やプロジェクトの方向性を整理します。
|
|
12
|
+
- [要件](./requirements/index.md) - RDRA 2.0 ベースで要件を定義します。
|
|
13
|
+
- [設計](./design/index.md) - アーキテクチャ、モデル、品質方針を整理します。
|
|
14
|
+
- [開発](./development/index.md) - リリース計画とイテレーション管理の入口です。
|
|
15
|
+
- [運用](./operation/index.md) - 環境構築、デプロイ、運用関連の入口です。
|
|
16
|
+
- [記事](./article/index.md) - 学習用の記事シリーズの入口です。
|
|
17
|
+
|
|
18
|
+
## ドキュメント構成
|
|
19
|
+
|
|
20
|
+
| カテゴリ | 概要 | 状況 |
|
|
21
|
+
| :--- |:------------------------------------| :--- |
|
|
22
|
+
| [戦略](./strategy/index.md) | 企業分析、経営戦略、ビジネスアーキテクチャ、インセプションデッキの整理 | `index.md` を整備済み |
|
|
23
|
+
| [要件](./requirements/index.md) | RDRA 2.0 とユースケース整理の入口 | `index.md` を整備済み |
|
|
24
|
+
| [設計](./design/index.md) | アーキテクチャ、モデル、テスト、非機能の整理 | `index.md` を整備済み |
|
|
25
|
+
| [開発](./development/index.md) | リリース計画、イテレーション計画、進捗管理 | `index.md` を整備済み |
|
|
26
|
+
| [運用](./operation/index.md) | 環境構築、デプロイ、運用手順の整理 | `index.md` を整備済み |
|
|
27
|
+
| [レビュー](./review/index.md) | 分析・開発レビュー結果の記録 | `index.md` を整備済み |
|
|
28
|
+
| [ADR](./adr/index.md) | Architecture Decision Records の管理 | `index.md` を整備済み |
|
|
29
|
+
| [記事](./article/index.md) | 学習用の記事シリーズ一覧 | `index.md` を整備済み |
|
|
30
|
+
| [リファレンス](./reference/index.md) | 開発ガイドラインやベストプラクティス | 38 件のドキュメントを配置 |
|
|
31
|
+
| [テンプレート](./template/index.md) | 各種ドキュメントの作成テンプレート | 18 件のテンプレートを配置 |
|
|
32
|
+
|
|
33
|
+
## 補足
|
|
34
|
+
|
|
35
|
+
- `strategy/`、`requirements/`、`design/`、`development/`、`operation/` は現時点ではカテゴリ索引が中心です。
|
|
36
|
+
- `journal/` は作業ログ用の予約ディレクトリです。
|
|
37
|
+
- `assets/` は MkDocs 用のスタイル・スクリプトを格納しています。
|
package/lib/assets/docs/log.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Docs Update Log
|
|
2
2
|
|
|
3
|
+
## 2026-09-12
|
|
4
|
+
* **Verification**: [AI-DLC用語集](/reference/AI-DLC用語集.md) を human:kakimomokuri が検証
|
|
5
|
+
* **Verification**: [コーディングとテストガイド_AI-DLC版](/reference/コーディングとテストガイド_AI-DLC版.md) を human:kakimomokuri が検証
|
|
6
|
+
* **Verification**: [ユースケース作成ガイド_AI-DLC版](/reference/ユースケース作成ガイド_AI-DLC版.md) を human:kakimomokuri が検証
|
|
7
|
+
* **Verification**: [リリース・イテレーション計画ガイド_AI-DLC版](/reference/リリース・イテレーション計画ガイド_AI-DLC版.md) を human:kakimomokuri が検証
|
|
8
|
+
* **Verification**: [開発ガイド_AI-DLC版](/reference/開発ガイド_AI-DLC版.md) を human:kakimomokuri が検証
|
|
9
|
+
* **Verification**: [AI-DLC導入ガイド](/reference/AI-DLC導入ガイド.md) を human:kakimomokuri が検証
|
|
10
|
+
* **Creation**: [AI-DLC 用語集](/reference/AI-DLC用語集.md) を新規作成。論文・参照実装・本プロジェクトの AI-DLC 版ガイドの用語を 6 区分で定義し、XP・Scrum との対応表と参照先を追加。`CLAUDE.md` の参照表にも登録。
|
|
11
|
+
* **Creation**: [開発ガイド(AI-DLC 版)](/reference/開発ガイド_AI-DLC版.md) を新規作成。XP 版の開発ライフサイクル(分析・開発・運用・構築・配置)を AI-DLC の 3 フェーズで読み替え、各活動で AI が生成し人が検証するものを定義。AI-DLC 版ガイド 4 本と XP 版ガイドの対応表を追加。あわせて `CLAUDE.md` に AI-DLC を採用する旨と守るべき 6 原則を明記し、ペルソナの参照先を開発ガイド(AI-DLC 版)に変更。
|
|
12
|
+
* **Creation**: [コーディングとテストガイド(AI-DLC 版)](/reference/コーディングとテストガイド_AI-DLC版.md) を新規作成。XP 版の章構成を保ちながら、TDD の三原則を AI に守らせる Bolt 開発フロー、承認ゲートの密度選択、AI 向けのアプローチ指示、ステップ計画、Red/Green/Refactor 各フェーズの人の検証観点、AI 生成コード固有の品質観点、ソース束縛レビュー、テスト戦略の水準、ガードレール化、quick-cement としての技術的負債、開発スキルの読み替え表を定義。
|
|
13
|
+
* **Creation**: [ユースケース作成ガイド(AI-DLC 版)](/reference/ユースケース作成ガイド_AI-DLC版.md) を新規作成。XP 版の章構成を保ちながら、Mob Elaboration によるユースケース作成手順、12 ステップの AI と人の分担、トレーサビリティ項目を加えたテンプレート、セマンティクス密度、AI 生成ユースケースの検証観点、ブラウンフィールドのリバースエンジニアリング、プロンプトパターン、分析スキルの読み替え表を定義。
|
|
14
|
+
* **Creation**: [リリース・イテレーション計画ガイド(AI-DLC 版)](/reference/リリース・イテレーション計画ガイド_AI-DLC版.md) を新規作成。XP 版の章構成を保ちながら、Intent → Unit → Bolt の計画階層、承認駆動の Bolt 計画、エントロピー評価による見積もり、完了 Unit 数・ゲート通過数・リードタイムによる進捗管理、リスク台帳、Bolt 終了報告テンプレート、計画スキルの読み替え表を定義。
|
|
15
|
+
* **Update**: [AI-DLC 導入ガイド](/reference/AI-DLC導入ガイド.md) を一次情報(Method Definition Paper・aidlc-workflows ユーザーガイド)で精査し拡充。10 の基本原則、成果物定義(Intent・Unit・Bolt・Domain/Logical Design・Deployment Unit)、Inception の 6 成果物、グリーンフィールド/ブラウンフィールド実践例、付録 A のプロンプトパターン、参照実装の 5 フェーズ 33 ステージ・スコープ・エージェント・承認ゲート・監査ログ、33 ステージと Skills の対応表を追加。
|
|
16
|
+
* **Creation**: [AI-DLC 導入ガイド](/reference/AI-DLC導入ガイド.md) を新規作成。AI-DLC の概要・コア原則・3 フェーズ・ベストプラクティスを整理し、XP と Skills 体系への対応表と段階的な導入ステップを定義。
|
|
17
|
+
|
|
3
18
|
## 2026-08-26
|
|
4
19
|
* **Verification**: [ドキュメント構成ガイド](/reference/ドキュメント構成ガイド.md) を human:kakimomokuri が検証
|
|
5
20
|
* **Update**: ドキュメント構成ガイドを更新。docs/review を共通からプロジェクト別カテゴリに変更(プロジェクト別は 7 カテゴリに)。
|