@sk8metal/michi-cli 0.10.1 → 0.11.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 (104) hide show
  1. package/README.md +77 -847
  2. package/dist/scripts/phase-runner.js +1 -1
  3. package/dist/scripts/phase-runner.js.map +1 -1
  4. package/dist/scripts/utils/multi-repo-validator.d.ts +18 -0
  5. package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
  6. package/dist/scripts/utils/multi-repo-validator.js +42 -0
  7. package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
  8. package/dist/scripts/utils/tasks-format-validator.js +3 -3
  9. package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
  10. package/docs/README.md +20 -83
  11. package/docs/getting-started/configuration.md +379 -0
  12. package/docs/getting-started/installation.md +59 -0
  13. package/docs/getting-started/quick-start.md +76 -0
  14. package/docs/guides/ai-tools.md +311 -0
  15. package/docs/guides/atlassian-integration.md +116 -0
  16. package/docs/guides/claude-code.md +155 -0
  17. package/docs/guides/multi-repo.md +117 -0
  18. package/docs/guides/workflow.md +382 -0
  19. package/docs/reference/ai-commands.md +92 -0
  20. package/docs/reference/cli.md +756 -0
  21. package/docs/reference/environment-variables.md +192 -0
  22. package/docs/troubleshooting.md +543 -0
  23. package/package.json +1 -1
  24. package/scripts/phase-runner.ts +1 -1
  25. package/scripts/utils/__tests__/multi-repo-validator.test.ts +159 -1
  26. package/scripts/utils/multi-repo-validator.ts +50 -0
  27. package/scripts/utils/tasks-format-validator.ts +3 -3
  28. package/templates/claude/agents/e2e-first-planner/AGENT.md +1 -1
  29. package/templates/claude/agents/pr-resolver/AGENT.md +15 -3
  30. package/templates/claude/commands/michi/e2e-plan.md +1 -1
  31. package/templates/claude/commands/michi/spec-design.md +2 -2
  32. package/templates/claude/commands/michi/spec-tasks.md +156 -0
  33. package/templates/claude/commands/michi/test-planning.md +1 -1
  34. package/templates/claude/commands/michi/validate-design.md +3 -3
  35. package/templates/claude/commands/michi-multi-repo/impl-all.md +30 -1
  36. package/templates/claude/commands/michi-multi-repo/propagate-specs.md +14 -1
  37. package/templates/claude/commands/michi-multi-repo/spec-review.md +16 -2
  38. package/templates/claude-agent/agents/repo-spec-executor.md +1 -1
  39. package/templates/claude-agent/commands/michi/spec-tasks.md +117 -0
  40. package/templates/claude-agent/rules/code-size-monitor.md +26 -0
  41. package/templates/claude-agent/rules/code-size-rules.md +32 -0
  42. package/templates/codex/AGENTS.override.md +1 -1
  43. package/templates/codex/rules/README.md +2 -2
  44. package/templates/cursor/commands/michi/spec-tasks.md +117 -0
  45. package/templates/michi/cc-sdd-overrides/settings/rules/design-review-michi.md +1 -1
  46. package/docs/context.md +0 -59
  47. package/docs/michi-development/contributing/development.md +0 -341
  48. package/docs/michi-development/contributing/release.md +0 -365
  49. package/docs/michi-development/design/config-unification.md +0 -733
  50. package/docs/michi-development/design/design-config-current-state.md +0 -330
  51. package/docs/michi-development/design/design-config-implementation.md +0 -628
  52. package/docs/michi-development/design/design-config-migration.md +0 -952
  53. package/docs/michi-development/design/design-config-security.md +0 -771
  54. package/docs/michi-development/design/design-config-solution.md +0 -583
  55. package/docs/michi-development/design/design-config-testing.md +0 -892
  56. package/docs/michi-development/testing/manual-verification-flow.md +0 -871
  57. package/docs/michi-development/testing/manual-verification-other-tools.md +0 -1279
  58. package/docs/michi-development/testing/manual-verification-troubleshooting.md +0 -122
  59. package/docs/michi-development/testing/pre-publish-checklist.md +0 -560
  60. package/docs/michi-development/testing-strategy.md +0 -87
  61. package/docs/plan.md +0 -275
  62. package/docs/user-guide/getting-started/github-token-setup.md +0 -510
  63. package/docs/user-guide/getting-started/new-repository-setup.md +0 -704
  64. package/docs/user-guide/getting-started/quick-start.md +0 -212
  65. package/docs/user-guide/getting-started/setup.md +0 -819
  66. package/docs/user-guide/guides/agent-skills-integration.md +0 -222
  67. package/docs/user-guide/guides/customization.md +0 -537
  68. package/docs/user-guide/guides/internationalization.md +0 -540
  69. package/docs/user-guide/guides/migration-guide.md +0 -138
  70. package/docs/user-guide/guides/multi-project.md +0 -368
  71. package/docs/user-guide/guides/multi-repo-guide.md +0 -1590
  72. package/docs/user-guide/guides/phase-automation.md +0 -419
  73. package/docs/user-guide/guides/workflow.md +0 -574
  74. package/docs/user-guide/hands-on/README.md +0 -142
  75. package/docs/user-guide/hands-on/claude-agent-setup.md +0 -597
  76. package/docs/user-guide/hands-on/claude-setup.md +0 -452
  77. package/docs/user-guide/hands-on/cursor-setup.md +0 -353
  78. package/docs/user-guide/hands-on/troubleshooting.md +0 -964
  79. package/docs/user-guide/hands-on/verification-checklist.md +0 -439
  80. package/docs/user-guide/hands-on/workflow-walkthrough.md +0 -1078
  81. package/docs/user-guide/reference/config.md +0 -589
  82. package/docs/user-guide/reference/multi-repo-api.md +0 -771
  83. package/docs/user-guide/reference/quick-reference.md +0 -297
  84. package/docs/user-guide/reference/security-test-payloads.md +0 -50
  85. package/docs/user-guide/reference/tasks-template.md +0 -550
  86. package/docs/user-guide/release/ci-setup-java.md +0 -114
  87. package/docs/user-guide/release/ci-setup-nodejs.md +0 -94
  88. package/docs/user-guide/release/ci-setup-php.md +0 -102
  89. package/docs/user-guide/release/ci-setup-troubleshooting.md +0 -94
  90. package/docs/user-guide/release/ci-setup.md +0 -188
  91. package/docs/user-guide/release/release-flow.md +0 -476
  92. package/docs/user-guide/templates/test-specs/README.md +0 -173
  93. package/docs/user-guide/templates/test-specs/e2e-test-spec-template.md +0 -553
  94. package/docs/user-guide/templates/test-specs/integration-test-spec-template.md +0 -435
  95. package/docs/user-guide/templates/test-specs/performance-test-spec-template.md +0 -454
  96. package/docs/user-guide/templates/test-specs/security-test-spec-template.md +0 -625
  97. package/docs/user-guide/templates/test-specs/unit-test-spec-template.md +0 -328
  98. package/docs/user-guide/testing/integration-tests.md +0 -312
  99. package/docs/user-guide/testing/tdd-cycle.md +0 -349
  100. package/docs/user-guide/testing/test-execution-flow.md +0 -396
  101. package/docs/user-guide/testing/test-failure-handling.md +0 -521
  102. package/docs/user-guide/testing/test-planning-flow.md +0 -185
  103. package/docs/user-guide/testing-strategy.md +0 -185
  104. package/docs/verification-guide.md +0 -518
@@ -1,589 +0,0 @@
1
- # 設定値リファレンス
2
-
3
- このドキュメントでは、`.michi/config.json`で設定可能なすべての設定値について説明します。
4
-
5
- ## 設定ファイルの場所
6
-
7
- Michiの設定ファイルは以下の2つの場所に配置できます:
8
-
9
- ### グローバル設定
10
-
11
- **場所**: `~/.michi/config.json`
12
-
13
- **用途**: 全プロジェクトで共通の設定(組織標準の設定など)
14
-
15
- **作成方法**: `npm run config:global` コマンドを使用
16
-
17
- ### プロジェクト固有設定
18
-
19
- **場所**: プロジェクトルートの `.michi/config.json`
20
-
21
- **用途**: プロジェクト固有の設定(グローバル設定を上書き)
22
-
23
- **作成方法**:
24
- - 自動作成: `michi init` コマンド実行時にグローバル設定から自動コピー
25
- - 手動作成: グローバル設定(`~/.michi/config.json`)をコピーして編集
26
-
27
- **注意**: 以前は `.kiro/config.json` を使用していましたが、Michi専用の設定ファイルとして `.michi/config.json` に変更されました。`.kiro/config.json` が存在する場合は警告が表示されます。
28
-
29
- ### 設定ファイルのフォーマット
30
-
31
- ```json
32
- {
33
- "confluence": { ... },
34
- "jira": { ... },
35
- "workflow": { ... }
36
- }
37
- ```
38
-
39
- ## Confluence設定
40
-
41
- | 設定項目 | 型 | デフォルト | 必須 | 説明 | 値の説明 |
42
- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43
- | `confluence.pageCreationGranularity` | `'single' \| 'by-section' \| 'by-hierarchy' \| 'manual'` | `'single'` | いいえ | ページ作成の粒度を指定 | `'single'`: 1つのMarkdownファイルを1つのConfluenceページとして作成<br>`'by-section'`: Markdownのセクションごとにページを作成<br>`'by-hierarchy'`: 階層構造に基づいてページを作成(`hierarchy`設定が必要)<br>`'manual'`: 手動で定義した構造に基づいてページを作成(`hierarchy.structure`設定が必要) |
44
- | `confluence.pageTitleFormat` | `string` | `'[{projectName}] {featureName} {docTypeLabel}'` | いいえ | ページタイトルのフォーマットを指定 | プレースホルダー: `{projectName}`(プロジェクト名)、`{featureName}`(機能名)、`{docTypeLabel}`(ドキュメントタイプのラベル) |
45
- | `confluence.autoLabels` | `string[]` | `['{projectLabel}', '{docType}', '{featureName}', 'github-sync']` | いいえ | Confluenceページに自動的に付与するラベルのリスト | プレースホルダー: `{projectLabel}`(プロジェクトラベル)、`{docType}`(ドキュメントタイプ)、`{featureName}`(機能名) |
46
- | `confluence.spaces` | `{ requirements?: string, design?: string, tasks?: string }` | 環境変数`CONFLUENCE_PRD_SPACE`、または`'PRD'` | いいえ(推奨) | 各ドキュメントタイプをどのConfluenceスペースに作成するかを指定 | `requirements`: 要件定義用スペース<br>`design`: 設計用スペース<br>`tasks`: タスク用スペース |
47
- | `confluence.hierarchy` | `{ mode?: 'simple' \| 'nested', parentPageTitle?: string, createDocTypeParents?: boolean, structure?: object }` | なし | `pageCreationGranularity`が`'by-hierarchy'`または`'manual'`の場合 | 階層構造の設定 | 詳細は下記の子項目を参照 |
48
-
49
- ### `confluence.spaces` の設定例
50
-
51
- ```json
52
- {
53
- "confluence": {
54
- "spaces": {
55
- "requirements": "Michi",
56
- "design": "Michi",
57
- "tasks": "Michi"
58
- }
59
- }
60
- }
61
- ```
62
-
63
- **注意**: 設定されていない場合、環境変数`CONFLUENCE_PRD_SPACE`が使用されます。それもない場合は`'PRD'`がデフォルト値として使用されます。
64
-
65
- ### `confluence.hierarchy` の子項目
66
-
67
- | 設定項目 | 型 | デフォルト | 必須 | 説明 | 値の説明 |
68
- | ------------------------------------------- | ---------------------- | ---------- | --------------------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
69
- | `confluence.hierarchy.mode` | `'simple' \| 'nested'` | `'simple'` | いいえ | 階層構造のモードを指定 | `'simple'`: シンプルな親子構造<br>`'nested'`: ネストされた階層構造 |
70
- | `confluence.hierarchy.parentPageTitle` | `string` | なし | `pageCreationGranularity`が`'by-hierarchy'`の場合(推奨) | 親ページのタイトルフォーマットを指定 | プレースホルダー: `{projectName}`(プロジェクト名)、`{featureName}`(機能名)<br>例: `"[{projectName}] {featureName}"` |
71
- | `confluence.hierarchy.createDocTypeParents` | `boolean` | `false` | いいえ | ドキュメントタイプごとの親ページを作成するかどうかを指定 | `true`: 作成する<br>`false`: 作成しない |
72
- | `confluence.hierarchy.structure` | `object` | なし | `pageCreationGranularity`が`'manual'`の場合 | 手動で定義した階層構造 | 詳細は実装を参照してください |
73
-
74
- ## JIRA設定
75
-
76
- | 設定項目 | 型 | デフォルト | 必須 | 説明 | 値の説明 |
77
- | ------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
78
- | `jira.storyCreationGranularity` | `'all' \| 'by-phase' \| 'selected-phases'` | `'all'` | いいえ | ストーリー作成の粒度を指定 | `'all'`: すべてのフェーズのストーリーを作成<br>`'by-phase'`: フェーズごとにストーリーを作成<br>`'selected-phases'`: `selectedPhases`で指定したフェーズのみストーリーを作成 |
79
- | `jira.createEpic` | `boolean` | `true` | いいえ | Epicを作成するかどうかを指定 | `true`: Epicを作成<br>`false`: Epicを作成しない |
80
- | `jira.storyPoints` | `'auto' \| 'manual' \| 'disabled'` | `'auto'` | いいえ | ストーリーポイントの設定方法を指定 | `'auto'`: 自動計算<br>`'manual'`: 手動設定(tasks.mdから取得)<br>`'disabled'`: ストーリーポイントを設定しない |
81
- | `jira.autoLabels` | `string[]` | `['{projectLabel}', '{featureName}', '{phaseLabel}']` | いいえ | JIRAチケットに自動的に付与するラベルのリスト | プレースホルダー: `{projectLabel}`(プロジェクトラベル)、`{featureName}`(機能名)、`{phaseLabel}`(フェーズラベル) |
82
- | `jira.issueTypes` | `{ epic?: string, story?: string, subtask?: string }` | `{ epic: 'Epic', story: null, subtask: null }` | いいえ(`story`は推奨) | JIRAのIssue Type IDを指定 | `epic`: EpicのIssue Type ID<br>`story`: StoryのIssue Type ID(環境変数`JIRA_ISSUE_TYPE_STORY`でも設定可能)<br>`subtask`: SubtaskのIssue Type ID(環境変数`JIRA_ISSUE_TYPE_SUBTASK`でも設定可能) |
83
- | `jira.selectedPhases` | `string[]` | なし | `storyCreationGranularity`が`'selected-phases'`の場合 | ストーリーを作成するフェーズのリスト | 例: `['Requirements', 'Design', 'Implementation']` |
84
- | `jira.statusMapping` | `{ inProgress?: string, readyForReview?: string }` | `{ inProgress: 'In Progress', readyForReview: 'Ready for Review' }` | いいえ | `spec-impl:start`/`spec-impl:complete`で使用するJIRAステータス名のマッピング | プロジェクトのJIRAワークフローに合わせてカスタマイズ可能 |
85
-
86
- ### `jira.issueTypes` の詳細
87
-
88
- **注意**: `story`が設定されていない場合、環境変数`JIRA_ISSUE_TYPE_STORY`が使用されます。それもない場合はエラーになります。
89
-
90
- **確認方法**:
91
-
92
- - JIRA管理画面: Settings > Issues > Issue types
93
- - REST API: `GET https://your-domain.atlassian.net/rest/api/3/issuetype`
94
-
95
- ## ワークフロー設定
96
-
97
- | 設定項目 | 型 | デフォルト | 必須 | 説明 | 値の説明 |
98
- | ------------------------ | -------------------------------------------------------------------- | ------------------------------------- | ------ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
99
- | `workflow.enabledPhases` | `string[]` | `['requirements', 'design', 'tasks']` | いいえ | 有効化するフェーズのリスト | 有効な値: `'requirements'`, `'design'`, `'tasks'` |
100
- | `workflow.approvalGates` | `{ requirements?: string[], design?: string[], release?: string[] }` | なし | いいえ | 各フェーズの承認ゲートを指定 | 承認者のロール名のリストを指定<br>`requirements`: 要件定義フェーズの承認者<br>`design`: 設計フェーズの承認者<br>`release`: リリースフェーズの承認者 |
101
-
102
- ### `workflow.approvalGates` の設定例
103
-
104
- ```json
105
- {
106
- "workflow": {
107
- "approvalGates": {
108
- "requirements": ["leader", "director"],
109
- "design": ["leader", "director"],
110
- "release": ["service-manager", "director"]
111
- }
112
- }
113
- }
114
- ```
115
-
116
- ## 環境変数による設定
117
-
118
- 一部の設定値は環境変数でも設定可能です。環境変数の設定は`.env`ファイルに記述します。
119
-
120
- ### Atlassian共通設定
121
-
122
- | 環境変数名 | 対応する設定項目 | 説明 | デフォルト |
123
- | ------------------------- | ---------------- | --------------------------------------------------- | ---------- |
124
- | `ATLASSIAN_REQUEST_DELAY` | - | Confluence/JIRA APIリクエスト間の遅延時間(ミリ秒) | `500` |
125
-
126
- ### Confluence関連
127
-
128
- | 環境変数名 | 対応する設定項目 | 説明 | デフォルト |
129
- | ---------------------- | ------------------- | ----------------------------------------------------------- | ---------- |
130
- | `CONFLUENCE_PRD_SPACE` | `confluence.spaces` | Confluenceスペースキー(`confluence.spaces`のデフォルト値) | `'PRD'` |
131
- | `CONFLUENCE_BASE_URL` | - | ConfluenceのベースURL | なし |
132
- | `CONFLUENCE_USERNAME` | - | Confluenceのユーザー名 | なし |
133
- | `CONFLUENCE_API_TOKEN` | - | ConfluenceのAPIトークン | なし |
134
-
135
- ### JIRA関連
136
-
137
- | 環境変数名 | 対応する設定項目 | 説明 | デフォルト |
138
- | ------------------------- | ------------------------- | ---------------------------------------------------------- | ---------- |
139
- | `JIRA_BASE_URL` | - | JIRAのベースURL | なし |
140
- | `JIRA_USERNAME` | - | JIRAのユーザー名 | なし |
141
- | `JIRA_API_TOKEN` | - | JIRAのAPIトークン | なし |
142
- | `JIRA_PROJECT_KEY` | - | JIRAプロジェクトキー(`.kiro/project.json`からも取得可能) | なし |
143
- | `JIRA_ISSUE_TYPE_STORY` | `jira.issueTypes.story` | StoryのIssue Type ID | なし |
144
- | `JIRA_ISSUE_TYPE_SUBTASK` | `jira.issueTypes.subtask` | SubtaskのIssue Type ID | なし |
145
- | `JIRA_EPIC_LINK_FIELD` | - | Epic LinkカスタムフィールドID(例: `customfield_10014`) | なし |
146
-
147
- ## 設定の優先順位
148
-
149
- 設定値は以下の優先順位で決定されます:
150
-
151
- 1. **`spec.json`**: 機能固有の設定(最優先)
152
- 2. **`.michi/config.json`**: プロジェクト固有の設定
153
- 3. **`~/.michi/config.json`**: グローバル設定
154
- 4. **環境変数**: システム環境変数または`.env`ファイル
155
- 5. **デフォルト値**: スキーマで定義されたデフォルト値
156
-
157
- **推奨される使い方**:
158
- - **グローバル設定(`~/.michi/config.json`)**: 組織全体で共通の設定(Confluence階層構造、JIRA Story作成粒度など)
159
- - **プロジェクト設定(`.michi/config.json`)**: プロジェクト固有の設定(特定プロジェクトのみカスタマイズが必要な場合)
160
-
161
- ## 設定例
162
-
163
- ### パターン1: 最小構成(シンプル)
164
-
165
- 最小限の設定で動作させる場合:
166
-
167
- ```json
168
- {
169
- "confluence": {
170
- "spaces": {
171
- "requirements": "Michi",
172
- "design": "Michi",
173
- "tasks": "Michi"
174
- }
175
- },
176
- "jira": {
177
- "issueTypes": {
178
- "story": "10036",
179
- "subtask": "10037"
180
- }
181
- }
182
- }
183
- ```
184
-
185
- **特徴**:
186
-
187
- - Confluenceスペースのみ指定
188
- - JIRA Issue Type IDのみ指定
189
- - その他はデフォルト値を使用
190
-
191
- **使用場面**:
192
-
193
- - 小規模プロジェクト
194
- - デフォルト動作で十分な場合
195
-
196
- ### パターン2: 標準構成(推奨)
197
-
198
- 一般的なプロジェクトで推奨される設定:
199
-
200
- ```json
201
- {
202
- "confluence": {
203
- "pageCreationGranularity": "by-hierarchy",
204
- "spaces": {
205
- "requirements": "Michi",
206
- "design": "Michi",
207
- "tasks": "Michi"
208
- },
209
- "hierarchy": {
210
- "mode": "simple",
211
- "parentPageTitle": "[{projectName}] {featureName}"
212
- }
213
- },
214
- "jira": {
215
- "createEpic": true,
216
- "storyCreationGranularity": "all",
217
- "storyPoints": "auto",
218
- "issueTypes": {
219
- "story": "1",
220
- "subtask": "2"
221
- }
222
- },
223
- "workflow": {
224
- "enabledPhases": ["requirements", "design", "tasks"],
225
- "approvalGates": {
226
- "requirements": ["leader", "director"],
227
- "design": ["leader", "director"],
228
- "release": ["service-manager", "director"]
229
- }
230
- }
231
- }
232
- ```
233
-
234
- **特徴**:
235
-
236
- - Confluence階層構造を使用
237
- - JIRA Epicを自動作成
238
- - ワークフロー承認ゲートを設定
239
-
240
- **使用場面**:
241
-
242
- - 中規模以上のプロジェクト
243
- - 承認フローが必要な場合
244
- - チーム開発
245
-
246
- ### パターン3: 完全な構成(高度)
247
-
248
- すべての設定を明示的に指定する場合:
249
-
250
- ```json
251
- {
252
- "confluence": {
253
- "pageCreationGranularity": "by-hierarchy",
254
- "pageTitleFormat": "[{projectName}] {featureName} {docTypeLabel}",
255
- "autoLabels": [
256
- "{projectLabel}",
257
- "{docType}",
258
- "{featureName}",
259
- "github-sync"
260
- ],
261
- "spaces": {
262
- "requirements": "Michi",
263
- "design": "Michi",
264
- "tasks": "Michi"
265
- },
266
- "hierarchy": {
267
- "mode": "simple",
268
- "parentPageTitle": "[{projectName}] {featureName}",
269
- "createDocTypeParents": false
270
- }
271
- },
272
- "jira": {
273
- "storyCreationGranularity": "all",
274
- "createEpic": true,
275
- "storyPoints": "auto",
276
- "autoLabels": ["{projectLabel}", "{featureName}", "{phaseLabel}"],
277
- "issueTypes": {
278
- "epic": "Epic",
279
- "story": "1",
280
- "subtask": "2"
281
- }
282
- },
283
- "workflow": {
284
- "enabledPhases": ["requirements", "design", "tasks"],
285
- "approvalGates": {
286
- "requirements": ["leader", "director"],
287
- "design": ["leader", "director"],
288
- "release": ["service-manager", "director"]
289
- }
290
- }
291
- }
292
- ```
293
-
294
- **特徴**:
295
-
296
- - すべての設定値を明示
297
- - カスタムラベルとタイトルフォーマット
298
- - 詳細なワークフロー設定
299
-
300
- **使用場面**:
301
-
302
- - 大規模プロジェクト
303
- - 複雑な承認フローが必要な場合
304
- - カスタマイズ要件が多い場合
305
-
306
- ### 実際のプロジェクト例: michi-practice1
307
-
308
- 実際のプロジェクト(`michi-practice1`)で使用されている設定:
309
-
310
- ```json
311
- {
312
- "confluence": {
313
- "pageCreationGranularity": "by-hierarchy",
314
- "hierarchy": {
315
- "mode": "simple",
316
- "parentPageTitle": "[{projectName}] {featureName}"
317
- },
318
- "spaces": {
319
- "requirements": "Michi",
320
- "design": "Michi",
321
- "tasks": "Michi"
322
- }
323
- },
324
- "jira": {
325
- "createEpic": true,
326
- "storyCreationGranularity": "all",
327
- "storyPoints": "auto",
328
- "issueTypes": {
329
- "story": "1",
330
- "subtask": "2"
331
- }
332
- },
333
- "workflow": {
334
- "enabledPhases": ["requirements", "design", "tasks"],
335
- "approvalGates": {
336
- "requirements": ["leader", "director"],
337
- "design": ["leader", "director"],
338
- "release": ["service-manager", "director"]
339
- }
340
- }
341
- }
342
- ```
343
-
344
- **説明**:
345
-
346
- - Confluence階層構造を使用して、機能ごとに親ページを作成
347
- - JIRA Epicを自動作成し、すべてのフェーズのストーリーを作成
348
- - ワークフロー承認ゲートを設定して、各フェーズで承認が必要
349
-
350
- **参考**: この設定は`michi-practice1`プロジェクトで実際に使用されています。
351
-
352
- ## バリデーション
353
-
354
- 設定ファイルは実行前に自動的にバリデーションされます。エラーがある場合は、実行前にエラーメッセージが表示されます。
355
-
356
- バリデーションを手動で実行する場合:
357
-
358
- ```bash
359
- # 推奨: michiコマンド経由
360
- michi config:validate
361
-
362
- # または、npx経由
363
- npx tsx scripts/utils/config-validator.ts
364
- ```
365
-
366
- ## トラブルシューティング
367
-
368
- ### 設定値が反映されない
369
-
370
- **症状**: 設定ファイルを変更したが、動作が変わらない
371
-
372
- **原因と解決方法**:
373
-
374
- 1. **JSON構文エラー**
375
- - `.michi/config.json`のJSON構文が正しいか確認
376
- - JSONバリデーターを使用: `npx tsx scripts/utils/config-validator.ts`
377
- - よくあるエラー: 末尾のカンマ、引用符の不一致
378
-
379
- 2. **設定ファイルのパスが間違っている**
380
- - 設定ファイルのパスが正しいか確認(プロジェクトルートの`.michi/config.json`)
381
- - 現在のディレクトリを確認: `pwd`
382
- - 設定ファイルの存在確認: `ls -la .michi/config.json`
383
-
384
- 3. **優先順位の問題**
385
- - 環境変数が設定されている場合、環境変数の優先順位を確認
386
- - `spec.json`に設定がある場合、`spec.json`が最優先であることを確認
387
- - 設定の優先順位: `spec.json` > `.michi/config.json` > `~/.michi/config.json` > 環境変数 > デフォルト値
388
-
389
- 4. **設定ファイルの読み込みエラー**
390
- - 設定ファイルの権限を確認: `chmod 644 .michi/config.json`
391
- - ファイルエンコーディングを確認(UTF-8推奨)
392
-
393
- ### 必須設定値エラー
394
-
395
- **症状**: 実行時に「設定値が不足しています」エラーが表示される
396
-
397
- **よくあるエラーケース**:
398
-
399
- #### エラー1: `jira.issueTypes.story`が設定されていません
400
-
401
- **エラーメッセージ例**:
402
-
403
- ```
404
- ❌ Configuration errors:
405
- jira.issueTypes.storyが設定されていません。環境変数JIRA_ISSUE_TYPE_STORYも設定されていないため、JIRA同期を実行できません。
406
- ```
407
-
408
- **解決方法**:
409
-
410
- 1. `.michi/config.json`に以下を追加:
411
-
412
- ```json
413
- {
414
- "jira": {
415
- "issueTypes": {
416
- "story": "10036"
417
- }
418
- }
419
- }
420
- ```
421
-
422
- 2. または、環境変数を設定:
423
-
424
- ```bash
425
- export JIRA_ISSUE_TYPE_STORY=10036
426
- ```
427
-
428
- 3. Issue Type IDの確認方法:
429
- - JIRA管理画面: Settings > Issues > Issue types
430
- - REST API: `GET https://your-domain.atlassian.net/rest/api/3/issuetype`
431
-
432
- #### エラー2: `confluence.hierarchy`が設定されていません
433
-
434
- **エラーメッセージ例**:
435
-
436
- ```
437
- ❌ Configuration errors:
438
- confluence.hierarchyが設定されていません。pageCreationGranularityが"by-hierarchy"の場合、hierarchy設定が必須です。
439
- ```
440
-
441
- **解決方法**:
442
- `.michi/config.json`に以下を追加:
443
-
444
- ```json
445
- {
446
- "confluence": {
447
- "pageCreationGranularity": "by-hierarchy",
448
- "hierarchy": {
449
- "mode": "simple",
450
- "parentPageTitle": "[{projectName}] {featureName}"
451
- }
452
- }
453
- }
454
- ```
455
-
456
- または、`pageCreationGranularity`を`"single"`に変更:
457
-
458
- ```json
459
- {
460
- "confluence": {
461
- "pageCreationGranularity": "single"
462
- }
463
- }
464
- ```
465
-
466
- #### エラー3: `confluence.spaces.requirements`が設定されていません
467
-
468
- **エラーメッセージ例**:
469
-
470
- ```
471
- ⚠️ Warnings:
472
- confluence.spaces.requirementsが設定されていません。環境変数CONFLUENCE_PRD_SPACEも設定されていないため、デフォルト値(PRD)を使用します。
473
- ```
474
-
475
- **解決方法**:
476
-
477
- 1. `.michi/config.json`に以下を追加:
478
-
479
- ```json
480
- {
481
- "confluence": {
482
- "spaces": {
483
- "requirements": "Michi",
484
- "design": "Michi",
485
- "tasks": "Michi"
486
- }
487
- }
488
- }
489
- ```
490
-
491
- 2. または、環境変数を設定:
492
-
493
- ```bash
494
- export CONFLUENCE_PRD_SPACE=Michi
495
- ```
496
-
497
- ### バリデーションエラー
498
-
499
- **症状**: バリデーション実行時にエラーが表示される
500
-
501
- **よくあるエラーケース**:
502
-
503
- #### エラー1: JSON構文エラー
504
-
505
- **エラーメッセージ例**:
506
-
507
- ```
508
- ❌ Validation errors:
509
- Invalid JSON: Unexpected token } in JSON at position 123
510
- ```
511
-
512
- **解決方法**:
513
-
514
- - JSON構文を確認
515
- - 末尾のカンマを削除
516
- - 引用符を統一(ダブルクォートを使用)
517
-
518
- #### エラー2: スキーマバリデーションエラー
519
-
520
- **エラーメッセージ例**:
521
-
522
- ```
523
- ❌ Validation errors:
524
- confluence.pageCreationGranularity: Invalid enum value. Expected 'single' | 'by-section' | 'by-hierarchy' | 'manual', received 'invalid-value'
525
- ```
526
-
527
- **解決方法**:
528
-
529
- - 設定値が有効な値か確認
530
- - このドキュメントの各設定値の説明を参照
531
- - デフォルト値を使用する場合は設定を削除
532
-
533
- ### 設定値の優先順位が不明確
534
-
535
- **症状**: どの設定値が使用されているかわからない
536
-
537
- **確認方法**:
538
-
539
- 1. **バリデーション実行時のログを確認**
540
- - Confluence同期時: `📌 Using Confluence space: Michi (source: config.json)`
541
- - JIRA同期時: 設定値のソースが表示される
542
-
543
- 2. **設定ファイルの優先順位を理解**
544
- - `spec.json` > `.michi/config.json` > `~/.michi/config.json` > 環境変数 > デフォルト値
545
- - 同じ設定値が複数箇所にある場合、優先順位の高いものが使用される
546
-
547
- 3. **デバッグ方法**
548
-
549
- ```bash
550
- # 設定値を確認
551
- npx tsx scripts/utils/config-validator.ts
552
-
553
- # 実際の設定値を表示(開発用)
554
- # scripts/utils/config-loader.ts を参照
555
- ```
556
-
557
- ### デフォルト値の確認
558
-
559
- 各設定値のデフォルト値は、このドキュメントの各セクションに記載されています。また、`scripts/config/config-schema.ts`のスキーマ定義も参照してください。
560
-
561
- ### よくある質問
562
-
563
- **Q: 設定ファイルを変更したが、変更が反映されない**
564
-
565
- A: 以下の順序で確認してください:
566
-
567
- 1. JSON構文が正しいか確認
568
- 2. 設定ファイルのパスが正しいか確認
569
- 3. 優先順位を確認(`spec.json`が最優先)
570
- 4. バリデーションを実行してエラーがないか確認
571
-
572
- **Q: 環境変数と`config.json`のどちらを優先すべきか**
573
-
574
- A: プロジェクト固有の設定は`config.json`に、個人固有の設定は環境変数に設定することを推奨します。`config.json`の方が優先順位が高いため、プロジェクト全体で統一された設定を維持できます。
575
-
576
- **Q: `spec.json`と`config.json`の違いは何か**
577
-
578
- A:
579
-
580
- - `spec.json`: 機能固有の設定(`.kiro/specs/<feature>/spec.json`)
581
- - `config.json`: プロジェクト全体の設定(`.michi/config.json`)
582
- - `spec.json`が最優先で、機能ごとに異なる設定が可能
583
-
584
- **Q: 設定ファイルをGitで管理すべきか**
585
-
586
- A:
587
-
588
- - `.michi/config.json`: チーム固有設定のため、`.gitignore`に追加することを推奨
589
- - `spec.json`: 機能仕様の一部のため、Gitで管理することを推奨