@hustle-together/api-dev-tools 3.11.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.
Files changed (139) hide show
  1. package/.claude/agents/code-reviewer.md +170 -0
  2. package/.claude/agents/docs-generator.md +80 -0
  3. package/.claude/agents/implementation-reviewer.md +119 -0
  4. package/.claude/agents/parallel-researcher.md +52 -0
  5. package/.claude/agents/research-validator.md +116 -0
  6. package/.claude/agents/schema-generator.md +70 -0
  7. package/.claude/agents/test-writer.md +104 -0
  8. package/.claude/api-dev-state.json +228 -56
  9. package/.claude/commands/README.md +21 -10
  10. package/.claude/commands/add-command.md +8 -5
  11. package/.claude/commands/api-create.md +36 -25
  12. package/.claude/commands/api-env.md +1 -0
  13. package/.claude/commands/api-interview.md +32 -19
  14. package/.claude/commands/api-research.md +47 -21
  15. package/.claude/commands/api-status.md +21 -1
  16. package/.claude/commands/api-verify.md +14 -13
  17. package/.claude/commands/beepboop.md +4 -5
  18. package/.claude/commands/busycommit.md +2 -3
  19. package/.claude/commands/commit.md +2 -3
  20. package/.claude/commands/cycle.md +2 -7
  21. package/.claude/commands/gap.md +2 -3
  22. package/.claude/commands/green.md +2 -7
  23. package/.claude/commands/issue.md +3 -8
  24. package/.claude/commands/ntfy-setup.md +91 -0
  25. package/.claude/commands/ntfy-test.md +74 -0
  26. package/.claude/commands/plan.md +2 -3
  27. package/.claude/commands/pr.md +2 -3
  28. package/.claude/commands/publish.md +40 -0
  29. package/.claude/commands/red.md +2 -7
  30. package/.claude/commands/refactor.md +2 -7
  31. package/.claude/commands/spike.md +2 -7
  32. package/.claude/commands/summarize.md +2 -3
  33. package/.claude/commands/tdd.md +2 -7
  34. package/.claude/commands/worktree-add.md +208 -216
  35. package/.claude/commands/worktree-cleanup.md +172 -178
  36. package/.claude/settings.json +63 -12
  37. package/.claude/settings.local.json +2 -1
  38. package/.claude-plugin/marketplace.json +2 -11
  39. package/.skills/README.md +55 -53
  40. package/.skills/_shared/settings.json +1 -1
  41. package/.skills/add-command/SKILL.md +10 -5
  42. package/.skills/api-create/SKILL.md +146 -35
  43. package/.skills/api-env/SKILL.md +1 -0
  44. package/.skills/api-interview/SKILL.md +32 -19
  45. package/.skills/api-research/SKILL.md +47 -21
  46. package/.skills/api-status/SKILL.md +21 -1
  47. package/.skills/api-verify/SKILL.md +14 -13
  48. package/.skills/beepboop/SKILL.md +6 -5
  49. package/.skills/busycommit/SKILL.md +4 -3
  50. package/.skills/commit/SKILL.md +4 -3
  51. package/.skills/cycle/SKILL.md +4 -7
  52. package/.skills/gap/SKILL.md +4 -3
  53. package/.skills/green/SKILL.md +4 -7
  54. package/.skills/issue/SKILL.md +5 -8
  55. package/.skills/plan/SKILL.md +4 -3
  56. package/.skills/pr/SKILL.md +4 -3
  57. package/.skills/publish/SKILL.md +160 -0
  58. package/.skills/red/SKILL.md +4 -7
  59. package/.skills/refactor/SKILL.md +4 -7
  60. package/.skills/spike/SKILL.md +4 -7
  61. package/.skills/summarize/SKILL.md +4 -3
  62. package/.skills/tdd/SKILL.md +4 -7
  63. package/.skills/update-todos/SKILL.md +22 -0
  64. package/.skills/worktree-add/SKILL.md +210 -216
  65. package/.skills/worktree-cleanup/SKILL.md +183 -187
  66. package/CHANGELOG.md +97 -79
  67. package/README.md +161 -7142
  68. package/bin/cli.js +448 -805
  69. package/commands/README.md +66 -31
  70. package/commands/add-command.md +8 -5
  71. package/commands/beepboop.md +4 -5
  72. package/commands/busycommit.md +2 -3
  73. package/commands/commit.md +2 -3
  74. package/commands/cycle.md +2 -7
  75. package/commands/gap.md +2 -3
  76. package/commands/green.md +2 -7
  77. package/commands/hustle-api-continue.md +8 -5
  78. package/commands/hustle-api-create.md +70 -29
  79. package/commands/hustle-api-env.md +1 -0
  80. package/commands/hustle-api-interview.md +32 -19
  81. package/commands/hustle-api-research.md +47 -21
  82. package/commands/hustle-api-sessions.md +8 -7
  83. package/commands/hustle-api-status.md +21 -1
  84. package/commands/hustle-api-verify.md +14 -13
  85. package/commands/hustle-combine.md +488 -241
  86. package/commands/hustle-ui-create-page.md +113 -50
  87. package/commands/hustle-ui-create.md +179 -26
  88. package/commands/issue.md +3 -8
  89. package/commands/plan.md +2 -3
  90. package/commands/pr.md +2 -3
  91. package/commands/red.md +2 -7
  92. package/commands/refactor.md +2 -7
  93. package/commands/spike.md +2 -7
  94. package/commands/summarize.md +2 -3
  95. package/commands/tdd.md +2 -7
  96. package/commands/worktree-add.md +208 -216
  97. package/commands/worktree-cleanup.md +172 -178
  98. package/hooks/api-workflow-check.py +5 -3
  99. package/hooks/enforce-component-type-confirm.py +97 -0
  100. package/hooks/lib/__init__.py +1 -0
  101. package/hooks/lib/greptile.py +355 -0
  102. package/hooks/lib/ntfy.py +209 -0
  103. package/hooks/notify-input-needed.py +73 -0
  104. package/hooks/notify-phase-complete.py +90 -0
  105. package/hooks/run-code-review.py +246 -0
  106. package/hooks/track-token-usage.py +121 -0
  107. package/package.json +13 -3
  108. package/scripts/collect-test-results.ts +102 -77
  109. package/scripts/extract-parameters.ts +112 -70
  110. package/scripts/generate-test-manifest.ts +118 -77
  111. package/templates/.env.example +57 -0
  112. package/templates/BRAND_GUIDE.md +92 -52
  113. package/templates/CLAUDE-SECTION.md +40 -37
  114. package/templates/SPEC.json +186 -38
  115. package/templates/api-dev-state.json +33 -4
  116. package/templates/api-showcase/_components/APICard.tsx +22 -18
  117. package/templates/api-showcase/_components/APIModal.tsx +110 -64
  118. package/templates/api-showcase/_components/APIShowcase.tsx +53 -35
  119. package/templates/api-showcase/_components/APITester.tsx +128 -67
  120. package/templates/api-showcase/page.tsx +4 -4
  121. package/templates/api-test/page.tsx +51 -30
  122. package/templates/api-test/test-structure/route.ts +43 -34
  123. package/templates/component/Component.stories.tsx +41 -39
  124. package/templates/component/Component.test.tsx +96 -78
  125. package/templates/component/Component.tsx +63 -52
  126. package/templates/component/Component.types.ts +10 -6
  127. package/templates/component/Component.visual.spec.ts +170 -0
  128. package/templates/component/index.ts +2 -2
  129. package/templates/dev-tools/_components/DevToolsLanding.tsx +8 -8
  130. package/templates/dev-tools/page.tsx +4 -3
  131. package/templates/mcp-servers.json +30 -2
  132. package/templates/page/page.e2e.test.ts +56 -48
  133. package/templates/page/page.tsx +3 -3
  134. package/templates/shared/HeroHeader.tsx +16 -15
  135. package/templates/shared/index.ts +1 -1
  136. package/templates/ui-showcase/_components/PreviewCard.tsx +20 -20
  137. package/templates/ui-showcase/_components/PreviewModal.tsx +149 -108
  138. package/templates/ui-showcase/_components/UIShowcase.tsx +43 -35
  139. package/templates/ui-showcase/page.tsx +4 -4
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: test-writer
3
+ description: Test case generator from schemas and interview decisions. Use during Phase 8 (TDD Red) to create comprehensive failing tests before implementation.
4
+ tools: Read, Write, Grep, Glob
5
+ model: sonnet
6
+ ---
7
+
8
+ # Test Writer Agent
9
+
10
+ You are a TDD specialist that writes comprehensive, failing tests based on schemas and interview decisions.
11
+
12
+ ## Your Role
13
+
14
+ 1. **Analyze schemas** - Understand request/response structure
15
+ 2. **Apply interview decisions** - Test user-specified behaviors
16
+ 3. **Write failing tests** - Tests that define expected behavior
17
+ 4. **Cover edge cases** - Error handling, validation, edge cases
18
+
19
+ ## Input Format
20
+
21
+ You will receive:
22
+
23
+ - Zod schemas for request/response
24
+ - Interview decisions (error handling, formats, etc.)
25
+ - Target test file path
26
+ - Endpoint path and method
27
+
28
+ ## Output Format
29
+
30
+ Generate comprehensive test file:
31
+
32
+ ```typescript
33
+ import { describe, it, expect, vi, beforeEach } from "vitest";
34
+ import { NextRequest } from "next/server";
35
+ import { POST } from "../route";
36
+
37
+ describe("[Endpoint] API", () => {
38
+ describe("POST /api/v2/[endpoint]", () => {
39
+ // Happy path tests
40
+ it("should return data with valid request", async () => {
41
+ const request = new NextRequest("http://localhost/api/v2/endpoint", {
42
+ method: "POST",
43
+ body: JSON.stringify({
44
+ /* valid data */
45
+ }),
46
+ });
47
+
48
+ const response = await POST(request);
49
+ const data = await response.json();
50
+
51
+ expect(response.status).toBe(200);
52
+ expect(data).toHaveProperty("result");
53
+ });
54
+
55
+ // Validation tests
56
+ it("should return 400 for missing required fields", async () => {
57
+ const request = new NextRequest("http://localhost/api/v2/endpoint", {
58
+ method: "POST",
59
+ body: JSON.stringify({}),
60
+ });
61
+
62
+ const response = await POST(request);
63
+ expect(response.status).toBe(400);
64
+ });
65
+
66
+ // Error handling tests (from interview)
67
+ it("should handle API errors gracefully", async () => {
68
+ // Mock external API failure
69
+ vi.spyOn(global, "fetch").mockRejectedValueOnce(new Error("API down"));
70
+
71
+ const request = new NextRequest("http://localhost/api/v2/endpoint", {
72
+ method: "POST",
73
+ body: JSON.stringify({
74
+ /* valid data */
75
+ }),
76
+ });
77
+
78
+ const response = await POST(request);
79
+ expect(response.status).toBe(500);
80
+ });
81
+
82
+ // Format tests (from interview)
83
+ it("should return requested format", async () => {
84
+ // Test based on interview format decisions
85
+ });
86
+ });
87
+ });
88
+ ```
89
+
90
+ ## Test Categories
91
+
92
+ 1. **Happy Path** - Valid requests return expected data
93
+ 2. **Validation** - Invalid input returns 400 with helpful message
94
+ 3. **Error Handling** - API failures handled per interview decisions
95
+ 4. **Authentication** - API key handling
96
+ 5. **Edge Cases** - Empty data, nulls, large payloads
97
+
98
+ ## Guidelines
99
+
100
+ 1. **Tests MUST fail initially** - Implementation doesn't exist yet
101
+ 2. **One assertion per test** - Clear failure messages
102
+ 3. **Use interview decisions** - Error strategy, formats, etc.
103
+ 4. **Mock external APIs** - Don't make real API calls in tests
104
+ 5. **Cover 100%** - Every schema field should be tested
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.0.0",
2
+ "version": "3.12.0",
3
3
  "created_at": null,
4
4
  "endpoint": null,
5
5
  "library": null,
@@ -63,87 +63,259 @@
63
63
  "confidence": "critical"
64
64
  },
65
65
  "injected": true
66
+ },
67
+ {
68
+ "timestamp": "2025-12-27T22:31:26.336088",
69
+ "prompt_preview": "1. CREATE PR\n - Go to GitHub: https://github.com/hustle-together/api-dev-tools\n - Create PR from...",
70
+ "detection": {
71
+ "detected": true,
72
+ "terms": [
73
+ "create pr",
74
+ "update version (i can do this for you now)",
75
+ "api",
76
+ "package",
77
+ "test",
78
+ "publish",
79
+ "@hustle-together/api-dev-tools",
80
+ "1.0.0",
81
+ "3.12.0",
82
+ "package.json"
83
+ ],
84
+ "patterns_matched": [
85
+ "always_research",
86
+ "question_pattern",
87
+ "technical_term"
88
+ ],
89
+ "confidence": "critical"
90
+ },
91
+ "injected": true
92
+ },
93
+ {
94
+ "timestamp": "2025-12-27T22:32:03.480897",
95
+ "prompt_preview": "File Purpose\nworkflow-demo.html (247KB) Main interactive workflow demo\nexecution-trace-COMPREH...",
96
+ "detection": {
97
+ "detected": true,
98
+ "terms": [
99
+ "write integration demo",
100
+ "api",
101
+ "interview-driven-api"
102
+ ],
103
+ "patterns_matched": [
104
+ "question_pattern",
105
+ "always_research",
106
+ "technical_term"
107
+ ],
108
+ "confidence": "critical"
109
+ },
110
+ "injected": true
111
+ },
112
+ {
113
+ "timestamp": "2025-12-27T22:35:36.217406",
114
+ "prompt_preview": "> File Purpose\nworkflow-demo.html (247KB) Main interactive workflow demo\nexecution-trace-COMPR...",
115
+ "detection": {
116
+ "detected": true,
117
+ "terms": [
118
+ "write integration demo",
119
+ "api",
120
+ "view",
121
+ "interview-driven-api"
122
+ ],
123
+ "patterns_matched": [
124
+ "technical_term",
125
+ "question_pattern",
126
+ "always_research"
127
+ ],
128
+ "confidence": "critical"
129
+ },
130
+ "injected": true
131
+ },
132
+ {
133
+ "timestamp": "2025-12-27T22:36:41.163781",
134
+ "prompt_preview": "how do i merge it i am on the comment page ",
135
+ "detection": {
136
+ "detected": true,
137
+ "terms": [
138
+ "how do"
139
+ ],
140
+ "patterns_matched": [
141
+ "always_research",
142
+ "question_pattern"
143
+ ],
144
+ "confidence": "critical"
145
+ },
146
+ "injected": true
147
+ },
148
+ {
149
+ "timestamp": "2025-12-27T22:40:21.674198",
150
+ "prompt_preview": "ok i did it check the main now please",
151
+ "detection": {
152
+ "detected": false,
153
+ "terms": [],
154
+ "patterns_matched": [],
155
+ "confidence": "none"
156
+ },
157
+ "injected": false
158
+ },
159
+ {
160
+ "timestamp": "2025-12-27T22:43:21.172124",
161
+ "prompt_preview": "wait was the github master updated witht he most current push?",
162
+ "detection": {
163
+ "detected": true,
164
+ "terms": [],
165
+ "patterns_matched": [],
166
+ "confidence": "low"
167
+ },
168
+ "injected": true
169
+ },
170
+ {
171
+ "timestamp": "2025-12-27T22:45:59.739199",
172
+ "prompt_preview": "ok now update the npm package, make a skill for this as well based on my api-dev-tools and mcp if th...",
173
+ "detection": {
174
+ "detected": true,
175
+ "terms": [
176
+ "update the npm package, make a skill for this as w",
177
+ "package",
178
+ "api"
179
+ ],
180
+ "patterns_matched": [
181
+ "always_research",
182
+ "technical_term",
183
+ "question_pattern"
184
+ ],
185
+ "confidence": "critical"
186
+ },
187
+ "injected": true
188
+ },
189
+ {
190
+ "timestamp": "2025-12-27T22:49:36.519292",
191
+ "prompt_preview": "/Users/alfonso/Documents/GitHub/api-dev-tools/demo/hustle-together/workflow-demo-backup-20251212-134...",
192
+ "detection": {
193
+ "detected": true,
194
+ "terms": [
195
+ "api",
196
+ "0.0.1"
197
+ ],
198
+ "patterns_matched": [
199
+ "always_research",
200
+ "technical_term"
201
+ ],
202
+ "confidence": "critical"
203
+ },
204
+ "injected": true
205
+ },
206
+ {
207
+ "timestamp": "2025-12-27T22:52:43.366799",
208
+ "prompt_preview": "help me use that publish skill how do i get that code?",
209
+ "detection": {
210
+ "detected": true,
211
+ "terms": [
212
+ "how do",
213
+ "publish"
214
+ ],
215
+ "patterns_matched": [
216
+ "technical_term",
217
+ "always_research",
218
+ "question_pattern"
219
+ ],
220
+ "confidence": "critical"
221
+ },
222
+ "injected": true
223
+ },
224
+ {
225
+ "timestamp": "2025-12-27T22:53:54.327491",
226
+ "prompt_preview": "id rather use the terminal command to open the pafge",
227
+ "detection": {
228
+ "detected": true,
229
+ "terms": [],
230
+ "patterns_matched": [],
231
+ "confidence": "low"
232
+ },
233
+ "injected": true
234
+ },
235
+ {
236
+ "timestamp": "2025-12-27T22:58:35.375132",
237
+ "prompt_preview": "No no, I use a secret key, so you just open my page for me, and I just gave it access by using my se...",
238
+ "detection": {
239
+ "detected": true,
240
+ "terms": [
241
+ "secret",
242
+ "key"
243
+ ],
244
+ "patterns_matched": [
245
+ "technical_term"
246
+ ],
247
+ "confidence": "high"
248
+ },
249
+ "injected": true
250
+ },
251
+ {
252
+ "timestamp": "2025-12-27T22:59:14.000695",
253
+ "prompt_preview": "No, that's dumb. Normally you just give me some commands that I run in terminal and they just work.N...",
254
+ "detection": {
255
+ "detected": true,
256
+ "terms": [
257
+ "publish"
258
+ ],
259
+ "patterns_matched": [
260
+ "technical_term",
261
+ "question_pattern"
262
+ ],
263
+ "confidence": "high"
264
+ },
265
+ "injected": true
266
+ },
267
+ {
268
+ "timestamp": "2025-12-27T22:59:56.192298",
269
+ "prompt_preview": " npm login run that and i will tap the security code access then you can run the publish command",
270
+ "detection": {
271
+ "detected": true,
272
+ "terms": [
273
+ "publish"
274
+ ],
275
+ "patterns_matched": [
276
+ "technical_term"
277
+ ],
278
+ "confidence": "high"
279
+ },
280
+ "injected": true
66
281
  }
67
282
  ],
68
283
  "phases": {
69
284
  "disambiguation": {
70
- "status": "not_started",
71
- "clarified": null,
72
- "search_variations": [],
73
- "description": "Pre-research disambiguation to clarify ambiguous requests"
285
+ "status": "not_started"
74
286
  },
75
287
  "scope": {
76
- "status": "not_started",
77
- "confirmed": false,
78
- "description": "Initial scope understanding and confirmation"
288
+ "status": "not_started"
79
289
  },
80
290
  "research_initial": {
81
- "status": "not_started",
82
- "sources": [],
83
- "summary_approved": false,
84
- "description": "Context7/WebSearch research for live documentation"
291
+ "status": "not_started"
85
292
  },
86
293
  "interview": {
87
- "status": "not_started",
88
- "questions": [],
89
- "user_question_count": 0,
90
- "structured_question_count": 0,
91
- "decisions": {},
92
- "description": "Structured interview about requirements (generated FROM research)"
294
+ "status": "not_started"
93
295
  },
94
296
  "research_deep": {
95
- "status": "not_started",
96
- "sources": [],
97
- "proposed_searches": [],
98
- "approved_searches": [],
99
- "skipped_searches": [],
100
- "description": "Deep dive based on interview answers (adaptive, not shotgun)"
297
+ "status": "not_started"
101
298
  },
102
299
  "schema_creation": {
103
- "status": "not_started",
104
- "schema_file": null,
105
- "schema_approved": false,
106
- "description": "Zod schema creation from research"
300
+ "status": "not_started"
107
301
  },
108
302
  "environment_check": {
109
- "status": "not_started",
110
- "keys_verified": [],
111
- "keys_missing": [],
112
- "confirmed": false,
113
- "description": "API key and environment verification"
303
+ "status": "not_started"
114
304
  },
115
305
  "tdd_red": {
116
- "status": "not_started",
117
- "test_file": null,
118
- "test_count": 0,
119
- "test_matrix_approved": false,
120
- "description": "Write failing tests first"
306
+ "status": "not_started"
121
307
  },
122
308
  "tdd_green": {
123
- "status": "not_started",
124
- "implementation_file": null,
125
- "all_tests_passing": false,
126
- "description": "Minimal implementation to pass tests"
309
+ "status": "not_started"
127
310
  },
128
311
  "verify": {
129
- "status": "not_started",
130
- "gaps_found": 0,
131
- "gaps_fixed": 0,
132
- "intentional_omissions": [],
133
- "re_research_done": false,
134
- "description": "Re-research after Green to verify implementation matches docs"
312
+ "status": "not_started"
135
313
  },
136
314
  "tdd_refactor": {
137
- "status": "not_started",
138
- "description": "Code cleanup while keeping tests green"
315
+ "status": "not_started"
139
316
  },
140
317
  "documentation": {
141
- "status": "not_started",
142
- "files_updated": [],
143
- "manifest_updated": false,
144
- "openapi_updated": false,
145
- "research_cached": false,
146
- "description": "Update manifests, OpenAPI, cache research"
318
+ "status": "not_started"
147
319
  }
148
320
  },
149
321
  "verification": {
@@ -13,23 +13,24 @@
13
13
 
14
14
  ## Hook Architecture (9 Hooks)
15
15
 
16
- | Hook | Event | Purpose |
17
- |------|-------|---------|
18
- | `session-startup.py` | SessionStart | Inject state at session start |
16
+ | Hook | Event | Purpose |
17
+ | ------------------------------ | ---------------- | ---------------------------------- |
18
+ | `session-startup.py` | SessionStart | Inject state at session start |
19
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 10 after test pass |
26
- | `api-workflow-check.py` | Stop | Block if phases incomplete |
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 10 after test pass |
26
+ | `api-workflow-check.py` | Stop | Block if phases incomplete |
27
27
 
28
28
  ## Available Commands
29
29
 
30
30
  ### Complete Workflow
31
31
 
32
32
  **`/api-create [endpoint-name]`**
33
+
33
34
  - Runs all 13 phases automatically
34
35
  - Loop-back architecture at every checkpoint
35
36
  - See [api-create.md](api-create.md) for full flow
@@ -37,32 +38,38 @@
37
38
  ### Individual Phases
38
39
 
39
40
  **`/api-interview [endpoint-name]`**
41
+
40
42
  - Questions GENERATED from research findings
41
43
  - Different question types: enum, continuous, boolean
42
44
  - See [api-interview.md](api-interview.md)
43
45
 
44
46
  **`/api-research [library-or-service]`**
47
+
45
48
  - Adaptive propose-approve flow (not shotgun)
46
49
  - Research cached with 7-day freshness
47
50
  - See [api-research.md](api-research.md)
48
51
 
49
52
  **`/api-verify [endpoint-name]`** (NEW)
53
+
50
54
  - Manual Phase 10 verification
51
55
  - Re-read docs, compare to implementation
52
56
  - Report gaps, loop back or document omissions
53
57
  - See [api-verify.md](api-verify.md)
54
58
 
55
59
  **`/api-env [endpoint-name]`**
60
+
56
61
  - Check API keys and environment
57
62
  - See [api-env.md](api-env.md)
58
63
 
59
64
  **`/api-status [endpoint-name]`**
65
+
60
66
  - Track progress through 13 phases
61
67
  - See [api-status.md](api-status.md)
62
68
 
63
69
  ### TDD Commands
64
70
 
65
71
  From [@wbern/claude-instructions](https://github.com/wbern/claude-instructions):
72
+
66
73
  - `/red` - Write ONE failing test
67
74
  - `/green` - Minimal implementation to pass
68
75
  - `/refactor` - Clean up while tests pass
@@ -131,11 +138,13 @@ Research cached in `.claude/research/`:
131
138
  ## Quick Start
132
139
 
133
140
  ### Automated
141
+
134
142
  ```bash
135
143
  /api-create my-endpoint
136
144
  ```
137
145
 
138
146
  ### Manual Step-by-Step
147
+
139
148
  ```bash
140
149
  /api-research [library] # Initial research
141
150
  /api-interview [endpoint] # Questions from research
@@ -154,6 +163,7 @@ npx @hustle-together/api-dev-tools --scope=project
154
163
  ```
155
164
 
156
165
  Installs:
166
+
157
167
  - Commands in `.claude/commands/`
158
168
  - Hooks in `.claude/hooks/`
159
169
  - Settings in `.claude/settings.json`
@@ -163,6 +173,7 @@ Installs:
163
173
  ### Team-Wide
164
174
 
165
175
  Add to `package.json`:
176
+
166
177
  ```json
167
178
  {
168
179
  "scripts": {
@@ -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
- - NEXT_PUBLIC_ variables (client-side)
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