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,258 @@
1
+ ---
2
+ name: marketing-video
3
+ description: Plan and produce video content strategy including scripts, storyboards, and production specs. Use when user says "create video", "video content", "video script", "video strategy", "youtube content", "video plan".
4
+ ---
5
+
6
+ # Video Content Skill
7
+
8
+ Plan video content end-to-end: strategy, script, storyboard, production spec, publishing schedule.
9
+
10
+ ## When to use this skill
11
+
12
+ - ✅ Planning a video series or campaign (multi-video)
13
+ - ✅ Need a script + storyboard + production spec for a single video
14
+ - ✅ Repurposing existing long-form into shorts / clips
15
+ - ❌ Just need ideas, not a plan → use `brainstorm`
16
+ - ❌ Want full marketing plan (logo + content + video) → use `/marketing`
17
+ - ❌ Writing a blog post or thread → use `/marketing:content`
18
+
19
+ ---
20
+
21
+ ## Workflow
22
+
23
+ ```
24
+ STRATEGY → SCRIPT → STORYBOARD → PRODUCTION → PUBLISH
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Phase 1: STRATEGY
30
+
31
+ **Goal:** lock the audience, goal, channels, and series plan.
32
+
33
+ ### Gather brief
34
+
35
+ Ask the user (skip what's already known):
36
+
37
+ | Field | Example |
38
+ |-------|---------|
39
+ | Primary goal (pick 1) | brand awareness / tutorial / lead gen / community / thought leadership |
40
+ | Audience | "Senior backend engineers evaluating Postgres tooling" |
41
+ | Channels (pick ≤3) | YouTube long / YouTube Shorts / TikTok / Reels / LinkedIn / X / Twitch |
42
+ | Cadence | "1 long video / week + 3 shorts" |
43
+ | Series concept | "From-zero series: build a SaaS in 10 episodes" |
44
+ | Tone | "Casual, technical, no fluff" |
45
+ | Existing assets | brand kit URL, prior videos, channel stats |
46
+
47
+ ### Output: 1-page strategy
48
+
49
+ ```markdown
50
+ ## Video Strategy: {brand}
51
+ - Goal: {one line}
52
+ - Audience: {one line}
53
+ - Channels: {list, with primary marked}
54
+ - Cadence: {long-form + shorts schedule}
55
+ - Series: {2-4 series, each with theme + episode count target}
56
+ - Brand: {voice, colors, logo lockup}
57
+ ```
58
+
59
+ ### Gate
60
+ - [ ] Goal + audience confirmed by user
61
+ - [ ] Channels matched to where audience watches
62
+ - [ ] At least 1 series concept defined
63
+
64
+ ---
65
+
66
+ ## Phase 2: SCRIPT
67
+
68
+ **Goal:** write a script that holds attention from frame 1.
69
+
70
+ ### Universal structure
71
+
72
+ ```
73
+ HOOK (≤10 sec, ≤30 sec for long-form)
74
+ - one of: contrarian claim / surprising number / pain question / curiosity gap
75
+ INTRO (≤15 sec)
76
+ - what they'll get + why this person/channel
77
+ BODY
78
+ - one idea per segment, each ≤90 sec for long-form, ≤15 sec for shorts
79
+ - pattern interrupt every 30-45 sec (cut, b-roll, on-screen text)
80
+ PAYOFF
81
+ - the answer / the demo / the result
82
+ CTA (≤10 sec)
83
+ - one ask: subscribe, link, comment with X
84
+ ```
85
+
86
+ ### Hook examples (pick a type, write 3 variants)
87
+
88
+ | Type | Example |
89
+ |------|---------|
90
+ | Contrarian | "Everyone tells you to write tests first. Here's why I stopped." |
91
+ | Number | "I shipped 47 features last quarter with 1 engineer. Here's how." |
92
+ | Pain question | "Your DB is slow at 100k rows? That's a config issue, not a Postgres limit." |
93
+ | Curiosity gap | "There's a feature in Go that nobody uses but it solves your timeout bug." |
94
+
95
+ ### Script length budget
96
+
97
+ | Format | Total | Hook | Body | CTA |
98
+ |--------|-------|------|------|-----|
99
+ | YouTube long | 8-15 min | 10-30 s | 7-13 min | 10-30 s |
100
+ | YouTube Short / Reel / TikTok | 30-60 s | ≤3 s | 25-50 s | ≤5 s |
101
+ | LinkedIn native | 1-3 min | ≤5 s | 50 s - 2 min 30 s | ≤10 s |
102
+
103
+ ### Gate
104
+ - [ ] Hook tested by reading frame 1 aloud — would you keep watching?
105
+ - [ ] One idea per segment (no parallel threads)
106
+ - [ ] Pattern interrupt every ≤45 sec (long-form)
107
+ - [ ] CTA is one ask, not three
108
+
109
+ ---
110
+
111
+ ## Phase 3: STORYBOARD
112
+
113
+ **Goal:** visual plan that the editor / camera-op can execute without asking questions.
114
+
115
+ ### Scene table (one row per cut)
116
+
117
+ | # | Time | Visual | Audio | Text overlay | Asset needed |
118
+ |---|------|--------|-------|--------------|--------------|
119
+ | 1 | 0:00-0:08 | Talking head, medium shot | Hook line | (none) | — |
120
+ | 2 | 0:08-0:25 | Screen recording: IDE | VO | "Step 1: install" | terminal recording |
121
+ | 3 | 0:25-0:40 | B-roll: server rack | VO | (none) | stock or own footage |
122
+
123
+ ### Visual rules (project-wide)
124
+
125
+ - Aspect ratio: 16:9 (YouTube long) / 9:16 (shorts, Reels, TikTok) / 1:1 (LinkedIn native fallback)
126
+ - Captions ALWAYS burned in for shorts (most viewers watch muted)
127
+ - Brand bug in bottom-right (long-form only) for first 5 sec + last 10 sec
128
+ - Max 2 fonts (display + body)
129
+ - Stick to brand palette (link to logo guidelines if available)
130
+
131
+ ### Gate
132
+ - [ ] One row per cut
133
+ - [ ] All assets listed and sourced (or "to record")
134
+ - [ ] Captions plan in place for muted viewing
135
+ - [ ] Aspect ratio matches the channel
136
+
137
+ ---
138
+
139
+ ## Phase 4: PRODUCTION
140
+
141
+ **Goal:** ship a production-ready file the publisher can upload without rework.
142
+
143
+ ### Tech spec per channel
144
+
145
+ | Channel | Resolution | FPS | Codec | Max length | Notes |
146
+ |---------|-----------|-----|-------|-----------|-------|
147
+ | YouTube long | 1080p or 4K | 30 / 60 | H.264 | 12 h | Chapters required for >5 min |
148
+ | YouTube Shorts | 1080×1920 | 30 / 60 | H.264 | 60 s | Vertical |
149
+ | TikTok | 1080×1920 | 30 / 60 | H.264 | 10 min | Caption per scene |
150
+ | Instagram Reels | 1080×1920 | 30 | H.264 | 90 s | First frame = thumbnail |
151
+ | LinkedIn native | 1920×1080 / 1080×1080 | 30 | H.264 | 10 min | Captions burned in |
152
+ | X (Twitter) | 1280×720+ | 30 / 60 | H.264 | 2 min 20 s | Add caption file |
153
+
154
+ ### Audio
155
+ - Voice: -3 dBFS peak, -16 LUFS integrated
156
+ - Music bed: -20 dBFS under voice, royalty-cleared (Epidemic, Artlist, or licensed)
157
+ - Cuts: trim every breath / um / "so" — tight pacing matters
158
+
159
+ ### Pre-publish checklist
160
+ - [ ] Color graded (consistent across cuts)
161
+ - [ ] Audio levels normalized
162
+ - [ ] Captions / subtitles burned in (where required) and SRT file for accessibility
163
+ - [ ] Thumbnail designed (3 variants for A/B if YouTube)
164
+ - [ ] Title written (≤60 chars, includes primary keyword)
165
+ - [ ] Description with timestamps, CTAs, links
166
+
167
+ ### Gate
168
+ - [ ] Tech spec matches target channel
169
+ - [ ] Thumbnail tested at small size (mobile feed)
170
+ - [ ] First 3 sec works without sound
171
+
172
+ ---
173
+
174
+ ## Phase 5: PUBLISH
175
+
176
+ **Goal:** get the video in front of the audience and measure.
177
+
178
+ ### Per-channel adaptation
179
+
180
+ - **YouTube long:** publish + immediately pin a comment with key timestamps + first-hour engagement push
181
+ - **Shorts:** publish 3-5x/week for algorithm; don't link in description (kills reach)
182
+ - **TikTok:** publish in batches at 7 PM local; respond to first 10 comments within 1 hour
183
+ - **LinkedIn:** native upload (don't link YouTube); post in first hour of work day
184
+ - **X:** native video; thread = video + 3-5 text takeaways
185
+
186
+ ### Cross-posting
187
+ - Cut shorts from long-form (3-5 per long video)
188
+ - Convert key insight into LinkedIn carousel + X thread
189
+ - Embed in blog post (boosts both)
190
+
191
+ ### Tracking
192
+ - UTM tags on all description links: `?utm_source=youtube&utm_medium=video&utm_campaign={series}`
193
+ - Watch: average view duration, retention curve (cliff = where to cut next time), CTR on thumbnail
194
+ - Iterate: kill formats with <30% retention after 3 attempts
195
+
196
+ ### Gate
197
+ - [ ] Adapted per channel (no copy-paste)
198
+ - [ ] UTMs applied
199
+ - [ ] Tracking dashboard updated
200
+
201
+ ---
202
+
203
+ ## Final Report
204
+
205
+ ```markdown
206
+ ## Video Plan: {brand / series}
207
+
208
+ ### Strategy
209
+ - Goal: {one line}
210
+ - Audience: {one line}
211
+ - Channels: {primary + secondary}
212
+
213
+ ### Videos Planned (next 4 weeks)
214
+ | # | Title | Format | Channel | Status |
215
+ |---|-------|--------|---------|--------|
216
+ | 1 | ... | long | YouTube | scripted |
217
+ | 2 | ... | short | Reels + TikTok + Shorts | storyboard |
218
+
219
+ ### Production Backlog
220
+ - {script ready, awaiting recording}
221
+ - {recording done, awaiting edit}
222
+
223
+ ### Metrics
224
+ - Baseline → Target per video and per series
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Hard Rules
230
+
231
+ - **Hook decides everything** — if first 3 sec doesn't work, nothing after matters
232
+ - **Captions for muted viewing** — most feed views are sound-off
233
+ - **One ask in the CTA** — multiple CTAs = zero conversions
234
+ - **Vertical for mobile-first channels** — never reupload 16:9 to TikTok / Shorts
235
+ - **Kill what doesn't work after 3 attempts** — don't keep producing for an audience that isn't there
236
+
237
+ ---
238
+
239
+ ## Related Skills
240
+
241
+ | When | Use |
242
+ |------|-----|
243
+ | Full marketing plan (logo + content + video) | `/marketing` |
244
+ | Need brand visuals first | `/marketing:logo` |
245
+ | Repurpose video → blog / threads | `/marketing:content` |
246
+ | Brainstorm video topics | `brainstorm` |
247
+
248
+ ---
249
+
250
+ ## Recommended Agents
251
+
252
+ | Phase | Agent | Purpose |
253
+ |-------|-------|---------|
254
+ | STRATEGY | `@docs-writer` | Document the strategy brief |
255
+ | SCRIPT | `@docs-writer` | Draft and tighten scripts |
256
+ | STORYBOARD | `@docs-writer` | Scene descriptions |
257
+ | PRODUCTION | `@devops` | Tech specs + encoding |
258
+ | PUBLISH | `@docs-writer` | Channel adaptations + tracking |
@@ -0,0 +1,225 @@
1
+ ---
2
+ name: research-onboarding
3
+ description: Codebase onboarding workflow for understanding new projects. Use when joining a project, exploring codebase, or when user says "explain codebase", "onboard me", "new to project", "understand project", "explore codebase", "project overview".
4
+ ---
5
+
6
+ # Codebase Onboarding Workflow
7
+
8
+ Ramp up on a new codebase quickly: structure, conventions, where things live, how to make a first change.
9
+
10
+ ## When to use this skill
11
+
12
+ - ✅ Just joined a project / repo and need to ramp up
13
+ - ✅ Returning to a codebase you haven't touched in months
14
+ - ✅ Need to give a teammate a structured walkthrough
15
+ - ❌ Want to generate full docs site → use `/docs:sync`
16
+ - ❌ Need to fix a specific bug → use `/fix:hotfix` / `/fix:root-cause`
17
+ - ❌ Only want a quick file lookup → just use `grep` / `find`
18
+
19
+ ## Read Architecture First
20
+
21
+ Detect stack with `~/.claude/architecture/_shared/stack-detection.md`. Read `ddd-architecture.md` + the stack doc. Architecture context speeds up everything below by 10x.
22
+
23
+ ---
24
+
25
+ ## Workflow
26
+
27
+ ```
28
+ SCAN → ANALYZE → EXPLAIN → GUIDE (first commit checklist)
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Phase 1: SCAN (10-20 min)
34
+
35
+ **Goal:** map the territory before reading any business code.
36
+
37
+ ```bash
38
+ # Structure
39
+ tree -L 2 -I 'node_modules|vendor|dist|build|.git'
40
+
41
+ # Tech surface
42
+ ls -la | grep -E "package.json|pubspec.yaml|go.mod|composer.json|Dockerfile|Makefile"
43
+
44
+ # Existing docs
45
+ find . -maxdepth 3 -name "README*" -o -name "CONTRIBUTING*" -o -name "ARCHITECTURE*"
46
+
47
+ # Activity
48
+ git log --oneline -20
49
+ git shortlog -sn --since=3months | head -10
50
+ ```
51
+
52
+ ### Capture
53
+ - Top-level layout (≤2 levels)
54
+ - Tech stack + main dependencies (5-10 biggest)
55
+ - Existing docs found (read in next phase)
56
+ - Active contributors + recent commit themes
57
+
58
+ ### Gate
59
+ - [ ] Stack detected (or asked user if ambiguous)
60
+ - [ ] Top-level structure understood
61
+ - [ ] Existing docs inventoried
62
+
63
+ ---
64
+
65
+ ## Phase 2: ANALYZE (30-60 min)
66
+
67
+ **Goal:** understand layer boundaries, conventions, and the "shape" of code.
68
+
69
+ ### Read in this order
70
+ 1. `README.md` — purpose + setup
71
+ 2. `ARCHITECTURE.md` / `CONTRIBUTING.md` if present
72
+ 3. **One existing module end-to-end** — pick the smallest with a full layer stack (e.g., `domain/user/`). Trace: entity → port → usecase → handler → test.
73
+ 4. Cross-domain wiring (event bus / DI / router registration)
74
+ 5. CI config (`.github/workflows/`, `Makefile`) — what's enforced?
75
+
76
+ ### Capture
77
+ - Architecture pattern (DDD / MVC / clean / hexagonal — match against `ddd-architecture.md`)
78
+ - Naming conventions (file, function, test)
79
+ - Where business logic lives (usecase vs service vs handler)
80
+ - How errors are returned (typed, panics, error wrapping)
81
+ - Test framework + folder convention
82
+ - How code reaches prod (CI checks, release process)
83
+
84
+ ### Gate
85
+ - [ ] One module read end-to-end
86
+ - [ ] Layer boundaries understood
87
+ - [ ] Test + CI conventions known
88
+
89
+ ---
90
+
91
+ ## Phase 3: EXPLAIN
92
+
93
+ **Goal:** produce a 1-page mental model that someone else can read.
94
+
95
+ ```markdown
96
+ ## Project: {name}
97
+
98
+ ### Purpose
99
+ {1-2 sentences: what business problem this solves}
100
+
101
+ ### Stack
102
+ - Language: {go 1.22 / node 20 / dart 3.x / ...}
103
+ - Framework: {gin / nestjs / remix / flutter ...}
104
+ - DB: {postgres + sqlc / prisma / eloquent ...}
105
+ - Infra: {docker, k8s on GKE, redis, kafka ...}
106
+
107
+ ### Architecture
108
+ {1 sentence: e.g., "DDD with hexagonal — domain-pure, infra implements ports"}
109
+
110
+ ```
111
+ {ascii or mermaid: top-level layer diagram}
112
+ ```
113
+
114
+ ### Domains
115
+ | Domain | Responsibility |
116
+ |--------|----------------|
117
+ | {name} | {one line} |
118
+
119
+ ### Where to find things
120
+ | If you need to... | Look in |
121
+ |-------------------|---------|
122
+ | Add a route | `application/ports/http/<domain>_handler` |
123
+ | Add business logic | `domain/<domain>/usecases` |
124
+ | Add a DB query | `infrastructure/database/<domain>_store` |
125
+ | Add a domain event | `domain/<domain>/events` + register in event bus |
126
+ | Add a test | `*_test.go` next to the source file |
127
+
128
+ ### Conventions
129
+ - Error handling: {pattern}
130
+ - Logging: {library + level convention}
131
+ - Config: {env vars / yaml / both}
132
+ - Branch / commit: {convention}
133
+
134
+ ### Gotchas
135
+ - {anything surprising — e.g., "cache TTL is 30s, not 5 min like the comment says"}
136
+ ```
137
+
138
+ ### Gate
139
+ - [ ] 1-page mental model written
140
+ - [ ] "Where to find things" table covers ≥5 common tasks
141
+ - [ ] At least 1 gotcha documented (every codebase has them)
142
+
143
+ ---
144
+
145
+ ## Phase 4: GUIDE — first commit checklist
146
+
147
+ **Goal:** unblock the first real change. The fastest ramp-up is shipping code.
148
+
149
+ ### Pick a "quick win" task
150
+ - ≤30 min change (typo, comment, missing test, small UX nit)
151
+ - Touches one layer only
152
+ - Has a clear success criterion
153
+
154
+ ### First commit checklist
155
+ - [ ] Local env runs: build + lint + tests all green from a fresh clone
156
+ - [ ] Made the change in the right layer (per Phase 3 table)
157
+ - [ ] Added or updated 1 test
158
+ - [ ] Followed naming + error-handling conventions
159
+ - [ ] Commit message matches project style (`git log --oneline`)
160
+ - [ ] PR description follows template (check `.github/PULL_REQUEST_TEMPLATE.md`)
161
+ - [ ] Self-reviewed with `/review:branch` before opening PR
162
+
163
+ ### Who to ask
164
+ - Architecture / "why is it like this": {tech lead from git shortlog}
165
+ - Domain knowledge for area X: {recent committer to that domain}
166
+ - Infra / deploy: {ops contact from README}
167
+
168
+ ### Gate
169
+ - [ ] Local env verified
170
+ - [ ] First "quick win" task picked
171
+ - [ ] First-commit checklist printed
172
+
173
+ ---
174
+
175
+ ## Final Report
176
+
177
+ ```markdown
178
+ ## Onboarding Complete: {project}
179
+
180
+ ### Mental Model
181
+ - Stack: {...}
182
+ - Architecture: {...}
183
+ - {N} domains identified
184
+
185
+ ### Output
186
+ - Saved 1-page overview to {path}
187
+ - "Where to find things" table → {path}
188
+ - Gotchas list → {path}
189
+
190
+ ### First Commit
191
+ - Task: {quick-win}
192
+ - Local env: ✅ build / ✅ lint / ✅ tests
193
+ - PR will follow: {project PR template}
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Hard Rules
199
+
200
+ - **Read one module end-to-end before reading 10 partially** — the trace teaches more than skimming
201
+ - **Capture gotchas as you find them** — they vanish from memory in days
202
+ - **First commit ≤30 min** — bigger first changes get rabbit-holed
203
+ - **Don't refactor on day 1** — earn context before changing conventions
204
+
205
+ ---
206
+
207
+ ## Related Skills
208
+
209
+ | When | Use |
210
+ |------|-----|
211
+ | Generate full doc site after onboarding | `/docs:sync` |
212
+ | Build first real feature after onboarding | `/feature:new` |
213
+ | First bug fix to learn the codebase | `/fix:hotfix` |
214
+ | Author / update the onboarding doc itself | `/docs:write` |
215
+
216
+ ## Recommended Agents
217
+
218
+ | Phase | Agent | Purpose |
219
+ |-------|-------|---------|
220
+ | SCAN | `@clean-architect` | Identify architecture pattern |
221
+ | ANALYZE | `@clean-architect` | Layer + boundary analysis |
222
+ | ANALYZE | `@code-reviewer` | Conventions + smell check |
223
+ | ANALYZE | `@security-audit` | Security patterns |
224
+ | EXPLAIN | `@docs-writer` | 1-page overview |
225
+ | GUIDE | `@docs-writer` | First-commit checklist |
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: research-spike
3
+ description: Spike/Research workflow for exploring unknowns before committing to implementation. Use when researching, prototyping, doing proof of concept, or when user says "spike", "research", "prototype", "poc", "explore", "investigate".
4
+ ---
5
+
6
+ # Spike / Research Workflow
7
+
8
+ Time-boxed exploration to de-risk a decision by **building** (not just reading). Produces a recommendation + ADR, not production code.
9
+
10
+ ## When to use this skill
11
+
12
+ - ✅ Need to validate a technical assumption by building
13
+ - ✅ Picking between 2+ options and need real comparison
14
+ - ✅ De-risking a critical path before committing
15
+ - ❌ Want to compare options via docs only → use `/research:web`
16
+ - ❌ Already decided on the approach → use `/feature:new`
17
+ - ❌ Stuck on a known bug → use `/fix:root-cause`
18
+
19
+ ## Read Architecture First
20
+
21
+ Detect stack via `~/.claude/architecture/_shared/stack-detection.md`. Skim stack doc to understand current patterns — the spike output should fit the architecture or explicitly say why it doesn't.
22
+
23
+ ---
24
+
25
+ ## Workflow
26
+
27
+ ```
28
+ DEFINE → RESEARCH → PROTOTYPE → EVALUATE
29
+ ↑ │
30
+ └────── timebox expired ───────────┘
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Phase 1: DEFINE (15-30 min — never skip)
36
+
37
+ **Goal:** lock the question, success criteria, timebox. Without these the spike has no exit condition.
38
+
39
+ ### Spike brief
40
+
41
+ ```markdown
42
+ ## Spike: {short name}
43
+
44
+ ### Question
45
+ {ONE specific question — answerable yes/no or "pick A vs B vs C"}
46
+
47
+ ### Why now
48
+ {What decision blocks on this answer? When is the decision needed?}
49
+
50
+ ### Options on the table
51
+ - Option A: {name + 1 line}
52
+ - Option B: {name + 1 line}
53
+ - (Option C: only if relevant)
54
+
55
+ ### Success criteria
56
+ - [ ] {Specific, observable — e.g., "P95 latency <50ms at 1k req/s"}
57
+ - [ ] {e.g., "Integration with X library compiles + 1 test passes"}
58
+ - [ ] {e.g., "Estimated migration effort ≤2 sprints"}
59
+
60
+ ### Timebox
61
+ - Quick spike: 2-4 hours
62
+ - Standard: 1-2 days
63
+ - Deep spike: 3-5 days (rare — usually means scope is too big)
64
+
65
+ ### Red flags (stop early if hit)
66
+ - Scope creep into productionising
67
+ - Option requires breaking architecture rules
68
+ - Two options become "obviously the same" after 1 hour
69
+ ```
70
+
71
+ ### Gate
72
+ - [ ] Question is ONE specific question
73
+ - [ ] Success criteria are observable (not "feels right")
74
+ - [ ] Timebox + red flags written
75
+ - [ ] User CONFIRMED brief before starting
76
+
77
+ ---
78
+
79
+ ## Phase 2: RESEARCH (≤25% of timebox)
80
+
81
+ **Goal:** know enough to prototype intelligently, don't over-read.
82
+
83
+ Run `/research:web` for the topic if you haven't already. Capture:
84
+
85
+ - Official docs URLs (read, don't just bookmark)
86
+ - Known gotchas / GitHub issues for each option
87
+ - Prior art: anyone tried this combo? what was their conclusion?
88
+ - Constraints from existing stack (versions, license, infra)
89
+
90
+ ### Gate
91
+ - [ ] At least 2 sources per option
92
+ - [ ] Known gotchas listed
93
+ - [ ] Constraints documented
94
+
95
+ ---
96
+
97
+ ## Phase 3: PROTOTYPE (the bulk of the timebox)
98
+
99
+ **Goal:** build the smallest thing that answers the question.
100
+
101
+ ### Rules
102
+ - **Quick and dirty** — no tests beyond what's needed to verify the question
103
+ - **One option at a time** — full prototype for A, then full prototype for B
104
+ - **In a sandbox** — separate branch, never merge to main
105
+ - **Time-stamped commits** — `spike: A reaches 1k req/s with sync handler` so the timeline is reviewable
106
+ - **Stop on red flag** — if scope creeps or hits a wall, do not push through
107
+
108
+ ### What "smallest" means
109
+ - Skip auth, skip error handling, skip pagination
110
+ - Hardcode config that you'd normally pull from env
111
+ - Stub anything not under test
112
+ - 1-2 happy-path scenarios is enough to verify success criteria
113
+
114
+ ### Stop early when
115
+ - All success criteria met for one option (don't gold-plate)
116
+ - All options fail the same criterion (pivot the question)
117
+ - Timebox 75% used and not converging (something's wrong — stop, regroup)
118
+
119
+ ### Gate
120
+ - [ ] Each option prototyped to the point of answering the question
121
+ - [ ] Success criteria measured (numbers, not vibes)
122
+ - [ ] Findings captured in spike branch commits
123
+
124
+ ---
125
+
126
+ ## Phase 4: EVALUATE
127
+
128
+ **Goal:** turn the prototype into a recommendation + ADR.
129
+
130
+ ### Comparison matrix
131
+
132
+ | Criterion | Option A | Option B | Notes |
133
+ |-----------|----------|----------|-------|
134
+ | Success criterion 1 (e.g., latency) | 42ms ✅ | 87ms ❌ | A at 1k rps, B saturates earlier |
135
+ | Success criterion 2 (e.g., effort) | 1 sprint | 3 sprints | B requires new dependency |
136
+ | Fit with architecture | ✅ | ⚠️ Requires port redesign | |
137
+ | Risk | low | medium | B unknowns: lib maturity, no LTS |
138
+ | Team familiarity | high | low | |
139
+
140
+ ### ADR template
141
+
142
+ ```markdown
143
+ # ADR-NNN: {Decision title}
144
+
145
+ ## Status
146
+ Accepted / Superseded / Deprecated
147
+
148
+ ## Context
149
+ {What problem we faced, what alternatives we considered}
150
+
151
+ ## Decision
152
+ {The chosen option}
153
+
154
+ ## Consequences
155
+ **Positive:** {gains}
156
+ **Negative:** {tradeoffs / debt taken on}
157
+
158
+ ## Spike evidence
159
+ {Link to spike branch + key benchmark numbers}
160
+ ```
161
+
162
+ ### Cleanup
163
+ - [ ] Spike branch tagged (`spike/{name}-{date}`) so it can be referenced
164
+ - [ ] Spike code NOT merged — production should re-implement properly via `/feature:new`
165
+ - [ ] ADR committed to `docs/adr/` (or equivalent)
166
+
167
+ ### Gate
168
+ - [ ] Comparison matrix filled with real numbers
169
+ - [ ] Recommendation explicit (don't say "both are fine")
170
+ - [ ] ADR written
171
+ - [ ] Spike branch tagged + NOT merged
172
+
173
+ ---
174
+
175
+ ## Final Report
176
+
177
+ ```markdown
178
+ ## Spike Complete: {name}
179
+
180
+ ### Question
181
+ {From DEFINE}
182
+
183
+ ### Recommendation
184
+ **Pick Option {X}** because {top reason backed by spike evidence}
185
+
186
+ ### Evidence
187
+ {Benchmark numbers, screenshots, error logs — link to spike branch}
188
+
189
+ ### Next step
190
+ - If accepted: `/feature:new` to build it properly
191
+ - If rejected: document why + close the question
192
+
193
+ ### Time spent
194
+ {Actual vs timebox — note overruns for retrospective}
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Hard Rules
200
+
201
+ - **Define before building** — undefined spike = unbounded spike
202
+ - **Timebox is sacred** — overrun means the question is wrong, not the answer
203
+ - **Throwaway code** — spike branch never merges to main
204
+ - **Numbers, not vibes** — recommendation must cite measurements
205
+ - **One question per spike** — multiple questions = multiple spikes
206
+
207
+ ---
208
+
209
+ ## Related Skills
210
+
211
+ | When | Use |
212
+ |------|-----|
213
+ | Compare options via docs only (no code) | `/research:web` |
214
+ | Spike done, ready to implement properly | `/feature:new` |
215
+ | Spike revealed a bug to investigate | `/fix:root-cause` |
216
+ | Document the ADR as a doc page | `/docs:write` |
217
+
218
+ ## Recommended Agents
219
+
220
+ | Phase | Agent | Purpose |
221
+ |-------|-------|---------|
222
+ | DEFINE | `@clean-architect` | Frame the question |
223
+ | RESEARCH | `@api-designer` | API / integration research |
224
+ | RESEARCH | `@db-designer` | Data model research |
225
+ | RESEARCH | `@security-audit` | Security implications |
226
+ | PROTOTYPE | Stack-specific dev agent | Build the POC |
227
+ | EVALUATE | `@clean-architect` | Architecture impact |
228
+ | EVALUATE | `@docs-writer` | Write the ADR |