@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.
- package/CHANGELOG.md +10 -0
- package/README.md +3 -10
- 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/jira-sync.d.ts.map +1 -1
- package/dist/scripts/jira-sync.js +32 -2
- package/dist/scripts/jira-sync.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/getting-started/configuration.md +0 -29
- package/docs/getting-started/quick-start.md +2 -2
- package/docs/guides/atlassian-integration.md +27 -0
- package/docs/guides/workflow.md +1 -1
- package/docs/reference/cli.md +0 -4
- package/docs/troubleshooting.md +0 -45
- 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/jira-sync.ts +36 -2
- package/scripts/template/__tests__/renderer.test.ts +21 -21
- package/scripts/utils/template-finder.ts +5 -11
- package/docs/guides/ai-tools.md +0 -311
- 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/commands/michi/spec-tasks.md +0 -117
- 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,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
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: GitHub Single Source of Truth Rules
|
|
3
|
-
description: {{DEV_GUIDELINES}} for using GitHub as SSoT and syncing with Confluence
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# GitHub Single Source of Truth (SSoT) Rules
|
|
7
|
-
|
|
8
|
-
## Basic Principles
|
|
9
|
-
|
|
10
|
-
### Single Source of Truth
|
|
11
|
-
- **All specifications managed in GitHub** (.kiro/specs/)
|
|
12
|
-
- Confluence is **for reference and approval only** (edit only in GitHub)
|
|
13
|
-
- Avoid dual management
|
|
14
|
-
|
|
15
|
-
### Data Flow
|
|
16
|
-
```
|
|
17
|
-
GitHub (.kiro/specs/) ← Source of Truth (editable)
|
|
18
|
-
↓ sync
|
|
19
|
-
Confluence ← View & Approval only (read-only)
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## File Structure
|
|
23
|
-
|
|
24
|
-
### GitHub Repository
|
|
25
|
-
```
|
|
26
|
-
.kiro/
|
|
27
|
-
├── project.json # Project metadata
|
|
28
|
-
├── specs/
|
|
29
|
-
│ └── <feature>/
|
|
30
|
-
│ ├── requirements.md # Requirements definition
|
|
31
|
-
│ ├── design.md # Design
|
|
32
|
-
│ ├── tasks.md # Task breakdown
|
|
33
|
-
│ └── test-report.md # Test results
|
|
34
|
-
└── settings/
|
|
35
|
-
└── templates/ # Templates
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Workflow
|
|
39
|
-
|
|
40
|
-
### 1. Generate Markdown → GitHub
|
|
41
|
-
```
|
|
42
|
-
Cursor: /michi:spec-requirements <feature>
|
|
43
|
-
↓ Generate: .kiro/specs/<feature>/requirements.md
|
|
44
|
-
↓
|
|
45
|
-
jj commit -m "docs: Add requirements"
|
|
46
|
-
jj git push
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 2. GitHub → Confluence Sync
|
|
50
|
-
```
|
|
51
|
-
Cursor AI (using MCP):
|
|
52
|
-
1. Get GitHub URL
|
|
53
|
-
2. Convert Markdown → Confluence Storage Format
|
|
54
|
-
3. Create page with confluence_create_page()
|
|
55
|
-
4. Embed GitHub link
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### 3. Approval in Confluence
|
|
59
|
-
- Planners/Managers review in Confluence
|
|
60
|
-
- Approve via Page Properties
|
|
61
|
-
- After approval → Proceed to next phase
|
|
62
|
-
|
|
63
|
-
### 4. Technical Review in GitHub
|
|
64
|
-
- Engineers review Markdown in GitHub
|
|
65
|
-
- Comment/suggest changes in PR format (optional)
|
|
66
|
-
- After merge, auto-update Confluence
|
|
67
|
-
|
|
68
|
-
## Confluence Page Structure
|
|
69
|
-
|
|
70
|
-
### Template Structure
|
|
71
|
-
```markdown
|
|
72
|
-
## GitHub Integration
|
|
73
|
-
📄 Latest version managed in [GitHub](URL)
|
|
74
|
-
Edit in GitHub, auto-synced to Confluence
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
{Converted Markdown}
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Approval
|
|
83
|
-
{approval macro}
|
|
84
|
-
Approvers: @Planner, @Manager
|
|
85
|
-
{/approval}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Review Flow Separation
|
|
89
|
-
|
|
90
|
-
### Engineer Review (GitHub)
|
|
91
|
-
- Target: requirements.md, design.md, tasks.md
|
|
92
|
-
- Method: GitHub PR, comments
|
|
93
|
-
- Focus: Technical accuracy, feasibility
|
|
94
|
-
|
|
95
|
-
### Planner/Manager Review (Confluence)
|
|
96
|
-
- Target: Requirements, design, estimates
|
|
97
|
-
- Method: Confluence comments, approval macro
|
|
98
|
-
- Focus: Business requirements, priority, budget
|
|
99
|
-
|
|
100
|
-
## Update Synchronization
|
|
101
|
-
|
|
102
|
-
### On GitHub Update
|
|
103
|
-
```
|
|
104
|
-
GitHub push
|
|
105
|
-
↓ Webhook (optional)
|
|
106
|
-
Confluence auto-update
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Manual Sync
|
|
110
|
-
```bash
|
|
111
|
-
# Run command
|
|
112
|
-
/michi:confluence-sync <feature>
|
|
113
|
-
|
|
114
|
-
# Or npm script
|
|
115
|
-
npm run confluence:sync <feature>
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## Benefits
|
|
119
|
-
|
|
120
|
-
✅ **Version Control**: All change history in GitHub
|
|
121
|
-
✅ **Zero Dual Management**: Confluence for reference only
|
|
122
|
-
✅ **Engineer-Friendly**: Markdown, Git, PR
|
|
123
|
-
✅ **Planner/Manager-Friendly**: Confluence's user-friendly UI
|
|
124
|
-
✅ **Auto Sync**: Push = Confluence update
|
|
125
|
-
✅ **Audit Trail**: GitHub as official record
|
|
126
|
-
|
|
127
|
-
## Prohibited Actions
|
|
128
|
-
|
|
129
|
-
❌ Direct editing in Confluence
|
|
130
|
-
❌ Managing in both GitHub and Confluence
|
|
131
|
-
❌ Reverse sync from Confluence to GitHub
|
|
132
|
-
|
|
133
|
-
## Exception Cases
|
|
134
|
-
|
|
135
|
-
Direct creation in Confluence allowed only for:
|
|
136
|
-
- Meeting minutes
|
|
137
|
-
- Temporary notes
|
|
138
|
-
- Documents outside the project
|
|
139
|
-
|
|
140
|
-
## Troubleshooting
|
|
141
|
-
|
|
142
|
-
### If Confluence is outdated
|
|
143
|
-
```bash
|
|
144
|
-
# Manually re-sync
|
|
145
|
-
/michi:confluence-sync <feature>
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### On sync error
|
|
149
|
-
1. Verify GitHub Markdown is correct
|
|
150
|
-
2. Check Confluence API authentication
|
|
151
|
-
3. Verify page ID is correct
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Multi-Project Management Rules
|
|
3
|
-
description: {{DEV_GUIDELINES}} for managing multiple concurrent projects with naming conventions and workflows
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Multi-Project Management Rules
|
|
7
|
-
|
|
8
|
-
## Project Identification
|
|
9
|
-
|
|
10
|
-
### Loading Project Metadata
|
|
11
|
-
- Reference `.kiro/project.json` in all operations
|
|
12
|
-
- Retrieve project ID, JIRA key, and Confluence labels
|
|
13
|
-
- Use project information dynamically
|
|
14
|
-
|
|
15
|
-
### Example
|
|
16
|
-
```typescript
|
|
17
|
-
const projectMeta = JSON.parse(fs.readFileSync('.kiro/project.json', 'utf8'));
|
|
18
|
-
// projectMeta.projectId
|
|
19
|
-
// projectMeta.jiraProjectKey
|
|
20
|
-
// projectMeta.confluenceLabels
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Naming Conventions
|
|
24
|
-
|
|
25
|
-
### Confluence Pages
|
|
26
|
-
- Format: `[{projectName}] {document_type}`
|
|
27
|
-
- Example: `[Company-A-Service1] Requirements`
|
|
28
|
-
- Example: `[{{PROJECT_ID}}] User Auth Design`
|
|
29
|
-
|
|
30
|
-
### JIRA Epic/Story
|
|
31
|
-
- Epic: `[{projectName}] {feature_name}`
|
|
32
|
-
- Story: `[{projectName}] {task_name}`
|
|
33
|
-
- Example: `[{{PROJECT_ID}}] User Authentication Feature`
|
|
34
|
-
|
|
35
|
-
### GitHub Branches
|
|
36
|
-
- Format: `{projectId}/feature/{feature_name}`
|
|
37
|
-
- Example: `{{PROJECT_ID}}/feature/user-auth`
|
|
38
|
-
- Example: `customer-a-service-1/feature/payment`
|
|
39
|
-
|
|
40
|
-
### Label Assignment
|
|
41
|
-
- Confluence: `projectMeta.confluenceLabels` + `requirements|design|tasks`
|
|
42
|
-
- JIRA: `projectMeta.confluenceLabels` + feature name
|
|
43
|
-
|
|
44
|
-
## Cross-Project Views
|
|
45
|
-
|
|
46
|
-
### Confluence Dashboard
|
|
47
|
-
- Display requirements, design, tasks across all projects
|
|
48
|
-
- Filter by labels
|
|
49
|
-
- Filter by status (Pending Review, Approved)
|
|
50
|
-
|
|
51
|
-
### JIRA Dashboard
|
|
52
|
-
- Track progress by project key
|
|
53
|
-
- Filter: `project IN ({{JIRA_PROJECT_KEY}}, PRJA, PRJB)`
|
|
54
|
-
- Aggregate story points
|
|
55
|
-
|
|
56
|
-
## Unified Workflow
|
|
57
|
-
|
|
58
|
-
Use the same workflow across all projects:
|
|
59
|
-
|
|
60
|
-
1. `/michi:spec-init` → Specification initialization
|
|
61
|
-
2. `/michi:spec-requirements` → Requirements definition (Confluence sync)
|
|
62
|
-
3. `/michi:spec-design` → Design (Confluence sync + estimation)
|
|
63
|
-
4. `/michi:spec-tasks` → Task breakdown (JIRA integration)
|
|
64
|
-
5. `/michi:spec-impl` → TDD implementation
|
|
65
|
-
6. GitHub PR → Review
|
|
66
|
-
7. Release preparation
|
|
67
|
-
|
|
68
|
-
## Project Switching
|
|
69
|
-
|
|
70
|
-
When switching between multiple projects:
|
|
71
|
-
|
|
72
|
-
1. Check out repository
|
|
73
|
-
2. Verify `.kiro/project.json`
|
|
74
|
-
3. Open corresponding Confluence/JIRA pages
|
|
75
|
-
|
|
76
|
-
## Important Notes
|
|
77
|
-
|
|
78
|
-
- Maintain independent `.kiro/project.json` for each project
|
|
79
|
-
- Ensure JIRA project keys are unique
|
|
80
|
-
- Identify projects by Confluence labels
|
|
81
|
-
- Include project ID in GitHub branch names
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Gemini CLI Extensions for Michi
|
|
2
|
-
|
|
3
|
-
This directory contains additional context and extensions for Gemini CLI when working with Michi projects.
|
|
4
|
-
|
|
5
|
-
## Directory Structure
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
.gemini/
|
|
9
|
-
├── GEMINI.md # Main project context (auto-loaded)
|
|
10
|
-
└── extensions/ # Additional extensions (optional)
|
|
11
|
-
└── README.md # This file
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
Gemini CLI automatically loads `GEMINI.md` from the project root. Extensions in this directory can be loaded using `/directory add` command:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
/directory add .gemini/extensions
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Available Extensions
|
|
23
|
-
|
|
24
|
-
Currently, Michi provides core principles in the main `GEMINI.md` file. Additional extensions can be added here for:
|
|
25
|
-
|
|
26
|
-
- **atlassian-integration** - Confluence/JIRA integration patterns
|
|
27
|
-
- **multi-project** - Multi-project management strategies
|
|
28
|
-
- **custom-workflows** - Project-specific workflows
|
|
29
|
-
|
|
30
|
-
## Creating Custom Extensions
|
|
31
|
-
|
|
32
|
-
To create a custom extension:
|
|
33
|
-
|
|
34
|
-
1. Create a new `.md` file in this directory
|
|
35
|
-
2. Add your context/rules in Markdown format
|
|
36
|
-
3. Load it in Gemini CLI: `/directory add .gemini/extensions/<your-file>.md`
|
|
37
|
-
|
|
38
|
-
## Learn More
|
|
39
|
-
|
|
40
|
-
- Gemini CLI Documentation: https://geminicli.com/docs
|
|
41
|
-
- Michi Documentation: https://github.com/sk8metalme/michi
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Michi Core Principles for Gemini CLI
|
|
2
|
-
|
|
3
|
-
## Development Guidelines
|
|
4
|
-
{{DEV_GUIDELINES}}
|
|
5
|
-
|
|
6
|
-
## Language
|
|
7
|
-
All generated documents should be in: **{{LANG_CODE}}**
|
|
8
|
-
|
|
9
|
-
Reference the language field in {{KIRO_DIR}}/project.json.
|
|
10
|
-
|
|
11
|
-
## Single Source of Truth (SSoT)
|
|
12
|
-
|
|
13
|
-
### GitHub as SSoT
|
|
14
|
-
- **All specifications are managed in GitHub** ({{KIRO_DIR}}/specs/)
|
|
15
|
-
- Confluence is **reference and approval only** (editing is GitHub only)
|
|
16
|
-
- Avoid duplicate management
|
|
17
|
-
|
|
18
|
-
### Data Flow
|
|
19
|
-
```
|
|
20
|
-
GitHub ({{KIRO_DIR}}/specs/) ← Source of truth (editable)
|
|
21
|
-
↓ sync
|
|
22
|
-
Confluence ← Display and approval (read-only)
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Multi-Project Management
|
|
26
|
-
|
|
27
|
-
### Project Identification
|
|
28
|
-
- All operations reference {{KIRO_DIR}}/project.json
|
|
29
|
-
- Dynamically use project ID, JIRA key, Confluence labels
|
|
30
|
-
- Project ID: {{PROJECT_ID}}
|
|
31
|
-
|
|
32
|
-
### Naming Conventions
|
|
33
|
-
|
|
34
|
-
#### Confluence Pages
|
|
35
|
-
- Format: `[{projectName}] {document_type}`
|
|
36
|
-
- Example: `[{{PROJECT_ID}}] Requirements`
|
|
37
|
-
|
|
38
|
-
#### JIRA Epic/Story
|
|
39
|
-
- Format: `[{JIRA_KEY}] {title}`
|
|
40
|
-
- Use project metadata from {{KIRO_DIR}}/project.json
|
|
41
|
-
|
|
42
|
-
## Project Structure
|
|
43
|
-
|
|
44
|
-
- Project metadata: {{KIRO_DIR}}/project.json
|
|
45
|
-
- Specifications: {{KIRO_DIR}}/specs/
|
|
46
|
-
- Templates: {{KIRO_DIR}}/settings/templates/
|
|
47
|
-
- Steering: {{KIRO_DIR}}/steering/
|
|
48
|
-
|
|
49
|
-
## Workflow Integration
|
|
50
|
-
|
|
51
|
-
### Spec Generation
|
|
52
|
-
Use Gemini CLI to generate specifications in {{KIRO_DIR}}/specs/
|
|
53
|
-
|
|
54
|
-
### Git Integration
|
|
55
|
-
```bash
|
|
56
|
-
# After spec generation
|
|
57
|
-
git add {{KIRO_DIR}}/specs/
|
|
58
|
-
git commit -m "docs: Add <feature> specification"
|
|
59
|
-
git push
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Confluence Sync
|
|
63
|
-
Sync GitHub specs to Confluence using Michi commands:
|
|
64
|
-
```bash
|
|
65
|
-
# Example: Sync requirements
|
|
66
|
-
npm run confluence:sync
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Best Practices
|
|
70
|
-
|
|
71
|
-
1. **Always reference project.json** for project-specific metadata
|
|
72
|
-
2. **Use SSoT principle** - Edit in GitHub, reference in Confluence
|
|
73
|
-
3. **Follow naming conventions** for consistency
|
|
74
|
-
4. **Generate specs incrementally** - Requirements → Design → Tasks
|
|
75
|
-
5. **Commit frequently** to GitHub
|
|
76
|
-
|
|
77
|
-
## Additional Context
|
|
78
|
-
|
|
79
|
-
For Atlassian integration rules and multi-project management details,
|
|
80
|
-
see extensions in {{KIRO_DIR}}/.gemini/extensions/
|