spec-runner 1.1.13 → 1.1.17
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/bin/spec-runner-installer.js +63 -0
- package/package.json +1 -1
- package/spec-runner/templates/.claude/agents/design-reviewer.md +8 -8
- package/spec-runner/templates/.claude/agents/impact-analyzer.md +35 -11
- package/spec-runner/templates/.claude/rules/coding.md +11 -0
- package/spec-runner/templates/.claude/rules/design-docs.md +52 -18
- package/spec-runner/templates/.claude/rules/harness-formats.md +93 -0
- package/spec-runner/templates/.claude/settings.json +15 -0
- package/spec-runner/templates/.claude/skills/architecture-definition/SKILL.md +43 -15
- package/spec-runner/templates/.claude/skills/architecture-skill-development/SKILL.md +26 -21
- package/spec-runner/templates/.claude/skills/design-change/SKILL.md +14 -12
- package/spec-runner/templates/.claude/skills/design-change/templates/90_ADR/ADR/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -32
- package/spec-runner/templates/.claude/skills/docs-driven-seed/SKILL.md +127 -0
- package/spec-runner/templates/.claude/skills/docs-driven-seed/templates/01_/350/246/201/344/273/266/345/256/232/347/276/251//343/203/246/343/203/223/343/202/255/343/202/277/343/202/271/350/250/200/350/252/236/350/276/236/346/233/270.md +15 -0
- package/spec-runner/templates/.claude/skills/docs-driven-seed/templates/01_/350/246/201/344/273/266/345/256/232/347/276/251//350/246/201/344/273/266/345/256/232/347/276/251.md +34 -0
- package/spec-runner/templates/.claude/skills/docs-driven-seed/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/202/267/343/202/271/343/203/206/343/203/240/345/205/250/344/275/223/344/277/257/347/236/260.md +33 -0
- package/spec-runner/templates/.claude/skills/docs-driven-seed/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/203/211/343/203/241/343/202/244/343/203/263/343/203/242/343/203/207/343/203/253.md +32 -0
- package/spec-runner/templates/.claude/skills/docs-driven-seed/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/344/270/200/350/246/247.md +15 -0
- package/spec-runner/templates/.claude/skills/docs-driven-seed/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/01_/343/203/211/343/203/241/343/202/244/343/203/263/{/343/203/211/343/203/241/343/202/244/343/203/263/345/220/215}.md +56 -0
- package/spec-runner/templates/.claude/skills/docs-driven-seed/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/02_/343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/UC-{/346/227/245/346/234/254/350/252/236/345/220/215}.md +55 -0
- package/spec-runner/templates/.claude/skills/existing-project-to-docs/SKILL.md +12 -9
- package/spec-runner/templates/.claude/skills/harness-engineering/SKILL.md +4 -0
- package/spec-runner/templates/.claude/skills/simple-seed/SKILL.md +105 -0
- package/spec-runner/templates/.claude/skills/simple-seed/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/01_/343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/UC-{/346/227/245/346/234/254/350/252/236/345/220/215}.md +53 -0
- package/spec-runner/templates/.claude/skills/test-driven-development/SKILL.md +104 -7
- package/spec-runner/templates/.github/agents/design-reviewer.agent.md +8 -8
- package/spec-runner/templates/.github/agents/impact-analyzer.agent.md +35 -11
- package/spec-runner/templates/.github/instructions/coding.instructions.md +11 -0
- package/spec-runner/templates/.github/instructions/design-docs.instructions.md +52 -18
- package/spec-runner/templates/.github/instructions/harness-formats.instructions.md +87 -0
- package/spec-runner/templates/.github/skills/architecture-definition/SKILL.md +43 -15
- package/spec-runner/templates/.github/skills/architecture-skill-development/SKILL.md +26 -21
- package/spec-runner/templates/.github/skills/design-change/SKILL.md +14 -12
- package/spec-runner/templates/.github/skills/design-change/templates/90_ADR/ADR/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -32
- package/spec-runner/templates/.github/skills/docs-driven-seed/SKILL.md +127 -0
- package/spec-runner/templates/.github/skills/docs-driven-seed/templates/01_/350/246/201/344/273/266/345/256/232/347/276/251//343/203/246/343/203/223/343/202/255/343/202/277/343/202/271/350/250/200/350/252/236/350/276/236/346/233/270.md +15 -0
- package/spec-runner/templates/.github/skills/docs-driven-seed/templates/01_/350/246/201/344/273/266/345/256/232/347/276/251//350/246/201/344/273/266/345/256/232/347/276/251.md +34 -0
- package/spec-runner/templates/.github/skills/docs-driven-seed/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/202/267/343/202/271/343/203/206/343/203/240/345/205/250/344/275/223/344/277/257/347/236/260.md +33 -0
- package/spec-runner/templates/.github/skills/docs-driven-seed/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/203/211/343/203/241/343/202/244/343/203/263/343/203/242/343/203/207/343/203/253.md +32 -0
- package/spec-runner/templates/.github/skills/docs-driven-seed/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/344/270/200/350/246/247.md +15 -0
- package/spec-runner/templates/.github/skills/docs-driven-seed/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/01_/343/203/211/343/203/241/343/202/244/343/203/263/{/343/203/211/343/203/241/343/202/244/343/203/263/345/220/215}.md +56 -0
- package/spec-runner/templates/.github/skills/docs-driven-seed/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/02_/343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/UC-{/346/227/245/346/234/254/350/252/236/345/220/215}.md +55 -0
- package/spec-runner/templates/.github/skills/existing-project-to-docs/SKILL.md +12 -9
- package/spec-runner/templates/.github/skills/harness-engineering/SKILL.md +4 -0
- package/spec-runner/templates/.github/skills/simple-seed/SKILL.md +105 -0
- package/spec-runner/templates/.github/skills/simple-seed/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/01_/343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/UC-{/346/227/245/346/234/254/350/252/236/345/220/215}.md +53 -0
- package/spec-runner/templates/.github/skills/test-driven-development/SKILL.md +104 -7
- package/spec-runner/templates/.spec-runner/scripts/scan.js +156 -0
- package/spec-runner/templates/.claude/skills/plugin-development/SKILL.md +0 -173
- package/spec-runner/templates/.claude/skills/plugin-development/templates/01_/350/246/201/344/273/266/345/256/232/347/276/251//346/246/202/350/246/201/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -88
- package/spec-runner/templates/.claude/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210/90_ADR/ADR/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -81
- package/spec-runner/templates/.claude/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/202/267/343/202/271/343/203/206/343/203/240/345/205/250/344/275/223/344/277/257/347/236/260/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -80
- package/spec-runner/templates/.claude/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/344/270/200/350/246/247/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -57
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/aws.md +0 -53
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/database.md +0 -54
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/schema.dbml +0 -25
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/sequence//343/202/267/343/203/274/343/202/261/343/203/263/343/202/271/345/233/263/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -28
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/agent.md +0 -56
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/config.md +0 -47
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/domain.md +0 -67
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/prompts.md +0 -72
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/plugins/skills/{skill_name}/skill.md +0 -53
- package/spec-runner/templates/.claude/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/plugins/tools/{tool_name}/tool.md +0 -51
- package/spec-runner/templates/.github/skills/plugin-development/SKILL.md +0 -173
- package/spec-runner/templates/.github/skills/plugin-development/templates/01_/350/246/201/344/273/266/345/256/232/347/276/251//346/246/202/350/246/201/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -88
- package/spec-runner/templates/.github/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210/90_ADR/ADR/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -81
- package/spec-runner/templates/.github/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/202/267/343/202/271/343/203/206/343/203/240/345/205/250/344/275/223/344/277/257/347/236/260/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -80
- package/spec-runner/templates/.github/skills/plugin-development/templates/02_/346/246/202/350/246/201/350/250/255/350/250/210//343/203/246/343/203/274/343/202/271/343/202/261/343/203/274/343/202/271/344/270/200/350/246/247/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -57
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/aws.md +0 -53
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/database.md +0 -54
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/schema.dbml +0 -25
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/infrastructure/sequence//343/202/267/343/203/274/343/202/261/343/203/263/343/202/271/345/233/263/343/203/206/343/203/263/343/203/227/343/203/254/343/203/274/343/203/210.md +0 -28
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/agent.md +0 -56
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/config.md +0 -47
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/domain.md +0 -67
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/agents/{agent_name}/prompts.md +0 -72
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/plugins/skills/{skill_name}/skill.md +0 -53
- package/spec-runner/templates/.github/skills/plugin-development/templates/03_/350/251/263/347/264/260/350/250/255/350/250/210/src/plugins/tools/{tool_name}/tool.md +0 -51
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: simple-seed
|
|
3
|
+
description: レイヤードアーキテクチャ / CRUD 中心のプロジェクト向け docs 正本開発フロー。ドメイン層を持たず UC・サービス層で設計する。architecture.yaml の style: layered のときに使う。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# simple-seed
|
|
7
|
+
|
|
8
|
+
**レイヤードアーキテクチャ / CRUD 中心のプロジェクト向け**の docs 正本開発フロー参照実装(種)。
|
|
9
|
+
`architecture.yaml` の `style: layered` のときに使う。DDD が必要なプロジェクトは `docs-driven-seed` を使う。
|
|
10
|
+
|
|
11
|
+
**このスキルをそのまま使い続けない。`architecture-skill-development` で自プロジェクト専用スキルに育てることを前提とする。**
|
|
12
|
+
|
|
13
|
+
## 全体フロー
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Phase 1: 要件定義
|
|
17
|
+
Phase 2: 概要設計(ユースケース + システム全体俯瞰)
|
|
18
|
+
Phase 3: ADR(必要時のみ)
|
|
19
|
+
Phase 4: 詳細設計(UC → DB・外部サービス)
|
|
20
|
+
Phase 5: TDD → 実装
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 前提ルール
|
|
24
|
+
|
|
25
|
+
- docs は正本とし、各ドキュメントに `spec_runner` frontmatter を付ける
|
|
26
|
+
- 詳細設計は `01_ユースケース/` `02_DB・外部サービス/` の 2 層で構成する
|
|
27
|
+
- `maps_to` は必ず設定する。パス推定に頼らない
|
|
28
|
+
- ユーザー承認なしに次フェーズへ進めない
|
|
29
|
+
|
|
30
|
+
## Phase 1: 要件定義
|
|
31
|
+
|
|
32
|
+
`architecture-definition` で完了済み。`docs/01_要件定義/` が存在することを確認して次へ進む。
|
|
33
|
+
|
|
34
|
+
## Phase 2: 概要設計
|
|
35
|
+
|
|
36
|
+
テンプレート: `../docs-driven-seed/templates/02_概要設計/`(ユースケース一覧・システム全体俯瞰のみ)
|
|
37
|
+
|
|
38
|
+
1. 要件定義からユースケースを洗い出す(Query / Command を意識)
|
|
39
|
+
2. テンプレートをコピーして `docs/02_概要設計/ユースケース一覧.md` を作る
|
|
40
|
+
3. コンポーネント全体図・外部 IF を整理し `docs/02_概要設計/システム全体俯瞰.md` を作る
|
|
41
|
+
4. ユーザーに確認・承認を得る
|
|
42
|
+
|
|
43
|
+
### 出力
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
docs/02_概要設計/
|
|
47
|
+
ユースケース一覧.md
|
|
48
|
+
システム全体俯瞰.md
|
|
49
|
+
90_ADR/
|
|
50
|
+
全体/
|
|
51
|
+
UC/
|
|
52
|
+
DB/
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Phase 3: ADR(必要時のみ)
|
|
56
|
+
|
|
57
|
+
1. 設計判断が必要な場合だけ ADR を作る
|
|
58
|
+
2. **提案時に必ず 3 案を比較する。ドキュメントには採用案と採用理由のみ記録する**
|
|
59
|
+
3. ファイル名は `mmdd-{日本語タイトル}.md`、配置先は対象フォルダ
|
|
60
|
+
|
|
61
|
+
| 対象 | 配置先 |
|
|
62
|
+
|------|--------|
|
|
63
|
+
| システム横断の決定 | `90_ADR/全体/` |
|
|
64
|
+
| UC フローの決定 | `90_ADR/UC/` |
|
|
65
|
+
| DB・外部サービスの決定 | `90_ADR/DB/` |
|
|
66
|
+
|
|
67
|
+
4. 採用案を概要設計へ反映してから次へ進む
|
|
68
|
+
|
|
69
|
+
## Phase 4: 詳細設計
|
|
70
|
+
|
|
71
|
+
**UC → DB・外部サービス の順に設計する。**
|
|
72
|
+
|
|
73
|
+
### 4-1. ユースケース
|
|
74
|
+
|
|
75
|
+
テンプレート: `templates/03_詳細設計/01_ユースケース/UC-{日本語名}.md`
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
docs/03_詳細設計/01_ユースケース/
|
|
79
|
+
UC-{日本語名}.md
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 4-2. DB・外部サービス(必要時のみ)
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
docs/03_詳細設計/02_DB・外部サービス/
|
|
86
|
+
スキーマ定義.dbml
|
|
87
|
+
外部サービス.md
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
3. ユーザーに確認・承認を得る
|
|
91
|
+
|
|
92
|
+
## Phase 5: TDD → 実装
|
|
93
|
+
|
|
94
|
+
`test-driven-development` スキルへ移行する。
|
|
95
|
+
|
|
96
|
+
### 実装完了後
|
|
97
|
+
|
|
98
|
+
- `@design-reviewer` — 設計書⇔実装の整合性チェック
|
|
99
|
+
- `@code-reviewer` — コーディング規約への適合チェック
|
|
100
|
+
|
|
101
|
+
## 原則
|
|
102
|
+
|
|
103
|
+
- **このスキルは種。`architecture-skill-development` でプロジェクト専用スキルに育てることを前提とする**
|
|
104
|
+
- **ドメイン層は持たない。ビジネスロジックは UC / サービス層で表現する**
|
|
105
|
+
- **`maps_to` は必ず設定する。パス推定に頼らない**
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
spec_runner:
|
|
3
|
+
node_id: detail.usecase.{UC名}
|
|
4
|
+
kind: detailed_design
|
|
5
|
+
depends_on:
|
|
6
|
+
- overview.use_case_list
|
|
7
|
+
maps_to:
|
|
8
|
+
- src/application/{uc_name}/
|
|
9
|
+
- tests/application/{uc_name}/
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# UC-{UC名} 詳細設計
|
|
13
|
+
|
|
14
|
+
## 概要
|
|
15
|
+
|
|
16
|
+
- トリガー: {何がこのUCを呼び出すか}
|
|
17
|
+
- 事前条件: {UCが成立するために必要な状態}
|
|
18
|
+
- 事後条件: {UC完了後の状態}
|
|
19
|
+
|
|
20
|
+
## 入出力
|
|
21
|
+
|
|
22
|
+
| 種別 | 名前 | 型 | 説明 |
|
|
23
|
+
|------|------|----|------|
|
|
24
|
+
| 入力 | {入力名} | {型} | {説明} |
|
|
25
|
+
| 出力 | {出力名} | {型} | {説明} |
|
|
26
|
+
|
|
27
|
+
## 主要フロー
|
|
28
|
+
|
|
29
|
+
```mermaid
|
|
30
|
+
sequenceDiagram
|
|
31
|
+
{シーケンス図}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
1. {ステップ1}
|
|
35
|
+
2. {ステップ2}
|
|
36
|
+
|
|
37
|
+
## 判断条件
|
|
38
|
+
|
|
39
|
+
| 判断ポイント | 条件 | アクション |
|
|
40
|
+
|------------|------|----------|
|
|
41
|
+
| {判断ポイント} | {条件} | {アクション} |
|
|
42
|
+
|
|
43
|
+
## エラーポリシー
|
|
44
|
+
|
|
45
|
+
| エラーケース | 発生条件 | 対応 |
|
|
46
|
+
|------------|---------|------|
|
|
47
|
+
| {エラーケース} | {発生条件} | {対応} |
|
|
48
|
+
|
|
49
|
+
## テスト観点
|
|
50
|
+
|
|
51
|
+
- {正常系の観点}
|
|
52
|
+
- {異常系の観点}
|
|
53
|
+
- {境界条件の観点}
|
|
@@ -26,13 +26,89 @@ description: 新機能実装やバグ修正を行う際、実装コードを書
|
|
|
26
26
|
テストより先にコードを書いたなら削除して最初からやり直す。
|
|
27
27
|
「参考として残す」も「テストを書きながら適応させる」も不可。
|
|
28
28
|
|
|
29
|
+
## テスト戦略:テストピラミッド
|
|
30
|
+
|
|
31
|
+
実装前にどのテスト種別を書くかを決める。迷ったら**単体テストから始める**。
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
/\
|
|
35
|
+
/E2E\ 少数・遅い・ユーザーシナリオ全体
|
|
36
|
+
/------\
|
|
37
|
+
/ 結合 \ 中程度・モジュール間連携・外部境界
|
|
38
|
+
/----------\
|
|
39
|
+
/ 単体 \ 多数・高速・関数・クラス単位
|
|
40
|
+
/______________\
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 単体テスト(Unit)
|
|
44
|
+
|
|
45
|
+
**対象:** 関数・クラス・モジュールの振る舞い(外部依存なし)
|
|
46
|
+
|
|
47
|
+
**書くとき:**
|
|
48
|
+
- ビジネスロジック・計算・変換処理
|
|
49
|
+
- エラー処理・バリデーション
|
|
50
|
+
- 状態変化(純粋関数・値オブジェクト)
|
|
51
|
+
|
|
52
|
+
**外部依存の扱い:** 実際に遅い・副作用がある依存のみモック。それ以外は実物を使う。
|
|
53
|
+
|
|
54
|
+
**速度目安:** ミリ秒単位。CI で毎回全件実行できる。
|
|
55
|
+
|
|
56
|
+
### 結合テスト(Integration)
|
|
57
|
+
|
|
58
|
+
**対象:** 複数モジュールの連携、DB・キャッシュ・外部APIとの境界
|
|
59
|
+
|
|
60
|
+
**書くとき:**
|
|
61
|
+
- DB へのクエリ・永続化
|
|
62
|
+
- 外部サービス呼び出し(HTTP, メッセージキュー等)
|
|
63
|
+
- 複数の集約をまたぐユースケース
|
|
64
|
+
|
|
65
|
+
**外部依存の扱い:** 原則として実物を使う(テスト用 DB、テスト環境の外部サービス)。
|
|
66
|
+
動かせない外部サービスのみスタブ/フェイクで代替する。
|
|
67
|
+
|
|
68
|
+
**速度目安:** 秒単位。PR ごとに実行できる。
|
|
69
|
+
|
|
70
|
+
### E2E テスト
|
|
71
|
+
|
|
72
|
+
**対象:** ユーザーが実際に操作するシナリオ全体(UI から DB まで)
|
|
73
|
+
|
|
74
|
+
**書くとき:**
|
|
75
|
+
- 最重要のユーザーシナリオ(ハッピーパス)
|
|
76
|
+
- リグレッションが致命的な機能(決済・認証等)
|
|
77
|
+
|
|
78
|
+
**数を絞る:** E2E は維持コストが高い。書く前に「単体+結合で代替できないか?」を問う。
|
|
79
|
+
|
|
80
|
+
**速度目安:** 分単位。夜間や本番リリース前など頻度を落として実行。
|
|
81
|
+
|
|
82
|
+
## テスト種別の選び方
|
|
83
|
+
|
|
84
|
+
| 実装するもの | まず書くテスト | 追加で書くテスト |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| ロジック・計算 | 単体 | — |
|
|
87
|
+
| DB 操作 | 結合 | — |
|
|
88
|
+
| API エンドポイント | 結合 | 主要シナリオは E2E |
|
|
89
|
+
| 複数サービスをまたぐフロー | 結合 | — |
|
|
90
|
+
| ユーザー向け主要機能 | 単体+結合 | E2E(絞る) |
|
|
91
|
+
| バグ修正 | 最小レベルで再現テスト | — |
|
|
92
|
+
|
|
93
|
+
**バグ修正の場合:** バグを再現できる最も低いレベルのテストを書く。
|
|
94
|
+
単体で再現できるなら単体、DBが絡むなら結合。E2E で初めて再現するバグは、単体・結合に落とし込めないか検討する。
|
|
95
|
+
|
|
29
96
|
## テスト実行コマンド
|
|
30
97
|
|
|
31
98
|
> このスキルはテンプレートとして配布されます。
|
|
32
99
|
> `architecture-skill-development` を使ってプロジェクト固有のコマンドに書き換えてください。
|
|
33
100
|
|
|
34
101
|
```bash
|
|
35
|
-
#
|
|
102
|
+
# 単体テスト(高速・毎回実行)
|
|
103
|
+
<your-unit-test-command>
|
|
104
|
+
|
|
105
|
+
# 結合テスト
|
|
106
|
+
<your-integration-test-command>
|
|
107
|
+
|
|
108
|
+
# E2E テスト
|
|
109
|
+
<your-e2e-test-command>
|
|
110
|
+
|
|
111
|
+
# 全テスト
|
|
36
112
|
<your-test-command>
|
|
37
113
|
|
|
38
114
|
# 特定ファイル
|
|
@@ -46,7 +122,7 @@ description: 新機能実装やバグ修正を行う際、実装コードを書
|
|
|
46
122
|
|
|
47
123
|
### RED - 失敗するテストを書く
|
|
48
124
|
|
|
49
|
-
|
|
125
|
+
テスト種別を決めたうえで、起きてほしいことを示す最小のテストを1つ書く。
|
|
50
126
|
|
|
51
127
|
```
|
|
52
128
|
// 例(言語・フレームワークはプロジェクトに合わせる)
|
|
@@ -93,7 +169,7 @@ test("ある入力に対して期待する出力を返す", () => {
|
|
|
93
169
|
`@test-runner` エージェントに委任して実行する。
|
|
94
170
|
|
|
95
171
|
- テストが通る
|
|
96
|
-
-
|
|
172
|
+
- **同種のテストが全て通る**(単体なら単体全件、結合なら結合全件)
|
|
97
173
|
- 出力がクリーン(エラー、警告なし)
|
|
98
174
|
- **カバレッジの未カバー行を確認** — 新規コードが未カバーなら追加テストを書く
|
|
99
175
|
|
|
@@ -122,18 +198,34 @@ GREEN / REFACTORフェーズで書く実装コードにもビジネスロジッ
|
|
|
122
198
|
|
|
123
199
|
## テスト構成
|
|
124
200
|
|
|
125
|
-
|
|
201
|
+
```
|
|
202
|
+
tests/
|
|
203
|
+
unit/ # 単体テスト(src/ と同じ構造を鏡写し)
|
|
204
|
+
integration/ # 結合テスト
|
|
205
|
+
e2e/ # E2E テスト
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
テストファイルは `src/` と同じディレクトリ構造を各テスト種別のディレクトリ内に鏡写しにする。
|
|
126
209
|
|
|
127
210
|
## fixture / テストデータの活用
|
|
128
211
|
|
|
129
212
|
- テストごとに独立した状態を持つ
|
|
130
213
|
- テストデータ生成にはヘルパ関数を定義して一貫性を保つ
|
|
131
214
|
- 外部サービス(API・メール・ストレージ等)は必要な場合のみモックする
|
|
215
|
+
- 結合テスト用のシードデータは `tests/integration/fixtures/` に置く
|
|
132
216
|
|
|
133
217
|
## モックのルール
|
|
134
218
|
|
|
135
219
|
モックは分離の手段であり、テスト対象ではない。
|
|
136
220
|
|
|
221
|
+
**テスト種別ごとのモック方針:**
|
|
222
|
+
|
|
223
|
+
| テスト種別 | 原則 |
|
|
224
|
+
|---|---|
|
|
225
|
+
| 単体 | 外部 I/O(DB・HTTP・ファイル)のみモック可。ビジネスロジックはモックしない |
|
|
226
|
+
| 結合 | 実物の外部依存を使う。動かせない外部サービスのみスタブ可 |
|
|
227
|
+
| E2E | モックしない。全て実物 |
|
|
228
|
+
|
|
137
229
|
**モック前の自問:**
|
|
138
230
|
1. 「実メソッドにはどんな副作用があるか?」
|
|
139
231
|
2. 「このテストはその副作用に依存しているか?」
|
|
@@ -168,6 +260,8 @@ GREEN / REFACTORフェーズで書く実装コードにもビジネスロジッ
|
|
|
168
260
|
| テスト前にコードを書いた | コードを削除し、TDDで最初からやり直す |
|
|
169
261
|
| テストが最初から通る | 既存挙動をテストしている。テストを修正する |
|
|
170
262
|
| なぜ失敗したか説明できない | テストが正しいか再検討する |
|
|
263
|
+
| 全部 E2E で書いた | ピラミッドが逆転している。単体・結合に落とし込む |
|
|
264
|
+
| 全部モックだらけ | 結合が強すぎる。または結合テストを書くべき |
|
|
171
265
|
|
|
172
266
|
**どれか1つでも当てはまるなら: コードを削除し、TDDで最初からやり直す。**
|
|
173
267
|
|
|
@@ -180,14 +274,15 @@ GREEN / REFACTORフェーズで書く実装コードにもビジネスロジッ
|
|
|
180
274
|
|
|
181
275
|
完了宣言の前に:
|
|
182
276
|
|
|
277
|
+
- [ ] 実装前にテスト種別(単体・結合・E2E)を決めた
|
|
183
278
|
- [ ] 新規関数/メソッドにテストがある
|
|
184
279
|
- [ ] 各テストは実装前に失敗するのを見た
|
|
185
280
|
- [ ] 期待通りの理由で失敗した(機能不足であり誤字ではない)
|
|
186
281
|
- [ ] 通す最小コードを書いた
|
|
187
|
-
- [ ]
|
|
282
|
+
- [ ] 同種のテストが全件通る
|
|
188
283
|
- [ ] 出力がクリーン(エラー、警告なし)
|
|
189
284
|
- [ ] カバレッジを確認し、新規コードの未カバー行がない
|
|
190
|
-
- [ ]
|
|
285
|
+
- [ ] モック方針がテスト種別に合っている
|
|
191
286
|
- [ ] エッジケースとエラーをカバーした
|
|
192
287
|
|
|
193
288
|
すべてにチェックできないならTDDを飛ばしている。やり直すこと。
|
|
@@ -197,9 +292,11 @@ GREEN / REFACTORフェーズで書く実装コードにもビジネスロジッ
|
|
|
197
292
|
| 問題 | 解決 |
|
|
198
293
|
|------|------|
|
|
199
294
|
| どうテストすべきか分からない | 望むAPIを書き、まずアサーションを書く。ユーザーに相談する |
|
|
295
|
+
| どのテスト種別か迷う | 単体から始める。単体で書けないなら結合を検討する |
|
|
200
296
|
| テストが複雑すぎる | 設計が複雑すぎる。インターフェースを簡素化する |
|
|
201
|
-
| 何でもモック必須 |
|
|
297
|
+
| 何でもモック必須 | 結合が強すぎる。依存性注入を使う。または結合テストで書く |
|
|
202
298
|
| セットアップが巨大 | fixtureやテストユーティリティに抽出する。それでも大きいなら設計を簡素化する |
|
|
299
|
+
| E2E が遅すぎる | 単体・結合に落とし込めるか検討する |
|
|
203
300
|
|
|
204
301
|
## 最終ルール
|
|
205
302
|
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* spec-runner scan
|
|
6
|
+
*
|
|
7
|
+
* docs/**\/*.md の frontmatter(spec_runner: セクション)を静的解析し、
|
|
8
|
+
* 依存グラフを .spec-runner/scan/graph.json にキャッシュする。
|
|
9
|
+
*
|
|
10
|
+
* 出力:
|
|
11
|
+
* .spec-runner/scan/graph.json
|
|
12
|
+
*
|
|
13
|
+
* 使い方:
|
|
14
|
+
* node .spec-runner/scripts/scan.js
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const fs = require('fs');
|
|
18
|
+
const path = require('path');
|
|
19
|
+
|
|
20
|
+
const ROOT = process.cwd();
|
|
21
|
+
const DOCS_DIR = path.join(ROOT, 'docs');
|
|
22
|
+
const OUTPUT_DIR = path.join(ROOT, '.spec-runner', 'scan');
|
|
23
|
+
const OUTPUT_FILE = path.join(OUTPUT_DIR, 'graph.json');
|
|
24
|
+
|
|
25
|
+
// ── ファイル収集 ────────────────────────────────────────────────────────────
|
|
26
|
+
|
|
27
|
+
function findMdFiles(dir) {
|
|
28
|
+
if (!fs.existsSync(dir)) return [];
|
|
29
|
+
const results = [];
|
|
30
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
31
|
+
const full = path.join(dir, entry.name);
|
|
32
|
+
if (entry.isDirectory()) results.push(...findMdFiles(full));
|
|
33
|
+
else if (entry.name.endsWith('.md')) results.push(full);
|
|
34
|
+
}
|
|
35
|
+
return results;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ── frontmatter パーサー ────────────────────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
function parseSpecRunnerFrontmatter(content) {
|
|
41
|
+
const fmMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
42
|
+
if (!fmMatch) return null;
|
|
43
|
+
|
|
44
|
+
const fm = fmMatch[1];
|
|
45
|
+
if (!fm.includes('spec_runner:')) return null;
|
|
46
|
+
|
|
47
|
+
// spec_runner: セクションを抽出(次のトップレベルキーまで)
|
|
48
|
+
const srMatch = fm.match(/spec_runner:\n([\s\S]*?)(?=\n\S|$)/);
|
|
49
|
+
if (!srMatch) return null;
|
|
50
|
+
const srBlock = srMatch[1];
|
|
51
|
+
|
|
52
|
+
const nodeIdMatch = srBlock.match(/^\s+node_id:\s*(.+)$/m);
|
|
53
|
+
if (!nodeIdMatch) return null;
|
|
54
|
+
|
|
55
|
+
const kindMatch = srBlock.match(/^\s+kind:\s*(.+)$/m);
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
node_id: nodeIdMatch[1].trim(),
|
|
59
|
+
kind: kindMatch ? kindMatch[1].trim() : null,
|
|
60
|
+
depends_on: parseYamlList(srBlock, 'depends_on'),
|
|
61
|
+
maps_to: parseYamlList(srBlock, 'maps_to'),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function parseYamlList(block, key) {
|
|
66
|
+
const re = new RegExp(`^([ \\t]+)${key}:\\s*(.*)$`, 'm');
|
|
67
|
+
const keyMatch = block.match(re);
|
|
68
|
+
if (!keyMatch) return [];
|
|
69
|
+
|
|
70
|
+
const inlineVal = keyMatch[2].trim();
|
|
71
|
+
|
|
72
|
+
// インライン配列: [a, b, c]
|
|
73
|
+
if (inlineVal.startsWith('[')) {
|
|
74
|
+
return inlineVal.replace(/[\[\]]/g, '').split(',').map(s => s.trim()).filter(Boolean);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// マルチライン配列: - item
|
|
78
|
+
const keyIndex = block.indexOf(keyMatch[0]);
|
|
79
|
+
const afterKey = block.slice(keyIndex + keyMatch[0].length);
|
|
80
|
+
const items = [];
|
|
81
|
+
for (const line of afterKey.split('\n')) {
|
|
82
|
+
const itemMatch = line.match(/^\s+-\s+(.+)$/);
|
|
83
|
+
if (itemMatch) {
|
|
84
|
+
items.push(itemMatch[1].trim());
|
|
85
|
+
} else if (line.trim() !== '') {
|
|
86
|
+
break; // 別のキーが始まったら終了
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return items;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ── メイン ──────────────────────────────────────────────────────────────────
|
|
93
|
+
|
|
94
|
+
function main() {
|
|
95
|
+
const files = findMdFiles(DOCS_DIR);
|
|
96
|
+
|
|
97
|
+
const graph = {
|
|
98
|
+
generated_at: new Date().toISOString(),
|
|
99
|
+
nodes: {}, // node_id → { file, kind, depends_on, maps_to }
|
|
100
|
+
reverse_index: {}, // node_id → [依存元 node_id のリスト](影響範囲検索用)
|
|
101
|
+
missing_maps_to: [], // { source, node_id, missing } 存在しないファイル参照
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
for (const file of files) {
|
|
105
|
+
let content;
|
|
106
|
+
try {
|
|
107
|
+
content = fs.readFileSync(file, 'utf8');
|
|
108
|
+
} catch {
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const fm = parseSpecRunnerFrontmatter(content);
|
|
113
|
+
if (!fm) continue;
|
|
114
|
+
|
|
115
|
+
const relPath = path.relative(ROOT, file);
|
|
116
|
+
const { node_id, kind, depends_on, maps_to } = fm;
|
|
117
|
+
|
|
118
|
+
graph.nodes[node_id] = { file: relPath, kind, depends_on, maps_to };
|
|
119
|
+
|
|
120
|
+
// リバースインデックスを構築(A が B に depends_on → reverse_index[B].push(A))
|
|
121
|
+
for (const dep of depends_on) {
|
|
122
|
+
if (!graph.reverse_index[dep]) graph.reverse_index[dep] = [];
|
|
123
|
+
graph.reverse_index[dep].push(node_id);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// maps_to の実在チェック
|
|
127
|
+
for (const mapped of maps_to) {
|
|
128
|
+
const mappedPath = path.join(ROOT, mapped);
|
|
129
|
+
// 末尾スラッシュ付きはディレクトリ
|
|
130
|
+
const exists = mapped.endsWith('/')
|
|
131
|
+
? fs.existsSync(mappedPath)
|
|
132
|
+
: fs.existsSync(mappedPath);
|
|
133
|
+
if (!exists) {
|
|
134
|
+
graph.missing_maps_to.push({ source: relPath, node_id, missing: mapped });
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
fs.mkdirSync(OUTPUT_DIR, { recursive: true });
|
|
140
|
+
fs.writeFileSync(OUTPUT_FILE, JSON.stringify(graph, null, 2));
|
|
141
|
+
|
|
142
|
+
const nodeCount = Object.keys(graph.nodes).length;
|
|
143
|
+
const rel = path.relative(ROOT, OUTPUT_FILE);
|
|
144
|
+
console.log(`spec-runner scan: ${nodeCount} nodes indexed → ${rel}`);
|
|
145
|
+
|
|
146
|
+
if (graph.missing_maps_to.length > 0) {
|
|
147
|
+
console.warn(`\nmaps_to integrity: ${graph.missing_maps_to.length} missing reference(s)`);
|
|
148
|
+
for (const m of graph.missing_maps_to) {
|
|
149
|
+
console.warn(` MISSING ${m.missing}`);
|
|
150
|
+
console.warn(` in ${m.source} (${m.node_id})`);
|
|
151
|
+
}
|
|
152
|
+
process.exit(1);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
main();
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: plugin-development
|
|
3
|
-
description: プラグイン型アーキテクチャ向けの reference workflow。docs を正本にし、概要設計から `src/` ミラーの詳細設計、TDD、実装へ進める。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# plugin-development
|
|
7
|
-
|
|
8
|
-
プラグイン型アーキテクチャ向けの新規開発フロー。
|
|
9
|
-
`architecture-definition` や `architecture-skill-development` が未整備な段階でも使える reference implementation として扱う。
|
|
10
|
-
|
|
11
|
-
## 全体フロー
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
Phase 1: 要件定義
|
|
15
|
-
Phase 2: 概要設計
|
|
16
|
-
Phase 3: ADR(必要時のみ)
|
|
17
|
-
Phase 4: 詳細設計
|
|
18
|
-
Phase 5: TDD → 実装
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## 前提ルール
|
|
22
|
-
|
|
23
|
-
- docs は正本とし、各ドキュメントに `spec_runner` frontmatter を付ける
|
|
24
|
-
- `docs/03_詳細設計/src/**` は原則として `src/` をミラーする
|
|
25
|
-
- `docs/03_詳細設計/infrastructure/**` は例外文書として扱い、必ず `maps_to` で対応先を明示する
|
|
26
|
-
- ユーザー承認なしに次フェーズへ進めない
|
|
27
|
-
|
|
28
|
-
## Phase 1: 要件定義
|
|
29
|
-
|
|
30
|
-
### 手順
|
|
31
|
-
|
|
32
|
-
1. 以下をユーザーにヒアリングする
|
|
33
|
-
- 解決すべき課題
|
|
34
|
-
- 提供価値
|
|
35
|
-
- 対象ユーザー
|
|
36
|
-
- 非機能要件
|
|
37
|
-
- スコープ外
|
|
38
|
-
- 技術・ビジネス制約
|
|
39
|
-
2. テンプレート `templates/01_要件定義/概要テンプレート.md` をコピーして `docs/01_要件定義/要件定義.md` を作る
|
|
40
|
-
3. frontmatter の `node_id` / `kind` / `depends_on` / `maps_to` を埋める
|
|
41
|
-
4. ユーザーに確認・承認を得る
|
|
42
|
-
|
|
43
|
-
### 出力
|
|
44
|
-
|
|
45
|
-
```text
|
|
46
|
-
docs/
|
|
47
|
-
01_要件定義/
|
|
48
|
-
要件定義.md
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Phase 2: 概要設計
|
|
52
|
-
|
|
53
|
-
### 2-1. ユースケース一覧
|
|
54
|
-
|
|
55
|
-
1. Phase 1 の要件定義からユースケースを洗い出す
|
|
56
|
-
2. Query / Command を意識して一覧化する
|
|
57
|
-
3. テンプレート `templates/02_概要設計/ユースケース一覧テンプレート.md` をコピーして作る
|
|
58
|
-
4. 必要なら `docs/02_概要設計/ユースケース/` 配下に個別 UC も作る
|
|
59
|
-
5. ユーザーに確認・承認を得る
|
|
60
|
-
|
|
61
|
-
### 2-2. システム全体俯瞰
|
|
62
|
-
|
|
63
|
-
1. ユースケース一覧から責務境界、主要コンポーネント、外部 IF を整理する
|
|
64
|
-
2. テンプレート `templates/02_概要設計/システム全体俯瞰テンプレート.md` をコピーして作る
|
|
65
|
-
3. 必要なら `ドメイン責務マップ.md` / `外部IF一覧.md` / `非機能・運用方針.md` を追加する
|
|
66
|
-
4. ユーザーに確認・承認を得る
|
|
67
|
-
|
|
68
|
-
### 出力
|
|
69
|
-
|
|
70
|
-
```text
|
|
71
|
-
docs/
|
|
72
|
-
02_概要設計/
|
|
73
|
-
ユースケース一覧.md
|
|
74
|
-
システム全体俯瞰.md
|
|
75
|
-
ユースケース/
|
|
76
|
-
UC-*.md
|
|
77
|
-
90_ADR/
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Phase 3: ADR(必要時のみ)
|
|
81
|
-
|
|
82
|
-
1. 実装方針に意思決定が必要な場合だけ ADR を作る
|
|
83
|
-
2. **必ず 3 案を比較する**
|
|
84
|
-
3. テンプレート `templates/02_概要設計/90_ADR/ADRテンプレート.md` をコピーして生成する
|
|
85
|
-
4. 配置先は `docs/02_概要設計/90_ADR/mmdd-{日本語タイトル}.md` を原則とする
|
|
86
|
-
5. 採用案を概要設計へ反映してから次へ進む
|
|
87
|
-
|
|
88
|
-
## Phase 4: 詳細設計
|
|
89
|
-
|
|
90
|
-
**各ドキュメントは `src/` と決定的に対応づける。**
|
|
91
|
-
|
|
92
|
-
### 4-1. エージェント
|
|
93
|
-
|
|
94
|
-
テンプレート:
|
|
95
|
-
- `templates/03_詳細設計/src/agents/{agent_name}/agent.md`
|
|
96
|
-
- `templates/03_詳細設計/src/agents/{agent_name}/domain.md`
|
|
97
|
-
- `templates/03_詳細設計/src/agents/{agent_name}/prompts.md`
|
|
98
|
-
- `templates/03_詳細設計/src/agents/{agent_name}/config.md`
|
|
99
|
-
|
|
100
|
-
出力:
|
|
101
|
-
|
|
102
|
-
```text
|
|
103
|
-
docs/
|
|
104
|
-
03_詳細設計/
|
|
105
|
-
src/
|
|
106
|
-
agents/
|
|
107
|
-
{agent_name}/
|
|
108
|
-
agent.md
|
|
109
|
-
domain.md
|
|
110
|
-
prompts.md
|
|
111
|
-
config.md
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### 4-2. プラグイン
|
|
115
|
-
|
|
116
|
-
テンプレート:
|
|
117
|
-
- `templates/03_詳細設計/src/plugins/skills/{skill_name}/skill.md`
|
|
118
|
-
- `templates/03_詳細設計/src/plugins/tools/{tool_name}/tool.md`
|
|
119
|
-
|
|
120
|
-
出力:
|
|
121
|
-
|
|
122
|
-
```text
|
|
123
|
-
docs/
|
|
124
|
-
03_詳細設計/
|
|
125
|
-
src/
|
|
126
|
-
plugins/
|
|
127
|
-
skills/
|
|
128
|
-
{skill_name}/
|
|
129
|
-
skill.md
|
|
130
|
-
tools/
|
|
131
|
-
{tool_name}/
|
|
132
|
-
tool.md
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### 4-3. インフラ補助設計
|
|
136
|
-
|
|
137
|
-
`src` ミラーだけでは表現しきれない DB / IaC / 運用構成だけ、例外として補助設計を置く。
|
|
138
|
-
|
|
139
|
-
テンプレート:
|
|
140
|
-
- `templates/03_詳細設計/infrastructure/database.md`
|
|
141
|
-
- `templates/03_詳細設計/infrastructure/schema.dbml`
|
|
142
|
-
- `templates/03_詳細設計/infrastructure/aws.md`
|
|
143
|
-
- `templates/03_詳細設計/infrastructure/sequence/シーケンス図テンプレート.md`
|
|
144
|
-
|
|
145
|
-
出力:
|
|
146
|
-
|
|
147
|
-
```text
|
|
148
|
-
docs/
|
|
149
|
-
03_詳細設計/
|
|
150
|
-
infrastructure/
|
|
151
|
-
database.md
|
|
152
|
-
schema.dbml
|
|
153
|
-
aws.md
|
|
154
|
-
sequence/
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
ユーザーに確認・承認を得る
|
|
158
|
-
|
|
159
|
-
## Phase 5: TDD → 実装
|
|
160
|
-
|
|
161
|
-
詳細設計が承認されたら `test-driven-development` スキルへ移行する。
|
|
162
|
-
|
|
163
|
-
### 実装完了後のレビュー
|
|
164
|
-
|
|
165
|
-
- `@design-reviewer` — frontmatter と `maps_to` を起点に設計書⇔実装の整合性チェック
|
|
166
|
-
- `@code-reviewer` — コーディング規約への適合チェック
|
|
167
|
-
|
|
168
|
-
## 原則
|
|
169
|
-
|
|
170
|
-
- **ユースケースは途中で止めずに洗い出す**
|
|
171
|
-
- **詳細設計は `src/` ミラーを優先する**
|
|
172
|
-
- **補助設計を置く場合も `maps_to` で対応先を残す**
|
|
173
|
-
- **`plugin-development` を最終形とみなさず、project 専用 skill の種として扱う**
|