moicle 2.3.0 → 3.0.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 (32) hide show
  1. package/README.md +36 -47
  2. package/assets/commands/marketing.md +6 -6
  3. package/assets/skills/docs/sync/SKILL.md +195 -157
  4. package/assets/skills/feature/build/SKILL.md +891 -0
  5. package/assets/skills/feature/track/SKILL.md +157 -0
  6. package/assets/skills/fix/bug/SKILL.md +449 -0
  7. package/assets/skills/fix/incident/SKILL.md +6 -6
  8. package/assets/skills/marketing/brand/SKILL.md +304 -0
  9. package/assets/skills/marketing/content/SKILL.md +199 -141
  10. package/assets/skills/research/explore/SKILL.md +392 -0
  11. package/assets/skills/review/code/SKILL.md +622 -0
  12. package/dist/commands/install/usage.js +2 -2
  13. package/dist/commands/install/usage.js.map +1 -1
  14. package/package.json +1 -1
  15. package/assets/skills/docs/write/SKILL.md +0 -274
  16. package/assets/skills/feature/api/SKILL.md +0 -277
  17. package/assets/skills/feature/deprecate/SKILL.md +0 -276
  18. package/assets/skills/feature/new/SKILL.md +0 -273
  19. package/assets/skills/feature/refactor/SKILL.md +0 -269
  20. package/assets/skills/fix/hotfix/SKILL.md +0 -233
  21. package/assets/skills/fix/pr-comment/SKILL.md +0 -186
  22. package/assets/skills/fix/root-cause/SKILL.md +0 -276
  23. package/assets/skills/marketing/logo/SKILL.md +0 -252
  24. package/assets/skills/marketing/seo-blog/SKILL.md +0 -367
  25. package/assets/skills/marketing/video/SKILL.md +0 -258
  26. package/assets/skills/research/onboarding/SKILL.md +0 -225
  27. package/assets/skills/research/spike/SKILL.md +0 -228
  28. package/assets/skills/research/web/SKILL.md +0 -204
  29. package/assets/skills/review/architect/SKILL.md +0 -274
  30. package/assets/skills/review/branch/SKILL.md +0 -277
  31. package/assets/skills/review/pr/SKILL.md +0 -231
  32. package/assets/skills/review/tdd/SKILL.md +0 -245
@@ -0,0 +1,392 @@
1
+ ---
2
+ name: research-explore
3
+ description: Exploration workflow with three modes — WEB (research solutions on the internet, produce a recommendation with sources), SPIKE (time-boxed prototyping to de-risk a decision by building), ONBOARDING (ramp up on a new codebase: structure, conventions, first commit). Use when user says "research", "tìm giải pháp", "search solution", "investigate", "find best practice", "so sánh giải pháp", "spike", "prototype", "poc", "explore", "explain codebase", "onboard me", "new to project", "understand project", "project overview".
4
+ args: "[MODE] [TOPIC]"
5
+ ---
6
+
7
+ # Explore Workflow
8
+
9
+ One skill for the three ways to reduce the unknown: read the web, build a throwaway, or learn a codebase.
10
+
11
+ ## Pick your mode
12
+
13
+ | Situation | Mode | Jump to |
14
+ |-----------|------|---------|
15
+ | Don't know the right solution / library / pattern yet — compare via docs | **WEB** | [Mode WEB](#mode-web) |
16
+ | Need to validate a technical assumption by **building** a prototype | **SPIKE** | [Mode SPIKE](#mode-spike) |
17
+ | Joined / returned to a codebase and need to ramp up | **ONBOARDING** | [Mode ONBOARDING](#mode-onboarding) |
18
+
19
+ **Flow:** WEB (read) → if still unsure, SPIKE (build to validate) → if accepted, `/feature-build` (NEW) to implement properly.
20
+
21
+ - ❌ Already know the approach → `/feature-build` (NEW) or `/fix-bug`
22
+ - ❌ Debugging a known bug → `/fix-bug` (DEEP mode)
23
+ - ❌ Generate a full docs site → `/docs-sync`
24
+
25
+ ## Read Architecture First (all modes)
26
+
27
+ Detect stack via `~/.claude/architecture/_shared/stack-detection.md`. Read `ddd-architecture.md` + the stack doc — architecture context speeds up everything below.
28
+
29
+ ---
30
+ ---
31
+
32
+ # Mode WEB
33
+
34
+ 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-build` (NEW) or **Mode SPIKE**.
35
+
36
+ **ARGUMENTS:** (optional) topic to research. If omitted, infer from current conversation context.
37
+
38
+ ## When to use
39
+ - ✅ You don't know the right solution / library / pattern yet
40
+ - ✅ Need to compare multiple approaches before committing
41
+ - ✅ Stack / framework changed, best practices may have shifted
42
+ - ❌ You already know the approach → `/feature-build` (NEW) or `/fix-bug` (QUICK)
43
+ - ❌ Want to validate by building → **Mode SPIKE**
44
+
45
+ ## Workflow
46
+
47
+ ```
48
+ IDENTIFY → DETECT STACK → SEARCH → SYNTHESIZE → PROPOSE
49
+ ```
50
+
51
+ ## Step 1: IDENTIFY
52
+ - **Arg provided:** use it as the topic; if too broad, narrow using project context before any search.
53
+ - **No arg:** analyze conversation (recent messages, open file, task), **summarize the problem back to user, get confirmation** before burning search budget.
54
+
55
+ ### Research budget guide
56
+
57
+ | Scope | Budget | When to stop |
58
+ |-------|--------|--------------|
59
+ | Quick lookup (API behavior, error meaning) | 2-3 queries | First authoritative source confirms |
60
+ | Solution comparison (2-3 options) | 5-8 queries | Each option has ≥2 independent sources |
61
+ | Deep dive (new pattern, unfamiliar domain) | 10-15 queries | Recommendation is defensible |
62
+
63
+ **Hard cap:** 15 queries without converging → stop, report what's found + ask user to narrow.
64
+
65
+ ### Gate
66
+ - [ ] Problem statement confirmed (no-arg mode) · Scope narrow enough · Budget agreed (default 5-8)
67
+
68
+ ## Step 2: DETECT STACK
69
+
70
+ Capture for filter use: language + version, framework + version, architecture pattern (DDD / hexagonal), hard constraints (license, runtime, infra).
71
+
72
+ ## Step 3: SEARCH
73
+
74
+ ### Strategy
75
+ 1. **Broad first** — overview, common approaches, "X vs Y" comparisons
76
+ 2. **Deep dive** — official docs, GitHub issues, release notes, authoritative blogs
77
+ 3. **Counter-search** — actively look for criticism / failure stories of the leading option
78
+
79
+ ### Source priority
80
+
81
+ | Priority | Source | Weight |
82
+ |----------|--------|--------|
83
+ | 1 | Official docs (current version) | Highest |
84
+ | 2 | GitHub issues / release notes (project itself) | High — quirks + known bugs |
85
+ | 3 | Stack Overflow accepted answers (high score, recent) | Medium-high |
86
+ | 4 | Authoritative blogs (framework authors, well-known engineers) | Medium |
87
+ | 5 | Tutorials, course material | Low — risk of outdated patterns |
88
+ | 6 | AI-generated content | Skip unless verifiable against #1-#4 |
89
+
90
+ ### Search tips
91
+ - **Prefer English queries** — richer index; supplement with framework's primary docs language
92
+ - Include library + version when version-sensitive; quote exact error messages
93
+ - Cross-validate ≥2 independent sources before concluding
94
+
95
+ ### When sources conflict
96
+ 1. Different versions? → trust the one matching project version
97
+ 2. One is official docs? → trust official
98
+ 3. Different dates, same authority? → trust newest, note the change
99
+ 4. Same date, different authority? → trust higher-authority per priority table
100
+ 5. Cannot resolve? → present both, recommend lower-risk, explain trade-off
101
+
102
+ Always **note the conflict** in the report — don't silently pick one side.
103
+
104
+ ### Gate
105
+ - [ ] ≥2 independent sources per option · Sources <2 years old (or evergreen justified) · Counter-search done
106
+
107
+ ## Step 4: SYNTHESIZE
108
+
109
+ ### Comparison matrix (when ≥2 options)
110
+
111
+ ```markdown
112
+ | Criterion | Option A | Option B | Option C |
113
+ |-----------|----------|----------|----------|
114
+ | Maintenance status | active (2025) | last release 2023 | active |
115
+ | License | MIT | Apache-2.0 | BSL (commercial) |
116
+ | Stack fit ({your stack}) | native | adapter required | native |
117
+ | Performance (cite source) | 8k rps (link) | 5k rps | 12k rps |
118
+ | Operational complexity | low | medium | high |
119
+ | Known issues | #1234 (workaround) | #56 (no fix) | none |
120
+ | Migration cost | low | medium | high |
121
+ ```
122
+
123
+ ### Report template
124
+
125
+ ```markdown
126
+ ## Problem
127
+ {What we're solving, stack, constraints, goal}
128
+ ## Options Considered
129
+ {A, B, C — one line each}
130
+ ## Comparison
131
+ {matrix above}
132
+ ## Recommendation
133
+ **{Option X}** because {1-2 strongest reasons backed by sources}.
134
+ Trade-off: {what we give up vs the runner-up}.
135
+ ## Pseudo-code (NOT for direct implementation)
136
+ {Minimal sketch — adapt before shipping}
137
+ ## Caveats
138
+ - {gotcha with source link}
139
+ ## Conflicts in sources
140
+ - {what disagreed, how resolved}
141
+ ## References
142
+ - {url} — {what this gave us}
143
+ ```
144
+
145
+ ### Gate
146
+ - [ ] Recommendation explicit (don't say "both are fine") · Trade-off named
147
+ - [ ] Every non-trivial claim has a source link · Pseudo-code marked NOT for copy-paste
148
+
149
+ ## Hard Rules (WEB)
150
+ - **Research and propose — do NOT implement.** Wait for user confirmation.
151
+ - **Stack context matters** — idiomatic in one project, wrong in another.
152
+ - **Narrow when too broad**; **flag stale answers**; **no hallucinated APIs**; **cite every non-trivial claim**; **note conflicts**; **honor the budget** (15 query hard cap).
153
+
154
+ ---
155
+ ---
156
+
157
+ # Mode SPIKE
158
+
159
+ Time-boxed exploration to de-risk a decision by **building** (not just reading). Produces a recommendation + ADR, not production code.
160
+
161
+ ## When to use
162
+ - ✅ Need to validate a technical assumption by building
163
+ - ✅ Picking between 2+ options and need real comparison
164
+ - ✅ De-risking a critical path before committing
165
+ - ❌ Want to compare options via docs only → **Mode WEB**
166
+ - ❌ Already decided on the approach → `/feature-build` (NEW)
167
+
168
+ ## Workflow
169
+
170
+ ```
171
+ DEFINE → RESEARCH → PROTOTYPE → EVALUATE
172
+ ↑ │
173
+ └────── timebox expired ───────────┘
174
+ ```
175
+
176
+ ## Phase 1: DEFINE (15-30 min — never skip)
177
+
178
+ Lock the question, success criteria, timebox. Without these the spike has no exit condition.
179
+
180
+ ```markdown
181
+ ## Spike: {short name}
182
+ ### Question
183
+ {ONE specific question — yes/no or "pick A vs B vs C"}
184
+ ### Why now
185
+ {What decision blocks on this? When is it needed?}
186
+ ### Options on the table
187
+ - Option A: {name + 1 line} · Option B: {name + 1 line}
188
+ ### Success criteria
189
+ - [ ] {Specific, observable — e.g., "P95 latency <50ms at 1k req/s"}
190
+ - [ ] {e.g., "Integration with X compiles + 1 test passes"}
191
+ ### Timebox
192
+ - Quick: 2-4h · Standard: 1-2d · Deep: 3-5d (rare — scope likely too big)
193
+ ### Red flags (stop early if hit)
194
+ - Scope creep into productionising · Option breaks architecture rules · Options converge after 1h
195
+ ```
196
+
197
+ ### Gate
198
+ - [ ] ONE specific question · Success criteria observable · Timebox + red flags written · **User CONFIRMED brief**
199
+
200
+ ## Phase 2: RESEARCH (≤25% of timebox)
201
+
202
+ Run **Mode WEB** for the topic if you haven't already. Capture: official docs URLs (read them), known gotchas / GitHub issues per option, prior art, constraints from existing stack.
203
+
204
+ ### Gate
205
+ - [ ] ≥2 sources per option · Known gotchas listed · Constraints documented
206
+
207
+ ## Phase 3: PROTOTYPE (the bulk of the timebox)
208
+
209
+ Build the smallest thing that answers the question.
210
+
211
+ - **Quick and dirty** — no tests beyond what's needed to verify the question
212
+ - **One option at a time** — full prototype for A, then for B
213
+ - **In a sandbox** — separate branch, never merge to main
214
+ - **Time-stamped commits** — `spike: A reaches 1k req/s with sync handler`
215
+ - **Stop on red flag** — if scope creeps or hits a wall, don't push through
216
+
217
+ **"Smallest" means:** skip auth/error-handling/pagination, hardcode config, stub anything not under test, 1-2 happy-path scenarios.
218
+
219
+ **Stop early when:** all criteria met for one option (don't gold-plate) · all options fail the same criterion (pivot the question) · timebox 75% used and not converging.
220
+
221
+ ### Gate
222
+ - [ ] Each option prototyped to answer the question · Success criteria measured (numbers, not vibes) · Findings in spike commits
223
+
224
+ ## Phase 4: EVALUATE
225
+
226
+ ### Comparison matrix
227
+
228
+ | Criterion | Option A | Option B | Notes |
229
+ |-----------|----------|----------|-------|
230
+ | Success criterion 1 (latency) | 42ms ✅ | 87ms ❌ | A at 1k rps |
231
+ | Success criterion 2 (effort) | 1 sprint | 3 sprints | B needs new dep |
232
+ | Fit with architecture | ✅ | ⚠️ port redesign | |
233
+ | Risk | low | medium | |
234
+
235
+ ### ADR template
236
+
237
+ ```markdown
238
+ # ADR-NNN: {Decision title}
239
+ ## Status
240
+ Accepted / Superseded / Deprecated
241
+ ## Context
242
+ {Problem, alternatives considered}
243
+ ## Decision
244
+ {Chosen option}
245
+ ## Consequences
246
+ **Positive:** {gains} · **Negative:** {tradeoffs / debt}
247
+ ## Spike evidence
248
+ {Link to spike branch + key benchmark numbers}
249
+ ```
250
+
251
+ ### Cleanup
252
+ - [ ] Spike branch tagged (`spike/{name}-{date}`)
253
+ - [ ] Spike code NOT merged — production re-implements via `/feature-build` (NEW)
254
+ - [ ] ADR committed to `docs/adr/` (or equivalent)
255
+
256
+ ### Gate
257
+ - [ ] Matrix filled with real numbers · Recommendation explicit · ADR written · Spike branch tagged + NOT merged
258
+
259
+ ## Hard Rules (SPIKE)
260
+ - **Define before building** — undefined spike = unbounded spike.
261
+ - **Timebox is sacred** — overrun means the question is wrong, not the answer.
262
+ - **Throwaway code** — spike branch never merges to main.
263
+ - **Numbers, not vibes** — recommendation cites measurements.
264
+ - **One question per spike**.
265
+
266
+ ---
267
+ ---
268
+
269
+ # Mode ONBOARDING
270
+
271
+ Ramp up on a new codebase quickly: structure, conventions, where things live, how to make a first change.
272
+
273
+ ## When to use
274
+ - ✅ Just joined a project / repo and need to ramp up
275
+ - ✅ Returning to a codebase you haven't touched in months
276
+ - ✅ Need to give a teammate a structured walkthrough
277
+ - ❌ Want to generate full docs site → `/docs-sync`
278
+ - ❌ Need to fix a specific bug → `/fix-bug`
279
+
280
+ ## Workflow
281
+
282
+ ```
283
+ SCAN → ANALYZE → EXPLAIN → GUIDE (first commit checklist)
284
+ ```
285
+
286
+ ## Phase 1: SCAN (10-20 min)
287
+
288
+ ```bash
289
+ tree -L 2 -I 'node_modules|vendor|dist|build|.git'
290
+ ls -la | grep -E "package.json|pubspec.yaml|go.mod|composer.json|Dockerfile|Makefile"
291
+ find . -maxdepth 3 -name "README*" -o -name "CONTRIBUTING*" -o -name "ARCHITECTURE*"
292
+ git log --oneline -20
293
+ git shortlog -sn --since=3months | head -10
294
+ ```
295
+
296
+ **Capture:** top-level layout (≤2 levels), tech stack + main deps, existing docs, active contributors + recent themes.
297
+
298
+ ### Gate
299
+ - [ ] Stack detected · Top-level structure understood · Existing docs inventoried
300
+
301
+ ## Phase 2: ANALYZE (30-60 min)
302
+
303
+ ### Read in this order
304
+ 1. `README.md` — purpose + setup
305
+ 2. `ARCHITECTURE.md` / `CONTRIBUTING.md` if present
306
+ 3. **One existing module end-to-end** — smallest with a full layer stack. Trace: entity → port → usecase → handler → test.
307
+ 4. Cross-domain wiring (event bus / DI / router registration)
308
+ 5. CI config (`.github/workflows/`, `Makefile`) — what's enforced?
309
+
310
+ **Capture:** architecture pattern, naming conventions, where business logic lives, how errors are returned, test framework + folder convention, how code reaches prod.
311
+
312
+ ### Gate
313
+ - [ ] One module read end-to-end · Layer boundaries understood · Test + CI conventions known
314
+
315
+ ## Phase 3: EXPLAIN
316
+
317
+ Produce a 1-page mental model someone else can read.
318
+
319
+ ```markdown
320
+ ## Project: {name}
321
+ ### Purpose
322
+ {1-2 sentences: business problem}
323
+ ### Stack
324
+ - Language / Framework / DB / Infra
325
+ ### Architecture
326
+ {1 sentence: e.g., "DDD with hexagonal — domain-pure, infra implements ports"}
327
+ {ascii or mermaid: top-level layer diagram}
328
+ ### Domains
329
+ | Domain | Responsibility |
330
+ ### Where to find things
331
+ | If you need to... | Look in |
332
+ |-------------------|---------|
333
+ | Add a route | `application/ports/http/<domain>_handler` |
334
+ | Add business logic | `domain/<domain>/usecases` |
335
+ | Add a DB query | `infrastructure/database/<domain>_store` |
336
+ | Add a domain event | `domain/<domain>/events` + register in event bus |
337
+ | Add a test | `*_test.go` next to the source file |
338
+ ### Conventions
339
+ - Error handling / Logging / Config / Branch + commit
340
+ ### Gotchas
341
+ - {anything surprising}
342
+ ```
343
+
344
+ ### Gate
345
+ - [ ] 1-page mental model written · "Where to find things" covers ≥5 tasks · ≥1 gotcha documented
346
+
347
+ ## Phase 4: GUIDE — first commit checklist
348
+
349
+ Unblock the first real change. Pick a "quick win" (≤30 min, one layer, clear success criterion).
350
+
351
+ - [ ] Local env runs: build + lint + tests all green from a fresh clone
352
+ - [ ] Made the change in the right layer (per Phase 3 table)
353
+ - [ ] Added or updated 1 test
354
+ - [ ] Followed naming + error-handling conventions
355
+ - [ ] Commit message matches project style (`git log --oneline`)
356
+ - [ ] PR description follows template (`.github/PULL_REQUEST_TEMPLATE.md`)
357
+ - [ ] Self-reviewed with `/review-code` (SELF mode) before opening PR
358
+
359
+ **Who to ask:** architecture → tech lead from git shortlog · domain X → recent committer · infra/deploy → ops contact from README.
360
+
361
+ ### Gate
362
+ - [ ] Local env verified · First "quick win" task picked · First-commit checklist printed
363
+
364
+ ## Hard Rules (ONBOARDING)
365
+ - **Read one module end-to-end before reading 10 partially** — the trace teaches more than skimming.
366
+ - **Capture gotchas as you find them** — they vanish from memory in days.
367
+ - **First commit ≤30 min** — bigger first changes get rabbit-holed.
368
+ - **Don't refactor on day 1** — earn context before changing conventions.
369
+
370
+ ---
371
+ ---
372
+
373
+ ## Related Skills
374
+
375
+ | When | Use |
376
+ |------|-----|
377
+ | Ready to implement after WEB / SPIKE | `/feature-build` (NEW mode) |
378
+ | First bug fix to learn the codebase | `/fix-bug` |
379
+ | Write up research / ADR / onboarding doc | `/docs-sync` |
380
+ | Generate full doc site after onboarding | `/docs-sync` |
381
+ | Self-review first commit | `/review-code` (SELF mode) |
382
+
383
+ ## Recommended Agents
384
+
385
+ | Mode / Phase | Agent | Purpose |
386
+ |--------------|-------|---------|
387
+ | WEB search | `@docs-writer` | Frame output as design note |
388
+ | WEB synthesize | `@api-designer`, `@security-audit`, `@perf-optimizer` | API / security / perf depth |
389
+ | SPIKE define / evaluate | `@clean-architect` | Frame the question + architecture impact |
390
+ | SPIKE prototype | Stack-specific dev agent | Build the POC |
391
+ | ONBOARDING scan / analyze | `@clean-architect`, `@code-reviewer` | Architecture + conventions |
392
+ | EXPLAIN / GUIDE | `@docs-writer` | 1-page overview + first-commit checklist |