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.
Files changed (53) hide show
  1. package/README.md +76 -27
  2. package/assets/architecture/_shared/severity-levels.md +34 -0
  3. package/assets/architecture/_shared/stack-detection.md +34 -0
  4. package/assets/commands/marketing.md +7 -7
  5. package/assets/skills/docs/sync/SKILL.md +245 -0
  6. package/assets/skills/docs/write/SKILL.md +274 -0
  7. package/assets/skills/feature/api/SKILL.md +277 -0
  8. package/assets/skills/feature/deprecate/SKILL.md +276 -0
  9. package/assets/skills/feature/new/SKILL.md +273 -0
  10. package/assets/skills/feature/refactor/SKILL.md +269 -0
  11. package/assets/skills/fix/hotfix/SKILL.md +233 -0
  12. package/assets/skills/fix/incident/SKILL.md +360 -0
  13. package/assets/skills/fix/pr-comment/SKILL.md +186 -0
  14. package/assets/skills/fix/root-cause/SKILL.md +276 -0
  15. package/assets/skills/marketing/content/SKILL.md +269 -0
  16. package/assets/skills/marketing/logo/SKILL.md +252 -0
  17. package/assets/skills/marketing/seo-blog/SKILL.md +367 -0
  18. package/assets/skills/marketing/video/SKILL.md +258 -0
  19. package/assets/skills/research/onboarding/SKILL.md +225 -0
  20. package/assets/skills/research/spike/SKILL.md +228 -0
  21. package/assets/skills/research/web/SKILL.md +204 -0
  22. package/assets/skills/review/architect/SKILL.md +274 -0
  23. package/assets/skills/review/branch/SKILL.md +277 -0
  24. package/assets/skills/review/pr/SKILL.md +231 -0
  25. package/assets/skills/review/tdd/SKILL.md +245 -0
  26. package/dist/commands/list.d.ts.map +1 -1
  27. package/dist/commands/list.js +2 -2
  28. package/dist/commands/list.js.map +1 -1
  29. package/dist/utils/symlink.d.ts +7 -0
  30. package/dist/utils/symlink.d.ts.map +1 -1
  31. package/dist/utils/symlink.js +82 -0
  32. package/dist/utils/symlink.js.map +1 -1
  33. package/package.json +1 -1
  34. package/assets/skills/api-integration/SKILL.md +0 -883
  35. package/assets/skills/architect-review/SKILL.md +0 -393
  36. package/assets/skills/content-writer/SKILL.md +0 -721
  37. package/assets/skills/deep-debug/SKILL.md +0 -114
  38. package/assets/skills/deprecation/SKILL.md +0 -923
  39. package/assets/skills/documentation/SKILL.md +0 -1333
  40. package/assets/skills/fix-pr-comment/SKILL.md +0 -283
  41. package/assets/skills/hotfix/SKILL.md +0 -397
  42. package/assets/skills/incident-response/SKILL.md +0 -946
  43. package/assets/skills/logo-design/SKILL.md +0 -477
  44. package/assets/skills/new-feature/SKILL.md +0 -297
  45. package/assets/skills/onboarding/SKILL.md +0 -607
  46. package/assets/skills/pr-review/SKILL.md +0 -620
  47. package/assets/skills/refactor/SKILL.md +0 -338
  48. package/assets/skills/research/SKILL.md +0 -124
  49. package/assets/skills/review-changes/SKILL.md +0 -312
  50. package/assets/skills/spike/SKILL.md +0 -535
  51. package/assets/skills/sync-docs/SKILL.md +0 -575
  52. package/assets/skills/tdd/SKILL.md +0 -828
  53. package/assets/skills/video-content/SKILL.md +0 -651
@@ -0,0 +1,204 @@
1
+ ---
2
+ name: research-web
3
+ description: Research solutions on the internet for a given topic or the current conversation context. Use when user says "research", "tìm giải pháp", "search solution", "investigate", "find best practice", "so sánh giải pháp".
4
+ args: "[TOPIC]"
5
+ ---
6
+
7
+ # Research Solutions
8
+
9
+ Research solutions on the web for a specific problem. Output: a written recommendation with sources. **Never implement** — wait for user approval, then hand off to `/feature:new` / `/research:spike`.
10
+
11
+ **ARGUMENTS:** (optional) topic to research. If omitted, infer from current conversation context.
12
+
13
+ ## When to use this skill
14
+
15
+ - ✅ You don't know the right solution / library / pattern yet
16
+ - ✅ Need to compare multiple approaches before committing
17
+ - ✅ Stack / framework changed, best practices may have shifted
18
+ - ❌ You already know the approach → `/feature:new` or `/fix:hotfix`
19
+ - ❌ Want to validate by building → `/research:spike`
20
+ - ❌ Debugging a known bug → `/fix:root-cause`
21
+
22
+ ---
23
+
24
+ ## Workflow
25
+
26
+ ```
27
+ IDENTIFY → DETECT STACK → SEARCH → SYNTHESIZE → PROPOSE
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Step 1: IDENTIFY
33
+
34
+ ### Mode 1 — argument provided
35
+ - Use the argument as the topic
36
+ - If too broad, narrow using project context **before** any search
37
+
38
+ ### Mode 2 — no argument
39
+ - Analyze conversation: recent messages, open file, current task
40
+ - **Summarize the problem back to user, get confirmation** before burning search budget
41
+
42
+ ### Research budget guide
43
+
44
+ | Scope | Budget | When to stop |
45
+ |-------|--------|--------------|
46
+ | Quick lookup (API behavior, error meaning) | 2-3 queries | First authoritative source confirms |
47
+ | Solution comparison (2-3 options) | 5-8 queries | Each option has ≥2 independent sources |
48
+ | Deep dive (new pattern, unfamiliar domain) | 10-15 queries | Recommendation is defensible |
49
+
50
+ **Hard cap:** if you hit 15 queries without converging → stop, report what's found + ask user to narrow.
51
+
52
+ ### Gate
53
+ - [ ] Problem statement confirmed (Mode 2)
54
+ - [ ] Scope narrow enough to fit in budget
55
+ - [ ] Budget agreed (default: 5-8 queries)
56
+
57
+ ---
58
+
59
+ ## Step 2: DETECT STACK
60
+
61
+ Use `~/.claude/architecture/_shared/stack-detection.md` for canonical detection rules.
62
+
63
+ Capture for filter use:
64
+ - Language + version (e.g., `Go 1.22`, `Node 20`, `Dart 3.4`)
65
+ - Framework + version (e.g., `NestJS 10`, `Vite 5`, `Laravel 11`)
66
+ - Architecture pattern (DDD / hexagonal / etc. — from project's architecture doc)
67
+ - Hard constraints (license, runtime, infra — e.g., "must run on Cloudflare Workers")
68
+
69
+ ### Gate
70
+ - [ ] Stack + version identified
71
+ - [ ] Architecture context noted
72
+ - [ ] Hard constraints captured
73
+
74
+ ---
75
+
76
+ ## Step 3: SEARCH
77
+
78
+ ### Strategy
79
+ 1. **Broad first** — overview, common approaches, "X vs Y" comparisons
80
+ 2. **Deep dive** — official docs, GitHub issues, release notes, authoritative blogs
81
+ 3. **Counter-search** — actively look for criticism / failure stories of the leading option
82
+
83
+ ### Source priority
84
+
85
+ | Priority | Source | Weight |
86
+ |----------|--------|--------|
87
+ | 1 | Official docs (current version) | Highest |
88
+ | 2 | GitHub issues / release notes (project itself) | High — for quirks + known bugs |
89
+ | 3 | Stack Overflow accepted answers (high score, recent) | Medium-high |
90
+ | 4 | Authoritative blogs (framework authors, well-known engineers) | Medium |
91
+ | 5 | Tutorials, course material | Low — risk of outdated patterns |
92
+ | 6 | AI-generated content | Skip unless you can verify against #1-#4 |
93
+
94
+ ### Search tips
95
+ - **Prefer English queries** — richer index; supplement with framework's primary docs language (e.g., Vietnamese for niche local libs)
96
+ - Include library + version when version-sensitive: `nestjs 10 typeorm migrations`
97
+ - Quote exact error messages
98
+ - Cross-validate ≥2 independent sources before concluding
99
+
100
+ ### When sources conflict
101
+
102
+ Decision tree:
103
+ 1. **Different versions?** → trust the one matching project version
104
+ 2. **One is official docs?** → trust official
105
+ 3. **Different dates, same authority?** → trust newest, note the change
106
+ 4. **Same date, different authority?** → trust higher-authority source per priority table
107
+ 5. **Cannot resolve?** → present both, recommend the lower-risk option, explain trade-off
108
+
109
+ Always **note the conflict** in the report — don't silently pick one side.
110
+
111
+ ### Gate
112
+ - [ ] ≥2 independent sources per option
113
+ - [ ] Sources <2 years old (or evergreen explicitly justified)
114
+ - [ ] Counter-search done for the leading option
115
+
116
+ ---
117
+
118
+ ## Step 4: SYNTHESIZE
119
+
120
+ ### Comparison matrix (when ≥2 options)
121
+
122
+ ```markdown
123
+ | Criterion | Option A | Option B | Option C |
124
+ |-----------|----------|----------|----------|
125
+ | Maintenance status | active (releases 2025) | last release 2023 | active |
126
+ | License | MIT | Apache-2.0 | BSL (commercial) |
127
+ | Stack fit ({your stack}) | native support | adapter required | native |
128
+ | Performance (cite source) | 8k rps (link) | 5k rps | 12k rps |
129
+ | Operational complexity | low | medium | high |
130
+ | Community size | 25k stars | 8k stars | 2k stars |
131
+ | Known issues | #1234 (workaround exists) | #56 (no fix) | none |
132
+ | Migration cost from current | low | medium | high |
133
+ ```
134
+
135
+ ### Report template
136
+
137
+ ```markdown
138
+ ## Problem
139
+ {One paragraph: what we're solving, stack, constraints, goal}
140
+
141
+ ## Options Considered
142
+ {Brief: A, B, C — one line each on what they are}
143
+
144
+ ## Comparison
145
+ {matrix above}
146
+
147
+ ## Recommendation
148
+ **{Option X}** because {1-2 strongest reasons backed by sources}.
149
+
150
+ Trade-off: {what we give up by picking X over the runner-up}.
151
+
152
+ ## Pseudo-code (not for direct implementation)
153
+ {Minimal sketch showing how X fits the project — adapt before shipping}
154
+
155
+ ## Caveats
156
+ - {gotcha 1 with source link}
157
+ - {gotcha 2}
158
+
159
+ ## Conflicts in sources
160
+ - {if any — what disagreed, how it was resolved}
161
+
162
+ ## References
163
+ - {url} — {what this gave us}
164
+ - ...
165
+ ```
166
+
167
+ ### Gate
168
+ - [ ] Recommendation is explicit (don't say "both are fine")
169
+ - [ ] Trade-off named (what's lost by picking the winner)
170
+ - [ ] Every non-trivial claim has a source link
171
+ - [ ] Pseudo-code clearly marked as **not** for direct copy-paste
172
+
173
+ ---
174
+
175
+ ## Hard Rules
176
+
177
+ - **Research and propose — do NOT implement.** Wait for user confirmation
178
+ - **Stack context matters** — idiomatic in one project, wrong in another
179
+ - **Narrow when too broad** — "how to do auth" → "JWT refresh flow with NestJS + Passport"
180
+ - **Flag stale answers** — if top result is 3+ years old and lib has major versions since, check release notes
181
+ - **No hallucinated APIs** — verify method / option exists in official docs
182
+ - **Cite every non-trivial claim**
183
+ - **Note conflicts** between sources, don't silently pick
184
+ - **Honor the budget** — 15 queries is the hard cap
185
+
186
+ ---
187
+
188
+ ## Related Skills
189
+
190
+ | When | Use |
191
+ |------|-----|
192
+ | Want to validate the chosen approach by prototyping | `/research:spike` |
193
+ | Already know the approach, ready to build | `/feature:new` / `/fix:hotfix` |
194
+ | Debugging a known bug | `/fix:root-cause` |
195
+ | Write up the research as a design doc / ADR | `/docs:write` |
196
+
197
+ ## Recommended Agents
198
+
199
+ | Phase | Agent | Purpose |
200
+ |-------|-------|---------|
201
+ | Search | `@docs-writer` | Frame output as design note |
202
+ | Synthesize (API topics) | `@api-designer` | API pattern depth |
203
+ | Synthesize (auth / crypto / data) | `@security-audit` | Security implications |
204
+ | Synthesize (perf-sensitive) | `@perf-optimizer` | Benchmark interpretation |
@@ -0,0 +1,274 @@
1
+ ---
2
+ name: review-architect
3
+ description: DDD architecture compliance review with automated checks and review loop. Use when user says "architect-review", "architecture review", "review architecture", "check architecture", "review ddd", "ddd review".
4
+ args: "[ARCHITECTURE_NAME] [DOMAIN]"
5
+ ---
6
+
7
+ # DDD Architecture Review
8
+
9
+ Audit a codebase (or a single domain) against DDD rules with automated checks, manual review, and a fix loop until score ≥ B.
10
+
11
+ ## When to use this skill
12
+
13
+ - ✅ Verify DDD compliance after `/feature:new` or `/feature:refactor`
14
+ - ✅ Periodic audit of an existing codebase
15
+ - ✅ Quality gate before merging architectural changes
16
+ - ❌ Full PR review (arch + code + security + tests) → use `/review:pr`
17
+ - ❌ Self-review own branch before push → use `/review:branch`
18
+ - ❌ Security-only audit → use `@security-audit` agent
19
+
20
+ ## Usage
21
+
22
+ ```
23
+ /review:architect <architecture> [domain]
24
+ /review:architect # auto-detect stack
25
+ ```
26
+
27
+ Examples: `/review:architect go-backend wallet`, `/review:architect react-frontend`.
28
+
29
+ ## Supported architectures
30
+
31
+ Aliases: `ddd → ddd-architecture`, `go → go-backend`, `react → react-frontend`, `flutter → flutter-mobile`, `laravel → laravel-backend`, `remix → remix-fullstack`, `nestjs → nodejs-nestjs`, `mono → monorepo`.
32
+
33
+ Files live at `.claude/architecture/{name}.md` (project) → `~/.claude/architecture/{name}.md` (global).
34
+
35
+ ---
36
+
37
+ ## Workflow
38
+
39
+ ```
40
+ RESOLVE → LOAD RULES → AUTOMATED CHECKS → MANUAL REVIEW → REPORT → FIX LOOP
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Phase 0: RESOLVE ARCHITECTURE
46
+
47
+ ### Argument provided
48
+ 1. Normalize via alias table → search project then global
49
+ 2. Found → Phase 1. Not found → reject with available list, STOP.
50
+
51
+ ### No argument
52
+ 1. Detect stack via `~/.claude/architecture/_shared/stack-detection.md`
53
+ 2. Detected → confirm with user. Not detected → list options, ask.
54
+
55
+ ### Gate
56
+ - [ ] Architecture file loaded
57
+ - [ ] Domain identified (if scoped)
58
+
59
+ ---
60
+
61
+ ## Phase 1: LOAD RULES
62
+
63
+ Read `ddd-architecture.md` (core) + the stack doc. Extract:
64
+ - DDD directory layout
65
+ - Layer import rules + forbidden imports
66
+ - Hard rules (HR1-HR15)
67
+ - Stack-specific check scripts
68
+ - Wiring + test patterns
69
+
70
+ ### Gate
71
+ - [ ] Core + stack rules loaded
72
+ - [ ] Check scripts extracted
73
+ - [ ] Review checklist prepared
74
+
75
+ ---
76
+
77
+ ## Phase 2: AUTOMATED CHECKS
78
+
79
+ Run the stack-specific check scripts from the architecture doc. They follow this universal pattern (adapt per stack):
80
+
81
+ ```bash
82
+ echo "R1: Build" ; {build} && echo PASS || echo FAIL
83
+ echo "R2: Lint/Vet" ; {lint} && echo PASS || echo FAIL
84
+ echo "R3: Domain pure" ; {grep_forbidden in domain/} && echo FAIL || echo PASS
85
+ echo "R4: No cross-dom" ; {grep_domain_A in domain_B} && echo FAIL || echo PASS
86
+ echo "R5: No cycles" ; {cycle_check} && echo FAIL || echo PASS
87
+ echo "R6: Tests exist" ; {find_tests_in_domain} | wc -l
88
+ echo "R7: Tests pass" ; {test} && echo PASS || echo FAIL
89
+ echo "R8: Wiring reg" ; {check_routes_registered}
90
+ echo "R9: Event names" ; {check_event_consistency}
91
+ echo "R10: Async ctx" ; {check_no_request_context_in_goroutines}
92
+ ```
93
+
94
+ Record PASS/FAIL per check. Continue to Phase 3 either way — manual review catches what automated misses.
95
+
96
+ ### Gate
97
+ - [ ] All 10 automated checks run
98
+ - [ ] PASS/FAIL recorded
99
+
100
+ ---
101
+
102
+ ## Phase 3: MANUAL REVIEW
103
+
104
+ Focus on **architecture structure**, not business correctness. 10 areas:
105
+
106
+ ### D — Directory Structure
107
+ - D1 `domain/{domain}/` exists with proper subdirs
108
+ - D2 Has `entities/`, `ports/`, `usecases/` at minimum
109
+ - D3 `valueobjects/` separate (not mixed in entities)
110
+ - D4 `events/` separate, 1 file per event
111
+ - D5 Application layer: `ports/{transport}/`, `services/`, `listeners/`
112
+ - D6 Infrastructure implements ports
113
+ - D7 No legacy dirs (`modules/`, flat structure)
114
+
115
+ ### E — Entities
116
+ - E1 Has constructor (`New{Entity}` / `create()`)
117
+ - E2 Has behavior methods (NOT anemic)
118
+ - E3 Raises domain events on state change
119
+ - E4 No framework imports
120
+ - E5 Has mappers (if persisted)
121
+
122
+ ### VO — Value Objects
123
+ - VO1 In `valueobjects/`, not entities
124
+ - VO2 Only stdlib imports
125
+ - VO3 Immutable with behavior methods
126
+ - VO4 Used by entities + ports (not raw strings)
127
+
128
+ ### P — Ports
129
+ - P1 `ports/` dir exists (no inline interfaces in usecases)
130
+ - P2 One file per port
131
+ - P3 Each file has interface + related DTOs
132
+ - P4 Domain types in signatures (not primitives)
133
+ - P5 Platform-agnostic naming (`URLParser` not `ShopeeURLParser`)
134
+ - P6 No infrastructure imports
135
+
136
+ ### EV — Events
137
+ - EV1 One file per event
138
+ - EV2 Extends base event type
139
+ - EV3 Carries data for listeners
140
+ - EV4 Name matches registry
141
+
142
+ ### U — UseCases
143
+ - U1 Uses port interfaces (not inline)
144
+ - U2 Split by concern (≤200 lines/file)
145
+ - U3 Business logic lives here (not in handler / store / service)
146
+ - U4 No infrastructure imports
147
+ - U5 Dispatches events after persistence
148
+ - U6 No `deps.go` inline interfaces
149
+
150
+ ### SVC — Services
151
+ - SVC1 Thin wrapper, delegates to usecases
152
+ - SVC2 No infrastructure imports
153
+
154
+ ### H — Handlers / Controllers
155
+ - H1 Has registration function
156
+ - H2 Thin (parse → service → respond)
157
+ - H3 No business logic
158
+ - H4 DTOs in separate file
159
+
160
+ ### L — Listeners
161
+ - L1 One per event (`on_{event}` naming)
162
+ - L2 Side-effects only
163
+ - L3 Registered in event bus
164
+ - L4 Background context (not request ctx)
165
+
166
+ ### I — Infrastructure
167
+ - I1 Implements port interface
168
+ - I2 Has mappers (domain ↔ persistence)
169
+ - I3 No business logic
170
+ - I4 Compile-time interface check (where possible)
171
+
172
+ ### Gate
173
+ - [ ] All 10 areas reviewed
174
+ - [ ] Findings categorized by severity (see `~/.claude/architecture/_shared/severity-levels.md`)
175
+
176
+ ---
177
+
178
+ ## Phase 4: REPORT
179
+
180
+ ```markdown
181
+ ## Architecture Review: {architecture} / {domain}
182
+
183
+ ### Automated (R1-R10)
184
+ | # | Check | Status |
185
+ |---|-------|--------|
186
+ | R1 | Build | PASS/FAIL |
187
+ | ... | ... | ... |
188
+
189
+ ### Manual review
190
+ | Area | Status | Violations |
191
+ |------|--------|------------|
192
+ | Directory (D1-D7) | OK / ISSUE | ... |
193
+ | Entities (E1-E5) | OK / ISSUE | ... |
194
+ | ... | ... | ... |
195
+
196
+ ### Violations
197
+ 1. [SEVERITY] code:file:line — description
198
+ 2. ...
199
+
200
+ ### Recommended fixes
201
+ 1. ...
202
+
203
+ ### Overall Score: {A/B/C/D/F}
204
+ ```
205
+
206
+ ### Scoring
207
+
208
+ | Score | Criteria |
209
+ |-------|----------|
210
+ | **A** | 0 violations, all R1-R10 PASS |
211
+ | **B** | 0 CRITICAL/HIGH, max 3 MEDIUM |
212
+ | **C** | 0 CRITICAL, max 2 HIGH |
213
+ | **D** | Has CRITICAL or 3+ HIGH |
214
+ | **F** | Multiple CRITICAL — architecture broken |
215
+
216
+ ### Gate
217
+ - [ ] Report generated
218
+ - [ ] Score calculated
219
+ - [ ] All violations have file:line
220
+
221
+ ---
222
+
223
+ ## Phase 5: FIX LOOP (if user confirms)
224
+
225
+ ```
226
+ LOOP:
227
+ 1. Fix all violations
228
+ 2. Re-run automated checks (Phase 2)
229
+ 3. Re-run manual review (Phase 3)
230
+ 4. IF violations severity ≥ MEDIUM → GOTO 1
231
+ 5. IF only LOW or none → BREAK, final report
232
+ ```
233
+
234
+ Verify after each iteration: build passes, tests pass, domain purity holds.
235
+
236
+ ---
237
+
238
+ ## Calling from other skills
239
+
240
+ `/feature:new` and `/feature:refactor` call this skill at the end of their workflows. When called from another skill:
241
+ - Skip Phase 0 (architecture already known)
242
+ - Skip user confirmation for fixes (auto-fix in loop)
243
+ - Report final score back to caller
244
+
245
+ ---
246
+
247
+ ## Hard Rules
248
+
249
+ - **All CRITICAL/HIGH must be fixed** before merge
250
+ - **MEDIUM allowed with waiver** (explicit decision + comment)
251
+ - **Don't grade-inflate** — if it's a HIGH, mark HIGH
252
+ - **Don't skip Phase 3** — automated checks miss structural issues
253
+ - **File:line for every violation** — author shouldn't have to grep
254
+
255
+ ---
256
+
257
+ ## Related Skills
258
+
259
+ | When | Use |
260
+ |------|-----|
261
+ | Full PR review (arch + code + security + tests) | `/review:pr` |
262
+ | Self-review own branch before push | `/review:branch` |
263
+ | Refactor to fix violations | `/feature:refactor` |
264
+ | Add tests if missing | `/review:tdd` |
265
+ | Called from `/feature:new` / `/feature:refactor` | automatic |
266
+
267
+ ## Recommended Agents
268
+
269
+ | Phase | Agent | Purpose |
270
+ |-------|-------|---------|
271
+ | LOAD | `@clean-architect` | Interpret architecture rules |
272
+ | AUTOMATED | `@devops` | Build / lint / test scripts |
273
+ | MANUAL | `@code-reviewer` | Spot violations |
274
+ | FIX | Stack-specific dev agent | Apply fixes |