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
@@ -1,225 +0,0 @@
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 |
@@ -1,228 +0,0 @@
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 |
@@ -1,204 +0,0 @@
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 |