@sk8metal/michi-cli 0.3.0 → 0.5.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/CHANGELOG.md +83 -0
- package/dist/scripts/__tests__/spec-impl-workflow.test.js +4 -2
- package/dist/scripts/__tests__/spec-impl-workflow.test.js.map +1 -1
- package/dist/scripts/config/config-schema.d.ts +52 -0
- package/dist/scripts/config/config-schema.d.ts.map +1 -1
- package/dist/scripts/config/config-schema.js +25 -0
- package/dist/scripts/config/config-schema.js.map +1 -1
- package/dist/scripts/config-global.d.ts +10 -0
- package/dist/scripts/config-global.d.ts.map +1 -0
- package/dist/scripts/config-global.js +111 -0
- package/dist/scripts/config-global.js.map +1 -0
- package/dist/scripts/confluence-sync.d.ts +22 -4
- package/dist/scripts/confluence-sync.d.ts.map +1 -1
- package/dist/scripts/confluence-sync.js +22 -12
- package/dist/scripts/confluence-sync.js.map +1 -1
- package/dist/scripts/jira-sync.d.ts.map +1 -1
- package/dist/scripts/jira-sync.js +201 -167
- package/dist/scripts/jira-sync.js.map +1 -1
- package/dist/scripts/list-projects.js.map +1 -1
- package/dist/scripts/multi-project-estimate.js.map +1 -1
- package/dist/scripts/phase-runner.d.ts +1 -1
- package/dist/scripts/phase-runner.d.ts.map +1 -1
- package/dist/scripts/phase-runner.js +295 -522
- package/dist/scripts/phase-runner.js.map +1 -1
- package/dist/scripts/pr-automation.d.ts.map +1 -1
- package/dist/scripts/pr-automation.js +11 -3
- package/dist/scripts/pr-automation.js.map +1 -1
- package/dist/scripts/pre-flight-check.d.ts.map +1 -1
- package/dist/scripts/pre-flight-check.js +10 -6
- package/dist/scripts/pre-flight-check.js.map +1 -1
- package/dist/scripts/resource-dashboard.js.map +1 -1
- package/dist/scripts/spec-impl-workflow.d.ts.map +1 -1
- package/dist/scripts/spec-impl-workflow.js +23 -7
- package/dist/scripts/spec-impl-workflow.js.map +1 -1
- package/dist/scripts/template/renderer.d.ts +1 -1
- package/dist/scripts/template/renderer.d.ts.map +1 -1
- package/dist/scripts/test-interactive.d.ts.map +1 -1
- package/dist/scripts/test-interactive.js +0 -15
- package/dist/scripts/test-interactive.js.map +1 -1
- package/dist/scripts/test-new-features.js +6 -3
- package/dist/scripts/test-new-features.js.map +1 -1
- package/dist/scripts/test-spec-generator.d.ts.map +1 -1
- package/dist/scripts/test-spec-generator.js +1 -2
- package/dist/scripts/test-spec-generator.js.map +1 -1
- package/dist/scripts/utils/__tests__/config-loader.test.js +114 -1
- package/dist/scripts/utils/__tests__/config-loader.test.js.map +1 -1
- package/dist/scripts/utils/__tests__/config-validator.test.js +2 -0
- package/dist/scripts/utils/__tests__/config-validator.test.js.map +1 -1
- package/dist/scripts/utils/__tests__/env-config.test.js +0 -2
- package/dist/scripts/utils/__tests__/env-config.test.js.map +1 -1
- package/dist/scripts/utils/__tests__/project-meta.test.d.ts +6 -0
- package/dist/scripts/utils/__tests__/project-meta.test.d.ts.map +1 -0
- package/dist/scripts/utils/__tests__/project-meta.test.js +154 -0
- package/dist/scripts/utils/__tests__/project-meta.test.js.map +1 -0
- package/dist/scripts/utils/__tests__/security-validator.test.d.ts +6 -0
- package/dist/scripts/utils/__tests__/security-validator.test.d.ts.map +1 -0
- package/dist/scripts/utils/__tests__/security-validator.test.js +219 -0
- package/dist/scripts/utils/__tests__/security-validator.test.js.map +1 -0
- package/dist/scripts/utils/config-loader.d.ts +14 -3
- package/dist/scripts/utils/config-loader.d.ts.map +1 -1
- package/dist/scripts/utils/config-loader.js +284 -46
- package/dist/scripts/utils/config-loader.js.map +1 -1
- package/dist/scripts/utils/config-sections.d.ts +54 -0
- package/dist/scripts/utils/config-sections.d.ts.map +1 -0
- package/dist/scripts/utils/config-sections.js +178 -0
- package/dist/scripts/utils/config-sections.js.map +1 -0
- package/dist/scripts/utils/config-validator.d.ts +4 -0
- package/dist/scripts/utils/config-validator.d.ts.map +1 -1
- package/dist/scripts/utils/config-validator.js +57 -1
- package/dist/scripts/utils/config-validator.js.map +1 -1
- package/dist/scripts/utils/confluence-approval.d.ts.map +1 -1
- package/dist/scripts/utils/confluence-approval.js +5 -3
- package/dist/scripts/utils/confluence-approval.js.map +1 -1
- package/dist/scripts/utils/confluence-hierarchy.d.ts.map +1 -1
- package/dist/scripts/utils/confluence-hierarchy.js.map +1 -1
- package/dist/scripts/utils/env-config.d.ts +1 -1
- package/dist/scripts/utils/env-config.d.ts.map +1 -1
- package/dist/scripts/utils/env-config.js +2 -14
- package/dist/scripts/utils/env-config.js.map +1 -1
- package/dist/scripts/utils/interactive-helpers.d.ts +32 -0
- package/dist/scripts/utils/interactive-helpers.d.ts.map +1 -0
- package/dist/scripts/utils/interactive-helpers.js +92 -0
- package/dist/scripts/utils/interactive-helpers.js.map +1 -0
- package/dist/scripts/utils/jira-issue-type-fetcher.d.ts.map +1 -1
- package/dist/scripts/utils/jira-issue-type-fetcher.js +27 -18
- package/dist/scripts/utils/jira-issue-type-fetcher.js.map +1 -1
- package/dist/scripts/utils/project-meta.d.ts +9 -0
- package/dist/scripts/utils/project-meta.d.ts.map +1 -1
- package/dist/scripts/utils/project-meta.js +22 -0
- package/dist/scripts/utils/project-meta.js.map +1 -1
- package/dist/scripts/utils/release-notes-generator.d.ts.map +1 -1
- package/dist/scripts/utils/release-notes-generator.js +2 -1
- package/dist/scripts/utils/release-notes-generator.js.map +1 -1
- package/dist/scripts/utils/security-validator.d.ts +55 -0
- package/dist/scripts/utils/security-validator.d.ts.map +1 -0
- package/dist/scripts/utils/security-validator.js +232 -0
- package/dist/scripts/utils/security-validator.js.map +1 -0
- package/dist/scripts/utils/spec-updater.d.ts +19 -0
- package/dist/scripts/utils/spec-updater.d.ts.map +1 -1
- package/dist/scripts/utils/spec-updater.js.map +1 -1
- package/dist/scripts/utils/tasks-converter.d.ts.map +1 -1
- package/dist/scripts/utils/tasks-converter.js +2 -2
- package/dist/scripts/utils/tasks-converter.js.map +1 -1
- package/dist/scripts/utils/tasks-format-validator.d.ts.map +1 -1
- package/dist/scripts/utils/tasks-format-validator.js +0 -12
- package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
- package/dist/scripts/utils/test-runner.d.ts.map +1 -1
- package/dist/scripts/utils/test-runner.js +3 -2
- package/dist/scripts/utils/test-runner.js.map +1 -1
- package/dist/scripts/validate-phase.d.ts +1 -1
- package/dist/scripts/validate-phase.d.ts.map +1 -1
- package/dist/scripts/validate-phase.js +12 -62
- package/dist/scripts/validate-phase.js.map +1 -1
- package/dist/scripts/workflow-orchestrator.d.ts.map +1 -1
- package/dist/scripts/workflow-orchestrator.js +11 -16
- package/dist/scripts/workflow-orchestrator.js.map +1 -1
- package/dist/src/__tests__/integration/setup/init.test.d.ts +5 -0
- package/dist/src/__tests__/integration/setup/init.test.d.ts.map +1 -0
- package/dist/src/__tests__/integration/setup/init.test.js +352 -0
- package/dist/src/__tests__/integration/setup/init.test.js.map +1 -0
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +67 -21
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/__tests__/init.test.d.ts +5 -0
- package/dist/src/commands/__tests__/init.test.d.ts.map +1 -0
- package/dist/src/commands/__tests__/init.test.js +255 -0
- package/dist/src/commands/__tests__/init.test.js.map +1 -0
- package/dist/src/commands/__tests__/migrate.test.d.ts +5 -0
- package/dist/src/commands/__tests__/migrate.test.d.ts.map +1 -0
- package/dist/src/commands/__tests__/migrate.test.js +216 -0
- package/dist/src/commands/__tests__/migrate.test.js.map +1 -0
- package/dist/src/commands/config-validate.d.ts +9 -0
- package/dist/src/commands/config-validate.d.ts.map +1 -0
- package/dist/src/commands/config-validate.js +90 -0
- package/dist/src/commands/config-validate.js.map +1 -0
- package/dist/src/commands/init.d.ts +29 -0
- package/dist/src/commands/init.d.ts.map +1 -0
- package/dist/src/commands/init.js +513 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/migrate.d.ts +25 -0
- package/dist/src/commands/migrate.d.ts.map +1 -0
- package/dist/src/commands/migrate.js +341 -0
- package/dist/src/commands/migrate.js.map +1 -0
- package/dist/src/commands/setup-existing.d.ts.map +1 -1
- package/dist/src/commands/setup-existing.js +0 -1
- package/dist/src/commands/setup-existing.js.map +1 -1
- package/dist/vitest.config.d.ts.map +1 -1
- package/dist/vitest.config.js +32 -8
- package/dist/vitest.config.js.map +1 -1
- package/docs/michi-development/design/config-unification.md +4789 -0
- package/docs/user-guide/getting-started/github-token-setup.md +2 -1
- package/docs/user-guide/getting-started/new-repository-setup.md +1 -1
- package/docs/user-guide/getting-started/quick-start.md +1 -1
- package/docs/user-guide/getting-started/setup.md +35 -14
- package/docs/user-guide/guides/customization.md +64 -11
- package/docs/user-guide/guides/workflow.md +35 -21
- package/docs/user-guide/hands-on/claude-agent-setup.md +2 -2
- package/docs/user-guide/hands-on/claude-setup.md +2 -2
- package/docs/user-guide/hands-on/cursor-setup.md +2 -2
- package/docs/user-guide/hands-on/workflow-walkthrough.md +4 -1
- package/docs/user-guide/reference/config.md +30 -5
- package/docs/user-guide/reference/quick-reference.md +68 -74
- package/docs/user-guide/testing/test-planning-flow.md +4 -0
- package/env.example +1 -1
- package/package.json +3 -5
- package/scripts/__tests__/spec-impl-workflow.test.ts +5 -2
- package/scripts/config/config-schema.ts +40 -0
- package/scripts/config-global.ts +160 -0
- package/scripts/confluence-sync.ts +91 -27
- package/scripts/jira-sync.ts +284 -218
- package/scripts/list-projects.ts +2 -2
- package/scripts/multi-project-estimate.ts +3 -3
- package/scripts/phase-runner.ts +391 -594
- package/scripts/pr-automation.ts +15 -5
- package/scripts/pre-flight-check.ts +20 -9
- package/scripts/pre-publish-check.sh +3 -34
- package/scripts/resource-dashboard.ts +4 -4
- package/scripts/spec-impl-workflow.ts +23 -7
- package/scripts/template/renderer.ts +1 -1
- package/scripts/test-interactive.ts +0 -19
- package/scripts/test-new-features.ts +10 -7
- package/scripts/test-npm-package.sh +3 -34
- package/scripts/test-spec-generator.ts +3 -7
- package/scripts/utils/__tests__/config-loader.test.ts +149 -0
- package/scripts/utils/__tests__/config-validator.test.ts +2 -0
- package/scripts/utils/__tests__/env-config.test.ts +0 -2
- package/scripts/utils/__tests__/project-meta.test.ts +192 -0
- package/scripts/utils/__tests__/security-validator.test.ts +272 -0
- package/scripts/utils/config-loader.ts +328 -68
- package/scripts/utils/config-sections.ts +316 -0
- package/scripts/utils/config-validator.ts +66 -1
- package/scripts/utils/confluence-approval.ts +8 -6
- package/scripts/utils/confluence-hierarchy.ts +27 -27
- package/scripts/utils/env-config.ts +2 -14
- package/scripts/utils/interactive-helpers.ts +135 -0
- package/scripts/utils/jira-issue-type-fetcher.ts +29 -21
- package/scripts/utils/project-meta.ts +27 -0
- package/scripts/utils/release-notes-generator.ts +3 -2
- package/scripts/utils/security-validator.ts +286 -0
- package/scripts/utils/spec-updater.ts +37 -15
- package/scripts/utils/tasks-converter.ts +4 -6
- package/scripts/utils/tasks-format-validator.ts +0 -13
- package/scripts/utils/test-runner.ts +4 -3
- package/scripts/validate-phase.ts +21 -80
- package/scripts/workflow-orchestrator.ts +16 -25
- package/templates/claude/commands/kiro/kiro-spec-impl.md +5 -1
- package/templates/claude/commands/kiro/kiro-spec-tasks.md +3 -1
- package/templates/claude/commands/michi/confluence-sync.md +8 -2
- package/templates/claude/commands/michi/design-review.md +4 -0
- package/templates/claude/commands/michi/e2e-plan.md +4 -0
- package/templates/claude/commands/michi/license-check.md +4 -0
- package/templates/claude/commands/michi/pr-resolve.md +4 -0
- package/templates/claude/commands/michi/project-switch.md +8 -2
- package/templates/claude/commands/michi/spec-design.md +78 -0
- package/templates/claude/commands/michi/spec-impl.md +716 -0
- package/templates/claude/commands/michi/test-planning.md +174 -0
- package/templates/claude/commands/michi/validate-design.md +58 -0
- package/templates/claude/commands/michi/version-audit.md +4 -0
- package/templates/claude-agent/commands/kiro/kiro-spec-impl.md +1 -1
- package/templates/cursor/commands/kiro/kiro-spec-impl.md +1 -1
- package/templates/michi/cc-sdd-overrides/README.md +8 -0
- package/templates/michi/cc-sdd-overrides/settings/rules/design-review-michi.md +53 -0
- package/dist/scripts/config-interactive.d.ts +0 -10
- package/dist/scripts/config-interactive.d.ts.map +0 -1
- package/dist/scripts/config-interactive.js +0 -372
- package/dist/scripts/config-interactive.js.map +0 -1
- package/dist/scripts/setup-existing-project.d.ts +0 -15
- package/dist/scripts/setup-existing-project.d.ts.map +0 -1
- package/dist/scripts/setup-existing-project.js +0 -455
- package/dist/scripts/setup-existing-project.js.map +0 -1
- package/dist/scripts/setup-interactive.d.ts +0 -10
- package/dist/scripts/setup-interactive.d.ts.map +0 -1
- package/dist/scripts/setup-interactive.js +0 -413
- package/dist/scripts/setup-interactive.js.map +0 -1
- package/scripts/config-interactive.ts +0 -550
- package/scripts/setup-existing-project.ts +0 -585
- package/scripts/setup-interactive.ts +0 -565
|
@@ -53,15 +53,16 @@ export async function executeTests(
|
|
|
53
53
|
duration,
|
|
54
54
|
timestamp
|
|
55
55
|
};
|
|
56
|
-
} catch (error:
|
|
56
|
+
} catch (error: unknown) {
|
|
57
57
|
const duration = (Date.now() - startTime) / 1000;
|
|
58
|
+
const errorObj = error as { stdout?: string; message?: string };
|
|
58
59
|
|
|
59
60
|
return {
|
|
60
61
|
success: false,
|
|
61
62
|
language,
|
|
62
63
|
command,
|
|
63
|
-
output:
|
|
64
|
-
error:
|
|
64
|
+
output: errorObj.stdout || '',
|
|
65
|
+
error: errorObj.message || String(error),
|
|
65
66
|
duration,
|
|
66
67
|
timestamp
|
|
67
68
|
};
|
|
@@ -7,12 +7,11 @@ import { existsSync, readFileSync } from 'fs';
|
|
|
7
7
|
import { join } from 'path';
|
|
8
8
|
import { validateFeatureName } from './utils/feature-name-validator.js';
|
|
9
9
|
import { loadConfig } from './utils/config-loader.js';
|
|
10
|
+
import { type SpecJson } from './utils/spec-updater.js';
|
|
10
11
|
|
|
11
12
|
type Phase =
|
|
12
13
|
| 'requirements'
|
|
13
14
|
| 'design'
|
|
14
|
-
| 'test-type-selection'
|
|
15
|
-
| 'test-spec'
|
|
16
15
|
| 'tasks'
|
|
17
16
|
| 'environment-setup'
|
|
18
17
|
| 'phase-a'
|
|
@@ -28,7 +27,7 @@ interface ValidationResult {
|
|
|
28
27
|
/**
|
|
29
28
|
* spec.jsonを読み込み
|
|
30
29
|
*/
|
|
31
|
-
function loadSpecJson(feature: string):
|
|
30
|
+
function loadSpecJson(feature: string): SpecJson {
|
|
32
31
|
const specPath = join(process.cwd(), '.kiro', 'specs', feature, 'spec.json');
|
|
33
32
|
|
|
34
33
|
if (!existsSync(specPath)) {
|
|
@@ -58,11 +57,12 @@ function validateRequirements(feature: string): ValidationResult {
|
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
// 2. spec.json読み込み
|
|
61
|
-
let spec:
|
|
60
|
+
let spec: SpecJson;
|
|
62
61
|
try {
|
|
63
62
|
spec = loadSpecJson(feature);
|
|
64
|
-
} catch (error:
|
|
65
|
-
|
|
63
|
+
} catch (error: unknown) {
|
|
64
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
65
|
+
errors.push(`❌ spec.json読み込みエラー: ${message}`);
|
|
66
66
|
return { phase: 'requirements', valid: false, errors, warnings };
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -110,11 +110,12 @@ function validateDesign(feature: string): ValidationResult {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
// 2. spec.json読み込み
|
|
113
|
-
let spec:
|
|
113
|
+
let spec: SpecJson;
|
|
114
114
|
try {
|
|
115
115
|
spec = loadSpecJson(feature);
|
|
116
|
-
} catch (error:
|
|
117
|
-
|
|
116
|
+
} catch (error: unknown) {
|
|
117
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
118
|
+
errors.push(`❌ spec.json読み込みエラー: ${message}`);
|
|
118
119
|
return { phase: 'design', valid: false, errors, warnings };
|
|
119
120
|
}
|
|
120
121
|
|
|
@@ -191,11 +192,12 @@ function validateTasks(feature: string): ValidationResult {
|
|
|
191
192
|
}
|
|
192
193
|
|
|
193
194
|
// 2. spec.json読み込み
|
|
194
|
-
let spec:
|
|
195
|
+
let spec: SpecJson;
|
|
195
196
|
try {
|
|
196
197
|
spec = loadSpecJson(feature);
|
|
197
|
-
} catch (error:
|
|
198
|
-
|
|
198
|
+
} catch (error: unknown) {
|
|
199
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
200
|
+
errors.push(`❌ spec.json読み込みエラー: ${message}`);
|
|
199
201
|
return { phase: 'tasks', valid: false, errors, warnings };
|
|
200
202
|
}
|
|
201
203
|
|
|
@@ -214,7 +216,7 @@ function validateTasks(feature: string): ValidationResult {
|
|
|
214
216
|
// spec.jira.storyKeys 配列をチェック(新フォーマット)
|
|
215
217
|
// または spec.jira.stories.created(旧フォーマット)をチェック
|
|
216
218
|
const hasStories = spec.jira?.storyKeys && Array.isArray(spec.jira.storyKeys) && spec.jira.storyKeys.length > 0;
|
|
217
|
-
const hasLegacyStories = spec.jira?.stories && spec.jira.stories.created > 0;
|
|
219
|
+
const hasLegacyStories = spec.jira?.stories && spec.jira.stories.created !== undefined && spec.jira.stories.created > 0;
|
|
218
220
|
|
|
219
221
|
if (!hasStories && !hasLegacyStories) {
|
|
220
222
|
errors.push('❌ JIRA Storyが1つも作成されていません');
|
|
@@ -222,7 +224,7 @@ function validateTasks(feature: string): ValidationResult {
|
|
|
222
224
|
} else if (spec.jira?.storyKeys && spec.jira.storyKeys.length > 0) {
|
|
223
225
|
// 新フォーマット: storyKeys配列が存在する場合
|
|
224
226
|
// 成功として扱う(警告なし)
|
|
225
|
-
} else if (spec.jira?.stories && spec.jira.stories.created < spec.jira.stories.total) {
|
|
227
|
+
} else if (spec.jira?.stories && spec.jira.stories.created !== undefined && spec.jira.stories.total !== undefined && spec.jira.stories.created < spec.jira.stories.total) {
|
|
226
228
|
// 旧フォーマット: 一部未作成の場合のみ警告
|
|
227
229
|
warnings.push(`⚠️ JIRA Storyが一部未作成: ${spec.jira.stories.created}/${spec.jira.stories.total}`);
|
|
228
230
|
}
|
|
@@ -240,59 +242,6 @@ function validateTasks(feature: string): ValidationResult {
|
|
|
240
242
|
};
|
|
241
243
|
}
|
|
242
244
|
|
|
243
|
-
/**
|
|
244
|
-
* テストタイプ選択フェーズのバリデーション(Phase 0.3)
|
|
245
|
-
* マニュアル対応フェーズ - バリデーション不要(常に成功)
|
|
246
|
-
*/
|
|
247
|
-
function validateTestTypeSelection(feature: string): ValidationResult {
|
|
248
|
-
const errors: string[] = [];
|
|
249
|
-
const warnings: string[] = [];
|
|
250
|
-
|
|
251
|
-
// feature名のバリデーション
|
|
252
|
-
const nameValidation = validateFeatureName(feature);
|
|
253
|
-
if (!nameValidation.valid) {
|
|
254
|
-
errors.push(...nameValidation.errors);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
warnings.push('⚠️ このフェーズはマニュアル対応です。ガイダンスに従ってテストタイプを選択してください');
|
|
258
|
-
|
|
259
|
-
return {
|
|
260
|
-
phase: 'test-type-selection',
|
|
261
|
-
valid: errors.length === 0,
|
|
262
|
-
errors,
|
|
263
|
-
warnings
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* テスト仕様書作成フェーズのバリデーション(Phase 0.4)
|
|
269
|
-
* マニュアル対応フェーズ - バリデーション不要(常に成功)
|
|
270
|
-
*/
|
|
271
|
-
function validateTestSpec(feature: string): ValidationResult {
|
|
272
|
-
const errors: string[] = [];
|
|
273
|
-
const warnings: string[] = [];
|
|
274
|
-
|
|
275
|
-
// feature名のバリデーション
|
|
276
|
-
const nameValidation = validateFeatureName(feature);
|
|
277
|
-
if (!nameValidation.valid) {
|
|
278
|
-
errors.push(...nameValidation.errors);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
// テスト仕様書ディレクトリの存在チェック(任意)
|
|
282
|
-
const testSpecDir = join(process.cwd(), 'docs', 'testing', 'specs', feature);
|
|
283
|
-
if (!existsSync(testSpecDir)) {
|
|
284
|
-
warnings.push('⚠️ テスト仕様書ディレクトリがありません: docs/testing/specs/' + feature);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
warnings.push('⚠️ このフェーズはマニュアル対応です。テンプレートを使用してテスト仕様書を作成してください');
|
|
288
|
-
|
|
289
|
-
return {
|
|
290
|
-
phase: 'test-spec',
|
|
291
|
-
valid: errors.length === 0,
|
|
292
|
-
errors,
|
|
293
|
-
warnings
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
245
|
|
|
297
246
|
/**
|
|
298
247
|
* 環境構築フェーズのバリデーション(Phase 1)
|
|
@@ -381,12 +330,6 @@ export function validatePhase(feature: string, phase: Phase): ValidationResult {
|
|
|
381
330
|
case 'design':
|
|
382
331
|
result = validateDesign(feature);
|
|
383
332
|
break;
|
|
384
|
-
case 'test-type-selection':
|
|
385
|
-
result = validateTestTypeSelection(feature);
|
|
386
|
-
break;
|
|
387
|
-
case 'test-spec':
|
|
388
|
-
result = validateTestSpec(feature);
|
|
389
|
-
break;
|
|
390
333
|
case 'tasks':
|
|
391
334
|
result = validateTasks(feature);
|
|
392
335
|
break;
|
|
@@ -435,12 +378,11 @@ if (import.meta.url === `file://${process.argv[1]}`) {
|
|
|
435
378
|
console.error('\nAvailable Phases:');
|
|
436
379
|
console.error(' requirements - Phase 0.1: 要件定義');
|
|
437
380
|
console.error(' design - Phase 0.2: 設計');
|
|
438
|
-
console.error(' test-type-selection- Phase 0.3: テストタイプ選択(任意)');
|
|
439
|
-
console.error(' test-spec - Phase 0.4: テスト仕様書作成(任意)');
|
|
440
381
|
console.error(' tasks - Phase 0.5-0.6: タスク分割・JIRA同期');
|
|
441
382
|
console.error(' environment-setup - Phase 1: 環境構築(任意)');
|
|
442
383
|
console.error(' phase-a - Phase A: PR前自動テスト(任意)');
|
|
443
384
|
console.error(' phase-b - Phase B: リリース準備テスト(任意)');
|
|
385
|
+
console.error('\nNote: For test planning (Phase 0.3-0.4), use /michi:test-planning AI command');
|
|
444
386
|
process.exit(1);
|
|
445
387
|
}
|
|
446
388
|
|
|
@@ -449,8 +391,6 @@ if (import.meta.url === `file://${process.argv[1]}`) {
|
|
|
449
391
|
const validPhases = [
|
|
450
392
|
'requirements',
|
|
451
393
|
'design',
|
|
452
|
-
'test-type-selection',
|
|
453
|
-
'test-spec',
|
|
454
394
|
'tasks',
|
|
455
395
|
'environment-setup',
|
|
456
396
|
'phase-a',
|
|
@@ -459,15 +399,16 @@ if (import.meta.url === `file://${process.argv[1]}`) {
|
|
|
459
399
|
|
|
460
400
|
if (!validPhases.includes(phase)) {
|
|
461
401
|
console.error(`Invalid phase: ${phase}`);
|
|
462
|
-
console.error('Must be one of: requirements, design,
|
|
402
|
+
console.error('Must be one of: requirements, design, tasks, environment-setup, phase-a, phase-b');
|
|
463
403
|
process.exit(1);
|
|
464
404
|
}
|
|
465
405
|
|
|
466
406
|
try {
|
|
467
407
|
const result = validatePhase(feature, phase as Phase);
|
|
468
408
|
process.exit(result.valid ? 0 : 1);
|
|
469
|
-
} catch (error:
|
|
470
|
-
|
|
409
|
+
} catch (error: unknown) {
|
|
410
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
411
|
+
console.error(`\n❌ Validation error: ${message}`);
|
|
471
412
|
process.exit(1);
|
|
472
413
|
}
|
|
473
414
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { config } from 'dotenv';
|
|
7
7
|
import { loadProjectMeta } from './utils/project-meta.js';
|
|
8
8
|
import { syncToConfluence, getConfluenceConfig } from './confluence-sync.js';
|
|
9
|
-
import { syncTasksToJIRA
|
|
9
|
+
import { syncTasksToJIRA } from './jira-sync.js';
|
|
10
10
|
import { analyzeLanguage } from './utils/language-detector.js';
|
|
11
11
|
import { executeTests, generateTestReport } from './utils/test-runner.js';
|
|
12
12
|
import { createReleaseNotes } from './utils/release-notes-generator.js';
|
|
@@ -61,8 +61,9 @@ export class WorkflowOrchestrator {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
console.log(`✅ Stage completed: ${stage}`);
|
|
64
|
-
} catch (error:
|
|
65
|
-
|
|
64
|
+
} catch (error: unknown) {
|
|
65
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
66
|
+
console.error(`❌ Stage failed: ${stage}`, message);
|
|
66
67
|
throw error;
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -140,10 +141,6 @@ export class WorkflowOrchestrator {
|
|
|
140
141
|
|
|
141
142
|
// Confluenceにレポートをアップロード
|
|
142
143
|
try {
|
|
143
|
-
const confluenceConfig = getConfluenceConfig();
|
|
144
|
-
const projectMeta = loadProjectMeta();
|
|
145
|
-
const spaceKey = confluenceConfig.space;
|
|
146
|
-
|
|
147
144
|
// レポートをConfluenceに同期(テスト用のページとして)
|
|
148
145
|
console.log(' Uploading test report to Confluence...');
|
|
149
146
|
|
|
@@ -160,8 +157,9 @@ export class WorkflowOrchestrator {
|
|
|
160
157
|
if (!testResult.success) {
|
|
161
158
|
throw new Error('Tests failed. Please fix the issues before proceeding.');
|
|
162
159
|
}
|
|
163
|
-
} catch (error:
|
|
164
|
-
|
|
160
|
+
} catch (error: unknown) {
|
|
161
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
162
|
+
console.error(' ❌ Test execution failed:', message);
|
|
165
163
|
throw error;
|
|
166
164
|
}
|
|
167
165
|
}
|
|
@@ -170,8 +168,6 @@ export class WorkflowOrchestrator {
|
|
|
170
168
|
* リリースフェーズを実行
|
|
171
169
|
*/
|
|
172
170
|
private async executeReleasePhase(): Promise<void> {
|
|
173
|
-
const projectMeta = loadProjectMeta();
|
|
174
|
-
|
|
175
171
|
// リリースバージョンを決定(環境変数またはデフォルト)
|
|
176
172
|
const version = process.env.RELEASE_VERSION || 'v1.0.0';
|
|
177
173
|
|
|
@@ -192,14 +188,6 @@ export class WorkflowOrchestrator {
|
|
|
192
188
|
|
|
193
189
|
// JIRA Releaseを作成
|
|
194
190
|
try {
|
|
195
|
-
const jiraConfig = {
|
|
196
|
-
url: process.env.ATLASSIAN_URL || '',
|
|
197
|
-
email: process.env.ATLASSIAN_EMAIL || '',
|
|
198
|
-
apiToken: process.env.ATLASSIAN_API_TOKEN || ''
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
const jiraClient = new JIRAClient(jiraConfig);
|
|
202
|
-
|
|
203
191
|
console.log(' Creating JIRA Release...');
|
|
204
192
|
|
|
205
193
|
// JIRA Release作成APIを呼び出し
|
|
@@ -207,8 +195,9 @@ export class WorkflowOrchestrator {
|
|
|
207
195
|
console.log(' ℹ️ JIRA Release creation is pending JIRAClient enhancement');
|
|
208
196
|
console.log(` 📋 Manual action required: Create release ${version} in JIRA`);
|
|
209
197
|
console.log(` 📄 Release notes: ${releaseNotesPath}`);
|
|
210
|
-
} catch (error:
|
|
211
|
-
|
|
198
|
+
} catch (error: unknown) {
|
|
199
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
200
|
+
console.warn(' ⚠️ Failed to create JIRA Release:', message);
|
|
212
201
|
console.log(' 📋 Please create the release manually in JIRA');
|
|
213
202
|
}
|
|
214
203
|
}
|
|
@@ -246,8 +235,9 @@ export class WorkflowOrchestrator {
|
|
|
246
235
|
const status = await pollForApproval(pageId, confluenceConfig);
|
|
247
236
|
|
|
248
237
|
console.log(` ✅ Approved by: ${status.approvers.join(', ')}`);
|
|
249
|
-
} catch (error:
|
|
250
|
-
|
|
238
|
+
} catch (error: unknown) {
|
|
239
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
240
|
+
console.error(' ❌ Approval polling failed:', message);
|
|
251
241
|
throw error;
|
|
252
242
|
}
|
|
253
243
|
} else {
|
|
@@ -289,8 +279,9 @@ if (import.meta.url === `file://${process.argv[1]}`) {
|
|
|
289
279
|
|
|
290
280
|
orchestrator.run()
|
|
291
281
|
.then(() => process.exit(0))
|
|
292
|
-
.catch((error) => {
|
|
293
|
-
|
|
282
|
+
.catch((error: unknown) => {
|
|
283
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
284
|
+
console.error('❌ Workflow failed:', message);
|
|
294
285
|
process.exit(1);
|
|
295
286
|
});
|
|
296
287
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# kiro:spec-impl - Spec Implementation Command
|
|
2
2
|
|
|
3
|
+
## Development Guidelines
|
|
4
|
+
|
|
5
|
+
{{DEV_GUIDELINES}}
|
|
6
|
+
|
|
3
7
|
## Overview
|
|
4
8
|
|
|
5
9
|
This command implements the specifications defined in `tasks.md` following TDD (Test-Driven Development) practices with automatic JIRA integration.
|
|
@@ -25,7 +29,7 @@ This command implements the specifications defined in `tasks.md` following TDD (
|
|
|
25
29
|
- `ATLASSIAN_EMAIL`: JIRA user email
|
|
26
30
|
- `ATLASSIAN_API_TOKEN`: JIRA API token
|
|
27
31
|
- `GITHUB_TOKEN`: GitHub API token
|
|
28
|
-
-
|
|
32
|
+
- ~~`GITHUB_REPO`: GitHub repository (owner/repo format)~~ **Deprecated (v0.5.0+)**: Repository info is now automatically loaded from `.kiro/project.json`
|
|
29
33
|
|
|
30
34
|
## Execution Flow
|
|
31
35
|
|
|
@@ -5,7 +5,9 @@ description: Generate tasks.md from design specification in Michi workflow forma
|
|
|
5
5
|
|
|
6
6
|
# Generate Tasks from Design Specification
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Development Guidelines
|
|
9
|
+
|
|
10
|
+
{{DEV_GUIDELINES}}
|
|
9
11
|
|
|
10
12
|
## Overview
|
|
11
13
|
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: /michi:confluence-sync
|
|
3
|
-
description: Sync specifications to Confluence
|
|
3
|
+
description: Sync specifications to Confluence (Michi-specific feature)
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Confluence Sync Command
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
> **Michi 固有機能**: このコマンドは Michi 独自の機能です。cc-sdd 標準には含まれません。
|
|
9
|
+
>
|
|
10
|
+
> 仕様書(requirements.md, design.md)を Confluence に同期し、承認ワークフローを実現します。
|
|
11
|
+
|
|
12
|
+
## Development Guidelines
|
|
13
|
+
|
|
14
|
+
{{DEV_GUIDELINES}}
|
|
9
15
|
|
|
10
16
|
## Usage
|
|
11
17
|
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: /michi:project-switch
|
|
3
|
-
description: Switch between projects
|
|
3
|
+
description: Switch between projects (Michi-specific feature)
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Project Switch Command
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
> **Michi 固有機能**: このコマンドは Michi 独自の機能です。cc-sdd 標準には含まれません。
|
|
9
|
+
>
|
|
10
|
+
> マルチプロジェクト環境で、異なるプロジェクト間を切り替えるための機能です。
|
|
11
|
+
|
|
12
|
+
## Development Guidelines
|
|
13
|
+
|
|
14
|
+
{{DEV_GUIDELINES}}
|
|
9
15
|
|
|
10
16
|
## Usage
|
|
11
17
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: /michi:spec-design
|
|
3
|
+
description: Create comprehensive technical design for a specification (Michi version with test planning flow)
|
|
4
|
+
allowed-tools: Bash, Glob, Grep, LS, Read, Write, Edit, MultiEdit, Update, WebSearch, WebFetch
|
|
5
|
+
argument-hint: <feature-name> [-y]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Michi: Spec Design with Test Planning Flow
|
|
9
|
+
|
|
10
|
+
## Base Command Reference
|
|
11
|
+
@.claude/commands/kiro/spec-design.md
|
|
12
|
+
|
|
13
|
+
## Development Guidelines
|
|
14
|
+
|
|
15
|
+
{{DEV_GUIDELINES}}
|
|
16
|
+
|
|
17
|
+
## Michi Extension: Next Phase Guidance
|
|
18
|
+
|
|
19
|
+
設計ドキュメント生成完了後、以下のフローを案内:
|
|
20
|
+
|
|
21
|
+
### Next Phase: Phase 0.3 - テストタイプの選択
|
|
22
|
+
|
|
23
|
+
設計が完了したら、タスク生成前に **Phase 0.3-0.4: テスト計画** を実施してください。
|
|
24
|
+
|
|
25
|
+
#### 1. Phase 0.3: テストタイプの選択
|
|
26
|
+
|
|
27
|
+
設計書の Testing Strategy セクションを基に、必要なテストタイプを決定します。
|
|
28
|
+
|
|
29
|
+
**実行方法:**
|
|
30
|
+
|
|
31
|
+
**推奨: 統合AIコマンド**
|
|
32
|
+
```bash
|
|
33
|
+
/michi:test-planning {feature-name}
|
|
34
|
+
```
|
|
35
|
+
Phase 0.3とPhase 0.4を統合的に実行します。AIが対話的にテストタイプを選択し、テスト仕様書を作成します。
|
|
36
|
+
|
|
37
|
+
**選択可能なテストタイプ:**
|
|
38
|
+
- 単体テスト (Unit Test)
|
|
39
|
+
- 統合テスト (Integration Test)
|
|
40
|
+
- E2Eテスト (End-to-End Test)
|
|
41
|
+
- パフォーマンステスト (Performance Test)
|
|
42
|
+
- セキュリティテスト (Security Test)
|
|
43
|
+
|
|
44
|
+
**参照ドキュメント**: `docs/user-guide/testing/test-planning-flow.md`
|
|
45
|
+
|
|
46
|
+
#### 2. Phase 0.4: テスト仕様書の作成
|
|
47
|
+
|
|
48
|
+
Phase 0.3で選択したテストタイプに基づいて、テスト仕様書を作成します。
|
|
49
|
+
|
|
50
|
+
**実行方法:**
|
|
51
|
+
|
|
52
|
+
`/michi:test-planning` を使用した場合、Phase 0.4も自動的に実行されます。
|
|
53
|
+
|
|
54
|
+
**テンプレート:**
|
|
55
|
+
- 単体テスト: `docs/user-guide/templates/test-specs/unit-test-spec-template.md`
|
|
56
|
+
- 統合テスト: `docs/user-guide/templates/test-specs/integration-test-spec-template.md`
|
|
57
|
+
- E2Eテスト: `docs/user-guide/templates/test-specs/e2e-test-spec-template.md`
|
|
58
|
+
- パフォーマンステスト: `docs/user-guide/templates/test-specs/performance-test-spec-template.md`
|
|
59
|
+
- セキュリティテスト: `docs/user-guide/templates/test-specs/security-test-spec-template.md`
|
|
60
|
+
|
|
61
|
+
**出力先**: `.kiro/specs/{feature}/test-specs/`
|
|
62
|
+
|
|
63
|
+
### After Test Planning: Task Generation
|
|
64
|
+
|
|
65
|
+
Phase 0.3-0.4 完了後、以下のステップに進んでください:
|
|
66
|
+
|
|
67
|
+
**推奨フロー**:
|
|
68
|
+
1. `/michi:validate-design {feature}` で設計レビューを実施(任意)
|
|
69
|
+
2. `/kiro:spec-tasks {feature}` でタスク生成
|
|
70
|
+
|
|
71
|
+
**クイックフロー**:
|
|
72
|
+
- `/kiro:spec-tasks {feature} -y` で自動承認してタスク生成
|
|
73
|
+
|
|
74
|
+
**重要**: テスト計画(Phase 0.3-0.4)を完了してからタスク生成することで、実装タスクにテスト実装が適切に含まれます。
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
**Michi 固有機能**: このコマンドは cc-sdd 標準の `/kiro:spec-design` を拡張し、Michi 固有のテスト計画フロー(Phase 0.3-0.4)を Next Phase として案内します。
|