@hustle-together/api-dev-tools 3.10.0 → 3.11.1

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 (97) hide show
  1. package/.claude/api-dev-state.json +159 -0
  2. package/.claude/commands/README.md +185 -0
  3. package/.claude/commands/add-command.md +209 -0
  4. package/.claude/commands/api-create.md +499 -0
  5. package/.claude/commands/api-env.md +50 -0
  6. package/.claude/commands/api-interview.md +331 -0
  7. package/.claude/commands/api-research.md +331 -0
  8. package/.claude/commands/api-status.md +259 -0
  9. package/.claude/commands/api-verify.md +231 -0
  10. package/.claude/commands/beepboop.md +97 -0
  11. package/.claude/commands/busycommit.md +112 -0
  12. package/.claude/commands/commit.md +83 -0
  13. package/.claude/commands/cycle.md +142 -0
  14. package/.claude/commands/gap.md +86 -0
  15. package/.claude/commands/green.md +142 -0
  16. package/.claude/commands/issue.md +192 -0
  17. package/.claude/commands/plan.md +168 -0
  18. package/.claude/commands/pr.md +122 -0
  19. package/.claude/commands/red.md +142 -0
  20. package/.claude/commands/refactor.md +142 -0
  21. package/.claude/commands/spike.md +142 -0
  22. package/.claude/commands/summarize.md +94 -0
  23. package/.claude/commands/tdd.md +144 -0
  24. package/.claude/commands/worktree-add.md +315 -0
  25. package/.claude/commands/worktree-cleanup.md +281 -0
  26. package/.claude/hooks/api-workflow-check.py +227 -0
  27. package/.claude/hooks/enforce-deep-research.py +185 -0
  28. package/.claude/hooks/enforce-disambiguation.py +155 -0
  29. package/.claude/hooks/enforce-documentation.py +192 -0
  30. package/.claude/hooks/enforce-environment.py +253 -0
  31. package/.claude/hooks/enforce-external-research.py +328 -0
  32. package/.claude/hooks/enforce-interview.py +421 -0
  33. package/.claude/hooks/enforce-refactor.py +189 -0
  34. package/.claude/hooks/enforce-research.py +159 -0
  35. package/.claude/hooks/enforce-schema.py +186 -0
  36. package/.claude/hooks/enforce-scope.py +160 -0
  37. package/.claude/hooks/enforce-tdd-red.py +250 -0
  38. package/.claude/hooks/enforce-verify.py +186 -0
  39. package/.claude/hooks/periodic-reground.py +154 -0
  40. package/.claude/hooks/session-startup.py +151 -0
  41. package/.claude/hooks/track-tool-use.py +626 -0
  42. package/.claude/hooks/verify-after-green.py +282 -0
  43. package/.claude/hooks/verify-implementation.py +225 -0
  44. package/.claude/research/index.json +6 -0
  45. package/.claude/settings.json +93 -0
  46. package/.claude/settings.local.json +11 -0
  47. package/.claude-plugin/marketplace.json +112 -0
  48. package/.skills/README.md +291 -0
  49. package/.skills/_shared/convert-commands.py +192 -0
  50. package/.skills/_shared/hooks/api-workflow-check.py +227 -0
  51. package/.skills/_shared/hooks/enforce-deep-research.py +185 -0
  52. package/.skills/_shared/hooks/enforce-disambiguation.py +155 -0
  53. package/.skills/_shared/hooks/enforce-documentation.py +192 -0
  54. package/.skills/_shared/hooks/enforce-environment.py +253 -0
  55. package/.skills/_shared/hooks/enforce-external-research.py +328 -0
  56. package/.skills/_shared/hooks/enforce-interview.py +421 -0
  57. package/.skills/_shared/hooks/enforce-refactor.py +189 -0
  58. package/.skills/_shared/hooks/enforce-research.py +159 -0
  59. package/.skills/_shared/hooks/enforce-schema.py +186 -0
  60. package/.skills/_shared/hooks/enforce-scope.py +160 -0
  61. package/.skills/_shared/hooks/enforce-tdd-red.py +250 -0
  62. package/.skills/_shared/hooks/enforce-verify.py +186 -0
  63. package/.skills/_shared/hooks/periodic-reground.py +154 -0
  64. package/.skills/_shared/hooks/session-startup.py +151 -0
  65. package/.skills/_shared/hooks/track-tool-use.py +626 -0
  66. package/.skills/_shared/hooks/verify-after-green.py +282 -0
  67. package/.skills/_shared/hooks/verify-implementation.py +225 -0
  68. package/.skills/_shared/install.sh +114 -0
  69. package/.skills/_shared/settings.json +93 -0
  70. package/.skills/add-command/SKILL.md +222 -0
  71. package/.skills/api-create/SKILL.md +512 -0
  72. package/.skills/api-env/SKILL.md +63 -0
  73. package/.skills/api-interview/SKILL.md +344 -0
  74. package/.skills/api-research/SKILL.md +344 -0
  75. package/.skills/api-status/SKILL.md +272 -0
  76. package/.skills/api-verify/SKILL.md +244 -0
  77. package/.skills/beepboop/SKILL.md +110 -0
  78. package/.skills/busycommit/SKILL.md +125 -0
  79. package/.skills/commit/SKILL.md +96 -0
  80. package/.skills/cycle/SKILL.md +155 -0
  81. package/.skills/gap/SKILL.md +99 -0
  82. package/.skills/green/SKILL.md +155 -0
  83. package/.skills/issue/SKILL.md +205 -0
  84. package/.skills/plan/SKILL.md +181 -0
  85. package/.skills/pr/SKILL.md +135 -0
  86. package/.skills/red/SKILL.md +155 -0
  87. package/.skills/refactor/SKILL.md +155 -0
  88. package/.skills/spike/SKILL.md +155 -0
  89. package/.skills/summarize/SKILL.md +107 -0
  90. package/.skills/tdd/SKILL.md +157 -0
  91. package/.skills/update-todos/SKILL.md +228 -0
  92. package/.skills/worktree-add/SKILL.md +328 -0
  93. package/.skills/worktree-cleanup/SKILL.md +294 -0
  94. package/CHANGELOG.md +97 -0
  95. package/README.md +66 -20
  96. package/bin/cli.js +7 -6
  97. package/package.json +22 -11
@@ -0,0 +1,331 @@
1
+ # API Interview - Research-Driven Dynamic Discovery v3.0
2
+
3
+ **Usage:** `/api-interview [endpoint-name]`
4
+
5
+ **Purpose:** Conduct structured interview where questions are GENERATED FROM research findings, not generic templates. Every question is specific to the discovered API capabilities.
6
+
7
+ ## Key Principle: Questions FROM Research
8
+
9
+ **OLD WAY (Generic Templates):**
10
+ ```
11
+ "Which AI provider should this endpoint support?"
12
+ - OpenAI
13
+ - Anthropic
14
+ - Google
15
+ ```
16
+
17
+ **NEW WAY (From Research):**
18
+ ```
19
+ Based on research, Brandfetch API has 7 parameters:
20
+
21
+ 1. DOMAIN (required) - string
22
+ → No question needed (always required)
23
+
24
+ 2. FORMAT: ["json", "svg", "png", "raw"]
25
+ Q: Which formats do you need?
26
+ [x] json [x] svg [x] png [ ] raw
27
+
28
+ 3. QUALITY: 1-100 (continuous range)
29
+ Q: How should we TEST this continuous parameter?
30
+ [ ] All values (100 tests)
31
+ [x] Boundary (1, 50, 100)
32
+ [ ] Sample (1, 25, 50, 75, 100)
33
+ [ ] Custom: ____
34
+ ```
35
+
36
+ ## Interview Flow
37
+
38
+ ### PREREQUISITE - Research Must Be Complete (Phase 3)
39
+
40
+ **Interview is BLOCKED until research is done.**
41
+
42
+ The interview READS from the research findings:
43
+ ```
44
+ State file shows:
45
+ research_initial.status = "complete"
46
+ research_initial.sources = [...]
47
+
48
+ Discovered parameters:
49
+ - 5 required parameters
50
+ - 12 optional parameters
51
+ - 3 enum types
52
+ - 2 continuous ranges
53
+ ```
54
+
55
+ ### Parameter-Based Questions
56
+
57
+ For each discovered parameter, generate an appropriate question:
58
+
59
+ #### Required Parameters (Confirmation Only)
60
+ ```
61
+ ┌────────────────────────────────────────────────────────────┐
62
+ │ REQUIRED PARAMETERS │
63
+ │ │
64
+ │ These parameters are required by the API: │
65
+ │ │
66
+ │ 1. domain (string) - The domain to fetch brand data for │
67
+ │ 2. apiKey (string) - Your Brandfetch API key │
68
+ │ │
69
+ │ Confirm these are understood? [Y/n] │
70
+ └────────────────────────────────────────────────────────────┘
71
+ ```
72
+
73
+ #### Enum Parameters (Multi-Select)
74
+ ```
75
+ ┌────────────────────────────────────────────────────────────┐
76
+ │ FORMAT PARAMETER │
77
+ │ │
78
+ │ Research found these format options: │
79
+ │ │
80
+ │ [x] json - Structured JSON response │
81
+ │ [x] svg - Vector logo format │
82
+ │ [x] png - Raster logo format │
83
+ │ [ ] raw - Raw API response (advanced) │
84
+ │ │
85
+ │ Which formats should we support? │
86
+ └────────────────────────────────────────────────────────────┘
87
+ ```
88
+
89
+ #### Continuous Parameters (Test Strategy)
90
+ ```
91
+ ┌────────────────────────────────────────────────────────────┐
92
+ │ QUALITY PARAMETER │
93
+ │ │
94
+ │ Research found: quality is a continuous range 1-100 │
95
+ │ │
96
+ │ How should we TEST this parameter? │
97
+ │ │
98
+ │ [ ] All values (100 tests - comprehensive but slow) │
99
+ │ [x] Boundary (1, 50, 100 - 3 tests) │
100
+ │ [ ] Sample (1, 25, 50, 75, 100 - 5 tests) │
101
+ │ [ ] Custom values: ____ │
102
+ │ │
103
+ │ Your testing strategy affects test count. │
104
+ └────────────────────────────────────────────────────────────┘
105
+ ```
106
+
107
+ #### Boolean Parameters (Enable/Disable)
108
+ ```
109
+ ┌────────────────────────────────────────────────────────────┐
110
+ │ INCLUDE_COLORS PARAMETER │
111
+ │ │
112
+ │ Research found: includeColors (boolean, default: true) │
113
+ │ │
114
+ │ Should we expose this parameter? │
115
+ │ │
116
+ │ [x] Yes - Let users toggle it │
117
+ │ [ ] No - Use default (true) always │
118
+ │ [ ] Hardcode to: ____ │
119
+ └────────────────────────────────────────────────────────────┘
120
+ ```
121
+
122
+ ### Feature Questions
123
+
124
+ Based on discovered features, ask about priorities:
125
+
126
+ ```
127
+ ┌────────────────────────────────────────────────────────────┐
128
+ │ DISCOVERED FEATURES │
129
+ │ │
130
+ │ Research found these features. Mark priorities: │
131
+ │ │
132
+ │ [x] Basic brand fetch - Get logo, colors, fonts │
133
+ │ [x] Multiple formats - Support json, svg, png │
134
+ │ [ ] Webhook callbacks - Async notification (skip for now) │
135
+ │ [ ] Batch processing - Multiple domains at once │
136
+ │ [x] Error handling - Graceful degradation │
137
+ │ │
138
+ │ Confirm feature scope? │
139
+ └────────────────────────────────────────────────────────────┘
140
+ ```
141
+
142
+ ### Error Handling Questions
143
+
144
+ ```
145
+ ┌────────────────────────────────────────────────────────────┐
146
+ │ ERROR HANDLING │
147
+ │ │
148
+ │ Research found these error cases in the API: │
149
+ │ │
150
+ │ - 400: Invalid domain format │
151
+ │ - 401: Invalid API key │
152
+ │ - 404: Brand not found │
153
+ │ - 429: Rate limit exceeded │
154
+ │ - 500: Server error │
155
+ │ │
156
+ │ How should we handle rate limits (429)? │
157
+ │ │
158
+ │ [x] Retry with exponential backoff │
159
+ │ [ ] Return error immediately │
160
+ │ [ ] Queue and retry later │
161
+ │ [ ] Custom: ____ │
162
+ └────────────────────────────────────────────────────────────┘
163
+ ```
164
+
165
+ ### Deep Research Proposal (Phase 5)
166
+
167
+ After interview, propose additional research:
168
+
169
+ ```
170
+ ┌────────────────────────────────────────────────────────────┐
171
+ │ PROPOSED DEEP RESEARCH │
172
+ │ │
173
+ │ Based on your selections, I recommend researching: │
174
+ │ │
175
+ │ [x] Rate limiting behavior │
176
+ │ Reason: You selected "retry with backoff" │
177
+ │ │
178
+ │ [x] SVG optimization │
179
+ │ Reason: You selected SVG format │
180
+ │ │
181
+ │ [ ] Webhook format │
182
+ │ Reason: You skipped webhook feature │
183
+ │ │
184
+ │ Approve these searches? [Y] │
185
+ │ Add more: ____ │
186
+ │ Skip and proceed: [n] │
187
+ └────────────────────────────────────────────────────────────┘
188
+ ```
189
+
190
+ ## Question Types Summary
191
+
192
+ | Discovered Type | Question Type | Example |
193
+ |----------------|---------------|---------|
194
+ | Required param | Confirmation | "Confirm these are understood?" |
195
+ | Enum param | Multi-select | "Which formats to support?" |
196
+ | Continuous range | Test strategy | "How to test 1-100 range?" |
197
+ | Boolean param | Enable/disable | "Expose this parameter?" |
198
+ | Optional feature | Priority | "Include this feature?" |
199
+ | Error case | Handling strategy | "How to handle rate limits?" |
200
+
201
+ ## State Tracking
202
+
203
+ All decisions are saved to `.claude/api-dev-state.json`:
204
+
205
+ ```json
206
+ {
207
+ "phases": {
208
+ "interview": {
209
+ "status": "complete",
210
+ "questions": [
211
+ {
212
+ "parameter": "format",
213
+ "type": "enum",
214
+ "options": ["json", "svg", "png", "raw"],
215
+ "selected": ["json", "svg", "png"],
216
+ "timestamp": "..."
217
+ },
218
+ {
219
+ "parameter": "quality",
220
+ "type": "continuous",
221
+ "range": [1, 100],
222
+ "test_strategy": "boundary",
223
+ "test_values": [1, 50, 100],
224
+ "timestamp": "..."
225
+ }
226
+ ],
227
+ "decisions": {
228
+ "format": ["json", "svg", "png"],
229
+ "quality_testing": "boundary",
230
+ "quality_values": [1, 50, 100],
231
+ "rate_limit_handling": "exponential_backoff"
232
+ }
233
+ }
234
+ }
235
+ }
236
+ ```
237
+
238
+ ## Output
239
+
240
+ Creates: `.claude/research/[api-name]/interview.md`
241
+
242
+ ```markdown
243
+ # Interview: [API Name]
244
+
245
+ **Date:** [current-date]
246
+ **Research Sources:** [list from research phase]
247
+ **Status:** Interview Complete
248
+
249
+ ## Discovered Parameters
250
+
251
+ | Parameter | Type | Required | Decision |
252
+ |-----------|------|----------|----------|
253
+ | domain | string | Yes | Always required |
254
+ | format | enum | No | json, svg, png |
255
+ | quality | 1-100 | No | Boundary testing: 1, 50, 100 |
256
+
257
+ ## Feature Scope
258
+
259
+ | Feature | Included | Reason |
260
+ |---------|----------|--------|
261
+ | Basic fetch | Yes | Core functionality |
262
+ | Multiple formats | Yes | User selected |
263
+ | Webhooks | No | Deferred to v2 |
264
+
265
+ ## Test Strategy
266
+
267
+ - Enum parameters: Test all selected values
268
+ - Continuous parameters: Boundary testing (3 values)
269
+ - Error cases: 400, 401, 404, 429, 500
270
+
271
+ ## Decisions Summary
272
+
273
+ ```json
274
+ {
275
+ "format": ["json", "svg", "png"],
276
+ "quality_testing": "boundary",
277
+ "rate_limit_handling": "exponential_backoff"
278
+ }
279
+ ```
280
+
281
+ ## Deep Research Approved
282
+
283
+ - Rate limiting behavior (for retry logic)
284
+ - SVG optimization (for SVG format)
285
+
286
+ ## Open Questions
287
+
288
+ [Any remaining ambiguities]
289
+ ```
290
+
291
+ ## Integration with Hooks
292
+
293
+ The `enforce-interview.py` hook injects these decisions when Claude tries to write implementation:
294
+
295
+ ```
296
+ INTERVIEW CONTEXT REMINDER
297
+
298
+ When implementing, remember user decisions:
299
+ - format: ["json", "svg", "png"] (raw excluded)
300
+ - quality: boundary testing (1, 50, 100)
301
+ - rate limits: exponential backoff
302
+
303
+ Source: .claude/api-dev-state.json
304
+ ```
305
+
306
+ <claude-commands-template>
307
+ ## Interview Guidelines v3.0
308
+
309
+ 1. **Questions FROM Research** - Never use generic templates
310
+ 2. **Parameter-Specific** - Each discovered param gets appropriate question
311
+ 3. **Test Strategy for Continuous** - Ask how to test ranges
312
+ 4. **Track Decisions** - Save everything to state file
313
+ 5. **Propose Deep Research** - Based on selections
314
+ 6. **No Skipped Parameters** - Every discovered param must have a decision
315
+
316
+ ## Question Generation Rules
317
+
318
+ | If research finds... | Then ask... |
319
+ |---------------------|-------------|
320
+ | Enum with 3+ options | Multi-select: which to support |
321
+ | Continuous range | Test strategy: all/boundary/sample |
322
+ | Boolean param | Enable/disable/hardcode |
323
+ | Optional feature | Include/exclude/defer |
324
+ | Error case | Handling strategy |
325
+
326
+ ## After Interview
327
+
328
+ - Decisions saved to state file
329
+ - Decisions injected during implementation via hook
330
+ - Consistency between interview answers and code enforced
331
+ </claude-commands-template>
@@ -0,0 +1,331 @@
1
+ # API Research - Adaptive Documentation Discovery v3.0
2
+
3
+ **Usage:** `/api-research [library-or-service-name]`
4
+
5
+ **Purpose:** Research external APIs and SDKs using an adaptive, propose-approve flow (not shotgun searches).
6
+
7
+ ## Key Principle: Adaptive Research
8
+
9
+ **NOT shotgun research** - We don't blindly run 20 searches.
10
+
11
+ **Adaptive flow:**
12
+ 1. Run 2-3 initial searches
13
+ 2. Summarize findings
14
+ 3. PROPOSE additional searches based on context
15
+ 4. User approves/modifies proposals
16
+ 5. Execute approved searches
17
+ 6. Repeat until complete
18
+
19
+ ## Research Phases
20
+
21
+ ### Initial Discovery (Automatic)
22
+
23
+ Run 2-3 targeted searches:
24
+ ```
25
+ - Context7: "[library-name]" (if SDK/library)
26
+ - WebSearch: "[name] official documentation"
27
+ - WebSearch: "site:[domain] api reference" (if known domain)
28
+ ```
29
+
30
+ Present initial summary:
31
+ ```
32
+ ┌────────────────────────────────────────────────────────────┐
33
+ │ INITIAL RESEARCH: [library-name] │
34
+ │ │
35
+ │ │ Source │ Status │
36
+ │ ├─────────────────────┼────────────────────────────────────│
37
+ │ │ Official docs │ ✓ Found: [URL] │
38
+ │ │ API Reference │ ✓ REST v2 documented │
39
+ │ │ Auth method │ ✓ Bearer token / API key │
40
+ │ │ TypeScript types │ ? Not confirmed │
41
+ │ │ npm package │ ? Not searched │
42
+ │ │
43
+ │ Discovered parameters: 5 required, 12 optional │
44
+ │ │
45
+ │ Proceed to interview? [Y] │
46
+ │ Search more first? [n] → What? ____ │
47
+ └────────────────────────────────────────────────────────────┘
48
+ ```
49
+
50
+ ### Deep Research (Proposed)
51
+
52
+ After interview, PROPOSE targeted searches based on user's selections:
53
+
54
+ ```
55
+ ┌────────────────────────────────────────────────────────────┐
56
+ │ PROPOSED DEEP RESEARCH │
57
+ │ │
58
+ │ Based on interview answers, I recommend researching: │
59
+ │ │
60
+ │ [x] Error response format │
61
+ │ Reason: You selected "comprehensive error handling" │
62
+ │ │
63
+ │ [x] Rate limiting behavior │
64
+ │ Reason: You selected "short cache" / high frequency │
65
+ │ │
66
+ │ [ ] Webhook support │
67
+ │ Reason: You didn't select async/webhook features │
68
+ │ │
69
+ │ [x] SVG optimization options │
70
+ │ Reason: You selected SVG output format │
71
+ │ │
72
+ │ [x] Batch processing │
73
+ │ Reason: You mentioned "multiple domains at once" │
74
+ │ │
75
+ │ Approve these searches? [Y] │
76
+ │ Add more: ____ │
77
+ │ Skip and proceed: [n] │
78
+ └────────────────────────────────────────────────────────────┘
79
+ ```
80
+
81
+ ### Execute Approved Searches
82
+
83
+ Only run searches that were explicitly approved:
84
+ - Track which searches were proposed vs approved vs skipped
85
+ - Log everything to state file for transparency
86
+
87
+ ```json
88
+ {
89
+ "research_deep": {
90
+ "proposed_searches": [
91
+ "error response format",
92
+ "rate limiting behavior",
93
+ "webhook support",
94
+ "SVG optimization options",
95
+ "batch processing"
96
+ ],
97
+ "approved_searches": [
98
+ "error response format",
99
+ "rate limiting behavior",
100
+ "SVG optimization options",
101
+ "batch processing"
102
+ ],
103
+ "skipped_searches": [
104
+ "webhook support"
105
+ ]
106
+ }
107
+ }
108
+ ```
109
+
110
+ ## Research Caching & Freshness
111
+
112
+ Research is cached in `.claude/research/[api-name]/`:
113
+
114
+ ```
115
+ .claude/research/
116
+ ├── brandfetch/
117
+ │ ├── 2025-12-08_initial.md # Timestamped snapshot
118
+ │ ├── 2025-12-08_deep.md # Deep research after interview
119
+ │ └── CURRENT.md # Latest (copy or symlink)
120
+ ├── vercel-ai-sdk/
121
+ │ ├── providers/ # Complex APIs get subfolders
122
+ │ │ ├── openai.md
123
+ │ │ ├── anthropic.md
124
+ │ │ └── groq.md
125
+ │ └── CURRENT.md
126
+ └── index.json # Catalog with freshness
127
+ ```
128
+
129
+ ### Freshness Tracking
130
+
131
+ ```json
132
+ {
133
+ "brandfetch": {
134
+ "last_updated": "2025-12-08",
135
+ "current_file": "brandfetch/CURRENT.md",
136
+ "days_old": 0,
137
+ "parameters_discovered": 7,
138
+ "source_urls": ["https://docs.brandfetch.com"]
139
+ }
140
+ }
141
+ ```
142
+
143
+ **Freshness Rule:** If research is >7 days old when referenced:
144
+ ```
145
+ ⚠️ Research for "brandfetch" is 15 days old.
146
+ Re-research before using? [Y/n]
147
+ ```
148
+
149
+ ## Output Format
150
+
151
+ Creates: `.claude/research/[library-name]/CURRENT.md`
152
+
153
+ ```markdown
154
+ # Research: [Library/Service Name]
155
+
156
+ **Date:** [current-date]
157
+ **Version:** [version-number]
158
+ **Status:** Research Complete
159
+ **Freshness:** 0 days (valid for 7 days)
160
+
161
+ ## 1. Official Documentation Links
162
+ - Main docs: [URL]
163
+ - API reference: [URL]
164
+ - GitHub repo: [URL]
165
+ - npm package: [URL]
166
+ - TypeScript types: [URL]
167
+
168
+ ## 2. Installation & Setup
169
+ ### Installation
170
+ ```bash
171
+ [installation command]
172
+ ```
173
+
174
+ ### Environment Variables
175
+ ```env
176
+ [required env vars]
177
+ ```
178
+
179
+ ### API Key Setup
180
+ [How to obtain and configure]
181
+
182
+ ## 3. Complete Request Schema
183
+ ### Required Parameters
184
+ | Parameter | Type | Description | Validation |
185
+ |-----------|------|-------------|------------|
186
+ | [name] | [type] | [desc] | [rules] |
187
+
188
+ ### Optional Parameters
189
+ | Parameter | Type | Default | Description | Notes |
190
+ |-----------|------|---------|-------------|-------|
191
+ | [name] | [type] | [default] | [desc] | [notes] |
192
+
193
+ ### Continuous Parameters (for test strategy)
194
+ | Parameter | Type | Range | Suggested Test Values |
195
+ |-----------|------|-------|----------------------|
196
+ | quality | number | 1-100 | 1, 50, 100 (boundary) |
197
+ | timeout | number | 1000-30000 | 1000, 15000, 30000 |
198
+
199
+ ## 4. Complete Response Schema
200
+ ### Success Response
201
+ [TypeScript interface]
202
+
203
+ ### Error Response
204
+ [TypeScript interface with error codes]
205
+
206
+ ## 5. Features & Capabilities
207
+ ### Core Features (Discovered)
208
+ - [x] [Feature 1]: [description]
209
+ - [x] [Feature 2]: [description]
210
+
211
+ ### Features NOT Implemented (Intentional)
212
+ - [ ] [Feature]: [reason for exclusion]
213
+
214
+ ## 6. Limitations & Constraints
215
+ - Rate limits: [details]
216
+ - Size limits: [details]
217
+ - Timeout: [details]
218
+
219
+ ## 7. Testing Considerations
220
+ - [ ] Test boundary values for continuous params
221
+ - [ ] Test all enum values
222
+ - [ ] Test error responses
223
+ - [ ] Test rate limiting behavior
224
+
225
+ ## 8. Research Trail
226
+ ### Searches Performed
227
+ | Search | Tool | Found |
228
+ |--------|------|-------|
229
+ | "[name] documentation" | WebSearch | ✓ |
230
+ | "[name]" | Context7 | ✓ |
231
+
232
+ ### Proposed but Skipped
233
+ - "webhook support" - User declined, not needed
234
+ ```
235
+
236
+ ## Research-First Schema Design (MANDATORY)
237
+
238
+ ### The Anti-Pattern: Schema-First Development
239
+
240
+ **NEVER DO THIS:**
241
+ - ❌ Define interfaces based on assumptions before researching
242
+ - ❌ Rely on training data for API capabilities
243
+ - ❌ Say "I think it supports..." without verification
244
+ - ❌ Build schemas from memory instead of documentation
245
+
246
+ ### The Correct Pattern: Research-First
247
+
248
+ **ALWAYS DO THIS:**
249
+
250
+ 1. **Research the Source of Truth**
251
+ - Use Context7 for SDK docs
252
+ - Use WebSearch for official docs
253
+ - Check GitHub for current implementation
254
+
255
+ 2. **Build Schema FROM Research**
256
+ - Interface fields emerge from discovered capabilities
257
+ - Every field has a source (docs, SDK types, API response)
258
+ - Don't guess - verify each capability
259
+
260
+ 3. **Verify with Phase 10**
261
+ - After implementation, re-research
262
+ - Compare docs to implementation
263
+ - Fix gaps or document intentional omissions
264
+
265
+ ## Research Query Tracking
266
+
267
+ All research is tracked in `.claude/api-dev-state.json`:
268
+
269
+ ```json
270
+ {
271
+ "research_queries": [
272
+ {
273
+ "timestamp": "2025-12-08T...",
274
+ "tool": "WebSearch",
275
+ "query": "Brandfetch API documentation",
276
+ "terms": ["brandfetch", "api", "documentation"]
277
+ },
278
+ {
279
+ "timestamp": "2025-12-08T...",
280
+ "tool": "mcp__context7__get-library-docs",
281
+ "library": "brandfetch",
282
+ "terms": ["brandfetch"]
283
+ }
284
+ ],
285
+ "phases": {
286
+ "research_initial": {
287
+ "status": "complete",
288
+ "sources": [...],
289
+ "summary_approved": true
290
+ },
291
+ "research_deep": {
292
+ "status": "complete",
293
+ "proposed_searches": [...],
294
+ "approved_searches": [...],
295
+ "skipped_searches": [...]
296
+ }
297
+ }
298
+ }
299
+ ```
300
+
301
+ ## Usage Examples
302
+
303
+ ### Research with full flow
304
+ ```bash
305
+ /api-research brandfetch
306
+ # → Initial search (2-3 queries)
307
+ # → Present summary, ask to proceed
308
+ # → Interview happens (separate phase)
309
+ # → Propose deep research based on interview
310
+ # → User approves/modifies
311
+ # → Execute approved searches
312
+ # → Cache results with freshness tracking
313
+ ```
314
+
315
+ <claude-commands-template>
316
+ ## Research Guidelines
317
+
318
+ 1. **Start minimal** - 2-3 searches, not 20
319
+ 2. **Propose before executing** - User controls depth
320
+ 3. **Track everything** - State file logs all searches
321
+ 4. **Cache with freshness** - 7-day validity
322
+ 5. **Cite sources** - Every claim has a URL
323
+ 6. **Distinguish proposed vs approved** - Transparency
324
+
325
+ ## Integration with API Development
326
+
327
+ - Phase 3 of `/api-create` uses this for initial research
328
+ - Phase 5 uses adaptive proposal flow
329
+ - Phase 10 (Verify) triggers re-research
330
+ - Freshness check prevents stale data
331
+ </claude-commands-template>