@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.
Files changed (139) hide show
  1. package/README.md +71 -848
  2. package/dist/scripts/constants/environments.d.ts +1 -1
  3. package/dist/scripts/constants/environments.d.ts.map +1 -1
  4. package/dist/scripts/constants/environments.js +0 -20
  5. package/dist/scripts/constants/environments.js.map +1 -1
  6. package/dist/scripts/phase-runner.js +1 -1
  7. package/dist/scripts/phase-runner.js.map +1 -1
  8. package/dist/scripts/utils/multi-repo-validator.d.ts +18 -0
  9. package/dist/scripts/utils/multi-repo-validator.d.ts.map +1 -1
  10. package/dist/scripts/utils/multi-repo-validator.js +42 -0
  11. package/dist/scripts/utils/multi-repo-validator.js.map +1 -1
  12. package/dist/scripts/utils/tasks-format-validator.js +3 -3
  13. package/dist/scripts/utils/tasks-format-validator.js.map +1 -1
  14. package/dist/scripts/utils/template-finder.d.ts +2 -2
  15. package/dist/scripts/utils/template-finder.d.ts.map +1 -1
  16. package/dist/scripts/utils/template-finder.js +3 -8
  17. package/dist/scripts/utils/template-finder.js.map +1 -1
  18. package/dist/src/cli.d.ts.map +1 -1
  19. package/dist/src/cli.js +0 -8
  20. package/dist/src/cli.js.map +1 -1
  21. package/dist/src/commands/init.d.ts +0 -4
  22. package/dist/src/commands/init.d.ts.map +1 -1
  23. package/dist/src/commands/init.js +6 -30
  24. package/dist/src/commands/init.js.map +1 -1
  25. package/dist/src/commands/setup-existing.d.ts +2 -6
  26. package/dist/src/commands/setup-existing.d.ts.map +1 -1
  27. package/dist/src/commands/setup-existing.js +8 -142
  28. package/dist/src/commands/setup-existing.js.map +1 -1
  29. package/docs/README.md +20 -83
  30. package/docs/getting-started/configuration.md +350 -0
  31. package/docs/getting-started/installation.md +59 -0
  32. package/docs/getting-started/quick-start.md +76 -0
  33. package/docs/guides/atlassian-integration.md +116 -0
  34. package/docs/guides/claude-code.md +155 -0
  35. package/docs/guides/multi-repo.md +117 -0
  36. package/docs/guides/workflow.md +382 -0
  37. package/docs/reference/ai-commands.md +92 -0
  38. package/docs/reference/cli.md +752 -0
  39. package/docs/reference/environment-variables.md +192 -0
  40. package/docs/troubleshooting.md +498 -0
  41. package/package.json +1 -3
  42. package/scripts/__tests__/create-project.test.ts +12 -12
  43. package/scripts/__tests__/setup-existing-project.test.ts +22 -22
  44. package/scripts/constants/__tests__/environments.test.ts +7 -50
  45. package/scripts/constants/environments.ts +1 -27
  46. package/scripts/phase-runner.ts +1 -1
  47. package/scripts/template/__tests__/renderer.test.ts +21 -21
  48. package/scripts/utils/__tests__/multi-repo-validator.test.ts +159 -1
  49. package/scripts/utils/multi-repo-validator.ts +50 -0
  50. package/scripts/utils/tasks-format-validator.ts +3 -3
  51. package/scripts/utils/template-finder.ts +5 -11
  52. package/templates/claude/agents/e2e-first-planner/AGENT.md +1 -1
  53. package/templates/claude/agents/pr-resolver/AGENT.md +15 -3
  54. package/templates/claude/commands/michi/e2e-plan.md +1 -1
  55. package/templates/claude/commands/michi/spec-design.md +2 -2
  56. package/templates/claude/commands/michi/spec-tasks.md +156 -0
  57. package/templates/claude/commands/michi/test-planning.md +1 -1
  58. package/templates/claude/commands/michi/validate-design.md +3 -3
  59. package/templates/claude/commands/michi-multi-repo/impl-all.md +30 -1
  60. package/templates/claude/commands/michi-multi-repo/propagate-specs.md +14 -1
  61. package/templates/claude/commands/michi-multi-repo/spec-review.md +16 -2
  62. package/templates/claude-agent/agents/repo-spec-executor.md +1 -1
  63. package/templates/claude-agent/commands/michi/spec-tasks.md +117 -0
  64. package/templates/claude-agent/rules/code-size-monitor.md +26 -0
  65. package/templates/claude-agent/rules/code-size-rules.md +32 -0
  66. package/templates/michi/cc-sdd-overrides/settings/rules/design-review-michi.md +1 -1
  67. package/docs/context.md +0 -59
  68. package/docs/michi-development/contributing/development.md +0 -341
  69. package/docs/michi-development/contributing/release.md +0 -365
  70. package/docs/michi-development/design/config-unification.md +0 -733
  71. package/docs/michi-development/design/design-config-current-state.md +0 -330
  72. package/docs/michi-development/design/design-config-implementation.md +0 -628
  73. package/docs/michi-development/design/design-config-migration.md +0 -952
  74. package/docs/michi-development/design/design-config-security.md +0 -771
  75. package/docs/michi-development/design/design-config-solution.md +0 -583
  76. package/docs/michi-development/design/design-config-testing.md +0 -892
  77. package/docs/michi-development/testing/manual-verification-flow.md +0 -871
  78. package/docs/michi-development/testing/manual-verification-other-tools.md +0 -1279
  79. package/docs/michi-development/testing/manual-verification-troubleshooting.md +0 -122
  80. package/docs/michi-development/testing/pre-publish-checklist.md +0 -560
  81. package/docs/michi-development/testing-strategy.md +0 -87
  82. package/docs/plan.md +0 -275
  83. package/docs/user-guide/getting-started/github-token-setup.md +0 -510
  84. package/docs/user-guide/getting-started/new-repository-setup.md +0 -704
  85. package/docs/user-guide/getting-started/quick-start.md +0 -212
  86. package/docs/user-guide/getting-started/setup.md +0 -819
  87. package/docs/user-guide/guides/agent-skills-integration.md +0 -222
  88. package/docs/user-guide/guides/customization.md +0 -537
  89. package/docs/user-guide/guides/internationalization.md +0 -540
  90. package/docs/user-guide/guides/migration-guide.md +0 -138
  91. package/docs/user-guide/guides/multi-project.md +0 -368
  92. package/docs/user-guide/guides/multi-repo-guide.md +0 -1590
  93. package/docs/user-guide/guides/phase-automation.md +0 -419
  94. package/docs/user-guide/guides/workflow.md +0 -574
  95. package/docs/user-guide/hands-on/README.md +0 -142
  96. package/docs/user-guide/hands-on/claude-agent-setup.md +0 -597
  97. package/docs/user-guide/hands-on/claude-setup.md +0 -452
  98. package/docs/user-guide/hands-on/cursor-setup.md +0 -353
  99. package/docs/user-guide/hands-on/troubleshooting.md +0 -964
  100. package/docs/user-guide/hands-on/verification-checklist.md +0 -439
  101. package/docs/user-guide/hands-on/workflow-walkthrough.md +0 -1078
  102. package/docs/user-guide/reference/config.md +0 -589
  103. package/docs/user-guide/reference/multi-repo-api.md +0 -771
  104. package/docs/user-guide/reference/quick-reference.md +0 -297
  105. package/docs/user-guide/reference/security-test-payloads.md +0 -50
  106. package/docs/user-guide/reference/tasks-template.md +0 -550
  107. package/docs/user-guide/release/ci-setup-java.md +0 -114
  108. package/docs/user-guide/release/ci-setup-nodejs.md +0 -94
  109. package/docs/user-guide/release/ci-setup-php.md +0 -102
  110. package/docs/user-guide/release/ci-setup-troubleshooting.md +0 -94
  111. package/docs/user-guide/release/ci-setup.md +0 -188
  112. package/docs/user-guide/release/release-flow.md +0 -476
  113. package/docs/user-guide/templates/test-specs/README.md +0 -173
  114. package/docs/user-guide/templates/test-specs/e2e-test-spec-template.md +0 -553
  115. package/docs/user-guide/templates/test-specs/integration-test-spec-template.md +0 -435
  116. package/docs/user-guide/templates/test-specs/performance-test-spec-template.md +0 -454
  117. package/docs/user-guide/templates/test-specs/security-test-spec-template.md +0 -625
  118. package/docs/user-guide/templates/test-specs/unit-test-spec-template.md +0 -328
  119. package/docs/user-guide/testing/integration-tests.md +0 -312
  120. package/docs/user-guide/testing/tdd-cycle.md +0 -349
  121. package/docs/user-guide/testing/test-execution-flow.md +0 -396
  122. package/docs/user-guide/testing/test-failure-handling.md +0 -521
  123. package/docs/user-guide/testing/test-planning-flow.md +0 -185
  124. package/docs/user-guide/testing-strategy.md +0 -185
  125. package/docs/verification-guide.md +0 -518
  126. package/templates/cline/rules/atlassian-integration.md +0 -36
  127. package/templates/cline/rules/michi-core.md +0 -56
  128. package/templates/codex/AGENTS.override.md +0 -277
  129. package/templates/codex/prompts/confluence-sync.md +0 -177
  130. package/templates/codex/rules/README.md +0 -210
  131. package/templates/cursor/commands/kiro/kiro-spec-impl.md +0 -244
  132. package/templates/cursor/commands/kiro/kiro-spec-tasks.md +0 -354
  133. package/templates/cursor/commands/michi/confluence-sync.md +0 -76
  134. package/templates/cursor/commands/michi/project-switch.md +0 -69
  135. package/templates/cursor/rules/atlassian-mcp.mdc +0 -188
  136. package/templates/cursor/rules/github-ssot.mdc +0 -151
  137. package/templates/cursor/rules/multi-project.mdc +0 -81
  138. package/templates/gemini/commands/README.md +0 -41
  139. package/templates/gemini/rules/GEMINI.md +0 -80
@@ -1,354 +0,0 @@
1
- ---
2
- name: /kiro:spec-tasks
3
- description: Generate tasks.md from design specification in Michi workflow format
4
- ---
5
-
6
- # Generate Tasks from Design Specification
7
-
8
- **Important**: Generate output in the language specified in `{{KIRO_DIR}}/project.json`.
9
-
10
- ## Overview
11
-
12
- This command generates a detailed task breakdown (`tasks.md`) from the design specification (`design.md`) following the **Michi Workflow Format**.
13
-
14
- **Critical**: The generated tasks.md MUST follow the Michi Phase structure (Phase 0.1-5, A, B) with Story headers. DO NOT generate AI-DLC checkbox format (`- [ ] 1.`, `- [ ] 1.1`).
15
-
16
- ## Usage
17
-
18
- ```
19
- /kiro:spec-tasks
20
- ```
21
-
22
- ## Input Files
23
-
24
- 1. `{{KIRO_DIR}}/specs/{{FEATURE_NAME}}/design.md` - Design specification
25
- 2. `{{KIRO_DIR}}/specs/{{FEATURE_NAME}}/requirements.md` - Requirements specification
26
- 3. `{{KIRO_DIR}}/project.json` - Project metadata
27
-
28
- ## Output File
29
-
30
- `{{KIRO_DIR}}/specs/{{FEATURE_NAME}}/tasks.md`
31
-
32
- ## Required Format: Michi Workflow Structure
33
-
34
- ### Header Section
35
-
36
- ```markdown
37
- # Task Breakdown: {{FEATURE_NAME}}
38
-
39
- ## Project Information
40
-
41
- - **Feature Name**: {{FEATURE_NAME}}
42
- - **Start Date**: YYYY-MM-DD (Day of week) Day 1
43
- - **End Date**: YYYY-MM-DD (Day of week)
44
- - **Total Business Days**: X business days (excluding weekends)
45
- - **Total Effort Estimate**: X person-days
46
- - **Holidays**: Excludes Saturdays and Sundays
47
- - **Note**: This task breakdown is calculated in business days (excluding weekends and holidays)
48
- ```
49
-
50
- ### Phase Structure (Required)
51
-
52
- The tasks.md MUST include these phases in order:
53
-
54
- 1. **Phase 0.1: Requirements**
55
- 2. **Phase 0.2: Design**
56
- 3. **Phase 0.3: Test Type Selection** (optional)
57
- 4. **Phase 0.4: Test Specification** (optional)
58
- 5. **Phase 1: Environment Setup** (optional)
59
- 6. **Phase 2: TDD Implementation** (required - main development phase)
60
- 7. **Phase A: PR Pre-merge Tests** (optional - CI/CD automated)
61
- 8. **Phase 3: Additional QA** (optional)
62
- 9. **Phase B: Release Preparation Tests** (optional)
63
- 10. **Phase 4: Release Preparation**
64
- 11. **Phase 5: Release**
65
-
66
- ### Phase Header Format
67
-
68
- Each phase MUST use this header format:
69
-
70
- ```markdown
71
- ## Phase X.Y: Phase Name (Label)
72
-
73
- **Period**: Day X-Y
74
- **Effort**: X person-days
75
- **Status**: Not Started
76
- ```
77
-
78
- ### Story Header Format
79
-
80
- Each story within a phase MUST use this format:
81
-
82
- ```markdown
83
- ### Story X.Y.Z: Story Title
84
-
85
- - **Assignee**: @Role
86
- - **Effort**: X person-days
87
- - **Description**: What this story accomplishes
88
- - **Deliverables**:
89
- - Deliverable 1
90
- - Deliverable 2
91
- - **Acceptance Criteria**:
92
- - [ ] Criterion 1
93
- - [ ] Criterion 2
94
- - **Tasks**:
95
- - [ ] Task X.Y.Z.1: Task description
96
- - [ ] Task X.Y.Z.2: Task description
97
- - **Dependencies**: Story X.Y.W (if applicable)
98
- ```
99
-
100
- ## Detailed Phase Guidelines
101
-
102
- ### Phase 0.1: Requirements
103
-
104
- ```markdown
105
- ## Phase 0.1: Requirements (Requirements)
106
-
107
- **Period**: Day 1
108
- **Effort**: 0.5 person-days
109
- **Status**: Not Started
110
-
111
- ### Story 0.1.1: Requirements Document Creation
112
-
113
- - **Assignee**: @PM
114
- - **Effort**: 0.5 person-days
115
- - **Description**: Create feature requirements document
116
- - **Deliverables**:
117
- - `.kiro/specs/{{FEATURE_NAME}}/requirements.md`
118
- - Confluence page (Requirements)
119
- - **Acceptance Criteria**:
120
- - [ ] Functional requirements defined
121
- - [ ] Non-functional requirements defined
122
- - [ ] Use cases documented
123
- - [ ] PM approved
124
- ```
125
-
126
- ### Phase 0.2: Design
127
-
128
- ```markdown
129
- ## Phase 0.2: Design (Design)
130
-
131
- **Period**: Day 1-2
132
- **Effort**: 0.5-1.0 person-days
133
- **Status**: Not Started
134
-
135
- ### Story 0.2.1: Basic Design
136
-
137
- - **Assignee**: @Architect
138
- - **Effort**: 0.5-1.0 person-days
139
- - **Description**: Architecture design, API design, class design
140
- - **Deliverables**:
141
- - `.kiro/specs/{{FEATURE_NAME}}/design.md`
142
- - Confluence page (Design Document)
143
- - **Acceptance Criteria**:
144
- - [ ] System architecture diagram created
145
- - [ ] Layer structure defined
146
- - [ ] API specifications detailed
147
- - [ ] Class design completed
148
- - [ ] Architect approved
149
- ```
150
-
151
- ### Phase 2: TDD Implementation (Main Development)
152
-
153
- This is the most detailed phase. Break down into multiple stories based on the design.md:
154
-
155
- ```markdown
156
- ## Phase 2: TDD Implementation (Implementation)
157
-
158
- **Period**: Day X-Y
159
- **Effort**: X person-days
160
- **Status**: Not Started
161
-
162
- ### Story 2.1: Project Setup
163
-
164
- - **Assignee**: @Developer
165
- - **Effort**: 0.5 person-days
166
- - **Description**: Project setup and dependency configuration
167
- - **Tasks**:
168
- - [ ] Task 2.1.1: Create project
169
- - [ ] Task 2.1.2: Add dependencies
170
- - [ ] Task 2.1.3: Create configuration files
171
- - [ ] Task 2.1.4: Create package structure
172
- - [ ] Task 2.1.5: Verify build
173
- - **Deliverables**:
174
- - Project configuration files
175
- - Package structure
176
- - **Acceptance Criteria**:
177
- - [ ] Project builds successfully
178
- - [ ] Application starts
179
- - [ ] Package structure matches design
180
-
181
- ### Story 2.2: [Feature Component] Implementation
182
-
183
- - **Assignee**: @Developer
184
- - **Effort**: X person-days
185
- - **Description**: Implement [component] with TDD approach
186
- - **Tasks**:
187
- - [ ] Task 2.2.1: Write failing tests (RED)
188
- - [ ] Task 2.2.2: Implement minimum code (GREEN)
189
- - [ ] Task 2.2.3: Refactor (REFACTOR)
190
- - [ ] Task 2.2.4: Integration tests
191
- - **Acceptance Criteria**:
192
- - [ ] All unit tests pass
193
- - [ ] Code coverage >= 95%
194
- - [ ] Design patterns followed
195
-
196
- (Continue with Story 2.3, 2.4, etc. based on design.md components)
197
- ```
198
-
199
- ### Phase 4: Release Preparation
200
-
201
- ```markdown
202
- ## Phase 4: Release Preparation (Release Preparation)
203
-
204
- **Period**: Day Y-Z
205
- **Effort**: X person-days
206
- **Status**: Not Started
207
-
208
- ### Story 4.1: Production Environment Setup
209
-
210
- - **Assignee**: @InfraEngineer
211
- - **Effort**: X person-days
212
- - **Description**: Production infrastructure setup and configuration
213
- - **Acceptance Criteria**:
214
- - [ ] Server provisioned
215
- - [ ] Database configured
216
- - [ ] SSL certificate configured
217
- - [ ] Monitoring configured
218
-
219
- ### Story 4.2: Release Documentation
220
-
221
- - **Assignee**: @PM
222
- - **Effort**: X person-days
223
- - **Description**: Release notes, manual, operation procedures
224
- - **Acceptance Criteria**:
225
- - [ ] Release notes created
226
- - [ ] User manual created
227
- - [ ] Operation procedures created
228
- ```
229
-
230
- ### Phase 5: Release
231
-
232
- ```markdown
233
- ## Phase 5: Release (Release)
234
-
235
- **Period**: Day Z
236
- **Effort**: X person-days
237
- **Status**: Not Started
238
-
239
- ### Story 5.1: Staging Deployment
240
-
241
- - **Assignee**: @InfraEngineer
242
- - **Effort**: X person-days
243
- - **Description**: Deploy to staging and final verification
244
- - **Acceptance Criteria**:
245
- - [ ] Staging deployment successful
246
- - [ ] Smoke tests pass
247
- - [ ] Final verification completed
248
-
249
- ### Story 5.2: Production Release
250
-
251
- - **Assignee**: @InfraEngineer, @PM
252
- - **Effort**: X person-days
253
- - **Description**: Production release execution
254
- - **Acceptance Criteria**:
255
- - [ ] Production deployment successful
256
- - [ ] Smoke tests pass
257
- - [ ] Monitoring verified
258
- - [ ] Stakeholders notified
259
- ```
260
-
261
- ## Timeline Section
262
-
263
- Include a timeline at the end:
264
-
265
- ```markdown
266
- ## Timeline (Business Days)
267
-
268
- **Assumption**: Calculated in business days (excluding weekends)
269
-
270
- ### Week 1: Specification Phase
271
-
272
- Day 1 (Mon):
273
-
274
- - Story 0.1.1: Requirements Document Creation
275
- - Story 0.2.1: Basic Design (start)
276
-
277
- Day 2-3 (Tue-Wed):
278
-
279
- - Story 0.2.1: Basic Design (complete)
280
- - Technical review and PM approval
281
-
282
- ### Week 2-N: Implementation Phase
283
-
284
- (Continue based on project scope)
285
- ```
286
-
287
- ## Estimate Summary Section
288
-
289
- ```markdown
290
- ## Estimate Summary
291
-
292
- | Phase | Story Points | Effort (days) | Stories |
293
- | ---------------------------- | ------------ | ------------- | ------- |
294
- | Phase 0.1: Requirements | X SP | X days | X |
295
- | Phase 0.2: Design | X SP | X days | X |
296
- | Phase 2: TDD Implementation | X SP | X days | X |
297
- | Phase 4: Release Preparation | X SP | X days | X |
298
- | Phase 5: Release | X SP | X days | X |
299
- | **Total** | **X SP** | **X days** | **X** |
300
-
301
- **Conversion Rate**: 1 SP ≈ 0.5 person-days
302
- ```
303
-
304
- ## JIRA Labels Section
305
-
306
- ```markdown
307
- ## JIRA Labels
308
-
309
- Each story is automatically assigned the following labels:
310
-
311
- - `requirements` - Phase 0.1: Requirements
312
- - `design` - Phase 0.2: Design
313
- - `test-type-selection` - Phase 0.3: Test Type Selection
314
- - `test-spec` - Phase 0.4: Test Specification
315
- - `environment-setup` - Phase 1: Environment Setup
316
- - `implementation` / `tdd-implementation` - Phase 2: TDD Implementation
317
- - `phase-a` / `pr-tests` - Phase A: PR Pre-merge Tests
318
- - `additional-qa` / `testing` - Phase 3: Additional QA
319
- - `phase-b` / `release-tests` - Phase B: Release Preparation Tests
320
- - `release-prep` / `release-preparation` - Phase 4: Release Preparation
321
- - `release` - Phase 5: Release
322
- ```
323
-
324
- ## Important Notes
325
-
326
- 1. **DO NOT** use AI-DLC checkbox format (`- [ ] 1.`, `- [ ] 1.1`)
327
- 2. **MUST** use Phase headers (`## Phase X.Y:`)
328
- 3. **MUST** use Story headers (`### Story X.Y.Z:`)
329
- 4. **MUST** include day numbering (Day 1, Day 2, etc.)
330
- 5. **MUST** include effort estimates in person-days
331
- 6. **MUST** include acceptance criteria with checkboxes
332
- 7. Break down Phase 2 stories based on the components in design.md
333
- 8. Ensure each Story has clear dependencies documented
334
-
335
- ## Execution Steps
336
-
337
- 1. Read `{{KIRO_DIR}}/specs/{{FEATURE_NAME}}/design.md`
338
- 2. Read `{{KIRO_DIR}}/specs/{{FEATURE_NAME}}/requirements.md`
339
- 3. Analyze design components and create Story breakdown
340
- 4. Generate `tasks.md` following the Michi Workflow Format above
341
- 5. Save to `{{KIRO_DIR}}/specs/{{FEATURE_NAME}}/tasks.md`
342
-
343
- ## Validation Checklist
344
-
345
- Before finalizing, verify:
346
-
347
- - [ ] Phase headers exist (Phase 0.1, 0.2, 2, 4, 5 at minimum)
348
- - [ ] Story headers follow format (`### Story X.Y.Z:`)
349
- - [ ] Day numbering is present
350
- - [ ] Effort estimates are included
351
- - [ ] Acceptance criteria use checkboxes `- [ ]`
352
- - [ ] No AI-DLC format (`- [ ] 1.`, `- [ ] 1.1`) is used
353
- - [ ] Timeline section is included
354
- - [ ] Estimate summary table is included
@@ -1,76 +0,0 @@
1
- ---
2
- name: /michi:confluence-sync
3
- description: GitHub の Markdown を Confluence に同期
4
- ---
5
-
6
- # Confluence同期コマンド
7
-
8
- {{DEV_GUIDELINES}}
9
-
10
- このコマンドは、GitHubで管理されている仕様書(requirements, design, tasks)をConfluenceに同期します。
11
-
12
- ## 使い方
13
-
14
- ```
15
- /michi:confluence-sync <feature_name> [doc_type]
16
- ```
17
-
18
- **パラメータ**:
19
- - `feature_name`: 機能名(例: user-auth)
20
- - `doc_type`: ドキュメントタイプ(requirements / design / tasks)省略時は requirements
21
-
22
- **例**:
23
- ```
24
- /michi:confluence-sync user-auth
25
- /michi:confluence-sync user-auth design
26
- /michi:confluence-sync user-auth tasks
27
- ```
28
-
29
- ## 実行内容
30
-
31
- 1. `{{KIRO_DIR}}/project.json` からプロジェクトメタデータを読み込み
32
- 2. `{{KIRO_DIR}}/specs/<feature>/<doc_type>.md` を読み込み
33
- 3. Markdown → Confluence Storage Format に変換
34
- 4. GitHub URLを埋め込み
35
- 5. Confluenceページを作成または更新
36
- 6. ラベル付与(プロジェクトラベル + doc_type)
37
- 7. ステークホルダーにメンション通知
38
-
39
- ## 生成されるConfluenceページ
40
-
41
- **タイトル**: `[プロジェクト名] <feature> <doc_type>`
42
- **スペース**: PRD(要件・設計)/ QA(テスト)
43
- **ラベル**: project:<project_id>, <doc_type>, <feature_name>, github-sync
44
-
45
- **ページ構成**:
46
- - GitHub連携情報(最新版へのリンク)
47
- - 変換されたMarkdownコンテンツ
48
- - 承認マクロ(企画・部長への承認依頼)
49
-
50
- ## 実装
51
-
52
- スクリプトを直接実行:
53
-
54
- ```bash
55
- npm run confluence:sync <feature_name> [doc_type]
56
- ```
57
-
58
- 内部的に `scripts/confluence-sync.ts` を実行します。
59
-
60
- ## 前提条件
61
-
62
- - `.env` ファイルに Atlassian 認証情報が設定されている
63
- - `{{KIRO_DIR}}/project.json` が存在する
64
- - 同期する Markdown ファイルが存在する
65
-
66
- ## トラブルシューティング
67
-
68
- ### 認証エラー
69
- `.env` の `ATLASSIAN_API_TOKEN` を確認してください。
70
-
71
- ### ページが見つからない
72
- Confluence スペースキー(PRD)が正しいか確認してください。
73
-
74
- ### Markdown変換エラー
75
- Markdown形式が正しいか確認してください。
76
-
@@ -1,69 +0,0 @@
1
- ---
2
- name: /michi:project-switch
3
- description: プロジェクトを切り替える
4
- ---
5
-
6
- # プロジェクト切り替えコマンド
7
-
8
- {{DEV_GUIDELINES}}
9
-
10
- 複数プロジェクトを管理している場合、プロジェクトを切り替えるコマンドです。
11
-
12
- ## 使い方
13
-
14
- ```
15
- /michi:project-switch <project_id>
16
- ```
17
-
18
- **パラメータ**:
19
- - `project_id`: プロジェクトID(例: customer-a-service-1, michi)
20
-
21
- **例**:
22
- ```
23
- /michi:project-switch michi
24
- /michi:project-switch customer-a-service-1
25
- ```
26
-
27
- ## 実行内容
28
-
29
- 1. プロジェクトIDに対応するGitHubリポジトリを特定
30
- 2. ローカルにクローン(未クローンの場合)またはチェックアウト
31
- 3. `{{KIRO_DIR}}/project.json` を読み込んで表示
32
- 4. 対応するConfluenceプロジェクトページのURLを表示
33
- 5. JIRAプロジェクトダッシュボードのURLを表示
34
-
35
- ## 出力例
36
-
37
- ```
38
- ✅ プロジェクト切り替え: michi
39
-
40
- プロジェクト情報:
41
- 名前: Michi - Managed Intelligent Comprehensive Hub for Integration
42
- JIRA: MICHI
43
- Confluence Labels: project:michi, service:hub
44
- ステータス: active
45
- チーム: @arigatatsuya
46
-
47
- リンク:
48
- 📄 Confluence: https://your-domain.atlassian.net/wiki/spaces/PRD/pages/
49
- 🎯 JIRA Dashboard: https://your-domain.atlassian.net/jira/projects/MICHI
50
- 🐙 GitHub: https://github.com/sk8metalme/michi
51
- ```
52
-
53
- ## ターミナル実行
54
-
55
- ```bash
56
- # リポジトリをクローン/チェックアウト
57
- cd ~/work/projects
58
- jj git clone https://github.com/org/<project_id>
59
- cd <project_id>
60
-
61
- # プロジェクト情報を表示
62
- cat {{KIRO_DIR}}/project.json
63
- ```
64
-
65
- ## 関連コマンド
66
-
67
- - `/michi:project-list`: すべてのプロジェクトを一覧表示
68
- - `/kiro:spec-status`: 現在のプロジェクトの仕様ステータスを表示(cc-sdd標準コマンド)
69
-
@@ -1,188 +0,0 @@
1
- ---
2
- title: Atlassian MCP Integration Rules
3
- description: {{DEV_GUIDELINES}} for MCP integration with Confluence/JIRA
4
- ---
5
-
6
- # Atlassian MCP Integration Rules
7
-
8
- ## Prerequisites
9
-
10
- Atlassian MCP server must be configured in Cursor:
11
- - Credentials set in `~/.cursor/mcp.json`
12
-
13
- Reference: [Atlassian MCP](https://www.atlassian.com/ja/platform/remote-mcp-server)
14
-
15
- ## Available MCP Tools
16
-
17
- Cursor AI can use the following tools:
18
-
19
- ### Confluence
20
- - `confluence_create_page`: Create page
21
- - `confluence_update_page`: Update page
22
- - `confluence_search`: Search pages
23
- - `confluence_get_page`: Get page
24
-
25
- ### JIRA
26
- - `jira_create_issue`: Create issue
27
- - `jira_update_issue`: Update issue
28
- - `jira_search`: Search issues
29
- - `jira_get_issue`: Get issue
30
-
31
- ## Workflow Integration
32
-
33
- ⚠️ **Important**: **Always use REST API scripts** for page/issue creation and updates. Use MCP tools only for reference and search operations.
34
-
35
- ### Requirements Phase
36
-
37
- After generating `.kiro/specs/<feature>/requirements.md`:
38
-
39
- ```
40
- Run script (required):
41
- npm run phase:run <feature> requirements
42
-
43
- Execution:
44
- 1. Load project metadata (.kiro/project.json)
45
- 2. Convert Markdown (markdown-to-confluence.ts)
46
- 3. Create page via REST API (confluence-sync.ts)
47
- 4. Auto-update spec.json
48
- 5. Run validation
49
- ```
50
-
51
- ### Design Phase
52
-
53
- After generating `.kiro/specs/<feature>/design.md`:
54
-
55
- ```
56
- Run script (required):
57
- npm run phase:run <feature> design
58
-
59
- Execution:
60
- 1. Create Confluence page via REST API (confluence-sync.ts)
61
- 2. Auto-update spec.json
62
- 3. Run validation
63
- ```
64
-
65
- ### Task Breakdown Phase
66
-
67
- After generating `.kiro/specs/<feature>/tasks.md`:
68
-
69
- ```
70
- Run script (required):
71
- npm run phase:run <feature> tasks
72
-
73
- Execution:
74
- 1. Create Epic via REST API (jira-sync.ts)
75
- 2. Create Stories via REST API (all stories, jira-sync.ts)
76
- 3. Set story points
77
- 4. Auto-update spec.json
78
- 5. Run validation
79
- ```
80
-
81
- ### Implementation Phase
82
-
83
- Update JIRA when starting and completing implementation (MCP for single reference operations, scripts recommended for multiple updates):
84
-
85
- ```
86
- Option 1: MCP tool (for single update)
87
- jira_update_issue({
88
- issue_key: "{{JIRA_PROJECT_KEY}}-123",
89
- status: "In Progress"
90
- })
91
-
92
- Option 2: REST API script (for bulk updates)
93
- npm run jira:sync <feature>
94
- ```
95
-
96
- ## MCP Usage Guidelines
97
-
98
- ### When to Use MCP
99
-
100
- ✅ **Recommended (reference/search only)**:
101
- - Search/get Confluence pages (reference purpose)
102
- - Search/get JIRA issues (reference purpose)
103
- - Single operation information retrieval
104
- - Interactive information checking within Cursor AI
105
-
106
- ❌ **Prohibited (creation/update)**:
107
- - Confluence page creation/update → **Scripts required**
108
- - JIRA issue creation/update → **Scripts required**
109
- - Bulk operations (10+ pages/issues) → **Scripts required**
110
- - Complex workflows → **Scripts required**
111
-
112
- ### MCP vs REST API Scripts
113
-
114
- | Use Case | Method | Reason |
115
- |----------|--------|--------|
116
- | Page/Issue creation | **REST API Script** | Rate limit handling, error handling, bulk processing |
117
- | Page/Issue update | **REST API Script** | Rate limit handling, error handling |
118
- | Page/Issue search (reference) | MCP | Simple, AI integration |
119
- | Page/Issue get (reference) | MCP | Simple, AI integration |
120
-
121
- ## Rate Limiting
122
-
123
- Atlassian rate limits vary by product (Confluence/JIRA), tenant, app context, and plan, controlled via quota/burst mode or per-minute windows.
124
-
125
- **Confluence Cloud**:
126
- - Migration: 6,000-12,000 requests/minute
127
- - General use: Quota + burst mode (~10s burst window, 1h quota window)
128
-
129
- **JIRA Cloud**:
130
- - Cost/quota-based limits (per app, per user, app+user)
131
- - Issue write limits: 20 ops/2s, 100 ops/30s
132
-
133
- Rate limit violations return `429` response with `Retry-After` and `X-RateLimit-*` headers for retry guidance.
134
-
135
- **Recommended Mitigation**:
136
- - Detect and honor response headers (`Retry-After`, `X-RateLimit-*`)
137
- - Implement exponential backoff + jitter retry
138
- - Use caching and batch processing
139
- - For frequent operations, use REST API (fine-grained control)
140
-
141
- **Official Documentation**:
142
- - [Confluence API Rate Limiting](https://developer.atlassian.com/cloud/confluence/rate-limiting/)
143
- - [JIRA API Rate Limiting](https://developer.atlassian.com/cloud/jira/platform/rate-limiting/)
144
- - [App Migration Rate Limiting](https://developer.atlassian.com/platform/app-migration/rate-limiting/)
145
-
146
- ## Using Project Metadata
147
-
148
- ### When Calling MCP Tools
149
-
150
- ```typescript
151
- // Load project metadata
152
- const projectMeta = JSON.parse(
153
- fs.readFileSync('.kiro/project.json', 'utf-8')
154
- );
155
-
156
- // Use with MCP tools
157
- confluence_create_page({
158
- space: "PRD",
159
- title: `[${projectMeta.projectName}] ...`,
160
- labels: [...projectMeta.confluenceLabels, ...additionalLabels]
161
- });
162
- ```
163
-
164
- ## Troubleshooting
165
-
166
- ### MCP Connection Error
167
-
168
- 1. Restart Cursor
169
- 2. Verify credentials in `~/.cursor/mcp.json`
170
- 3. Check Atlassian API Token validity
171
-
172
- ### Rate Limit Error
173
-
174
- Use rate-limit-ready scripts:
175
- ```bash
176
- # Rate limit handling (500ms wait) implemented
177
- npm run confluence:sync <feature>
178
- npm run jira:sync <feature>
179
-
180
- # Adjust wait time (default: 500ms, in milliseconds)
181
- ATLASSIAN_REQUEST_DELAY=1000 npm run jira:sync <feature>
182
- ```
183
-
184
- ### Page Creation Error
185
-
186
- - Verify Confluence space exists
187
- - Check for duplicate page titles
188
- - Verify permissions