@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.
- package/README.md +71 -848
- package/dist/scripts/constants/environments.d.ts +1 -1
- package/dist/scripts/constants/environments.d.ts.map +1 -1
- package/dist/scripts/constants/environments.js +0 -20
- package/dist/scripts/constants/environments.js.map +1 -1
- package/dist/scripts/phase-runner.js +1 -1
- package/dist/scripts/phase-runner.js.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.d.ts +18 -0
- package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.js +42 -0
- package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
- package/dist/scripts/utils/tasks-format-validator.js +3 -3
- package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
- package/dist/scripts/utils/template-finder.d.ts +2 -2
- package/dist/scripts/utils/template-finder.d.ts.map +1 -1
- package/dist/scripts/utils/template-finder.js +3 -8
- package/dist/scripts/utils/template-finder.js.map +1 -1
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +0 -8
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/init.d.ts +0 -4
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +6 -30
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/setup-existing.d.ts +2 -6
- package/dist/src/commands/setup-existing.d.ts.map +1 -1
- package/dist/src/commands/setup-existing.js +8 -142
- package/dist/src/commands/setup-existing.js.map +1 -1
- package/docs/README.md +20 -83
- package/docs/getting-started/configuration.md +350 -0
- package/docs/getting-started/installation.md +59 -0
- package/docs/getting-started/quick-start.md +76 -0
- package/docs/guides/atlassian-integration.md +116 -0
- package/docs/guides/claude-code.md +155 -0
- package/docs/guides/multi-repo.md +117 -0
- package/docs/guides/workflow.md +382 -0
- package/docs/reference/ai-commands.md +92 -0
- package/docs/reference/cli.md +752 -0
- package/docs/reference/environment-variables.md +192 -0
- package/docs/troubleshooting.md +498 -0
- package/package.json +1 -3
- package/scripts/__tests__/create-project.test.ts +12 -12
- package/scripts/__tests__/setup-existing-project.test.ts +22 -22
- package/scripts/constants/__tests__/environments.test.ts +7 -50
- package/scripts/constants/environments.ts +1 -27
- package/scripts/phase-runner.ts +1 -1
- package/scripts/template/__tests__/renderer.test.ts +21 -21
- package/scripts/utils/__tests__/multi-repo-validator.test.ts +159 -1
- package/scripts/utils/multi-repo-validator.ts +50 -0
- package/scripts/utils/tasks-format-validator.ts +3 -3
- package/scripts/utils/template-finder.ts +5 -11
- package/templates/claude/agents/e2e-first-planner/AGENT.md +1 -1
- package/templates/claude/agents/pr-resolver/AGENT.md +15 -3
- package/templates/claude/commands/michi/e2e-plan.md +1 -1
- package/templates/claude/commands/michi/spec-design.md +2 -2
- package/templates/claude/commands/michi/spec-tasks.md +156 -0
- package/templates/claude/commands/michi/test-planning.md +1 -1
- package/templates/claude/commands/michi/validate-design.md +3 -3
- package/templates/claude/commands/michi-multi-repo/impl-all.md +30 -1
- package/templates/claude/commands/michi-multi-repo/propagate-specs.md +14 -1
- package/templates/claude/commands/michi-multi-repo/spec-review.md +16 -2
- package/templates/claude-agent/agents/repo-spec-executor.md +1 -1
- package/templates/claude-agent/commands/michi/spec-tasks.md +117 -0
- package/templates/claude-agent/rules/code-size-monitor.md +26 -0
- package/templates/claude-agent/rules/code-size-rules.md +32 -0
- package/templates/michi/cc-sdd-overrides/settings/rules/design-review-michi.md +1 -1
- package/docs/context.md +0 -59
- package/docs/michi-development/contributing/development.md +0 -341
- package/docs/michi-development/contributing/release.md +0 -365
- package/docs/michi-development/design/config-unification.md +0 -733
- package/docs/michi-development/design/design-config-current-state.md +0 -330
- package/docs/michi-development/design/design-config-implementation.md +0 -628
- package/docs/michi-development/design/design-config-migration.md +0 -952
- package/docs/michi-development/design/design-config-security.md +0 -771
- package/docs/michi-development/design/design-config-solution.md +0 -583
- package/docs/michi-development/design/design-config-testing.md +0 -892
- package/docs/michi-development/testing/manual-verification-flow.md +0 -871
- package/docs/michi-development/testing/manual-verification-other-tools.md +0 -1279
- package/docs/michi-development/testing/manual-verification-troubleshooting.md +0 -122
- package/docs/michi-development/testing/pre-publish-checklist.md +0 -560
- package/docs/michi-development/testing-strategy.md +0 -87
- package/docs/plan.md +0 -275
- package/docs/user-guide/getting-started/github-token-setup.md +0 -510
- package/docs/user-guide/getting-started/new-repository-setup.md +0 -704
- package/docs/user-guide/getting-started/quick-start.md +0 -212
- package/docs/user-guide/getting-started/setup.md +0 -819
- package/docs/user-guide/guides/agent-skills-integration.md +0 -222
- package/docs/user-guide/guides/customization.md +0 -537
- package/docs/user-guide/guides/internationalization.md +0 -540
- package/docs/user-guide/guides/migration-guide.md +0 -138
- package/docs/user-guide/guides/multi-project.md +0 -368
- package/docs/user-guide/guides/multi-repo-guide.md +0 -1590
- package/docs/user-guide/guides/phase-automation.md +0 -419
- package/docs/user-guide/guides/workflow.md +0 -574
- package/docs/user-guide/hands-on/README.md +0 -142
- package/docs/user-guide/hands-on/claude-agent-setup.md +0 -597
- package/docs/user-guide/hands-on/claude-setup.md +0 -452
- package/docs/user-guide/hands-on/cursor-setup.md +0 -353
- package/docs/user-guide/hands-on/troubleshooting.md +0 -964
- package/docs/user-guide/hands-on/verification-checklist.md +0 -439
- package/docs/user-guide/hands-on/workflow-walkthrough.md +0 -1078
- package/docs/user-guide/reference/config.md +0 -589
- package/docs/user-guide/reference/multi-repo-api.md +0 -771
- package/docs/user-guide/reference/quick-reference.md +0 -297
- package/docs/user-guide/reference/security-test-payloads.md +0 -50
- package/docs/user-guide/reference/tasks-template.md +0 -550
- package/docs/user-guide/release/ci-setup-java.md +0 -114
- package/docs/user-guide/release/ci-setup-nodejs.md +0 -94
- package/docs/user-guide/release/ci-setup-php.md +0 -102
- package/docs/user-guide/release/ci-setup-troubleshooting.md +0 -94
- package/docs/user-guide/release/ci-setup.md +0 -188
- package/docs/user-guide/release/release-flow.md +0 -476
- package/docs/user-guide/templates/test-specs/README.md +0 -173
- package/docs/user-guide/templates/test-specs/e2e-test-spec-template.md +0 -553
- package/docs/user-guide/templates/test-specs/integration-test-spec-template.md +0 -435
- package/docs/user-guide/templates/test-specs/performance-test-spec-template.md +0 -454
- package/docs/user-guide/templates/test-specs/security-test-spec-template.md +0 -625
- package/docs/user-guide/templates/test-specs/unit-test-spec-template.md +0 -328
- package/docs/user-guide/testing/integration-tests.md +0 -312
- package/docs/user-guide/testing/tdd-cycle.md +0 -349
- package/docs/user-guide/testing/test-execution-flow.md +0 -396
- package/docs/user-guide/testing/test-failure-handling.md +0 -521
- package/docs/user-guide/testing/test-planning-flow.md +0 -185
- package/docs/user-guide/testing-strategy.md +0 -185
- package/docs/verification-guide.md +0 -518
- package/templates/cline/rules/atlassian-integration.md +0 -36
- package/templates/cline/rules/michi-core.md +0 -56
- package/templates/codex/AGENTS.override.md +0 -277
- package/templates/codex/prompts/confluence-sync.md +0 -177
- package/templates/codex/rules/README.md +0 -210
- package/templates/cursor/commands/kiro/kiro-spec-impl.md +0 -244
- package/templates/cursor/commands/kiro/kiro-spec-tasks.md +0 -354
- package/templates/cursor/commands/michi/confluence-sync.md +0 -76
- package/templates/cursor/commands/michi/project-switch.md +0 -69
- package/templates/cursor/rules/atlassian-mcp.mdc +0 -188
- package/templates/cursor/rules/github-ssot.mdc +0 -151
- package/templates/cursor/rules/multi-project.mdc +0 -81
- package/templates/gemini/commands/README.md +0 -41
- package/templates/gemini/rules/GEMINI.md +0 -80
|
@@ -28,6 +28,8 @@ export interface LocalPathValidationResult extends ValidationResult {
|
|
|
28
28
|
currentBranch: string | null;
|
|
29
29
|
branchMatches: boolean;
|
|
30
30
|
hasUncommittedChanges: boolean;
|
|
31
|
+
hasMichiSetup: boolean;
|
|
32
|
+
michiSetupCommand: string | null;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
/**
|
|
@@ -156,6 +158,32 @@ export function validateRepositoryUrl(url: string): ValidationResult {
|
|
|
156
158
|
};
|
|
157
159
|
}
|
|
158
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Michi導入状況をチェック
|
|
163
|
+
* .kiro/project.json の存在でMichi導入済みと判定
|
|
164
|
+
*
|
|
165
|
+
* @param localPath - 子リポジトリのlocalPath
|
|
166
|
+
* @returns Michi導入済みかどうか
|
|
167
|
+
*/
|
|
168
|
+
export function hasMichiSetup(localPath: string): boolean {
|
|
169
|
+
const projectJsonPath = path.join(localPath, '.kiro', 'project.json');
|
|
170
|
+
return fs.existsSync(projectJsonPath);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Michi導入コマンドを生成
|
|
175
|
+
* パスに空白やシングルクォートが含まれる場合に対応
|
|
176
|
+
*
|
|
177
|
+
* @param localPath - 子リポジトリのlocalPath
|
|
178
|
+
* @returns セットアップコマンド文字列
|
|
179
|
+
*/
|
|
180
|
+
export function getMichiSetupCommand(localPath: string): string {
|
|
181
|
+
// シングルクォートをエスケープ: ' → '\''
|
|
182
|
+
// eslint-disable-next-line quotes
|
|
183
|
+
const escapedPath = localPath.replace(/'/g, "'\\''");
|
|
184
|
+
return `cd '${escapedPath}' && npx @sk8metal/michi-cli@latest init`;
|
|
185
|
+
}
|
|
186
|
+
|
|
159
187
|
/**
|
|
160
188
|
* LocalPathのバリデーション
|
|
161
189
|
* ディレクトリ存在、Gitリポジトリ、ブランチ、未コミット変更をチェック
|
|
@@ -175,6 +203,8 @@ export function validateLocalPath(
|
|
|
175
203
|
let currentBranch: string | null = null;
|
|
176
204
|
let branchMatches = false;
|
|
177
205
|
let hasUncommittedChanges = false;
|
|
206
|
+
let hasMichiSetupResult = false;
|
|
207
|
+
let michiSetupCommand: string | null = null;
|
|
178
208
|
|
|
179
209
|
// 1. localPath設定確認
|
|
180
210
|
if (!repository.localPath) {
|
|
@@ -190,6 +220,8 @@ export function validateLocalPath(
|
|
|
190
220
|
currentBranch,
|
|
191
221
|
branchMatches,
|
|
192
222
|
hasUncommittedChanges,
|
|
223
|
+
hasMichiSetup: hasMichiSetupResult,
|
|
224
|
+
michiSetupCommand,
|
|
193
225
|
};
|
|
194
226
|
}
|
|
195
227
|
|
|
@@ -211,6 +243,8 @@ export function validateLocalPath(
|
|
|
211
243
|
currentBranch,
|
|
212
244
|
branchMatches,
|
|
213
245
|
hasUncommittedChanges,
|
|
246
|
+
hasMichiSetup: hasMichiSetupResult,
|
|
247
|
+
michiSetupCommand,
|
|
214
248
|
};
|
|
215
249
|
}
|
|
216
250
|
exists = true;
|
|
@@ -225,6 +259,8 @@ export function validateLocalPath(
|
|
|
225
259
|
currentBranch,
|
|
226
260
|
branchMatches,
|
|
227
261
|
hasUncommittedChanges,
|
|
262
|
+
hasMichiSetup: hasMichiSetupResult,
|
|
263
|
+
michiSetupCommand,
|
|
228
264
|
};
|
|
229
265
|
}
|
|
230
266
|
|
|
@@ -243,6 +279,8 @@ export function validateLocalPath(
|
|
|
243
279
|
currentBranch,
|
|
244
280
|
branchMatches,
|
|
245
281
|
hasUncommittedChanges,
|
|
282
|
+
hasMichiSetup: hasMichiSetupResult,
|
|
283
|
+
michiSetupCommand,
|
|
246
284
|
};
|
|
247
285
|
}
|
|
248
286
|
isGitRepository = true;
|
|
@@ -287,6 +325,16 @@ export function validateLocalPath(
|
|
|
287
325
|
);
|
|
288
326
|
}
|
|
289
327
|
|
|
328
|
+
// 6. Michi導入状況確認
|
|
329
|
+
hasMichiSetupResult = hasMichiSetup(localPath);
|
|
330
|
+
|
|
331
|
+
if (!hasMichiSetupResult) {
|
|
332
|
+
michiSetupCommand = getMichiSetupCommand(localPath);
|
|
333
|
+
warnings.push(
|
|
334
|
+
`Repository '${repository.name}' does not have Michi setup (.kiro/project.json not found)`,
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
290
338
|
return {
|
|
291
339
|
isValid: errors.length === 0,
|
|
292
340
|
errors,
|
|
@@ -296,5 +344,7 @@ export function validateLocalPath(
|
|
|
296
344
|
currentBranch,
|
|
297
345
|
branchMatches,
|
|
298
346
|
hasUncommittedChanges,
|
|
347
|
+
hasMichiSetup: hasMichiSetupResult,
|
|
348
|
+
michiSetupCommand,
|
|
299
349
|
};
|
|
300
350
|
}
|
|
@@ -35,7 +35,7 @@ export function validateTasksFormat(tasksPath: string): void {
|
|
|
35
35
|
throw new Error(
|
|
36
36
|
'tasks.md appears to be in AI-DLC format instead of Michi workflow format.\n' +
|
|
37
37
|
'Detected "- [ ] 1." pattern without Phase structure.\n' +
|
|
38
|
-
'Please regenerate tasks.md using /
|
|
38
|
+
'Please regenerate tasks.md using /michi:spec-tasks command with correct template.',
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -72,7 +72,7 @@ export function validateTasksFormat(tasksPath: string): void {
|
|
|
72
72
|
'tasks.md does not match either workflow structure.\n\n' +
|
|
73
73
|
`Missing required phases (new workflow):\n${missingNewPhases.map((p) => ` - ${p}`).join('\n')}\n\n` +
|
|
74
74
|
`Missing phases (legacy workflow):\n${missingLegacyPhases.map((p) => ` - ${p}`).join('\n')}\n\n` +
|
|
75
|
-
'Please regenerate tasks.md using /
|
|
75
|
+
'Please regenerate tasks.md using /michi:spec-tasks command with the latest template.',
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -100,7 +100,7 @@ export function validateTasksFormat(tasksPath: string): void {
|
|
|
100
100
|
throw new Error(
|
|
101
101
|
'tasks.md does not contain valid Story headers.\n' +
|
|
102
102
|
'Expected format: "### Story X.Y: Title"\n' +
|
|
103
|
-
'Please regenerate tasks.md using /
|
|
103
|
+
'Please regenerate tasks.md using /michi:spec-tasks command.',
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* テンプレートファイル検索ユーティリティ
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Issue #35: cc-sdd準拠のテンプレート検索
|
|
5
|
-
*
|
|
5
|
+
* Claude環境のテンプレートを検索
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { existsSync } from 'fs';
|
|
@@ -18,22 +18,16 @@ import { join } from 'path';
|
|
|
18
18
|
* @example
|
|
19
19
|
* ```typescript
|
|
20
20
|
* const path = findTemplateFile('/path/to/michi', 'rules/github-ssot.mdc');
|
|
21
|
-
* // returns: '/path/to/michi/templates/
|
|
21
|
+
* // returns: '/path/to/michi/templates/claude/rules/github-ssot.mdc'
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
export function findTemplateFile(michiPath: string, relativePath: string): string | null {
|
|
25
|
-
//
|
|
26
|
-
const cursorPath = join(michiPath, 'templates/cursor', relativePath);
|
|
27
|
-
if (existsSync(cursorPath)) {
|
|
28
|
-
return cursorPath;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// 優先順位2: templates/claude/
|
|
25
|
+
// templates/claude/
|
|
32
26
|
const claudePath = join(michiPath, 'templates/claude', relativePath);
|
|
33
27
|
if (existsSync(claudePath)) {
|
|
34
28
|
return claudePath;
|
|
35
29
|
}
|
|
36
|
-
|
|
30
|
+
|
|
37
31
|
return null;
|
|
38
32
|
}
|
|
39
33
|
|
|
@@ -3,7 +3,7 @@ name: e2e-first-planner
|
|
|
3
3
|
description: |
|
|
4
4
|
E2Eファースト開発計画を自動生成する実行エージェント。
|
|
5
5
|
Walking Skeleton、MVP計画、縦割りタスク分割を提案。
|
|
6
|
-
タスク分割フェーズ(/
|
|
6
|
+
タスク分割フェーズ(/michi:spec-tasks実行時)に PROACTIVELY 使用してください。
|
|
7
7
|
allowed-tools: Bash, Read, Grep, Glob
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -30,15 +30,27 @@ gh pr view <PR番号> --json number,title,state
|
|
|
30
30
|
|
|
31
31
|
GitHub GraphQL APIでreviewThreadsを取得(`isResolved: false`)
|
|
32
32
|
|
|
33
|
-
### 3.
|
|
33
|
+
### 3. CI/CDステータス確認
|
|
34
|
+
|
|
35
|
+
CI/CDステータスを確認し、失敗しているjobがあれば、原因調査
|
|
36
|
+
|
|
37
|
+
### 4. 未resolveスレッドについて対応するかどうか判断する
|
|
38
|
+
|
|
39
|
+
tasks.mdを参考に、今後のタスクとして対応予定のものなのか、それとも、今すぐに対応すべき課題なのかを判断する
|
|
40
|
+
|
|
41
|
+
### 5. CI/CDステータスが失敗だった時の対応
|
|
42
|
+
|
|
43
|
+
失敗しているjobについてログを確認し、事実ベースで解決策を検討
|
|
44
|
+
|
|
45
|
+
### 6. ユーザー確認
|
|
34
46
|
|
|
35
47
|
resolveするスレッドを提示し、確認を得る。
|
|
36
48
|
|
|
37
|
-
###
|
|
49
|
+
### 7. resolve実行
|
|
38
50
|
|
|
39
51
|
`resolveReviewThread` mutationを実行。
|
|
40
52
|
|
|
41
|
-
###
|
|
53
|
+
### 8. 結果報告
|
|
42
54
|
|
|
43
55
|
resolve済みスレッド数とステータスを報告。
|
|
44
56
|
|
|
@@ -66,10 +66,10 @@ Phase 0.3-0.4 完了後、以下のステップに進んでください:
|
|
|
66
66
|
|
|
67
67
|
**推奨フロー**:
|
|
68
68
|
1. `/michi:validate-design {feature}` で設計レビューを実施(任意)
|
|
69
|
-
2. `/
|
|
69
|
+
2. `/michi:spec-tasks {feature}` でタスク生成
|
|
70
70
|
|
|
71
71
|
**クイックフロー**:
|
|
72
|
-
- `/
|
|
72
|
+
- `/michi:spec-tasks {feature} -y` で自動承認してタスク生成
|
|
73
73
|
|
|
74
74
|
**重要**: テスト計画(Phase 0.3-0.4)を完了してからタスク生成することで、実装タスクにテスト実装が適切に含まれます。
|
|
75
75
|
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /michi:spec-tasks
|
|
3
|
+
description: Generate implementation tasks with JIRA sync option (Michi version)
|
|
4
|
+
allowed-tools: Read, Write, Edit, MultiEdit, Glob, Grep, Bash
|
|
5
|
+
argument-hint: <feature-name> [-y] [--sequential]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Michi: Spec Tasks with JIRA Sync Option
|
|
9
|
+
|
|
10
|
+
## Base Command Reference
|
|
11
|
+
@.claude/commands/kiro/spec-tasks.md
|
|
12
|
+
|
|
13
|
+
## Development Guidelines
|
|
14
|
+
{{DEV_GUIDELINES}}
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Michi Extension: JIRA Sync Prompt
|
|
19
|
+
|
|
20
|
+
このコマンドは cc-sdd 標準の `/kiro:spec-tasks` を拡張し、タスク生成完了後にJIRA同期オプションを提示します。
|
|
21
|
+
|
|
22
|
+
### 機能追加内容
|
|
23
|
+
|
|
24
|
+
1. **タスク生成完了後の次ステップ案内**:
|
|
25
|
+
- JIRA連携が設定されている場合: JIRA同期の選択肢(A/B/C形式)を表示
|
|
26
|
+
- JIRA連携が未設定の場合: 実装フェーズへの案内 + JIRA設定ヒントを表示
|
|
27
|
+
|
|
28
|
+
2. **環境変数による条件分岐**:
|
|
29
|
+
- 以下の環境変数がすべて設定されている場合のみ、JIRA同期の選択肢を表示
|
|
30
|
+
- `ATLASSIAN_URL`
|
|
31
|
+
- `ATLASSIAN_EMAIL`
|
|
32
|
+
- `ATLASSIAN_API_TOKEN`
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## タスク生成完了後のフロー
|
|
37
|
+
|
|
38
|
+
基底コマンド `/kiro:spec-tasks` によるタスク生成が完了した後、以下のフローを実行してください:
|
|
39
|
+
|
|
40
|
+
### Step 1: 環境変数チェック
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# JIRA連携の環境変数をチェック
|
|
44
|
+
if [ -n "$ATLASSIAN_URL" ] && [ -n "$ATLASSIAN_EMAIL" ] && [ -n "$ATLASSIAN_API_TOKEN" ]; then
|
|
45
|
+
JIRA_CONFIGURED=true
|
|
46
|
+
else
|
|
47
|
+
JIRA_CONFIGURED=false
|
|
48
|
+
fi
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Step 2a: JIRA連携が設定されている場合の表示
|
|
52
|
+
|
|
53
|
+
`JIRA_CONFIGURED=true` の場合、以下のメッセージと選択肢を表示:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
============================================
|
|
57
|
+
タスク生成完了 - JIRA同期オプション
|
|
58
|
+
============================================
|
|
59
|
+
|
|
60
|
+
次のアクション:
|
|
61
|
+
A) JIRAにタスクを同期する(推奨: タスク管理を一元化)
|
|
62
|
+
→ `michi jira:sync {{FEATURE_NAME}}` を実行
|
|
63
|
+
|
|
64
|
+
B) JIRAへの同期をスキップして実装に進む
|
|
65
|
+
→ `/michi:spec-impl {{FEATURE_NAME}}` を実行
|
|
66
|
+
|
|
67
|
+
C) 何もせずにこのまま終了する
|
|
68
|
+
|
|
69
|
+
選択 (A/B/C): _
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**選択肢の説明**:
|
|
73
|
+
- **A**: Epic/Story/Subtaskを自動作成し、タスクをJIRAに同期します
|
|
74
|
+
- **B**: JIRA同期をスキップして直接TDD実装フェーズに進みます
|
|
75
|
+
- **C**: タスク生成のみで終了し、ユーザーが手動で次のステップを選択します
|
|
76
|
+
|
|
77
|
+
### Step 2b: JIRA連携が未設定の場合の表示
|
|
78
|
+
|
|
79
|
+
`JIRA_CONFIGURED=false` の場合、以下のメッセージを表示:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
============================================
|
|
83
|
+
タスク生成完了
|
|
84
|
+
============================================
|
|
85
|
+
|
|
86
|
+
次のステップ:
|
|
87
|
+
→ `/michi:spec-impl {{FEATURE_NAME}}` で実装を開始
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
ℹ️ ヒント: JIRA連携を使用すると、タスクを自動的にJIRAに同期できます。
|
|
91
|
+
|
|
92
|
+
設定方法: 以下の環境変数を .env に追加してください:
|
|
93
|
+
- ATLASSIAN_URL=https://your-domain.atlassian.net
|
|
94
|
+
- ATLASSIAN_EMAIL=your-email@company.com
|
|
95
|
+
- ATLASSIAN_API_TOKEN=your-api-token
|
|
96
|
+
|
|
97
|
+
詳細はドキュメントを参照: docs/guides/atlassian-integration.md
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Michi Extension: Task Diff Size Guidelines
|
|
103
|
+
|
|
104
|
+
タスク分割時に、各サブタスクの git diff サイズを考慮してください。
|
|
105
|
+
|
|
106
|
+
### 推奨サイズ
|
|
107
|
+
- **目標**: 各サブタスクで 200-400 行の diff
|
|
108
|
+
- **最大**: 500 行まで(超過時は分割を検討)
|
|
109
|
+
- **警告**: 400行超過時は分割を推奨
|
|
110
|
+
|
|
111
|
+
### 除外対象ファイル(行数カウント対象外)
|
|
112
|
+
- **ロックファイル**: package-lock.json, yarn.lock, pnpm-lock.yaml, composer.lock, Gemfile.lock, poetry.lock, Pipfile.lock, Cargo.lock, go.sum
|
|
113
|
+
- **自動生成ファイル**: *.min.js, *.min.css, *.map, dist/*, build/*, coverage/*, .next/*, *.d.ts, *.generated.ts, __snapshots__/*
|
|
114
|
+
|
|
115
|
+
### 分割戦略
|
|
116
|
+
|
|
117
|
+
タスクが大きすぎる場合の分割方法:
|
|
118
|
+
|
|
119
|
+
1. **水平分割(レイヤー別)**
|
|
120
|
+
- model/repository → service/logic → controller/handler
|
|
121
|
+
- 例: 「User CRUD」→「User model作成」「User service作成」「User controller作成」
|
|
122
|
+
|
|
123
|
+
2. **垂直分割(機能スライス別)**
|
|
124
|
+
- core機能 → validation → error handling → edge cases
|
|
125
|
+
- 例: 「認証機能」→「ログインcore」「バリデーション追加」「エラーハンドリング」
|
|
126
|
+
|
|
127
|
+
3. **フェーズ分割(段階別)**
|
|
128
|
+
- 基本実装 → テスト追加 → 最適化
|
|
129
|
+
- 例: 「検索機能」→「基本検索」「フィルター追加」「パフォーマンス最適化」
|
|
130
|
+
|
|
131
|
+
### タスク生成時の確認事項
|
|
132
|
+
|
|
133
|
+
タスク分割完了後、以下を確認してください:
|
|
134
|
+
|
|
135
|
+
- [ ] 各サブタスクの予想diff行数が500行以内か
|
|
136
|
+
- [ ] 大きなサブタスクは適切に分割されているか
|
|
137
|
+
- [ ] ロックファイルや自動生成ファイルを含むタスクはその旨が明記されているか
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 実装上の注意点
|
|
142
|
+
|
|
143
|
+
1. **基底コマンドの実行結果を維持**:
|
|
144
|
+
- `/kiro:spec-tasks` の「Output Description」セクションで出力されるタスクサマリーは維持してください
|
|
145
|
+
- Michi Extensionの選択肢はその**後**に追加で表示します
|
|
146
|
+
|
|
147
|
+
2. **言語設定の考慮**:
|
|
148
|
+
- メッセージは日本語固定(将来的にspec.jsonの言語設定に対応する可能性あり)
|
|
149
|
+
|
|
150
|
+
3. **ユーザーインタラクション**:
|
|
151
|
+
- 選択肢を表示した後、ユーザーの入力を待ちます
|
|
152
|
+
- 選択に応じて適切なコマンド/処理を案内または実行してください
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
**Michi 固有機能**: このコマンドは cc-sdd 標準の `/kiro:spec-tasks` を拡張し、Phase 0.6(JIRA同期)への誘導を Next Phase として案内します。また、タスク粒度ガイドライン(git diff 500行制限)を提供し、適切なタスク分割を支援します。
|
|
@@ -153,7 +153,7 @@ This command will:
|
|
|
153
153
|
### Or: Proceed to Task Generation
|
|
154
154
|
|
|
155
155
|
```bash
|
|
156
|
-
/
|
|
156
|
+
/michi:spec-tasks {feature-name} [-y]
|
|
157
157
|
```
|
|
158
158
|
|
|
159
159
|
This will generate implementation tasks based on requirements, design, and test specifications.
|
|
@@ -42,15 +42,15 @@ Phase 0.3-0.4 が未完了の場合は、タスク生成前に完了すること
|
|
|
42
42
|
- 統合テスト: `docs/user-guide/templates/test-specs/integration-test-spec-template.md`
|
|
43
43
|
- 出力先: `.kiro/specs/$1/test-specs/`
|
|
44
44
|
|
|
45
|
-
3. **完了後**: `/
|
|
45
|
+
3. **完了後**: `/michi:spec-tasks $1` でタスク生成に進む
|
|
46
46
|
|
|
47
47
|
### Next Phase Guidance
|
|
48
48
|
|
|
49
49
|
**テスト計画完了済みの場合**:
|
|
50
|
-
- `/
|
|
50
|
+
- `/michi:spec-tasks $1` でタスク生成
|
|
51
51
|
|
|
52
52
|
**テスト計画未完了の場合**:
|
|
53
|
-
- Phase 0.3-0.4 を実施してから `/
|
|
53
|
+
- Phase 0.3-0.4 を実施してから `/michi:spec-tasks $1`
|
|
54
54
|
- または `/michi:spec-design $1` を再実行して Next Phase ガイダンスを確認
|
|
55
55
|
|
|
56
56
|
---
|
|
@@ -75,6 +75,24 @@ Multi-Repoプロジェクト **$1** の全リポジトリで `/michi:spec-impl`
|
|
|
75
75
|
4. 各リポジトリのタスクファイル確認
|
|
76
76
|
- `{localPath}/.kiro/specs/{feature}/tasks.md`
|
|
77
77
|
|
|
78
|
+
### Step 2.5: localPath 検証
|
|
79
|
+
|
|
80
|
+
各リポジトリについて以下を確認:
|
|
81
|
+
|
|
82
|
+
- ✅ localPathが設定されているか
|
|
83
|
+
- ✅ ディレクトリが存在するか
|
|
84
|
+
- ✅ Gitリポジトリか (`.git/`ディレクトリ確認)
|
|
85
|
+
- ✅ Michiがセットアップ済みか (`.kiro/project.json`確認)
|
|
86
|
+
- ⚠️ 設定されたブランチと現在のブランチが一致するか
|
|
87
|
+
- ⚠️ 未コミット変更がないか
|
|
88
|
+
|
|
89
|
+
**検証失敗時の対応**:
|
|
90
|
+
- localPath未設定: 警告を出力し、該当リポジトリをスキップ
|
|
91
|
+
- ディレクトリ不存在: エラーを出力し、該当リポジトリをスキップ
|
|
92
|
+
- Michi未セットアップ: 警告を出力し、該当リポジトリをスキップ
|
|
93
|
+
- ブランチ不一致: 警告を出力(続行可能)
|
|
94
|
+
- 未コミット変更: 警告を出力(続行可能)
|
|
95
|
+
|
|
78
96
|
### Step 3: チェックポイント確認
|
|
79
97
|
|
|
80
98
|
`docs/michi/$1/.checkpoint-impl.json` の存在を確認
|
|
@@ -248,7 +266,7 @@ repo-spec-executorサブエージェントを使用して、以下のリポジ
|
|
|
248
266
|
|
|
249
267
|
タスクを生成してください:
|
|
250
268
|
cd {localPath}
|
|
251
|
-
/
|
|
269
|
+
/michi:spec-tasks {feature}
|
|
252
270
|
```
|
|
253
271
|
|
|
254
272
|
- **localPath未設定**:
|
|
@@ -256,8 +274,19 @@ repo-spec-executorサブエージェントを使用して、以下のリポジ
|
|
|
256
274
|
警告: リポジトリ '{name}' の localPath が未設定です。スキップします。
|
|
257
275
|
```
|
|
258
276
|
|
|
277
|
+
- **Michi未セットアップ**:
|
|
278
|
+
```
|
|
279
|
+
⚠️ リポジトリ '{name}' にMichiがセットアップされていません。スキップします。
|
|
280
|
+
|
|
281
|
+
セットアップコマンド:
|
|
282
|
+
cd {localPath} && npx @sk8metal/michi-cli@latest init
|
|
283
|
+
|
|
284
|
+
セットアップ完了後、このコマンドを再実行してください。
|
|
285
|
+
```
|
|
286
|
+
|
|
259
287
|
### Fallback Strategy
|
|
260
288
|
- localPath未設定: 該当リポジトリをスキップし、他のリポジトリで処理続行
|
|
289
|
+
- Michi未セットアップ: 該当リポジトリをスキップし、他のリポジトリで処理続行
|
|
261
290
|
- サブエージェント失敗: チェックポイント保存し、リトライ可能にする
|
|
262
291
|
- テスト失敗: 自動修正を試行(最大3回)、失敗時はチェックポイント保存
|
|
263
292
|
|
|
@@ -57,12 +57,14 @@ Multi-Repoプロジェクト **$1** の全リポジトリに対して、仕様
|
|
|
57
57
|
- ✅ localPathが設定されているか
|
|
58
58
|
- ✅ ディレクトリが存在するか
|
|
59
59
|
- ✅ Gitリポジトリか (`.git/`ディレクトリ確認)
|
|
60
|
+
- ✅ Michiがセットアップ済みか (`.kiro/project.json`確認)
|
|
60
61
|
- ⚠️ 設定されたブランチと現在のブランチが一致するか
|
|
61
62
|
- ⚠️ 未コミット変更がないか
|
|
62
63
|
|
|
63
64
|
**検証失敗時の対応**:
|
|
64
65
|
- localPath未設定: 警告を出力し、該当リポジトリをスキップ
|
|
65
66
|
- ディレクトリ不存在: エラーを出力し、該当リポジトリをスキップ
|
|
67
|
+
- Michi未セットアップ: 警告を出力し、該当リポジトリをスキップ
|
|
66
68
|
- ブランチ不一致: 警告を出力(続行可能)
|
|
67
69
|
- 未コミット変更: 警告を出力(続行可能)
|
|
68
70
|
|
|
@@ -182,7 +184,7 @@ C) キャンセル
|
|
|
182
184
|
`/michi-multi-repo:spec-review $1`
|
|
183
185
|
|
|
184
186
|
2. 合格後、各リポジトリでタスク生成:
|
|
185
|
-
各リポジトリで `/
|
|
187
|
+
各リポジトリで `/michi:spec-tasks {feature}` を実行
|
|
186
188
|
|
|
187
189
|
3. 実装を開始:
|
|
188
190
|
`/michi-multi-repo:impl-all $1`
|
|
@@ -255,6 +257,16 @@ C) キャンセル
|
|
|
255
257
|
michi multi-repo:add-repo $1 --name {name} --localPath /path/to/repo
|
|
256
258
|
```
|
|
257
259
|
|
|
260
|
+
- **Michi未セットアップ**:
|
|
261
|
+
```
|
|
262
|
+
⚠️ リポジトリ '{name}' にMichiがセットアップされていません。スキップします。
|
|
263
|
+
|
|
264
|
+
セットアップコマンド:
|
|
265
|
+
cd {localPath} && npx @sk8metal/michi-cli@latest init
|
|
266
|
+
|
|
267
|
+
セットアップ完了後、このコマンドを再実行してください。
|
|
268
|
+
```
|
|
269
|
+
|
|
258
270
|
- **親プロジェクト仕様未作成(OPERATION=design以降)**:
|
|
259
271
|
```
|
|
260
272
|
エラー: 親プロジェクトの設計書が見つかりません: docs/michi/$1/overview/architecture.md
|
|
@@ -265,6 +277,7 @@ C) キャンセル
|
|
|
265
277
|
|
|
266
278
|
### Fallback Strategy
|
|
267
279
|
- localPath未設定: 該当リポジトリをスキップし、他のリポジトリで処理続行
|
|
280
|
+
- Michi未セットアップ: 該当リポジトリをスキップし、他のリポジトリで処理続行
|
|
268
281
|
- サブエージェント失敗: チェックポイント保存し、リトライ可能にする
|
|
269
282
|
- 全リポジトリ失敗: エラーレポート出力し、ユーザーに対処方法を案内
|
|
270
283
|
|
|
@@ -53,13 +53,16 @@ Multi-Repoプロジェクト **$1** の全リポジトリを対象に、クロ
|
|
|
53
53
|
### Step 2: localPath 検証
|
|
54
54
|
|
|
55
55
|
各リポジトリについて以下を確認:
|
|
56
|
+
- localPathが設定されているか
|
|
56
57
|
- ディレクトリが存在するか
|
|
57
|
-
- Gitリポジトリか
|
|
58
|
+
- Gitリポジトリか (`.git/`ディレクトリ確認)
|
|
59
|
+
- Michiがセットアップ済みか (`.kiro/project.json`確認)
|
|
58
60
|
- 仕様ファイルが存在するか
|
|
59
61
|
|
|
60
62
|
**検証失敗時の対応**:
|
|
61
63
|
- localPath未設定: 警告を出力し、スキップ
|
|
62
64
|
- ディレクトリ不存在: エラーを出力し、スキップ
|
|
65
|
+
- Michi未セットアップ: 警告を出力し、スキップ
|
|
63
66
|
- 仕様ファイル不存在: 警告を出力し、利用可能情報でレビュー続行
|
|
64
67
|
|
|
65
68
|
### Step 3: サブエージェント起動
|
|
@@ -141,7 +144,7 @@ cross-repo-reviewerサブエージェントを使用して、以下のプロジ
|
|
|
141
144
|
### 次のステップ
|
|
142
145
|
|
|
143
146
|
1. 各リポジトリでタスク生成:
|
|
144
|
-
各リポジトリで `/
|
|
147
|
+
各リポジトリで `/michi:spec-tasks {feature}` を実行
|
|
145
148
|
|
|
146
149
|
2. 全リポジトリで実装を開始:
|
|
147
150
|
`/michi-multi-repo:impl-all $1`
|
|
@@ -231,6 +234,16 @@ BLOCK問題が検出されました。修正が必須です。
|
|
|
231
234
|
警告: リポジトリ '{name}' の localPath が未設定です。スキップします。
|
|
232
235
|
```
|
|
233
236
|
|
|
237
|
+
- **Michi未セットアップ**:
|
|
238
|
+
```
|
|
239
|
+
⚠️ リポジトリ '{name}' にMichiがセットアップされていません。スキップします。
|
|
240
|
+
|
|
241
|
+
セットアップコマンド:
|
|
242
|
+
cd {localPath} && npx @sk8metal/michi-cli@latest init
|
|
243
|
+
|
|
244
|
+
セットアップ完了後、このコマンドを再実行してください。
|
|
245
|
+
```
|
|
246
|
+
|
|
234
247
|
- **仕様ファイル不存在**:
|
|
235
248
|
```
|
|
236
249
|
警告: リポジトリ '{name}' に仕様ファイルがありません。
|
|
@@ -241,6 +254,7 @@ BLOCK問題が検出されました。修正が必須です。
|
|
|
241
254
|
|
|
242
255
|
### Fallback Strategy
|
|
243
256
|
- localPath未設定: 該当リポジトリをスキップし、他のリポジトリでレビュー続行
|
|
257
|
+
- Michi未セットアップ: 該当リポジトリをスキップし、他のリポジトリでレビュー続行
|
|
244
258
|
- 仕様ファイル不存在: 警告を出力し、利用可能な情報でレビュー
|
|
245
259
|
- 通信エラー: リトライ後、該当リポジトリをスキップ
|
|
246
260
|
|