moicle 1.7.0 → 2.1.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/README.md +76 -27
- package/assets/architecture/_shared/severity-levels.md +34 -0
- package/assets/architecture/_shared/stack-detection.md +34 -0
- package/assets/commands/marketing.md +7 -7
- package/assets/skills/docs/sync/SKILL.md +245 -0
- package/assets/skills/docs/write/SKILL.md +274 -0
- package/assets/skills/feature/api/SKILL.md +277 -0
- package/assets/skills/feature/deprecate/SKILL.md +276 -0
- package/assets/skills/feature/new/SKILL.md +273 -0
- package/assets/skills/feature/refactor/SKILL.md +269 -0
- package/assets/skills/fix/hotfix/SKILL.md +233 -0
- package/assets/skills/fix/incident/SKILL.md +360 -0
- package/assets/skills/fix/pr-comment/SKILL.md +186 -0
- package/assets/skills/fix/root-cause/SKILL.md +276 -0
- package/assets/skills/marketing/content/SKILL.md +269 -0
- package/assets/skills/marketing/logo/SKILL.md +252 -0
- package/assets/skills/marketing/seo-blog/SKILL.md +367 -0
- package/assets/skills/marketing/video/SKILL.md +258 -0
- package/assets/skills/research/onboarding/SKILL.md +225 -0
- package/assets/skills/research/spike/SKILL.md +228 -0
- package/assets/skills/research/web/SKILL.md +204 -0
- package/assets/skills/review/architect/SKILL.md +274 -0
- package/assets/skills/review/branch/SKILL.md +277 -0
- package/assets/skills/review/pr/SKILL.md +231 -0
- package/assets/skills/review/tdd/SKILL.md +245 -0
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +2 -2
- package/dist/commands/list.js.map +1 -1
- package/dist/utils/symlink.d.ts +7 -0
- package/dist/utils/symlink.d.ts.map +1 -1
- package/dist/utils/symlink.js +82 -0
- package/dist/utils/symlink.js.map +1 -1
- package/package.json +1 -1
- package/assets/skills/api-integration/SKILL.md +0 -883
- package/assets/skills/architect-review/SKILL.md +0 -393
- package/assets/skills/content-writer/SKILL.md +0 -721
- package/assets/skills/deep-debug/SKILL.md +0 -114
- package/assets/skills/deprecation/SKILL.md +0 -923
- package/assets/skills/documentation/SKILL.md +0 -1333
- package/assets/skills/fix-pr-comment/SKILL.md +0 -283
- package/assets/skills/hotfix/SKILL.md +0 -397
- package/assets/skills/incident-response/SKILL.md +0 -946
- package/assets/skills/logo-design/SKILL.md +0 -477
- package/assets/skills/new-feature/SKILL.md +0 -297
- package/assets/skills/onboarding/SKILL.md +0 -607
- package/assets/skills/pr-review/SKILL.md +0 -620
- package/assets/skills/refactor/SKILL.md +0 -338
- package/assets/skills/research/SKILL.md +0 -124
- package/assets/skills/review-changes/SKILL.md +0 -312
- package/assets/skills/spike/SKILL.md +0 -535
- package/assets/skills/sync-docs/SKILL.md +0 -575
- package/assets/skills/tdd/SKILL.md +0 -828
- package/assets/skills/video-content/SKILL.md +0 -651
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: new-feature
|
|
3
|
-
description: DDD feature development workflow with phase-based checks and review loop. Use when implementing new features, building functionality, or when user says "implement feature", "add feature", "build feature", "create feature", "new feature".
|
|
4
|
-
args: "[DOMAIN] [FEATURE]"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# DDD Feature Development Workflow
|
|
8
|
-
|
|
9
|
-
Build a new feature following DDD architecture, with automated checks after each phase and a review loop that keeps fixing until all checks pass.
|
|
10
|
-
|
|
11
|
-
**ARGUMENTS:** `<domain> <feature>` — e.g., `wallet savings`, `notification broadcast`, `catalog products`
|
|
12
|
-
|
|
13
|
-
## Read Architecture First
|
|
14
|
-
|
|
15
|
-
**Before starting, MUST read TWO files:**
|
|
16
|
-
|
|
17
|
-
1. **Core DDD spec**: `.claude/architecture/ddd-architecture.md`
|
|
18
|
-
2. **Stack-specific doc**: detect stack → read the corresponding architecture doc
|
|
19
|
-
|
|
20
|
-
### Stack Detection
|
|
21
|
-
| File | Stack Doc |
|
|
22
|
-
|------|-----------|
|
|
23
|
-
| `go.mod` | `go-backend.md` |
|
|
24
|
-
| `package.json` + `vite.config.*` | `react-frontend.md` |
|
|
25
|
-
| `pubspec.yaml` | `flutter-mobile.md` |
|
|
26
|
-
| `composer.json` | `laravel-backend.md` |
|
|
27
|
-
| `remix.config.*` | `remix-fullstack.md` |
|
|
28
|
-
|
|
29
|
-
### Architecture Files Location
|
|
30
|
-
```
|
|
31
|
-
.claude/architecture/{name}.md # Project-specific (priority)
|
|
32
|
-
~/.claude/architecture/{name}.md # Global
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Workflow
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
PHASE 1: Analyze & Plan
|
|
41
|
-
→ PHASE 2: Build Domain Layer
|
|
42
|
-
→ PHASE 3: Build Infrastructure Layer
|
|
43
|
-
→ PHASE 4: Build Application Layer
|
|
44
|
-
→ PHASE 5: Registration & Wiring
|
|
45
|
-
→ PHASE 6: Domain Tests
|
|
46
|
-
→ REVIEW LOOP (run /architect-review, fix issues, repeat until clean)
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## PHASE 1: Analyze & Plan
|
|
52
|
-
|
|
53
|
-
### 1.1 Read Architecture Docs
|
|
54
|
-
1. Read `ddd-architecture.md` (core DDD rules)
|
|
55
|
-
2. Read stack-specific architecture doc
|
|
56
|
-
3. Extract: DDD directory structure, layer rules, hard rules, forbidden imports, check scripts
|
|
57
|
-
|
|
58
|
-
### 1.2 Read Reference Module
|
|
59
|
-
Pick a SMALL existing module in the project as reference. Read ALL its files to understand exact patterns:
|
|
60
|
-
- Entities, value objects, events, ports, usecases
|
|
61
|
-
- Service, handler, DTOs, listeners
|
|
62
|
-
- Infrastructure store/API implementations
|
|
63
|
-
- Registration in router/provider/registry
|
|
64
|
-
|
|
65
|
-
### 1.3 Plan Feature
|
|
66
|
-
Present to user:
|
|
67
|
-
- All entities and their fields
|
|
68
|
-
- All endpoints/screens/UI (depending on stack)
|
|
69
|
-
- All domain events
|
|
70
|
-
- All value objects
|
|
71
|
-
- Business rules summary
|
|
72
|
-
- Files to create/modify
|
|
73
|
-
|
|
74
|
-
### Rule Check Phase 1
|
|
75
|
-
- [ ] Architecture docs read and understood
|
|
76
|
-
- [ ] Reference module read
|
|
77
|
-
- [ ] Plan presented and **user CONFIRMED** before continuing
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## PHASE 2: Build Domain Layer
|
|
82
|
-
|
|
83
|
-
Create in order: value objects → entities → events → ports → usecases
|
|
84
|
-
|
|
85
|
-
### 2.1 Value Objects (`valueobjects/`)
|
|
86
|
-
- Typed values with behavior methods
|
|
87
|
-
- Status with `IsTerminal()`, `CanTransitionTo()`
|
|
88
|
-
- **Only stdlib imports** — read Forbidden Imports from architecture doc
|
|
89
|
-
|
|
90
|
-
### 2.2 Entities (`entities/`)
|
|
91
|
-
- Constructor function/method
|
|
92
|
-
- Behavior methods that raise events (state transitions, calculations)
|
|
93
|
-
- Guard methods (isActive, canXxx)
|
|
94
|
-
- Business error types
|
|
95
|
-
- Only imports: stdlib + valueobjects + domain/shared
|
|
96
|
-
|
|
97
|
-
### 2.3 Events (`events/`)
|
|
98
|
-
- One file per event
|
|
99
|
-
- Extend/embed base event type
|
|
100
|
-
- Carry data needed by listeners (userID, amounts, names)
|
|
101
|
-
|
|
102
|
-
### 2.4 Ports (`ports/`)
|
|
103
|
-
- One file per interface
|
|
104
|
-
- Store interfaces use domain entity types and value objects
|
|
105
|
-
- DTOs for complex query results live here
|
|
106
|
-
- No infrastructure imports
|
|
107
|
-
|
|
108
|
-
### 2.5 UseCases (`usecases/`)
|
|
109
|
-
- Constructor with port dependencies + event dispatcher
|
|
110
|
-
- Split by concern: one file per action group
|
|
111
|
-
- Business logic lives HERE
|
|
112
|
-
- Dispatch entity events after successful save
|
|
113
|
-
- **No infrastructure imports** — read Forbidden Imports from architecture doc
|
|
114
|
-
|
|
115
|
-
### Rule Check Phase 2
|
|
116
|
-
Run the **Domain Purity** check scripts from the stack architecture doc:
|
|
117
|
-
```bash
|
|
118
|
-
# Example (Go):
|
|
119
|
-
go build ./internal/domain/$DOMAIN/... && echo "PASS" || echo "FAIL"
|
|
120
|
-
go vet ./internal/domain/$DOMAIN/... && echo "PASS" || echo "FAIL"
|
|
121
|
-
grep -rn {forbidden_imports} internal/domain/$DOMAIN/ && echo "FAIL" || echo "PASS"
|
|
122
|
-
|
|
123
|
-
# Example (React):
|
|
124
|
-
npx tsc --noEmit && echo "PASS" || echo "FAIL"
|
|
125
|
-
grep -rn "from 'react'" src/domain/$DOMAIN/ && echo "FAIL" || echo "PASS"
|
|
126
|
-
|
|
127
|
-
# Example (Flutter):
|
|
128
|
-
dart analyze lib/domain/$DOMAIN/ && echo "PASS" || echo "FAIL"
|
|
129
|
-
grep -rn "package:flutter" lib/domain/$DOMAIN/ && echo "FAIL" || echo "PASS"
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## PHASE 3: Build Infrastructure Layer
|
|
135
|
-
|
|
136
|
-
### 3.1 Persistence Models (if applicable)
|
|
137
|
-
- ORM models, Prisma schema, Freezed classes
|
|
138
|
-
- Table/collection configuration
|
|
139
|
-
- Helper functions for atomic updates
|
|
140
|
-
|
|
141
|
-
### 3.2 Store/API Implementation
|
|
142
|
-
- Implements port interfaces from domain
|
|
143
|
-
- Compile-time interface check (where language supports it)
|
|
144
|
-
- Mapper functions: domain entity ↔ persistence model
|
|
145
|
-
- NO business logic — pure persistence/communication
|
|
146
|
-
- Use context consistently
|
|
147
|
-
|
|
148
|
-
### Rule Check Phase 3
|
|
149
|
-
```bash
|
|
150
|
-
# Build infrastructure layer
|
|
151
|
-
{stack_build_command_for_infra}
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
---
|
|
155
|
-
|
|
156
|
-
## PHASE 4: Build Application Layer
|
|
157
|
-
|
|
158
|
-
### 4.1 Service
|
|
159
|
-
- Thin wrapper delegating to usecases
|
|
160
|
-
- Can orchestrate cross-domain calls if needed
|
|
161
|
-
|
|
162
|
-
### 4.2 Transport/Handler/Controller/Screen
|
|
163
|
-
- Registration/wiring function: create store → usecase → service → handler → routes
|
|
164
|
-
- Thin handlers: parse input → call service → return output
|
|
165
|
-
- DTOs in separate file
|
|
166
|
-
|
|
167
|
-
### 4.3 Listeners (if domain has events)
|
|
168
|
-
- One file per event
|
|
169
|
-
- Side-effects only (notifications, SSE, analytics, async jobs)
|
|
170
|
-
- Use background context for async work
|
|
171
|
-
- Register in event bus/registry
|
|
172
|
-
|
|
173
|
-
### Rule Check Phase 4
|
|
174
|
-
```bash
|
|
175
|
-
# Build application layer
|
|
176
|
-
{stack_build_command_for_application}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
|
|
181
|
-
## PHASE 5: Registration & Wiring
|
|
182
|
-
|
|
183
|
-
### 5.1 Router/Provider Registration
|
|
184
|
-
- Add routes/screens/providers for the new module
|
|
185
|
-
- Wire service dependencies between modules if needed
|
|
186
|
-
|
|
187
|
-
### 5.2 Persistence Setup
|
|
188
|
-
- Add model migrations/schemas
|
|
189
|
-
- Run migrations if needed
|
|
190
|
-
|
|
191
|
-
### 5.3 Event Registry
|
|
192
|
-
- Register all new event listeners
|
|
193
|
-
- Verify event name strings match between events and registry
|
|
194
|
-
|
|
195
|
-
### Rule Check Phase 5
|
|
196
|
-
```bash
|
|
197
|
-
# Full build
|
|
198
|
-
{stack_full_build_command}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
## PHASE 6: Domain Tests
|
|
204
|
-
|
|
205
|
-
### 6.1 Value Object Tests
|
|
206
|
-
- All status transitions
|
|
207
|
-
- Terminal states
|
|
208
|
-
- Behavior methods
|
|
209
|
-
- Edge cases
|
|
210
|
-
|
|
211
|
-
### 6.2 Entity Tests
|
|
212
|
-
- Constructor
|
|
213
|
-
- State transitions
|
|
214
|
-
- Event collection after state change
|
|
215
|
-
- Guard methods
|
|
216
|
-
- Edge cases (boundary values)
|
|
217
|
-
|
|
218
|
-
### 6.3 UseCase Tests
|
|
219
|
-
- Mock port interfaces
|
|
220
|
-
- Happy path for each method
|
|
221
|
-
- Validation errors
|
|
222
|
-
- Business rules
|
|
223
|
-
- Event dispatching
|
|
224
|
-
|
|
225
|
-
### Rule Check Phase 6
|
|
226
|
-
```bash
|
|
227
|
-
# Run domain tests
|
|
228
|
-
{stack_test_command_for_domain}
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
---
|
|
232
|
-
|
|
233
|
-
## REVIEW LOOP
|
|
234
|
-
|
|
235
|
-
After all phases complete, run the architecture review. **Keep looping until ALL checks pass.**
|
|
236
|
-
|
|
237
|
-
```
|
|
238
|
-
LOOP:
|
|
239
|
-
1. Run /architect-review {stack} {domain}
|
|
240
|
-
2. Collect violations
|
|
241
|
-
3. IF violations with severity >= MEDIUM:
|
|
242
|
-
a. Fix all violations
|
|
243
|
-
b. Run build to verify
|
|
244
|
-
c. Run tests to verify
|
|
245
|
-
d. GOTO 1
|
|
246
|
-
4. IF score >= B:
|
|
247
|
-
BREAK → Final Report
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
## Final Report
|
|
253
|
-
|
|
254
|
-
When review loop passes:
|
|
255
|
-
|
|
256
|
-
```markdown
|
|
257
|
-
## Feature Complete: {domain}/{feature}
|
|
258
|
-
|
|
259
|
-
### Files Created
|
|
260
|
-
- List all new files
|
|
261
|
-
|
|
262
|
-
### Files Modified
|
|
263
|
-
- List all modified files
|
|
264
|
-
|
|
265
|
-
### Endpoints/Screens (depending on stack)
|
|
266
|
-
| Method/Route | Description |
|
|
267
|
-
|-------------|-------------|
|
|
268
|
-
|
|
269
|
-
### Domain Events
|
|
270
|
-
| Event | Listeners |
|
|
271
|
-
|-------|-----------|
|
|
272
|
-
|
|
273
|
-
### Test Coverage
|
|
274
|
-
- X test files, Y test functions
|
|
275
|
-
- Areas covered: value objects, entities, usecases
|
|
276
|
-
|
|
277
|
-
### Review Status: ALL CHECKS PASS
|
|
278
|
-
- Build: PASS
|
|
279
|
-
- Lint: PASS
|
|
280
|
-
- Domain purity: PASS
|
|
281
|
-
- Tests: PASS (X/X)
|
|
282
|
-
- Architecture score: {A/B}
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
---
|
|
286
|
-
|
|
287
|
-
## Recommended Agents
|
|
288
|
-
|
|
289
|
-
| Phase | Agent | Purpose |
|
|
290
|
-
|-------|-------|---------|
|
|
291
|
-
| PLAN | `@clean-architect` | Architecture design |
|
|
292
|
-
| IMPLEMENT | Stack-specific dev agent | Code per architecture |
|
|
293
|
-
| IMPLEMENT | `@db-designer` | Database schema |
|
|
294
|
-
| IMPLEMENT | `@api-designer` | API design |
|
|
295
|
-
| REVIEW | `@code-reviewer` | Code quality |
|
|
296
|
-
| REVIEW | `@security-audit` | Security check |
|
|
297
|
-
| TEST | `@test-writer` | Write tests |
|