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.
package/README.md CHANGED
@@ -1,13 +1,21 @@
1
1
  # MoiCle
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/moicle.svg)](https://www.npmjs.com/package/moicle)
4
+ [![npm downloads](https://img.shields.io/npm/dm/moicle.svg)](https://www.npmjs.com/package/moicle)
5
+ [![license](https://img.shields.io/npm/l/moicle.svg)](https://github.com/phuthuycoding/moicle/blob/master/LICENSE)
6
+ [![node](https://img.shields.io/node/v/moicle.svg)](https://nodejs.org)
7
+ [![GitHub stars](https://img.shields.io/github/stars/phuthuycoding/moicle?style=social)](https://github.com/phuthuycoding/moicle)
8
+
3
9
  > Reusable AI agents, commands, skills, and architecture references for Claude Code
4
10
 
11
+ **If you find this project useful, please consider giving it a ⭐ on [GitHub](https://github.com/phuthuycoding/moicle)!**
12
+
5
13
  A toolkit to bootstrap and accelerate project development with Claude Code through specialized agents, automation commands, workflow skills, and unified architecture references.
6
14
 
7
15
  ## Features
8
16
 
9
17
  - **15 AI Agents** - Specialized agents for each tech stack and task
10
- - **2 Commands** - Automation wizards for project setup and brainstorming
18
+ - **3 Commands** - Automation wizards for project setup, brainstorming, and documentation
11
19
  - **2 Skills** - Auto-triggered workflows for feature development and hotfix
12
20
  - **7 Architecture References** - Clean Architecture patterns for all stacks
13
21
 
@@ -89,19 +97,20 @@ moicle install
89
97
  | `@security-audit` | Security vulnerability analysis |
90
98
  | `@test-writer` | Unit & integration test writing |
91
99
 
92
- ### Commands (2)
100
+ ### Commands (3)
93
101
 
94
102
  | Command | Description |
95
103
  |---------|-------------|
96
104
  | `/bootstrap` | Wizard to create new project with 5 stack options |
97
105
  | `/brainstorm` | Brainstorm ideas with 6 frameworks |
106
+ | `/doc` | Scan project and generate documentation |
98
107
 
99
108
  ### Skills (2)
100
109
 
101
110
  | Skill | Trigger |
102
111
  |-------|---------|
103
- | `feature-workflow` | "implement feature", "add feature" |
104
- | `hotfix-workflow` | "fix bug", "hotfix", "urgent fix" |
112
+ | `new-feature` | "implement feature", "add feature", "build feature" |
113
+ | `hotfix` | "fix bug", "hotfix", "urgent fix", "production issue" |
105
114
 
106
115
  ## Architecture-First Approach
107
116
 
@@ -126,6 +135,29 @@ When an agent is invoked, it **reads the architecture file first** before coding
126
135
 
127
136
  ## Usage Examples
128
137
 
138
+ ### Using Commands
139
+
140
+ ```bash
141
+ # Bootstrap new project
142
+ /bootstrap # Interactive wizard
143
+ /bootstrap go # Quick start with Go + Gin
144
+ /bootstrap react # Quick start with React + Vite
145
+ /bootstrap flutter # Quick start with Flutter
146
+ /bootstrap landing using monorepo # Create landing page with monorepo structure
147
+
148
+ # Brainstorm ideas
149
+ /brainstorm # Interactive framework selection
150
+ /brainstorm first-principles # Use First Principles framework
151
+ /brainstorm scamper # Use SCAMPER framework
152
+ /brainstorm design-thinking # Use Design Thinking framework
153
+
154
+ # Generate documentation
155
+ /doc # Interactive documentation wizard
156
+ /doc diagrams # Generate architecture diagrams
157
+ /doc usecases # Generate use case specifications
158
+ /doc workflows # Generate workflow documentation
159
+ ```
160
+
129
161
  ### Using Agents
130
162
 
131
163
  ```bash
@@ -1,12 +1,30 @@
1
1
  ---
2
2
  name: bootstrap
3
- description: Bootstrap a new project with Claude Code support
3
+ description: Bootstrap a new project with Claude Code support. Use when user says "/bootstrap", "new project", "create project", "init project", "start project".
4
4
  ---
5
5
 
6
6
  # Bootstrap New Project
7
7
 
8
8
  You are a project bootstrapping assistant. Guide the user through creating a new project with proper Claude Code support.
9
9
 
10
+ ## Usage
11
+
12
+ ```
13
+ /bootstrap
14
+ /bootstrap go # Quick start with Go
15
+ /bootstrap react # Quick start with React
16
+ /bootstrap flutter # Quick start with Flutter
17
+ ```
18
+
19
+ ## Workflow
20
+
21
+ ```
22
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
23
+ │ Brainstorm? │──▶│ Select Stack│──▶│ Read Arch │──▶│ Create │──▶│ Setup │
24
+ │ (Optional) │ │ │ │ Reference │ │ Project │ │ CLAUDE.md │
25
+ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
26
+ ```
27
+
10
28
  ## IMPORTANT: Architecture Reference
11
29
 
12
30
  Before creating any project structure, you MUST read the architecture reference files:
@@ -19,6 +37,21 @@ Before creating any project structure, you MUST read the architecture reference
19
37
  - **Flutter Mobile**: `~/.claude/architecture/flutter-mobile.md`
20
38
  - **Monorepo**: `~/.claude/architecture/monorepo.md`
21
39
 
40
+ ## Step 0: Brainstorm First?
41
+
42
+ Ask the user if they want to brainstorm before creating the project:
43
+
44
+ ```
45
+ Do you have a clear idea for your project?
46
+
47
+ 1. Yes, let's create the project
48
+ 2. Not yet, let's brainstorm first
49
+ ```
50
+
51
+ If user selects **option 2**, run the `/brainstorm` command immediately. After brainstorming is complete, continue with Step 1.
52
+
53
+ ---
54
+
22
55
  ## Step 1: Select Stack
23
56
 
24
57
  Ask the user to select their preferred stack:
@@ -442,9 +442,10 @@ QUESTIONS TO EXPLORE FURTHER:
442
442
 
443
443
  ## Documention
444
444
 
445
- When you completed branstorm ask user do have create diagram document ?
446
- Select list diagram bellow:
445
+ Document save to folder `docs` in project root directory.
447
446
 
447
+ ### When you completed branstorm ask user do have create diagram document ?
448
+ Select list diagram bellow:
448
449
  1. Class Diagram
449
450
  2. Sequence Diagram
450
451
  3. Use Case Diagram
@@ -452,4 +453,5 @@ Select list diagram bellow:
452
453
  5. State Diagram
453
454
  6. Component Diagram
454
455
  7. Deployment Diagram
455
- 8. Collaboration Diagram
456
+ 8. Collaboration Diagram
457
+
@@ -0,0 +1,346 @@
1
+ ---
2
+ name: doc
3
+ description: Scan project and generate documentation. Use when user says "/doc", "generate docs", "create documentation", "document project".
4
+ ---
5
+
6
+ # Project Documentation Generator
7
+
8
+ Scan your project and generate essential documentation.
9
+
10
+ ## Step 1: Scan Project
11
+
12
+ First, analyze the project structure:
13
+
14
+ 1. **Read architecture docs** (if exists):
15
+ ```
16
+ ~/.claude/architecture/
17
+ .claude/architecture/
18
+ ```
19
+
20
+ 2. **Scan project structure**:
21
+ - Identify project type (frontend, backend, fullstack, mobile)
22
+ - Identify tech stack
23
+ - List main modules/features
24
+ - Identify APIs/endpoints
25
+ - Identify data models/entities
26
+
27
+ 3. **Output scan results**:
28
+ ```markdown
29
+ ## Project Scan Results
30
+
31
+ ### Project Info
32
+ - Type: [frontend/backend/fullstack/mobile]
33
+ - Stack: [detected stack]
34
+ - Architecture: [detected pattern]
35
+
36
+ ### Modules/Features Found
37
+ - Module 1: [description]
38
+ - Module 2: [description]
39
+
40
+ ### APIs/Endpoints
41
+ - GET /api/...
42
+ - POST /api/...
43
+
44
+ ### Data Models
45
+ - Entity 1
46
+ - Entity 2
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Step 2: Ask User - What to Generate?
52
+
53
+ Present options to user:
54
+
55
+ ```
56
+ Which documentation do you want to generate?
57
+
58
+ 1. 📊 Diagrams
59
+ - System Architecture Diagram
60
+ - Database ER Diagram
61
+ - Sequence Diagrams
62
+ - Component Diagram
63
+
64
+ 2. 📋 Use Case Specifications
65
+ - Actor definitions
66
+ - Use case descriptions
67
+ - Pre/post conditions
68
+ - Main/alternative flows
69
+
70
+ 3. 🔄 Workflow Documentation
71
+ - Business process flows
72
+ - State machine diagrams
73
+ - User journey maps
74
+ - Data flow diagrams
75
+
76
+ 4. 📚 All of the above
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Step 3: Generate Selected Documentation
82
+
83
+ ### Option 1: Diagrams
84
+
85
+ Generate using Mermaid syntax:
86
+
87
+ #### System Architecture Diagram
88
+ ```mermaid
89
+ graph TB
90
+ subgraph Frontend
91
+ UI[User Interface]
92
+ State[State Management]
93
+ end
94
+
95
+ subgraph Backend
96
+ API[API Layer]
97
+ Service[Service Layer]
98
+ Repo[Repository Layer]
99
+ end
100
+
101
+ subgraph Database
102
+ DB[(Database)]
103
+ end
104
+
105
+ UI --> State
106
+ State --> API
107
+ API --> Service
108
+ Service --> Repo
109
+ Repo --> DB
110
+ ```
111
+
112
+ #### Database ER Diagram
113
+ ```mermaid
114
+ erDiagram
115
+ USER ||--o{ ORDER : places
116
+ ORDER ||--|{ ORDER_ITEM : contains
117
+ PRODUCT ||--o{ ORDER_ITEM : "ordered in"
118
+ ```
119
+
120
+ #### Sequence Diagram
121
+ ```mermaid
122
+ sequenceDiagram
123
+ actor User
124
+ participant UI
125
+ participant API
126
+ participant Service
127
+ participant DB
128
+
129
+ User->>UI: Action
130
+ UI->>API: Request
131
+ API->>Service: Process
132
+ Service->>DB: Query
133
+ DB-->>Service: Result
134
+ Service-->>API: Response
135
+ API-->>UI: Data
136
+ UI-->>User: Display
137
+ ```
138
+
139
+ #### Component Diagram
140
+ ```mermaid
141
+ graph LR
142
+ subgraph Presentation
143
+ A[Views]
144
+ B[ViewModels]
145
+ end
146
+
147
+ subgraph Domain
148
+ C[Use Cases]
149
+ D[Entities]
150
+ E[Repository Interfaces]
151
+ end
152
+
153
+ subgraph Data
154
+ F[Repositories]
155
+ G[Data Sources]
156
+ H[Models]
157
+ end
158
+
159
+ A --> B
160
+ B --> C
161
+ C --> D
162
+ C --> E
163
+ E --> F
164
+ F --> G
165
+ G --> H
166
+ ```
167
+
168
+ ---
169
+
170
+ ### Option 2: Use Case Specifications
171
+
172
+ Generate for each feature:
173
+
174
+ ```markdown
175
+ # Use Case: [Name]
176
+
177
+ ## Overview
178
+ - **ID**: UC-001
179
+ - **Name**: [Use Case Name]
180
+ - **Actor**: [Primary Actor]
181
+ - **Description**: [Brief description]
182
+
183
+ ## Preconditions
184
+ - [ ] Condition 1
185
+ - [ ] Condition 2
186
+
187
+ ## Postconditions
188
+ - [ ] Success outcome 1
189
+ - [ ] Success outcome 2
190
+
191
+ ## Main Flow
192
+ 1. Actor does X
193
+ 2. System responds with Y
194
+ 3. Actor does Z
195
+ 4. System completes action
196
+
197
+ ## Alternative Flows
198
+
199
+ ### A1: [Alternative Name]
200
+ - Trigger: [when this happens]
201
+ - Steps:
202
+ 1. Step 1
203
+ 2. Step 2
204
+ - Resume: [where to resume in main flow]
205
+
206
+ ### A2: [Another Alternative]
207
+ - Trigger: [when this happens]
208
+ - Steps:
209
+ 1. Step 1
210
+ - Resume: [where to resume]
211
+
212
+ ## Exception Flows
213
+
214
+ ### E1: [Error Name]
215
+ - Trigger: [error condition]
216
+ - Steps:
217
+ 1. System shows error
218
+ 2. Actor acknowledges
219
+ - End state: [how it ends]
220
+
221
+ ## Business Rules
222
+ - BR1: [Rule description]
223
+ - BR2: [Rule description]
224
+
225
+ ## UI Requirements
226
+ - Screen: [Screen name]
227
+ - Components: [List of UI components]
228
+ ```
229
+
230
+ ---
231
+
232
+ ### Option 3: Workflow Documentation
233
+
234
+ #### Business Process Flow
235
+ ```mermaid
236
+ flowchart TD
237
+ A[Start] --> B{Check Condition}
238
+ B -->|Yes| C[Process A]
239
+ B -->|No| D[Process B]
240
+ C --> E[Validate]
241
+ D --> E
242
+ E --> F{Valid?}
243
+ F -->|Yes| G[Complete]
244
+ F -->|No| H[Error Handler]
245
+ H --> B
246
+ G --> I[End]
247
+ ```
248
+
249
+ #### State Machine
250
+ ```mermaid
251
+ stateDiagram-v2
252
+ [*] --> Draft
253
+ Draft --> Pending: Submit
254
+ Pending --> Approved: Approve
255
+ Pending --> Rejected: Reject
256
+ Rejected --> Draft: Revise
257
+ Approved --> Published: Publish
258
+ Published --> [*]
259
+ ```
260
+
261
+ #### User Journey Map
262
+ ```markdown
263
+ # User Journey: [Feature Name]
264
+
265
+ ## Persona
266
+ - Name: [User type]
267
+ - Goal: [What they want to achieve]
268
+
269
+ ## Journey Stages
270
+
271
+ ### 1. Discovery
272
+ - Action: [What user does]
273
+ - Touchpoint: [Where it happens]
274
+ - Emotion: [How they feel]
275
+ - Pain points: [Frustrations]
276
+
277
+ ### 2. Consideration
278
+ - Action: [What user does]
279
+ - Touchpoint: [Where it happens]
280
+ - Emotion: [How they feel]
281
+ - Pain points: [Frustrations]
282
+
283
+ ### 3. Decision
284
+ - Action: [What user does]
285
+ - Touchpoint: [Where it happens]
286
+ - Emotion: [How they feel]
287
+ - Pain points: [Frustrations]
288
+
289
+ ### 4. Action
290
+ - Action: [What user does]
291
+ - Touchpoint: [Where it happens]
292
+ - Emotion: [How they feel]
293
+ - Pain points: [Frustrations]
294
+
295
+ ### 5. Retention
296
+ - Action: [What user does]
297
+ - Touchpoint: [Where it happens]
298
+ - Emotion: [How they feel]
299
+ - Pain points: [Frustrations]
300
+ ```
301
+
302
+ ---
303
+
304
+ ## Output Location
305
+
306
+ Ask user where to save documentation:
307
+
308
+ 1. **Project docs folder**: `./docs/`
309
+ 2. **Architecture folder**: `./.claude/docs/`
310
+ 3. **Custom location**: User specified
311
+
312
+ ## File Structure
313
+ ```
314
+ docs/
315
+ ├── diagrams/
316
+ │ ├── architecture.md
317
+ │ ├── database-er.md
318
+ │ └── sequences/
319
+ │ └── [feature]-sequence.md
320
+ ├── use-cases/
321
+ │ └── [feature]-usecase.md
322
+ └── workflows/
323
+ ├── business-flows.md
324
+ ├── state-machines.md
325
+ └── user-journeys.md
326
+ ```
327
+
328
+ ---
329
+
330
+ ## Quick Reference
331
+
332
+ ### Diagram Types
333
+ | Type | Purpose | Tool |
334
+ |------|---------|------|
335
+ | Architecture | System overview | Mermaid graph |
336
+ | ER Diagram | Database schema | Mermaid erDiagram |
337
+ | Sequence | Interactions | Mermaid sequenceDiagram |
338
+ | Flowchart | Process flow | Mermaid flowchart |
339
+ | State | State transitions | Mermaid stateDiagram |
340
+
341
+ ### When to Use
342
+ | Doc Type | Best For |
343
+ |----------|----------|
344
+ | Diagrams | Visual overview, onboarding |
345
+ | Use Cases | Feature requirements, testing |
346
+ | Workflows | Process documentation, automation |