moicle 2.0.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.
@@ -6,18 +6,18 @@ args: "[TOPIC]"
6
6
 
7
7
  # Research Solutions
8
8
 
9
- Research solutions on the internet for a specific problem from an explicit topic argument or by analyzing the current conversation context. **Research and propose only do NOT implement.**
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
10
 
11
- **ARGUMENTS:** (optional) Topic or question to research. If omitted, analyze the current conversation (recent messages, IDE selection, task at hand) to determine what to research.
11
+ **ARGUMENTS:** (optional) topic to research. If omitted, infer from current conversation context.
12
12
 
13
13
  ## When to use this skill
14
14
 
15
15
  - ✅ You don't know the right solution / library / pattern yet
16
16
  - ✅ Need to compare multiple approaches before committing
17
- - ✅ Stack / framework changed and best practices may have shifted
18
- - ❌ You already know the approach → use `/feature:new` or `/fix:hotfix`
19
- - ❌ You want to validate the approach by building → use `/research:spike`
20
- - ❌ Debugging a known bug → use `/fix:root-cause`
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
21
 
22
22
  ---
23
23
 
@@ -29,117 +29,159 @@ IDENTIFY → DETECT STACK → SEARCH → SYNTHESIZE → PROPOSE
29
29
 
30
30
  ---
31
31
 
32
- ## Step 1: Identify what to research
32
+ ## Step 1: IDENTIFY
33
33
 
34
- ### Mode 1 — Argument provided
35
- - Use the argument directly as the topic
36
- - If too broad, narrow it down using project context (stack, architecture, current task) BEFORE searching
34
+ ### Mode 1 — argument provided
35
+ - Use the argument as the topic
36
+ - If too broad, narrow using project context **before** any search
37
37
 
38
- ### Mode 2 — No argument
39
- - Analyze the current conversation: recent messages, IDE file selection, active task
40
- - Identify: what is the user doing, what problem they hit, what solution they need
41
- - **Summarize the problem back to the user and get confirmation** before burning search budget
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.
42
51
 
43
52
  ### Gate
44
- - [ ] Problem statement clear and confirmed (Mode 2)
45
- - [ ] Scope narrow enough to research in <10 queries
53
+ - [ ] Problem statement confirmed (Mode 2)
54
+ - [ ] Scope narrow enough to fit in budget
55
+ - [ ] Budget agreed (default: 5-8 queries)
46
56
 
47
57
  ---
48
58
 
49
- ## Step 2: Detect project context
59
+ ## Step 2: DETECT STACK
50
60
 
51
- Detect the project's tech stack so results can be filtered for relevance.
61
+ Use `~/.claude/architecture/_shared/stack-detection.md` for canonical detection rules.
52
62
 
53
- | File | Stack |
54
- |------|-------|
55
- | `go.mod` | Go (note version from `go` directive) |
56
- | `package.json` | Node.js inspect dependencies to pick framework (NestJS / Vite+React / Remix / etc.) |
57
- | `pubspec.yaml` | Flutter / Dart |
58
- | `composer.json` | PHP / Laravel |
59
- | `Cargo.toml` | Rust |
60
- | `pyproject.toml` / `requirements.txt` | Python |
61
-
62
- Also check `.claude/architecture/` for the architecture doc in use — this shapes which patterns are idiomatic for the project.
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")
63
68
 
64
69
  ### Gate
65
70
  - [ ] Stack + version identified
66
- - [ ] Architecture context noted (if any)
71
+ - [ ] Architecture context noted
72
+ - [ ] Hard constraints captured
67
73
 
68
74
  ---
69
75
 
70
- ## Step 3: Search the internet
71
-
72
- Use **WebSearch** and **WebFetch**.
76
+ ## Step 3: SEARCH
73
77
 
74
- ### Search strategy
75
- 1. **Broad first** — overview, best practices, common approaches
76
- 2. **Deep dive** — official docs, GitHub issues, Stack Overflow, authoritative blogs
77
- 3. **Compare** — if multiple solutions exist, list pros / cons of each
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
78
82
 
79
83
  ### Source priority
80
- 1. Official documentation
81
- 2. GitHub issues / release notes (quirks, known bugs)
82
- 3. Stack Overflow (accepted answers with high scores)
83
- 4. Authoritative blogs (Anthropic, framework authors, well-known engineers)
84
- 5. Recent > oldprefer last 2 years unless evergreen
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 |
85
93
 
86
94
  ### Search tips
87
- - **Prefer English queries** — richer, more recent results
88
- - Include library + version when version-sensitive (e.g., `nestjs 10 typeorm migrations`)
89
- - Cross-validate across at least 2–3 independent sources
90
- - When sources conflict, prefer most recent + most authoritative; note the conflict
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.
91
110
 
92
111
  ### Gate
93
- - [ ] At least 2 independent sources for the recommendation
94
- - [ ] Sources are < 2 years old (or "evergreen" justified)
112
+ - [ ] 2 independent sources per option
113
+ - [ ] Sources <2 years old (or evergreen explicitly justified)
114
+ - [ ] Counter-search done for the leading option
95
115
 
96
116
  ---
97
117
 
98
- ## Step 4: Synthesize results
118
+ ## Step 4: SYNTHESIZE
99
119
 
100
- Present findings in this format:
120
+ ### Comparison matrix (when ≥2 options)
101
121
 
102
122
  ```markdown
103
- ## Problem
104
- {Short summary of the problem, with project context — stack, constraints, goal}
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
+ ```
105
134
 
106
- ## Solutions Found
135
+ ### Report template
107
136
 
108
- ### Solution 1: {Name}
109
- - **Description:** {How it works}
110
- - **Pros:** {...}
111
- - **Cons:** {...}
112
- - **Fit for this project:** {High / Medium / Low — why}
113
- - **Source:** {link}
137
+ ```markdown
138
+ ## Problem
139
+ {One paragraph: what we're solving, stack, constraints, goal}
114
140
 
115
- ### Solution 2: {Name} (if applicable)
116
- - ...
141
+ ## Options Considered
142
+ {Brief: A, B, C — one line each on what they are}
143
+
144
+ ## Comparison
145
+ {matrix above}
117
146
 
118
147
  ## Recommendation
119
- {Which solution fits best and why reference architecture doc / stack conventions}
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}
120
154
 
121
- ## Code Example (if applicable)
122
- {Minimal snippet showing the recommended approach, adapted to the project's stack}
155
+ ## Caveats
156
+ - {gotcha 1 with source link}
157
+ - {gotcha 2}
123
158
 
124
- ## Caveats / Known Issues
125
- - {Gotcha 1}
126
- - {Gotcha 2}
159
+ ## Conflicts in sources
160
+ - {if any — what disagreed, how it was resolved}
127
161
 
128
162
  ## References
129
- - {link 1} — {what this source gave us}
130
- - {link 2} — {...}
163
+ - {url} — {what this gave us}
164
+ - ...
131
165
  ```
132
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
+
133
173
  ---
134
174
 
135
175
  ## Hard Rules
136
176
 
137
- - **Research and propose — do NOT implement.** Wait for user confirmation before touching code
138
- - **Consider project context:** stack, architecture, conventions. A solution idiomatic in one project can be wrong in another
139
- - **Narrow scope when too broad:** if the topic is too wide (e.g., "how to do auth"), ask the user to narrow it
140
- - **Flag stale answers:** if top answers are 3+ years old and the library has had major versions since, mention it and check release notes
141
- - **No hallucinated APIs:** if uncertain whether a method / option exists, verify in official docs before recommending
142
- - **Cite sources:** every non-trivial claim should have a link
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
143
185
 
144
186
  ---
145
187
 
@@ -147,17 +189,16 @@ Present findings in this format:
147
189
 
148
190
  | When | Use |
149
191
  |------|-----|
150
- | You want to prototype the chosen approach | `/research:spike` |
151
- | You already know the approach and want to implement | `/feature:new` / `/fix:hotfix` |
152
- | You're debugging a known bug (not researching options) | `/fix:root-cause` |
153
- | You want to write the research up as a design doc | `/docs:write` |
154
-
155
- ---
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` |
156
196
 
157
197
  ## Recommended Agents
158
198
 
159
199
  | Phase | Agent | Purpose |
160
200
  |-------|-------|---------|
161
- | Search | `@docs-writer` | Frame the research output as a design note |
162
- | Synthesize | `@api-designer` | If researching API patterns |
163
- | Synthesize | `@security-audit` | If researching anything auth / crypto / data handling |
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 |