@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,279 @@
|
|
|
1
|
+
# API Status - Track Implementation Progress
|
|
2
|
+
|
|
3
|
+
**Usage:** `/api-status [endpoint-name]` or `/api-status --all`
|
|
4
|
+
|
|
5
|
+
**Purpose:** View and update API implementation status, track progress, and manage V2 migration.
|
|
6
|
+
|
|
7
|
+
## State File Integration
|
|
8
|
+
|
|
9
|
+
This command reads from `.claude/api-dev-state.json` which is automatically updated by the enforcement hooks.
|
|
10
|
+
|
|
11
|
+
### Reading Current State
|
|
12
|
+
|
|
13
|
+
**FIRST: Read the state file to understand current progress:**
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Tool: Read
|
|
17
|
+
Path: .claude/api-dev-state.json
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Parse the JSON and display a formatted status report showing:
|
|
21
|
+
|
|
22
|
+
- Current endpoint being worked on
|
|
23
|
+
- Phase completion status (scope, research, interview, TDD, docs)
|
|
24
|
+
- Sources consulted during research
|
|
25
|
+
- Timestamps for each phase
|
|
26
|
+
- Verification status
|
|
27
|
+
|
|
28
|
+
### Example State Display
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
📊 API Development Progress
|
|
32
|
+
|
|
33
|
+
Endpoint: stream-text
|
|
34
|
+
Library: vercel-ai-sdk
|
|
35
|
+
Started: 2025-12-06T20:00:00Z
|
|
36
|
+
|
|
37
|
+
PHASES:
|
|
38
|
+
✅ Scope defined (20:00:30)
|
|
39
|
+
✅ Initial research - 4 sources consulted (20:02:00)
|
|
40
|
+
🔄 Interview - in progress
|
|
41
|
+
⬜ Deep research
|
|
42
|
+
⬜ Schema creation
|
|
43
|
+
⬜ Environment check
|
|
44
|
+
⬜ TDD Red
|
|
45
|
+
⬜ TDD Green
|
|
46
|
+
⬜ TDD Refactor
|
|
47
|
+
⬜ Documentation
|
|
48
|
+
|
|
49
|
+
RESEARCH SOURCES:
|
|
50
|
+
• context7: @ai-sdk/core (20:01:00)
|
|
51
|
+
• websearch: "Vercel AI SDK streamText 2025" (20:01:30)
|
|
52
|
+
• webfetch: https://sdk.vercel.ai/docs (20:01:45)
|
|
53
|
+
|
|
54
|
+
VERIFICATION:
|
|
55
|
+
❌ All sources fetched: false
|
|
56
|
+
❌ Schema matches docs: false
|
|
57
|
+
❌ Tests cover params: false
|
|
58
|
+
❌ All tests passing: false
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## What This Shows
|
|
62
|
+
|
|
63
|
+
### For Specific Endpoint
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
📊 Status: /api/v2/generate-css
|
|
67
|
+
|
|
68
|
+
Phase: ✅ Complete
|
|
69
|
+
Tests: 33/33 passing (100% coverage)
|
|
70
|
+
Documentation: ✅ Complete
|
|
71
|
+
|
|
72
|
+
Timeline:
|
|
73
|
+
✅ Interview completed (2025-12-06)
|
|
74
|
+
✅ Research completed (2025-12-06)
|
|
75
|
+
✅ Environment verified (2025-12-06)
|
|
76
|
+
✅ Tests written (Red phase)
|
|
77
|
+
✅ Implementation complete (Green phase)
|
|
78
|
+
✅ Refactored (Refactor phase)
|
|
79
|
+
✅ Documentation updated
|
|
80
|
+
✅ Committed to git
|
|
81
|
+
|
|
82
|
+
Files:
|
|
83
|
+
- Route: src/app/api/v2/generate-css/route.ts
|
|
84
|
+
- Tests: src/app/api/v2/generate-css/__tests__/generate-css.api.test.ts
|
|
85
|
+
- Docs: src/v2/docs/endpoints/generate-css.md
|
|
86
|
+
- Research: src/v2/docs/research/gemini-flash.md
|
|
87
|
+
|
|
88
|
+
Next Steps: None - endpoint complete
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### For All Endpoints
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
📊 V2 API Implementation Status
|
|
95
|
+
|
|
96
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
97
|
+
|
|
98
|
+
✅ COMPLETE (2)
|
|
99
|
+
• /api/v2/health (15 tests)
|
|
100
|
+
• /api/v2/monitor (23 tests)
|
|
101
|
+
|
|
102
|
+
🚧 IN PROGRESS (1)
|
|
103
|
+
• /api/v2/generate-css (interview complete, implementing)
|
|
104
|
+
|
|
105
|
+
📋 PLANNED (3)
|
|
106
|
+
• /api/v2/generate-html
|
|
107
|
+
• /api/v2/chat
|
|
108
|
+
• /api/v2/scrape
|
|
109
|
+
|
|
110
|
+
❌ NOT STARTED (0)
|
|
111
|
+
|
|
112
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
113
|
+
|
|
114
|
+
Summary:
|
|
115
|
+
Total endpoints: 6
|
|
116
|
+
Complete: 2 (33%)
|
|
117
|
+
In progress: 1 (17%)
|
|
118
|
+
Planned: 3 (50%)
|
|
119
|
+
Total tests: 38
|
|
120
|
+
Coverage: 100%
|
|
121
|
+
|
|
122
|
+
Last updated: 2025-12-06
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Commands
|
|
126
|
+
|
|
127
|
+
### View Status
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
/api-status generate-css # Specific endpoint
|
|
131
|
+
/api-status --all # All endpoints
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Update Status
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
/api-status generate-css --phase=testing
|
|
138
|
+
/api-status generate-css --complete
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Status Tracking File
|
|
142
|
+
|
|
143
|
+
Updates: `/src/v2/docs/v2-api-implementation-status.md`
|
|
144
|
+
|
|
145
|
+
**Format:**
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
# V2 API Implementation Status
|
|
149
|
+
|
|
150
|
+
**Last Updated:** 2025-12-06
|
|
151
|
+
**Total Endpoints:** 6
|
|
152
|
+
**Completed:** 2 (33%)
|
|
153
|
+
|
|
154
|
+
## Endpoints
|
|
155
|
+
|
|
156
|
+
### ✅ /api/v2/health
|
|
157
|
+
|
|
158
|
+
- **Status:** Complete
|
|
159
|
+
- **Tests:** 15/15 passing
|
|
160
|
+
- **Coverage:** 100%
|
|
161
|
+
- **Interview:** [Link to docs]
|
|
162
|
+
- **Implemented:** 2025-12-06
|
|
163
|
+
- **Purpose:** System health check with dependency validation
|
|
164
|
+
|
|
165
|
+
### 🚧 /api/v2/generate-css
|
|
166
|
+
|
|
167
|
+
- **Status:** In Progress (Testing)
|
|
168
|
+
- **Tests:** 20/33 passing
|
|
169
|
+
- **Coverage:** 85%
|
|
170
|
+
- **Interview:** [Link to docs]
|
|
171
|
+
- **Started:** 2025-12-06
|
|
172
|
+
- **Blocked by:** None
|
|
173
|
+
- **Next:** Complete remaining tests
|
|
174
|
+
|
|
175
|
+
### 📋 /api/v2/generate-html
|
|
176
|
+
|
|
177
|
+
- **Status:** Planned
|
|
178
|
+
- **Priority:** High
|
|
179
|
+
- **Dependencies:** None
|
|
180
|
+
- **Interview:** Not started
|
|
181
|
+
- **Estimated effort:** Medium
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Integration with Workflow
|
|
185
|
+
|
|
186
|
+
### After Interview
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
/api-interview generate-css
|
|
190
|
+
/api-status generate-css --phase=interview-complete
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### After Research
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
/api-research gemini-flash
|
|
197
|
+
/api-status generate-css --phase=research-complete
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### After TDD Cycle
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
/cycle generate CSS with Gemini
|
|
204
|
+
/api-status generate-css --complete
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Before Commit
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
pnpm test:run
|
|
211
|
+
/api-status --all # Verify all green
|
|
212
|
+
/commit
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Automatic Updates
|
|
216
|
+
|
|
217
|
+
The `/api-create` command automatically updates status:
|
|
218
|
+
|
|
219
|
+
- Interview phase → "Interview Complete"
|
|
220
|
+
- Red phase → "Tests Written"
|
|
221
|
+
- Green phase → "Implementation Complete"
|
|
222
|
+
- Refactor phase → "Refactored"
|
|
223
|
+
- Documentation → "Documentation Updated"
|
|
224
|
+
- Commit → "Complete"
|
|
225
|
+
|
|
226
|
+
## Status Phases
|
|
227
|
+
|
|
228
|
+
1. **Not Started** - No work begun
|
|
229
|
+
2. **Interview Complete** - Understanding documented
|
|
230
|
+
3. **Research Complete** - External docs reviewed
|
|
231
|
+
4. **Environment Ready** - API keys verified
|
|
232
|
+
5. **Tests Written** - Red phase complete
|
|
233
|
+
6. **Implementation Complete** - Green phase complete
|
|
234
|
+
7. **Refactored** - Code cleaned up
|
|
235
|
+
8. **Documentation Updated** - Manifests updated
|
|
236
|
+
9. **Complete** - All tests passing, committed
|
|
237
|
+
|
|
238
|
+
## Reports
|
|
239
|
+
|
|
240
|
+
### Coverage Report
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
/api-status --coverage
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Shows test coverage for all V2 endpoints.
|
|
247
|
+
|
|
248
|
+
### Migration Report
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
/api-status --migration
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Shows progress from legacy to V2.
|
|
255
|
+
|
|
256
|
+
### Blockers Report
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
/api-status --blocked
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
Shows endpoints blocked by missing keys, dependencies, etc.
|
|
263
|
+
|
|
264
|
+
<claude-commands-template>
|
|
265
|
+
## Status Management
|
|
266
|
+
|
|
267
|
+
- Update status after each phase completion
|
|
268
|
+
- Keep v2-api-implementation-status.md current
|
|
269
|
+
- Use status to plan next work
|
|
270
|
+
- Reference in standup/progress reports
|
|
271
|
+
- Track blockers and dependencies
|
|
272
|
+
|
|
273
|
+
## Integration Points
|
|
274
|
+
|
|
275
|
+
- Used by /api-create to track progress
|
|
276
|
+
- Used by /commit to verify readiness
|
|
277
|
+
- Used by team to see what's done
|
|
278
|
+
- Used for planning future work
|
|
279
|
+
</claude-commands-template>
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# API Verify - Implementation Verification (Phase 10) v3.0
|
|
2
|
+
|
|
3
|
+
**Usage:** `/api-verify [endpoint-name]`
|
|
4
|
+
|
|
5
|
+
**Purpose:** Manually trigger Phase 10 verification - re-research documentation and compare to implementation to catch memory-based errors.
|
|
6
|
+
|
|
7
|
+
## When to Use
|
|
8
|
+
|
|
9
|
+
- After tests pass (TDD Green complete)
|
|
10
|
+
- Before proceeding to Refactor phase
|
|
11
|
+
- When unsure if implementation matches documentation
|
|
12
|
+
- After significant time has passed since initial research
|
|
13
|
+
|
|
14
|
+
## Verification Process
|
|
15
|
+
|
|
16
|
+
### Step 1: Re-Read Original Documentation
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌────────────────────────────────────────────────────────────┐
|
|
20
|
+
│ RE-RESEARCHING DOCUMENTATION │
|
|
21
|
+
│ │
|
|
22
|
+
│ Fetching current documentation for: [endpoint-name] │
|
|
23
|
+
│ │
|
|
24
|
+
│ Sources: │
|
|
25
|
+
│ - Context7: [library-name] │
|
|
26
|
+
│ - Official docs: [URL] │
|
|
27
|
+
│ - Cached research: .claude/research/[api]/CURRENT.md │
|
|
28
|
+
│ │
|
|
29
|
+
│ Freshness: [X days old] │
|
|
30
|
+
└────────────────────────────────────────────────────────────┘
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Step 2: Feature-by-Feature Comparison
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
┌────────────────────────────────────────────────────────────┐
|
|
37
|
+
│ IMPLEMENTATION VERIFICATION │
|
|
38
|
+
│ │
|
|
39
|
+
│ Comparing documentation to implementation: │
|
|
40
|
+
│ │
|
|
41
|
+
│ │ Feature │ In Docs │ Implemented │ Status │
|
|
42
|
+
│ ├─────────────────┼─────────┼─────────────┼───────────────│
|
|
43
|
+
│ │ domain param │ ✓ │ ✓ │ ✅ Match │
|
|
44
|
+
│ │ format param │ 4 opts │ 3 opts │ ⚠️ Missing │
|
|
45
|
+
│ │ quality range │ 1-100 │ 1-100 │ ✅ Match │
|
|
46
|
+
│ │ size param │ ✓ │ ✗ │ ⚠️ Missing │
|
|
47
|
+
│ │ webhook support │ ✓ │ ✗ │ ℹ️ Intentional │
|
|
48
|
+
│ │ batch mode │ ✓ │ ✗ │ ℹ️ Intentional │
|
|
49
|
+
│ │
|
|
50
|
+
│ MATCHES: 2 │
|
|
51
|
+
│ MISSING: 2 │
|
|
52
|
+
│ INTENTIONAL OMISSIONS: 2 │
|
|
53
|
+
└────────────────────────────────────────────────────────────┘
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 3: Gap Analysis
|
|
57
|
+
|
|
58
|
+
For each discrepancy:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
┌────────────────────────────────────────────────────────────┐
|
|
62
|
+
│ GAP #1: format parameter │
|
|
63
|
+
│ │
|
|
64
|
+
│ Documentation says: ["json", "svg", "png", "raw"] │
|
|
65
|
+
│ Implementation has: ["json", "svg", "png"] │
|
|
66
|
+
│ │
|
|
67
|
+
│ Missing: "raw" format │
|
|
68
|
+
│ │
|
|
69
|
+
│ Action? │
|
|
70
|
+
│ [x] Fix - Add "raw" format support │
|
|
71
|
+
│ [ ] Skip - Mark as intentional omission │
|
|
72
|
+
│ [ ] Defer - Add to backlog for later │
|
|
73
|
+
└────────────────────────────────────────────────────────────┘
|
|
74
|
+
|
|
75
|
+
┌────────────────────────────────────────────────────────────┐
|
|
76
|
+
│ GAP #2: size parameter │
|
|
77
|
+
│ │
|
|
78
|
+
│ Documentation says: size parameter exists (16-4096) │
|
|
79
|
+
│ Implementation has: not implemented │
|
|
80
|
+
│ │
|
|
81
|
+
│ Action? │
|
|
82
|
+
│ [x] Fix - Add size parameter │
|
|
83
|
+
│ [ ] Skip - Mark as intentional omission │
|
|
84
|
+
│ [ ] Defer - Add to backlog for later │
|
|
85
|
+
└────────────────────────────────────────────────────────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Step 4: Loop Back or Proceed
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
┌────────────────────────────────────────────────────────────┐
|
|
92
|
+
│ VERIFICATION SUMMARY │
|
|
93
|
+
│ │
|
|
94
|
+
│ Gaps to fix: 2 │
|
|
95
|
+
│ Intentional omissions: 2 │
|
|
96
|
+
│ │
|
|
97
|
+
│ DECISION: │
|
|
98
|
+
│ │
|
|
99
|
+
│ [x] Fix gaps → Return to TDD Red (write tests for gaps) │
|
|
100
|
+
│ [ ] Skip all → Document as omissions, proceed to Refactor │
|
|
101
|
+
└────────────────────────────────────────────────────────────┘
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## State File Updates
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"phases": {
|
|
109
|
+
"verify": {
|
|
110
|
+
"status": "complete",
|
|
111
|
+
"gaps_found": 2,
|
|
112
|
+
"gaps_fixed": 2,
|
|
113
|
+
"intentional_omissions": [
|
|
114
|
+
{
|
|
115
|
+
"feature": "webhook support",
|
|
116
|
+
"reason": "User declined in interview",
|
|
117
|
+
"documented_at": "..."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"feature": "batch mode",
|
|
121
|
+
"reason": "Out of scope for v1",
|
|
122
|
+
"documented_at": "..."
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"re_research_done": true,
|
|
126
|
+
"completed_at": "..."
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Verification Report
|
|
133
|
+
|
|
134
|
+
Creates: `.claude/research/[api-name]/verification.md`
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
# Verification Report: [API Name]
|
|
138
|
+
|
|
139
|
+
**Date:** [current-date]
|
|
140
|
+
**Implementation File:** src/app/api/v2/[endpoint]/route.ts
|
|
141
|
+
**Test File:** src/app/api/v2/[endpoint]/**tests**/[endpoint].api.test.ts
|
|
142
|
+
|
|
143
|
+
## Documentation Sources Re-Checked
|
|
144
|
+
|
|
145
|
+
| Source | URL | Checked |
|
|
146
|
+
| --------------- | --------------------------------- | ------- |
|
|
147
|
+
| Official docs | [URL] | ✓ |
|
|
148
|
+
| Context7 | [library] | ✓ |
|
|
149
|
+
| Cached research | .claude/research/[api]/CURRENT.md | ✓ |
|
|
150
|
+
|
|
151
|
+
## Feature Comparison
|
|
152
|
+
|
|
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
|
+
|
|
160
|
+
## Gaps Fixed
|
|
161
|
+
|
|
162
|
+
1. **format parameter** - Added "raw" format support
|
|
163
|
+
- Test added: test/format-raw.test.ts:15
|
|
164
|
+
- Implementation: route.ts:45
|
|
165
|
+
|
|
166
|
+
2. **size parameter** - Added size validation
|
|
167
|
+
- Test added: test/size-param.test.ts:10
|
|
168
|
+
- Implementation: route.ts:52
|
|
169
|
+
|
|
170
|
+
## Intentional Omissions
|
|
171
|
+
|
|
172
|
+
1. **webhook support**
|
|
173
|
+
- Reason: User declined in interview (Phase 4)
|
|
174
|
+
- Decision recorded: api-dev-state.json
|
|
175
|
+
- May add in v2
|
|
176
|
+
|
|
177
|
+
2. **batch mode**
|
|
178
|
+
- Reason: Out of scope for initial release
|
|
179
|
+
- Documented for future consideration
|
|
180
|
+
|
|
181
|
+
## Verification Result
|
|
182
|
+
|
|
183
|
+
- **Status:** PASSED
|
|
184
|
+
- **All documented features accounted for**
|
|
185
|
+
- **Ready for Refactor phase**
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Hook Integration
|
|
189
|
+
|
|
190
|
+
This command is normally triggered automatically by `verify-after-green.py` hook after tests pass.
|
|
191
|
+
|
|
192
|
+
Manual invocation is useful when:
|
|
193
|
+
|
|
194
|
+
- Hook was skipped or didn't trigger
|
|
195
|
+
- Want to re-verify after changes
|
|
196
|
+
- Research is stale and needs refresh
|
|
197
|
+
|
|
198
|
+
## Workflow Position
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
Phase 8: TDD Red (write tests)
|
|
202
|
+
│
|
|
203
|
+
▼
|
|
204
|
+
Phase 9: TDD Green (implementation)
|
|
205
|
+
│
|
|
206
|
+
▼
|
|
207
|
+
Phase 10: VERIFY ← /api-verify triggers this
|
|
208
|
+
│
|
|
209
|
+
├─► Gaps found? → Loop back to Phase 8
|
|
210
|
+
│
|
|
211
|
+
└─► All verified → Proceed to Phase 11 (Refactor)
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
<claude-commands-template>
|
|
215
|
+
## Verification Guidelines
|
|
216
|
+
|
|
217
|
+
1. **Re-read, don't remember** - Fresh fetch of docs every time
|
|
218
|
+
2. **Feature-by-feature** - Systematic comparison
|
|
219
|
+
3. **Document omissions** - Intentional != forgotten
|
|
220
|
+
4. **Loop back for gaps** - Return to TDD Red if fixes needed
|
|
221
|
+
5. **Update state file** - Track everything
|
|
222
|
+
6. **Create verification report** - Audit trail
|
|
223
|
+
|
|
224
|
+
## Common Gaps to Check
|
|
225
|
+
|
|
226
|
+
- Parameter counts match?
|
|
227
|
+
- Enum options complete?
|
|
228
|
+
- Range boundaries correct?
|
|
229
|
+
- Error codes handled?
|
|
230
|
+
- Optional features accounted for?
|
|
231
|
+
- Default values match docs?
|
|
232
|
+
</claude-commands-template>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Communicate AI-generated content with transparent attribution
|
|
3
|
+
argument-hint: <task-description>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AI-Attributed Communication Command
|
|
7
|
+
|
|
8
|
+
Execute the user's requested task (e.g., posting PR comments, GitHub issue comments, or other communications through various MCPs), but frame the output with clear AI attribution.
|
|
9
|
+
|
|
10
|
+
## General Guidelines
|
|
11
|
+
|
|
12
|
+
### Output Style
|
|
13
|
+
|
|
14
|
+
- **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
|
|
15
|
+
- Write natural, descriptive code without meta-commentary about the development process
|
|
16
|
+
- The code should speak for itself - TDD is the process, not the product
|
|
17
|
+
|
|
18
|
+
## Instructions
|
|
19
|
+
|
|
20
|
+
Arguments: $ARGUMENTS
|
|
21
|
+
|
|
22
|
+
**IMPORTANT Communication Format:**
|
|
23
|
+
|
|
24
|
+
1. **Opening**: Begin with "_Beep boop, I am Claude Code 🤖, my user has reviewed and approved the following written by me:_"
|
|
25
|
+
- Use italics for this line
|
|
26
|
+
- Clearly establishes AI authorship
|
|
27
|
+
|
|
28
|
+
2. **Middle**: Perform the requested task (post comment, create review, etc.)
|
|
29
|
+
- Execute whatever communication task the user requested
|
|
30
|
+
- Write the actual content that accomplishes the user's goal
|
|
31
|
+
|
|
32
|
+
3. **Closing**: End with "_Beep boop, Claude Code 🤖 out!_"
|
|
33
|
+
- Use italics for this line
|
|
34
|
+
- Provides clear closure
|
|
35
|
+
|
|
36
|
+
## Purpose
|
|
37
|
+
|
|
38
|
+
This command ensures transparency about AI usage while maintaining that the user has reviewed and approved the content. It prevents offloading review responsibility to other users while being open about AI assistance.
|
|
39
|
+
|
|
40
|
+
## Examples
|
|
41
|
+
|
|
42
|
+
- Posting a GitHub PR review comment
|
|
43
|
+
- Adding a comment to a GitHub issue
|
|
44
|
+
- Responding to feedback with AI-generated explanations
|
|
45
|
+
- Any communication where AI attribution is valuable
|
|
46
|
+
|
|
47
|
+
## 🛡 Project Rules (Injected into every command)
|
|
48
|
+
|
|
49
|
+
1. **NO BROKEN BUILDS:**
|
|
50
|
+
- Run `pnpm test` before every `/commit`
|
|
51
|
+
- Ensure all tests pass
|
|
52
|
+
- Fix any type errors immediately
|
|
53
|
+
|
|
54
|
+
2. **API DEVELOPMENT:**
|
|
55
|
+
- All new APIs MUST have Zod request/response schemas
|
|
56
|
+
- All APIs MUST be documented in both:
|
|
57
|
+
- OpenAPI spec ([src/lib/openapi/](src/lib/openapi/))
|
|
58
|
+
- API test manifest ([src/app/api-test/api-tests-manifest.json](src/app/api-test/api-tests-manifest.json))
|
|
59
|
+
- Test ALL parameters and edge cases
|
|
60
|
+
- Include code examples and real-world outputs
|
|
61
|
+
|
|
62
|
+
3. **TDD WORKFLOW:**
|
|
63
|
+
- ALWAYS use /red → /green → /refactor cycle
|
|
64
|
+
- NEVER write implementation without failing test first
|
|
65
|
+
- Use /cycle for feature development
|
|
66
|
+
- Use characterization tests for refactoring
|
|
67
|
+
|
|
68
|
+
4. **API KEY MANAGEMENT:**
|
|
69
|
+
- Support three loading methods:
|
|
70
|
+
- Server environment variables
|
|
71
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
72
|
+
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
73
|
+
- Never hardcode API keys
|
|
74
|
+
- Always validate key availability before use
|
|
75
|
+
|
|
76
|
+
5. **COMPREHENSIVE TESTING:**
|
|
77
|
+
- When researching APIs, read actual implementation code
|
|
78
|
+
- Discover ALL possible parameters (not just documented ones)
|
|
79
|
+
- Test with various parameter combinations
|
|
80
|
+
- Document custom headers, query params, request/response schemas
|
|
81
|
+
- Include validation rules and testing notes
|
|
82
|
+
|
|
83
|
+
6. **NO UI BLOAT:**
|
|
84
|
+
- This is an API project with minimal frontend
|
|
85
|
+
- Only keep necessary test/documentation interfaces
|
|
86
|
+
- Delete unused components immediately
|
|
87
|
+
- No unnecessary UI libraries or features
|
|
88
|
+
|
|
89
|
+
7. **DOCUMENTATION:**
|
|
90
|
+
- If you change an API, you MUST update:
|
|
91
|
+
- OpenAPI spec
|
|
92
|
+
- api-tests-manifest.json
|
|
93
|
+
- Code examples
|
|
94
|
+
- Testing notes
|
|
95
|
+
- Document expected behavior and edge cases
|
|
96
|
+
- Include real-world output examples
|