@sk8metal/michi-cli 0.11.0 → 0.13.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +3 -10
  3. package/dist/scripts/constants/environments.d.ts +1 -1
  4. package/dist/scripts/constants/environments.d.ts.map +1 -1
  5. package/dist/scripts/constants/environments.js +0 -20
  6. package/dist/scripts/constants/environments.js.map +1 -1
  7. package/dist/scripts/jira-sync.d.ts.map +1 -1
  8. package/dist/scripts/jira-sync.js +32 -2
  9. package/dist/scripts/jira-sync.js.map +1 -1
  10. package/dist/scripts/utils/template-finder.d.ts +2 -2
  11. package/dist/scripts/utils/template-finder.d.ts.map +1 -1
  12. package/dist/scripts/utils/template-finder.js +3 -8
  13. package/dist/scripts/utils/template-finder.js.map +1 -1
  14. package/dist/src/cli.d.ts.map +1 -1
  15. package/dist/src/cli.js +0 -8
  16. package/dist/src/cli.js.map +1 -1
  17. package/dist/src/commands/init.d.ts +0 -4
  18. package/dist/src/commands/init.d.ts.map +1 -1
  19. package/dist/src/commands/init.js +6 -30
  20. package/dist/src/commands/init.js.map +1 -1
  21. package/dist/src/commands/setup-existing.d.ts +2 -6
  22. package/dist/src/commands/setup-existing.d.ts.map +1 -1
  23. package/dist/src/commands/setup-existing.js +8 -142
  24. package/dist/src/commands/setup-existing.js.map +1 -1
  25. package/docs/getting-started/configuration.md +0 -29
  26. package/docs/getting-started/quick-start.md +2 -2
  27. package/docs/guides/atlassian-integration.md +27 -0
  28. package/docs/guides/workflow.md +1 -1
  29. package/docs/reference/cli.md +0 -4
  30. package/docs/troubleshooting.md +0 -45
  31. package/package.json +1 -3
  32. package/scripts/__tests__/create-project.test.ts +12 -12
  33. package/scripts/__tests__/setup-existing-project.test.ts +22 -22
  34. package/scripts/constants/__tests__/environments.test.ts +7 -50
  35. package/scripts/constants/environments.ts +1 -27
  36. package/scripts/jira-sync.ts +36 -2
  37. package/scripts/template/__tests__/renderer.test.ts +21 -21
  38. package/scripts/utils/template-finder.ts +5 -11
  39. package/docs/guides/ai-tools.md +0 -311
  40. package/templates/cline/rules/atlassian-integration.md +0 -36
  41. package/templates/cline/rules/michi-core.md +0 -56
  42. package/templates/codex/AGENTS.override.md +0 -277
  43. package/templates/codex/prompts/confluence-sync.md +0 -177
  44. package/templates/codex/rules/README.md +0 -210
  45. package/templates/cursor/commands/kiro/kiro-spec-impl.md +0 -244
  46. package/templates/cursor/commands/kiro/kiro-spec-tasks.md +0 -354
  47. package/templates/cursor/commands/michi/confluence-sync.md +0 -76
  48. package/templates/cursor/commands/michi/project-switch.md +0 -69
  49. package/templates/cursor/commands/michi/spec-tasks.md +0 -117
  50. package/templates/cursor/rules/atlassian-mcp.mdc +0 -188
  51. package/templates/cursor/rules/github-ssot.mdc +0 -151
  52. package/templates/cursor/rules/multi-project.mdc +0 -81
  53. package/templates/gemini/commands/README.md +0 -41
  54. package/templates/gemini/rules/GEMINI.md +0 -80
@@ -1,177 +0,0 @@
1
- ---
2
- description: Confluenceへのドキュメント同期 - Michi仕様書をConfluenceに連携
3
- argument-hint: [FEATURE=<機能名>]
4
- ---
5
- # Michi Confluence Sync
6
-
7
- 機能「$1」の仕様ドキュメントをConfluenceに同期します。
8
-
9
- ## 前提条件
10
-
11
- ### 環境変数の設定
12
- 以下の環境変数が必要です:
13
- ```bash
14
- ATLASSIAN_URL=https://your-domain.atlassian.net
15
- ATLASSIAN_EMAIL=your-email@example.com
16
- ATLASSIAN_API_TOKEN=your-api-token
17
- ```
18
-
19
- ### プロジェクトメタデータ
20
- `.kiro/project.json`に以下が設定されていること:
21
- - `confluenceSpaceKey`: Confluenceスペースキー
22
- - `confluenceLabels`: 自動付与するラベル
23
-
24
- ## 同期対象ファイル
25
-
26
- 以下のファイルをConfluenceページに変換して同期します:
27
-
28
- 1. **要件定義書**
29
- - ソース: `.kiro/specs/$1/requirements.md`
30
- - タイトル: `[$1] 要件定義`
31
-
32
- 2. **設計ドキュメント**
33
- - ソース: `.kiro/specs/$1/design.md`
34
- - タイトル: `[$1] 設計書`
35
-
36
- 3. **タスク一覧**(オプション)
37
- - ソース: `.kiro/specs/$1/tasks.md`
38
- - タイトル: `[$1] タスク管理`
39
-
40
- ## 実行手順
41
-
42
- ### 1. 環境変数の確認
43
- ```typescript
44
- // 必要な環境変数をチェック
45
- const requiredEnvVars = [
46
- 'ATLASSIAN_URL',
47
- 'ATLASSIAN_EMAIL',
48
- 'ATLASSIAN_API_TOKEN'
49
- ];
50
-
51
- for (const envVar of requiredEnvVars) {
52
- if (!process.env[envVar]) {
53
- console.error(`❌ ${envVar} が設定されていません`);
54
- process.exit(1);
55
- }
56
- }
57
- ```
58
-
59
- ### 2. プロジェクトメタデータの読み込み
60
- ```typescript
61
- import { readFileSync } from 'fs';
62
-
63
- const projectMeta = JSON.parse(
64
- readFileSync('.kiro/project.json', 'utf-8')
65
- );
66
-
67
- const spaceKey = projectMeta.confluenceSpaceKey;
68
- const labels = projectMeta.confluenceLabels || [];
69
- ```
70
-
71
- ### 3. Confluence APIクライアントの初期化
72
- ```typescript
73
- import { ConfluenceClient } from '../path/to/confluence-client';
74
-
75
- const confluence = new ConfluenceClient({
76
- url: process.env.ATLASSIAN_URL!,
77
- email: process.env.ATLASSIAN_EMAIL!,
78
- apiToken: process.env.ATLASSIAN_API_TOKEN!
79
- });
80
- ```
81
-
82
- ### 4. Markdownファイルの読み込みと変換
83
- ```typescript
84
- const requirements = readFileSync(
85
- `.kiro/specs/$1/requirements.md`,
86
- 'utf-8'
87
- );
88
-
89
- // Markdown → Confluence Storage Format変換
90
- const confluenceHtml = convertMarkdownToConfluence(requirements);
91
- ```
92
-
93
- ### 5. ページの作成または更新
94
- ```typescript
95
- // 既存ページの検索
96
- const existingPage = await confluence.findPageByTitle(
97
- spaceKey,
98
- `[$1] 要件定義`
99
- );
100
-
101
- if (existingPage) {
102
- // 更新
103
- await confluence.updatePage(existingPage.id, {
104
- title: `[$1] 要件定義`,
105
- body: confluenceHtml,
106
- version: existingPage.version + 1
107
- });
108
- console.log('✅ ページを更新しました');
109
- } else {
110
- // 新規作成
111
- const newPage = await confluence.createPage({
112
- spaceKey,
113
- title: `[$1] 要件定義`,
114
- body: confluenceHtml,
115
- labels
116
- });
117
- console.log('✅ ページを作成しました:', newPage.url);
118
- }
119
- ```
120
-
121
- ### 6. 同期結果の報告
122
- ```typescript
123
- console.log('\n📊 Confluence同期結果:');
124
- console.log(` 機能: $1`);
125
- console.log(` スペース: ${spaceKey}`);
126
- console.log(` 同期ファイル数: 2`);
127
- console.log(` ラベル: ${labels.join(', ')}`);
128
- ```
129
-
130
- ## エラーハンドリング
131
-
132
- ### 認証エラー
133
- ```
134
- ❌ Confluence API認証失敗
135
- - ATLASSIAN_URLが正しいか確認
136
- - API Tokenが有効か確認
137
- - メールアドレスが正しいか確認
138
- ```
139
-
140
- ### スペースが見つからない
141
- ```
142
- ❌ Confluenceスペースが見つかりません
143
- - .kiro/project.jsonのconfluenceSpaceKeyを確認
144
- - スペースへのアクセス権限を確認
145
- ```
146
-
147
- ### ページ作成失敗
148
- ```
149
- ❌ ページ作成に失敗しました
150
- - スペースへの書き込み権限を確認
151
- - タイトルの重複がないか確認
152
- ```
153
-
154
- ## Markdown変換の注意点
155
-
156
- Confluenceは独自のStorage Format(XHTML)を使用するため、以下に注意:
157
-
158
- - **コードブロック**: \`\`\`言語 → `<ac:structured-macro ac:name="code">`
159
- - **表**: GitHub Markdown → Confluence Table
160
- - **画像**: 相対パス → Confluence添付ファイル
161
- - **リンク**: 他の.mdファイル → Confluenceページリンク
162
-
163
- ## 参考リソース
164
-
165
- - [Confluence REST API ドキュメント](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/)
166
- - [Storage Format仕様](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html)
167
- - Michiの`scripts/utils/confluence-client.ts`実装を参照
168
-
169
- ## 使用例
170
-
171
- ```bash
172
- # Codex CLIから実行
173
- /prompts:confluence-sync FEATURE=user-authentication
174
-
175
- # 複数ファイルを一括同期(カスタムスクリプト)
176
- node scripts/sync-all-specs-to-confluence.js
177
- ```
@@ -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
- | `/michi: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
- /michi: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