@hustle-together/api-dev-tools 3.11.1 â 3.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +305 -56
- package/.claude/commands/README.md +21 -10
- package/.claude/commands/add-command.md +8 -5
- package/.claude/commands/api-create.md +36 -25
- package/.claude/commands/api-env.md +1 -0
- package/.claude/commands/api-interview.md +32 -19
- package/.claude/commands/api-research.md +47 -21
- package/.claude/commands/api-status.md +21 -1
- package/.claude/commands/api-verify.md +14 -13
- package/.claude/commands/beepboop.md +4 -5
- package/.claude/commands/busycommit.md +2 -3
- package/.claude/commands/commit.md +2 -3
- package/.claude/commands/cycle.md +2 -7
- package/.claude/commands/gap.md +2 -3
- package/.claude/commands/green.md +2 -7
- package/.claude/commands/issue.md +3 -8
- package/.claude/commands/ntfy-setup.md +91 -0
- package/.claude/commands/ntfy-test.md +74 -0
- package/.claude/commands/plan.md +2 -3
- package/.claude/commands/pr.md +2 -3
- package/.claude/commands/publish.md +40 -0
- package/.claude/commands/red.md +2 -7
- package/.claude/commands/refactor.md +2 -7
- package/.claude/commands/spike.md +2 -7
- package/.claude/commands/summarize.md +2 -3
- package/.claude/commands/tdd.md +2 -7
- package/.claude/commands/worktree-add.md +208 -216
- package/.claude/commands/worktree-cleanup.md +172 -178
- package/.claude/settings.json +63 -12
- package/.claude/settings.local.json +2 -1
- package/.claude-plugin/marketplace.json +2 -11
- package/.skills/README.md +55 -53
- package/.skills/_shared/settings.json +1 -1
- package/.skills/add-command/SKILL.md +10 -5
- package/.skills/api-create/SKILL.md +146 -35
- package/.skills/api-env/SKILL.md +1 -0
- package/.skills/api-interview/SKILL.md +32 -19
- package/.skills/api-research/SKILL.md +47 -21
- package/.skills/api-status/SKILL.md +21 -1
- package/.skills/api-verify/SKILL.md +14 -13
- package/.skills/beepboop/SKILL.md +6 -5
- package/.skills/busycommit/SKILL.md +4 -3
- package/.skills/commit/SKILL.md +4 -3
- package/.skills/cycle/SKILL.md +4 -7
- package/.skills/gap/SKILL.md +4 -3
- package/.skills/green/SKILL.md +4 -7
- package/.skills/issue/SKILL.md +5 -8
- package/.skills/plan/SKILL.md +4 -3
- package/.skills/pr/SKILL.md +4 -3
- package/.skills/publish/SKILL.md +160 -0
- package/.skills/red/SKILL.md +4 -7
- package/.skills/refactor/SKILL.md +4 -7
- package/.skills/spike/SKILL.md +4 -7
- package/.skills/summarize/SKILL.md +4 -3
- package/.skills/tdd/SKILL.md +4 -7
- package/.skills/update-todos/SKILL.md +22 -0
- package/.skills/worktree-add/SKILL.md +210 -216
- package/.skills/worktree-cleanup/SKILL.md +183 -187
- package/CHANGELOG.md +97 -79
- package/README.md +161 -7142
- 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 +13 -3
- 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
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
**YOU MUST USE THE `AskUserQuestion` TOOL AT EVERY CHECKPOINT.**
|
|
10
10
|
|
|
11
11
|
This workflow requires REAL user input at each phase. You are **FORBIDDEN** from:
|
|
12
|
+
|
|
12
13
|
- Self-answering questions
|
|
13
14
|
- Assuming user responses
|
|
14
15
|
- Proceeding without explicit user confirmation
|
|
@@ -26,9 +27,9 @@ At every `[Y/n]` or multiple-choice prompt in this workflow, you MUST call the `
|
|
|
26
27
|
"header": "Phase",
|
|
27
28
|
"multiSelect": false,
|
|
28
29
|
"options": [
|
|
29
|
-
{"label": "Option A", "description": "What this option means"},
|
|
30
|
-
{"label": "Option B", "description": "What this option means"},
|
|
31
|
-
{"label": "Other", "description": "I'll type my own answer"}
|
|
30
|
+
{ "label": "Option A", "description": "What this option means" },
|
|
31
|
+
{ "label": "Option B", "description": "What this option means" },
|
|
32
|
+
{ "label": "Other", "description": "I'll type my own answer" }
|
|
32
33
|
]
|
|
33
34
|
}
|
|
34
35
|
]
|
|
@@ -36,6 +37,7 @@ At every `[Y/n]` or multiple-choice prompt in this workflow, you MUST call the `
|
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
**CRITICAL REQUIREMENTS:**
|
|
40
|
+
|
|
39
41
|
- `header`: Max 12 characters (e.g., "Scope", "Research", "Format")
|
|
40
42
|
- `options`: 2-4 options, each with `label` (1-5 words) and `description`
|
|
41
43
|
- `multiSelect`: Required boolean (true for checkboxes, false for radio)
|
|
@@ -47,6 +49,7 @@ At every `[Y/n]` or multiple-choice prompt in this workflow, you MUST call the `
|
|
|
47
49
|
### Violation Detection
|
|
48
50
|
|
|
49
51
|
The enforcement hooks will BLOCK your progress if:
|
|
52
|
+
|
|
50
53
|
- `user_question_asked` is false for any phase
|
|
51
54
|
- `user_confirmed`/`user_approved`/`user_completed` is false
|
|
52
55
|
- `phase_exit_confirmed` is false (user must explicitly approve proceeding to next phase)
|
|
@@ -59,27 +62,35 @@ If you see "BLOCKED" messages, it means you skipped user interaction.
|
|
|
59
62
|
**Every phase requires an EXIT CONFIRMATION question** before proceeding to the next phase. This prevents Claude from self-answering and moving on without explicit user approval.
|
|
60
63
|
|
|
61
64
|
The exit confirmation question MUST:
|
|
65
|
+
|
|
62
66
|
1. Summarize what was accomplished in the current phase
|
|
63
67
|
2. Ask if user is ready to proceed to the next phase
|
|
64
68
|
3. Include options like "Yes, proceed", "No, I have changes", "Add more"
|
|
65
69
|
|
|
66
70
|
Example exit confirmation:
|
|
71
|
+
|
|
67
72
|
```json
|
|
68
73
|
{
|
|
69
|
-
"questions": [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
"questions": [
|
|
75
|
+
{
|
|
76
|
+
"question": "Phase complete. Research found 5 sources. Ready to proceed to Interview phase?",
|
|
77
|
+
"header": "Proceed",
|
|
78
|
+
"multiSelect": false,
|
|
79
|
+
"options": [
|
|
80
|
+
{ "label": "Yes, proceed", "description": "Move to next phase" },
|
|
81
|
+
{
|
|
82
|
+
"label": "No, more research",
|
|
83
|
+
"description": "I need additional research on [topic]"
|
|
84
|
+
},
|
|
85
|
+
{ "label": "Review sources", "description": "Show me what was found" }
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
]
|
|
79
89
|
}
|
|
80
90
|
```
|
|
81
91
|
|
|
82
92
|
The `phase_exit_confirmed` flag is automatically set when:
|
|
93
|
+
|
|
83
94
|
1. An `AskUserQuestion` is called with a question containing words like "proceed", "continue", "ready", "confirm", "approve"
|
|
84
95
|
2. The user responds with an affirmative answer (yes, proceed, confirm, approve, etc.)
|
|
85
96
|
|
|
@@ -464,16 +475,16 @@ This command creates:
|
|
|
464
475
|
|
|
465
476
|
## Hooks That Enforce This Workflow
|
|
466
477
|
|
|
467
|
-
| Phase | Hook
|
|
468
|
-
|
|
469
|
-
| 0
|
|
470
|
-
| 2-4
|
|
471
|
-
| 7-8
|
|
472
|
-
| 7-8
|
|
473
|
-
| 8
|
|
474
|
-
| 9
|
|
475
|
-
| All
|
|
476
|
-
| 11
|
|
478
|
+
| Phase | Hook | Purpose |
|
|
479
|
+
| ----- | ------------------------------ | ------------------------------------------ |
|
|
480
|
+
| 0 | `enforce-external-research.py` | Detects API terms, requires disambiguation |
|
|
481
|
+
| 2-4 | `track-tool-use.py` | Logs all research, tracks turns |
|
|
482
|
+
| 7-8 | `enforce-research.py` | Blocks Write if no research done |
|
|
483
|
+
| 7-8 | `enforce-interview.py` | Injects interview decisions |
|
|
484
|
+
| 8 | `verify-implementation.py` | Blocks route if no test file |
|
|
485
|
+
| 9 | `verify-after-green.py` | Triggers verification after tests pass |
|
|
486
|
+
| All | `periodic-reground.py` | Re-grounds every 7 turns |
|
|
487
|
+
| 11 | `api-workflow-check.py` | Blocks completion if docs incomplete |
|
|
477
488
|
|
|
478
489
|
<claude-commands-template>
|
|
479
490
|
## Project-Specific Rules
|
|
@@ -484,7 +495,7 @@ This command creates:
|
|
|
484
495
|
4. **AI SDK**: Use Vercel AI SDK 5.0.11 patterns from `/src/v2/docs/ai-sdk-catalog.json`
|
|
485
496
|
5. **Package Manager**: Use `pnpm` for all operations
|
|
486
497
|
6. **Documentation**: Follow patterns in `/src/v2/docs/Main Doc â V2 Development Patterns.md`
|
|
487
|
-
7. **API Keys**: Support three methods (env,
|
|
498
|
+
7. **API Keys**: Support three methods (env, NEXT*PUBLIC*, custom headers)
|
|
488
499
|
8. **Test Command**: `pnpm test:run` before commits
|
|
489
500
|
|
|
490
501
|
## Never Skip
|
|
@@ -496,4 +507,4 @@ This command creates:
|
|
|
496
507
|
- Phase 10 (Verify) - Re-research after Green
|
|
497
508
|
- Phase 12 (Documentation) - Keep docs in sync
|
|
498
509
|
- Coverage verification - 100% required
|
|
499
|
-
</claude-commands-template>
|
|
510
|
+
</claude-commands-template>
|
|
@@ -42,6 +42,7 @@ Status: BLOCKED - Cannot proceed without FIRECRAWL_API_KEY
|
|
|
42
42
|
## API Key Support
|
|
43
43
|
|
|
44
44
|
The project supports three methods:
|
|
45
|
+
|
|
45
46
|
1. Server env: `OPENAI_API_KEY=sk-...`
|
|
46
47
|
2. Client env: `NEXT_PUBLIC_OPENAI_API_KEY=sk-...`
|
|
47
48
|
3. Custom headers: `X-OpenAI-Key: sk-...`
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
## Key Principle: Questions FROM Research
|
|
8
8
|
|
|
9
9
|
**OLD WAY (Generic Templates):**
|
|
10
|
+
|
|
10
11
|
```
|
|
11
12
|
"Which AI provider should this endpoint support?"
|
|
12
13
|
- OpenAI
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
**NEW WAY (From Research):**
|
|
19
|
+
|
|
18
20
|
```
|
|
19
21
|
Based on research, Brandfetch API has 7 parameters:
|
|
20
22
|
|
|
@@ -40,6 +42,7 @@ Based on research, Brandfetch API has 7 parameters:
|
|
|
40
42
|
**Interview is BLOCKED until research is done.**
|
|
41
43
|
|
|
42
44
|
The interview READS from the research findings:
|
|
45
|
+
|
|
43
46
|
```
|
|
44
47
|
State file shows:
|
|
45
48
|
research_initial.status = "complete"
|
|
@@ -57,6 +60,7 @@ Discovered parameters:
|
|
|
57
60
|
For each discovered parameter, generate an appropriate question:
|
|
58
61
|
|
|
59
62
|
#### Required Parameters (Confirmation Only)
|
|
63
|
+
|
|
60
64
|
```
|
|
61
65
|
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
62
66
|
â REQUIRED PARAMETERS â
|
|
@@ -71,6 +75,7 @@ For each discovered parameter, generate an appropriate question:
|
|
|
71
75
|
```
|
|
72
76
|
|
|
73
77
|
#### Enum Parameters (Multi-Select)
|
|
78
|
+
|
|
74
79
|
```
|
|
75
80
|
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
76
81
|
â FORMAT PARAMETER â
|
|
@@ -87,6 +92,7 @@ For each discovered parameter, generate an appropriate question:
|
|
|
87
92
|
```
|
|
88
93
|
|
|
89
94
|
#### Continuous Parameters (Test Strategy)
|
|
95
|
+
|
|
90
96
|
```
|
|
91
97
|
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
92
98
|
â QUALITY PARAMETER â
|
|
@@ -105,6 +111,7 @@ For each discovered parameter, generate an appropriate question:
|
|
|
105
111
|
```
|
|
106
112
|
|
|
107
113
|
#### Boolean Parameters (Enable/Disable)
|
|
114
|
+
|
|
108
115
|
```
|
|
109
116
|
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
110
117
|
â INCLUDE_COLORS PARAMETER â
|
|
@@ -189,14 +196,14 @@ After interview, propose additional research:
|
|
|
189
196
|
|
|
190
197
|
## Question Types Summary
|
|
191
198
|
|
|
192
|
-
| Discovered Type
|
|
193
|
-
|
|
194
|
-
| Required param
|
|
195
|
-
| Enum param
|
|
196
|
-
| Continuous range | Test strategy
|
|
197
|
-
| Boolean param
|
|
198
|
-
| Optional feature | Priority
|
|
199
|
-
| Error case
|
|
199
|
+
| Discovered Type | Question Type | Example |
|
|
200
|
+
| ---------------- | ----------------- | ------------------------------- |
|
|
201
|
+
| Required param | Confirmation | "Confirm these are understood?" |
|
|
202
|
+
| Enum param | Multi-select | "Which formats to support?" |
|
|
203
|
+
| Continuous range | Test strategy | "How to test 1-100 range?" |
|
|
204
|
+
| Boolean param | Enable/disable | "Expose this parameter?" |
|
|
205
|
+
| Optional feature | Priority | "Include this feature?" |
|
|
206
|
+
| Error case | Handling strategy | "How to handle rate limits?" |
|
|
200
207
|
|
|
201
208
|
## State Tracking
|
|
202
209
|
|
|
@@ -239,7 +246,7 @@ All decisions are saved to `.claude/api-dev-state.json`:
|
|
|
239
246
|
|
|
240
247
|
Creates: `.claude/research/[api-name]/interview.md`
|
|
241
248
|
|
|
242
|
-
|
|
249
|
+
````markdown
|
|
243
250
|
# Interview: [API Name]
|
|
244
251
|
|
|
245
252
|
**Date:** [current-date]
|
|
@@ -248,19 +255,19 @@ Creates: `.claude/research/[api-name]/interview.md`
|
|
|
248
255
|
|
|
249
256
|
## Discovered Parameters
|
|
250
257
|
|
|
251
|
-
| Parameter | Type
|
|
252
|
-
|
|
253
|
-
| domain
|
|
254
|
-
| format
|
|
255
|
-
| quality
|
|
258
|
+
| Parameter | Type | Required | Decision |
|
|
259
|
+
| --------- | ------ | -------- | ---------------------------- |
|
|
260
|
+
| domain | string | Yes | Always required |
|
|
261
|
+
| format | enum | No | json, svg, png |
|
|
262
|
+
| quality | 1-100 | No | Boundary testing: 1, 50, 100 |
|
|
256
263
|
|
|
257
264
|
## Feature Scope
|
|
258
265
|
|
|
259
|
-
| Feature
|
|
260
|
-
|
|
261
|
-
| Basic fetch
|
|
262
|
-
| Multiple formats | Yes
|
|
263
|
-
| Webhooks
|
|
266
|
+
| Feature | Included | Reason |
|
|
267
|
+
| ---------------- | -------- | ------------------ |
|
|
268
|
+
| Basic fetch | Yes | Core functionality |
|
|
269
|
+
| Multiple formats | Yes | User selected |
|
|
270
|
+
| Webhooks | No | Deferred to v2 |
|
|
264
271
|
|
|
265
272
|
## Test Strategy
|
|
266
273
|
|
|
@@ -277,6 +284,7 @@ Creates: `.claude/research/[api-name]/interview.md`
|
|
|
277
284
|
"rate_limit_handling": "exponential_backoff"
|
|
278
285
|
}
|
|
279
286
|
```
|
|
287
|
+
````
|
|
280
288
|
|
|
281
289
|
## Deep Research Approved
|
|
282
290
|
|
|
@@ -286,6 +294,7 @@ Creates: `.claude/research/[api-name]/interview.md`
|
|
|
286
294
|
## Open Questions
|
|
287
295
|
|
|
288
296
|
[Any remaining ambiguities]
|
|
297
|
+
|
|
289
298
|
```
|
|
290
299
|
|
|
291
300
|
## Integration with Hooks
|
|
@@ -293,14 +302,17 @@ Creates: `.claude/research/[api-name]/interview.md`
|
|
|
293
302
|
The `enforce-interview.py` hook injects these decisions when Claude tries to write implementation:
|
|
294
303
|
|
|
295
304
|
```
|
|
305
|
+
|
|
296
306
|
INTERVIEW CONTEXT REMINDER
|
|
297
307
|
|
|
298
308
|
When implementing, remember user decisions:
|
|
309
|
+
|
|
299
310
|
- format: ["json", "svg", "png"] (raw excluded)
|
|
300
311
|
- quality: boundary testing (1, 50, 100)
|
|
301
312
|
- rate limits: exponential backoff
|
|
302
313
|
|
|
303
314
|
Source: .claude/api-dev-state.json
|
|
315
|
+
|
|
304
316
|
```
|
|
305
317
|
|
|
306
318
|
<claude-commands-template>
|
|
@@ -329,3 +341,4 @@ Source: .claude/api-dev-state.json
|
|
|
329
341
|
- Decisions injected during implementation via hook
|
|
330
342
|
- Consistency between interview answers and code enforced
|
|
331
343
|
</claude-commands-template>
|
|
344
|
+
```
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
**NOT shotgun research** - We don't blindly run 20 searches.
|
|
10
10
|
|
|
11
11
|
**Adaptive flow:**
|
|
12
|
+
|
|
12
13
|
1. Run 2-3 initial searches
|
|
13
14
|
2. Summarize findings
|
|
14
15
|
3. PROPOSE additional searches based on context
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
### Initial Discovery (Automatic)
|
|
22
23
|
|
|
23
24
|
Run 2-3 targeted searches:
|
|
25
|
+
|
|
24
26
|
```
|
|
25
27
|
- Context7: "[library-name]" (if SDK/library)
|
|
26
28
|
- WebSearch: "[name] official documentation"
|
|
@@ -28,6 +30,7 @@ Run 2-3 targeted searches:
|
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
Present initial summary:
|
|
33
|
+
|
|
31
34
|
```
|
|
32
35
|
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
33
36
|
â INITIAL RESEARCH: [library-name] â
|
|
@@ -81,6 +84,7 @@ After interview, PROPOSE targeted searches based on user's selections:
|
|
|
81
84
|
### Execute Approved Searches
|
|
82
85
|
|
|
83
86
|
Only run searches that were explicitly approved:
|
|
87
|
+
|
|
84
88
|
- Track which searches were proposed vs approved vs skipped
|
|
85
89
|
- Log everything to state file for transparency
|
|
86
90
|
|
|
@@ -100,9 +104,7 @@ Only run searches that were explicitly approved:
|
|
|
100
104
|
"SVG optimization options",
|
|
101
105
|
"batch processing"
|
|
102
106
|
],
|
|
103
|
-
"skipped_searches": [
|
|
104
|
-
"webhook support"
|
|
105
|
-
]
|
|
107
|
+
"skipped_searches": ["webhook support"]
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
110
|
```
|
|
@@ -141,6 +143,7 @@ Research is cached in `.claude/research/[api-name]/`:
|
|
|
141
143
|
```
|
|
142
144
|
|
|
143
145
|
**Freshness Rule:** If research is >7 days old when referenced:
|
|
146
|
+
|
|
144
147
|
```
|
|
145
148
|
â ī¸ Research for "brandfetch" is 15 days old.
|
|
146
149
|
Re-research before using? [Y/n]
|
|
@@ -150,7 +153,7 @@ Re-research before using? [Y/n]
|
|
|
150
153
|
|
|
151
154
|
Creates: `.claude/research/[library-name]/CURRENT.md`
|
|
152
155
|
|
|
153
|
-
|
|
156
|
+
````markdown
|
|
154
157
|
# Research: [Library/Service Name]
|
|
155
158
|
|
|
156
159
|
**Date:** [current-date]
|
|
@@ -159,6 +162,7 @@ Creates: `.claude/research/[library-name]/CURRENT.md`
|
|
|
159
162
|
**Freshness:** 0 days (valid for 7 days)
|
|
160
163
|
|
|
161
164
|
## 1. Official Documentation Links
|
|
165
|
+
|
|
162
166
|
- Main docs: [URL]
|
|
163
167
|
- API reference: [URL]
|
|
164
168
|
- GitHub repo: [URL]
|
|
@@ -166,72 +170,93 @@ Creates: `.claude/research/[library-name]/CURRENT.md`
|
|
|
166
170
|
- TypeScript types: [URL]
|
|
167
171
|
|
|
168
172
|
## 2. Installation & Setup
|
|
173
|
+
|
|
169
174
|
### Installation
|
|
175
|
+
|
|
170
176
|
```bash
|
|
171
177
|
[installation command]
|
|
172
178
|
```
|
|
179
|
+
````
|
|
173
180
|
|
|
174
181
|
### Environment Variables
|
|
182
|
+
|
|
175
183
|
```env
|
|
176
184
|
[required env vars]
|
|
177
185
|
```
|
|
178
186
|
|
|
179
187
|
### API Key Setup
|
|
188
|
+
|
|
180
189
|
[How to obtain and configure]
|
|
181
190
|
|
|
182
191
|
## 3. Complete Request Schema
|
|
192
|
+
|
|
183
193
|
### Required Parameters
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
|
194
|
+
|
|
195
|
+
| Parameter | Type | Description | Validation |
|
|
196
|
+
| --------- | ------ | ----------- | ---------- |
|
|
197
|
+
| [name] | [type] | [desc] | [rules] |
|
|
187
198
|
|
|
188
199
|
### Optional Parameters
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
|
200
|
+
|
|
201
|
+
| Parameter | Type | Default | Description | Notes |
|
|
202
|
+
| --------- | ------ | --------- | ----------- | ------- |
|
|
203
|
+
| [name] | [type] | [default] | [desc] | [notes] |
|
|
192
204
|
|
|
193
205
|
### Continuous Parameters (for test strategy)
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
|
197
|
-
|
|
|
206
|
+
|
|
207
|
+
| Parameter | Type | Range | Suggested Test Values |
|
|
208
|
+
| --------- | ------ | ---------- | --------------------- |
|
|
209
|
+
| quality | number | 1-100 | 1, 50, 100 (boundary) |
|
|
210
|
+
| timeout | number | 1000-30000 | 1000, 15000, 30000 |
|
|
198
211
|
|
|
199
212
|
## 4. Complete Response Schema
|
|
213
|
+
|
|
200
214
|
### Success Response
|
|
215
|
+
|
|
201
216
|
[TypeScript interface]
|
|
202
217
|
|
|
203
218
|
### Error Response
|
|
219
|
+
|
|
204
220
|
[TypeScript interface with error codes]
|
|
205
221
|
|
|
206
222
|
## 5. Features & Capabilities
|
|
223
|
+
|
|
207
224
|
### Core Features (Discovered)
|
|
225
|
+
|
|
208
226
|
- [x] [Feature 1]: [description]
|
|
209
227
|
- [x] [Feature 2]: [description]
|
|
210
228
|
|
|
211
229
|
### Features NOT Implemented (Intentional)
|
|
230
|
+
|
|
212
231
|
- [ ] [Feature]: [reason for exclusion]
|
|
213
232
|
|
|
214
233
|
## 6. Limitations & Constraints
|
|
234
|
+
|
|
215
235
|
- Rate limits: [details]
|
|
216
236
|
- Size limits: [details]
|
|
217
237
|
- Timeout: [details]
|
|
218
238
|
|
|
219
239
|
## 7. Testing Considerations
|
|
240
|
+
|
|
220
241
|
- [ ] Test boundary values for continuous params
|
|
221
242
|
- [ ] Test all enum values
|
|
222
243
|
- [ ] Test error responses
|
|
223
244
|
- [ ] Test rate limiting behavior
|
|
224
245
|
|
|
225
246
|
## 8. Research Trail
|
|
247
|
+
|
|
226
248
|
### Searches Performed
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
|
230
|
-
| "[name]" |
|
|
249
|
+
|
|
250
|
+
| Search | Tool | Found |
|
|
251
|
+
| ---------------------- | --------- | ----- |
|
|
252
|
+
| "[name] documentation" | WebSearch | â |
|
|
253
|
+
| "[name]" | Context7 | â |
|
|
231
254
|
|
|
232
255
|
### Proposed but Skipped
|
|
256
|
+
|
|
233
257
|
- "webhook support" - User declined, not needed
|
|
234
|
-
|
|
258
|
+
|
|
259
|
+
````
|
|
235
260
|
|
|
236
261
|
## Research-First Schema Design (MANDATORY)
|
|
237
262
|
|
|
@@ -296,11 +321,12 @@ All research is tracked in `.claude/api-dev-state.json`:
|
|
|
296
321
|
}
|
|
297
322
|
}
|
|
298
323
|
}
|
|
299
|
-
|
|
324
|
+
````
|
|
300
325
|
|
|
301
326
|
## Usage Examples
|
|
302
327
|
|
|
303
328
|
### Research with full flow
|
|
329
|
+
|
|
304
330
|
```bash
|
|
305
331
|
/api-research brandfetch
|
|
306
332
|
# â Initial search (2-3 queries)
|
|
@@ -328,4 +354,4 @@ All research is tracked in `.claude/api-dev-state.json`:
|
|
|
328
354
|
- Phase 5 uses adaptive proposal flow
|
|
329
355
|
- Phase 10 (Verify) triggers re-research
|
|
330
356
|
- Freshness check prevents stale data
|
|
331
|
-
</claude-commands-template>
|
|
357
|
+
</claude-commands-template>
|
|
@@ -18,6 +18,7 @@ Path: .claude/api-dev-state.json
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Parse the JSON and display a formatted status report showing:
|
|
21
|
+
|
|
21
22
|
- Current endpoint being worked on
|
|
22
23
|
- Phase completion status (scope, research, interview, TDD, docs)
|
|
23
24
|
- Sources consulted during research
|
|
@@ -60,6 +61,7 @@ VERIFICATION:
|
|
|
60
61
|
## What This Shows
|
|
61
62
|
|
|
62
63
|
### For Specific Endpoint
|
|
64
|
+
|
|
63
65
|
```
|
|
64
66
|
đ Status: /api/v2/generate-css
|
|
65
67
|
|
|
@@ -87,6 +89,7 @@ Next Steps: None - endpoint complete
|
|
|
87
89
|
```
|
|
88
90
|
|
|
89
91
|
### For All Endpoints
|
|
92
|
+
|
|
90
93
|
```
|
|
91
94
|
đ V2 API Implementation Status
|
|
92
95
|
|
|
@@ -122,12 +125,14 @@ Last updated: 2025-12-06
|
|
|
122
125
|
## Commands
|
|
123
126
|
|
|
124
127
|
### View Status
|
|
128
|
+
|
|
125
129
|
```bash
|
|
126
130
|
/api-status generate-css # Specific endpoint
|
|
127
131
|
/api-status --all # All endpoints
|
|
128
132
|
```
|
|
129
133
|
|
|
130
134
|
### Update Status
|
|
135
|
+
|
|
131
136
|
```bash
|
|
132
137
|
/api-status generate-css --phase=testing
|
|
133
138
|
/api-status generate-css --complete
|
|
@@ -138,6 +143,7 @@ Last updated: 2025-12-06
|
|
|
138
143
|
Updates: `/src/v2/docs/v2-api-implementation-status.md`
|
|
139
144
|
|
|
140
145
|
**Format:**
|
|
146
|
+
|
|
141
147
|
```markdown
|
|
142
148
|
# V2 API Implementation Status
|
|
143
149
|
|
|
@@ -148,6 +154,7 @@ Updates: `/src/v2/docs/v2-api-implementation-status.md`
|
|
|
148
154
|
## Endpoints
|
|
149
155
|
|
|
150
156
|
### â
/api/v2/health
|
|
157
|
+
|
|
151
158
|
- **Status:** Complete
|
|
152
159
|
- **Tests:** 15/15 passing
|
|
153
160
|
- **Coverage:** 100%
|
|
@@ -156,6 +163,7 @@ Updates: `/src/v2/docs/v2-api-implementation-status.md`
|
|
|
156
163
|
- **Purpose:** System health check with dependency validation
|
|
157
164
|
|
|
158
165
|
### đ§ /api/v2/generate-css
|
|
166
|
+
|
|
159
167
|
- **Status:** In Progress (Testing)
|
|
160
168
|
- **Tests:** 20/33 passing
|
|
161
169
|
- **Coverage:** 85%
|
|
@@ -165,6 +173,7 @@ Updates: `/src/v2/docs/v2-api-implementation-status.md`
|
|
|
165
173
|
- **Next:** Complete remaining tests
|
|
166
174
|
|
|
167
175
|
### đ /api/v2/generate-html
|
|
176
|
+
|
|
168
177
|
- **Status:** Planned
|
|
169
178
|
- **Priority:** High
|
|
170
179
|
- **Dependencies:** None
|
|
@@ -175,24 +184,28 @@ Updates: `/src/v2/docs/v2-api-implementation-status.md`
|
|
|
175
184
|
## Integration with Workflow
|
|
176
185
|
|
|
177
186
|
### After Interview
|
|
187
|
+
|
|
178
188
|
```bash
|
|
179
189
|
/api-interview generate-css
|
|
180
190
|
/api-status generate-css --phase=interview-complete
|
|
181
191
|
```
|
|
182
192
|
|
|
183
193
|
### After Research
|
|
194
|
+
|
|
184
195
|
```bash
|
|
185
196
|
/api-research gemini-flash
|
|
186
197
|
/api-status generate-css --phase=research-complete
|
|
187
198
|
```
|
|
188
199
|
|
|
189
200
|
### After TDD Cycle
|
|
201
|
+
|
|
190
202
|
```bash
|
|
191
203
|
/cycle generate CSS with Gemini
|
|
192
204
|
/api-status generate-css --complete
|
|
193
205
|
```
|
|
194
206
|
|
|
195
207
|
### Before Commit
|
|
208
|
+
|
|
196
209
|
```bash
|
|
197
210
|
pnpm test:run
|
|
198
211
|
/api-status --all # Verify all green
|
|
@@ -202,6 +215,7 @@ pnpm test:run
|
|
|
202
215
|
## Automatic Updates
|
|
203
216
|
|
|
204
217
|
The `/api-create` command automatically updates status:
|
|
218
|
+
|
|
205
219
|
- Interview phase â "Interview Complete"
|
|
206
220
|
- Red phase â "Tests Written"
|
|
207
221
|
- Green phase â "Implementation Complete"
|
|
@@ -224,21 +238,27 @@ The `/api-create` command automatically updates status:
|
|
|
224
238
|
## Reports
|
|
225
239
|
|
|
226
240
|
### Coverage Report
|
|
241
|
+
|
|
227
242
|
```bash
|
|
228
243
|
/api-status --coverage
|
|
229
244
|
```
|
|
245
|
+
|
|
230
246
|
Shows test coverage for all V2 endpoints.
|
|
231
247
|
|
|
232
248
|
### Migration Report
|
|
249
|
+
|
|
233
250
|
```bash
|
|
234
251
|
/api-status --migration
|
|
235
252
|
```
|
|
253
|
+
|
|
236
254
|
Shows progress from legacy to V2.
|
|
237
255
|
|
|
238
256
|
### Blockers Report
|
|
257
|
+
|
|
239
258
|
```bash
|
|
240
259
|
/api-status --blocked
|
|
241
260
|
```
|
|
261
|
+
|
|
242
262
|
Shows endpoints blocked by missing keys, dependencies, etc.
|
|
243
263
|
|
|
244
264
|
<claude-commands-template>
|
|
@@ -256,4 +276,4 @@ Shows endpoints blocked by missing keys, dependencies, etc.
|
|
|
256
276
|
- Used by /commit to verify readiness
|
|
257
277
|
- Used by team to see what's done
|
|
258
278
|
- Used for planning future work
|
|
259
|
-
</claude-commands-template>
|
|
279
|
+
</claude-commands-template>
|
|
@@ -138,24 +138,24 @@ Creates: `.claude/research/[api-name]/verification.md`
|
|
|
138
138
|
|
|
139
139
|
**Date:** [current-date]
|
|
140
140
|
**Implementation File:** src/app/api/v2/[endpoint]/route.ts
|
|
141
|
-
**Test File:** src/app/api/v2/[endpoint]
|
|
141
|
+
**Test File:** src/app/api/v2/[endpoint]/**tests**/[endpoint].api.test.ts
|
|
142
142
|
|
|
143
143
|
## Documentation Sources Re-Checked
|
|
144
144
|
|
|
145
|
-
| Source
|
|
146
|
-
|
|
147
|
-
| Official docs
|
|
148
|
-
| Context7
|
|
149
|
-
| Cached research | .claude/research/[api]/CURRENT.md | â
|
|
145
|
+
| Source | URL | Checked |
|
|
146
|
+
| --------------- | --------------------------------- | ------- |
|
|
147
|
+
| Official docs | [URL] | â |
|
|
148
|
+
| Context7 | [library] | â |
|
|
149
|
+
| Cached research | .claude/research/[api]/CURRENT.md | â |
|
|
150
150
|
|
|
151
151
|
## Feature Comparison
|
|
152
152
|
|
|
153
|
-
| Feature
|
|
154
|
-
|
|
155
|
-
| domain param | â
|
|
156
|
-
| format param | 4 options | 3 options
|
|
157
|
-
| size param
|
|
158
|
-
| webhook
|
|
153
|
+
| Feature | In Docs | Implemented | Status |
|
|
154
|
+
| ------------ | --------- | ----------- | -------------- |
|
|
155
|
+
| domain param | â | â | â
Match |
|
|
156
|
+
| format param | 4 options | 3 options | â ī¸ Fixed |
|
|
157
|
+
| size param | â | â | â ī¸ Fixed |
|
|
158
|
+
| webhook | â | â | âšī¸ Intentional |
|
|
159
159
|
|
|
160
160
|
## Gaps Fixed
|
|
161
161
|
|
|
@@ -190,6 +190,7 @@ Creates: `.claude/research/[api-name]/verification.md`
|
|
|
190
190
|
This command is normally triggered automatically by `verify-after-green.py` hook after tests pass.
|
|
191
191
|
|
|
192
192
|
Manual invocation is useful when:
|
|
193
|
+
|
|
193
194
|
- Hook was skipped or didn't trigger
|
|
194
195
|
- Want to re-verify after changes
|
|
195
196
|
- Research is stale and needs refresh
|
|
@@ -228,4 +229,4 @@ Phase 10: VERIFY â /api-verify triggers this
|
|
|
228
229
|
- Error codes handled?
|
|
229
230
|
- Optional features accounted for?
|
|
230
231
|
- Default values match docs?
|
|
231
|
-
</claude-commands-template>
|
|
232
|
+
</claude-commands-template>
|