@sk8metal/michi-cli 0.0.4 → 0.0.6
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/CHANGELOG.md +42 -0
- package/README.md +66 -55
- package/dist/scripts/config-interactive.d.ts +1 -1
- package/dist/scripts/config-interactive.d.ts.map +1 -1
- package/dist/scripts/config-interactive.js +4 -4
- package/dist/scripts/config-interactive.js.map +1 -1
- package/dist/scripts/confluence-sync.js +2 -2
- package/dist/scripts/confluence-sync.js.map +1 -1
- package/dist/scripts/create-project.d.ts +2 -2
- package/dist/scripts/create-project.js +2 -2
- package/dist/scripts/jira-sync.js +3 -3
- package/dist/scripts/jira-sync.js.map +1 -1
- package/dist/scripts/utils/__tests__/config-loader.test.d.ts +5 -0
- package/dist/scripts/utils/__tests__/config-loader.test.d.ts.map +1 -0
- package/dist/scripts/utils/__tests__/config-loader.test.js +201 -0
- package/dist/scripts/utils/__tests__/config-loader.test.js.map +1 -0
- package/dist/scripts/utils/__tests__/config-validator.test.js +29 -16
- package/dist/scripts/utils/__tests__/config-validator.test.js.map +1 -1
- package/dist/scripts/utils/config-loader.d.ts +4 -0
- package/dist/scripts/utils/config-loader.d.ts.map +1 -1
- package/dist/scripts/utils/config-loader.js +24 -2
- package/dist/scripts/utils/config-loader.js.map +1 -1
- package/dist/scripts/utils/config-validator.js +8 -9
- package/dist/scripts/utils/config-validator.js.map +1 -1
- package/dist/src/cli.js +2 -2
- package/dist/src/cli.js.map +1 -1
- package/docs/README.md +93 -0
- package/docs/contributing/development.md +304 -0
- package/docs/{new-project-setup.md → getting-started/new-project-setup.md} +38 -38
- package/docs/getting-started/quick-start.md +145 -0
- package/docs/{setup.md → getting-started/setup.md} +63 -49
- package/docs/{customization-guide.md → guides/customization.md} +64 -12
- package/docs/guides/multi-project.md +365 -0
- package/docs/{config-reference.md → reference/config.md} +76 -197
- package/docs/{quick-reference.md → reference/quick-reference.md} +23 -20
- package/env.example +3 -1
- package/package.json +3 -1
- package/scripts/config-interactive.ts +4 -3
- package/scripts/confluence-sync.ts +2 -2
- package/scripts/create-project.ts +4 -4
- package/scripts/jira-sync.ts +3 -3
- package/scripts/set-permissions.js +29 -0
- package/scripts/setup-existing.sh +1 -1
- package/scripts/utils/__tests__/config-loader.test.ts +254 -0
- package/scripts/utils/__tests__/config-validator.test.ts +32 -16
- package/scripts/utils/config-loader.ts +30 -2
- package/scripts/utils/config-validator.ts +8 -8
- package/docs/multi-project.md +0 -233
- package/docs/testing.md +0 -202
- /package/docs/{release.md → contributing/release.md} +0 -0
- /package/docs/{phase-automation.md → guides/phase-automation.md} +0 -0
- /package/docs/{workflow.md → guides/workflow.md} +0 -0
- /package/docs/{tasks-template.md → reference/tasks-template.md} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# 設定値リファレンス
|
|
2
2
|
|
|
3
|
-
このドキュメントでは、`.
|
|
3
|
+
このドキュメントでは、`.michi/config.json`で設定可能なすべての設定値について説明します。
|
|
4
4
|
|
|
5
5
|
## 設定ファイルの場所
|
|
6
6
|
|
|
7
|
-
プロジェクトルートの `.
|
|
7
|
+
プロジェクトルートの `.michi/config.json` に設定を記述します。
|
|
8
|
+
|
|
9
|
+
**注意**: 以前は `.kiro/config.json` を使用していましたが、Michi専用の設定ファイルとして `.michi/config.json` に変更されました。`.kiro/config.json` が存在する場合は警告が表示されます。
|
|
8
10
|
|
|
9
11
|
```json
|
|
10
12
|
{
|
|
@@ -16,50 +18,15 @@
|
|
|
16
18
|
|
|
17
19
|
## Confluence設定
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- `'single'`: 1つのMarkdownファイルを1つのConfluenceページとして作成
|
|
28
|
-
- `'by-section'`: Markdownのセクションごとにページを作成
|
|
29
|
-
- `'by-hierarchy'`: 階層構造に基づいてページを作成(`hierarchy`設定が必要)
|
|
30
|
-
- `'manual'`: 手動で定義した構造に基づいてページを作成(`hierarchy.structure`設定が必要)
|
|
31
|
-
|
|
32
|
-
### `confluence.pageTitleFormat`
|
|
33
|
-
|
|
34
|
-
**型**: `string`
|
|
35
|
-
**デフォルト**: `'[{projectName}] {featureName} {docTypeLabel}'`
|
|
36
|
-
**必須**: いいえ
|
|
37
|
-
|
|
38
|
-
ページタイトルのフォーマットを指定します。以下のプレースホルダーが使用できます:
|
|
39
|
-
|
|
40
|
-
- `{projectName}`: プロジェクト名(`.kiro/project.json`から取得)
|
|
41
|
-
- `{featureName}`: 機能名
|
|
42
|
-
- `{docTypeLabel}`: ドキュメントタイプのラベル(要件定義、設計書、タスク)
|
|
21
|
+
| 設定項目 | 型 | デフォルト | 必須 | 説明 | 値の説明 |
|
|
22
|
+
|---------|-----|-----------|------|------|---------|
|
|
23
|
+
| `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`設定が必要) |
|
|
24
|
+
| `confluence.pageTitleFormat` | `string` | `'[{projectName}] {featureName} {docTypeLabel}'` | いいえ | ページタイトルのフォーマットを指定 | プレースホルダー: `{projectName}`(プロジェクト名)、`{featureName}`(機能名)、`{docTypeLabel}`(ドキュメントタイプのラベル) |
|
|
25
|
+
| `confluence.autoLabels` | `string[]` | `['{projectLabel}', '{docType}', '{featureName}', 'github-sync']` | いいえ | Confluenceページに自動的に付与するラベルのリスト | プレースホルダー: `{projectLabel}`(プロジェクトラベル)、`{docType}`(ドキュメントタイプ)、`{featureName}`(機能名) |
|
|
26
|
+
| `confluence.spaces` | `{ requirements?: string, design?: string, tasks?: string }` | 環境変数`CONFLUENCE_PRD_SPACE`、または`'PRD'` | いいえ(推奨) | 各ドキュメントタイプをどのConfluenceスペースに作成するかを指定 | `requirements`: 要件定義用スペース<br>`design`: 設計用スペース<br>`tasks`: タスク用スペース |
|
|
27
|
+
| `confluence.hierarchy` | `{ mode?: 'simple' \| 'nested', parentPageTitle?: string, createDocTypeParents?: boolean, structure?: object }` | なし | `pageCreationGranularity`が`'by-hierarchy'`または`'manual'`の場合 | 階層構造の設定 | 詳細は下記の子項目を参照 |
|
|
43
28
|
|
|
44
|
-
### `confluence.
|
|
45
|
-
|
|
46
|
-
**型**: `string[]`
|
|
47
|
-
**デフォルト**: `['{projectLabel}', '{docType}', '{featureName}', 'github-sync']`
|
|
48
|
-
**必須**: いいえ
|
|
49
|
-
|
|
50
|
-
Confluenceページに自動的に付与するラベルのリスト。以下のプレースホルダーが使用できます:
|
|
51
|
-
|
|
52
|
-
- `{projectLabel}`: プロジェクトラベル(`project:michi`など)
|
|
53
|
-
- `{docType}`: ドキュメントタイプ(`requirements`, `design`, `tasks`)
|
|
54
|
-
- `{featureName}`: 機能名
|
|
55
|
-
|
|
56
|
-
### `confluence.spaces`
|
|
57
|
-
|
|
58
|
-
**型**: `{ requirements?: string, design?: string, tasks?: string }`
|
|
59
|
-
**デフォルト**: 環境変数`CONFLUENCE_PRD_SPACE`、または`'PRD'`
|
|
60
|
-
**必須**: いいえ(推奨)
|
|
61
|
-
|
|
62
|
-
各ドキュメントタイプをどのConfluenceスペースに作成するかを指定します。
|
|
29
|
+
### `confluence.spaces` の設定例
|
|
63
30
|
|
|
64
31
|
```json
|
|
65
32
|
{
|
|
@@ -75,110 +42,27 @@ Confluenceページに自動的に付与するラベルのリスト。以下の
|
|
|
75
42
|
|
|
76
43
|
**注意**: 設定されていない場合、環境変数`CONFLUENCE_PRD_SPACE`が使用されます。それもない場合は`'PRD'`がデフォルト値として使用されます。
|
|
77
44
|
|
|
78
|
-
### `confluence.hierarchy`
|
|
79
|
-
|
|
80
|
-
**型**: `{ mode?: 'simple' | 'nested', parentPageTitle?: string, createDocTypeParents?: boolean, structure?: object }`
|
|
81
|
-
**デフォルト**: なし
|
|
82
|
-
**必須**: `pageCreationGranularity`が`'by-hierarchy'`または`'manual'`の場合
|
|
83
|
-
|
|
84
|
-
階層構造の設定です。
|
|
45
|
+
### `confluence.hierarchy` の子項目
|
|
85
46
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
階層構造のモードを指定します。
|
|
93
|
-
|
|
94
|
-
- `'simple'`: シンプルな親子構造
|
|
95
|
-
- `'nested'`: ネストされた階層構造
|
|
96
|
-
|
|
97
|
-
#### `confluence.hierarchy.parentPageTitle`
|
|
98
|
-
|
|
99
|
-
**型**: `string`
|
|
100
|
-
**デフォルト**: なし
|
|
101
|
-
**必須**: `pageCreationGranularity`が`'by-hierarchy'`の場合(推奨)
|
|
102
|
-
|
|
103
|
-
親ページのタイトルフォーマットを指定します。プレースホルダーが使用できます:
|
|
104
|
-
|
|
105
|
-
- `{projectName}`: プロジェクト名
|
|
106
|
-
- `{featureName}`: 機能名
|
|
107
|
-
|
|
108
|
-
例: `"[{projectName}] {featureName}"`
|
|
109
|
-
|
|
110
|
-
#### `confluence.hierarchy.createDocTypeParents`
|
|
111
|
-
|
|
112
|
-
**型**: `boolean`
|
|
113
|
-
**デフォルト**: `false`
|
|
114
|
-
**必須**: いいえ
|
|
115
|
-
|
|
116
|
-
ドキュメントタイプごとの親ページを作成するかどうかを指定します。
|
|
117
|
-
|
|
118
|
-
#### `confluence.hierarchy.structure`
|
|
119
|
-
|
|
120
|
-
**型**: `object`
|
|
121
|
-
**デフォルト**: なし
|
|
122
|
-
**必須**: `pageCreationGranularity`が`'manual'`の場合
|
|
123
|
-
|
|
124
|
-
手動で定義した階層構造。詳細は実装を参照してください。
|
|
47
|
+
| 設定項目 | 型 | デフォルト | 必須 | 説明 | 値の説明 |
|
|
48
|
+
|---------|-----|-----------|------|------|---------|
|
|
49
|
+
| `confluence.hierarchy.mode` | `'simple' \| 'nested'` | `'simple'` | いいえ | 階層構造のモードを指定 | `'simple'`: シンプルな親子構造<br>`'nested'`: ネストされた階層構造 |
|
|
50
|
+
| `confluence.hierarchy.parentPageTitle` | `string` | なし | `pageCreationGranularity`が`'by-hierarchy'`の場合(推奨) | 親ページのタイトルフォーマットを指定 | プレースホルダー: `{projectName}`(プロジェクト名)、`{featureName}`(機能名)<br>例: `"[{projectName}] {featureName}"` |
|
|
51
|
+
| `confluence.hierarchy.createDocTypeParents` | `boolean` | `false` | いいえ | ドキュメントタイプごとの親ページを作成するかどうかを指定 | `true`: 作成する<br>`false`: 作成しない |
|
|
52
|
+
| `confluence.hierarchy.structure` | `object` | なし | `pageCreationGranularity`が`'manual'`の場合 | 手動で定義した階層構造 | 詳細は実装を参照してください |
|
|
125
53
|
|
|
126
54
|
## JIRA設定
|
|
127
55
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
56
|
+
| 設定項目 | 型 | デフォルト | 必須 | 説明 | 値の説明 |
|
|
57
|
+
|---------|-----|-----------|------|------|---------|
|
|
58
|
+
| `jira.storyCreationGranularity` | `'all' \| 'by-phase' \| 'selected-phases'` | `'all'` | いいえ | ストーリー作成の粒度を指定 | `'all'`: すべてのフェーズのストーリーを作成<br>`'by-phase'`: フェーズごとにストーリーを作成<br>`'selected-phases'`: `selectedPhases`で指定したフェーズのみストーリーを作成 |
|
|
59
|
+
| `jira.createEpic` | `boolean` | `true` | いいえ | Epicを作成するかどうかを指定 | `true`: Epicを作成<br>`false`: Epicを作成しない |
|
|
60
|
+
| `jira.storyPoints` | `'auto' \| 'manual' \| 'disabled'` | `'auto'` | いいえ | ストーリーポイントの設定方法を指定 | `'auto'`: 自動計算<br>`'manual'`: 手動設定(tasks.mdから取得)<br>`'disabled'`: ストーリーポイントを設定しない |
|
|
61
|
+
| `jira.autoLabels` | `string[]` | `['{projectLabel}', '{featureName}', '{phaseLabel}']` | いいえ | JIRAチケットに自動的に付与するラベルのリスト | プレースホルダー: `{projectLabel}`(プロジェクトラベル)、`{featureName}`(機能名)、`{phaseLabel}`(フェーズラベル) |
|
|
62
|
+
| `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`でも設定可能) |
|
|
63
|
+
| `jira.selectedPhases` | `string[]` | なし | `storyCreationGranularity`が`'selected-phases'`の場合 | ストーリーを作成するフェーズのリスト | 例: `['Requirements', 'Design', 'Implementation']` |
|
|
135
64
|
|
|
136
|
-
|
|
137
|
-
- `'by-phase'`: フェーズごとにストーリーを作成
|
|
138
|
-
- `'selected-phases'`: `selectedPhases`で指定したフェーズのみストーリーを作成
|
|
139
|
-
|
|
140
|
-
### `jira.createEpic`
|
|
141
|
-
|
|
142
|
-
**型**: `boolean`
|
|
143
|
-
**デフォルト**: `true`
|
|
144
|
-
**必須**: いいえ
|
|
145
|
-
|
|
146
|
-
Epicを作成するかどうかを指定します。
|
|
147
|
-
|
|
148
|
-
### `jira.storyPoints`
|
|
149
|
-
|
|
150
|
-
**型**: `'auto' | 'manual' | 'disabled'`
|
|
151
|
-
**デフォルト**: `'auto'`
|
|
152
|
-
**必須**: いいえ
|
|
153
|
-
|
|
154
|
-
ストーリーポイントの設定方法を指定します。
|
|
155
|
-
|
|
156
|
-
- `'auto'`: 自動計算
|
|
157
|
-
- `'manual'`: 手動設定(tasks.mdから取得)
|
|
158
|
-
- `'disabled'`: ストーリーポイントを設定しない
|
|
159
|
-
|
|
160
|
-
### `jira.autoLabels`
|
|
161
|
-
|
|
162
|
-
**型**: `string[]`
|
|
163
|
-
**デフォルト**: `['{projectLabel}', '{featureName}', '{phaseLabel}']`
|
|
164
|
-
**必須**: いいえ
|
|
165
|
-
|
|
166
|
-
JIRAチケットに自動的に付与するラベルのリスト。以下のプレースホルダーが使用できます:
|
|
167
|
-
|
|
168
|
-
- `{projectLabel}`: プロジェクトラベル(`project:michi`など)
|
|
169
|
-
- `{featureName}`: 機能名
|
|
170
|
-
- `{phaseLabel}`: フェーズラベル(`Requirements`, `Design`など)
|
|
171
|
-
|
|
172
|
-
### `jira.issueTypes`
|
|
173
|
-
|
|
174
|
-
**型**: `{ epic?: string, story?: string, subtask?: string }`
|
|
175
|
-
**デフォルト**: `{ epic: 'Epic', story: null, subtask: null }`
|
|
176
|
-
**必須**: いいえ(`story`は推奨)
|
|
177
|
-
|
|
178
|
-
JIRAのIssue Type IDを指定します。`story`と`subtask`は環境変数でも設定可能です:
|
|
179
|
-
|
|
180
|
-
- `JIRA_ISSUE_TYPE_STORY`: StoryのIssue Type ID
|
|
181
|
-
- `JIRA_ISSUE_TYPE_SUBTASK`: SubtaskのIssue Type ID
|
|
65
|
+
### `jira.issueTypes` の詳細
|
|
182
66
|
|
|
183
67
|
**注意**: `story`が設定されていない場合、環境変数`JIRA_ISSUE_TYPE_STORY`が使用されます。それもない場合はエラーになります。
|
|
184
68
|
|
|
@@ -186,33 +70,15 @@ JIRAのIssue Type IDを指定します。`story`と`subtask`は環境変数で
|
|
|
186
70
|
- JIRA管理画面: Settings > Issues > Issue types
|
|
187
71
|
- REST API: `GET https://your-domain.atlassian.net/rest/api/3/issuetype`
|
|
188
72
|
|
|
189
|
-
### `jira.selectedPhases`
|
|
190
|
-
|
|
191
|
-
**型**: `string[]`
|
|
192
|
-
**デフォルト**: なし
|
|
193
|
-
**必須**: `storyCreationGranularity`が`'selected-phases'`の場合
|
|
194
|
-
|
|
195
|
-
ストーリーを作成するフェーズのリスト。例: `['Requirements', 'Design', 'Implementation']`
|
|
196
|
-
|
|
197
73
|
## ワークフロー設定
|
|
198
74
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
**必須**: いいえ
|
|
204
|
-
|
|
205
|
-
有効化するフェーズのリスト。有効な値: `'requirements'`, `'design'`, `'tasks'`
|
|
75
|
+
| 設定項目 | 型 | デフォルト | 必須 | 説明 | 値の説明 |
|
|
76
|
+
|---------|-----|-----------|------|------|---------|
|
|
77
|
+
| `workflow.enabledPhases` | `string[]` | `['requirements', 'design', 'tasks']` | いいえ | 有効化するフェーズのリスト | 有効な値: `'requirements'`, `'design'`, `'tasks'` |
|
|
78
|
+
| `workflow.approvalGates` | `{ requirements?: string[], design?: string[], release?: string[] }` | なし | いいえ | 各フェーズの承認ゲートを指定 | 承認者のロール名のリストを指定<br>`requirements`: 要件定義フェーズの承認者<br>`design`: 設計フェーズの承認者<br>`release`: リリースフェーズの承認者 |
|
|
206
79
|
|
|
207
|
-
### `workflow.approvalGates`
|
|
80
|
+
### `workflow.approvalGates` の設定例
|
|
208
81
|
|
|
209
|
-
**型**: `{ requirements?: string[], design?: string[], release?: string[] }`
|
|
210
|
-
**デフォルト**: なし
|
|
211
|
-
**必須**: いいえ
|
|
212
|
-
|
|
213
|
-
各フェーズの承認ゲートを指定します。承認者のロール名のリストを指定します。
|
|
214
|
-
|
|
215
|
-
例:
|
|
216
82
|
```json
|
|
217
83
|
{
|
|
218
84
|
"workflow": {
|
|
@@ -229,30 +95,39 @@ JIRAのIssue Type IDを指定します。`story`と`subtask`は環境変数で
|
|
|
229
95
|
|
|
230
96
|
一部の設定値は環境変数でも設定可能です。環境変数の設定は`.env`ファイルに記述します。
|
|
231
97
|
|
|
98
|
+
### Atlassian共通設定
|
|
99
|
+
|
|
100
|
+
| 環境変数名 | 対応する設定項目 | 説明 | デフォルト |
|
|
101
|
+
|-----------|----------------|------|-----------|
|
|
102
|
+
| `ATLASSIAN_REQUEST_DELAY` | - | Confluence/JIRA APIリクエスト間の遅延時間(ミリ秒) | `500` |
|
|
103
|
+
|
|
232
104
|
### Confluence関連
|
|
233
105
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
106
|
+
| 環境変数名 | 対応する設定項目 | 説明 | デフォルト |
|
|
107
|
+
|-----------|----------------|------|-----------|
|
|
108
|
+
| `CONFLUENCE_PRD_SPACE` | `confluence.spaces` | Confluenceスペースキー(`confluence.spaces`のデフォルト値) | `'PRD'` |
|
|
109
|
+
| `CONFLUENCE_BASE_URL` | - | ConfluenceのベースURL | なし |
|
|
110
|
+
| `CONFLUENCE_USERNAME` | - | Confluenceのユーザー名 | なし |
|
|
111
|
+
| `CONFLUENCE_API_TOKEN` | - | ConfluenceのAPIトークン | なし |
|
|
239
112
|
|
|
240
113
|
### JIRA関連
|
|
241
114
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
115
|
+
| 環境変数名 | 対応する設定項目 | 説明 | デフォルト |
|
|
116
|
+
|-----------|----------------|------|-----------|
|
|
117
|
+
| `JIRA_BASE_URL` | - | JIRAのベースURL | なし |
|
|
118
|
+
| `JIRA_USERNAME` | - | JIRAのユーザー名 | なし |
|
|
119
|
+
| `JIRA_API_TOKEN` | - | JIRAのAPIトークン | なし |
|
|
120
|
+
| `JIRA_PROJECT_KEY` | - | JIRAプロジェクトキー(`.kiro/project.json`からも取得可能) | なし |
|
|
121
|
+
| `JIRA_ISSUE_TYPE_STORY` | `jira.issueTypes.story` | StoryのIssue Type ID | なし |
|
|
122
|
+
| `JIRA_ISSUE_TYPE_SUBTASK` | `jira.issueTypes.subtask` | SubtaskのIssue Type ID | なし |
|
|
123
|
+
| `JIRA_EPIC_LINK_FIELD` | - | Epic LinkカスタムフィールドID(例: `customfield_10014`) | なし |
|
|
249
124
|
|
|
250
125
|
## 設定の優先順位
|
|
251
126
|
|
|
252
127
|
設定値は以下の優先順位で決定されます:
|
|
253
128
|
|
|
254
129
|
1. **`spec.json`**: 機能固有の設定(最優先)
|
|
255
|
-
2. **`.
|
|
130
|
+
2. **`.michi/config.json`**: プロジェクト固有の設定
|
|
256
131
|
3. **環境変数**: システム環境変数または`.env`ファイル
|
|
257
132
|
4. **デフォルト値**: スキーマで定義されたデフォルト値
|
|
258
133
|
|
|
@@ -312,8 +187,8 @@ JIRAのIssue Type IDを指定します。`story`と`subtask`は環境変数で
|
|
|
312
187
|
"storyCreationGranularity": "all",
|
|
313
188
|
"storyPoints": "auto",
|
|
314
189
|
"issueTypes": {
|
|
315
|
-
"story": "
|
|
316
|
-
"subtask": "
|
|
190
|
+
"story": "1",
|
|
191
|
+
"subtask": "2"
|
|
317
192
|
}
|
|
318
193
|
},
|
|
319
194
|
"workflow": {
|
|
@@ -365,8 +240,8 @@ JIRAのIssue Type IDを指定します。`story`と`subtask`は環境変数で
|
|
|
365
240
|
"autoLabels": ["{projectLabel}", "{featureName}", "{phaseLabel}"],
|
|
366
241
|
"issueTypes": {
|
|
367
242
|
"epic": "Epic",
|
|
368
|
-
"story": "
|
|
369
|
-
"subtask": "
|
|
243
|
+
"story": "1",
|
|
244
|
+
"subtask": "2"
|
|
370
245
|
}
|
|
371
246
|
},
|
|
372
247
|
"workflow": {
|
|
@@ -413,8 +288,8 @@ JIRAのIssue Type IDを指定します。`story`と`subtask`は環境変数で
|
|
|
413
288
|
"storyCreationGranularity": "all",
|
|
414
289
|
"storyPoints": "auto",
|
|
415
290
|
"issueTypes": {
|
|
416
|
-
"story": "
|
|
417
|
-
"subtask": "
|
|
291
|
+
"story": "1",
|
|
292
|
+
"subtask": "2"
|
|
418
293
|
}
|
|
419
294
|
},
|
|
420
295
|
"workflow": {
|
|
@@ -455,7 +330,11 @@ JIRAのIssue Type IDを指定します。`story`と`subtask`は環境変数で
|
|
|
455
330
|
バリデーションを手動で実行する場合:
|
|
456
331
|
|
|
457
332
|
```bash
|
|
458
|
-
|
|
333
|
+
# 推奨: npmスクリプト経由
|
|
334
|
+
npm run config:validate
|
|
335
|
+
|
|
336
|
+
# または、npx経由
|
|
337
|
+
npx tsx scripts/utils/config-validator.ts
|
|
459
338
|
```
|
|
460
339
|
|
|
461
340
|
## トラブルシューティング
|
|
@@ -467,14 +346,14 @@ tsx scripts/utils/config-validator.ts
|
|
|
467
346
|
**原因と解決方法**:
|
|
468
347
|
|
|
469
348
|
1. **JSON構文エラー**
|
|
470
|
-
- `.
|
|
349
|
+
- `.michi/config.json`のJSON構文が正しいか確認
|
|
471
350
|
- JSONバリデーターを使用: `npx tsx scripts/utils/config-validator.ts`
|
|
472
351
|
- よくあるエラー: 末尾のカンマ、引用符の不一致
|
|
473
352
|
|
|
474
353
|
2. **設定ファイルのパスが間違っている**
|
|
475
|
-
- 設定ファイルのパスが正しいか確認(プロジェクトルートの`.
|
|
354
|
+
- 設定ファイルのパスが正しいか確認(プロジェクトルートの`.michi/config.json`)
|
|
476
355
|
- 現在のディレクトリを確認: `pwd`
|
|
477
|
-
- 設定ファイルの存在確認: `ls -la .
|
|
356
|
+
- 設定ファイルの存在確認: `ls -la .michi/config.json`
|
|
478
357
|
|
|
479
358
|
3. **優先順位の問題**
|
|
480
359
|
- 環境変数が設定されている場合、環境変数の優先順位を確認
|
|
@@ -482,7 +361,7 @@ tsx scripts/utils/config-validator.ts
|
|
|
482
361
|
- 設定の優先順位: `spec.json` > `config.json` > 環境変数 > デフォルト値
|
|
483
362
|
|
|
484
363
|
4. **設定ファイルの読み込みエラー**
|
|
485
|
-
- 設定ファイルの権限を確認: `chmod 644 .
|
|
364
|
+
- 設定ファイルの権限を確認: `chmod 644 .michi/config.json`
|
|
486
365
|
- ファイルエンコーディングを確認(UTF-8推奨)
|
|
487
366
|
|
|
488
367
|
### 必須設定値エラー
|
|
@@ -500,7 +379,7 @@ tsx scripts/utils/config-validator.ts
|
|
|
500
379
|
```
|
|
501
380
|
|
|
502
381
|
**解決方法**:
|
|
503
|
-
1. `.
|
|
382
|
+
1. `.michi/config.json`に以下を追加:
|
|
504
383
|
```json
|
|
505
384
|
{
|
|
506
385
|
"jira": {
|
|
@@ -529,7 +408,7 @@ export JIRA_ISSUE_TYPE_STORY=10036
|
|
|
529
408
|
```
|
|
530
409
|
|
|
531
410
|
**解決方法**:
|
|
532
|
-
`.
|
|
411
|
+
`.michi/config.json`に以下を追加:
|
|
533
412
|
```json
|
|
534
413
|
{
|
|
535
414
|
"confluence": {
|
|
@@ -560,7 +439,7 @@ export JIRA_ISSUE_TYPE_STORY=10036
|
|
|
560
439
|
```
|
|
561
440
|
|
|
562
441
|
**解決方法**:
|
|
563
|
-
1. `.
|
|
442
|
+
1. `.michi/config.json`に以下を追加:
|
|
564
443
|
```json
|
|
565
444
|
{
|
|
566
445
|
"confluence": {
|
|
@@ -621,7 +500,7 @@ export CONFLUENCE_PRD_SPACE=Michi
|
|
|
621
500
|
- JIRA同期時: 設定値のソースが表示される
|
|
622
501
|
|
|
623
502
|
2. **設定ファイルの優先順位を理解**
|
|
624
|
-
- `spec.json` > `.
|
|
503
|
+
- `spec.json` > `.michi/config.json` > 環境変数 > デフォルト値
|
|
625
504
|
- 同じ設定値が複数箇所にある場合、優先順位の高いものが使用される
|
|
626
505
|
|
|
627
506
|
3. **デバッグ方法**
|
|
@@ -655,12 +534,12 @@ A: プロジェクト固有の設定は`config.json`に、個人固有の設定
|
|
|
655
534
|
|
|
656
535
|
A:
|
|
657
536
|
- `spec.json`: 機能固有の設定(`.kiro/specs/<feature>/spec.json`)
|
|
658
|
-
- `config.json`: プロジェクト全体の設定(`.
|
|
537
|
+
- `config.json`: プロジェクト全体の設定(`.michi/config.json`)
|
|
659
538
|
- `spec.json`が最優先で、機能ごとに異なる設定が可能
|
|
660
539
|
|
|
661
540
|
**Q: 設定ファイルをGitで管理すべきか**
|
|
662
541
|
|
|
663
542
|
A:
|
|
664
|
-
- `.
|
|
543
|
+
- `.michi/config.json`: チーム固有設定のため、`.gitignore`に追加することを推奨
|
|
665
544
|
- `spec.json`: 機能仕様の一部のため、Gitで管理することを推奨
|
|
666
545
|
|
|
@@ -30,15 +30,15 @@ npm run create-project -- \
|
|
|
30
30
|
|
|
31
31
|
# 具体例
|
|
32
32
|
npm run create-project -- \
|
|
33
|
-
--name "
|
|
34
|
-
--project-name "A
|
|
33
|
+
--name "20240115-payment-api" \
|
|
34
|
+
--project-name "プロジェクトA" \
|
|
35
35
|
--jira-key "PRJA"
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
**リポジトリ名**: `--name`で指定した値がそのままGitHubリポジトリ名として使用されます。
|
|
39
39
|
|
|
40
40
|
**例**:
|
|
41
|
-
- `--name "
|
|
41
|
+
- `--name "20240115-payment-api"` → GitHubリポジトリ: `org/20240115-payment-api`
|
|
42
42
|
- `--name "payment-api"` → GitHubリポジトリ: `org/payment-api`
|
|
43
43
|
|
|
44
44
|
**注意**: リポジトリ名はkebab-case(小文字、ハイフン区切り)を推奨します。
|
|
@@ -113,19 +113,22 @@ jj git push --bookmark <project-id>/feature/<feature> --allow-new
|
|
|
113
113
|
gh pr create --head <project-id>/feature/<feature> --base init
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
##
|
|
117
|
-
|
|
118
|
-
| コマンド | 説明 |
|
|
119
|
-
|
|
120
|
-
| `/kiro:spec-init <description>` | 仕様初期化 |
|
|
121
|
-
| `/kiro:spec-requirements <feature>` | 要件定義生成 |
|
|
122
|
-
| `/kiro:spec-design <feature>` | 設計生成 |
|
|
123
|
-
| `/kiro:spec-tasks <feature>` | タスク分割 |
|
|
124
|
-
| `/kiro:spec-impl <feature> <tasks>` | TDD実装 |
|
|
125
|
-
| `/kiro:spec-status <feature>` | 進捗確認 |
|
|
126
|
-
| `/kiro:steering` | Steering作成/更新 |
|
|
127
|
-
| `/kiro:
|
|
128
|
-
| `/kiro:
|
|
116
|
+
## コマンド一覧
|
|
117
|
+
|
|
118
|
+
| コマンド | 説明 | 分類 |
|
|
119
|
+
|---------|------|------|
|
|
120
|
+
| `/kiro:spec-init <description>` | 仕様初期化 | cc-sdd |
|
|
121
|
+
| `/kiro:spec-requirements <feature>` | 要件定義生成 | cc-sdd |
|
|
122
|
+
| `/kiro:spec-design <feature>` | 設計生成 | cc-sdd |
|
|
123
|
+
| `/kiro:spec-tasks <feature>` | タスク分割 | cc-sdd |
|
|
124
|
+
| `/kiro:spec-impl <feature> <tasks>` | TDD実装 | cc-sdd |
|
|
125
|
+
| `/kiro:spec-status <feature>` | 進捗確認 | cc-sdd |
|
|
126
|
+
| `/kiro:steering` | Steering作成/更新 | cc-sdd |
|
|
127
|
+
| `/kiro:steering-custom` | カスタムSteering作成 | cc-sdd |
|
|
128
|
+
| `/kiro:validate-gap <feature>` | 既存コードと要件の差異分析 | cc-sdd |
|
|
129
|
+
| `/kiro:validate-design <feature>` | 設計の品質レビューと検証 | cc-sdd |
|
|
130
|
+
| `/kiro:confluence-sync <feature> [type]` | Confluence同期 | Michi only |
|
|
131
|
+
| `/kiro:project-switch <project_id>` | プロジェクト切り替え | Michi only |
|
|
129
132
|
|
|
130
133
|
## Michi CLIコマンド一覧
|
|
131
134
|
|
|
@@ -141,7 +144,7 @@ gh pr create --head <project-id>/feature/<feature> --base init
|
|
|
141
144
|
| `michi project:list` | プロジェクト一覧 |
|
|
142
145
|
| `michi project:dashboard` | リソースダッシュボード生成 |
|
|
143
146
|
| `michi workflow:run --feature <name>` | 統合ワークフロー実行 |
|
|
144
|
-
| `michi config:interactive` | 対話式設定ツール(.
|
|
147
|
+
| `michi config:interactive` | 対話式設定ツール(.michi/config.json作成) |
|
|
145
148
|
| `michi config:validate` | 設定ファイルのバリデーション |
|
|
146
149
|
| `michi --help` | ヘルプ表示 |
|
|
147
150
|
| `michi --version` | バージョン表示 |
|
|
@@ -149,7 +152,7 @@ gh pr create --head <project-id>/feature/<feature> --base init
|
|
|
149
152
|
**インストール方法**:
|
|
150
153
|
- **npx実行(推奨)**: `npx @michi/cli <command>` - 常に最新版を使用
|
|
151
154
|
- **グローバルインストール**: `npm install -g @michi/cli` 後、`michi <command>`
|
|
152
|
-
- **ローカル開発**: `npm run michi <command>` または `tsx src/cli.ts <command>`
|
|
155
|
+
- **ローカル開発**: `npm run michi <command>` または `npx tsx src/cli.ts <command>`
|
|
153
156
|
|
|
154
157
|
## npmスクリプト一覧(michiリポジトリ内)
|
|
155
158
|
|
|
@@ -227,8 +230,8 @@ gh pr create --head <bookmark> --base main
|
|
|
227
230
|
|
|
228
231
|
例:
|
|
229
232
|
- `michi/feature/user-auth`
|
|
230
|
-
- `
|
|
231
|
-
- `
|
|
233
|
+
- `20240115-payment-api/feature/payment`
|
|
234
|
+
- `20240310-analytics-api/feature/user-endpoint`
|
|
232
235
|
|
|
233
236
|
## トラブルシューティング
|
|
234
237
|
|
package/env.example
CHANGED
|
@@ -19,6 +19,8 @@ JIRA_PROJECT_KEYS=PROJECT
|
|
|
19
19
|
# JIRA Issue Type IDs(JIRAインスタンス固有の値 - 必須)
|
|
20
20
|
# JIRA管理画面(Settings > Issues > Issue types)またはREST APIで確認してください
|
|
21
21
|
# REST API: GET /rest/api/3/issuetype で取得可能
|
|
22
|
+
# 注意: 以下の値(10036, 10037)は例です。実際のJIRAインスタンスのIssue Type IDに置き換えてください
|
|
23
|
+
# 一般的にJIRAのIssue Type IDは5桁の数値(例: 10036, 10037)です
|
|
22
24
|
JIRA_ISSUE_TYPE_STORY=10036
|
|
23
25
|
JIRA_ISSUE_TYPE_SUBTASK=10037
|
|
24
26
|
|
|
@@ -27,7 +29,7 @@ ATLASSIAN_REQUEST_DELAY=500
|
|
|
27
29
|
|
|
28
30
|
# Story Pointsカスタムフィールド(JIRAプロジェクト固有)
|
|
29
31
|
# 環境変数 JIRA_STORY_POINTS_FIELD で設定可能(例: customfield_10016)
|
|
30
|
-
JIRA_STORY_POINTS_FIELD=
|
|
32
|
+
JIRA_STORY_POINTS_FIELD=customfield_100
|
|
31
33
|
|
|
32
34
|
# Epic Linkカスタムフィールド(JIRAプロジェクト固有)
|
|
33
35
|
# 環境変数 JIRA_EPIC_LINK_FIELD で設定可能(例: customfield_10014)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sk8metal/michi-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Managed Intelligent Comprehensive Hub for Integration - AI-driven development workflow automation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
],
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc",
|
|
46
|
+
"postbuild": "node scripts/set-permissions.js",
|
|
46
47
|
"prepare": "npm run build",
|
|
47
48
|
"setup:env": "bash scripts/setup-env.sh",
|
|
48
49
|
"create-project": "tsx scripts/create-project.ts",
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
"test:coverage": "vitest --run --coverage",
|
|
68
69
|
"lint": "eslint .",
|
|
69
70
|
"lint:fix": "eslint . --fix",
|
|
71
|
+
"format": "prettier --write .",
|
|
70
72
|
"type-check": "tsc --noEmit"
|
|
71
73
|
},
|
|
72
74
|
"dependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 対話式設定ツール
|
|
3
|
-
* .
|
|
3
|
+
* .michi/config.json を対話的に作成・更新
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { readFileSync, writeFileSync, existsSync } from 'fs';
|
|
@@ -373,7 +373,7 @@ async function main(): Promise<void> {
|
|
|
373
373
|
try {
|
|
374
374
|
console.log('🎨 Michi カスタマイズ設定ツール');
|
|
375
375
|
console.log('='.repeat(60));
|
|
376
|
-
console.log('このツールで .
|
|
376
|
+
console.log('このツールで .michi/config.json を作成・更新できます。\n');
|
|
377
377
|
|
|
378
378
|
// プロジェクトメタデータを読み込み
|
|
379
379
|
let projectMeta;
|
|
@@ -387,7 +387,8 @@ async function main(): Promise<void> {
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
// 既存の設定ファイルを確認
|
|
390
|
-
const
|
|
390
|
+
const { getConfigPath } = await import('./utils/config-loader.js');
|
|
391
|
+
const configPath = getConfigPath();
|
|
391
392
|
let existingConfig: any = null;
|
|
392
393
|
|
|
393
394
|
if (existsSync(configPath)) {
|
|
@@ -10,7 +10,7 @@ import { config } from 'dotenv';
|
|
|
10
10
|
import { loadProjectMeta, type ProjectMetadata } from './utils/project-meta.js';
|
|
11
11
|
import { convertMarkdownToConfluence, createConfluencePage } from './markdown-to-confluence.js';
|
|
12
12
|
import { validateFeatureNameOrThrow } from './utils/feature-name-validator.js';
|
|
13
|
-
import { getConfig } from './utils/config-loader.js';
|
|
13
|
+
import { getConfig, getConfigPath } from './utils/config-loader.js';
|
|
14
14
|
import { createPagesByGranularity } from './utils/confluence-hierarchy.js';
|
|
15
15
|
import { validateForConfluenceSync } from './utils/config-validator.js';
|
|
16
16
|
|
|
@@ -361,7 +361,7 @@ async function syncToConfluence(
|
|
|
361
361
|
if (validation.errors.length > 0) {
|
|
362
362
|
console.error('❌ Configuration errors:');
|
|
363
363
|
validation.errors.forEach(error => console.error(` ${error}`));
|
|
364
|
-
const configPath =
|
|
364
|
+
const configPath = getConfigPath();
|
|
365
365
|
console.error(`\n設定ファイル: ${configPath}`);
|
|
366
366
|
throw new Error('Confluence同期に必要な設定値が不足しています。上記のエラーを確認して設定を修正してください。');
|
|
367
367
|
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* 使い方:
|
|
6
6
|
* npm run create-project -- \
|
|
7
|
-
* --name "
|
|
8
|
-
* --project-name "A
|
|
7
|
+
* --name "20240115-payment-api" \
|
|
8
|
+
* --project-name "プロジェクトA" \
|
|
9
9
|
* --jira-key "PRJA"
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -22,8 +22,8 @@ const __dirname = dirname(__filename);
|
|
|
22
22
|
loadDotenv();
|
|
23
23
|
|
|
24
24
|
interface ProjectConfig {
|
|
25
|
-
name: string; // リポジトリ名:
|
|
26
|
-
projectName: string; // 表示名: A
|
|
25
|
+
name: string; // リポジトリ名: 20240115-payment-api
|
|
26
|
+
projectName: string; // 表示名: プロジェクトA
|
|
27
27
|
jiraKey: string; // JIRAキー: PRJA
|
|
28
28
|
org?: string; // GitHub組織名(デフォルト: .envから)
|
|
29
29
|
labels?: string[]; // Confluenceラベル(デフォルト: 自動生成)
|
package/scripts/jira-sync.ts
CHANGED
|
@@ -23,7 +23,7 @@ import axios from 'axios';
|
|
|
23
23
|
import { config } from 'dotenv';
|
|
24
24
|
import { loadProjectMeta } from './utils/project-meta.js';
|
|
25
25
|
import { validateFeatureNameOrThrow } from './utils/feature-name-validator.js';
|
|
26
|
-
import { getConfig } from './utils/config-loader.js';
|
|
26
|
+
import { getConfig, getConfigPath } from './utils/config-loader.js';
|
|
27
27
|
import { validateForJiraSync } from './utils/config-validator.js';
|
|
28
28
|
|
|
29
29
|
config();
|
|
@@ -355,7 +355,7 @@ async function syncTasksToJIRA(featureName: string): Promise<void> {
|
|
|
355
355
|
if (validation.errors.length > 0) {
|
|
356
356
|
console.error('❌ Configuration errors:');
|
|
357
357
|
validation.errors.forEach(error => console.error(` ${error}`));
|
|
358
|
-
const configPath =
|
|
358
|
+
const configPath = getConfigPath();
|
|
359
359
|
console.error(`\n設定ファイル: ${configPath}`);
|
|
360
360
|
throw new Error('JIRA同期に必要な設定値が不足しています。上記のエラーを確認して設定を修正してください。');
|
|
361
361
|
}
|
|
@@ -370,7 +370,7 @@ async function syncTasksToJIRA(featureName: string): Promise<void> {
|
|
|
370
370
|
if (!storyIssueTypeId) {
|
|
371
371
|
throw new Error(
|
|
372
372
|
'JIRA Story issue type ID is not configured. ' +
|
|
373
|
-
'Please set JIRA_ISSUE_TYPE_STORY environment variable or configure it in .
|
|
373
|
+
'Please set JIRA_ISSUE_TYPE_STORY environment variable or configure it in .michi/config.json. ' +
|
|
374
374
|
'You can find the issue type ID in JIRA UI (Settings > Issues > Issue types) or via REST API: ' +
|
|
375
375
|
'GET https://your-domain.atlassian.net/rest/api/3/issuetype'
|
|
376
376
|
);
|