@sk8metal/michi-cli 0.10.1 → 0.12.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.
Files changed (139) hide show
  1. package/README.md +71 -848
  2. package/dist/scripts/constants/environments.d.ts +1 -1
  3. package/dist/scripts/constants/environments.d.ts.map +1 -1
  4. package/dist/scripts/constants/environments.js +0 -20
  5. package/dist/scripts/constants/environments.js.map +1 -1
  6. package/dist/scripts/phase-runner.js +1 -1
  7. package/dist/scripts/phase-runner.js.map +1 -1
  8. package/dist/scripts/utils/multi-repo-validator.d.ts +18 -0
  9. package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
  10. package/dist/scripts/utils/multi-repo-validator.js +42 -0
  11. package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
  12. package/dist/scripts/utils/tasks-format-validator.js +3 -3
  13. package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
  14. package/dist/scripts/utils/template-finder.d.ts +2 -2
  15. package/dist/scripts/utils/template-finder.d.ts.map +1 -1
  16. package/dist/scripts/utils/template-finder.js +3 -8
  17. package/dist/scripts/utils/template-finder.js.map +1 -1
  18. package/dist/src/cli.d.ts.map +1 -1
  19. package/dist/src/cli.js +0 -8
  20. package/dist/src/cli.js.map +1 -1
  21. package/dist/src/commands/init.d.ts +0 -4
  22. package/dist/src/commands/init.d.ts.map +1 -1
  23. package/dist/src/commands/init.js +6 -30
  24. package/dist/src/commands/init.js.map +1 -1
  25. package/dist/src/commands/setup-existing.d.ts +2 -6
  26. package/dist/src/commands/setup-existing.d.ts.map +1 -1
  27. package/dist/src/commands/setup-existing.js +8 -142
  28. package/dist/src/commands/setup-existing.js.map +1 -1
  29. package/docs/README.md +20 -83
  30. package/docs/getting-started/configuration.md +350 -0
  31. package/docs/getting-started/installation.md +59 -0
  32. package/docs/getting-started/quick-start.md +76 -0
  33. package/docs/guides/atlassian-integration.md +116 -0
  34. package/docs/guides/claude-code.md +155 -0
  35. package/docs/guides/multi-repo.md +117 -0
  36. package/docs/guides/workflow.md +382 -0
  37. package/docs/reference/ai-commands.md +92 -0
  38. package/docs/reference/cli.md +752 -0
  39. package/docs/reference/environment-variables.md +192 -0
  40. package/docs/troubleshooting.md +498 -0
  41. package/package.json +1 -3
  42. package/scripts/__tests__/create-project.test.ts +12 -12
  43. package/scripts/__tests__/setup-existing-project.test.ts +22 -22
  44. package/scripts/constants/__tests__/environments.test.ts +7 -50
  45. package/scripts/constants/environments.ts +1 -27
  46. package/scripts/phase-runner.ts +1 -1
  47. package/scripts/template/__tests__/renderer.test.ts +21 -21
  48. package/scripts/utils/__tests__/multi-repo-validator.test.ts +159 -1
  49. package/scripts/utils/multi-repo-validator.ts +50 -0
  50. package/scripts/utils/tasks-format-validator.ts +3 -3
  51. package/scripts/utils/template-finder.ts +5 -11
  52. package/templates/claude/agents/e2e-first-planner/AGENT.md +1 -1
  53. package/templates/claude/agents/pr-resolver/AGENT.md +15 -3
  54. package/templates/claude/commands/michi/e2e-plan.md +1 -1
  55. package/templates/claude/commands/michi/spec-design.md +2 -2
  56. package/templates/claude/commands/michi/spec-tasks.md +156 -0
  57. package/templates/claude/commands/michi/test-planning.md +1 -1
  58. package/templates/claude/commands/michi/validate-design.md +3 -3
  59. package/templates/claude/commands/michi-multi-repo/impl-all.md +30 -1
  60. package/templates/claude/commands/michi-multi-repo/propagate-specs.md +14 -1
  61. package/templates/claude/commands/michi-multi-repo/spec-review.md +16 -2
  62. package/templates/claude-agent/agents/repo-spec-executor.md +1 -1
  63. package/templates/claude-agent/commands/michi/spec-tasks.md +117 -0
  64. package/templates/claude-agent/rules/code-size-monitor.md +26 -0
  65. package/templates/claude-agent/rules/code-size-rules.md +32 -0
  66. package/templates/michi/cc-sdd-overrides/settings/rules/design-review-michi.md +1 -1
  67. package/docs/context.md +0 -59
  68. package/docs/michi-development/contributing/development.md +0 -341
  69. package/docs/michi-development/contributing/release.md +0 -365
  70. package/docs/michi-development/design/config-unification.md +0 -733
  71. package/docs/michi-development/design/design-config-current-state.md +0 -330
  72. package/docs/michi-development/design/design-config-implementation.md +0 -628
  73. package/docs/michi-development/design/design-config-migration.md +0 -952
  74. package/docs/michi-development/design/design-config-security.md +0 -771
  75. package/docs/michi-development/design/design-config-solution.md +0 -583
  76. package/docs/michi-development/design/design-config-testing.md +0 -892
  77. package/docs/michi-development/testing/manual-verification-flow.md +0 -871
  78. package/docs/michi-development/testing/manual-verification-other-tools.md +0 -1279
  79. package/docs/michi-development/testing/manual-verification-troubleshooting.md +0 -122
  80. package/docs/michi-development/testing/pre-publish-checklist.md +0 -560
  81. package/docs/michi-development/testing-strategy.md +0 -87
  82. package/docs/plan.md +0 -275
  83. package/docs/user-guide/getting-started/github-token-setup.md +0 -510
  84. package/docs/user-guide/getting-started/new-repository-setup.md +0 -704
  85. package/docs/user-guide/getting-started/quick-start.md +0 -212
  86. package/docs/user-guide/getting-started/setup.md +0 -819
  87. package/docs/user-guide/guides/agent-skills-integration.md +0 -222
  88. package/docs/user-guide/guides/customization.md +0 -537
  89. package/docs/user-guide/guides/internationalization.md +0 -540
  90. package/docs/user-guide/guides/migration-guide.md +0 -138
  91. package/docs/user-guide/guides/multi-project.md +0 -368
  92. package/docs/user-guide/guides/multi-repo-guide.md +0 -1590
  93. package/docs/user-guide/guides/phase-automation.md +0 -419
  94. package/docs/user-guide/guides/workflow.md +0 -574
  95. package/docs/user-guide/hands-on/README.md +0 -142
  96. package/docs/user-guide/hands-on/claude-agent-setup.md +0 -597
  97. package/docs/user-guide/hands-on/claude-setup.md +0 -452
  98. package/docs/user-guide/hands-on/cursor-setup.md +0 -353
  99. package/docs/user-guide/hands-on/troubleshooting.md +0 -964
  100. package/docs/user-guide/hands-on/verification-checklist.md +0 -439
  101. package/docs/user-guide/hands-on/workflow-walkthrough.md +0 -1078
  102. package/docs/user-guide/reference/config.md +0 -589
  103. package/docs/user-guide/reference/multi-repo-api.md +0 -771
  104. package/docs/user-guide/reference/quick-reference.md +0 -297
  105. package/docs/user-guide/reference/security-test-payloads.md +0 -50
  106. package/docs/user-guide/reference/tasks-template.md +0 -550
  107. package/docs/user-guide/release/ci-setup-java.md +0 -114
  108. package/docs/user-guide/release/ci-setup-nodejs.md +0 -94
  109. package/docs/user-guide/release/ci-setup-php.md +0 -102
  110. package/docs/user-guide/release/ci-setup-troubleshooting.md +0 -94
  111. package/docs/user-guide/release/ci-setup.md +0 -188
  112. package/docs/user-guide/release/release-flow.md +0 -476
  113. package/docs/user-guide/templates/test-specs/README.md +0 -173
  114. package/docs/user-guide/templates/test-specs/e2e-test-spec-template.md +0 -553
  115. package/docs/user-guide/templates/test-specs/integration-test-spec-template.md +0 -435
  116. package/docs/user-guide/templates/test-specs/performance-test-spec-template.md +0 -454
  117. package/docs/user-guide/templates/test-specs/security-test-spec-template.md +0 -625
  118. package/docs/user-guide/templates/test-specs/unit-test-spec-template.md +0 -328
  119. package/docs/user-guide/testing/integration-tests.md +0 -312
  120. package/docs/user-guide/testing/tdd-cycle.md +0 -349
  121. package/docs/user-guide/testing/test-execution-flow.md +0 -396
  122. package/docs/user-guide/testing/test-failure-handling.md +0 -521
  123. package/docs/user-guide/testing/test-planning-flow.md +0 -185
  124. package/docs/user-guide/testing-strategy.md +0 -185
  125. package/docs/verification-guide.md +0 -518
  126. package/templates/cline/rules/atlassian-integration.md +0 -36
  127. package/templates/cline/rules/michi-core.md +0 -56
  128. package/templates/codex/AGENTS.override.md +0 -277
  129. package/templates/codex/prompts/confluence-sync.md +0 -177
  130. package/templates/codex/rules/README.md +0 -210
  131. package/templates/cursor/commands/kiro/kiro-spec-impl.md +0 -244
  132. package/templates/cursor/commands/kiro/kiro-spec-tasks.md +0 -354
  133. package/templates/cursor/commands/michi/confluence-sync.md +0 -76
  134. package/templates/cursor/commands/michi/project-switch.md +0 -69
  135. package/templates/cursor/rules/atlassian-mcp.mdc +0 -188
  136. package/templates/cursor/rules/github-ssot.mdc +0 -151
  137. package/templates/cursor/rules/multi-project.mdc +0 -81
  138. package/templates/gemini/commands/README.md +0 -41
  139. package/templates/gemini/rules/GEMINI.md +0 -80
@@ -1,537 +0,0 @@
1
- # カスタマイズ機能ガイド
2
-
3
- > **凡例について**: `<feature>` などの記号の意味は [README.md#凡例の記号説明](../README.md#凡例の記号説明) を参照してください。
4
-
5
- ## 概要
6
-
7
- Michiでは、チームやPJごとに異なる開発フローに対応するため、Confluence/JIRAの作成粒度やワークフロー設定をカスタマイズ可能にしています。
8
-
9
- ## cc-sddのカスタマイズとの関係
10
-
11
- Michiは[cc-sdd](https://github.com/gotalab/cc-sdd)をベースとしており、カスタマイズには2つの種類があります:
12
-
13
- ### 1. cc-sddのカスタマイズ(テンプレート・ルール)
14
-
15
- **対象**: AIが生成するドキュメントの構造や判断基準
16
- - **templates/**: `requirements.md`, `design.md`, `tasks.md`の構造・フォーマット
17
- - **rules/**: AIの判断基準・生成原則
18
- - **steering/**: プロジェクトメモリ(`/kiro:steering-custom`で作成)
19
-
20
- **詳細**: [cc-sdd カスタマイズガイド](https://github.com/gotalab/cc-sdd/blob/main/docs/guides/ja/customization-guide.md)
21
-
22
- **主なカスタマイズ内容**:
23
- - 要件定義書の見出し形式(日本語/英語/カスタム)
24
- - 設計ドキュメントのセクション構造
25
- - タスク分解の粒度と形式
26
- - EARS形式の要件記述ルール
27
- - カスタムSteeringドキュメント(API標準、セキュリティポリシーなど)
28
-
29
- ### 2. Michiのカスタマイズ(設定ファイル)
30
-
31
- **対象**: Confluence/JIRAの作成方法やワークフロー設定
32
- - **`.michi/config.json`**: Confluence階層構造、JIRA Story作成粒度、承認ゲート設定
33
-
34
- **詳細**: 本ドキュメント(以下を参照)
35
-
36
- **主なカスタマイズ内容**:
37
- - Confluenceページの階層構造(フラット/階層/セクション分割)
38
- - JIRA Story作成粒度(全作成/フェーズごと/選択フェーズのみ)
39
- - ワークフロー承認ゲート設定
40
-
41
- ### 使い分け
42
-
43
- | カスタマイズ種類 | 対象 | 設定場所 | コマンド |
44
- |----------------|------|---------|---------|
45
- | **cc-sdd** | ドキュメント構造・AI判断基準 | `.kiro/settings/templates/`, `.kiro/settings/rules/`, `.kiro/steering/` | `/kiro:steering-custom` |
46
- | **Michi** | Confluence/JIRA作成方法 | `.michi/config.json` | 手動編集または`npm run config:global` |
47
-
48
- **例**:
49
- - 要件定義書の見出しを「要件 N:」から「REQ-N:」に変更 → **cc-sddのカスタマイズ**(`templates/requirements.md`を編集)
50
- - Confluenceページを階層構造にする → **Michiのカスタマイズ**(`.michi/config.json`で設定)
51
-
52
- ## 設定ファイルの構造
53
-
54
- ### デフォルト設定
55
-
56
- `scripts/config/default-config.json` - Michiリポジトリに含まれるデフォルト設定
57
-
58
- ### プロジェクト固有設定
59
-
60
- `.michi/config.json` - プロジェクトルートに配置(オプション)
61
-
62
- **重要**: `.michi/config.json`は`.gitignore`に追加することを推奨します(チーム固有設定のため)
63
-
64
- **注意**: 以前は `.kiro/config.json` を使用していましたが、Michi専用の設定ファイルとして `.michi/config.json` に変更されました。
65
-
66
- ### 設定のマージ順序
67
-
68
- 1. デフォルト設定を読み込み
69
- 2. プロジェクト固有設定があればマージ(深いマージ)
70
- 3. 環境変数で最終上書き(既存の動作を維持)
71
-
72
- ### 設定値の詳細
73
-
74
- すべての設定値の詳細は [設定値リファレンス](../reference/config.md) を参照してください。
75
-
76
- ## Confluence階層構造のカスタマイズ
77
-
78
- ### パターン1: フラット構造(デフォルト)
79
-
80
- **設定**: 設定ファイル不要、または`pageCreationGranularity: "single"`
81
-
82
- **動作**: 1ドキュメント = 1ページ(現在の動作を維持)
83
-
84
- ```
85
- Confluenceスペース
86
- └── [Michi] health-check-endpoint 要件定義
87
- └── [Michi] health-check-endpoint 設計
88
- └── [Michi] health-check-endpoint タスク分割
89
- ```
90
-
91
- **設定例**:
92
- ```json
93
- {
94
- "confluence": {
95
- "pageCreationGranularity": "single"
96
- }
97
- }
98
- ```
99
-
100
- ### パターン2: 機能ごとの親ページ(simple階層)
101
-
102
- **設定**: `pageCreationGranularity: "by-hierarchy"` + `hierarchy.mode: "simple"`
103
-
104
- **動作**: 親ページを作成し、要件定義/設計/タスク分割を子ページとして配置
105
-
106
- ```
107
- Confluenceスペース
108
- └── [Michi] health-check-endpoint(親ページ)
109
- ├── 要件定義
110
- ├── 設計
111
- └── タスク分割
112
- ```
113
-
114
- **設定例**:
115
- ```json
116
- {
117
- "confluence": {
118
- "pageCreationGranularity": "by-hierarchy",
119
- "hierarchy": {
120
- "mode": "simple",
121
- "parentPageTitle": "[{projectName}] {featureName}"
122
- }
123
- }
124
- }
125
- ```
126
-
127
- ### パターン3: セクション分割
128
-
129
- **設定**: `pageCreationGranularity: "by-section"`
130
-
131
- **動作**: Markdownの`##`セクションごとにページを作成(フラット)
132
-
133
- ```
134
- Confluenceスペース
135
- └── [Michi] health-check-endpoint 要件定義 - 概要
136
- └── [Michi] health-check-endpoint 要件定義 - 機能要件
137
- └── [Michi] health-check-endpoint 要件定義 - 非機能要件
138
- ```
139
-
140
- **設定例**:
141
- ```json
142
- {
143
- "confluence": {
144
- "pageCreationGranularity": "by-section",
145
- "pageTitleFormat": "[{projectName}] {featureName} {docTypeLabel} - {sectionTitle}"
146
- }
147
- }
148
- ```
149
-
150
- ### パターン4: 階層構造(nested階層)
151
-
152
- **設定**: `pageCreationGranularity: "by-hierarchy"` + `hierarchy.mode: "nested"`
153
-
154
- **動作**: 親ページ → ドキュメントタイプ親 → セクション子ページの3階層
155
-
156
- ```
157
- Confluenceスペース
158
- └── [Michi] health-check-endpoint(親ページ)
159
- ├── 要件定義(親)
160
- │ ├── 概要
161
- │ ├── 機能要件
162
- │ └── 非機能要件
163
- ├── 設計(親)
164
- │ ├── アーキテクチャ
165
- │ └── API仕様
166
- └── タスク分割
167
- ```
168
-
169
- **設定例**:
170
- ```json
171
- {
172
- "confluence": {
173
- "pageCreationGranularity": "by-hierarchy",
174
- "hierarchy": {
175
- "mode": "nested",
176
- "parentPageTitle": "[{projectName}] {featureName}",
177
- "createDocTypeParents": true
178
- }
179
- }
180
- }
181
- ```
182
-
183
- ### パターン5: 手動指定(manual)
184
-
185
- **設定**: `pageCreationGranularity: "manual"` + `hierarchy.structure`で明示的に定義
186
-
187
- **動作**: 設定ファイルで指定した通りにページを作成
188
-
189
- ```
190
- Confluenceスペース
191
- └── [Michi] health-check-endpoint(親ページ)
192
- ├── 要件定義 - 概要
193
- ├── 要件定義 - 機能要件
194
- ├── 要件定義 - 非機能要件
195
- ├── 設計 - アーキテクチャ
196
- └── 設計 - API仕様
197
- ```
198
-
199
- **設定例**:
200
- ```json
201
- {
202
- "confluence": {
203
- "pageCreationGranularity": "manual",
204
- "hierarchy": {
205
- "parentPageTitle": "[{projectName}] {featureName}",
206
- "structure": {
207
- "requirements": {
208
- "pages": [
209
- {
210
- "title": "[{projectName}] {featureName} 要件定義 - 概要",
211
- "sections": ["## 1. 概要", "## 1.1 背景"],
212
- "labels": ["requirements", "overview"]
213
- },
214
- {
215
- "title": "[{projectName}] {featureName} 要件定義 - 機能要件",
216
- "sections": ["## 2. 機能要件", "## 2.1 ユーザー機能"],
217
- "labels": ["requirements", "functional"]
218
- }
219
- ]
220
- },
221
- "design": {
222
- "pages": [
223
- {
224
- "title": "[{projectName}] {featureName} 設計 - アーキテクチャ",
225
- "sections": ["## 1. アーキテクチャ概要"],
226
- "labels": ["design", "architecture"]
227
- }
228
- ]
229
- }
230
- }
231
- }
232
- }
233
- }
234
- ```
235
-
236
- ## タイトル形式のカスタマイズ
237
-
238
- `pageTitleFormat`でページタイトルの形式をカスタマイズできます。
239
-
240
- **利用可能な変数**:
241
- - `{projectName}` - プロジェクト名
242
- - `{featureName}` - 機能名
243
- - `{docTypeLabel}` - ドキュメントタイプ(要件定義、設計、タスク分割)
244
- - `{sectionTitle}` - セクションタイトル(by-sectionの場合)
245
-
246
- **設定例**:
247
- ```json
248
- {
249
- "confluence": {
250
- "pageTitleFormat": "{projectName} - {featureName} - {docTypeLabel}"
251
- }
252
- }
253
- ```
254
-
255
- ## ラベルのカスタマイズ
256
-
257
- `autoLabels`で自動付与されるラベルをカスタマイズできます。
258
-
259
- **利用可能な変数**:
260
- - `{projectLabel}` - プロジェクトラベル(`.kiro/project.json`の`confluenceLabels[0]`)
261
- - `{docType}` - ドキュメントタイプ(requirements, design, tasks)
262
- - `{featureName}` - 機能名
263
-
264
- **設定例**:
265
- ```json
266
- {
267
- "confluence": {
268
- "autoLabels": [
269
- "{projectLabel}",
270
- "{docType}",
271
- "{featureName}",
272
- "custom-label"
273
- ]
274
- }
275
- }
276
- ```
277
-
278
- ## JIRA設定のカスタマイズ
279
-
280
- ### Story作成粒度
281
-
282
- **設定例1: 全Storyを作成(デフォルト)**
283
- ```json
284
- {
285
- "jira": {
286
- "storyCreationGranularity": "all"
287
- }
288
- }
289
- ```
290
-
291
- **設定例2: 指定フェーズのみ作成**
292
- ```json
293
- {
294
- "jira": {
295
- "storyCreationGranularity": "selected-phases",
296
- "selectedPhases": ["implementation", "testing"]
297
- }
298
- }
299
- ```
300
-
301
- ### Epic作成の制御
302
-
303
- **設定例: Epic作成をスキップ**
304
- ```json
305
- {
306
- "jira": {
307
- "createEpic": false
308
- }
309
- }
310
- ```
311
-
312
- ### Story Points設定
313
-
314
- **設定例1: 自動抽出(デフォルト)**
315
- ```json
316
- {
317
- "jira": {
318
- "storyPoints": "auto"
319
- }
320
- }
321
- ```
322
-
323
- **設定例2: Story Pointsを設定しない**
324
- ```json
325
- {
326
- "jira": {
327
- "storyPoints": "disabled"
328
- }
329
- }
330
- ```
331
-
332
- ## ワークフロー設定のカスタマイズ
333
-
334
- ### フェーズの有効化
335
-
336
- **設定例: 設計フェーズをスキップ**
337
- ```json
338
- {
339
- "workflow": {
340
- "enabledPhases": ["requirements", "tasks"]
341
- }
342
- }
343
- ```
344
-
345
- ### 承認者の設定
346
-
347
- **設定例: 日本語ロール名を使用**
348
- ```json
349
- {
350
- "workflow": {
351
- "approvalGates": {
352
- "requirements": ["PL", "部長"],
353
- "design": ["アーキテクト", "部長"],
354
- "release": ["SM", "部長"]
355
- }
356
- }
357
- }
358
- ```
359
-
360
- ## グローバル設定
361
-
362
- 全プロジェクトで共通の設定は、グローバル設定として保存できます。
363
-
364
- ### グローバル設定の作成
365
-
366
- ```bash
367
- npm run config:global
368
- ```
369
-
370
- このツールで `~/.michi/config.json` を作成できます。
371
-
372
- ### グローバル設定のメリット
373
-
374
- - 新規プロジェクトごとに同じ設定を繰り返し入力する必要がない
375
- - 組織標準の設定を統一できる
376
- - プロジェクト固有の設定で上書き可能
377
-
378
- ### 設定の優先順位
379
-
380
- 設定値は以下の優先順位で決定されます:
381
-
382
- 1. **`spec.json`**: 機能固有の設定(最優先)
383
- 2. **`.michi/config.json`**: プロジェクト固有の設定
384
- 3. **`~/.michi/config.json`**: グローバル設定
385
- 4. **環境変数**: システム環境変数または`.env`ファイル
386
- 5. **デフォルト値**: スキーマで定義されたデフォルト値
387
-
388
- ### 使い方
389
-
390
- 1. **コマンド実行**: `npm run config:global`
391
- 2. **設定項目を選択**:
392
- - Confluence設定のカスタマイズ
393
- - JIRA設定のカスタマイズ
394
- - ワークフロー設定のカスタマイズ
395
- 3. **各設定を対話的に入力**: プロンプトに従って選択・入力
396
- 4. **設定を確認**: 最終的な設定内容を確認
397
- 5. **保存**: 設定ファイルを`~/.michi/config.json`に保存
398
-
399
- ### プロジェクト設定との使い分け
400
-
401
- - **グローバル設定(`~/.michi/config.json`)**: 組織全体で共通の設定(Confluence階層構造、JIRA Story作成粒度など)
402
- - **プロジェクト設定(`.michi/config.json`)**: プロジェクト固有の設定(特定プロジェクトのみカスタマイズが必要な場合)
403
-
404
- **推奨フロー**:
405
- 1. 初回: `npm run config:global` でグローバル設定を作成
406
- 2. プロジェクトごと: `michi init` で初期化(グローバル設定を自動コピー)
407
- 3. カスタマイズ: 必要に応じて `.michi/config.json` を手動編集
408
-
409
- ## プロジェクト固有の設定
410
-
411
- プロジェクト固有の`.michi/config.json`は以下の方法で作成できます:
412
-
413
- ### 自動作成(推奨)
414
-
415
- ```bash
416
- # プロジェクト初期化時にグローバル設定から自動コピー
417
- michi init
418
- ```
419
-
420
- ### 手動作成
421
-
422
- 1. グローバル設定をコピー:
423
- ```bash
424
- cp ~/.michi/config.json .michi/config.json
425
- ```
426
-
427
- 2. プロジェクト固有のカスタマイズを適用:
428
- - Confluence設定のカスタマイズ
429
- - JIRA設定のカスタマイズ
430
- - ワークフロー設定のカスタマイズ
431
-
432
- 3. 設定ファイルを保存
433
-
434
- **注意**: グローバル設定(`~/.michi/config.json`)を作成する場合は、`npm run config:global` を使用してください。
435
-
436
- ### 設定項目
437
-
438
- - **Confluence階層構造**: 5つのパターンから選択
439
- - **ページタイトル形式**: カスタマイズ可能
440
- - **JIRA Story作成粒度**: 全作成/フェーズごと/選択フェーズのみ
441
- - **ワークフロー有効化フェーズ**: 要件定義/設計/タスク分割から選択
442
- - **承認者**: 各フェーズの承認者を設定
443
-
444
- ## 設定ファイルのバリデーション
445
-
446
- 設定ファイルの妥当性をチェックするには、以下のコマンドを実行します:
447
-
448
- ```bash
449
- # 設定ファイルのバリデーション
450
- npx @sk8metal/michi-cli config:validate
451
-
452
- # または
453
- michi config:validate
454
- ```
455
-
456
- ## 完全な設定例
457
-
458
- ```json
459
- {
460
- "confluence": {
461
- "pageCreationGranularity": "by-hierarchy",
462
- "pageTitleFormat": "[{projectName}] {featureName} {docTypeLabel}",
463
- "autoLabels": [
464
- "{projectLabel}",
465
- "{docType}",
466
- "{featureName}",
467
- "github-sync"
468
- ],
469
- "hierarchy": {
470
- "mode": "simple",
471
- "parentPageTitle": "[{projectName}] {featureName}"
472
- }
473
- },
474
- "jira": {
475
- "storyCreationGranularity": "all",
476
- "createEpic": true,
477
- "storyPoints": "auto",
478
- "autoLabels": [
479
- "{projectLabel}",
480
- "{featureName}",
481
- "{phaseLabel}"
482
- ]
483
- },
484
- "workflow": {
485
- "enabledPhases": [
486
- "requirements",
487
- "design",
488
- "tasks"
489
- ],
490
- "approvalGates": {
491
- "requirements": ["pm", "director"],
492
- "design": ["architect", "director"],
493
- "release": ["sm", "director"]
494
- }
495
- }
496
- }
497
- ```
498
-
499
- ## 後方互換性
500
-
501
- - 設定ファイルが存在しない場合はデフォルト設定を使用(既存動作を維持)
502
- - 環境変数は引き続き優先(既存の`.env`設定が動作)
503
- - 段階的な移行を可能にする
504
-
505
- ## トラブルシューティング
506
-
507
- ### 設定ファイルが読み込まれない
508
-
509
- 1. `.michi/config.json`がプロジェクトルートに存在するか確認
510
- 2. JSONの構文エラーがないか確認
511
- 3. 設定ファイルのパスが正しいか確認
512
-
513
- ### 階層構造が作成されない
514
-
515
- 1. `pageCreationGranularity`が正しく設定されているか確認
516
- 2. `hierarchy`設定が適切に設定されているか確認
517
- 3. Confluence APIの権限を確認
518
-
519
- ### バリデーションエラー
520
-
521
- 1. エラーメッセージを確認
522
- 2. スキーマに準拠しているか確認
523
- 3. 必須フィールドが設定されているか確認
524
-
525
- ## 参考リンク
526
-
527
- ### Michi関連
528
- - [セットアップガイド](../getting-started/setup.md)
529
- - [ワークフローガイド](./workflow.md)
530
- - [新規リポジトリセットアップ](../getting-started/new-repository-setup.md)
531
- - [設定値リファレンス](../reference/config.md)
532
-
533
- ### cc-sdd関連
534
- - [cc-sdd カスタマイズガイド](https://github.com/gotalab/cc-sdd/blob/main/docs/guides/ja/customization-guide.md) - テンプレート・ルール・Steeringのカスタマイズ方法
535
- - [cc-sdd コマンドリファレンス](https://github.com/gotalab/cc-sdd/blob/main/docs/guides/ja/command-reference.md) - `/kiro:steering-custom`などのコマンド詳細
536
- - [cc-sdd Spec-Driven Guide](https://github.com/gotalab/cc-sdd/blob/main/docs/guides/ja/spec-driven.md) - 仕様駆動開発のワークフロー
537
-