@sk8metal/michi-cli 0.0.1
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/LICENSE +22 -0
- package/README.md +465 -0
- package/dist/scripts/config/config-schema.d.ts +707 -0
- package/dist/scripts/config/config-schema.d.ts.map +1 -0
- package/dist/scripts/config/config-schema.js +100 -0
- package/dist/scripts/config/config-schema.js.map +1 -0
- package/dist/scripts/config-interactive.d.ts +10 -0
- package/dist/scripts/config-interactive.d.ts.map +1 -0
- package/dist/scripts/config-interactive.js +357 -0
- package/dist/scripts/config-interactive.js.map +1 -0
- package/dist/scripts/confluence-sync.d.ts +54 -0
- package/dist/scripts/confluence-sync.d.ts.map +1 -0
- package/dist/scripts/confluence-sync.js +407 -0
- package/dist/scripts/confluence-sync.js.map +1 -0
- package/dist/scripts/create-project.d.ts +12 -0
- package/dist/scripts/create-project.d.ts.map +1 -0
- package/dist/scripts/create-project.js +244 -0
- package/dist/scripts/create-project.js.map +1 -0
- package/dist/scripts/jira-sync.d.ts +39 -0
- package/dist/scripts/jira-sync.d.ts.map +1 -0
- package/dist/scripts/jira-sync.js +549 -0
- package/dist/scripts/jira-sync.js.map +1 -0
- package/dist/scripts/list-projects.d.ts +7 -0
- package/dist/scripts/list-projects.d.ts.map +1 -0
- package/dist/scripts/list-projects.js +61 -0
- package/dist/scripts/list-projects.js.map +1 -0
- package/dist/scripts/markdown-to-confluence.d.ts +19 -0
- package/dist/scripts/markdown-to-confluence.d.ts.map +1 -0
- package/dist/scripts/markdown-to-confluence.js +121 -0
- package/dist/scripts/markdown-to-confluence.js.map +1 -0
- package/dist/scripts/multi-project-estimate.d.ts +27 -0
- package/dist/scripts/multi-project-estimate.d.ts.map +1 -0
- package/dist/scripts/multi-project-estimate.js +202 -0
- package/dist/scripts/multi-project-estimate.js.map +1 -0
- package/dist/scripts/phase-runner.d.ts +19 -0
- package/dist/scripts/phase-runner.d.ts.map +1 -0
- package/dist/scripts/phase-runner.js +260 -0
- package/dist/scripts/phase-runner.js.map +1 -0
- package/dist/scripts/pr-automation.d.ts +12 -0
- package/dist/scripts/pr-automation.d.ts.map +1 -0
- package/dist/scripts/pr-automation.js +45 -0
- package/dist/scripts/pr-automation.js.map +1 -0
- package/dist/scripts/pre-flight-check.d.ts +15 -0
- package/dist/scripts/pre-flight-check.d.ts.map +1 -0
- package/dist/scripts/pre-flight-check.js +244 -0
- package/dist/scripts/pre-flight-check.js.map +1 -0
- package/dist/scripts/resource-dashboard.d.ts +7 -0
- package/dist/scripts/resource-dashboard.d.ts.map +1 -0
- package/dist/scripts/resource-dashboard.js +100 -0
- package/dist/scripts/resource-dashboard.js.map +1 -0
- package/dist/scripts/setup-existing-project.d.ts +13 -0
- package/dist/scripts/setup-existing-project.d.ts.map +1 -0
- package/dist/scripts/setup-existing-project.js +334 -0
- package/dist/scripts/setup-existing-project.js.map +1 -0
- package/dist/scripts/utils/config-loader.d.ts +20 -0
- package/dist/scripts/utils/config-loader.d.ts.map +1 -0
- package/dist/scripts/utils/config-loader.js +291 -0
- package/dist/scripts/utils/config-loader.js.map +1 -0
- package/dist/scripts/utils/config-validator.d.ts +34 -0
- package/dist/scripts/utils/config-validator.d.ts.map +1 -0
- package/dist/scripts/utils/config-validator.js +286 -0
- package/dist/scripts/utils/config-validator.js.map +1 -0
- package/dist/scripts/utils/confluence-hierarchy.d.ts +47 -0
- package/dist/scripts/utils/confluence-hierarchy.d.ts.map +1 -0
- package/dist/scripts/utils/confluence-hierarchy.js +516 -0
- package/dist/scripts/utils/confluence-hierarchy.js.map +1 -0
- package/dist/scripts/utils/feature-name-validator.d.ts +25 -0
- package/dist/scripts/utils/feature-name-validator.d.ts.map +1 -0
- package/dist/scripts/utils/feature-name-validator.js +113 -0
- package/dist/scripts/utils/feature-name-validator.js.map +1 -0
- package/dist/scripts/utils/project-meta.d.ts +23 -0
- package/dist/scripts/utils/project-meta.d.ts.map +1 -0
- package/dist/scripts/utils/project-meta.js +50 -0
- package/dist/scripts/utils/project-meta.js.map +1 -0
- package/dist/scripts/validate-phase.d.ts +17 -0
- package/dist/scripts/validate-phase.d.ts.map +1 -0
- package/dist/scripts/validate-phase.js +234 -0
- package/dist/scripts/validate-phase.js.map +1 -0
- package/dist/scripts/workflow-orchestrator.d.ts +35 -0
- package/dist/scripts/workflow-orchestrator.d.ts.map +1 -0
- package/dist/scripts/workflow-orchestrator.js +130 -0
- package/dist/scripts/workflow-orchestrator.js.map +1 -0
- package/dist/src/cli.d.ts +11 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +229 -0
- package/dist/src/cli.js.map +1 -0
- package/docs/config-reference.md +666 -0
- package/docs/customization-guide.md +432 -0
- package/docs/multi-project.md +233 -0
- package/docs/new-project-setup.md +576 -0
- package/docs/phase-automation.md +361 -0
- package/docs/quick-reference.md +291 -0
- package/docs/setup.md +404 -0
- package/docs/tasks-template.md +550 -0
- package/docs/testing.md +202 -0
- package/docs/workflow.md +342 -0
- package/env.example +44 -0
- package/mcp.json.example +14 -0
- package/package.json +97 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
# 新規プロジェクトセットアップガイド
|
|
2
|
+
|
|
3
|
+
> **凡例について**: `<feature>` などの記号の意味は [README.md#凡例の記号説明](../README.md#凡例の記号説明) を参照してください。
|
|
4
|
+
|
|
5
|
+
別のリポジトリで新しいプロジェクトを開始する手順です。
|
|
6
|
+
|
|
7
|
+
## クイックスタート
|
|
8
|
+
|
|
9
|
+
### 方法1: 新規プロジェクト自動作成(新規リポジトリ)
|
|
10
|
+
|
|
11
|
+
GitHubに新規リポジトリを作成してプロジェクトをセットアップ:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Michiリポジトリから実行
|
|
15
|
+
cd /path/to/michi
|
|
16
|
+
|
|
17
|
+
# 凡例
|
|
18
|
+
npm run create-project -- \
|
|
19
|
+
--name "<project-id>" \
|
|
20
|
+
--project-name "<project-name>" \
|
|
21
|
+
--jira-key "<jira-key>"
|
|
22
|
+
|
|
23
|
+
# 具体例
|
|
24
|
+
npm run create-project -- \
|
|
25
|
+
--name "customer-a-service-1" \
|
|
26
|
+
--project-name "A社 サービス1" \
|
|
27
|
+
--jira-key "PRJA"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
スクリプトが自動的に:
|
|
31
|
+
1. GitHub リポジトリ作成
|
|
32
|
+
2. cc-sdd 導入
|
|
33
|
+
3. `.kiro/project.json` 作成
|
|
34
|
+
4. 共通ファイルコピー
|
|
35
|
+
5. `.env` テンプレート作成
|
|
36
|
+
6. npm install
|
|
37
|
+
7. 初期コミット・プッシュ
|
|
38
|
+
|
|
39
|
+
### 方法2: 既存プロジェクトにMichiワークフローを追加(推奨 - 既存リポジトリ)
|
|
40
|
+
|
|
41
|
+
既存のリポジトリにAI開発フローを導入:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# 既存プロジェクトのディレクトリに移動
|
|
45
|
+
cd /path/to/existing-repo
|
|
46
|
+
|
|
47
|
+
# Michiのセットアップスクリプトを実行(対話式)
|
|
48
|
+
bash /path/to/michi/scripts/setup-existing.sh
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
対話式でプロジェクト情報を入力すると、自動的に:
|
|
52
|
+
1. ✅ cc-sdd 導入確認・インストール
|
|
53
|
+
2. ✅ `.kiro/project.json` 作成
|
|
54
|
+
3. ✅ Michiから共通ファイルコピー(ルール、コマンド、テンプレート)
|
|
55
|
+
4. ✅ `.env` テンプレート作成
|
|
56
|
+
5. ✅ README.md と .gitignore 更新
|
|
57
|
+
6. ✅ CLIツールのセットアップ案内
|
|
58
|
+
|
|
59
|
+
**完了後**:
|
|
60
|
+
```bash
|
|
61
|
+
# 認証情報を設定
|
|
62
|
+
vim .env
|
|
63
|
+
|
|
64
|
+
# 依存関係インストール(package.jsonが新規作成された場合)
|
|
65
|
+
npm install
|
|
66
|
+
|
|
67
|
+
# セットアップをコミット
|
|
68
|
+
# Jujutsu (jj) を使用する場合:
|
|
69
|
+
jj commit -m "chore: Michiワークフロー追加"
|
|
70
|
+
jj git push
|
|
71
|
+
|
|
72
|
+
# Git を使用する場合:
|
|
73
|
+
git add .
|
|
74
|
+
git commit -m "chore: Michiワークフロー追加"
|
|
75
|
+
git push
|
|
76
|
+
|
|
77
|
+
# 開発開始
|
|
78
|
+
cursor .
|
|
79
|
+
/kiro:spec-init <機能説明>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 方法3: 手動セットアップ
|
|
83
|
+
|
|
84
|
+
詳細な制御が必要な場合は、以下の手順で手動セットアップします。
|
|
85
|
+
|
|
86
|
+
## 手動セットアップ手順
|
|
87
|
+
|
|
88
|
+
### Step 1: GitHubリポジトリ作成
|
|
89
|
+
|
|
90
|
+
#### Jujutsu (jj) を使用する場合
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# GitHub CLI で新規リポジトリ作成
|
|
94
|
+
gh repo create your-org/customer-a-service-1 --private --description "A社 サービス1"
|
|
95
|
+
|
|
96
|
+
# ローカルにクローン
|
|
97
|
+
cd ~/work/projects
|
|
98
|
+
jj git clone https://github.com/your-org/customer-a-service-1
|
|
99
|
+
cd customer-a-service-1
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### Git を使用する場合
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# GitHub CLI で新規リポジトリ作成
|
|
106
|
+
gh repo create your-org/customer-a-service-1 --private --description "A社 サービス1"
|
|
107
|
+
|
|
108
|
+
# ローカルにクローン
|
|
109
|
+
cd ~/work/projects
|
|
110
|
+
git clone https://github.com/your-org/customer-a-service-1
|
|
111
|
+
cd customer-a-service-1
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Step 2: cc-sdd 導入
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# cc-sddをインストール
|
|
118
|
+
npx cc-sdd@latest --cursor --lang ja --yes
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
これにより以下が作成されます:
|
|
122
|
+
- `.cursor/commands/kiro/`: 11のスラッシュコマンド
|
|
123
|
+
- 基本的なプロジェクト構造
|
|
124
|
+
|
|
125
|
+
### Step 3: プロジェクトメタデータ作成
|
|
126
|
+
|
|
127
|
+
`.kiro/project.json` を作成:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"projectId": "customer-a-service-1",
|
|
132
|
+
"projectName": "A社 サービス1",
|
|
133
|
+
"jiraProjectKey": "PRJA",
|
|
134
|
+
"confluenceLabels": ["project:customer-a-service-1", "service:s1"],
|
|
135
|
+
"status": "active",
|
|
136
|
+
"team": ["@dev1", "@dev2"],
|
|
137
|
+
"stakeholders": ["@企画", "@部長"],
|
|
138
|
+
"repository": "https://github.com/your-org/customer-a-service-1",
|
|
139
|
+
"description": "A社向けサービス1の開発"
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**重要なフィールド**:
|
|
144
|
+
- `projectId`: リポジトリ名と一致させる
|
|
145
|
+
- `jiraProjectKey`: JIRA プロジェクトキー(一意)
|
|
146
|
+
- `confluenceLabels`: プロジェクト識別用ラベル(`project:{projectId}`形式で自動生成)
|
|
147
|
+
|
|
148
|
+
**ラベル生成ロジック**:
|
|
149
|
+
|
|
150
|
+
プロジェクトラベルは常に生成され、サービスラベルは条件付きで生成されます:
|
|
151
|
+
|
|
152
|
+
- **プロジェクトラベル**: `project:{projectId}` を常に生成
|
|
153
|
+
- **サービスラベル**: ハイフン(`-`)が含まれる場合のみ生成
|
|
154
|
+
- ハイフンがない場合: `project:michi` のみ(サービスラベルなし)
|
|
155
|
+
- ハイフンがある場合: `project:customer-a-service-1, service:s1`
|
|
156
|
+
- 重複防止: サービスラベルがプロジェクトラベルと同一の場合は追加しない
|
|
157
|
+
|
|
158
|
+
**動作例**:
|
|
159
|
+
- `projectId: 'michi'` → `['project:michi']`(サービスラベルなし)
|
|
160
|
+
- `projectId: 'customer-a-service-1'` → `['project:customer-a-service-1', 'service:s1']`
|
|
161
|
+
- `projectId: 'michi-service'` → `['project:michi-service']`(サービスラベルがプロジェクトラベルと同一のため追加しない)
|
|
162
|
+
### Step 4: Michiから共通設定をコピー
|
|
163
|
+
|
|
164
|
+
Michiリポジトリから必要なファイルをコピー:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Michiリポジトリの場所
|
|
168
|
+
MICHI_PATH=/path/to/michi
|
|
169
|
+
|
|
170
|
+
# ルールファイルをコピー
|
|
171
|
+
cp $MICHI_PATH/.cursor/rules/multi-project.mdc .cursor/rules/
|
|
172
|
+
cp $MICHI_PATH/.cursor/rules/github-ssot.mdc .cursor/rules/
|
|
173
|
+
cp $MICHI_PATH/.cursor/rules/atlassian-mcp.mdc .cursor/rules/
|
|
174
|
+
|
|
175
|
+
# カスタムコマンドをコピー
|
|
176
|
+
cp $MICHI_PATH/.cursor/commands/kiro/confluence-sync.md .cursor/commands/kiro/
|
|
177
|
+
cp $MICHI_PATH/.cursor/commands/kiro/project-switch.md .cursor/commands/kiro/
|
|
178
|
+
|
|
179
|
+
# Steeringテンプレートをコピー
|
|
180
|
+
mkdir -p .kiro/steering
|
|
181
|
+
cp $MICHI_PATH/.kiro/steering/*.md .kiro/steering/
|
|
182
|
+
|
|
183
|
+
# package.json と tsconfig.json をコピー(必要に応じて)
|
|
184
|
+
# 注意: スクリプトはコピーしません。CLIツールを使用します
|
|
185
|
+
cp $MICHI_PATH/tsconfig.json .
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Step 5: 環境変数設定
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# .env テンプレート作成
|
|
192
|
+
cat > .env << 'EOF'
|
|
193
|
+
# Atlassian設定(MCP + REST API共通)
|
|
194
|
+
ATLASSIAN_URL=https://your-domain.atlassian.net
|
|
195
|
+
ATLASSIAN_EMAIL=your-email@company.com
|
|
196
|
+
ATLASSIAN_API_TOKEN=your-token-here
|
|
197
|
+
|
|
198
|
+
# GitHub設定
|
|
199
|
+
GITHUB_ORG=your-org
|
|
200
|
+
GITHUB_TOKEN=ghp_xxx
|
|
201
|
+
GITHUB_REPO=your-org/customer-a-service-1
|
|
202
|
+
|
|
203
|
+
# Confluence共有スペース
|
|
204
|
+
CONFLUENCE_PRD_SPACE=PRD
|
|
205
|
+
CONFLUENCE_QA_SPACE=QA
|
|
206
|
+
CONFLUENCE_RELEASE_SPACE=RELEASE
|
|
207
|
+
|
|
208
|
+
# JIRAプロジェクトキー
|
|
209
|
+
JIRA_PROJECT_KEYS=PRJA
|
|
210
|
+
EOF
|
|
211
|
+
|
|
212
|
+
# 実際の認証情報を編集
|
|
213
|
+
# .env ファイルを編集してください
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Step 6: 依存関係インストール
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
npm install
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Step 7: 動作確認
|
|
223
|
+
|
|
224
|
+
#### Jujutsu (jj) を使用する場合
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# プロジェクト情報を表示
|
|
228
|
+
cat .kiro/project.json
|
|
229
|
+
|
|
230
|
+
# TypeScriptコンパイル確認
|
|
231
|
+
npm run type-check
|
|
232
|
+
|
|
233
|
+
# Jujutsu初期化(まだの場合)
|
|
234
|
+
git init
|
|
235
|
+
jj git init
|
|
236
|
+
jj bookmark track main@origin
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
#### Git を使用する場合
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
# プロジェクト情報を表示
|
|
243
|
+
cat .kiro/project.json
|
|
244
|
+
|
|
245
|
+
# TypeScriptコンパイル確認
|
|
246
|
+
npm run type-check
|
|
247
|
+
|
|
248
|
+
# Git初期化(まだの場合)
|
|
249
|
+
git init
|
|
250
|
+
git branch -M main
|
|
251
|
+
git remote add origin https://github.com/your-org/customer-a-service-1.git
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Step 8: 初期コミット
|
|
255
|
+
|
|
256
|
+
#### Jujutsu (jj) を使用する場合
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
jj commit -m "chore: プロジェクト初期化
|
|
260
|
+
|
|
261
|
+
- cc-sdd導入
|
|
262
|
+
- プロジェクトメタデータ設定
|
|
263
|
+
- 自動化スクリプト追加
|
|
264
|
+
- ドキュメント追加"
|
|
265
|
+
|
|
266
|
+
jj bookmark create main -r '@-'
|
|
267
|
+
jj git push --bookmark main --allow-new
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
#### Git を使用する場合
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# すべてのファイルをステージング
|
|
274
|
+
git add .
|
|
275
|
+
|
|
276
|
+
# 初期コミット
|
|
277
|
+
git commit -m "chore: プロジェクト初期化
|
|
278
|
+
|
|
279
|
+
- cc-sdd導入
|
|
280
|
+
- プロジェクトメタデータ設定
|
|
281
|
+
- 自動化スクリプト追加
|
|
282
|
+
- ドキュメント追加"
|
|
283
|
+
|
|
284
|
+
# mainブランチにプッシュ
|
|
285
|
+
git push -u origin main
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## プロジェクト開始後の開発フロー
|
|
289
|
+
|
|
290
|
+
### 新機能開発
|
|
291
|
+
|
|
292
|
+
#### Jujutsu (jj) を使用する場合
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# 1. 要件定義
|
|
296
|
+
# 凡例
|
|
297
|
+
/kiro:spec-init <機能説明>
|
|
298
|
+
/kiro:spec-requirements <feature>
|
|
299
|
+
jj commit -m "docs: 要件定義追加"
|
|
300
|
+
jj git push
|
|
301
|
+
npx @michi/cli phase:run <feature> requirements
|
|
302
|
+
|
|
303
|
+
# 具体例
|
|
304
|
+
/kiro:spec-init ユーザー認証機能
|
|
305
|
+
/kiro:spec-requirements user-auth
|
|
306
|
+
jj commit -m "docs: 要件定義追加"
|
|
307
|
+
jj git push
|
|
308
|
+
npx @michi/cli phase:run user-auth requirements
|
|
309
|
+
|
|
310
|
+
# 2. 設計
|
|
311
|
+
# 凡例
|
|
312
|
+
/kiro:spec-design <feature>
|
|
313
|
+
jj commit -m "docs: 設計追加"
|
|
314
|
+
jj git push
|
|
315
|
+
npx @michi/cli phase:run <feature> design
|
|
316
|
+
|
|
317
|
+
# 具体例
|
|
318
|
+
/kiro:spec-design user-auth
|
|
319
|
+
jj commit -m "docs: 設計追加"
|
|
320
|
+
jj git push
|
|
321
|
+
npx @michi/cli phase:run user-auth design
|
|
322
|
+
|
|
323
|
+
# 3. タスク分割
|
|
324
|
+
# 凡例
|
|
325
|
+
/kiro:spec-tasks <feature>
|
|
326
|
+
jj commit -m "docs: タスク分割追加"
|
|
327
|
+
jj git push
|
|
328
|
+
npx @michi/cli phase:run <feature> tasks
|
|
329
|
+
|
|
330
|
+
# 具体例
|
|
331
|
+
/kiro:spec-tasks user-auth
|
|
332
|
+
jj commit -m "docs: タスク分割追加"
|
|
333
|
+
jj git push
|
|
334
|
+
npx @michi/cli phase:run user-auth tasks
|
|
335
|
+
|
|
336
|
+
# 4. 実装
|
|
337
|
+
# 凡例
|
|
338
|
+
/kiro:spec-impl <feature> <tasks>
|
|
339
|
+
jj commit -m "feat: 実装 [<jira-key>-XXX]"
|
|
340
|
+
jj bookmark create <project-id>/feature/<feature> -r '@-'
|
|
341
|
+
jj git push --bookmark <project-id>/feature/<feature> --allow-new
|
|
342
|
+
gh pr create --head <project-id>/feature/<feature> --base main
|
|
343
|
+
|
|
344
|
+
# 具体例
|
|
345
|
+
/kiro:spec-impl user-auth FE-1,BE-1
|
|
346
|
+
jj commit -m "feat: 実装 [PRJA-123]"
|
|
347
|
+
jj bookmark create customer-a-service-1/feature/user-auth -r '@-'
|
|
348
|
+
jj git push --bookmark customer-a-service-1/feature/user-auth --allow-new
|
|
349
|
+
gh pr create --head customer-a-service-1/feature/user-auth --base main
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
#### Git を使用する場合
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# 1. 要件定義
|
|
356
|
+
# 凡例
|
|
357
|
+
/kiro:spec-init <機能説明>
|
|
358
|
+
/kiro:spec-requirements <feature>
|
|
359
|
+
git add .
|
|
360
|
+
git commit -m "docs: 要件定義追加"
|
|
361
|
+
git push
|
|
362
|
+
npx @michi/cli phase:run <feature> requirements
|
|
363
|
+
|
|
364
|
+
# 具体例
|
|
365
|
+
/kiro:spec-init ユーザー認証機能
|
|
366
|
+
/kiro:spec-requirements user-auth
|
|
367
|
+
git add .
|
|
368
|
+
git commit -m "docs: 要件定義追加"
|
|
369
|
+
git push
|
|
370
|
+
npx @michi/cli phase:run user-auth requirements
|
|
371
|
+
|
|
372
|
+
# 2. 設計
|
|
373
|
+
# 凡例
|
|
374
|
+
/kiro:spec-design <feature>
|
|
375
|
+
git add .
|
|
376
|
+
git commit -m "docs: 設計追加"
|
|
377
|
+
git push
|
|
378
|
+
npx @michi/cli phase:run <feature> design
|
|
379
|
+
|
|
380
|
+
# 具体例
|
|
381
|
+
/kiro:spec-design user-auth
|
|
382
|
+
git add .
|
|
383
|
+
git commit -m "docs: 設計追加"
|
|
384
|
+
git push
|
|
385
|
+
npx @michi/cli phase:run user-auth design
|
|
386
|
+
|
|
387
|
+
# 3. タスク分割
|
|
388
|
+
# 凡例
|
|
389
|
+
/kiro:spec-tasks <feature>
|
|
390
|
+
git add .
|
|
391
|
+
git commit -m "docs: タスク分割追加"
|
|
392
|
+
git push
|
|
393
|
+
npx @michi/cli phase:run <feature> tasks
|
|
394
|
+
|
|
395
|
+
# 具体例
|
|
396
|
+
/kiro:spec-tasks user-auth
|
|
397
|
+
git add .
|
|
398
|
+
git commit -m "docs: タスク分割追加"
|
|
399
|
+
git push
|
|
400
|
+
npx @michi/cli phase:run user-auth tasks
|
|
401
|
+
|
|
402
|
+
# 4. 実装
|
|
403
|
+
# 凡例
|
|
404
|
+
/kiro:spec-impl <feature> <tasks>
|
|
405
|
+
git checkout -b <project-id>/feature/<feature>
|
|
406
|
+
git add .
|
|
407
|
+
git commit -m "feat: 実装 [<jira-key>-XXX]"
|
|
408
|
+
git push -u origin <project-id>/feature/<feature>
|
|
409
|
+
gh pr create --head <project-id>/feature/<feature> --base main
|
|
410
|
+
|
|
411
|
+
# 具体例
|
|
412
|
+
/kiro:spec-impl user-auth FE-1,BE-1
|
|
413
|
+
git checkout -b customer-a-service-1/feature/user-auth
|
|
414
|
+
git add .
|
|
415
|
+
git commit -m "feat: 実装 [PRJA-123]"
|
|
416
|
+
git push -u origin customer-a-service-1/feature/user-auth
|
|
417
|
+
gh pr create --head customer-a-service-1/feature/user-auth --base main
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
## プロジェクト間の切り替え
|
|
421
|
+
|
|
422
|
+
### Cursor で切り替え
|
|
423
|
+
|
|
424
|
+
```text
|
|
425
|
+
/kiro:project-switch customer-a-service-1
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### ターミナルで切り替え
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
# プロジェクトAに切り替え
|
|
432
|
+
cd ~/work/projects/customer-a-service-1
|
|
433
|
+
|
|
434
|
+
# プロジェクトBに切り替え
|
|
435
|
+
cd ~/work/projects/customer-b-api
|
|
436
|
+
|
|
437
|
+
# Michiハブに戻る
|
|
438
|
+
cd ~/work/projects/michi
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
## プロジェクト一覧確認
|
|
442
|
+
|
|
443
|
+
すべてのプロジェクトを一覧表示:
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
# Michiリポジトリから実行
|
|
447
|
+
cd /path/to/michi
|
|
448
|
+
npm run project:list
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
出力例:
|
|
452
|
+
```text
|
|
453
|
+
📋 プロジェクト一覧:
|
|
454
|
+
|
|
455
|
+
| プロジェクト | ID | ステータス | JIRA | チーム |
|
|
456
|
+
|------------|-------|----------|------|--------|
|
|
457
|
+
| Michi | michi | active | MICHI | @developer1 |
|
|
458
|
+
| A社 サービス1 | customer-a-service-1 | active | PRJA | @dev1, @dev2 |
|
|
459
|
+
| B社 API | customer-b-api | active | PRJB | @dev3 |
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
## トラブルシューティング
|
|
463
|
+
|
|
464
|
+
### cc-sddがインストールできない
|
|
465
|
+
|
|
466
|
+
キャッシュをクリア:
|
|
467
|
+
```bash
|
|
468
|
+
npm cache clean --force
|
|
469
|
+
npx cc-sdd@latest --cursor --lang ja --yes
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
### .kiro/project.json が見つからない
|
|
473
|
+
|
|
474
|
+
手動で作成してください(上記Step 3参照)
|
|
475
|
+
|
|
476
|
+
### Confluence/JIRA連携が動作しない
|
|
477
|
+
|
|
478
|
+
1. `.env` の認証情報を確認
|
|
479
|
+
2. `~/.cursor/mcp.json` の設定を確認
|
|
480
|
+
3. Atlassian API Token が有効か確認
|
|
481
|
+
|
|
482
|
+
## ベストプラクティス
|
|
483
|
+
|
|
484
|
+
### プロジェクト命名規則
|
|
485
|
+
|
|
486
|
+
**リポジトリ名**: `customer-{id}-{service}`
|
|
487
|
+
- 例: `customer-a-service-1`, `customer-b-api`, `customer-c-poc`
|
|
488
|
+
|
|
489
|
+
**プロジェクトID**: リポジトリ名と同じ
|
|
490
|
+
- 例: `customer-a-service-1`
|
|
491
|
+
|
|
492
|
+
**JIRA プロジェクトキー**: 3-4文字、一意
|
|
493
|
+
- 例: `PRJA`, `PRJB`, `PRJC`
|
|
494
|
+
|
|
495
|
+
**Confluenceラベル**: `project:{projectId}, service:{service}`
|
|
496
|
+
- 例: `["project:customer-a-service-1", "service:s1"]`
|
|
497
|
+
|
|
498
|
+
### チーム構成
|
|
499
|
+
|
|
500
|
+
プロジェクトごとにチームメンバーを明確化:
|
|
501
|
+
|
|
502
|
+
```json
|
|
503
|
+
{
|
|
504
|
+
"team": ["@tech-lead", "@frontend-dev", "@backend-dev"],
|
|
505
|
+
"stakeholders": ["@企画", "@部長", "@客先担当"]
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### ステータス管理
|
|
510
|
+
|
|
511
|
+
プロジェクトのライフサイクルに応じてステータスを更新:
|
|
512
|
+
|
|
513
|
+
- `planning`: 企画中
|
|
514
|
+
- `active`: 開発中
|
|
515
|
+
- `maintenance`: 保守フェーズ
|
|
516
|
+
- `completed`: 完了
|
|
517
|
+
- `inactive`: 休止中
|
|
518
|
+
|
|
519
|
+
## 複数プロジェクト同時開発のTips
|
|
520
|
+
|
|
521
|
+
### ターミナルを分ける
|
|
522
|
+
|
|
523
|
+
```bash
|
|
524
|
+
# ターミナル1: プロジェクトA
|
|
525
|
+
cd ~/work/projects/customer-a-service-1
|
|
526
|
+
|
|
527
|
+
# ターミナル2: プロジェクトB
|
|
528
|
+
cd ~/work/projects/customer-b-api
|
|
529
|
+
|
|
530
|
+
# ターミナル3: Michiハブ(横断操作用)
|
|
531
|
+
cd ~/work/projects/michi
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
### VS Code Workspaceを使う
|
|
535
|
+
|
|
536
|
+
`.code-workspace` ファイル作成:
|
|
537
|
+
|
|
538
|
+
```json
|
|
539
|
+
{
|
|
540
|
+
"folders": [
|
|
541
|
+
{ "path": "../michi" },
|
|
542
|
+
{ "path": "../customer-a-service-1" },
|
|
543
|
+
{ "path": "../customer-b-api" }
|
|
544
|
+
],
|
|
545
|
+
"settings": {
|
|
546
|
+
"files.associations": {
|
|
547
|
+
"*.mdc": "markdown"
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### プロジェクト横断確認
|
|
554
|
+
|
|
555
|
+
```bash
|
|
556
|
+
# Michiから全プロジェクトの状況を確認
|
|
557
|
+
cd /path/to/michi
|
|
558
|
+
npx @michi/cli project:list
|
|
559
|
+
npx @michi/cli project:dashboard
|
|
560
|
+
npm run multi-estimate
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
## 次のステップ
|
|
564
|
+
|
|
565
|
+
新規プロジェクトを作成したら:
|
|
566
|
+
|
|
567
|
+
1. `docs/setup.md` でセットアップ
|
|
568
|
+
2. `docs/workflow.md` で開発フロー確認
|
|
569
|
+
3. `/kiro:spec-init` で最初の機能を開始
|
|
570
|
+
|
|
571
|
+
## 参考ドキュメント
|
|
572
|
+
|
|
573
|
+
- [セットアップガイド](./setup.md)
|
|
574
|
+
- [ワークフローガイド](./workflow.md)
|
|
575
|
+
- [マルチプロジェクト管理](./multi-project.md)
|
|
576
|
+
|