@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
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
# Codex CLI + Michi Integration Guide
|
|
2
|
-
|
|
3
|
-
## 🎉 Updated Integration with cc-sdd
|
|
4
|
-
|
|
5
|
-
**Good News!** Codex CLIは[cc-sdd](https://github.com/gotalab/cc-sdd)と統合することで、Michiワークフローを完全にサポートできるようになりました。
|
|
6
|
-
|
|
7
|
-
## Quick Start
|
|
8
|
-
|
|
9
|
-
### Step 1: Install cc-sdd (Required)
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npx cc-sdd@latest --codex --lang ja
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
**cc-sddがインストールするもの:**
|
|
16
|
-
- ✅ 11個の `/kiro:*` コマンド(`.codex/commands/`)
|
|
17
|
-
- ✅ `AGENTS.md`(`.codex/docs/`)
|
|
18
|
-
- ✅ `.kiro/` ディレクトリ構造
|
|
19
|
-
- ✅ Spec-Driven Development (SDD) ワークフロー
|
|
20
|
-
|
|
21
|
-
### Step 2: Install Michi Extensions (Automatic)
|
|
22
|
-
|
|
23
|
-
Michiのセットアップ時に自動的にインストールされます:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx @sk8metal/michi-cli setup-existing --codex --lang ja
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**Michi拡張がインストールするもの:**
|
|
30
|
-
- ✅ `/prompts:confluence-sync` コマンド(Confluence連携)
|
|
31
|
-
- ✅ `AGENTS.override.md`(Michi固有ルール)
|
|
32
|
-
- ✅ `.kiro/project.json`(プロジェクトメタデータ)
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Available Commands
|
|
37
|
-
|
|
38
|
-
### cc-sdd Commands (11 total)
|
|
39
|
-
|
|
40
|
-
| Command | Description |
|
|
41
|
-
|---------|-------------|
|
|
42
|
-
| `/kiro:steering` | プロジェクトメモリの生成・更新 |
|
|
43
|
-
| `/kiro:steering-custom` | ドメイン固有ステアリングファイル作成 |
|
|
44
|
-
| `/kiro:spec-init` | 新規仕様フォルダ初期化 |
|
|
45
|
-
| `/kiro:spec-requirements` | 要件定義書作成(EARS形式) |
|
|
46
|
-
| `/kiro:spec-design` | 設計ドキュメント作成 |
|
|
47
|
-
| `/kiro:spec-tasks` | タスク分割(並列実行可能) |
|
|
48
|
-
| `/kiro:spec-impl` | TDDベース実装 |
|
|
49
|
-
| `/kiro:spec-status` | ワークフロー進捗確認 |
|
|
50
|
-
| `/kiro:validate-gap` | 既存コードとのギャップ分析 |
|
|
51
|
-
| `/kiro:validate-design` | 設計レビュー |
|
|
52
|
-
| `/kiro:validate-impl` | 実装品質検証 |
|
|
53
|
-
|
|
54
|
-
### Michi Commands (1 total)
|
|
55
|
-
|
|
56
|
-
| Command | Description |
|
|
57
|
-
|---------|-------------|
|
|
58
|
-
| `/prompts:confluence-sync` | 仕様ドキュメントをConfluenceに同期 |
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Workflow Example
|
|
63
|
-
|
|
64
|
-
### 1. 初期化
|
|
65
|
-
```bash
|
|
66
|
-
/kiro:steering
|
|
67
|
-
```
|
|
68
|
-
→ プロジェクトメモリ(structure.md、tech.md、product.md)を生成
|
|
69
|
-
|
|
70
|
-
### 2. 仕様作成
|
|
71
|
-
```bash
|
|
72
|
-
/kiro:spec-init FEATURE=user-authentication
|
|
73
|
-
/kiro:spec-requirements FEATURE=user-authentication
|
|
74
|
-
/kiro:spec-design FEATURE=user-authentication
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### 3. Confluence同期 (Michi拡張)
|
|
78
|
-
```bash
|
|
79
|
-
/prompts:confluence-sync FEATURE=user-authentication
|
|
80
|
-
```
|
|
81
|
-
→ requirements.mdとdesign.mdをConfluenceページに変換
|
|
82
|
-
|
|
83
|
-
### 4. 実装
|
|
84
|
-
```bash
|
|
85
|
-
/kiro:spec-tasks FEATURE=user-authentication
|
|
86
|
-
/kiro:spec-impl FEATURE=user-authentication
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 5. 検証
|
|
90
|
-
```bash
|
|
91
|
-
/kiro:validate-impl FEATURE=user-authentication
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## Confluence Integration Setup
|
|
97
|
-
|
|
98
|
-
### 環境変数設定
|
|
99
|
-
`.env`ファイルに以下を追加:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
ATLASSIAN_URL=https://your-domain.atlassian.net
|
|
103
|
-
ATLASSIAN_EMAIL=your-email@example.com
|
|
104
|
-
ATLASSIAN_API_TOKEN=your-api-token
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### プロジェクトメタデータ設定
|
|
108
|
-
`.kiro/project.json`に以下を追加:
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"confluenceSpaceKey": "YOUR_SPACE",
|
|
113
|
-
"confluenceLabels": ["ai-development", "michi"]
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## File Structure
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
project/
|
|
123
|
-
├── .codex/
|
|
124
|
-
│ ├── commands/ # cc-sdd: /kiro:* commands
|
|
125
|
-
│ ├── docs/
|
|
126
|
-
│ │ └── AGENTS.md # cc-sdd: Base project context
|
|
127
|
-
│ └── prompts/ # Michi: /prompts:* commands
|
|
128
|
-
│ └── confluence-sync.md
|
|
129
|
-
├── .kiro/
|
|
130
|
-
│ ├── project.json # Michi: Project metadata
|
|
131
|
-
│ ├── specs/ # cc-sdd: Feature specifications
|
|
132
|
-
│ │ └── {feature}/
|
|
133
|
-
│ │ ├── requirements.md
|
|
134
|
-
│ │ ├── design.md
|
|
135
|
-
│ │ ├── tasks.md
|
|
136
|
-
│ │ └── spec.json
|
|
137
|
-
│ ├── steering/ # cc-sdd: AI guidance documents
|
|
138
|
-
│ │ ├── structure.md
|
|
139
|
-
│ │ ├── tech.md
|
|
140
|
-
│ │ └── product.md
|
|
141
|
-
│ └── settings/ # cc-sdd: Templates and rules
|
|
142
|
-
└── AGENTS.override.md # Michi: Project-specific rules
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## Project Metadata
|
|
148
|
-
|
|
149
|
-
Reference `.kiro/project.json` for project information:
|
|
150
|
-
|
|
151
|
-
- **Project ID**: {{PROJECT_ID}}
|
|
152
|
-
- **Language**: {{LANG_CODE}}
|
|
153
|
-
- **JIRA Key**: (from project.json)
|
|
154
|
-
- **Confluence Space**: (from project.json)
|
|
155
|
-
- **Confluence Labels**: (from project.json)
|
|
156
|
-
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
## Michi-Specific Features
|
|
160
|
-
|
|
161
|
-
### 1. Multi-Language Support
|
|
162
|
-
- Node.js/TypeScript (npm)
|
|
163
|
-
- Java (Gradle only)
|
|
164
|
-
- PHP (Composer)
|
|
165
|
-
|
|
166
|
-
### 2. Master Test Approach
|
|
167
|
-
- 常に最新の仕様を反映(履歴管理なし)
|
|
168
|
-
- Phase A: Auto (unit, lint, build)
|
|
169
|
-
- Phase B: Manual (integration, e2e, performance, security)
|
|
170
|
-
|
|
171
|
-
### 3. CI/CD Integration
|
|
172
|
-
- GitHub Actions
|
|
173
|
-
- Screwdriver
|
|
174
|
-
|
|
175
|
-
### 4. Release Flow
|
|
176
|
-
- セマンティックバージョニング(v<major>.<minor>.<patch>)
|
|
177
|
-
- Confluence手順書
|
|
178
|
-
- JIRA Release管理
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
## Troubleshooting
|
|
183
|
-
|
|
184
|
-
### Q1: cc-sddコマンドが見つからない
|
|
185
|
-
```bash
|
|
186
|
-
# 再インストール
|
|
187
|
-
npx cc-sdd@latest --codex --lang ja
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### Q2: Confluence同期が失敗する
|
|
191
|
-
```bash
|
|
192
|
-
# 環境変数を確認
|
|
193
|
-
cat .env | grep ATLASSIAN
|
|
194
|
-
|
|
195
|
-
# 接続テスト
|
|
196
|
-
curl -u "$ATLASSIAN_EMAIL:$ATLASSIAN_API_TOKEN" \
|
|
197
|
-
"$ATLASSIAN_URL/wiki/rest/api/content"
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Q3: AGENTS.override.mdが反映されない
|
|
201
|
-
Codex CLIは`AGENTS.md`と`AGENTS.override.md`を自動的にマージします。プロジェクトルートに配置されていることを確認してください。
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## Learn More
|
|
206
|
-
|
|
207
|
-
- **cc-sdd**: https://github.com/gotalab/cc-sdd
|
|
208
|
-
- **Michi Documentation**: https://github.com/sk8metalme/michi
|
|
209
|
-
- **Codex CLI**: https://developers.openai.com/codex/cli
|
|
210
|
-
- **Confluence API**: https://developer.atlassian.com/cloud/confluence/rest/v2/
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
# kiro:spec-impl - Spec Implementation Command
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
This command implements the specifications defined in `tasks.md` following TDD (Test-Driven Development) practices with automatic JIRA integration.
|
|
6
|
-
|
|
7
|
-
**Key Features:**
|
|
8
|
-
|
|
9
|
-
- Automatic JIRA info detection from `spec.json`
|
|
10
|
-
- Updates both Epic AND first Story status
|
|
11
|
-
- Creates PR and adds JIRA comments automatically
|
|
12
|
-
|
|
13
|
-
## Arguments
|
|
14
|
-
|
|
15
|
-
- `$ARGUMENTS`: Feature name (e.g., "user-auth")
|
|
16
|
-
|
|
17
|
-
**Note:** JIRA ticket keys are automatically detected from `.kiro/specs/{feature}/spec.json`. No need to specify them manually.
|
|
18
|
-
|
|
19
|
-
## Pre-requisites
|
|
20
|
-
|
|
21
|
-
1. `.kiro/specs/{feature}/tasks.md` must exist
|
|
22
|
-
2. `.kiro/specs/{feature}/spec.json` must contain JIRA info (run `michi jira:sync` first)
|
|
23
|
-
3. Environment variables must be configured:
|
|
24
|
-
- `ATLASSIAN_URL`: JIRA instance URL
|
|
25
|
-
- `ATLASSIAN_EMAIL`: JIRA user email
|
|
26
|
-
- `ATLASSIAN_API_TOKEN`: JIRA API token
|
|
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 `.kiro/project.json`
|
|
29
|
-
|
|
30
|
-
## Execution Flow
|
|
31
|
-
|
|
32
|
-
### 1. Parse Arguments
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
Input: $ARGUMENTS
|
|
36
|
-
Expected format: "<feature-name>"
|
|
37
|
-
Example: "user-auth"
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Extract:
|
|
41
|
-
|
|
42
|
-
- `FEATURE_NAME`: Feature name from arguments
|
|
43
|
-
|
|
44
|
-
### 2. JIRA Info Detection (Automatic)
|
|
45
|
-
|
|
46
|
-
Read JIRA information from `.kiro/specs/$FEATURE_NAME/spec.json`:
|
|
47
|
-
|
|
48
|
-
```json
|
|
49
|
-
{
|
|
50
|
-
"jira": {
|
|
51
|
-
"epicKey": "PROJ-123",
|
|
52
|
-
"storyKeys": ["PROJ-124", "PROJ-125"],
|
|
53
|
-
"epicUrl": "https://..."
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**If JIRA info is missing:**
|
|
59
|
-
|
|
60
|
-
- Ask user: "JIRA info not found. Skip JIRA integration? (y/n)"
|
|
61
|
-
- If yes: Continue without JIRA integration
|
|
62
|
-
- If no: Stop and suggest running `michi jira:sync $FEATURE_NAME` first
|
|
63
|
-
|
|
64
|
-
### 3. Start Processing (JIRA Status Update)
|
|
65
|
-
|
|
66
|
-
**Automatically move Epic AND first Story to "In Progress":**
|
|
67
|
-
|
|
68
|
-
This is handled internally. The workflow will:
|
|
69
|
-
|
|
70
|
-
1. Transition Epic to "In Progress"
|
|
71
|
-
2. Transition first Story to "In Progress"
|
|
72
|
-
|
|
73
|
-
### 4. Implementation Phase (TDD)
|
|
74
|
-
|
|
75
|
-
Read the tasks from `.kiro/specs/$FEATURE_NAME/tasks.md` and implement each Story following TDD:
|
|
76
|
-
|
|
77
|
-
For each Story in tasks.md:
|
|
78
|
-
|
|
79
|
-
1. **Read Story Requirements**
|
|
80
|
-
- Parse the Story section from tasks.md
|
|
81
|
-
- Identify acceptance criteria and subtasks
|
|
82
|
-
|
|
83
|
-
2. **Write Tests First (Red)**
|
|
84
|
-
- Create test files based on acceptance criteria
|
|
85
|
-
- Run tests to verify they fail
|
|
86
|
-
|
|
87
|
-
3. **Implement Code (Green)**
|
|
88
|
-
- Write minimal code to pass tests
|
|
89
|
-
- Follow the existing code patterns in the project
|
|
90
|
-
|
|
91
|
-
4. **Refactor (Blue)**
|
|
92
|
-
- Clean up code while keeping tests green
|
|
93
|
-
- Apply project coding standards
|
|
94
|
-
|
|
95
|
-
5. **Commit Changes**
|
|
96
|
-
- Create atomic commits for each Story
|
|
97
|
-
- Use conventional commit format: `feat($FEATURE_NAME): Story title`
|
|
98
|
-
|
|
99
|
-
### 5. Code Review Phase (Automatic)
|
|
100
|
-
|
|
101
|
-
**Automatically review the implemented code:**
|
|
102
|
-
|
|
103
|
-
For each Story implementation:
|
|
104
|
-
|
|
105
|
-
1. **Code Review (/review)**
|
|
106
|
-
- Execute `/review` command automatically
|
|
107
|
-
- Analyze the implementation for code quality issues
|
|
108
|
-
- Check for best practices and potential bugs
|
|
109
|
-
|
|
110
|
-
2. **Fix Issues if Found**
|
|
111
|
-
- If review identifies issues, automatically fix them
|
|
112
|
-
- Commit the fixes
|
|
113
|
-
- Re-run `/review` to verify fixes
|
|
114
|
-
- Repeat until `/review` passes without critical issues
|
|
115
|
-
|
|
116
|
-
3. **Security Review (/security-review)**
|
|
117
|
-
- Execute `/security-review` command automatically
|
|
118
|
-
- Scan for security vulnerabilities
|
|
119
|
-
- Check for common security issues (SQL injection, XSS, etc.)
|
|
120
|
-
|
|
121
|
-
4. **Fix Security Issues if Found**
|
|
122
|
-
- If security issues are identified, automatically fix them
|
|
123
|
-
- Commit the security fixes
|
|
124
|
-
- Re-run `/security-review` to verify fixes
|
|
125
|
-
- Repeat until `/security-review` passes without critical issues
|
|
126
|
-
|
|
127
|
-
**Review Loop:**
|
|
128
|
-
- Maximum iterations: 3 per review type
|
|
129
|
-
- If issues persist after 3 iterations, report to user and ask for manual intervention
|
|
130
|
-
|
|
131
|
-
### 6. PR Creation Confirmation
|
|
132
|
-
|
|
133
|
-
**Ask user before creating PR:**
|
|
134
|
-
|
|
135
|
-
After all reviews pass successfully, ask the user:
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
✅ All reviews completed successfully!
|
|
139
|
-
- Code Review: PASSED
|
|
140
|
-
- Security Review: PASSED
|
|
141
|
-
|
|
142
|
-
Would you like to create a Pull Request now? (y/n)
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
- **If yes**: Proceed to End Processing (Step 7)
|
|
146
|
-
- **If no**: Stop workflow, save current state
|
|
147
|
-
- User can manually create PR later using:
|
|
148
|
-
- `jj git push --bookmark <branch-name>`
|
|
149
|
-
- `gh pr create --head <branch-name> --base main`
|
|
150
|
-
|
|
151
|
-
### 7. End Processing (PR Creation & JIRA Update)
|
|
152
|
-
|
|
153
|
-
**Automatically complete the workflow:**
|
|
154
|
-
|
|
155
|
-
This is handled internally. The workflow will:
|
|
156
|
-
|
|
157
|
-
1. Push the branch to remote
|
|
158
|
-
2. Create a Pull Request on GitHub
|
|
159
|
-
3. Move Epic AND first Story to "Ready for Review"
|
|
160
|
-
4. Add PR link as a comment on the Epic
|
|
161
|
-
|
|
162
|
-
## Usage Examples
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
/kiro:spec-impl user-auth
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
```
|
|
169
|
-
/kiro:spec-impl payment-gateway
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Workflow Comparison
|
|
173
|
-
|
|
174
|
-
### Before (3 steps with manual JIRA keys)
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
michi spec-impl:start user-auth PROJ-123
|
|
178
|
-
/kiro:spec-impl user-auth PROJ-123
|
|
179
|
-
michi spec-impl:complete user-auth PROJ-123
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### After (1 command with auto-detection)
|
|
183
|
-
|
|
184
|
-
```
|
|
185
|
-
/kiro:spec-impl user-auth
|
|
186
|
-
# JIRA info auto-detected from spec.json
|
|
187
|
-
# Epic + first Story -> "In Progress"
|
|
188
|
-
# TDD implementation
|
|
189
|
-
# Automatic code review (/review)
|
|
190
|
-
# - Fix issues if found
|
|
191
|
-
# - Re-review until passed
|
|
192
|
-
# Automatic security review (/security-review)
|
|
193
|
-
# - Fix security issues if found
|
|
194
|
-
# - Re-review until passed
|
|
195
|
-
# Ask user: "Create PR now? (y/n)"
|
|
196
|
-
# - If yes:
|
|
197
|
-
# - PR creation
|
|
198
|
-
# - Epic + first Story -> "Ready for Review"
|
|
199
|
-
# - PR link commented on JIRA
|
|
200
|
-
# - If no:
|
|
201
|
-
# - Save state, exit workflow
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
## JIRA Status Mapping
|
|
205
|
-
|
|
206
|
-
Default status names (customizable in `.michi/config.json`):
|
|
207
|
-
|
|
208
|
-
| Phase | Default Status | Targets |
|
|
209
|
-
| ----- | ---------------- | ------------------ |
|
|
210
|
-
| Start | In Progress | Epic + First Story |
|
|
211
|
-
| End | Ready for Review | Epic + First Story |
|
|
212
|
-
|
|
213
|
-
To customize, add to `.michi/config.json`:
|
|
214
|
-
|
|
215
|
-
```json
|
|
216
|
-
{
|
|
217
|
-
"jira": {
|
|
218
|
-
"statusMapping": {
|
|
219
|
-
"inProgress": "In Progress",
|
|
220
|
-
"readyForReview": "Ready for Review"
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
## Error Handling
|
|
227
|
-
|
|
228
|
-
- **JIRA info not found**: Interactive prompt to skip JIRA integration
|
|
229
|
-
- **JIRA transition fails**: Check available transitions for the current status
|
|
230
|
-
- **Review fails (max iterations exceeded)**: Report issues to user and ask for manual intervention
|
|
231
|
-
- **Security review fails (max iterations exceeded)**: Report vulnerabilities to user and ask for manual intervention
|
|
232
|
-
- **User declines PR creation**: Save current state, workflow stops (user can create PR manually later)
|
|
233
|
-
- **PR creation fails**: Ensure the branch is pushed to remote
|
|
234
|
-
- **JIRA comment fails**: The PR URL is still returned for manual update
|
|
235
|
-
|
|
236
|
-
## Notes
|
|
237
|
-
|
|
238
|
-
- JIRA info is automatically detected from `spec.json` (populated by `michi jira:sync`)
|
|
239
|
-
- Both Epic AND first Story are updated together
|
|
240
|
-
- The branch name defaults to `feature/{feature-name}`
|
|
241
|
-
- Individual JIRA operations can still be done via `michi jira:transition` and `michi jira:comment`
|
|
242
|
-
- Code reviews (`/review` and `/security-review`) are executed automatically after implementation
|
|
243
|
-
- Review loop has a maximum of 3 iterations per review type to prevent infinite loops
|
|
244
|
-
- User can decline PR creation and manually create it later if needed
|