moicle 1.0.2 → 1.1.1

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.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: hotfix-workflow
2
+ name: hotfix
3
3
  description: Quick bug fix workflow with rollback plan. Use when fixing bugs, hotfixes, urgent issues, production bugs, or when user says "fix bug", "hotfix", "urgent fix", "production issue".
4
4
  ---
5
5
 
@@ -7,6 +7,29 @@ description: Quick bug fix workflow with rollback plan. Use when fixing bugs, ho
7
7
 
8
8
  Fast-track workflow for fixing bugs with safety rollback plan.
9
9
 
10
+ ## IMPORTANT: Read Architecture First
11
+
12
+ **Before fixing, you MUST read the appropriate architecture reference:**
13
+
14
+ ### Global Architecture Files
15
+ ```
16
+ ~/.claude/architecture/
17
+ ├── clean-architecture.md # Core principles for all projects
18
+ ├── flutter-mobile.md # Flutter + Riverpod
19
+ ├── react-frontend.md # React + Vite + TypeScript
20
+ ├── go-backend.md # Go + Gin
21
+ ├── laravel-backend.md # Laravel + PHP
22
+ ├── remix-fullstack.md # Remix fullstack
23
+ └── monorepo.md # Monorepo structure
24
+ ```
25
+
26
+ ### Project-specific (if exists)
27
+ ```
28
+ .claude/architecture/ # Project overrides
29
+ ```
30
+
31
+ **Understand the codebase structure before making changes.**
32
+
10
33
  ## Recommended Agents
11
34
 
12
35
  | Phase | Agent | Purpose |
@@ -39,8 +62,6 @@ Fast-track workflow for fixing bugs with safety rollback plan.
39
62
 
40
63
  **Goal**: Identify exactly what the bug is
41
64
 
42
- **Time**: 5-10 minutes
43
-
44
65
  ### Actions
45
66
  1. Gather information:
46
67
  - Error message / stack trace
@@ -49,7 +70,9 @@ Fast-track workflow for fixing bugs with safety rollback plan.
49
70
  - Environment (prod/staging/dev)
50
71
  - Affected users/scope
51
72
 
52
- 2. Assess severity:
73
+ 2. **Identify project stack and read architecture doc**
74
+
75
+ 3. Assess severity:
53
76
  ```
54
77
  🔴 CRITICAL - Production down, data loss
55
78
  🟠 HIGH - Major feature broken, many users affected
@@ -57,21 +80,24 @@ Fast-track workflow for fixing bugs with safety rollback plan.
57
80
  🟢 LOW - Minor issue, cosmetic
58
81
  ```
59
82
 
60
- 3. Document:
61
- ```markdown
62
- ## Bug Report
63
- **Severity**: [CRITICAL/HIGH/MEDIUM/LOW]
64
- **Error**: [error message]
65
- **Steps**:
66
- 1. ...
67
- 2. ...
68
- **Expected**: [what should happen]
69
- **Actual**: [what happens]
70
- **Environment**: [prod/staging/dev]
71
- ```
83
+ ### Output
84
+ ```markdown
85
+ ## Bug Report
86
+ **Severity**: [CRITICAL/HIGH/MEDIUM/LOW]
87
+ **Stack**: [Flutter/React/Go/Laravel/Remix]
88
+ **Architecture Doc**: [path]
89
+ **Error**: [error message]
90
+ **Steps**:
91
+ 1. ...
92
+ 2. ...
93
+ **Expected**: [what should happen]
94
+ **Actual**: [what happens]
95
+ **Environment**: [prod/staging/dev]
96
+ ```
72
97
 
73
98
  ### Gate
74
99
  - [ ] Bug clearly described
100
+ - [ ] Architecture doc identified
75
101
  - [ ] Severity assessed
76
102
  - [ ] Scope understood
77
103
 
@@ -81,17 +107,10 @@ Fast-track workflow for fixing bugs with safety rollback plan.
81
107
 
82
108
  **Goal**: Reproduce the bug and find root cause
83
109
 
84
- **Time**: 10-20 minutes
85
-
86
110
  ### Actions
87
- 1. Reproduce locally:
88
- ```bash
89
- # Setup same environment
90
- # Follow exact steps
91
- # Confirm bug occurs
92
- ```
93
-
94
- 2. Find root cause (5 Whys):
111
+ 1. **Read architecture doc** to understand codebase structure
112
+ 2. Reproduce locally following architecture patterns
113
+ 3. Find root cause using 5 Whys:
95
114
  ```
96
115
  Why did it fail? → [answer]
97
116
  Why? → [deeper answer]
@@ -100,12 +119,12 @@ Fast-track workflow for fixing bugs with safety rollback plan.
100
119
  Why? → [ROOT CAUSE]
101
120
  ```
102
121
 
103
- 3. Identify fix location:
122
+ 4. Identify fix location based on architecture:
123
+ - Which layer? (from architecture doc)
104
124
  - Which file(s)?
105
- - Which function(s)?
106
125
  - What's the minimal change?
107
126
 
108
- 4. Check git blame:
127
+ 5. Check git blame:
109
128
  ```bash
110
129
  git log --oneline -10 -- [affected_file]
111
130
  git blame [affected_file] | grep -A5 -B5 "[problem_area]"
@@ -114,33 +133,34 @@ Fast-track workflow for fixing bugs with safety rollback plan.
114
133
  ### Analysis Output
115
134
  ```markdown
116
135
  ## Root Cause Analysis
136
+ **Architecture Reference**: [path to doc]
137
+ **Affected Layer**: [layer from architecture doc]
117
138
  **Root Cause**: [description]
118
139
  **Introduced**: [commit/PR if known]
119
140
  **Affected Files**:
120
- - file1.ts:123
121
- - file2.ts:456
141
+ - file1:123
142
+ - file2:456
122
143
 
123
- **Fix Strategy**: [brief description of fix]
144
+ **Fix Strategy**: [brief description following architecture patterns]
124
145
  ```
125
146
 
126
147
  ### Gate
127
148
  - [ ] Bug reproduced locally
128
149
  - [ ] Root cause identified
129
- - [ ] Fix location known
150
+ - [ ] Fix location known (per architecture)
130
151
 
131
152
  ---
132
153
 
133
154
  ## Phase 3: FIX
134
155
 
135
- **Goal**: Implement minimal fix
136
-
137
- **Time**: 15-30 minutes
156
+ **Goal**: Implement minimal fix following architecture
138
157
 
139
158
  ### Principles
140
159
  1. **Minimal change** - Fix only what's broken
141
- 2. **No refactoring** - Save for later
142
- 3. **No new features** - Stay focused
143
- 4. **Preserve behavior** - Don't change anything else
160
+ 2. **Follow architecture** - Respect layer boundaries from doc
161
+ 3. **No refactoring** - Save for later
162
+ 4. **No new features** - Stay focused
163
+ 5. **Preserve behavior** - Don't change anything else
144
164
 
145
165
  ### Actions
146
166
  1. Create hotfix branch:
@@ -148,20 +168,22 @@ Fast-track workflow for fixing bugs with safety rollback plan.
148
168
  git checkout -b hotfix/[issue-id]-[short-description]
149
169
  ```
150
170
 
151
- 2. Implement fix:
152
- - Make smallest possible change
153
- - Add defensive code if needed
154
- - Add inline comment explaining fix
171
+ 2. **Read architecture doc** for the affected layer
172
+ 3. Implement fix following architecture patterns:
173
+ - Use correct patterns from doc
174
+ - Follow naming conventions from doc
175
+ - Respect layer boundaries
155
176
 
156
- 3. Fix template:
157
- ```typescript
177
+ 4. Add inline comment explaining fix:
178
+ ```
158
179
  // HOTFIX: [issue-id] - [brief description]
159
180
  // Root cause: [why this fixes it]
160
181
  [your fix code]
161
182
  ```
162
183
 
163
184
  ### Gate
164
- - [ ] Fix implemented
185
+ - [ ] Fix follows architecture doc
186
+ - [ ] Fix implemented minimally
165
187
  - [ ] Code compiles
166
188
  - [ ] No unrelated changes
167
189
 
@@ -171,24 +193,22 @@ Fast-track workflow for fixing bugs with safety rollback plan.
171
193
 
172
194
  **Goal**: Confirm fix works without breaking other things
173
195
 
174
- **Time**: 10-15 minutes
175
-
176
196
  ### Actions
177
197
  1. Test the fix:
178
198
  - [ ] Original bug no longer occurs
179
199
  - [ ] Related functionality still works
180
200
  - [ ] Edge cases handled
181
201
 
182
- 2. Run existing tests:
202
+ 2. Run existing tests (use command from architecture doc):
183
203
  ```bash
184
- # Run all tests
185
- pnpm test # JS/TS
186
- go test ./... # Go
187
- flutter test # Flutter
204
+ flutter test # Flutter
205
+ go test ./... # Go
206
+ bun test # React/Remix
207
+ php artisan test # Laravel
188
208
  ```
189
209
 
190
- 3. Add regression test:
191
- ```typescript
210
+ 3. Add regression test following architecture patterns:
211
+ ```
192
212
  // Test to prevent regression
193
213
  it('should [expected behavior] - fixes #[issue-id]', () => {
194
214
  // Arrange: setup that caused bug
@@ -206,14 +226,14 @@ Fast-track workflow for fixing bugs with safety rollback plan.
206
226
  ### Gate
207
227
  - [ ] Original bug fixed
208
228
  - [ ] All tests pass
209
- - [ ] Regression test added
229
+ - [ ] Regression test added (following arch patterns)
210
230
  - [ ] No new issues introduced
211
231
 
212
232
  ### Feedback Loop
213
233
  If verification fails:
214
234
  1. Note what failed
215
235
  2. Return to FIX phase
216
- 3. Adjust fix
236
+ 3. Adjust fix (following architecture)
217
237
  4. Re-verify
218
238
 
219
239
  ---
@@ -222,8 +242,6 @@ If verification fails:
222
242
 
223
243
  **Goal**: Ship the fix safely
224
244
 
225
- **Time**: 5-10 minutes
226
-
227
245
  ### Actions
228
246
  1. Commit with clear message:
229
247
  ```bash
@@ -246,7 +264,7 @@ If verification fails:
246
264
  [explanation]
247
265
 
248
266
  ## Fix
249
- [what was changed]
267
+ [what was changed, following architecture patterns]
250
268
 
251
269
  ## Testing
252
270
  - [ ] Original bug no longer occurs
@@ -295,7 +313,7 @@ If verification fails:
295
313
  ```
296
314
 
297
315
  2. **Feature Flag** (if available):
298
- ```typescript
316
+ ```
299
317
  // Disable the fix temporarily
300
318
  if (!featureFlags.hotfix_123_enabled) {
301
319
  // Original behavior
@@ -312,13 +330,24 @@ If verification fails:
312
330
  ### Post-Rollback
313
331
  1. Document what went wrong
314
332
  2. Return to REPRODUCE phase
315
- 3. Analyze why fix failed
333
+ 3. Analyze why fix failed (check architecture compliance)
316
334
  4. Create better fix
317
335
 
318
336
  ---
319
337
 
320
338
  ## Quick Reference
321
339
 
340
+ ### Architecture Docs
341
+ | Stack | Doc |
342
+ |-------|-----|
343
+ | All | `clean-architecture.md` |
344
+ | Flutter | `flutter-mobile.md` |
345
+ | React | `react-frontend.md` |
346
+ | Go | `go-backend.md` |
347
+ | Laravel | `laravel-backend.md` |
348
+ | Remix | `remix-fullstack.md` |
349
+ | Monorepo | `monorepo.md` |
350
+
322
351
  ### Hotfix vs Feature
323
352
 
324
353
  | Aspect | Hotfix | Feature |
@@ -0,0 +1,317 @@
1
+ ---
2
+ name: new-feature
3
+ description: Complete feature development workflow from start to finish. Use when implementing new features, building functionality, or when user says "implement feature", "add feature", "build feature", "create feature", "new feature".
4
+ ---
5
+
6
+ # Feature Development Workflow
7
+
8
+ End-to-end workflow for developing features with feedback loops and quality gates.
9
+
10
+ ## IMPORTANT: Read Architecture First
11
+
12
+ **Before starting any phase, you MUST read the appropriate architecture reference:**
13
+
14
+ ### Global Architecture Files
15
+ ```
16
+ ~/.claude/architecture/
17
+ ├── clean-architecture.md # Core principles for all projects
18
+ ├── flutter-mobile.md # Flutter + Riverpod
19
+ ├── react-frontend.md # React + Vite + TypeScript
20
+ ├── go-backend.md # Go + Gin
21
+ ├── laravel-backend.md # Laravel + PHP
22
+ ├── remix-fullstack.md # Remix fullstack
23
+ └── monorepo.md # Monorepo structure
24
+ ```
25
+
26
+ ### Project-specific (if exists)
27
+ ```
28
+ .claude/architecture/ # Project overrides
29
+ ```
30
+
31
+ **Follow the structure and patterns defined in these files exactly.**
32
+
33
+ ## Recommended Agents
34
+
35
+ | Phase | Agent | Purpose |
36
+ |-------|-------|---------|
37
+ | DESIGN | `@clean-architect` | Design based on architecture docs |
38
+ | IMPLEMENT | `@react-frontend-dev`, `@go-backend-dev`, `@laravel-backend-dev`, `@flutter-mobile-dev`, `@remix-fullstack-dev` | Stack-specific implementation |
39
+ | IMPLEMENT | `@db-designer` | Database schema design |
40
+ | IMPLEMENT | `@api-designer` | API design (REST/GraphQL) |
41
+ | REVIEW | `@code-reviewer` | Code quality review |
42
+ | REVIEW | `@security-audit` | Security vulnerabilities check |
43
+ | REVIEW | `@perf-optimizer` | Performance optimization |
44
+ | TEST | `@test-writer` | Unit/integration/e2e tests |
45
+ | COMPLETE | `@docs-writer` | Documentation (if needed) |
46
+
47
+ ## Workflow Overview
48
+
49
+ ```
50
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
51
+ │ 1. PLAN │──▶│ 2. DESIGN│──▶│3. IMPLEMENT──▶│ 4. REVIEW│──▶│ 5. TEST │──▶│6. COMPLETE
52
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
53
+ │ │
54
+ └──────◀───────┘
55
+ Feedback Loop
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Phase 1: PLAN
61
+
62
+ **Goal**: Understand requirements and break down into tasks
63
+
64
+ ### Actions
65
+ 1. Clarify requirements with user
66
+ 2. **Identify project stack** (Flutter, React, Go, Laravel, Remix, etc.)
67
+ 3. **Read the appropriate architecture doc** for this stack
68
+ 4. Identify affected files/modules based on architecture
69
+ 5. List acceptance criteria
70
+ 6. Create task breakdown using TodoWrite
71
+
72
+ ### Output
73
+ ```markdown
74
+ ## Feature: [Name]
75
+
76
+ ### Stack & Architecture
77
+ - Stack: [Flutter/React/Go/Laravel/Remix]
78
+ - Architecture Doc: [path to architecture file]
79
+
80
+ ### Requirements
81
+ - [ ] Requirement 1
82
+ - [ ] Requirement 2
83
+
84
+ ### Affected Areas (based on architecture)
85
+ - [Layer/Module 1]
86
+ - [Layer/Module 2]
87
+
88
+ ### Tasks
89
+ 1. Task 1
90
+ 2. Task 2
91
+ ```
92
+
93
+ ### Gate
94
+ - [ ] Requirements clear
95
+ - [ ] Architecture doc read
96
+ - [ ] Scope defined based on architecture
97
+ - [ ] Tasks broken down
98
+
99
+ ---
100
+
101
+ ## Phase 2: DESIGN
102
+
103
+ **Goal**: Design feature following the project's architecture
104
+
105
+ ### Actions
106
+ 1. **Re-read architecture doc** for the specific stack
107
+ 2. Apply architecture principles from the doc:
108
+ - Identify which layers are affected
109
+ - Define components for each layer
110
+ - Follow naming conventions from doc
111
+
112
+ 3. Design data flow based on architecture patterns
113
+
114
+ ### Design Template
115
+ ```markdown
116
+ ## Architecture Design
117
+
118
+ ### Reference
119
+ - Architecture Doc: [path]
120
+ - Pattern: [pattern from doc]
121
+
122
+ ### Layers Affected (from architecture doc)
123
+ - Layer 1: [components]
124
+ - Layer 2: [components]
125
+ - Layer 3: [components]
126
+
127
+ ### Data Flow (from architecture doc)
128
+ [Follow the data flow pattern defined in doc]
129
+
130
+ ### Dependencies
131
+ [List dependencies following DI pattern from doc]
132
+ ```
133
+
134
+ ### Gate
135
+ - [ ] Design follows architecture doc
136
+ - [ ] Layers properly defined
137
+ - [ ] Dependencies follow doc patterns
138
+
139
+ ---
140
+
141
+ ## Phase 3: IMPLEMENT
142
+
143
+ **Goal**: Code the feature following the architecture doc
144
+
145
+ ### Actions
146
+ 1. **Read implementation order from architecture doc**
147
+ 2. Follow the directory structure from doc
148
+ 3. Follow naming conventions from doc
149
+ 4. Use patterns defined in doc (DI, state management, etc.)
150
+
151
+ ### Implementation Checklist
152
+ ```markdown
153
+ ## Implementation (following [stack] architecture)
154
+
155
+ Reference: [architecture doc path]
156
+
157
+ ### Directory Structure (from doc)
158
+ [Follow exact structure from architecture doc]
159
+
160
+ ### Implementation Order (from doc)
161
+ [Follow order defined in architecture doc]
162
+
163
+ ### Code Conventions (from doc)
164
+ [Follow conventions defined in architecture doc]
165
+ ```
166
+
167
+ ### Gate
168
+ - [ ] Structure matches architecture doc
169
+ - [ ] All layers implemented per doc
170
+ - [ ] Code compiles without errors
171
+ - [ ] Basic functionality works
172
+
173
+ ---
174
+
175
+ ## Phase 4: REVIEW
176
+
177
+ **Goal**: Review code quality against architecture doc
178
+
179
+ ### Actions
180
+ 1. **Compare implementation with architecture doc**
181
+ 2. Check architecture rules are followed:
182
+ - [ ] Layer boundaries respected
183
+ - [ ] Dependencies flow correctly
184
+ - [ ] Patterns used correctly
185
+
186
+ 3. Security check:
187
+ - [ ] Input validation
188
+ - [ ] No sensitive data exposure
189
+ - [ ] Proper authentication/authorization
190
+
191
+ 4. Performance check:
192
+ - [ ] Efficient queries
193
+ - [ ] Proper caching (if in doc)
194
+ - [ ] No obvious bottlenecks
195
+
196
+ ### Review Output
197
+ ```markdown
198
+ ## Code Review Summary
199
+
200
+ ### Architecture Compliance: [Pass/Fail]
201
+ - Reference: [architecture doc]
202
+ - Issues: [list]
203
+
204
+ ### Quality: [Good/Needs Work]
205
+ - Issues: [list]
206
+
207
+ ### Security: [Pass/Fail]
208
+ - Issues: [list]
209
+
210
+ ### Performance: [Pass/Fail]
211
+ - Issues: [list]
212
+ ```
213
+
214
+ ### Gate
215
+ - [ ] Architecture doc followed
216
+ - [ ] No critical issues
217
+ - [ ] Security issues resolved
218
+
219
+ ### Feedback Loop
220
+ If issues found → Return to IMPLEMENT phase → Fix → Re-review
221
+
222
+ ---
223
+
224
+ ## Phase 5: TEST
225
+
226
+ **Goal**: Ensure feature works with tests
227
+
228
+ ### Actions
229
+ 1. **Read testing patterns from architecture doc**
230
+ 2. Write tests following doc conventions:
231
+ - Test locations from doc
232
+ - Mocking patterns from doc
233
+ - Coverage expectations from doc
234
+
235
+ 3. Run tests:
236
+ ```bash
237
+ # Use test command from architecture doc
238
+ flutter test # Flutter
239
+ go test ./... # Go
240
+ bun test # React/Remix
241
+ php artisan test # Laravel
242
+ ```
243
+
244
+ ### Gate
245
+ - [ ] Tests follow architecture doc patterns
246
+ - [ ] All tests pass
247
+ - [ ] Coverage acceptable
248
+
249
+ ### Feedback Loop
250
+ If tests fail → Return to IMPLEMENT → Fix → Re-test
251
+
252
+ ---
253
+
254
+ ## Phase 6: COMPLETE
255
+
256
+ **Goal**: Finalize and deliver the feature
257
+
258
+ ### Actions
259
+ 1. Final checks:
260
+ - [ ] All gates passed
261
+ - [ ] Code formatted (use formatter from doc)
262
+ - [ ] No TODO comments left
263
+
264
+ 2. Git operations:
265
+ ```bash
266
+ git add .
267
+ git commit -m "feat: [feature description]"
268
+ ```
269
+
270
+ 3. Create PR (if applicable):
271
+ ```bash
272
+ gh pr create --title "feat: [feature]" --body "[description]"
273
+ ```
274
+
275
+ ### Completion Checklist
276
+ - [ ] Feature follows architecture doc
277
+ - [ ] Tests passing
278
+ - [ ] Code reviewed
279
+ - [ ] Committed/PR created
280
+
281
+ ---
282
+
283
+ ## Quick Reference
284
+
285
+ ### Architecture Docs
286
+ | Stack | Doc |
287
+ |-------|-----|
288
+ | All | `clean-architecture.md` |
289
+ | Flutter | `flutter-mobile.md` |
290
+ | React | `react-frontend.md` |
291
+ | Go | `go-backend.md` |
292
+ | Laravel | `laravel-backend.md` |
293
+ | Remix | `remix-fullstack.md` |
294
+ | Monorepo | `monorepo.md` |
295
+
296
+ ### Phase Summary
297
+ | Phase | Key Actions |
298
+ |-------|-------------|
299
+ | PLAN | Read arch doc, clarify, breakdown |
300
+ | DESIGN | Design per arch doc |
301
+ | IMPLEMENT | Code per arch doc |
302
+ | REVIEW | Check arch compliance |
303
+ | TEST | Test per arch doc patterns |
304
+ | COMPLETE | Commit, PR |
305
+
306
+ ### When to Loop Back
307
+ - **REVIEW fails** → Return to IMPLEMENT
308
+ - **TEST fails** → Return to IMPLEMENT
309
+ - **Requirements change** → Return to PLAN
310
+
311
+ ### Success Criteria
312
+ Feature is complete when:
313
+ 1. Follows architecture doc
314
+ 2. All acceptance criteria met
315
+ 3. All tests passing
316
+ 4. Code review passed
317
+ 5. Committed/PR created
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAmC,MAAM,aAAa,CAAC;AA6QnF,eAAO,MAAM,cAAc,GAAU,SAAS,cAAc,KAAG,OAAO,CAAC,IAAI,CAqF1E,CAAC"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAmC,MAAM,aAAa,CAAC;AA6QnF,eAAO,MAAM,cAAc,GAAU,SAAS,cAAc,KAAG,OAAO,CAAC,IAAI,CAsF1E,CAAC"}
@@ -271,10 +271,11 @@ export const installCommand = async (options) => {
271
271
  console.log(' Commands:');
272
272
  console.log(chalk.gray(' /bootstrap Create new project'));
273
273
  console.log(chalk.gray(' /brainstorm Brainstorm ideas'));
274
+ console.log(chalk.gray(' /doc Generate documentation'));
274
275
  console.log('');
275
276
  console.log(' Skills (auto-triggered):');
276
- console.log(chalk.gray(' feature-workflow Feature development'));
277
- console.log(chalk.gray(' hotfix-workflow Bug fix with rollback'));
277
+ console.log(chalk.gray(' new-feature Feature development'));
278
+ console.log(chalk.gray(' hotfix Bug fix with rollback'));
278
279
  console.log('');
279
280
  }
280
281
  const otherTargets = targets.filter((t) => t !== 'claude');