@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
package/commands/README.md
CHANGED
|
@@ -34,14 +34,16 @@
|
|
|
34
34
|
## Hook Architecture (33 Hooks)
|
|
35
35
|
|
|
36
36
|
### SessionStart (2 hooks)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
|
37
|
+
|
|
38
|
+
| Hook | Purpose |
|
|
39
|
+
| ------------------------ | ------------------------------------------- |
|
|
40
|
+
| `session-startup.py` | Inject state at session start |
|
|
40
41
|
| `detect-interruption.py` | Detect interrupted workflows, prompt resume |
|
|
41
42
|
|
|
42
43
|
### UserPromptSubmit (1 hook)
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
|
|
45
|
+
| Hook | Purpose |
|
|
46
|
+
| ------------------------------ | ---------------------------------- |
|
|
45
47
|
| `enforce-external-research.py` | Detect API terms, require research |
|
|
46
48
|
|
|
47
49
|
### PreToolUse - Write/Edit (21 hooks)
|
|
@@ -63,9 +65,9 @@
|
|
|
63
65
|
| `enforce-documentation.py` | 12 | Block until docs updated |
|
|
64
66
|
| `enforce-questions-sourced.py` | 4 | Validate questions come from research |
|
|
65
67
|
| `enforce-schema-from-interview.py` | 6 | Validate schema matches interview |
|
|
66
|
-
| `enforce-freshness.py` |
|
|
68
|
+
| `enforce-freshness.py` | \* | Block if research >7 days old for active endpoint |
|
|
67
69
|
|
|
68
|
-
**UI Workflow Hooks (6)**
|
|
70
|
+
**UI Workflow Hooks (6)** _(NEW in v3.9.0)_
|
|
69
71
|
| Hook | Phase | Purpose |
|
|
70
72
|
|------|-------|---------|
|
|
71
73
|
| `enforce-ui-disambiguation.py` | 1 | Block until component/page type clarified |
|
|
@@ -76,32 +78,36 @@
|
|
|
76
78
|
| `update-ui-showcase.py` | 13 | Auto-create UI Showcase page |
|
|
77
79
|
|
|
78
80
|
### PostToolUse (7 hooks)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
81
|
+
|
|
82
|
+
| Hook | Matcher | Purpose |
|
|
83
|
+
| ---------------------------- | ------------------------- | ------------------------------------------- |
|
|
84
|
+
| `track-tool-use.py` | WebSearch/mcp\_\_context7 | Log research, count turns |
|
|
85
|
+
| `periodic-reground.py` | WebSearch/mcp\_\_context7 | Re-ground every 7 turns |
|
|
86
|
+
| `track-scope-coverage.py` | WebSearch/mcp\_\_context7 | Track implemented vs deferred |
|
|
87
|
+
| `verify-after-green.py` | Bash | Trigger Phase 10 after test pass |
|
|
88
|
+
| `cache-research.py` | Write/Edit | Create research cache files |
|
|
89
|
+
| `generate-manifest-entry.py` | Write/Edit | Auto-generate API documentation |
|
|
90
|
+
| `update-registry.py` | Write/Edit | Update registry.json on workflow completion |
|
|
88
91
|
|
|
89
92
|
### Stop (2 hooks)
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
|
|
94
|
+
| Hook | Purpose |
|
|
95
|
+
| ----------------------- | ------------------------------------------- |
|
|
92
96
|
| `api-workflow-check.py` | Block if phases incomplete, generate output |
|
|
93
|
-
| `session-logger.py`
|
|
97
|
+
| `session-logger.py` | Save session to `.claude/api-sessions/` |
|
|
94
98
|
|
|
95
99
|
## Available Commands
|
|
96
100
|
|
|
97
101
|
### Complete Workflows
|
|
98
102
|
|
|
99
103
|
**`/hustle-api-create [endpoint-name]`**
|
|
104
|
+
|
|
100
105
|
- Runs all 13 phases for NEW API development
|
|
101
106
|
- Loop-back architecture at every checkpoint
|
|
102
107
|
- See [hustle-api-create.md](hustle-api-create.md) for full flow
|
|
103
108
|
|
|
104
|
-
**`/hustle-ui-create`**
|
|
109
|
+
**`/hustle-ui-create`** _(NEW in v3.9.0)_
|
|
110
|
+
|
|
105
111
|
- Creates UI components OR pages with 13-phase workflow
|
|
106
112
|
- Mode selection: Component (Storybook) or Page (Playwright E2E)
|
|
107
113
|
- ShadCN detection and brand guide integration
|
|
@@ -110,6 +116,7 @@
|
|
|
110
116
|
- See [hustle-ui-create.md](hustle-ui-create.md) for full flow
|
|
111
117
|
|
|
112
118
|
**`/hustle-combine [api|ui]`** (v3.8.0)
|
|
119
|
+
|
|
113
120
|
- Combines EXISTING APIs or UI elements from registry
|
|
114
121
|
- Reads from `.claude/registry.json` to present available elements
|
|
115
122
|
- Creates orchestration endpoints
|
|
@@ -118,37 +125,44 @@
|
|
|
118
125
|
### Individual Phases
|
|
119
126
|
|
|
120
127
|
**`/hustle-api-interview [endpoint-name]`**
|
|
128
|
+
|
|
121
129
|
- Questions GENERATED from research findings
|
|
122
130
|
- Different question types: enum, continuous, boolean
|
|
123
131
|
- See [hustle-api-interview.md](hustle-api-interview.md)
|
|
124
132
|
|
|
125
133
|
**`/hustle-api-research [library-or-service]`**
|
|
134
|
+
|
|
126
135
|
- Adaptive propose-approve flow (not shotgun)
|
|
127
136
|
- Research cached with 7-day freshness
|
|
128
137
|
- See [hustle-api-research.md](hustle-api-research.md)
|
|
129
138
|
|
|
130
139
|
**`/hustle-api-verify [endpoint-name]`**
|
|
140
|
+
|
|
131
141
|
- Manual Phase 10 verification
|
|
132
142
|
- Re-read docs, compare to implementation
|
|
133
143
|
- Report gaps, loop back or document omissions
|
|
134
144
|
- See [hustle-api-verify.md](hustle-api-verify.md)
|
|
135
145
|
|
|
136
146
|
**`/hustle-api-env [endpoint-name]`**
|
|
147
|
+
|
|
137
148
|
- Check API keys and environment
|
|
138
149
|
- See [hustle-api-env.md](hustle-api-env.md)
|
|
139
150
|
|
|
140
151
|
**`/hustle-api-status [endpoint-name]`**
|
|
152
|
+
|
|
141
153
|
- Track progress through 13 phases
|
|
142
154
|
- See [hustle-api-status.md](hustle-api-status.md)
|
|
143
155
|
|
|
144
156
|
### Session Management
|
|
145
157
|
|
|
146
158
|
**`/hustle-api-continue [endpoint-name]`**
|
|
159
|
+
|
|
147
160
|
- Resume interrupted workflow from last completed phase
|
|
148
161
|
- Auto-detects in-progress endpoints
|
|
149
162
|
- See [hustle-api-continue.md](hustle-api-continue.md)
|
|
150
163
|
|
|
151
164
|
**`/hustle-api-sessions [--list|--view|--export]`**
|
|
165
|
+
|
|
152
166
|
- Browse saved session logs
|
|
153
167
|
- Export to PDF/HTML
|
|
154
168
|
- See [hustle-api-sessions.md](hustle-api-sessions.md)
|
|
@@ -156,6 +170,7 @@
|
|
|
156
170
|
### TDD Commands
|
|
157
171
|
|
|
158
172
|
From [@wbern/claude-instructions](https://github.com/wbern/claude-instructions):
|
|
173
|
+
|
|
159
174
|
- `/red` - Write ONE failing test
|
|
160
175
|
- `/green` - Minimal implementation to pass
|
|
161
176
|
- `/refactor` - Clean up while tests pass
|
|
@@ -179,7 +194,7 @@ Phase 12: DOCUMENTATION - Update manifests
|
|
|
179
194
|
Phase 13: COMPLETION - Final verification
|
|
180
195
|
```
|
|
181
196
|
|
|
182
|
-
## 13-Phase Flow (UI)
|
|
197
|
+
## 13-Phase Flow (UI) _(NEW in v3.9.0)_
|
|
183
198
|
|
|
184
199
|
```
|
|
185
200
|
Phase 1: DISAMBIGUATION - Component type (atom/molecule/organism) or Page type
|
|
@@ -231,15 +246,18 @@ Default template installed at `.claude/BRAND_GUIDE.md`:
|
|
|
231
246
|
# Project Brand Guide
|
|
232
247
|
|
|
233
248
|
## Colors
|
|
249
|
+
|
|
234
250
|
- Primary: #000000
|
|
235
251
|
- Accent: #0066FF
|
|
236
252
|
- Background: #FFFFFF
|
|
237
253
|
|
|
238
254
|
## Typography
|
|
255
|
+
|
|
239
256
|
- Headings: Inter, sans-serif
|
|
240
257
|
- Body: Inter, sans-serif
|
|
241
258
|
|
|
242
259
|
## Component Styling
|
|
260
|
+
|
|
243
261
|
- Border radius: 8px
|
|
244
262
|
- Focus ring: 2px solid accent
|
|
245
263
|
```
|
|
@@ -257,7 +275,7 @@ Auto-generated at `src/app/ui-showcase/` when first component/page is created:
|
|
|
257
275
|
- Filter tabs: [All] [Components] [Pages]
|
|
258
276
|
- Auto-updates via `update-registry.py` hook
|
|
259
277
|
|
|
260
|
-
## API Showcase
|
|
278
|
+
## API Showcase _(NEW in v3.9.0)_
|
|
261
279
|
|
|
262
280
|
Auto-generated at `src/app/api-showcase/` when first API is created:
|
|
263
281
|
|
|
@@ -270,13 +288,14 @@ Auto-generated at `src/app/api-showcase/` when first API is created:
|
|
|
270
288
|
- Auto-updates via `update-registry.py` hook
|
|
271
289
|
|
|
272
290
|
**Features:**
|
|
291
|
+
|
|
273
292
|
- Reads from `registry.json` APIs and combined sections
|
|
274
293
|
- Interactive API testing from browser
|
|
275
294
|
- Shows request/response in real-time
|
|
276
295
|
- Method badges (GET=green, POST=blue, DELETE=red)
|
|
277
296
|
- Status indicators for each endpoint
|
|
278
297
|
|
|
279
|
-
## Performance Budgets
|
|
298
|
+
## Performance Budgets _(NEW in v3.9.0)_
|
|
280
299
|
|
|
281
300
|
TDD gates that **FAIL tests** if thresholds exceeded, triggering loop-back.
|
|
282
301
|
|
|
@@ -310,19 +329,22 @@ Configured in `.claude/performance-budgets.json`:
|
|
|
310
329
|
```
|
|
311
330
|
|
|
312
331
|
**How it works:**
|
|
332
|
+
|
|
313
333
|
- E2E tests use Chromium DevTools Protocol (CDP) for memory metrics
|
|
314
334
|
- Component tests track re-render counts via wrapper components
|
|
315
335
|
- Tests FAIL if thresholds exceeded → TDD loop-back to fix
|
|
316
336
|
- Core Web Vitals (FCP, LCP) measured via PerformanceObserver
|
|
317
337
|
|
|
318
338
|
**Example E2E test with thresholds:**
|
|
339
|
+
|
|
319
340
|
```typescript
|
|
320
|
-
test(
|
|
341
|
+
test("should have acceptable memory usage", async ({ page }) => {
|
|
321
342
|
const client = await page.context().newCDPSession(page);
|
|
322
|
-
const metrics = await client.send(
|
|
343
|
+
const metrics = await client.send("Performance.getMetrics");
|
|
323
344
|
|
|
324
|
-
const jsHeapSize =
|
|
325
|
-
|
|
345
|
+
const jsHeapSize =
|
|
346
|
+
metrics.metrics.find((m) => m.name === "JSHeapUsedSize")?.value || 0;
|
|
347
|
+
const domNodes = metrics.metrics.find((m) => m.name === "Nodes")?.value || 0;
|
|
326
348
|
|
|
327
349
|
// THRESHOLD: Memory max 50MB - FAIL if exceeded
|
|
328
350
|
expect(jsHeapSize).toBeLessThan(50 * 1024 * 1024);
|
|
@@ -333,6 +355,7 @@ test('should have acceptable memory usage', async ({ page }) => {
|
|
|
333
355
|
```
|
|
334
356
|
|
|
335
357
|
**Example component test with re-render tracking:**
|
|
358
|
+
|
|
336
359
|
```typescript
|
|
337
360
|
it('should not re-render excessively on mount', () => {
|
|
338
361
|
let renderCount = 0;
|
|
@@ -363,7 +386,10 @@ All progress tracked in `.claude/api-dev-state.json`:
|
|
|
363
386
|
"status": "complete",
|
|
364
387
|
"turn_count": 23,
|
|
365
388
|
"phases": {
|
|
366
|
-
"disambiguation": {
|
|
389
|
+
"disambiguation": {
|
|
390
|
+
"status": "complete",
|
|
391
|
+
"phase_exit_confirmed": true
|
|
392
|
+
},
|
|
367
393
|
"scope": { "status": "complete", "phase_exit_confirmed": true },
|
|
368
394
|
"research_initial": { "status": "complete" },
|
|
369
395
|
"interview": { "status": "complete", "decisions": {} },
|
|
@@ -427,6 +453,7 @@ Sessions saved in `.claude/api-sessions/`:
|
|
|
427
453
|
When Phase 12 completes, `generate-manifest-entry.py` automatically generates:
|
|
428
454
|
|
|
429
455
|
### Comprehensive Curl Examples
|
|
456
|
+
|
|
430
457
|
- **Minimal** - Required parameters only
|
|
431
458
|
- **Full** - All parameters
|
|
432
459
|
- **With Authentication** - API key headers
|
|
@@ -436,6 +463,7 @@ When Phase 12 completes, `generate-manifest-entry.py` automatically generates:
|
|
|
436
463
|
- **Boundary Values** - Min/max values
|
|
437
464
|
|
|
438
465
|
### Complete Test Cases
|
|
466
|
+
|
|
439
467
|
- **Success Cases** - Required only, all fields, alternatives
|
|
440
468
|
- **Enum Validation** - Each valid value + invalid
|
|
441
469
|
- **Required Fields** - Missing each required field
|
|
@@ -445,6 +473,7 @@ When Phase 12 completes, `generate-manifest-entry.py` automatically generates:
|
|
|
445
473
|
- **Edge Cases** - Empty body, null values, extra fields
|
|
446
474
|
|
|
447
475
|
### Parameter Documentation
|
|
476
|
+
|
|
448
477
|
- All required and optional parameters
|
|
449
478
|
- Types with validation rules
|
|
450
479
|
- Enum values with descriptions
|
|
@@ -454,11 +483,13 @@ When Phase 12 completes, `generate-manifest-entry.py` automatically generates:
|
|
|
454
483
|
## Quick Start
|
|
455
484
|
|
|
456
485
|
### Automated
|
|
486
|
+
|
|
457
487
|
```bash
|
|
458
488
|
/hustle-api-create my-endpoint
|
|
459
489
|
```
|
|
460
490
|
|
|
461
491
|
### Manual Step-by-Step
|
|
492
|
+
|
|
462
493
|
```bash
|
|
463
494
|
/hustle-api-research [library] # Initial research
|
|
464
495
|
/hustle-api-interview [endpoint] # Questions from research
|
|
@@ -477,18 +508,20 @@ npx @hustle-together/api-dev-tools --scope=project
|
|
|
477
508
|
```
|
|
478
509
|
|
|
479
510
|
Installs:
|
|
480
|
-
|
|
511
|
+
|
|
512
|
+
- Commands in `.claude/commands/` (10 hustle-\* commands)
|
|
481
513
|
- Hooks in `.claude/hooks/` (33 hooks)
|
|
482
514
|
- Settings in `.claude/settings.json`
|
|
483
515
|
- State template in `.claude/api-dev-state.json`
|
|
484
516
|
- Registry in `.claude/registry.json`
|
|
485
|
-
- Brand guide in `.claude/BRAND_GUIDE.md`
|
|
486
|
-
- Performance budgets in `.claude/performance-budgets.json`
|
|
517
|
+
- Brand guide in `.claude/BRAND_GUIDE.md` _(NEW in v3.9.0)_
|
|
518
|
+
- Performance budgets in `.claude/performance-budgets.json` _(NEW in v3.9.0)_
|
|
487
519
|
- Research index in `.claude/research/index.json`
|
|
488
520
|
|
|
489
521
|
### File Structures (UI)
|
|
490
522
|
|
|
491
523
|
**Component Structure:**
|
|
524
|
+
|
|
492
525
|
```
|
|
493
526
|
src/components/Button/
|
|
494
527
|
├── Button.tsx # Component implementation
|
|
@@ -499,6 +532,7 @@ src/components/Button/
|
|
|
499
532
|
```
|
|
500
533
|
|
|
501
534
|
**Page Structure:**
|
|
535
|
+
|
|
502
536
|
```
|
|
503
537
|
src/app/dashboard/
|
|
504
538
|
├── page.tsx # Page component
|
|
@@ -512,6 +546,7 @@ tests/e2e/
|
|
|
512
546
|
### Team-Wide
|
|
513
547
|
|
|
514
548
|
Add to `package.json`:
|
|
549
|
+
|
|
515
550
|
```json
|
|
516
551
|
{
|
|
517
552
|
"scripts": {
|
package/commands/add-command.md
CHANGED
|
@@ -54,7 +54,7 @@ Bash command output: (exclamation)git status(backticks)
|
|
|
54
54
|
**Bash Commands (exclamation prefix)**: Limited to current working directory only.
|
|
55
55
|
|
|
56
56
|
- ✅ Works: `! + backtick + git status + backtick` (in project dir)
|
|
57
|
-
- ❌ Blocked: `! + backtick + ls /outside/project + backtick` (outside project)
|
|
57
|
+
- ❌ Blocked: `! + backtick + ls /outside/project + backtick` (outside project)
|
|
58
58
|
- ❌ Blocked: `! + backtick + pwd + backtick` (if referencing dirs outside project)
|
|
59
59
|
|
|
60
60
|
**File References (`@` prefix)**: No directory restrictions.
|
|
@@ -90,6 +90,7 @@ Compare @src/old.js with @src/new.js and explain differences
|
|
|
90
90
|
---
|
|
91
91
|
allowed-tools: Bash(git status:*), Bash(git branch:*), Bash(git log:*)
|
|
92
92
|
---
|
|
93
|
+
|
|
93
94
|
Current status: (!)git status(`)
|
|
94
95
|
Current branch: (!)git branch --show-current(`)
|
|
95
96
|
Recent commits: (!)git log --oneline -5(`)
|
|
@@ -123,7 +124,8 @@ echo "Ask GPT-5 about: $ARGUMENTS" > ~/.claude/commands/ai/gpt5.md
|
|
|
123
124
|
### Safe Commands (No Security Issues)
|
|
124
125
|
|
|
125
126
|
```markdown
|
|
126
|
-
# System prompt editor (file reference only)
|
|
127
|
+
# System prompt editor (file reference only)
|
|
128
|
+
|
|
127
129
|
(@)path/to/system/prompt.md
|
|
128
130
|
|
|
129
131
|
Edit your system prompt above.
|
|
@@ -135,6 +137,7 @@ Edit your system prompt above.
|
|
|
135
137
|
---
|
|
136
138
|
allowed-tools: Bash(git status:*), Bash(npm list:*)
|
|
137
139
|
---
|
|
140
|
+
|
|
138
141
|
Current git status: (!)git status(`)
|
|
139
142
|
Package info: (!)npm list --depth=0(`)
|
|
140
143
|
|
|
@@ -145,6 +148,7 @@ Review project state and suggest next steps.
|
|
|
145
148
|
|
|
146
149
|
```markdown
|
|
147
150
|
# Compare config files
|
|
151
|
+
|
|
148
152
|
Compare (@)path/to/system.md with (@)project/config.md
|
|
149
153
|
|
|
150
154
|
Show differences and suggest improvements.
|
|
@@ -156,7 +160,6 @@ After creating: `/<command-name> [arguments]`
|
|
|
156
160
|
|
|
157
161
|
Example: `/review` or `/ai:gpt5 "explain this code"`
|
|
158
162
|
|
|
159
|
-
|
|
160
163
|
## 🛡 Project Rules (Injected into every command)
|
|
161
164
|
|
|
162
165
|
1. **NO BROKEN BUILDS:**
|
|
@@ -181,7 +184,7 @@ Example: `/review` or `/ai:gpt5 "explain this code"`
|
|
|
181
184
|
4. **API KEY MANAGEMENT:**
|
|
182
185
|
- Support three loading methods:
|
|
183
186
|
- Server environment variables
|
|
184
|
-
-
|
|
187
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
185
188
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
186
189
|
- Never hardcode API keys
|
|
187
190
|
- Always validate key availability before use
|
|
@@ -206,4 +209,4 @@ Example: `/review` or `/ai:gpt5 "explain this code"`
|
|
|
206
209
|
- Code examples
|
|
207
210
|
- Testing notes
|
|
208
211
|
- Document expected behavior and edge cases
|
|
209
|
-
- Include real-world output examples
|
|
212
|
+
- Include real-world output examples
|
package/commands/beepboop.md
CHANGED
|
@@ -21,7 +21,7 @@ Arguments: $ARGUMENTS
|
|
|
21
21
|
|
|
22
22
|
**IMPORTANT Communication Format:**
|
|
23
23
|
|
|
24
|
-
1. **Opening**: Begin with "
|
|
24
|
+
1. **Opening**: Begin with "_Beep boop, I am Claude Code 🤖, my user has reviewed and approved the following written by me:_"
|
|
25
25
|
- Use italics for this line
|
|
26
26
|
- Clearly establishes AI authorship
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ Arguments: $ARGUMENTS
|
|
|
29
29
|
- Execute whatever communication task the user requested
|
|
30
30
|
- Write the actual content that accomplishes the user's goal
|
|
31
31
|
|
|
32
|
-
3. **Closing**: End with "
|
|
32
|
+
3. **Closing**: End with "_Beep boop, Claude Code 🤖 out!_"
|
|
33
33
|
- Use italics for this line
|
|
34
34
|
- Provides clear closure
|
|
35
35
|
|
|
@@ -44,7 +44,6 @@ This command ensures transparency about AI usage while maintaining that the user
|
|
|
44
44
|
- Responding to feedback with AI-generated explanations
|
|
45
45
|
- Any communication where AI attribution is valuable
|
|
46
46
|
|
|
47
|
-
|
|
48
47
|
## 🛡 Project Rules (Injected into every command)
|
|
49
48
|
|
|
50
49
|
1. **NO BROKEN BUILDS:**
|
|
@@ -69,7 +68,7 @@ This command ensures transparency about AI usage while maintaining that the user
|
|
|
69
68
|
4. **API KEY MANAGEMENT:**
|
|
70
69
|
- Support three loading methods:
|
|
71
70
|
- Server environment variables
|
|
72
|
-
-
|
|
71
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
73
72
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
74
73
|
- Never hardcode API keys
|
|
75
74
|
- Always validate key availability before use
|
|
@@ -94,4 +93,4 @@ This command ensures transparency about AI usage while maintaining that the user
|
|
|
94
93
|
- Code examples
|
|
95
94
|
- Testing notes
|
|
96
95
|
- Document expected behavior and edge cases
|
|
97
|
-
- Include real-world output examples
|
|
96
|
+
- Include real-world output examples
|
package/commands/busycommit.md
CHANGED
|
@@ -59,7 +59,6 @@ git add src/user-service.ts
|
|
|
59
59
|
git commit -m "refactor: extract user lookup to helper"
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
|
|
63
62
|
## 🛡 Project Rules (Injected into every command)
|
|
64
63
|
|
|
65
64
|
1. **NO BROKEN BUILDS:**
|
|
@@ -84,7 +83,7 @@ git commit -m "refactor: extract user lookup to helper"
|
|
|
84
83
|
4. **API KEY MANAGEMENT:**
|
|
85
84
|
- Support three loading methods:
|
|
86
85
|
- Server environment variables
|
|
87
|
-
-
|
|
86
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
88
87
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
89
88
|
- Never hardcode API keys
|
|
90
89
|
- Always validate key availability before use
|
|
@@ -109,4 +108,4 @@ git commit -m "refactor: extract user lookup to helper"
|
|
|
109
108
|
- Code examples
|
|
110
109
|
- Testing notes
|
|
111
110
|
- Document expected behavior and edge cases
|
|
112
|
-
- Include real-world output examples
|
|
111
|
+
- Include real-world output examples
|
package/commands/commit.md
CHANGED
|
@@ -30,7 +30,6 @@ git add <files>
|
|
|
30
30
|
git commit -m "feat(#123): add validation to user input form"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
|
|
34
33
|
## 🛡 Project Rules (Injected into every command)
|
|
35
34
|
|
|
36
35
|
1. **NO BROKEN BUILDS:**
|
|
@@ -55,7 +54,7 @@ git commit -m "feat(#123): add validation to user input form"
|
|
|
55
54
|
4. **API KEY MANAGEMENT:**
|
|
56
55
|
- Support three loading methods:
|
|
57
56
|
- Server environment variables
|
|
58
|
-
-
|
|
57
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
59
58
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
60
59
|
- Never hardcode API keys
|
|
61
60
|
- Always validate key availability before use
|
|
@@ -80,4 +79,4 @@ git commit -m "feat(#123): add validation to user input form"
|
|
|
80
79
|
- Code examples
|
|
81
80
|
- Testing notes
|
|
82
81
|
- Document expected behavior and edge cases
|
|
83
|
-
- Include real-world output examples
|
|
82
|
+
- Include real-world output examples
|
package/commands/cycle.md
CHANGED
|
@@ -24,7 +24,6 @@ $ARGUMENTS
|
|
|
24
24
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
25
25
|
|
|
26
26
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
27
|
-
|
|
28
27
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
29
28
|
- Only one test at a time - this is critical for TDD discipline
|
|
30
29
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -34,7 +33,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
34
33
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
35
34
|
|
|
36
35
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
37
|
-
|
|
38
36
|
- Implement only what's needed for the current failing test
|
|
39
37
|
- No anticipatory coding or extra features
|
|
40
38
|
- Address the specific failure message
|
|
@@ -48,12 +46,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
48
46
|
### Core Violations
|
|
49
47
|
|
|
50
48
|
1. **Multiple Test Addition**
|
|
51
|
-
|
|
52
49
|
- Adding more than one new test at once
|
|
53
50
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
54
51
|
|
|
55
52
|
2. **Over-Implementation**
|
|
56
|
-
|
|
57
53
|
- Code that exceeds what's needed to pass the current failing test
|
|
58
54
|
- Adding untested features, methods, or error handling
|
|
59
55
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
90
86
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|
package/commands/gap.md
CHANGED
|
@@ -33,7 +33,6 @@ If there are no gaps, confirm that everything discussed has been addressed.
|
|
|
33
33
|
Additional info:
|
|
34
34
|
$ARGUMENTS
|
|
35
35
|
|
|
36
|
-
|
|
37
36
|
## 🛡 Project Rules (Injected into every command)
|
|
38
37
|
|
|
39
38
|
1. **NO BROKEN BUILDS:**
|
|
@@ -58,7 +57,7 @@ $ARGUMENTS
|
|
|
58
57
|
4. **API KEY MANAGEMENT:**
|
|
59
58
|
- Support three loading methods:
|
|
60
59
|
- Server environment variables
|
|
61
|
-
-
|
|
60
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
62
61
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
63
62
|
- Never hardcode API keys
|
|
64
63
|
- Always validate key availability before use
|
|
@@ -83,4 +82,4 @@ $ARGUMENTS
|
|
|
83
82
|
- Code examples
|
|
84
83
|
- Testing notes
|
|
85
84
|
- Document expected behavior and edge cases
|
|
86
|
-
- Include real-world output examples
|
|
85
|
+
- Include real-world output examples
|
package/commands/green.md
CHANGED
|
@@ -24,7 +24,6 @@ $ARGUMENTS
|
|
|
24
24
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
25
25
|
|
|
26
26
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
27
|
-
|
|
28
27
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
29
28
|
- Only one test at a time - this is critical for TDD discipline
|
|
30
29
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -34,7 +33,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
34
33
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
35
34
|
|
|
36
35
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
37
|
-
|
|
38
36
|
- Implement only what's needed for the current failing test
|
|
39
37
|
- No anticipatory coding or extra features
|
|
40
38
|
- Address the specific failure message
|
|
@@ -48,12 +46,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
48
46
|
### Core Violations
|
|
49
47
|
|
|
50
48
|
1. **Multiple Test Addition**
|
|
51
|
-
|
|
52
49
|
- Adding more than one new test at once
|
|
53
50
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
54
51
|
|
|
55
52
|
2. **Over-Implementation**
|
|
56
|
-
|
|
57
53
|
- Code that exceeds what's needed to pass the current failing test
|
|
58
54
|
- Adding untested features, methods, or error handling
|
|
59
55
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
90
86
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
Resume an interrupted API development workflow from where it left off.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
|
+
|
|
6
7
|
```
|
|
7
8
|
/hustle-api-continue [endpoint-name]
|
|
8
9
|
```
|
|
9
10
|
|
|
10
11
|
## Arguments
|
|
12
|
+
|
|
11
13
|
- `endpoint-name` (optional): The endpoint to resume. If not provided, will show available interrupted workflows.
|
|
12
14
|
|
|
13
15
|
## What This Command Does
|
|
@@ -40,6 +42,7 @@ Resume an interrupted API development workflow from where it left off.
|
|
|
40
42
|
## Output
|
|
41
43
|
|
|
42
44
|
When resuming, you'll see:
|
|
45
|
+
|
|
43
46
|
- Summary of completed phases
|
|
44
47
|
- Current phase to resume
|
|
45
48
|
- Key interview decisions
|
|
@@ -142,12 +145,12 @@ SAVE state
|
|
|
142
145
|
|
|
143
146
|
## Error Handling
|
|
144
147
|
|
|
145
|
-
| Error
|
|
146
|
-
|
|
148
|
+
| Error | Resolution |
|
|
149
|
+
| ------------------------ | ------------------------------------------------------------------------------------------ |
|
|
147
150
|
| No interrupted workflows | Show message: "No interrupted workflows found. Use /hustle-api-create to start a new one." |
|
|
148
|
-
| Endpoint not found
|
|
149
|
-
| Research cache stale
|
|
150
|
-
| State file missing
|
|
151
|
+
| Endpoint not found | Show available endpoints and ask user to choose |
|
|
152
|
+
| Research cache stale | Warn user and offer to re-run research phases |
|
|
153
|
+
| State file missing | Error: "No state file found. Use /hustle-api-create to start a new workflow." |
|
|
151
154
|
|
|
152
155
|
---
|
|
153
156
|
|