@hustle-together/api-dev-tools 2.0.6 ā 3.0.0
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/README.md +283 -478
- package/bin/cli.js +55 -11
- package/commands/README.md +124 -251
- package/commands/api-create.md +318 -136
- package/commands/api-interview.md +252 -256
- package/commands/api-research.md +209 -234
- package/commands/api-verify.md +231 -0
- package/demo/audio/generate-all-narrations.js +516 -0
- package/demo/audio/generate-voice-previews.js +140 -0
- package/demo/audio/narration-adam-timing.json +3666 -0
- package/demo/audio/narration-adam.mp3 +0 -0
- package/demo/audio/narration-creature-timing.json +3666 -0
- package/demo/audio/narration-creature.mp3 +0 -0
- package/demo/audio/narration-gaming-timing.json +3666 -0
- package/demo/audio/narration-gaming.mp3 +0 -0
- package/demo/audio/narration-hope-timing.json +3666 -0
- package/demo/audio/narration-hope.mp3 +0 -0
- package/demo/audio/narration-mark-timing.json +3666 -0
- package/demo/audio/narration-mark.mp3 +0 -0
- package/demo/audio/previews/manifest.json +30 -0
- package/demo/audio/previews/preview-creature.mp3 +0 -0
- package/demo/audio/previews/preview-gaming.mp3 +0 -0
- package/demo/audio/previews/preview-hope.mp3 +0 -0
- package/demo/audio/previews/preview-mark.mp3 +0 -0
- package/demo/audio/voices-manifest.json +50 -0
- package/demo/hustle-together/blog/gemini-vs-claude-widgets.html +30 -28
- package/demo/hustle-together/blog/interview-driven-api-development.html +37 -23
- package/demo/hustle-together/index.html +142 -109
- package/demo/workflow-demo.html +1054 -544
- package/hooks/periodic-reground.py +154 -0
- package/hooks/session-startup.py +151 -0
- package/hooks/track-tool-use.py +109 -17
- package/hooks/verify-after-green.py +152 -0
- package/package.json +2 -2
- package/templates/api-dev-state.json +42 -7
- package/templates/research-index.json +6 -0
- package/templates/settings.json +23 -0
package/bin/cli.js
CHANGED
|
@@ -65,14 +65,19 @@ function verifyInstallation(claudeDir, hooksDir) {
|
|
|
65
65
|
{ path: path.join(claudeDir, 'commands'), name: 'Commands directory' },
|
|
66
66
|
{ path: path.join(claudeDir, 'settings.json'), name: 'Settings file' },
|
|
67
67
|
{ path: path.join(claudeDir, 'api-dev-state.json'), name: 'State file' },
|
|
68
|
+
{ path: path.join(claudeDir, 'research'), name: 'Research cache directory' },
|
|
69
|
+
{ path: path.join(claudeDir, 'research', 'index.json'), name: 'Research index' },
|
|
68
70
|
];
|
|
69
71
|
|
|
70
|
-
// Add hook checks if hooks directory exists
|
|
72
|
+
// Add hook checks if hooks directory exists (v3.0 has 9 hooks)
|
|
71
73
|
if (fs.existsSync(hooksDir)) {
|
|
72
74
|
checks.push(
|
|
73
75
|
{ path: path.join(hooksDir, 'enforce-research.py'), name: 'enforce-research.py' },
|
|
74
76
|
{ path: path.join(hooksDir, 'track-tool-use.py'), name: 'track-tool-use.py' },
|
|
75
|
-
{ path: path.join(hooksDir, 'api-workflow-check.py'), name: 'api-workflow-check.py' }
|
|
77
|
+
{ path: path.join(hooksDir, 'api-workflow-check.py'), name: 'api-workflow-check.py' },
|
|
78
|
+
{ path: path.join(hooksDir, 'session-startup.py'), name: 'session-startup.py' },
|
|
79
|
+
{ path: path.join(hooksDir, 'periodic-reground.py'), name: 'periodic-reground.py' },
|
|
80
|
+
{ path: path.join(hooksDir, 'verify-after-green.py'), name: 'verify-after-green.py' }
|
|
76
81
|
);
|
|
77
82
|
}
|
|
78
83
|
|
|
@@ -233,6 +238,35 @@ function main() {
|
|
|
233
238
|
}
|
|
234
239
|
}
|
|
235
240
|
|
|
241
|
+
// ========================================
|
|
242
|
+
// 4b. Install Research Cache Structure (v3.0)
|
|
243
|
+
// ========================================
|
|
244
|
+
const researchDir = path.join(claudeDir, 'research');
|
|
245
|
+
const researchIndexSource = path.join(sourceTemplatesDir, 'research-index.json');
|
|
246
|
+
const researchIndexDest = path.join(researchDir, 'index.json');
|
|
247
|
+
|
|
248
|
+
log('\nš Setting up research cache:', 'cyan');
|
|
249
|
+
|
|
250
|
+
if (!fs.existsSync(researchDir)) {
|
|
251
|
+
try {
|
|
252
|
+
fs.mkdirSync(researchDir, { recursive: true });
|
|
253
|
+
log(' ā
Created .claude/research/ directory', 'green');
|
|
254
|
+
} catch (error) {
|
|
255
|
+
log(` ā Failed to create research directory: ${error.message}`, 'red');
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (fs.existsSync(researchIndexSource) && !fs.existsSync(researchIndexDest)) {
|
|
260
|
+
try {
|
|
261
|
+
fs.copyFileSync(researchIndexSource, researchIndexDest);
|
|
262
|
+
log(' ā
Created research/index.json for freshness tracking', 'green');
|
|
263
|
+
} catch (error) {
|
|
264
|
+
log(` ā Failed to create research index: ${error.message}`, 'red');
|
|
265
|
+
}
|
|
266
|
+
} else if (fs.existsSync(researchIndexDest)) {
|
|
267
|
+
log(' ā¹ļø Research index already exists (preserved)', 'blue');
|
|
268
|
+
}
|
|
269
|
+
|
|
236
270
|
// ========================================
|
|
237
271
|
// 5. Install MCP Servers via CLI (Context7, GitHub)
|
|
238
272
|
// ========================================
|
|
@@ -272,28 +306,38 @@ function main() {
|
|
|
272
306
|
// Success Summary
|
|
273
307
|
// ========================================
|
|
274
308
|
log('\n' + 'ā'.repeat(60), 'green');
|
|
275
|
-
log('š API Development Tools installed successfully!', 'green');
|
|
309
|
+
log('š API Development Tools v3.0 installed successfully!', 'green');
|
|
276
310
|
log('ā'.repeat(60) + '\n', 'green');
|
|
277
311
|
|
|
278
312
|
log('š What was installed:', 'bright');
|
|
279
313
|
log(' Commands: .claude/commands/*.md', 'blue');
|
|
280
|
-
log(' Hooks: .claude/hooks/*.py', 'blue');
|
|
314
|
+
log(' Hooks: .claude/hooks/*.py (9 hooks)', 'blue');
|
|
281
315
|
log(' Settings: .claude/settings.json', 'blue');
|
|
282
316
|
log(' State: .claude/api-dev-state.json', 'blue');
|
|
317
|
+
log(' Research: .claude/research/ (with freshness tracking)', 'blue');
|
|
283
318
|
log(' MCP: context7, github (via claude mcp add)', 'blue');
|
|
284
319
|
|
|
320
|
+
log('\nš New in v3.0:', 'bright');
|
|
321
|
+
log(' ⢠Phase 0: Pre-research disambiguation', 'cyan');
|
|
322
|
+
log(' ⢠Phase 9: Verify (re-research after tests pass)', 'cyan');
|
|
323
|
+
log(' ⢠Adaptive research (propose-approve, not shotgun)', 'cyan');
|
|
324
|
+
log(' ⢠Questions generated FROM research findings', 'cyan');
|
|
325
|
+
log(' ⢠7-turn re-grounding (prevents context dilution)', 'cyan');
|
|
326
|
+
log(' ⢠Research freshness (7-day cache validity)', 'cyan');
|
|
327
|
+
|
|
285
328
|
log('\nš Enforcement Features:', 'bright');
|
|
286
329
|
log(' ⢠Research MUST happen before code writing', 'cyan');
|
|
287
|
-
log(' ⢠All research activity
|
|
288
|
-
log(' ā¢
|
|
289
|
-
log(' ā¢
|
|
330
|
+
log(' ⢠All research activity logged with turn counting', 'cyan');
|
|
331
|
+
log(' ⢠Verification triggered after tests pass', 'cyan');
|
|
332
|
+
log(' ⢠Periodic re-grounding every 7 turns', 'cyan');
|
|
290
333
|
|
|
291
334
|
log('\nš Available Commands:', 'bright');
|
|
292
|
-
log(' /api-create [endpoint] - Complete
|
|
293
|
-
log(' /api-interview [endpoint] -
|
|
294
|
-
log(' /api-research [library] -
|
|
335
|
+
log(' /api-create [endpoint] - Complete 12-phase workflow', 'blue');
|
|
336
|
+
log(' /api-interview [endpoint] - Questions FROM research', 'blue');
|
|
337
|
+
log(' /api-research [library] - Adaptive propose-approve research', 'blue');
|
|
338
|
+
log(' /api-verify [endpoint] - Manual Phase 9 verification', 'blue');
|
|
295
339
|
log(' /api-env [endpoint] - Check API keys and environment', 'blue');
|
|
296
|
-
log(' /api-status [endpoint] - Track
|
|
340
|
+
log(' /api-status [endpoint] - Track 12-phase progress', 'blue');
|
|
297
341
|
|
|
298
342
|
log('\nš Quick Start:', 'bright');
|
|
299
343
|
log(' /api-create my-endpoint', 'blue');
|
package/commands/README.md
CHANGED
|
@@ -1,275 +1,168 @@
|
|
|
1
|
-
# API Development Slash Commands
|
|
1
|
+
# API Development Slash Commands v3.0
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Interview-driven, research-first API development workflow with continuous verification loops**
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What's New in v3.0
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- **Phase 0: Disambiguation** - Search variations before research
|
|
8
|
+
- **Phase 9: Verify** - Re-research after tests pass to catch memory errors
|
|
9
|
+
- **Adaptive Research** - Propose searches based on context, not shotgun
|
|
10
|
+
- **Questions FROM Research** - Interview generates questions from discovered params
|
|
11
|
+
- **7-Turn Re-grounding** - Periodic context injection prevents dilution
|
|
12
|
+
- **Research Freshness** - 7-day cache with staleness warnings
|
|
8
13
|
|
|
9
|
-
##
|
|
14
|
+
## Hook Architecture (9 Hooks)
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
|
14
|
-
|
|
15
|
-
| `enforce-research.py` | PreToolUse
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- **All research is logged** - WebSearch, WebFetch, Context7 calls tracked in state file
|
|
23
|
-
- **Progress is visible** - Check `.claude/api-dev-state.json` anytime
|
|
24
|
-
- **Workflow completion verified** - Cannot stop until TDD phases complete
|
|
25
|
-
|
|
26
|
-
### Check Progress
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
# View current state
|
|
30
|
-
cat .claude/api-dev-state.json | jq '.phases'
|
|
31
|
-
|
|
32
|
-
# Or use the status command
|
|
33
|
-
/api-status
|
|
34
|
-
```
|
|
16
|
+
| Hook | Event | Purpose |
|
|
17
|
+
|------|-------|---------|
|
|
18
|
+
| `session-startup.py` | SessionStart | Inject state at session start |
|
|
19
|
+
| `enforce-external-research.py` | UserPromptSubmit | Detect API terms, require research |
|
|
20
|
+
| `enforce-research.py` | PreToolUse | Block writes until research done |
|
|
21
|
+
| `enforce-interview.py` | PreToolUse | Inject interview decisions |
|
|
22
|
+
| `verify-implementation.py` | PreToolUse | Require test file before route |
|
|
23
|
+
| `track-tool-use.py` | PostToolUse | Log research, count turns |
|
|
24
|
+
| `periodic-reground.py` | PostToolUse | Re-ground every 7 turns |
|
|
25
|
+
| `verify-after-green.py` | PostToolUse | Trigger Phase 9 after test pass |
|
|
26
|
+
| `api-workflow-check.py` | Stop | Block if phases incomplete |
|
|
35
27
|
|
|
36
28
|
## Available Commands
|
|
37
29
|
|
|
38
|
-
###
|
|
30
|
+
### Complete Workflow
|
|
39
31
|
|
|
40
32
|
**`/api-create [endpoint-name]`**
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
33
|
+
- Runs all 12 phases automatically
|
|
34
|
+
- Loop-back architecture at every checkpoint
|
|
35
|
+
- See [api-create.md](api-create.md) for full flow
|
|
44
36
|
|
|
45
|
-
###
|
|
37
|
+
### Individual Phases
|
|
46
38
|
|
|
47
39
|
**`/api-interview [endpoint-name]`**
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
- **Output:** `/src/v2/docs/endpoints/[endpoint-name].md`
|
|
40
|
+
- Questions GENERATED from research findings
|
|
41
|
+
- Different question types: enum, continuous, boolean
|
|
42
|
+
- See [api-interview.md](api-interview.md)
|
|
52
43
|
|
|
53
44
|
**`/api-research [library-or-service]`**
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
-
|
|
45
|
+
- Adaptive propose-approve flow (not shotgun)
|
|
46
|
+
- Research cached with 7-day freshness
|
|
47
|
+
- See [api-research.md](api-research.md)
|
|
48
|
+
|
|
49
|
+
**`/api-verify [endpoint-name]`** (NEW)
|
|
50
|
+
- Manual Phase 9 verification
|
|
51
|
+
- Re-read docs, compare to implementation
|
|
52
|
+
- Report gaps, loop back or document omissions
|
|
53
|
+
- See [api-verify.md](api-verify.md)
|
|
59
54
|
|
|
60
55
|
**`/api-env [endpoint-name]`**
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
- Provides setup instructions for missing keys
|
|
64
|
-
- **Output:** Terminal report + action items
|
|
56
|
+
- Check API keys and environment
|
|
57
|
+
- See [api-env.md](api-env.md)
|
|
65
58
|
|
|
66
|
-
**`/api-status [endpoint-name]`**
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
- Updates V2 implementation status document
|
|
70
|
-
- **Output:** Progress report
|
|
59
|
+
**`/api-status [endpoint-name]`**
|
|
60
|
+
- Track progress through 12 phases
|
|
61
|
+
- See [api-status.md](api-status.md)
|
|
71
62
|
|
|
72
|
-
###
|
|
63
|
+
### TDD Commands
|
|
73
64
|
|
|
74
|
-
|
|
65
|
+
From [@wbern/claude-instructions](https://github.com/wbern/claude-instructions):
|
|
75
66
|
- `/red` - Write ONE failing test
|
|
76
67
|
- `/green` - Minimal implementation to pass
|
|
77
|
-
- `/refactor` - Clean up
|
|
78
|
-
- `/cycle [description]` - Full Red ā Green ā Refactor
|
|
68
|
+
- `/refactor` - Clean up while tests pass
|
|
69
|
+
- `/cycle [description]` - Full Red ā Green ā Refactor
|
|
79
70
|
|
|
80
|
-
##
|
|
71
|
+
## 12-Phase Flow
|
|
81
72
|
|
|
82
|
-
### Option 1: Fully Automated
|
|
83
|
-
```bash
|
|
84
|
-
/api-create generate-css
|
|
85
73
|
```
|
|
86
|
-
|
|
87
|
-
1
|
|
88
|
-
2
|
|
89
|
-
3
|
|
90
|
-
4
|
|
91
|
-
5
|
|
92
|
-
6
|
|
93
|
-
7
|
|
94
|
-
8
|
|
95
|
-
9
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/api-interview generate-css
|
|
101
|
-
# (Answer 20 questions about purpose, usage, requirements)
|
|
102
|
-
|
|
103
|
-
# Phase 2: Research
|
|
104
|
-
/api-research google-generative-ai
|
|
105
|
-
# (Discovers all Gemini SDK parameters)
|
|
106
|
-
|
|
107
|
-
# Phase 3: Environment
|
|
108
|
-
/api-env generate-css
|
|
109
|
-
# (Verifies GOOGLE_GENERATIVE_AI_API_KEY exists)
|
|
110
|
-
|
|
111
|
-
# Phase 4: TDD Implementation
|
|
112
|
-
/red
|
|
113
|
-
# (Write failing tests based on interview + research)
|
|
114
|
-
|
|
115
|
-
/green
|
|
116
|
-
# (Implement route handler with Zod schemas)
|
|
74
|
+
Phase 0: DISAMBIGUATION - Clarify ambiguous terms
|
|
75
|
+
Phase 1: SCOPE - Confirm understanding
|
|
76
|
+
Phase 2: INITIAL RESEARCH - 2-3 targeted searches
|
|
77
|
+
Phase 3: INTERVIEW - Questions FROM research
|
|
78
|
+
Phase 4: DEEP RESEARCH - Adaptive propose-approve
|
|
79
|
+
Phase 5: SCHEMA - Zod from research + interview
|
|
80
|
+
Phase 6: ENVIRONMENT - Verify API keys
|
|
81
|
+
Phase 7: TDD RED - Write failing tests
|
|
82
|
+
Phase 8: TDD GREEN - Minimal implementation
|
|
83
|
+
Phase 9: VERIFY - Re-research, find gaps
|
|
84
|
+
Phase 10: TDD REFACTOR - Clean up code
|
|
85
|
+
Phase 11: DOCUMENTATION - Update manifests
|
|
86
|
+
Phase 12: COMPLETION - Final verification
|
|
87
|
+
```
|
|
117
88
|
|
|
118
|
-
|
|
119
|
-
# (Clean up, extract patterns, improve code)
|
|
89
|
+
## State File
|
|
120
90
|
|
|
121
|
-
|
|
122
|
-
# (Update api-tests-manifest.json, OpenAPI spec, status doc)
|
|
91
|
+
All progress tracked in `.claude/api-dev-state.json`:
|
|
123
92
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"version": "3.0.0",
|
|
96
|
+
"endpoint": "brandfetch",
|
|
97
|
+
"turn_count": 23,
|
|
98
|
+
"phases": {
|
|
99
|
+
"disambiguation": { "status": "complete" },
|
|
100
|
+
"scope": { "status": "complete" },
|
|
101
|
+
"research_initial": { "status": "complete" },
|
|
102
|
+
"interview": { "status": "complete", "decisions": {...} },
|
|
103
|
+
"research_deep": {
|
|
104
|
+
"proposed_searches": [...],
|
|
105
|
+
"approved_searches": [...],
|
|
106
|
+
"skipped_searches": [...]
|
|
107
|
+
},
|
|
108
|
+
"verify": {
|
|
109
|
+
"gaps_found": 2,
|
|
110
|
+
"gaps_fixed": 2,
|
|
111
|
+
"intentional_omissions": [...]
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"reground_history": [...]
|
|
115
|
+
}
|
|
127
116
|
```
|
|
128
117
|
|
|
129
|
-
##
|
|
130
|
-
|
|
131
|
-
| Command | When to Use | Output |
|
|
132
|
-
|---------|-------------|--------|
|
|
133
|
-
| `/api-create [endpoint]` | Starting new endpoint | Complete implementation |
|
|
134
|
-
| `/api-interview [endpoint]` | Need to understand requirements | Documentation file |
|
|
135
|
-
| `/api-research [library]` | Integrating external API/SDK | Research document |
|
|
136
|
-
| `/api-env [endpoint]` | Before implementation | Environment check report |
|
|
137
|
-
| `/api-status [endpoint]` | Check progress | Status report |
|
|
138
|
-
| `/red` | Write test first | Failing test |
|
|
139
|
-
| `/green` | Make test pass | Working implementation |
|
|
140
|
-
| `/refactor` | Clean up code | Improved code |
|
|
141
|
-
| `/cycle [desc]` | Implement feature | Full TDD cycle |
|
|
118
|
+
## Research Cache
|
|
142
119
|
|
|
143
|
-
|
|
120
|
+
Research cached in `.claude/research/`:
|
|
144
121
|
|
|
145
|
-
Each endpoint creates this structure:
|
|
146
122
|
```
|
|
147
|
-
|
|
148
|
-
āāā
|
|
149
|
-
āāā
|
|
150
|
-
ā
|
|
151
|
-
āāā
|
|
152
|
-
|
|
153
|
-
src/v2/docs/
|
|
154
|
-
āāā endpoints/
|
|
155
|
-
ā āāā [endpoint-name].md # Interview results
|
|
156
|
-
āāā research/
|
|
157
|
-
āāā [library-name].md # External API research
|
|
158
|
-
|
|
159
|
-
src/app/api-test/
|
|
160
|
-
āāā api-tests-manifest.json # Updated with new tests
|
|
161
|
-
|
|
162
|
-
src/lib/openapi/endpoints/
|
|
163
|
-
āāā [endpoint-name].ts # OpenAPI spec
|
|
123
|
+
.claude/research/
|
|
124
|
+
āāā brandfetch/
|
|
125
|
+
ā āāā 2025-12-08_initial.md
|
|
126
|
+
ā āāā 2025-12-08_deep.md
|
|
127
|
+
ā āāā CURRENT.md
|
|
128
|
+
āāā index.json ā Freshness tracking (7-day validity)
|
|
164
129
|
```
|
|
165
130
|
|
|
166
|
-
##
|
|
167
|
-
|
|
168
|
-
###
|
|
169
|
-
**Never write code without understanding WHY it exists.**
|
|
170
|
-
- Interview before implementation
|
|
171
|
-
- Document real-world usage
|
|
172
|
-
- Understand edge cases
|
|
173
|
-
|
|
174
|
-
### 2. Research Thoroughly
|
|
175
|
-
**Find ALL parameters, not just the documented ones.**
|
|
176
|
-
- Read official docs
|
|
177
|
-
- Check source code
|
|
178
|
-
- Review TypeScript definitions
|
|
179
|
-
- Test assumptions
|
|
180
|
-
|
|
181
|
-
### 3. Test First (TDD)
|
|
182
|
-
**No implementation without a failing test.**
|
|
183
|
-
- Red: Write test that fails
|
|
184
|
-
- Green: Minimal code to pass
|
|
185
|
-
- Refactor: Improve while tests pass
|
|
186
|
-
|
|
187
|
-
### 4. Document Everything
|
|
188
|
-
**Future you needs to understand this.**
|
|
189
|
-
- Interview results
|
|
190
|
-
- Research findings
|
|
191
|
-
- API schemas
|
|
192
|
-
- Code examples
|
|
193
|
-
- Testing notes
|
|
194
|
-
|
|
195
|
-
### 5. Verify Environment
|
|
196
|
-
**Check API keys before starting.**
|
|
197
|
-
- Identify required services
|
|
198
|
-
- Verify keys exist
|
|
199
|
-
- Document setup
|
|
200
|
-
- Test connections
|
|
201
|
-
|
|
202
|
-
## Integration with Existing Tools
|
|
203
|
-
|
|
204
|
-
These commands work alongside:
|
|
205
|
-
- **`/plan`** - Create implementation checklist
|
|
206
|
-
- **`/gap`** - Find missing pieces
|
|
207
|
-
- **`/issue [url]`** - Start from GitHub issue
|
|
208
|
-
- **`/commit`** - AI-generated semantic commits
|
|
209
|
-
- **`/pr`** - Create pull request
|
|
210
|
-
|
|
211
|
-
## Why This Approach Works
|
|
212
|
-
|
|
213
|
-
### Problems with Previous Approach
|
|
214
|
-
ā Tests written without understanding purpose
|
|
215
|
-
ā Missing parameters from incomplete research
|
|
216
|
-
ā Failed tests due to missing API keys
|
|
217
|
-
ā No documentation of real-world usage
|
|
218
|
-
ā Mechanical testing without context
|
|
219
|
-
|
|
220
|
-
### Benefits of New Approach
|
|
221
|
-
ā
Deep understanding before coding
|
|
222
|
-
ā
Complete parameter coverage
|
|
223
|
-
ā
Environment verified upfront
|
|
224
|
-
ā
Documentation drives implementation
|
|
225
|
-
ā
Tests reflect actual usage patterns
|
|
226
|
-
ā
Consistent, repeatable process
|
|
227
|
-
ā
Nothing gets forgotten
|
|
228
|
-
|
|
229
|
-
## Getting Started
|
|
230
|
-
|
|
231
|
-
### First Time Setup
|
|
232
|
-
1. Review this README
|
|
233
|
-
2. Read `/src/v2/docs/AI_WORKFLOW.md`
|
|
234
|
-
3. Read `/src/v2/docs/Main Doc ā V2 Development Patterns.md`
|
|
235
|
-
4. Try `/api-create` with a simple endpoint
|
|
236
|
-
|
|
237
|
-
### For Each New Endpoint
|
|
131
|
+
## Quick Start
|
|
132
|
+
|
|
133
|
+
### Automated
|
|
238
134
|
```bash
|
|
239
|
-
|
|
240
|
-
/api-create [endpoint-name]
|
|
241
|
-
|
|
242
|
-
# Or manual for learning
|
|
243
|
-
/api-interview [endpoint-name]
|
|
244
|
-
/api-research [library]
|
|
245
|
-
/api-env [endpoint-name]
|
|
246
|
-
/cycle [description]
|
|
247
|
-
/commit
|
|
135
|
+
/api-create my-endpoint
|
|
248
136
|
```
|
|
249
137
|
|
|
250
|
-
###
|
|
138
|
+
### Manual Step-by-Step
|
|
251
139
|
```bash
|
|
252
|
-
/api-
|
|
253
|
-
/api-
|
|
254
|
-
|
|
140
|
+
/api-research [library] # Initial research
|
|
141
|
+
/api-interview [endpoint] # Questions from research
|
|
142
|
+
/api-env [endpoint] # Verify environment
|
|
143
|
+
/red # Failing tests
|
|
144
|
+
/green # Make tests pass
|
|
145
|
+
/api-verify [endpoint] # Compare to docs
|
|
146
|
+
/refactor # Clean up
|
|
147
|
+
/commit # Semantic commit
|
|
255
148
|
```
|
|
256
149
|
|
|
257
150
|
## Installation
|
|
258
151
|
|
|
259
|
-
Install via NPX command:
|
|
260
152
|
```bash
|
|
261
153
|
npx @hustle-together/api-dev-tools --scope=project
|
|
262
154
|
```
|
|
263
155
|
|
|
264
|
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
267
|
-
-
|
|
268
|
-
-
|
|
156
|
+
Installs:
|
|
157
|
+
- Commands in `.claude/commands/`
|
|
158
|
+
- Hooks in `.claude/hooks/`
|
|
159
|
+
- Settings in `.claude/settings.json`
|
|
160
|
+
- State template in `.claude/api-dev-state.json`
|
|
161
|
+
- Research index in `.claude/research/index.json`
|
|
269
162
|
|
|
270
|
-
### Team-Wide
|
|
163
|
+
### Team-Wide
|
|
271
164
|
|
|
272
|
-
Add to
|
|
165
|
+
Add to `package.json`:
|
|
273
166
|
```json
|
|
274
167
|
{
|
|
275
168
|
"scripts": {
|
|
@@ -278,35 +171,15 @@ Add to your project's `package.json`:
|
|
|
278
171
|
}
|
|
279
172
|
```
|
|
280
173
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
## References
|
|
284
|
-
|
|
285
|
-
- **AI Workflow:** `/src/v2/docs/AI_WORKFLOW.md`
|
|
286
|
-
- **V2 Patterns:** `/src/v2/docs/Main Doc ā V2 Development Patterns.md`
|
|
287
|
-
- **AI SDK Catalog:** `/src/v2/docs/ai-sdk-catalog.json`
|
|
288
|
-
- **API Testing Plan:** `/src/v2/docs/API_TESTING_PLAN.md`
|
|
289
|
-
- **Implementation Status:** `/src/v2/docs/v2-api-implementation-status.md`
|
|
290
|
-
|
|
291
|
-
## Support
|
|
292
|
-
|
|
293
|
-
If commands aren't working:
|
|
294
|
-
1. Check that files exist in `.claude/commands/`
|
|
295
|
-
2. Verify command syntax matches usage examples
|
|
296
|
-
3. Review error messages for missing dependencies
|
|
297
|
-
4. Check that required docs exist in `/src/v2/docs/`
|
|
298
|
-
|
|
299
|
-
## Contributing
|
|
174
|
+
## Key Principles
|
|
300
175
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
5. Commit improvements
|
|
176
|
+
1. **Loop Until Green** - Every verification loops back if not successful
|
|
177
|
+
2. **Continuous Interviews** - Checkpoints at EVERY phase transition
|
|
178
|
+
3. **Adaptive Research** - Propose based on context, not shotgun
|
|
179
|
+
4. **Self-Documenting** - State file captures everything
|
|
180
|
+
5. **Verify After Green** - Re-research to catch memory errors
|
|
307
181
|
|
|
308
182
|
---
|
|
309
183
|
|
|
310
|
-
**
|
|
311
|
-
**
|
|
312
|
-
**Status:** Ready for use
|
|
184
|
+
**Version:** 3.0.0
|
|
185
|
+
**Last Updated:** 2025-12-08
|