@sk8metal/michi-cli 0.19.0 → 0.22.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 +129 -0
- package/README.md +1 -1
- package/dist/scripts/multi-project-estimate.js +4 -4
- package/dist/scripts/multi-project-estimate.js.map +1 -1
- package/dist/scripts/phase-runner.js +16 -16
- package/dist/scripts/phase-runner.js.map +1 -1
- package/dist/scripts/pr-automation.js +2 -2
- package/dist/scripts/pr-automation.js.map +1 -1
- package/dist/scripts/pre-flight-check.js +4 -4
- package/dist/scripts/pre-flight-check.js.map +1 -1
- package/dist/scripts/spec-impl-workflow.js +4 -4
- package/dist/scripts/spec-impl-workflow.js.map +1 -1
- package/dist/scripts/template/multi-repo-renderer.js +1 -1
- package/dist/scripts/template/multi-repo-renderer.js.map +1 -1
- package/dist/scripts/template/renderer.d.ts +6 -6
- package/dist/scripts/template/renderer.js +7 -7
- package/dist/scripts/test-execution-generator.js +11 -11
- package/dist/scripts/test-execution-generator.js.map +1 -1
- package/dist/scripts/utils/config-loader.d.ts +1 -1
- package/dist/scripts/utils/config-loader.js +4 -4
- package/dist/scripts/utils/config-loader.js.map +1 -1
- package/dist/scripts/utils/confluence-hierarchy.js +1 -1
- package/dist/scripts/utils/confluence-hierarchy.js.map +1 -1
- package/dist/scripts/utils/docker-requirement-detector.js +3 -3
- package/dist/scripts/utils/docker-requirement-detector.js.map +1 -1
- package/dist/scripts/utils/language-detector.js +2 -2
- package/dist/scripts/utils/language-detector.js.map +1 -1
- package/dist/scripts/utils/multi-repo-validator.d.ts +1 -1
- package/dist/scripts/utils/multi-repo-validator.js +3 -3
- package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
- package/dist/scripts/utils/project-analyzer.d.ts +1 -1
- package/dist/scripts/utils/project-analyzer.js +2 -2
- package/dist/scripts/utils/project-analyzer.js.map +1 -1
- package/dist/scripts/utils/spec-archiver.d.ts +1 -1
- package/dist/scripts/utils/spec-archiver.js +5 -5
- package/dist/scripts/utils/spec-archiver.js.map +1 -1
- package/dist/scripts/utils/spec-updater.js +2 -2
- package/dist/scripts/utils/spec-updater.js.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/template-applier.js +1 -1
- package/dist/scripts/utils/template-applier.js.map +1 -1
- package/dist/scripts/validate-phase.js +4 -4
- package/dist/scripts/validate-phase.js.map +1 -1
- package/dist/src/application/use-cases/spec/archive-spec.js +1 -1
- package/dist/src/application/use-cases/spec/archive-spec.js.map +1 -1
- package/dist/src/application/use-cases/spec/generate-requirements.js +1 -1
- package/dist/src/application/use-cases/spec/generate-requirements.js.map +1 -1
- package/dist/src/application/use-cases/spec/init-spec.js +1 -1
- package/dist/src/application/use-cases/spec/init-spec.js.map +1 -1
- package/dist/src/commands/migrate.js +14 -14
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js +1 -1
- package/dist/src/infrastructure/external-apis/atlassian/confluence/hierarchy.js.map +1 -1
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js +2 -2
- package/dist/src/infrastructure/external-apis/atlassian/confluence/sync-service.js.map +1 -1
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js +1 -1
- package/dist/src/infrastructure/external-apis/atlassian/jira/issue-builder.js.map +1 -1
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js +3 -3
- package/dist/src/infrastructure/external-apis/atlassian/jira/sync-service.js.map +1 -1
- package/dist/src/infrastructure/filesystem/project-meta.d.ts +1 -1
- package/dist/src/infrastructure/filesystem/project-meta.js +2 -2
- package/dist/src/infrastructure/filesystem/project-meta.js.map +1 -1
- package/dist/src/presentation/commands/config/register.d.ts.map +1 -1
- package/dist/src/presentation/commands/config/register.js +54 -0
- package/dist/src/presentation/commands/config/register.js.map +1 -1
- package/dist/src/presentation/commands/init/handler.js +1 -1
- package/dist/src/presentation/commands/init/handler.js.map +1 -1
- package/dist/src/presentation/commands/init/register.js +2 -2
- package/dist/src/presentation/commands/init/register.js.map +1 -1
- package/dist/src/presentation/commands/init/setup.d.ts +1 -1
- package/dist/src/presentation/commands/init/setup.js +6 -6
- package/dist/src/presentation/commands/init/setup.js.map +1 -1
- package/dist/src/presentation/commands/init/templates.js +5 -5
- package/dist/src/presentation/commands/init/templates.js.map +1 -1
- package/dist/src/presentation/commands/workflow/orchestrator.js +2 -2
- package/dist/src/presentation/commands/workflow/orchestrator.js.map +1 -1
- package/dist/src/presentation/interactive/config/env-wizard.d.ts +9 -0
- package/dist/src/presentation/interactive/config/env-wizard.d.ts.map +1 -0
- package/dist/src/presentation/interactive/config/env-wizard.js +193 -0
- package/dist/src/presentation/interactive/config/env-wizard.js.map +1 -0
- package/dist/src/presentation/interactive/config/index.d.ts +5 -0
- package/dist/src/presentation/interactive/config/index.d.ts.map +1 -0
- package/dist/src/presentation/interactive/config/index.js +5 -0
- package/dist/src/presentation/interactive/config/index.js.map +1 -0
- package/dist/src/presentation/interactive/prompts.d.ts +2 -3
- package/dist/src/presentation/interactive/prompts.d.ts.map +1 -1
- package/dist/src/presentation/interactive/prompts.js +4 -6
- package/dist/src/presentation/interactive/prompts.js.map +1 -1
- package/docs/MIGRATION.md +2 -2
- package/docs/architecture.md +5 -5
- package/docs/getting-started/configuration.md +2 -2
- package/docs/guides/claude-code.md +10 -10
- package/docs/guides/comprehensive-verification-guide.md +29 -29
- package/docs/guides/interactive-config.md +285 -0
- package/docs/guides/workflow.md +25 -25
- package/docs/onion-architecture-phase0-complete.md +1 -1
- package/docs/reference/ai-commands.md +12 -12
- package/docs/reference/cli.md +4 -4
- package/docs/reference/environment-variables.md +1 -1
- package/docs/troubleshooting.md +6 -6
- package/package.json +1 -1
- package/scripts/README.md +2 -3
- package/scripts/__tests__/create-project.test.ts +6 -6
- package/scripts/__tests__/multi-project-estimate.test.ts +1 -1
- package/scripts/build/README.md +1 -1
- package/scripts/multi-project-estimate.ts +4 -4
- package/scripts/phase-runner.ts +16 -16
- package/scripts/pr-automation.ts +2 -2
- package/scripts/pre-flight-check.ts +4 -4
- package/scripts/spec-impl-workflow.ts +4 -4
- package/scripts/template/__tests__/renderer.test.ts +34 -34
- package/scripts/template/multi-repo-renderer.ts +1 -1
- package/scripts/template/renderer.ts +9 -9
- package/scripts/test-execution-generator.ts +11 -11
- package/scripts/utils/__tests__/config-loader.test.ts +14 -9
- package/scripts/utils/__tests__/config-validator.test.ts +8 -8
- package/scripts/utils/__tests__/multi-repo-validator.test.ts +17 -17
- package/scripts/utils/__tests__/project-analyzer.test.ts +28 -28
- package/scripts/utils/__tests__/project-meta.test.ts +22 -22
- package/scripts/utils/__tests__/spec-updater.test.ts +3 -3
- package/scripts/utils/config-loader.ts +6 -6
- package/scripts/utils/confluence-hierarchy.ts +1 -1
- package/scripts/utils/docker-requirement-detector.ts +3 -3
- package/scripts/utils/language-detector.ts +2 -2
- package/scripts/utils/multi-repo-validator.ts +3 -3
- package/scripts/utils/project-analyzer.ts +2 -2
- package/scripts/utils/spec-archiver.ts +5 -5
- package/scripts/utils/spec-updater.ts +2 -2
- package/scripts/utils/tasks-converter.ts +2 -2
- package/scripts/utils/template-applier.ts +1 -1
- package/scripts/validate-phase.ts +4 -4
- package/templates/claude-agent/README.md +1 -1
- package/templates/claude-agent/agents/designer.md +4 -4
- package/templates/claude-agent/agents/developer.md +2 -2
- package/templates/claude-agent/agents/doc-reviewer.md +4 -4
- package/templates/claude-agent/agents/manager-agent.md +3 -3
- package/templates/claude-agent/agents/repo-spec-executor.md +1 -1
- package/templates/claude-agent/agents/tester.md +3 -3
- package/templates/claude-agent/commands/kiro/kiro-spec-impl.md +6 -6
- package/templates/claude-agent/commands/kiro/kiro-spec-tasks.md +10 -10
- package/templates/claude-agent/rules/doc-review.md +1 -1
- package/templates/common/.kiro/project.json.template +0 -21
|
@@ -190,7 +190,7 @@ function validateConfigPath(configPath: string, projectRoot: string): boolean {
|
|
|
190
190
|
function resolveConfigPath(projectRoot: string): string {
|
|
191
191
|
const michiConfigPath = resolve(projectRoot, '.michi/config.json');
|
|
192
192
|
const legacyConfigPath = resolve(projectRoot, '.kiro/config.json');
|
|
193
|
-
|
|
193
|
+
|
|
194
194
|
// legacyパスが存在する場合は警告(移行推奨)
|
|
195
195
|
if (existsSync(legacyConfigPath) && !existsSync(michiConfigPath)) {
|
|
196
196
|
console.warn(
|
|
@@ -199,7 +199,7 @@ function resolveConfigPath(projectRoot: string): string {
|
|
|
199
199
|
' The legacy path will not be supported in future versions.\n'
|
|
200
200
|
);
|
|
201
201
|
}
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
return michiConfigPath;
|
|
204
204
|
}
|
|
205
205
|
|
|
@@ -306,10 +306,10 @@ function loadProjectEnv(projectRoot: string): Record<string, string> {
|
|
|
306
306
|
|
|
307
307
|
/**
|
|
308
308
|
* プロジェクトメタデータを読み込み
|
|
309
|
-
* .
|
|
309
|
+
* .michi/project.json からプロジェクト情報を読み込む
|
|
310
310
|
*/
|
|
311
311
|
function loadProjectMetadata(projectRoot: string): Partial<AppConfig> | null {
|
|
312
|
-
const projectJsonPath = resolve(projectRoot, '.
|
|
312
|
+
const projectJsonPath = resolve(projectRoot, '.michi/project.json');
|
|
313
313
|
|
|
314
314
|
if (!existsSync(projectJsonPath)) {
|
|
315
315
|
return null;
|
|
@@ -392,7 +392,7 @@ function applyEnvVarsToConfig(
|
|
|
392
392
|
* 1. デフォルト設定
|
|
393
393
|
* 2. グローバル.env(~/.michi/.env)
|
|
394
394
|
* 3. グローバル設定(~/.michi/config.json)
|
|
395
|
-
* 4. プロジェクトメタデータ(.
|
|
395
|
+
* 4. プロジェクトメタデータ(.michi/project.json)
|
|
396
396
|
* 5. プロジェクト設定(.michi/config.json)
|
|
397
397
|
* 6. プロジェクト.env(.env)- 最高優先度
|
|
398
398
|
*/
|
|
@@ -451,7 +451,7 @@ export function getConfig(projectRoot: string = process.cwd()): AppConfig {
|
|
|
451
451
|
const projectConfigPath = resolveConfigPath(projectRoot);
|
|
452
452
|
const globalConfigPath = getGlobalConfigPath();
|
|
453
453
|
const globalEnvPath = getGlobalEnvPath();
|
|
454
|
-
const projectMetaPath = resolve(projectRoot, '.
|
|
454
|
+
const projectMetaPath = resolve(projectRoot, '.michi/project.json');
|
|
455
455
|
const projectEnvPath = resolve(projectRoot, '.env');
|
|
456
456
|
const currentFileUrl = import.meta.url;
|
|
457
457
|
const currentFilePath = fileURLToPath(currentFileUrl);
|
|
@@ -209,7 +209,7 @@ async function getOrCreateParentPage(
|
|
|
209
209
|
// 親ページを作成
|
|
210
210
|
const parentContent = createConfluencePage({
|
|
211
211
|
title: parentTitle,
|
|
212
|
-
githubUrl: `${projectMeta.repository}/tree/main/.
|
|
212
|
+
githubUrl: `${projectMeta.repository}/tree/main/.michi/specs/${featureName}`,
|
|
213
213
|
content: `<p>機能: <strong>${featureName}</strong></p><p>このページの下に、要件定義・設計・タスク分割のページが配置されます。</p>`,
|
|
214
214
|
approvers: projectMeta.stakeholders,
|
|
215
215
|
projectName: projectMeta.projectName
|
|
@@ -24,7 +24,7 @@ export function analyzeDockerRequirement(feature: string, projectRoot: string =
|
|
|
24
24
|
let score = 0;
|
|
25
25
|
|
|
26
26
|
// design.mdを解析
|
|
27
|
-
const designPath = join(projectRoot, '.
|
|
27
|
+
const designPath = join(projectRoot, '.michi', 'specs', feature, 'design.md');
|
|
28
28
|
if (existsSync(designPath)) {
|
|
29
29
|
const design = safeReadFileOrThrow(designPath, 'utf-8');
|
|
30
30
|
|
|
@@ -88,7 +88,7 @@ export function analyzeDockerRequirement(feature: string, projectRoot: string =
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// test-type-selection.jsonを解析
|
|
91
|
-
const testSelectionPath = join(projectRoot, '.
|
|
91
|
+
const testSelectionPath = join(projectRoot, '.michi', 'specs', feature, 'test-type-selection.json');
|
|
92
92
|
if (existsSync(testSelectionPath)) {
|
|
93
93
|
try {
|
|
94
94
|
const testSelection = JSON.parse(safeReadFileOrThrow(testSelectionPath, 'utf-8'));
|
|
@@ -117,7 +117,7 @@ export function analyzeDockerRequirement(feature: string, projectRoot: string =
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
// requirements.mdを解析
|
|
120
|
-
const requirementsPath = join(projectRoot, '.
|
|
120
|
+
const requirementsPath = join(projectRoot, '.michi', 'specs', feature, 'requirements.md');
|
|
121
121
|
if (existsSync(requirementsPath)) {
|
|
122
122
|
const requirements = safeReadFileOrThrow(requirementsPath, 'utf-8');
|
|
123
123
|
|
|
@@ -29,7 +29,7 @@ export function analyzeLanguage(feature: string, projectRoot: string = process.c
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// design.mdを解析
|
|
32
|
-
const designPath = join(projectRoot, '.
|
|
32
|
+
const designPath = join(projectRoot, '.michi', 'specs', feature, 'design.md');
|
|
33
33
|
if (existsSync(designPath)) {
|
|
34
34
|
const design = safeReadFileOrThrow(designPath, 'utf-8');
|
|
35
35
|
|
|
@@ -93,7 +93,7 @@ export function analyzeLanguage(feature: string, projectRoot: string = process.c
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
// requirements.mdを解析
|
|
96
|
-
const requirementsPath = join(projectRoot, '.
|
|
96
|
+
const requirementsPath = join(projectRoot, '.michi', 'specs', feature, 'requirements.md');
|
|
97
97
|
if (existsSync(requirementsPath)) {
|
|
98
98
|
const requirements = safeReadFileOrThrow(requirementsPath, 'utf-8');
|
|
99
99
|
|
|
@@ -159,13 +159,13 @@ export function validateRepositoryUrl(url: string): Result<boolean, string> {
|
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
161
|
* Michi導入状況をチェック
|
|
162
|
-
* .
|
|
162
|
+
* .michi/project.json の存在でMichi導入済みと判定
|
|
163
163
|
*
|
|
164
164
|
* @param localPath - 子リポジトリのlocalPath
|
|
165
165
|
* @returns Michi導入済みかどうか
|
|
166
166
|
*/
|
|
167
167
|
export function hasMichiSetup(localPath: string): boolean {
|
|
168
|
-
const projectJsonPath = path.join(localPath, '.
|
|
168
|
+
const projectJsonPath = path.join(localPath, '.michi', 'project.json');
|
|
169
169
|
return fs.existsSync(projectJsonPath);
|
|
170
170
|
}
|
|
171
171
|
|
|
@@ -330,7 +330,7 @@ export function validateLocalPath(
|
|
|
330
330
|
if (!hasMichiSetupResult) {
|
|
331
331
|
michiSetupCommand = getMichiSetupCommand(localPath);
|
|
332
332
|
warnings.push(
|
|
333
|
-
`Repository '${repository.name}' does not have Michi setup (.
|
|
333
|
+
`Repository '${repository.name}' does not have Michi setup (.michi/project.json not found)`,
|
|
334
334
|
);
|
|
335
335
|
}
|
|
336
336
|
|
|
@@ -143,13 +143,13 @@ export class ProjectAnalyzer {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
|
-
* Get project metadata from .
|
|
146
|
+
* Get project metadata from .michi/project.json
|
|
147
147
|
*
|
|
148
148
|
* @param projectRoot - Project root directory (default: process.cwd())
|
|
149
149
|
* @returns Result<ProjectMetadata, ProjectError> - Project metadata or error
|
|
150
150
|
*/
|
|
151
151
|
getProjectMetadata(projectRoot: string = process.cwd()): Result<ProjectMetadata, ProjectError> {
|
|
152
|
-
const projectJsonPath = resolve(projectRoot, '.
|
|
152
|
+
const projectJsonPath = resolve(projectRoot, '.michi/project.json');
|
|
153
153
|
|
|
154
154
|
if (!existsSync(projectJsonPath)) {
|
|
155
155
|
return failure([{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 仕様書アーカイブユーティリティ
|
|
3
|
-
* 完了した仕様書を .
|
|
3
|
+
* 完了した仕様書を .michi/specs/archive/ に移動する
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { existsSync, renameSync, mkdirSync, readdirSync, writeFileSync } from 'fs';
|
|
@@ -67,7 +67,7 @@ export function canArchiveSpec(
|
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
const specDir = resolve(projectRoot, `.
|
|
70
|
+
const specDir = resolve(projectRoot, `.michi/specs/${featureName}`);
|
|
71
71
|
|
|
72
72
|
if (!existsSync(specDir)) {
|
|
73
73
|
return { canArchive: false, reason: 'Spec not found' };
|
|
@@ -137,8 +137,8 @@ export function archiveSpec(
|
|
|
137
137
|
return { success: false, feature: featureName, error: check.reason };
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
const sourceDir = resolve(projectRoot, `.
|
|
141
|
-
const archiveDir = resolve(projectRoot, '.
|
|
140
|
+
const sourceDir = resolve(projectRoot, `.michi/specs/${featureName}`);
|
|
141
|
+
const archiveDir = resolve(projectRoot, '.michi/specs/archive');
|
|
142
142
|
const targetDir = resolve(archiveDir, featureName);
|
|
143
143
|
|
|
144
144
|
// archive ディレクトリ作成
|
|
@@ -178,7 +178,7 @@ export function listSpecs(
|
|
|
178
178
|
projectRoot: string = process.cwd()
|
|
179
179
|
): SpecInfo[] {
|
|
180
180
|
const specs: SpecInfo[] = [];
|
|
181
|
-
const specsDir = resolve(projectRoot, '.
|
|
181
|
+
const specsDir = resolve(projectRoot, '.michi/specs');
|
|
182
182
|
|
|
183
183
|
if (!existsSync(specsDir)) {
|
|
184
184
|
return specs;
|
|
@@ -83,7 +83,7 @@ export interface SpecJson {
|
|
|
83
83
|
* spec.json を読み込む
|
|
84
84
|
*/
|
|
85
85
|
export function loadSpecJson(featureName: string, projectRoot: string = process.cwd()): SpecJson {
|
|
86
|
-
const specPath = resolve(projectRoot, `.
|
|
86
|
+
const specPath = resolve(projectRoot, `.michi/specs/${featureName}/spec.json`);
|
|
87
87
|
|
|
88
88
|
if (!existsSync(specPath)) {
|
|
89
89
|
// 新規作成する場合は最低限の構造を返す
|
|
@@ -121,7 +121,7 @@ export function loadSpecJson(featureName: string, projectRoot: string = process.
|
|
|
121
121
|
* @param projectRoot プロジェクトルート(デフォルト: process.cwd())
|
|
122
122
|
*/
|
|
123
123
|
export function saveSpecJson(featureName: string, spec: SpecJson, projectRoot: string = process.cwd()): void {
|
|
124
|
-
const specDir = resolve(projectRoot, `.
|
|
124
|
+
const specDir = resolve(projectRoot, `.michi/specs/${featureName}`);
|
|
125
125
|
const specPath = resolve(specDir, 'spec.json');
|
|
126
126
|
|
|
127
127
|
// ディレクトリが存在しない場合は作成
|
|
@@ -297,7 +297,7 @@ export function convertToMichiFormat(
|
|
|
297
297
|
);
|
|
298
298
|
lines.push(`- **${language === 'ja' ? '成果物' : 'Deliverables'}**:`);
|
|
299
299
|
lines.push(
|
|
300
|
-
` - \`.
|
|
300
|
+
` - \`.michi/specs/${projectName.toLowerCase().replace(/\s+/g, '-')}/requirements.md\``,
|
|
301
301
|
);
|
|
302
302
|
lines.push(
|
|
303
303
|
`- **${language === 'ja' ? '受け入れ基準' : 'Acceptance Criteria'}**:`,
|
|
@@ -335,7 +335,7 @@ export function convertToMichiFormat(
|
|
|
335
335
|
);
|
|
336
336
|
lines.push(`- **${language === 'ja' ? '成果物' : 'Deliverables'}**:`);
|
|
337
337
|
lines.push(
|
|
338
|
-
` - \`.
|
|
338
|
+
` - \`.michi/specs/${projectName.toLowerCase().replace(/\s+/g, '-')}/design.md\``,
|
|
339
339
|
);
|
|
340
340
|
lines.push(
|
|
341
341
|
`- **${language === 'ja' ? '受け入れ基準' : 'Acceptance Criteria'}**:`,
|
|
@@ -34,7 +34,7 @@ interface ValidationResult {
|
|
|
34
34
|
* spec.jsonを読み込み
|
|
35
35
|
*/
|
|
36
36
|
function loadSpecJson(feature: string): SpecJson {
|
|
37
|
-
const specPath = join(process.cwd(), '.
|
|
37
|
+
const specPath = join(process.cwd(), '.michi', 'specs', feature, 'spec.json');
|
|
38
38
|
|
|
39
39
|
if (!existsSync(specPath)) {
|
|
40
40
|
throw new Error(`spec.json not found: ${specPath}`);
|
|
@@ -67,7 +67,7 @@ function validateRequirements(feature: string): ValidationResult {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// 1. requirements.md存在チェック
|
|
70
|
-
const requirementsPath = join(process.cwd(), '.
|
|
70
|
+
const requirementsPath = join(process.cwd(), '.michi', 'specs', feature, 'requirements.md');
|
|
71
71
|
if (!existsSync(requirementsPath)) {
|
|
72
72
|
errors.push('❌ requirements.md が作成されていません');
|
|
73
73
|
}
|
|
@@ -121,7 +121,7 @@ function validateDesign(feature: string): ValidationResult {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
// 1. design.md存在チェック
|
|
124
|
-
const designPath = join(process.cwd(), '.
|
|
124
|
+
const designPath = join(process.cwd(), '.michi', 'specs', feature, 'design.md');
|
|
125
125
|
if (!existsSync(designPath)) {
|
|
126
126
|
errors.push('❌ design.md が作成されていません');
|
|
127
127
|
}
|
|
@@ -175,7 +175,7 @@ function validateTasks(feature: string): ValidationResult {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
// 1. tasks.md存在チェック
|
|
178
|
-
const tasksPath = join(process.cwd(), '.
|
|
178
|
+
const tasksPath = join(process.cwd(), '.michi', 'specs', feature, 'tasks.md');
|
|
179
179
|
if (!existsSync(tasksPath)) {
|
|
180
180
|
errors.push('❌ tasks.md が作成されていません');
|
|
181
181
|
} else {
|
|
@@ -25,7 +25,7 @@ Placeholders are replaced with project-specific values during setup.
|
|
|
25
25
|
|
|
26
26
|
- {{LANG_CODE}}: Language code (ja, en, etc.)
|
|
27
27
|
- {{DEV_GUIDELINES}}: Development guidelines
|
|
28
|
-
- {{
|
|
28
|
+
- {{SPEC_DIR}}: Kiro directory (default: .michi)
|
|
29
29
|
- {{AGENT_DIR}}: Agent directory (default: .claude)
|
|
30
30
|
- {{PROJECT_ID}}: Project ID
|
|
31
31
|
- {{FEATURE_NAME}}: Feature name
|
|
@@ -28,13 +28,13 @@ System design and architecture documentation.
|
|
|
28
28
|
|
|
29
29
|
### Requirements Document
|
|
30
30
|
|
|
31
|
-
- Location: {{
|
|
31
|
+
- Location: {{SPEC_DIR}}/specs/{{FEATURE_NAME}}/requirements.md
|
|
32
32
|
- Content: Functional and non-functional requirements
|
|
33
33
|
- Format: Structured markdown with acceptance criteria
|
|
34
34
|
|
|
35
35
|
### Design Document
|
|
36
36
|
|
|
37
|
-
- Location: {{
|
|
37
|
+
- Location: {{SPEC_DIR}}/specs/{{FEATURE_NAME}}/design.md
|
|
38
38
|
- Content: Architecture, interfaces, data models
|
|
39
39
|
- Include: Error handling strategy, security considerations
|
|
40
40
|
|
|
@@ -68,12 +68,12 @@ System design and architecture documentation.
|
|
|
68
68
|
## Project Context
|
|
69
69
|
|
|
70
70
|
- Project ID: {{PROJECT_ID}}
|
|
71
|
-
- Kiro directory: {{
|
|
71
|
+
- Kiro directory: {{SPEC_DIR}}
|
|
72
72
|
- Agent directory: {{AGENT_DIR}}
|
|
73
73
|
- Feature name: {{FEATURE_NAME}}
|
|
74
74
|
|
|
75
75
|
## Constraints
|
|
76
76
|
|
|
77
77
|
- Do not implement code (delegate to developer)
|
|
78
|
-
- All designs must be documented in {{
|
|
78
|
+
- All designs must be documented in {{SPEC_DIR}}/specs/
|
|
79
79
|
- Consider existing architecture patterns in the codebase
|
|
@@ -30,7 +30,7 @@ Code implementation following TDD principles.
|
|
|
30
30
|
|
|
31
31
|
### 1. Red Phase
|
|
32
32
|
|
|
33
|
-
- Read design document at {{
|
|
33
|
+
- Read design document at {{SPEC_DIR}}/specs/{{FEATURE_NAME}}/design.md
|
|
34
34
|
- Write failing tests first
|
|
35
35
|
- Define expected behavior through tests
|
|
36
36
|
|
|
@@ -56,7 +56,7 @@ Code implementation following TDD principles.
|
|
|
56
56
|
## Project Context
|
|
57
57
|
|
|
58
58
|
- Project ID: {{PROJECT_ID}}
|
|
59
|
-
- Kiro directory: {{
|
|
59
|
+
- Kiro directory: {{SPEC_DIR}}
|
|
60
60
|
- Agent directory: {{AGENT_DIR}}
|
|
61
61
|
- Feature name: {{FEATURE_NAME}}
|
|
62
62
|
|
|
@@ -69,11 +69,11 @@ Detect the following patterns:
|
|
|
69
69
|
|
|
70
70
|
### 3.5. Michi-Specific Checks
|
|
71
71
|
|
|
72
|
-
For documents in `.
|
|
72
|
+
For documents in `.michi/specs/` directory:
|
|
73
73
|
- **@-reference integrity**: Verify `@.claude/rules/...` paths exist and are valid
|
|
74
74
|
- **Placeholder detection**: Check for unreplaced placeholders like `{{PLACEHOLDER}}`
|
|
75
75
|
- **Phase compliance**: For `design.md`, verify Test Plan section exists (Phase 0.3-0.4)
|
|
76
|
-
- **Project context**: Validate {{PROJECT_ID}}, {{
|
|
76
|
+
- **Project context**: Validate {{PROJECT_ID}}, {{SPEC_DIR}}, {{AGENT_DIR}} usage
|
|
77
77
|
|
|
78
78
|
### 4. Required Section Verification
|
|
79
79
|
|
|
@@ -96,7 +96,7 @@ Output review results in the format defined in doc-review-rules.md:
|
|
|
96
96
|
## Project Context
|
|
97
97
|
|
|
98
98
|
- Project ID: {{PROJECT_ID}}
|
|
99
|
-
- Kiro directory: {{
|
|
99
|
+
- Kiro directory: {{SPEC_DIR}}
|
|
100
100
|
- Agent directory: {{AGENT_DIR}}
|
|
101
101
|
|
|
102
102
|
## Constraints
|
|
@@ -107,7 +107,7 @@ Output review results in the format defined in doc-review-rules.md:
|
|
|
107
107
|
|
|
108
108
|
## Usage Example
|
|
109
109
|
|
|
110
|
-
When reviewing `.
|
|
110
|
+
When reviewing `.michi/specs/{{FEATURE_NAME}}/requirements.md`:
|
|
111
111
|
|
|
112
112
|
1. Read the file using Read tool
|
|
113
113
|
2. Detect document type: Design Document (50-100 lines guideline)
|
|
@@ -27,9 +27,9 @@ Project orchestration and workflow management.
|
|
|
27
27
|
|
|
28
28
|
### 1. Project Initialization
|
|
29
29
|
|
|
30
|
-
- Initialize spec structure at {{
|
|
30
|
+
- Initialize spec structure at {{SPEC_DIR}}/specs/{{FEATURE_NAME}}/
|
|
31
31
|
- Create spec.json with project metadata
|
|
32
|
-
- Reference {{
|
|
32
|
+
- Reference {{SPEC_DIR}}/project.json for project context
|
|
33
33
|
|
|
34
34
|
### 2. Task Management
|
|
35
35
|
|
|
@@ -49,7 +49,7 @@ Project orchestration and workflow management.
|
|
|
49
49
|
## Project Context
|
|
50
50
|
|
|
51
51
|
- Project ID: {{PROJECT_ID}}
|
|
52
|
-
- Kiro directory: {{
|
|
52
|
+
- Kiro directory: {{SPEC_DIR}}
|
|
53
53
|
- Agent directory: {{AGENT_DIR}}
|
|
54
54
|
|
|
55
55
|
## Constraints
|
|
@@ -46,12 +46,12 @@ Manual/automated tests before release:
|
|
|
46
46
|
|
|
47
47
|
### Test Specifications
|
|
48
48
|
|
|
49
|
-
- Location: {{
|
|
49
|
+
- Location: {{SPEC_DIR}}/specs/{{FEATURE_NAME}}/test-specs/
|
|
50
50
|
- Content: Test cases, scenarios, expected results
|
|
51
51
|
|
|
52
52
|
### Test Execution
|
|
53
53
|
|
|
54
|
-
- Location: {{
|
|
54
|
+
- Location: {{SPEC_DIR}}/specs/{{FEATURE_NAME}}/test-execution/
|
|
55
55
|
- Content: Test scripts, configuration files
|
|
56
56
|
|
|
57
57
|
## Quality Standards
|
|
@@ -90,7 +90,7 @@ Manual/automated tests before release:
|
|
|
90
90
|
## Project Context
|
|
91
91
|
|
|
92
92
|
- Project ID: {{PROJECT_ID}}
|
|
93
|
-
- Kiro directory: {{
|
|
93
|
+
- Kiro directory: {{SPEC_DIR}}
|
|
94
94
|
- Agent directory: {{AGENT_DIR}}
|
|
95
95
|
- Feature name: {{FEATURE_NAME}}
|
|
96
96
|
|
|
@@ -14,18 +14,18 @@ This command implements the specifications defined in `tasks.md` following TDD (
|
|
|
14
14
|
|
|
15
15
|
- `$ARGUMENTS`: Feature name (e.g., "user-auth")
|
|
16
16
|
|
|
17
|
-
**Note:** JIRA ticket keys are automatically detected from `.
|
|
17
|
+
**Note:** JIRA ticket keys are automatically detected from `.michi/specs/{feature}/spec.json`. No need to specify them manually.
|
|
18
18
|
|
|
19
19
|
## Pre-requisites
|
|
20
20
|
|
|
21
|
-
1. `.
|
|
22
|
-
2. `.
|
|
21
|
+
1. `.michi/specs/{feature}/tasks.md` must exist
|
|
22
|
+
2. `.michi/specs/{feature}/spec.json` must contain JIRA info (run `michi jira:sync` first)
|
|
23
23
|
3. Environment variables must be configured:
|
|
24
24
|
- `ATLASSIAN_URL`: JIRA instance URL
|
|
25
25
|
- `ATLASSIAN_EMAIL`: JIRA user email
|
|
26
26
|
- `ATLASSIAN_API_TOKEN`: JIRA API token
|
|
27
27
|
- `GITHUB_TOKEN`: GitHub API token
|
|
28
|
-
- ~~`GITHUB_REPO`: GitHub repository (owner/repo format)~~ **Deprecated (v0.5.0+)**: Repository info is now automatically loaded from `.
|
|
28
|
+
- ~~`GITHUB_REPO`: GitHub repository (owner/repo format)~~ **Deprecated (v0.5.0+)**: Repository info is now automatically loaded from `.michi/project.json`
|
|
29
29
|
|
|
30
30
|
## Execution Flow
|
|
31
31
|
|
|
@@ -43,7 +43,7 @@ Extract:
|
|
|
43
43
|
|
|
44
44
|
### 2. JIRA Info Detection (Automatic)
|
|
45
45
|
|
|
46
|
-
Read JIRA information from `.
|
|
46
|
+
Read JIRA information from `.michi/specs/$FEATURE_NAME/spec.json`:
|
|
47
47
|
|
|
48
48
|
```json
|
|
49
49
|
{
|
|
@@ -72,7 +72,7 @@ This is handled internally. The workflow will:
|
|
|
72
72
|
|
|
73
73
|
### 4. Implementation Phase (TDD)
|
|
74
74
|
|
|
75
|
-
Read the tasks from `.
|
|
75
|
+
Read the tasks from `.michi/specs/$FEATURE_NAME/tasks.md` and implement each Story following TDD:
|
|
76
76
|
|
|
77
77
|
For each Story in tasks.md:
|
|
78
78
|
|
|
@@ -5,7 +5,7 @@ description: Generate tasks.md from design specification in Michi workflow forma
|
|
|
5
5
|
|
|
6
6
|
# Generate Tasks from Design Specification
|
|
7
7
|
|
|
8
|
-
**Important**: Generate output in the language specified in `{{
|
|
8
|
+
**Important**: Generate output in the language specified in `{{SPEC_DIR}}/project.json`.
|
|
9
9
|
|
|
10
10
|
## Overview
|
|
11
11
|
|
|
@@ -21,13 +21,13 @@ This command generates a detailed task breakdown (`tasks.md`) from the design sp
|
|
|
21
21
|
|
|
22
22
|
## Input Files
|
|
23
23
|
|
|
24
|
-
1. `{{
|
|
25
|
-
2. `{{
|
|
26
|
-
3. `{{
|
|
24
|
+
1. `{{SPEC_DIR}}/specs/{{FEATURE_NAME}}/design.md` - Design specification
|
|
25
|
+
2. `{{SPEC_DIR}}/specs/{{FEATURE_NAME}}/requirements.md` - Requirements specification
|
|
26
|
+
3. `{{SPEC_DIR}}/project.json` - Project metadata
|
|
27
27
|
|
|
28
28
|
## Output File
|
|
29
29
|
|
|
30
|
-
`{{
|
|
30
|
+
`{{SPEC_DIR}}/specs/{{FEATURE_NAME}}/tasks.md`
|
|
31
31
|
|
|
32
32
|
## Required Format: Michi Workflow Structure
|
|
33
33
|
|
|
@@ -114,7 +114,7 @@ Each story within a phase MUST use this format:
|
|
|
114
114
|
- **Effort**: 0.5 person-days
|
|
115
115
|
- **Description**: Create feature requirements document
|
|
116
116
|
- **Deliverables**:
|
|
117
|
-
- `.
|
|
117
|
+
- `.michi/specs/{{FEATURE_NAME}}/requirements.md`
|
|
118
118
|
- Confluence page (Requirements)
|
|
119
119
|
- **Acceptance Criteria**:
|
|
120
120
|
- [ ] Functional requirements defined
|
|
@@ -138,7 +138,7 @@ Each story within a phase MUST use this format:
|
|
|
138
138
|
- **Effort**: 0.5-1.0 person-days
|
|
139
139
|
- **Description**: Architecture design, API design, class design
|
|
140
140
|
- **Deliverables**:
|
|
141
|
-
- `.
|
|
141
|
+
- `.michi/specs/{{FEATURE_NAME}}/design.md`
|
|
142
142
|
- Confluence page (Design Document)
|
|
143
143
|
- **Acceptance Criteria**:
|
|
144
144
|
- [ ] System architecture diagram created
|
|
@@ -334,11 +334,11 @@ Each story is automatically assigned the following labels:
|
|
|
334
334
|
|
|
335
335
|
## Execution Steps
|
|
336
336
|
|
|
337
|
-
1. Read `{{
|
|
338
|
-
2. Read `{{
|
|
337
|
+
1. Read `{{SPEC_DIR}}/specs/{{FEATURE_NAME}}/design.md`
|
|
338
|
+
2. Read `{{SPEC_DIR}}/specs/{{FEATURE_NAME}}/requirements.md`
|
|
339
339
|
3. Analyze design components and create Story breakdown
|
|
340
340
|
4. Generate `tasks.md` following the Michi Workflow Format above
|
|
341
|
-
5. Save to `{{
|
|
341
|
+
5. Save to `{{SPEC_DIR}}/specs/{{FEATURE_NAME}}/tasks.md`
|
|
342
342
|
|
|
343
343
|
## Validation Checklist
|
|
344
344
|
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"projectId": "{{PROJECT_ID}}",
|
|
3
|
-
"projectName": "{{PROJECT_NAME}}",
|
|
4
|
-
"language": "{{LANG_CODE}}",
|
|
5
|
-
"jiraProjectKey": "{{JIRA_KEY}}",
|
|
6
|
-
"jiraBaseUrl": "https://your-domain.atlassian.net",
|
|
7
|
-
"confluenceSpaceKey": "{{CONFLUENCE_SPACE}}",
|
|
8
|
-
"confluenceLabels": ["{{PROJECT_ID}}", "ai-development"],
|
|
9
|
-
"status": "active",
|
|
10
|
-
"team": [],
|
|
11
|
-
"stakeholders": [],
|
|
12
|
-
"repository": "{{REPO_URL}}",
|
|
13
|
-
"description": "{{PROJECT_DESCRIPTION}}",
|
|
14
|
-
"createdAt": "{{CREATED_DATE}}",
|
|
15
|
-
"metadata": {
|
|
16
|
-
"testStrategy": "master-test-approach",
|
|
17
|
-
"cicd": ["github-actions"],
|
|
18
|
-
"buildTool": "{{BUILD_TOOL}}",
|
|
19
|
-
"michiVersion": "{{MICHI_VERSION}}"
|
|
20
|
-
}
|
|
21
|
-
}
|