moicle 1.1.1 → 1.1.2

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.
@@ -0,0 +1,535 @@
1
+ ---
2
+ name: 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 workflow for investigating unknowns, validating assumptions, and de-risking decisions before committing to full implementation.
9
+
10
+ ## IMPORTANT: Read Architecture First
11
+
12
+ **Before starting any spike, you MUST read the appropriate architecture reference:**
13
+
14
+ ### Global Architecture Files
15
+ ```
16
+ ~/.claude/architecture/
17
+ ├── clean-architecture.md # Core principles for all projects
18
+ ├── flutter-mobile.md # Flutter + Riverpod
19
+ ├── react-frontend.md # React + Vite + TypeScript
20
+ ├── go-backend.md # Go + Gin
21
+ ├── laravel-backend.md # Laravel + PHP
22
+ ├── remix-fullstack.md # Remix fullstack
23
+ └── monorepo.md # Monorepo structure
24
+ ```
25
+
26
+ ### Project-specific (if exists)
27
+ ```
28
+ .claude/architecture/ # Project overrides
29
+ ```
30
+
31
+ **Understand the project structure and patterns before exploring alternatives.**
32
+
33
+ ## Recommended Agents
34
+
35
+ | Phase | Agent | Purpose |
36
+ |-------|-------|---------|
37
+ | DEFINE | `@clean-architect` | Define research questions based on architecture |
38
+ | RESEARCH | `@api-designer` | API/integration research |
39
+ | RESEARCH | `@db-designer` | Data model research |
40
+ | RESEARCH | `@security-audit` | Security implications |
41
+ | PROTOTYPE | `@react-frontend-dev`, `@go-backend-dev`, `@laravel-backend-dev`, `@flutter-mobile-dev`, `@remix-fullstack-dev` | Stack-specific POC |
42
+ | EVALUATE | `@clean-architect` | Architecture impact assessment |
43
+ | EVALUATE | `@docs-writer` | Document findings |
44
+
45
+ ## Workflow Overview
46
+
47
+ ```
48
+ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
49
+ │ 1. DEFINE│──▶│2. RESEARCH──▶│3. PROTOTYPE──▶│4. EVALUATE│
50
+ └──────────┘ └──────────┘ └──────────┘ └──────────┘
51
+ │ │
52
+ │ Timebox Expired? │
53
+ └──────────────────────────────────────────────┘
54
+ End & Document
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Phase 1: DEFINE
60
+
61
+ **Goal**: Define the question/problem to research and set timebox
62
+
63
+ ### Actions
64
+ 1. Clarify what's unknown:
65
+ - What decision needs to be made?
66
+ - What assumptions need validation?
67
+ - What technical unknowns exist?
68
+
69
+ 2. **Identify project stack and read architecture doc**
70
+
71
+ 3. Define research question:
72
+ ```
73
+ Good: "Can we integrate Auth0 with our React app without breaking Clean Architecture?"
74
+ Bad: "Research authentication"
75
+ ```
76
+
77
+ 4. Set timebox based on spike type:
78
+ - Quick spike: 2-4 hours
79
+ - Medium spike: 1-2 days
80
+ - Deep spike: 3-5 days
81
+ - **Never exceed 1 week**
82
+
83
+ 5. Define success criteria:
84
+ ```
85
+ Spike is successful when we know:
86
+ - [ ] Criterion 1
87
+ - [ ] Criterion 2
88
+ - [ ] Criterion 3
89
+ ```
90
+
91
+ ### Output
92
+ ```markdown
93
+ ## Spike: [Name]
94
+
95
+ ### Type
96
+ [Technical/Design/Functional]
97
+
98
+ ### Stack & Architecture
99
+ - Stack: [Flutter/React/Go/Laravel/Remix]
100
+ - Architecture Doc: [path to architecture file]
101
+
102
+ ### Research Question
103
+ [Clear, specific question]
104
+
105
+ ### Why This Spike
106
+ [Why we need this research before implementing]
107
+
108
+ ### Timebox
109
+ - Duration: [X hours/days]
110
+ - Start: [timestamp]
111
+ - End: [timestamp]
112
+
113
+ ### Success Criteria
114
+ We will know enough when:
115
+ - [ ] Criterion 1
116
+ - [ ] Criterion 2
117
+ - [ ] Criterion 3
118
+
119
+ ### Out of Scope
120
+ [What we're NOT exploring]
121
+ ```
122
+
123
+ ### Gate
124
+ - [ ] Research question clear and specific
125
+ - [ ] Architecture doc identified
126
+ - [ ] Timebox set (≤ 1 week)
127
+ - [ ] Success criteria defined
128
+ - [ ] Out of scope defined
129
+
130
+ ---
131
+
132
+ ## Phase 2: RESEARCH
133
+
134
+ **Goal**: Gather information and explore options
135
+
136
+ ### Actions
137
+ 1. **Read relevant architecture docs** for context
138
+
139
+ 2. Research approaches:
140
+ - [ ] Read documentation/specs
141
+ - [ ] Survey existing solutions
142
+ - [ ] Check community best practices
143
+ - [ ] Review similar projects
144
+ - [ ] Consult with team/experts
145
+
146
+ 3. Evaluate against architecture:
147
+ - Does it fit our patterns?
148
+ - Which layers would it affect?
149
+ - Does it respect boundaries?
150
+ - What's the integration complexity?
151
+
152
+ 4. Document findings in real-time:
153
+ ```markdown
154
+ ## Research Log
155
+
156
+ ### [Timestamp] - Option 1: [Name]
157
+ **Source**: [link/person]
158
+ **Pros**:
159
+ - Pro 1
160
+ - Pro 2
161
+
162
+ **Cons**:
163
+ - Con 1
164
+ - Con 2
165
+
166
+ **Architecture Fit**: [Good/Moderate/Poor]
167
+ - [Notes on how it fits our architecture]
168
+
169
+ ### [Timestamp] - Option 2: [Name]
170
+ ...
171
+ ```
172
+
173
+ 5. Track time spent vs timebox
174
+
175
+ ### Research Output
176
+ ```markdown
177
+ ## Research Findings
178
+
179
+ ### Options Explored
180
+ 1. **Option 1**: [brief description]
181
+ - Architecture fit: [assessment]
182
+ - Complexity: [Low/Medium/High]
183
+ - Risk: [Low/Medium/High]
184
+
185
+ 2. **Option 2**: [brief description]
186
+ - Architecture fit: [assessment]
187
+ - Complexity: [Low/Medium/High]
188
+ - Risk: [Low/Medium/High]
189
+
190
+ ### Architecture Impact
191
+ **Affected Layers**: [list from architecture doc]
192
+ **Pattern Changes**: [any changes to current patterns]
193
+ **Dependencies**: [new dependencies needed]
194
+
195
+ ### Initial Recommendation
196
+ [Which option looks most promising and why]
197
+ ```
198
+
199
+ ### Gate
200
+ - [ ] Multiple options explored (at least 2-3)
201
+ - [ ] Architecture impact assessed
202
+ - [ ] Pros/cons documented
203
+ - [ ] Still within timebox
204
+
205
+ ---
206
+
207
+ ## Phase 3: PROTOTYPE
208
+
209
+ **Goal**: Build quick proof of concept to validate approach
210
+
211
+ ### Principles
212
+ 1. **Quick & Dirty** - Don't worry about code quality
213
+ 2. **Focused** - Prove one thing only
214
+ 3. **Throwaway** - Code will likely be discarded
215
+ 4. **Time-boxed** - Stop when time is up
216
+
217
+ ### Actions
218
+ 1. **Read architecture doc** for the affected areas
219
+
220
+ 2. Set prototype scope:
221
+ ```markdown
222
+ ## Prototype Scope
223
+ **Proving**: [the one thing we're validating]
224
+ **NOT proving**: [everything else]
225
+ **Time**: [X hours from total timebox]
226
+ ```
227
+
228
+ 3. Build minimal POC:
229
+ - Create in separate branch/directory
230
+ - Follow architecture patterns where reasonable
231
+ - Mark as prototype:
232
+ ```
233
+ // PROTOTYPE - NOT PRODUCTION CODE
234
+ // Spike: [spike name]
235
+ ```
236
+
237
+ 4. Test the critical path only:
238
+ - Does it work?
239
+ - Does it integrate?
240
+ - Are there blockers?
241
+
242
+ 5. Document observations:
243
+ ```markdown
244
+ ## Prototype Observations
245
+
246
+ ### What Worked
247
+ - [observation 1]
248
+ - [observation 2]
249
+
250
+ ### What Didn't Work
251
+ - [issue 1]
252
+ - [issue 2]
253
+
254
+ ### Surprises
255
+ - [unexpected finding 1]
256
+ - [unexpected finding 2]
257
+
258
+ ### Blockers Found
259
+ - [blocker 1]
260
+ - [blocker 2]
261
+ ```
262
+
263
+ ### Prototype Output
264
+ ```markdown
265
+ ## Prototype Results
266
+
267
+ ### Implementation
268
+ - Branch/Location: [path]
269
+ - Time Spent: [X hours]
270
+ - Status: [Working/Partially Working/Not Working]
271
+
272
+ ### Key Learnings
273
+ 1. [learning 1]
274
+ 2. [learning 2]
275
+ 3. [learning 3]
276
+
277
+ ### Architecture Compliance
278
+ - Fits patterns: [Yes/No/Partially]
279
+ - Issues found: [list]
280
+ - Workarounds needed: [list]
281
+
282
+ ### Effort Estimate (if proceeding)
283
+ - [Rough T-shirt size: XS/S/M/L/XL]
284
+ - [Based on: what you learned]
285
+ ```
286
+
287
+ ### Gate
288
+ - [ ] Prototype proves/disproves key assumption
289
+ - [ ] Blockers identified
290
+ - [ ] Effort estimated
291
+ - [ ] Still within timebox (if not, stop and document)
292
+
293
+ ---
294
+
295
+ ## Phase 4: EVALUATE
296
+
297
+ **Goal**: Assess results and make recommendation
298
+
299
+ ### Actions
300
+ 1. **Review findings against architecture doc**
301
+
302
+ 2. Assess each option:
303
+ ```markdown
304
+ ## Option Assessment
305
+
306
+ ### Option 1: [Name]
307
+ **Architecture Fit**: ⭐⭐⭐⭐⭐ (5/5)
308
+ - [why it fits/doesn't fit]
309
+
310
+ **Complexity**: ⭐⭐⭐ (3/5)
311
+ - [complexity assessment]
312
+
313
+ **Risk**: ⭐⭐ (2/5 - lower is better)
314
+ - [risk assessment]
315
+
316
+ **Effort**: [T-shirt size]
317
+ - [effort justification]
318
+
319
+ **Prototype Result**: [Successful/Partial/Failed]
320
+ ```
321
+
322
+ 3. Make recommendation:
323
+ ```markdown
324
+ ## Recommendation
325
+
326
+ ### Choice: [Option X]
327
+
328
+ ### Reasoning
329
+ 1. [reason 1]
330
+ 2. [reason 2]
331
+ 3. [reason 3]
332
+
333
+ ### Trade-offs Accepted
334
+ - [trade-off 1]
335
+ - [trade-off 2]
336
+
337
+ ### Risks & Mitigations
338
+ - Risk: [risk 1]
339
+ Mitigation: [how to mitigate]
340
+ - Risk: [risk 2]
341
+ Mitigation: [how to mitigate]
342
+
343
+ ### Implementation Plan (High-Level)
344
+ 1. [phase 1]
345
+ 2. [phase 2]
346
+ 3. [phase 3]
347
+
348
+ ### Next Steps
349
+ - [ ] Next step 1
350
+ - [ ] Next step 2
351
+ - [ ] Next step 3
352
+ ```
353
+
354
+ 4. Create decision record:
355
+ ```markdown
356
+ # ADR: [Decision Title]
357
+
358
+ Date: [date]
359
+ Status: Proposed
360
+
361
+ ## Context
362
+ [What led to this spike]
363
+
364
+ ## Decision
365
+ [What we decided]
366
+
367
+ ## Consequences
368
+ - Positive: [list]
369
+ - Negative: [list]
370
+ - Neutral: [list]
371
+
372
+ ## Alternatives Considered
373
+ - Option A: [brief + why rejected]
374
+ - Option B: [brief + why rejected]
375
+ ```
376
+
377
+ ### Final Deliverable
378
+ ```markdown
379
+ ## Spike Summary: [Name]
380
+
381
+ **Duration**: [actual time spent] / [timebox]
382
+ **Date**: [start] - [end]
383
+ **Stack**: [stack]
384
+ **Researcher**: [name/team]
385
+
386
+ ### Question Answered
387
+ [Original research question]
388
+
389
+ ### Answer
390
+ [Clear answer based on findings]
391
+
392
+ ### Recommendation
393
+ [Clear recommendation with reasoning]
394
+
395
+ ### Supporting Evidence
396
+ - Research: [key findings]
397
+ - Prototype: [what we built and learned]
398
+ - Architecture: [how it fits]
399
+
400
+ ### Confidence Level
401
+ [High/Medium/Low] - [why]
402
+
403
+ ### Next Actions
404
+ 1. [ ] Action 1
405
+ 2. [ ] Action 2
406
+ 3. [ ] Action 3
407
+
408
+ ### Artifacts
409
+ - Research notes: [link]
410
+ - Prototype code: [link/path]
411
+ - Decision record: [link]
412
+ ```
413
+
414
+ ### Gate
415
+ - [ ] Recommendation clear and justified
416
+ - [ ] Risks identified and mitigated
417
+ - [ ] Decision record created
418
+ - [ ] Prototype cleaned up or archived
419
+ - [ ] Findings documented
420
+
421
+ ---
422
+
423
+ ## Quick Reference
424
+
425
+ ### Architecture Docs
426
+ | Stack | Doc |
427
+ |-------|-----|
428
+ | All | `clean-architecture.md` |
429
+ | Flutter | `flutter-mobile.md` |
430
+ | React | `react-frontend.md` |
431
+ | Go | `go-backend.md` |
432
+ | Laravel | `laravel-backend.md` |
433
+ | Remix | `remix-fullstack.md` |
434
+ | Monorepo | `monorepo.md` |
435
+
436
+ ### Spike Types
437
+
438
+ | Type | Purpose | Example |
439
+ |------|---------|---------|
440
+ | **Technical** | Validate technical feasibility | Can we use WebSockets with our architecture? |
441
+ | **Design** | Explore design options | What's the best state management for this feature? |
442
+ | **Functional** | Understand requirements | How should offline sync work? |
443
+
444
+ ### Timebox Guidelines
445
+
446
+ | Complexity | Timebox | Output |
447
+ |------------|---------|--------|
448
+ | Quick | 2-4 hours | Research + decision |
449
+ | Medium | 1-2 days | Research + small POC + decision |
450
+ | Deep | 3-5 days | Research + full POC + ADR |
451
+ | **Max** | **1 week** | **Stop and reassess** |
452
+
453
+ ### When to Stop Early
454
+ - ✅ Success criteria met early
455
+ - ✅ Clear blocker found (no point continuing)
456
+ - ✅ Obvious answer emerged
457
+ - ❌ Timebox expired (stop and document)
458
+
459
+ ### Red Flags
460
+ - 🚩 Spike extending beyond 1 week
461
+ - 🚩 Writing production-quality code
462
+ - 🚩 Scope creeping beyond research question
463
+ - 🚩 Not documenting findings
464
+ - 🚩 Trying to prove pre-decided solution
465
+
466
+ ### Success Criteria
467
+ Spike is successful when:
468
+ 1. Research question answered (even if answer is "no")
469
+ 2. Clear recommendation made
470
+ 3. Risks identified
471
+ 4. Architecture impact understood
472
+ 5. Findings documented
473
+ 6. Completed within timebox
474
+
475
+ ### Prototype Cleanup
476
+ After spike:
477
+ ```bash
478
+ # Archive prototype
479
+ git branch -D spike/[name] # Delete branch
480
+ # OR move to /experiments directory
481
+ mkdir -p experiments/spike-[name]
482
+ mv [prototype] experiments/spike-[name]/
483
+
484
+ # Update README
485
+ echo "## Spike: [name]" >> experiments/README.md
486
+ echo "Result: [recommendation]" >> experiments/README.md
487
+ echo "Date: [date]" >> experiments/README.md
488
+ ```
489
+
490
+ ---
491
+
492
+ ## Templates
493
+
494
+ ### Quick Spike Template (2-4 hours)
495
+ ```markdown
496
+ # Spike: [Name]
497
+
498
+ ## Question
499
+ [Clear question]
500
+
501
+ ## Research (2 hours)
502
+ - [ ] Option 1 research
503
+ - [ ] Option 2 research
504
+ - [ ] Documentation review
505
+
506
+ ## Decision (30 min)
507
+ - Recommendation: [choice]
508
+ - Reasoning: [why]
509
+
510
+ ## Next Steps
511
+ - [ ] Next action
512
+ ```
513
+
514
+ ### Full Spike Template (3-5 days)
515
+ ```markdown
516
+ # Spike: [Name]
517
+
518
+ ## Define (Day 1)
519
+ - Question: [clear question]
520
+ - Success criteria: [list]
521
+ - Timebox: [X days]
522
+
523
+ ## Research (Day 1-2)
524
+ - Options explored: [list]
525
+ - Architecture impact: [assessment]
526
+
527
+ ## Prototype (Day 2-3)
528
+ - What: [what we're building]
529
+ - Result: [what we learned]
530
+
531
+ ## Evaluate (Day 4-5)
532
+ - Recommendation: [choice]
533
+ - ADR: [link]
534
+ - Next steps: [list]
535
+ ```