@hustle-together/api-dev-tools 3.10.1 → 3.12.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.
- package/.claude/agents/code-reviewer.md +170 -0
- package/.claude/agents/docs-generator.md +80 -0
- package/.claude/agents/implementation-reviewer.md +119 -0
- package/.claude/agents/parallel-researcher.md +52 -0
- package/.claude/agents/research-validator.md +116 -0
- package/.claude/agents/schema-generator.md +70 -0
- package/.claude/agents/test-writer.md +104 -0
- package/.claude/api-dev-state.json +331 -0
- package/.claude/commands/README.md +196 -0
- package/.claude/commands/add-command.md +212 -0
- package/.claude/commands/api-create.md +510 -0
- package/.claude/commands/api-env.md +51 -0
- package/.claude/commands/api-interview.md +344 -0
- package/.claude/commands/api-research.md +357 -0
- package/.claude/commands/api-status.md +279 -0
- package/.claude/commands/api-verify.md +232 -0
- package/.claude/commands/beepboop.md +96 -0
- package/.claude/commands/busycommit.md +111 -0
- package/.claude/commands/commit.md +82 -0
- package/.claude/commands/cycle.md +137 -0
- package/.claude/commands/gap.md +85 -0
- package/.claude/commands/green.md +137 -0
- package/.claude/commands/issue.md +187 -0
- package/.claude/commands/ntfy-setup.md +91 -0
- package/.claude/commands/ntfy-test.md +74 -0
- package/.claude/commands/plan.md +167 -0
- package/.claude/commands/pr.md +121 -0
- package/.claude/commands/publish.md +40 -0
- package/.claude/commands/red.md +137 -0
- package/.claude/commands/refactor.md +137 -0
- package/.claude/commands/spike.md +137 -0
- package/.claude/commands/summarize.md +93 -0
- package/.claude/commands/tdd.md +139 -0
- package/.claude/commands/worktree-add.md +307 -0
- package/.claude/commands/worktree-cleanup.md +275 -0
- package/.claude/hooks/api-workflow-check.py +227 -0
- package/.claude/hooks/enforce-deep-research.py +185 -0
- package/.claude/hooks/enforce-disambiguation.py +155 -0
- package/.claude/hooks/enforce-documentation.py +192 -0
- package/.claude/hooks/enforce-environment.py +253 -0
- package/.claude/hooks/enforce-external-research.py +328 -0
- package/.claude/hooks/enforce-interview.py +421 -0
- package/.claude/hooks/enforce-refactor.py +189 -0
- package/.claude/hooks/enforce-research.py +159 -0
- package/.claude/hooks/enforce-schema.py +186 -0
- package/.claude/hooks/enforce-scope.py +160 -0
- package/.claude/hooks/enforce-tdd-red.py +250 -0
- package/.claude/hooks/enforce-verify.py +186 -0
- package/.claude/hooks/periodic-reground.py +154 -0
- package/.claude/hooks/session-startup.py +151 -0
- package/.claude/hooks/track-tool-use.py +626 -0
- package/.claude/hooks/verify-after-green.py +282 -0
- package/.claude/hooks/verify-implementation.py +225 -0
- package/.claude/research/index.json +6 -0
- package/.claude/settings.json +144 -0
- package/.claude/settings.local.json +12 -0
- package/.claude-plugin/marketplace.json +103 -0
- package/.skills/README.md +293 -0
- package/.skills/_shared/convert-commands.py +192 -0
- package/.skills/_shared/hooks/api-workflow-check.py +227 -0
- package/.skills/_shared/hooks/enforce-deep-research.py +185 -0
- package/.skills/_shared/hooks/enforce-disambiguation.py +155 -0
- package/.skills/_shared/hooks/enforce-documentation.py +192 -0
- package/.skills/_shared/hooks/enforce-environment.py +253 -0
- package/.skills/_shared/hooks/enforce-external-research.py +328 -0
- package/.skills/_shared/hooks/enforce-interview.py +421 -0
- package/.skills/_shared/hooks/enforce-refactor.py +189 -0
- package/.skills/_shared/hooks/enforce-research.py +159 -0
- package/.skills/_shared/hooks/enforce-schema.py +186 -0
- package/.skills/_shared/hooks/enforce-scope.py +160 -0
- package/.skills/_shared/hooks/enforce-tdd-red.py +250 -0
- package/.skills/_shared/hooks/enforce-verify.py +186 -0
- package/.skills/_shared/hooks/periodic-reground.py +154 -0
- package/.skills/_shared/hooks/session-startup.py +151 -0
- package/.skills/_shared/hooks/track-tool-use.py +626 -0
- package/.skills/_shared/hooks/verify-after-green.py +282 -0
- package/.skills/_shared/hooks/verify-implementation.py +225 -0
- package/.skills/_shared/install.sh +114 -0
- package/.skills/_shared/settings.json +93 -0
- package/.skills/add-command/SKILL.md +227 -0
- package/.skills/api-create/SKILL.md +623 -0
- package/.skills/api-env/SKILL.md +64 -0
- package/.skills/api-interview/SKILL.md +357 -0
- package/.skills/api-research/SKILL.md +370 -0
- package/.skills/api-status/SKILL.md +292 -0
- package/.skills/api-verify/SKILL.md +245 -0
- package/.skills/beepboop/SKILL.md +111 -0
- package/.skills/busycommit/SKILL.md +126 -0
- package/.skills/commit/SKILL.md +97 -0
- package/.skills/cycle/SKILL.md +152 -0
- package/.skills/gap/SKILL.md +100 -0
- package/.skills/green/SKILL.md +152 -0
- package/.skills/issue/SKILL.md +202 -0
- package/.skills/plan/SKILL.md +182 -0
- package/.skills/pr/SKILL.md +136 -0
- package/.skills/publish/SKILL.md +160 -0
- package/.skills/red/SKILL.md +152 -0
- package/.skills/refactor/SKILL.md +152 -0
- package/.skills/spike/SKILL.md +152 -0
- package/.skills/summarize/SKILL.md +108 -0
- package/.skills/tdd/SKILL.md +154 -0
- package/.skills/update-todos/SKILL.md +250 -0
- package/.skills/worktree-add/SKILL.md +322 -0
- package/.skills/worktree-cleanup/SKILL.md +290 -0
- package/CHANGELOG.md +115 -0
- package/README.md +161 -7101
- package/bin/cli.js +448 -805
- package/commands/README.md +66 -31
- package/commands/add-command.md +8 -5
- package/commands/beepboop.md +4 -5
- package/commands/busycommit.md +2 -3
- package/commands/commit.md +2 -3
- package/commands/cycle.md +2 -7
- package/commands/gap.md +2 -3
- package/commands/green.md +2 -7
- package/commands/hustle-api-continue.md +8 -5
- package/commands/hustle-api-create.md +70 -29
- package/commands/hustle-api-env.md +1 -0
- package/commands/hustle-api-interview.md +32 -19
- package/commands/hustle-api-research.md +47 -21
- package/commands/hustle-api-sessions.md +8 -7
- package/commands/hustle-api-status.md +21 -1
- package/commands/hustle-api-verify.md +14 -13
- package/commands/hustle-combine.md +488 -241
- package/commands/hustle-ui-create-page.md +113 -50
- package/commands/hustle-ui-create.md +179 -26
- package/commands/issue.md +3 -8
- package/commands/plan.md +2 -3
- package/commands/pr.md +2 -3
- package/commands/red.md +2 -7
- package/commands/refactor.md +2 -7
- package/commands/spike.md +2 -7
- package/commands/summarize.md +2 -3
- package/commands/tdd.md +2 -7
- package/commands/worktree-add.md +208 -216
- package/commands/worktree-cleanup.md +172 -178
- package/hooks/api-workflow-check.py +5 -3
- package/hooks/enforce-component-type-confirm.py +97 -0
- package/hooks/lib/__init__.py +1 -0
- package/hooks/lib/greptile.py +355 -0
- package/hooks/lib/ntfy.py +209 -0
- package/hooks/notify-input-needed.py +73 -0
- package/hooks/notify-phase-complete.py +90 -0
- package/hooks/run-code-review.py +246 -0
- package/hooks/track-token-usage.py +121 -0
- package/package.json +33 -12
- package/scripts/collect-test-results.ts +102 -77
- package/scripts/extract-parameters.ts +112 -70
- package/scripts/generate-test-manifest.ts +118 -77
- package/templates/.env.example +57 -0
- package/templates/BRAND_GUIDE.md +92 -52
- package/templates/CLAUDE-SECTION.md +40 -37
- package/templates/SPEC.json +186 -38
- package/templates/api-dev-state.json +33 -4
- package/templates/api-showcase/_components/APICard.tsx +22 -18
- package/templates/api-showcase/_components/APIModal.tsx +110 -64
- package/templates/api-showcase/_components/APIShowcase.tsx +53 -35
- package/templates/api-showcase/_components/APITester.tsx +128 -67
- package/templates/api-showcase/page.tsx +4 -4
- package/templates/api-test/page.tsx +51 -30
- package/templates/api-test/test-structure/route.ts +43 -34
- package/templates/component/Component.stories.tsx +41 -39
- package/templates/component/Component.test.tsx +96 -78
- package/templates/component/Component.tsx +63 -52
- package/templates/component/Component.types.ts +10 -6
- package/templates/component/Component.visual.spec.ts +170 -0
- package/templates/component/index.ts +2 -2
- package/templates/dev-tools/_components/DevToolsLanding.tsx +8 -8
- package/templates/dev-tools/page.tsx +4 -3
- package/templates/mcp-servers.json +30 -2
- package/templates/page/page.e2e.test.ts +56 -48
- package/templates/page/page.tsx +3 -3
- package/templates/shared/HeroHeader.tsx +16 -15
- package/templates/shared/index.ts +1 -1
- package/templates/ui-showcase/_components/PreviewCard.tsx +20 -20
- package/templates/ui-showcase/_components/PreviewModal.tsx +149 -108
- package/templates/ui-showcase/_components/UIShowcase.tsx +43 -35
- package/templates/ui-showcase/page.tsx +4 -4
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-research
|
|
3
|
+
description: Adaptive propose-approve research workflow for API documentation discovery. Use when researching external APIs, SDKs, or libraries. Caches research with 7-day freshness tracking. Keywords: research, documentation, api, discovery, cache, adaptive
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires Claude Code with MCP servers (Context7, GitHub), Python 3.9+ for hooks, pnpm 10.11.0+
|
|
6
|
+
metadata:
|
|
7
|
+
version: "3.0.0"
|
|
8
|
+
category: "research"
|
|
9
|
+
tags: ['api', 'research', 'documentation', 'discovery', 'cache']
|
|
10
|
+
author: "Hustle Together"
|
|
11
|
+
allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read Write Edit Bash TodoWrite
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# API Research - Adaptive Documentation Discovery v3.0
|
|
15
|
+
|
|
16
|
+
**Usage:** `/api-research [library-or-service-name]`
|
|
17
|
+
|
|
18
|
+
**Purpose:** Research external APIs and SDKs using an adaptive, propose-approve flow (not shotgun searches).
|
|
19
|
+
|
|
20
|
+
## Key Principle: Adaptive Research
|
|
21
|
+
|
|
22
|
+
**NOT shotgun research** - We don't blindly run 20 searches.
|
|
23
|
+
|
|
24
|
+
**Adaptive flow:**
|
|
25
|
+
|
|
26
|
+
1. Run 2-3 initial searches
|
|
27
|
+
2. Summarize findings
|
|
28
|
+
3. PROPOSE additional searches based on context
|
|
29
|
+
4. User approves/modifies proposals
|
|
30
|
+
5. Execute approved searches
|
|
31
|
+
6. Repeat until complete
|
|
32
|
+
|
|
33
|
+
## Research Phases
|
|
34
|
+
|
|
35
|
+
### Initial Discovery (Automatic)
|
|
36
|
+
|
|
37
|
+
Run 2-3 targeted searches:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
- Context7: "[library-name]" (if SDK/library)
|
|
41
|
+
- WebSearch: "[name] official documentation"
|
|
42
|
+
- WebSearch: "site:[domain] api reference" (if known domain)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Present initial summary:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
┌────────────────────────────────────────────────────────────┐
|
|
49
|
+
│ INITIAL RESEARCH: [library-name] │
|
|
50
|
+
│ │
|
|
51
|
+
│ │ Source │ Status │
|
|
52
|
+
│ ├─────────────────────┼────────────────────────────────────│
|
|
53
|
+
│ │ Official docs │ ✓ Found: [URL] │
|
|
54
|
+
│ │ API Reference │ ✓ REST v2 documented │
|
|
55
|
+
│ │ Auth method │ ✓ Bearer token / API key │
|
|
56
|
+
│ │ TypeScript types │ ? Not confirmed │
|
|
57
|
+
│ │ npm package │ ? Not searched │
|
|
58
|
+
│ │
|
|
59
|
+
│ Discovered parameters: 5 required, 12 optional │
|
|
60
|
+
│ │
|
|
61
|
+
│ Proceed to interview? [Y] │
|
|
62
|
+
│ Search more first? [n] → What? ____ │
|
|
63
|
+
└────────────────────────────────────────────────────────────┘
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Deep Research (Proposed)
|
|
67
|
+
|
|
68
|
+
After interview, PROPOSE targeted searches based on user's selections:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
┌────────────────────────────────────────────────────────────┐
|
|
72
|
+
│ PROPOSED DEEP RESEARCH │
|
|
73
|
+
│ │
|
|
74
|
+
│ Based on interview answers, I recommend researching: │
|
|
75
|
+
│ │
|
|
76
|
+
│ [x] Error response format │
|
|
77
|
+
│ Reason: You selected "comprehensive error handling" │
|
|
78
|
+
│ │
|
|
79
|
+
│ [x] Rate limiting behavior │
|
|
80
|
+
│ Reason: You selected "short cache" / high frequency │
|
|
81
|
+
│ │
|
|
82
|
+
│ [ ] Webhook support │
|
|
83
|
+
│ Reason: You didn't select async/webhook features │
|
|
84
|
+
│ │
|
|
85
|
+
│ [x] SVG optimization options │
|
|
86
|
+
│ Reason: You selected SVG output format │
|
|
87
|
+
│ │
|
|
88
|
+
│ [x] Batch processing │
|
|
89
|
+
│ Reason: You mentioned "multiple domains at once" │
|
|
90
|
+
│ │
|
|
91
|
+
│ Approve these searches? [Y] │
|
|
92
|
+
│ Add more: ____ │
|
|
93
|
+
│ Skip and proceed: [n] │
|
|
94
|
+
└────────────────────────────────────────────────────────────┘
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Execute Approved Searches
|
|
98
|
+
|
|
99
|
+
Only run searches that were explicitly approved:
|
|
100
|
+
|
|
101
|
+
- Track which searches were proposed vs approved vs skipped
|
|
102
|
+
- Log everything to state file for transparency
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"research_deep": {
|
|
107
|
+
"proposed_searches": [
|
|
108
|
+
"error response format",
|
|
109
|
+
"rate limiting behavior",
|
|
110
|
+
"webhook support",
|
|
111
|
+
"SVG optimization options",
|
|
112
|
+
"batch processing"
|
|
113
|
+
],
|
|
114
|
+
"approved_searches": [
|
|
115
|
+
"error response format",
|
|
116
|
+
"rate limiting behavior",
|
|
117
|
+
"SVG optimization options",
|
|
118
|
+
"batch processing"
|
|
119
|
+
],
|
|
120
|
+
"skipped_searches": ["webhook support"]
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Research Caching & Freshness
|
|
126
|
+
|
|
127
|
+
Research is cached in `.claude/research/[api-name]/`:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
.claude/research/
|
|
131
|
+
├── brandfetch/
|
|
132
|
+
│ ├── 2025-12-08_initial.md # Timestamped snapshot
|
|
133
|
+
│ ├── 2025-12-08_deep.md # Deep research after interview
|
|
134
|
+
│ └── CURRENT.md # Latest (copy or symlink)
|
|
135
|
+
├── vercel-ai-sdk/
|
|
136
|
+
│ ├── providers/ # Complex APIs get subfolders
|
|
137
|
+
│ │ ├── openai.md
|
|
138
|
+
│ │ ├── anthropic.md
|
|
139
|
+
│ │ └── groq.md
|
|
140
|
+
│ └── CURRENT.md
|
|
141
|
+
└── index.json # Catalog with freshness
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Freshness Tracking
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"brandfetch": {
|
|
149
|
+
"last_updated": "2025-12-08",
|
|
150
|
+
"current_file": "brandfetch/CURRENT.md",
|
|
151
|
+
"days_old": 0,
|
|
152
|
+
"parameters_discovered": 7,
|
|
153
|
+
"source_urls": ["https://docs.brandfetch.com"]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Freshness Rule:** If research is >7 days old when referenced:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
⚠️ Research for "brandfetch" is 15 days old.
|
|
162
|
+
Re-research before using? [Y/n]
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Output Format
|
|
166
|
+
|
|
167
|
+
Creates: `.claude/research/[library-name]/CURRENT.md`
|
|
168
|
+
|
|
169
|
+
````markdown
|
|
170
|
+
# Research: [Library/Service Name]
|
|
171
|
+
|
|
172
|
+
**Date:** [current-date]
|
|
173
|
+
**Version:** [version-number]
|
|
174
|
+
**Status:** Research Complete
|
|
175
|
+
**Freshness:** 0 days (valid for 7 days)
|
|
176
|
+
|
|
177
|
+
## 1. Official Documentation Links
|
|
178
|
+
|
|
179
|
+
- Main docs: [URL]
|
|
180
|
+
- API reference: [URL]
|
|
181
|
+
- GitHub repo: [URL]
|
|
182
|
+
- npm package: [URL]
|
|
183
|
+
- TypeScript types: [URL]
|
|
184
|
+
|
|
185
|
+
## 2. Installation & Setup
|
|
186
|
+
|
|
187
|
+
### Installation
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
[installation command]
|
|
191
|
+
```
|
|
192
|
+
````
|
|
193
|
+
|
|
194
|
+
### Environment Variables
|
|
195
|
+
|
|
196
|
+
```env
|
|
197
|
+
[required env vars]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### API Key Setup
|
|
201
|
+
|
|
202
|
+
[How to obtain and configure]
|
|
203
|
+
|
|
204
|
+
## 3. Complete Request Schema
|
|
205
|
+
|
|
206
|
+
### Required Parameters
|
|
207
|
+
|
|
208
|
+
| Parameter | Type | Description | Validation |
|
|
209
|
+
| --------- | ------ | ----------- | ---------- |
|
|
210
|
+
| [name] | [type] | [desc] | [rules] |
|
|
211
|
+
|
|
212
|
+
### Optional Parameters
|
|
213
|
+
|
|
214
|
+
| Parameter | Type | Default | Description | Notes |
|
|
215
|
+
| --------- | ------ | --------- | ----------- | ------- |
|
|
216
|
+
| [name] | [type] | [default] | [desc] | [notes] |
|
|
217
|
+
|
|
218
|
+
### Continuous Parameters (for test strategy)
|
|
219
|
+
|
|
220
|
+
| Parameter | Type | Range | Suggested Test Values |
|
|
221
|
+
| --------- | ------ | ---------- | --------------------- |
|
|
222
|
+
| quality | number | 1-100 | 1, 50, 100 (boundary) |
|
|
223
|
+
| timeout | number | 1000-30000 | 1000, 15000, 30000 |
|
|
224
|
+
|
|
225
|
+
## 4. Complete Response Schema
|
|
226
|
+
|
|
227
|
+
### Success Response
|
|
228
|
+
|
|
229
|
+
[TypeScript interface]
|
|
230
|
+
|
|
231
|
+
### Error Response
|
|
232
|
+
|
|
233
|
+
[TypeScript interface with error codes]
|
|
234
|
+
|
|
235
|
+
## 5. Features & Capabilities
|
|
236
|
+
|
|
237
|
+
### Core Features (Discovered)
|
|
238
|
+
|
|
239
|
+
- [x] [Feature 1]: [description]
|
|
240
|
+
- [x] [Feature 2]: [description]
|
|
241
|
+
|
|
242
|
+
### Features NOT Implemented (Intentional)
|
|
243
|
+
|
|
244
|
+
- [ ] [Feature]: [reason for exclusion]
|
|
245
|
+
|
|
246
|
+
## 6. Limitations & Constraints
|
|
247
|
+
|
|
248
|
+
- Rate limits: [details]
|
|
249
|
+
- Size limits: [details]
|
|
250
|
+
- Timeout: [details]
|
|
251
|
+
|
|
252
|
+
## 7. Testing Considerations
|
|
253
|
+
|
|
254
|
+
- [ ] Test boundary values for continuous params
|
|
255
|
+
- [ ] Test all enum values
|
|
256
|
+
- [ ] Test error responses
|
|
257
|
+
- [ ] Test rate limiting behavior
|
|
258
|
+
|
|
259
|
+
## 8. Research Trail
|
|
260
|
+
|
|
261
|
+
### Searches Performed
|
|
262
|
+
|
|
263
|
+
| Search | Tool | Found |
|
|
264
|
+
| ---------------------- | --------- | ----- |
|
|
265
|
+
| "[name] documentation" | WebSearch | ✓ |
|
|
266
|
+
| "[name]" | Context7 | ✓ |
|
|
267
|
+
|
|
268
|
+
### Proposed but Skipped
|
|
269
|
+
|
|
270
|
+
- "webhook support" - User declined, not needed
|
|
271
|
+
|
|
272
|
+
````
|
|
273
|
+
|
|
274
|
+
## Research-First Schema Design (MANDATORY)
|
|
275
|
+
|
|
276
|
+
### The Anti-Pattern: Schema-First Development
|
|
277
|
+
|
|
278
|
+
**NEVER DO THIS:**
|
|
279
|
+
- ❌ Define interfaces based on assumptions before researching
|
|
280
|
+
- ❌ Rely on training data for API capabilities
|
|
281
|
+
- ❌ Say "I think it supports..." without verification
|
|
282
|
+
- ❌ Build schemas from memory instead of documentation
|
|
283
|
+
|
|
284
|
+
### The Correct Pattern: Research-First
|
|
285
|
+
|
|
286
|
+
**ALWAYS DO THIS:**
|
|
287
|
+
|
|
288
|
+
1. **Research the Source of Truth**
|
|
289
|
+
- Use Context7 for SDK docs
|
|
290
|
+
- Use WebSearch for official docs
|
|
291
|
+
- Check GitHub for current implementation
|
|
292
|
+
|
|
293
|
+
2. **Build Schema FROM Research**
|
|
294
|
+
- Interface fields emerge from discovered capabilities
|
|
295
|
+
- Every field has a source (docs, SDK types, API response)
|
|
296
|
+
- Don't guess - verify each capability
|
|
297
|
+
|
|
298
|
+
3. **Verify with Phase 10**
|
|
299
|
+
- After implementation, re-research
|
|
300
|
+
- Compare docs to implementation
|
|
301
|
+
- Fix gaps or document intentional omissions
|
|
302
|
+
|
|
303
|
+
## Research Query Tracking
|
|
304
|
+
|
|
305
|
+
All research is tracked in `.claude/api-dev-state.json`:
|
|
306
|
+
|
|
307
|
+
```json
|
|
308
|
+
{
|
|
309
|
+
"research_queries": [
|
|
310
|
+
{
|
|
311
|
+
"timestamp": "2025-12-08T...",
|
|
312
|
+
"tool": "WebSearch",
|
|
313
|
+
"query": "Brandfetch API documentation",
|
|
314
|
+
"terms": ["brandfetch", "api", "documentation"]
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"timestamp": "2025-12-08T...",
|
|
318
|
+
"tool": "mcp__context7__get-library-docs",
|
|
319
|
+
"library": "brandfetch",
|
|
320
|
+
"terms": ["brandfetch"]
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
"phases": {
|
|
324
|
+
"research_initial": {
|
|
325
|
+
"status": "complete",
|
|
326
|
+
"sources": [...],
|
|
327
|
+
"summary_approved": true
|
|
328
|
+
},
|
|
329
|
+
"research_deep": {
|
|
330
|
+
"status": "complete",
|
|
331
|
+
"proposed_searches": [...],
|
|
332
|
+
"approved_searches": [...],
|
|
333
|
+
"skipped_searches": [...]
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
````
|
|
338
|
+
|
|
339
|
+
## Usage Examples
|
|
340
|
+
|
|
341
|
+
### Research with full flow
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
/api-research brandfetch
|
|
345
|
+
# → Initial search (2-3 queries)
|
|
346
|
+
# → Present summary, ask to proceed
|
|
347
|
+
# → Interview happens (separate phase)
|
|
348
|
+
# → Propose deep research based on interview
|
|
349
|
+
# → User approves/modifies
|
|
350
|
+
# → Execute approved searches
|
|
351
|
+
# → Cache results with freshness tracking
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
<claude-commands-template>
|
|
355
|
+
## Research Guidelines
|
|
356
|
+
|
|
357
|
+
1. **Start minimal** - 2-3 searches, not 20
|
|
358
|
+
2. **Propose before executing** - User controls depth
|
|
359
|
+
3. **Track everything** - State file logs all searches
|
|
360
|
+
4. **Cache with freshness** - 7-day validity
|
|
361
|
+
5. **Cite sources** - Every claim has a URL
|
|
362
|
+
6. **Distinguish proposed vs approved** - Transparency
|
|
363
|
+
|
|
364
|
+
## Integration with API Development
|
|
365
|
+
|
|
366
|
+
- Phase 3 of `/api-create` uses this for initial research
|
|
367
|
+
- Phase 5 uses adaptive proposal flow
|
|
368
|
+
- Phase 10 (Verify) triggers re-research
|
|
369
|
+
- Freshness check prevents stale data
|
|
370
|
+
</claude-commands-template>
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-status
|
|
3
|
+
description: Track implementation progress through 13 phases. Shows completed, in-progress, and pending phases. Displays interview decisions and research cache info. Keywords: status, progress, tracking, phases, workflow
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires Claude Code with MCP servers (Context7, GitHub), Python 3.9+ for hooks, pnpm 10.11.0+
|
|
6
|
+
metadata:
|
|
7
|
+
version: "3.0.0"
|
|
8
|
+
category: "workflow"
|
|
9
|
+
tags: ['status', 'progress', 'tracking', 'workflow']
|
|
10
|
+
author: "Hustle Together"
|
|
11
|
+
allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read Write Edit Bash TodoWrite
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# API Status - Track Implementation Progress
|
|
15
|
+
|
|
16
|
+
**Usage:** `/api-status [endpoint-name]` or `/api-status --all`
|
|
17
|
+
|
|
18
|
+
**Purpose:** View and update API implementation status, track progress, and manage V2 migration.
|
|
19
|
+
|
|
20
|
+
## State File Integration
|
|
21
|
+
|
|
22
|
+
This command reads from `.claude/api-dev-state.json` which is automatically updated by the enforcement hooks.
|
|
23
|
+
|
|
24
|
+
### Reading Current State
|
|
25
|
+
|
|
26
|
+
**FIRST: Read the state file to understand current progress:**
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Tool: Read
|
|
30
|
+
Path: .claude/api-dev-state.json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Parse the JSON and display a formatted status report showing:
|
|
34
|
+
|
|
35
|
+
- Current endpoint being worked on
|
|
36
|
+
- Phase completion status (scope, research, interview, TDD, docs)
|
|
37
|
+
- Sources consulted during research
|
|
38
|
+
- Timestamps for each phase
|
|
39
|
+
- Verification status
|
|
40
|
+
|
|
41
|
+
### Example State Display
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
📊 API Development Progress
|
|
45
|
+
|
|
46
|
+
Endpoint: stream-text
|
|
47
|
+
Library: vercel-ai-sdk
|
|
48
|
+
Started: 2025-12-06T20:00:00Z
|
|
49
|
+
|
|
50
|
+
PHASES:
|
|
51
|
+
✅ Scope defined (20:00:30)
|
|
52
|
+
✅ Initial research - 4 sources consulted (20:02:00)
|
|
53
|
+
🔄 Interview - in progress
|
|
54
|
+
⬜ Deep research
|
|
55
|
+
⬜ Schema creation
|
|
56
|
+
⬜ Environment check
|
|
57
|
+
⬜ TDD Red
|
|
58
|
+
⬜ TDD Green
|
|
59
|
+
⬜ TDD Refactor
|
|
60
|
+
⬜ Documentation
|
|
61
|
+
|
|
62
|
+
RESEARCH SOURCES:
|
|
63
|
+
• context7: @ai-sdk/core (20:01:00)
|
|
64
|
+
• websearch: "Vercel AI SDK streamText 2025" (20:01:30)
|
|
65
|
+
• webfetch: https://sdk.vercel.ai/docs (20:01:45)
|
|
66
|
+
|
|
67
|
+
VERIFICATION:
|
|
68
|
+
❌ All sources fetched: false
|
|
69
|
+
❌ Schema matches docs: false
|
|
70
|
+
❌ Tests cover params: false
|
|
71
|
+
❌ All tests passing: false
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## What This Shows
|
|
75
|
+
|
|
76
|
+
### For Specific Endpoint
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
📊 Status: /api/v2/generate-css
|
|
80
|
+
|
|
81
|
+
Phase: ✅ Complete
|
|
82
|
+
Tests: 33/33 passing (100% coverage)
|
|
83
|
+
Documentation: ✅ Complete
|
|
84
|
+
|
|
85
|
+
Timeline:
|
|
86
|
+
✅ Interview completed (2025-12-06)
|
|
87
|
+
✅ Research completed (2025-12-06)
|
|
88
|
+
✅ Environment verified (2025-12-06)
|
|
89
|
+
✅ Tests written (Red phase)
|
|
90
|
+
✅ Implementation complete (Green phase)
|
|
91
|
+
✅ Refactored (Refactor phase)
|
|
92
|
+
✅ Documentation updated
|
|
93
|
+
✅ Committed to git
|
|
94
|
+
|
|
95
|
+
Files:
|
|
96
|
+
- Route: src/app/api/v2/generate-css/route.ts
|
|
97
|
+
- Tests: src/app/api/v2/generate-css/__tests__/generate-css.api.test.ts
|
|
98
|
+
- Docs: src/v2/docs/endpoints/generate-css.md
|
|
99
|
+
- Research: src/v2/docs/research/gemini-flash.md
|
|
100
|
+
|
|
101
|
+
Next Steps: None - endpoint complete
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### For All Endpoints
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
📊 V2 API Implementation Status
|
|
108
|
+
|
|
109
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
110
|
+
|
|
111
|
+
✅ COMPLETE (2)
|
|
112
|
+
• /api/v2/health (15 tests)
|
|
113
|
+
• /api/v2/monitor (23 tests)
|
|
114
|
+
|
|
115
|
+
🚧 IN PROGRESS (1)
|
|
116
|
+
• /api/v2/generate-css (interview complete, implementing)
|
|
117
|
+
|
|
118
|
+
📋 PLANNED (3)
|
|
119
|
+
• /api/v2/generate-html
|
|
120
|
+
• /api/v2/chat
|
|
121
|
+
• /api/v2/scrape
|
|
122
|
+
|
|
123
|
+
❌ NOT STARTED (0)
|
|
124
|
+
|
|
125
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
126
|
+
|
|
127
|
+
Summary:
|
|
128
|
+
Total endpoints: 6
|
|
129
|
+
Complete: 2 (33%)
|
|
130
|
+
In progress: 1 (17%)
|
|
131
|
+
Planned: 3 (50%)
|
|
132
|
+
Total tests: 38
|
|
133
|
+
Coverage: 100%
|
|
134
|
+
|
|
135
|
+
Last updated: 2025-12-06
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Commands
|
|
139
|
+
|
|
140
|
+
### View Status
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
/api-status generate-css # Specific endpoint
|
|
144
|
+
/api-status --all # All endpoints
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Update Status
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
/api-status generate-css --phase=testing
|
|
151
|
+
/api-status generate-css --complete
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Status Tracking File
|
|
155
|
+
|
|
156
|
+
Updates: `/src/v2/docs/v2-api-implementation-status.md`
|
|
157
|
+
|
|
158
|
+
**Format:**
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
# V2 API Implementation Status
|
|
162
|
+
|
|
163
|
+
**Last Updated:** 2025-12-06
|
|
164
|
+
**Total Endpoints:** 6
|
|
165
|
+
**Completed:** 2 (33%)
|
|
166
|
+
|
|
167
|
+
## Endpoints
|
|
168
|
+
|
|
169
|
+
### ✅ /api/v2/health
|
|
170
|
+
|
|
171
|
+
- **Status:** Complete
|
|
172
|
+
- **Tests:** 15/15 passing
|
|
173
|
+
- **Coverage:** 100%
|
|
174
|
+
- **Interview:** [Link to docs]
|
|
175
|
+
- **Implemented:** 2025-12-06
|
|
176
|
+
- **Purpose:** System health check with dependency validation
|
|
177
|
+
|
|
178
|
+
### 🚧 /api/v2/generate-css
|
|
179
|
+
|
|
180
|
+
- **Status:** In Progress (Testing)
|
|
181
|
+
- **Tests:** 20/33 passing
|
|
182
|
+
- **Coverage:** 85%
|
|
183
|
+
- **Interview:** [Link to docs]
|
|
184
|
+
- **Started:** 2025-12-06
|
|
185
|
+
- **Blocked by:** None
|
|
186
|
+
- **Next:** Complete remaining tests
|
|
187
|
+
|
|
188
|
+
### 📋 /api/v2/generate-html
|
|
189
|
+
|
|
190
|
+
- **Status:** Planned
|
|
191
|
+
- **Priority:** High
|
|
192
|
+
- **Dependencies:** None
|
|
193
|
+
- **Interview:** Not started
|
|
194
|
+
- **Estimated effort:** Medium
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Integration with Workflow
|
|
198
|
+
|
|
199
|
+
### After Interview
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
/api-interview generate-css
|
|
203
|
+
/api-status generate-css --phase=interview-complete
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### After Research
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
/api-research gemini-flash
|
|
210
|
+
/api-status generate-css --phase=research-complete
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### After TDD Cycle
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
/cycle generate CSS with Gemini
|
|
217
|
+
/api-status generate-css --complete
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Before Commit
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
pnpm test:run
|
|
224
|
+
/api-status --all # Verify all green
|
|
225
|
+
/commit
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Automatic Updates
|
|
229
|
+
|
|
230
|
+
The `/api-create` command automatically updates status:
|
|
231
|
+
|
|
232
|
+
- Interview phase → "Interview Complete"
|
|
233
|
+
- Red phase → "Tests Written"
|
|
234
|
+
- Green phase → "Implementation Complete"
|
|
235
|
+
- Refactor phase → "Refactored"
|
|
236
|
+
- Documentation → "Documentation Updated"
|
|
237
|
+
- Commit → "Complete"
|
|
238
|
+
|
|
239
|
+
## Status Phases
|
|
240
|
+
|
|
241
|
+
1. **Not Started** - No work begun
|
|
242
|
+
2. **Interview Complete** - Understanding documented
|
|
243
|
+
3. **Research Complete** - External docs reviewed
|
|
244
|
+
4. **Environment Ready** - API keys verified
|
|
245
|
+
5. **Tests Written** - Red phase complete
|
|
246
|
+
6. **Implementation Complete** - Green phase complete
|
|
247
|
+
7. **Refactored** - Code cleaned up
|
|
248
|
+
8. **Documentation Updated** - Manifests updated
|
|
249
|
+
9. **Complete** - All tests passing, committed
|
|
250
|
+
|
|
251
|
+
## Reports
|
|
252
|
+
|
|
253
|
+
### Coverage Report
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
/api-status --coverage
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Shows test coverage for all V2 endpoints.
|
|
260
|
+
|
|
261
|
+
### Migration Report
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
/api-status --migration
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Shows progress from legacy to V2.
|
|
268
|
+
|
|
269
|
+
### Blockers Report
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
/api-status --blocked
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Shows endpoints blocked by missing keys, dependencies, etc.
|
|
276
|
+
|
|
277
|
+
<claude-commands-template>
|
|
278
|
+
## Status Management
|
|
279
|
+
|
|
280
|
+
- Update status after each phase completion
|
|
281
|
+
- Keep v2-api-implementation-status.md current
|
|
282
|
+
- Use status to plan next work
|
|
283
|
+
- Reference in standup/progress reports
|
|
284
|
+
- Track blockers and dependencies
|
|
285
|
+
|
|
286
|
+
## Integration Points
|
|
287
|
+
|
|
288
|
+
- Used by /api-create to track progress
|
|
289
|
+
- Used by /commit to verify readiness
|
|
290
|
+
- Used by team to see what's done
|
|
291
|
+
- Used for planning future work
|
|
292
|
+
</claude-commands-template>
|