@hustle-together/api-dev-tools 3.12.3 → 4.5.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 (159) hide show
  1. package/.claude/adr-requests/.gitkeep +10 -0
  2. package/.claude/agents/adr-researcher.md +109 -0
  3. package/.claude/agents/visual-analyzer.md +183 -0
  4. package/.claude/api-dev-state.json +7 -463
  5. package/.claude/documentation-audit.json +114 -0
  6. package/.claude/registry.json +289 -0
  7. package/.claude/settings.json +45 -1
  8. package/.claude/workflow-logs/None.json +49 -0
  9. package/.claude/workflow-logs/session-20251230-143727.json +106 -0
  10. package/.skills/adr-deep-research/SKILL.md +351 -0
  11. package/.skills/api-create/SKILL.md +116 -17
  12. package/.skills/api-research/SKILL.md +130 -0
  13. package/.skills/docs-sync/SKILL.md +260 -0
  14. package/.skills/docs-update/SKILL.md +205 -0
  15. package/.skills/hustle-brand/SKILL.md +368 -0
  16. package/.skills/hustle-build/SKILL.md +786 -0
  17. package/.skills/hustle-build-review/SKILL.md +518 -0
  18. package/.skills/parallel-spawn/SKILL.md +212 -0
  19. package/.skills/ralph-continue/SKILL.md +151 -0
  20. package/.skills/ralph-loop/SKILL.md +341 -0
  21. package/.skills/ralph-status/SKILL.md +87 -0
  22. package/.skills/refactor/SKILL.md +59 -0
  23. package/.skills/shadcn/SKILL.md +522 -0
  24. package/.skills/test-all/SKILL.md +210 -0
  25. package/.skills/test-builds/SKILL.md +208 -0
  26. package/.skills/test-debug/SKILL.md +212 -0
  27. package/.skills/test-e2e/SKILL.md +168 -0
  28. package/.skills/test-review/SKILL.md +707 -0
  29. package/.skills/test-unit/SKILL.md +143 -0
  30. package/.skills/test-visual/SKILL.md +301 -0
  31. package/.skills/token-report/SKILL.md +132 -0
  32. package/CHANGELOG.md +575 -0
  33. package/README.md +426 -56
  34. package/bin/cli.js +1538 -88
  35. package/commands/hustle-api-create.md +22 -0
  36. package/commands/hustle-build.md +259 -0
  37. package/commands/hustle-combine.md +81 -2
  38. package/commands/hustle-ui-create-page.md +84 -2
  39. package/commands/hustle-ui-create.md +82 -2
  40. package/hooks/__pycache__/api-workflow-check.cpython-314.pyc +0 -0
  41. package/hooks/__pycache__/auto-answer.cpython-314.pyc +0 -0
  42. package/hooks/__pycache__/cache-research.cpython-314.pyc +0 -0
  43. package/hooks/__pycache__/check-api-routes.cpython-314.pyc +0 -0
  44. package/hooks/__pycache__/check-playwright-setup.cpython-314.pyc +0 -0
  45. package/hooks/__pycache__/check-storybook-setup.cpython-314.pyc +0 -0
  46. package/hooks/__pycache__/check-update.cpython-314.pyc +0 -0
  47. package/hooks/__pycache__/completion-promise-detector.cpython-314.pyc +0 -0
  48. package/hooks/__pycache__/context-capacity-warning.cpython-314.pyc +0 -0
  49. package/hooks/__pycache__/detect-interruption.cpython-314.pyc +0 -0
  50. package/hooks/__pycache__/docs-update-check.cpython-314.pyc +0 -0
  51. package/hooks/__pycache__/enforce-a11y-audit.cpython-314.pyc +0 -0
  52. package/hooks/__pycache__/enforce-brand-guide.cpython-314.pyc +0 -0
  53. package/hooks/__pycache__/enforce-component-type-confirm.cpython-314.pyc +0 -0
  54. package/hooks/__pycache__/enforce-deep-research.cpython-314.pyc +0 -0
  55. package/hooks/__pycache__/enforce-disambiguation.cpython-314.pyc +0 -0
  56. package/hooks/__pycache__/enforce-documentation.cpython-314.pyc +0 -0
  57. package/hooks/__pycache__/enforce-dry-run.cpython-314.pyc +0 -0
  58. package/hooks/__pycache__/enforce-environment.cpython-314.pyc +0 -0
  59. package/hooks/__pycache__/enforce-external-research.cpython-314.pyc +0 -0
  60. package/hooks/__pycache__/enforce-freshness.cpython-314.pyc +0 -0
  61. package/hooks/__pycache__/enforce-interview.cpython-314.pyc +0 -0
  62. package/hooks/__pycache__/enforce-page-components.cpython-314.pyc +0 -0
  63. package/hooks/__pycache__/enforce-page-data-schema.cpython-314.pyc +0 -0
  64. package/hooks/__pycache__/enforce-questions-sourced.cpython-314.pyc +0 -0
  65. package/hooks/__pycache__/enforce-refactor.cpython-314.pyc +0 -0
  66. package/hooks/__pycache__/enforce-research.cpython-314.pyc +0 -0
  67. package/hooks/__pycache__/enforce-schema-from-interview.cpython-314.pyc +0 -0
  68. package/hooks/__pycache__/enforce-schema.cpython-314.pyc +0 -0
  69. package/hooks/__pycache__/enforce-scope.cpython-314.pyc +0 -0
  70. package/hooks/__pycache__/enforce-tdd-red.cpython-314.pyc +0 -0
  71. package/hooks/__pycache__/enforce-ui-disambiguation.cpython-314.pyc +0 -0
  72. package/hooks/__pycache__/enforce-ui-interview.cpython-314.pyc +0 -0
  73. package/hooks/__pycache__/enforce-verify.cpython-314.pyc +0 -0
  74. package/hooks/__pycache__/generate-adr-options.cpython-314.pyc +0 -0
  75. package/hooks/__pycache__/generate-manifest-entry.cpython-314.pyc +0 -0
  76. package/hooks/__pycache__/hook_utils.cpython-314.pyc +0 -0
  77. package/hooks/__pycache__/notify-input-needed.cpython-314.pyc +0 -0
  78. package/hooks/__pycache__/notify-phase-complete.cpython-314.pyc +0 -0
  79. package/hooks/__pycache__/ntfy-on-question.cpython-314.pyc +0 -0
  80. package/hooks/__pycache__/orchestrator-completion.cpython-314.pyc +0 -0
  81. package/hooks/__pycache__/orchestrator-handoff.cpython-314.pyc +0 -0
  82. package/hooks/__pycache__/orchestrator-session-startup.cpython-314.pyc +0 -0
  83. package/hooks/__pycache__/parallel-orchestrator.cpython-314.pyc +0 -0
  84. package/hooks/__pycache__/periodic-reground.cpython-314.pyc +0 -0
  85. package/hooks/__pycache__/project-document-prompt.cpython-314.pyc +0 -0
  86. package/hooks/__pycache__/remote-question-proxy.cpython-314.pyc +0 -0
  87. package/hooks/__pycache__/remote-question-server.cpython-314.pyc +0 -0
  88. package/hooks/__pycache__/run-code-review.cpython-314.pyc +0 -0
  89. package/hooks/__pycache__/run-visual-qa.cpython-314.pyc +0 -0
  90. package/hooks/__pycache__/session-logger.cpython-314.pyc +0 -0
  91. package/hooks/__pycache__/session-startup.cpython-314.pyc +0 -0
  92. package/hooks/__pycache__/track-scope-coverage.cpython-314.pyc +0 -0
  93. package/hooks/__pycache__/track-token-usage.cpython-314.pyc +0 -0
  94. package/hooks/__pycache__/track-tool-use.cpython-314.pyc +0 -0
  95. package/hooks/__pycache__/update-adr-decision.cpython-314.pyc +0 -0
  96. package/hooks/__pycache__/update-api-showcase.cpython-314.pyc +0 -0
  97. package/hooks/__pycache__/update-registry.cpython-314.pyc +0 -0
  98. package/hooks/__pycache__/update-ui-showcase.cpython-314.pyc +0 -0
  99. package/hooks/__pycache__/verify-after-green.cpython-314.pyc +0 -0
  100. package/hooks/__pycache__/verify-implementation.cpython-314.pyc +0 -0
  101. package/hooks/api-workflow-check.py +34 -0
  102. package/hooks/auto-answer.py +305 -0
  103. package/hooks/check-update.py +132 -0
  104. package/hooks/completion-promise-detector.py +293 -0
  105. package/hooks/context-capacity-warning.py +171 -0
  106. package/hooks/docs-update-check.py +120 -0
  107. package/hooks/enforce-dry-run.py +134 -0
  108. package/hooks/enforce-external-research.py +25 -0
  109. package/hooks/enforce-interview.py +20 -0
  110. package/hooks/generate-adr-options.py +282 -0
  111. package/hooks/hook_utils.py +609 -0
  112. package/hooks/lib/__pycache__/__init__.cpython-314.pyc +0 -0
  113. package/hooks/lib/__pycache__/greptile.cpython-314.pyc +0 -0
  114. package/hooks/lib/__pycache__/ntfy.cpython-314.pyc +0 -0
  115. package/hooks/ntfy-on-question.py +240 -0
  116. package/hooks/orchestrator-completion.py +313 -0
  117. package/hooks/orchestrator-handoff.py +267 -0
  118. package/hooks/orchestrator-session-startup.py +146 -0
  119. package/hooks/parallel-orchestrator.py +451 -0
  120. package/hooks/periodic-reground.py +270 -67
  121. package/hooks/project-document-prompt.py +302 -0
  122. package/hooks/remote-question-proxy.py +284 -0
  123. package/hooks/remote-question-server.py +1224 -0
  124. package/hooks/run-code-review.py +176 -29
  125. package/hooks/run-visual-qa.py +338 -0
  126. package/hooks/session-logger.py +27 -1
  127. package/hooks/session-startup.py +113 -0
  128. package/hooks/update-adr-decision.py +236 -0
  129. package/hooks/update-api-showcase.py +13 -1
  130. package/hooks/update-testing-checklist.py +195 -0
  131. package/hooks/update-ui-showcase.py +13 -1
  132. package/package.json +7 -3
  133. package/scripts/extract-schema-docs.cjs +322 -0
  134. package/templates/.skills/hustle-interview/SKILL.md +174 -0
  135. package/templates/CLAUDE-SECTION.md +89 -64
  136. package/templates/adr-viewer/_components/ADRViewer.tsx +326 -0
  137. package/templates/api-dev-state.json +33 -1
  138. package/templates/api-showcase/_components/APIModal.tsx +100 -8
  139. package/templates/api-showcase/_components/APIShowcase.tsx +36 -4
  140. package/templates/api-showcase/_components/APITester.tsx +367 -58
  141. package/templates/brand-page/page.tsx +645 -0
  142. package/templates/component/Component.visual.spec.ts +30 -24
  143. package/templates/docs/page.tsx +230 -0
  144. package/templates/eslint-plugin-zod-schema/index.js +446 -0
  145. package/templates/eslint-plugin-zod-schema/package.json +26 -0
  146. package/templates/github-workflows/security.yml +274 -0
  147. package/templates/hustle-build-defaults.json +136 -0
  148. package/templates/hustle-dev-dashboard/page.tsx +365 -0
  149. package/templates/page/page.e2e.test.ts +30 -26
  150. package/templates/performance-budgets.json +63 -5
  151. package/templates/playwright-report/page.tsx +258 -0
  152. package/templates/registry.json +279 -3
  153. package/templates/review-dashboard/page.tsx +510 -0
  154. package/templates/settings.json +155 -7
  155. package/templates/test-results/page.tsx +237 -0
  156. package/templates/typedoc.json +19 -0
  157. package/templates/ui-showcase/_components/UIShowcase.tsx +48 -1
  158. package/templates/ui-showcase/_components/VisualTestingDashboard.tsx +579 -0
  159. package/templates/ui-showcase/page.tsx +1 -1
package/README.md CHANGED
@@ -1,21 +1,33 @@
1
- # API Development Tools v1.0.0
1
+ # API Development Tools v4.5.0
2
2
 
3
3
  ```
4
- ╔═══════════════════════════════════════════════════════════════╗
5
-
6
- ║ ██╗ ██╗██╗ ██╗███████╗████████╗██╗ ███████╗
7
- ║ ██║ ██║██║ ██║██╔════╝╚══██╔══╝██║ ██╔════╝
8
- ║ ███████║██║ ██║███████╗ ██║ ██║ █████╗
9
- ║ ██╔══██║██║ ██║╚════██║ ██║ ██║ ██╔══╝
10
- ║ ██║ ██║╚██████╔╝███████║ ██║ ███████╗███████╗
11
- ║ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚══════╝╚══════╝
12
-
13
- API Development Tools for Claude Code
14
-
15
- ╚═══════════════════════════════════════════════════════════════╝
4
+ ╔════════════════════════════════════════════════════════════════════════════════╗
5
+
6
+ ║ ██╗ ██╗██╗ ██╗███████╗████████╗██╗ ███████╗
7
+ ║ ██║ ██║██║ ██║██╔════╝╚══██╔══╝██║ ██╔════╝
8
+ ║ ███████║██║ ██║███████╗ ██║ ██║ █████╗
9
+ ║ ██╔══██║██║ ██║╚════██║ ██║ ██║ ██╔══╝
10
+ ║ ██║ ██║╚██████╔╝███████║ ██║ ███████╗███████╗
11
+ ║ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚══════╝╚══════╝
12
+
13
+ ╭───────────────────────────────────────╮
14
+ │ A P I D E V T O O L S │
15
+ ║ ╰───────────────────────────────────────╯ ║
16
+ ║ ║
17
+ ║ For Claude Code | VS Code | Cursor ║
18
+ ║ ║
19
+ ╚════════════════════════════════════════════════════════════════════════════════╝
16
20
  ```
17
21
 
18
- **Interview-driven, research-first API development with 14-phase TDD workflow**
22
+ > **A systematic approach to building Next.js applications with AI assistance.**
23
+ >
24
+ > Instead of letting AI improvise, this package enforces a structured 14-phase workflow:
25
+ > research the API docs first, use sensible defaults (or interview you about requirements),
26
+ > write failing tests, implement, then verify against the docs again. **Autonomous mode is
27
+ > ON by default** - interviews use comprehensive defaults, iterative phases loop until
28
+ > complete. Every step is tracked through 56 hooks.
29
+
30
+ **Interview-driven, research-first development with 14-phase TDD workflow**
19
31
 
20
32
  [![Agent Skills](https://img.shields.io/badge/Agent_Skills-Compatible-BA0C2F)](https://agentskills.io)
21
33
  [![Cross-Platform](https://img.shields.io/badge/Cross--Platform-Claude%20%7C%20VS%20Code%20%7C%20Cursor-000000)](https://github.com/hustle-together/api-dev-tools)
@@ -30,7 +42,7 @@
30
42
  | AI writes code from memory, not docs | ► Research-first workflow forces doc lookup |
31
43
  | Generic questions miss project context | ► Interview questions generated FROM research |
32
44
  | No verification after implementation | ► Phase 10 re-researches and compares to docs |
33
- | Easy to skip TDD steps | ► 22 hooks enforce phase completion |
45
+ | Easy to skip TDD steps | ► 56 hooks enforce phase completion |
34
46
  | Context dilutes over long conversations | ► Re-grounding every 7 turns |
35
47
  | No visibility into AI workflow | ► State tracking + NTFY push notifications |
36
48
 
@@ -51,9 +63,9 @@ The installer walks you through:
51
63
 
52
64
  ---
53
65
 
54
- ## Four Main Workflows
66
+ ## Five Main Workflows
55
67
 
56
- All four workflows share the same **14-phase structure** ensuring consistency across API, component, page, and orchestration development.
68
+ All five workflows share the same **14-phase structure** ensuring consistency across API, component, page, and orchestration development.
57
69
 
58
70
  ### 1. `/api-create [endpoint]` — Build API Endpoints
59
71
 
@@ -103,6 +115,26 @@ Combines multiple existing APIs into orchestrated endpoints:
103
115
 
104
116
  ---
105
117
 
118
+ ### 5. `/hustle-build [description]` — Build Complete Features
119
+
120
+ Master orchestrator that builds complete features from natural language. Decomposes requests into APIs, components, and pages, then executes them in dependency order:
121
+
122
+ ```bash
123
+ /hustle-build dashboard with user stats and activity charts
124
+ /hustle-build --auto --parallel e-commerce checkout flow
125
+ ```
126
+
127
+ **Flow:** Parse request → Decompose into workflows → Interview once (shared decisions) → Execute in dependency order → Wire together → Unified documentation
128
+
129
+ **Flags:**
130
+ - `--auto` — Fully autonomous, auto-answers all questions
131
+ - `--parallel` — Run up to 5 Opus agents in git worktrees
132
+ - `--resume [id]` — Resume interrupted build
133
+ - `--dry-run` — Show plan without executing
134
+ - `--max-iterations [N]` — Per-phase retry limit
135
+
136
+ ---
137
+
106
138
  ## How The Phases Work Together
107
139
 
108
140
  ```
@@ -139,30 +171,33 @@ Combines multiple existing APIs into orchestrated endpoints:
139
171
 
140
172
  ## What Gets Installed
141
173
 
142
- | Component | Count | Purpose |
143
- | ----------------- | ----- | --------------------------------------- |
144
- | Agent Skills | 23 | Cross-platform workflow commands |
145
- | Enforcement Hooks | 22 | Block progress until phases complete |
146
- | Subagents | 7 | Parallel research, schemas, tests, docs |
147
- | State Tracking | 1 | Track progress across sessions |
148
- | Research Cache | 1 | 7-day freshness documentation cache |
149
- | Templates | 4 | Component, page, env, MCP configs |
174
+ | Component | Count | Purpose |
175
+ | ----------------- | ----- | -------------------------------------------- |
176
+ | Agent Skills | 40+ | Cross-platform workflow commands |
177
+ | Enforcement Hooks | 56 | Phase enforcement, ADR generation, auto-answer |
178
+ | Subagents | 8 | Research, schemas, tests, docs, visual |
179
+ | Test Skills | 8 | Unit, E2E, visual, builds, review, debug |
180
+ | State Tracking | 1 | Track progress across sessions |
181
+ | Research Cache | 1 | 7-day freshness documentation cache |
182
+ | ADR System | 1 | Architecture Decision Records with registry |
183
+ | Templates | 6 | Brand page, review dashboard, showcases |
150
184
 
151
185
  ---
152
186
 
153
187
  ## Subagents
154
188
 
155
- Seven specialized agents run in parallel to speed up workflows:
189
+ Eight specialized agents run in parallel to speed up workflows:
156
190
 
157
- | Agent | Model | When Used |
158
- | ----------------------- | ------ | ------------------------------------ |
159
- | parallel-researcher | Haiku | Phase 3/5 - Scrape docs in parallel |
160
- | research-validator | Haiku | Phase 3/5 - Find endpoints, webhooks |
161
- | schema-generator | Sonnet | Phase 6 - Generate Zod schemas |
162
- | test-writer | Sonnet | Phase 8 - Write comprehensive tests |
163
- | implementation-reviewer | Sonnet | Phase 10 - Compare code to docs |
164
- | code-reviewer | Sonnet | Phase 11 - Greptile AI code review |
165
- | docs-generator | Haiku | Phase 13 - TypeDoc generation |
191
+ | Agent | Model | When Used |
192
+ | ----------------------- | ------ | --------------------------------------- |
193
+ | parallel-researcher | Haiku | Phase 3/5 - Scrape docs in parallel |
194
+ | research-validator | Haiku | Phase 3/5 - Find endpoints, webhooks |
195
+ | schema-generator | Sonnet | Phase 6 - Generate Zod schemas |
196
+ | test-writer | Sonnet | Phase 8 - Write comprehensive tests |
197
+ | implementation-reviewer | Sonnet | Phase 10 - Compare code to docs |
198
+ | code-reviewer | Sonnet | Phase 11 - AI code review |
199
+ | docs-generator | Haiku | Phase 13 - TypeDoc generation |
200
+ | visual-analyzer | Haiku | Visual testing - Screenshot AI analysis |
166
201
 
167
202
  ---
168
203
 
@@ -183,15 +218,107 @@ Notifications include:
183
218
 
184
219
  ---
185
220
 
186
- ## Additional Commands
221
+ ## API Showcase
187
222
 
188
- ### TDD Workflow
223
+ Interactive documentation and testing UI for all your APIs:
189
224
 
190
225
  ```bash
191
- /red # Write ONE failing test
192
- /green # Minimal implementation to pass
193
- /refactor # Clean up while tests pass
194
- /cycle [desc] # Complete Red → Green → Refactor
226
+ # Access at: http://localhost:3000/api-showcase
227
+ ```
228
+
229
+ **Features:**
230
+ - Grid view of all registered APIs with search and filtering
231
+ - Click any API to open interactive testing modal
232
+ - **Example Requests** - Pre-built, runnable examples that auto-fill query params
233
+ - **Try It** - Live API testing with real responses
234
+ - **Curl Examples** - Copy working curl commands
235
+ - **Documentation** - File locations, schemas, parameters
236
+
237
+ ### How Examples Work
238
+
239
+ Examples are generated from your Zod schema parameters during Phase 13 (Documentation):
240
+
241
+ ```json
242
+ // In registry.json - auto-generated from schema
243
+ "endpoints": {
244
+ "search": {
245
+ "params": [...],
246
+ "examples": {
247
+ "basic": {
248
+ "description": "Basic search request",
249
+ "query": "action=search&query=nature",
250
+ "curl": "curl -X GET 'http://localhost:3000/api/v2/unsplash?action=search&query=nature'"
251
+ }
252
+ }
253
+ }
254
+ }
255
+ ```
256
+
257
+ The showcase reads examples from `registry.json` and displays clickable buttons that auto-fill the request.
258
+
259
+ ---
260
+
261
+ ## TypeDoc Integration
262
+
263
+ Generate API documentation from TSDoc comments:
264
+
265
+ ```bash
266
+ pnpm typedoc # Generate docs to docs/api/
267
+ pnpm typedoc:watch # Watch mode for development
268
+ ```
269
+
270
+ TypeDoc runs during **Phase 13 (Documentation)** and generates Markdown documentation from:
271
+ - `src/lib/schemas/*.ts` - Zod schemas with TSDoc comments
272
+ - `src/app/api/**/*.ts` - API route handlers
273
+
274
+ Configuration: `typedoc.json` (installed by the CLI)
275
+
276
+ ---
277
+
278
+ ## All Slash Commands
279
+
280
+ > **Complete reference:** [docs/PHASE_REFERENCE.md](./docs/PHASE_REFERENCE.md) | [docs/SKILLS.md](./docs/SKILLS.md)
281
+
282
+ ### Main Workflows
283
+
284
+ ```bash
285
+ /api-create [endpoint] # Full 14-phase API workflow
286
+ /hustle-ui-create [name] # Component with Storybook
287
+ /hustle-ui-create-page [name] # Page with Playwright E2E
288
+ /hustle-combine [type] # Orchestrate existing APIs
289
+ /hustle-build [description] # Auto-decompose and build
290
+ ```
291
+
292
+ ### Phase-Specific (API Workflow)
293
+
294
+ ```bash
295
+ /api-research [library] # Phase 3: Targeted research
296
+ /api-interview [endpoint] # Phase 4: Questions from research
297
+ /api-env [endpoint] # Phase 7: Check API keys
298
+ /api-verify [endpoint] # Phase 10: Re-research and verify
299
+ /api-status [endpoint] # Any phase: Show progress
300
+ ```
301
+
302
+ ### TDD Commands
303
+
304
+ ```bash
305
+ /red # Phase 8: Write ONE failing test
306
+ /green # Phase 9: Minimal implementation to pass
307
+ /refactor # Phase 12: Clean up (tests stay green)
308
+ /cycle [desc] # Phase 8-12: Full TDD cycle
309
+ /spike # Pre-TDD: Exploratory coding
310
+ ```
311
+
312
+ ### Testing Suite
313
+
314
+ ```bash
315
+ /test-unit # Run Vitest unit tests with coverage
316
+ /test-e2e # Run Playwright E2E across browsers
317
+ /test-visual # Visual regression + AI screenshot analysis
318
+ /test-all # Complete suite (unit → e2e → visual → builds → review)
319
+ /test-builds # Verify builds across 5 platforms
320
+ /test-review # AI code review for security/performance
321
+ /test-debug # Diagnose test failures with traces
195
322
  ```
196
323
 
197
324
  ### Git Operations
@@ -200,39 +327,134 @@ Notifications include:
200
327
  /commit # Semantic commit with attribution
201
328
  /pr # Create pull request
202
329
  /busycommit # Multiple atomic commits
330
+ /worktree-add # Add git worktree from branch/issue
331
+ /worktree-cleanup # Clean up merged worktrees
203
332
  ```
204
333
 
205
- ### Planning
334
+ ### Planning & Analysis
206
335
 
207
336
  ```bash
208
337
  /plan [feature] # Create implementation plan
209
338
  /gap # Find unaddressed items
210
339
  /issue [url] # Plan from GitHub issue
340
+ /summarize # Summarize conversation progress
341
+ ```
342
+
343
+ ### Autonomous Mode
344
+
345
+ ```bash
346
+ /ralph-loop [task] # Start autonomous loop with self-termination
347
+ /ralph-status # Check current loop status
348
+ /ralph-continue # Continue interrupted loop
349
+ /parallel-spawn # Spawn parallel agents in git worktrees
350
+ ```
351
+
352
+ ### Utilities
353
+
354
+ ```bash
355
+ /token-report # Token usage by workflow phase
356
+ /docs-sync # Update documentation (Phase 13)
357
+ /hustle-brand # Brand guide creator
358
+ /shadcn [component] # ShadCN component documentation
359
+ /beepboop # AI attribution disclosure
360
+ /add-command # Guide for creating new skills
361
+ ```
362
+
363
+ ### Notifications
364
+
365
+ ```bash
366
+ /ntfy-setup # Configure NTFY push notifications
367
+ /ntfy-test # Send test notification
211
368
  ```
212
369
 
213
370
  ---
214
371
 
215
372
  ## Documentation
216
373
 
217
- | Document | Purpose |
218
- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
219
- | **[BEST_PRACTICES_ANALYSIS.md](./BEST_PRACTICES_ANALYSIS.md)** | Complete phase documentation with hook details, enforcement logic, and workflow diagrams. The authoritative reference for understanding how each phase works. |
220
- | **[INSTALLATION_GUIDE.md](./INSTALLATION_GUIDE.md)** | Step-by-step setup instructions including manual installation, MCP configuration, environment variables, and troubleshooting. |
221
- | **[.skills/README.md](./.skills/README.md)** | All 23 agent skills with usage examples, parameters, and cross-platform compatibility notes. |
222
- | **[CHANGELOG.md](./CHANGELOG.md)** | Version history with features and release notes. |
223
- | **[ROADMAP.md](./ROADMAP.md)** | Future features and enhancement plans including Phase 14 code review, async research, and more. |
374
+ ### Core Reference
375
+
376
+ | Document | Purpose |
377
+ | -------- | ------- |
378
+ | **[docs/PHASE_REFERENCE.md](./docs/PHASE_REFERENCE.md)** | **MASTER** Complete 14-phase matrix with hooks, skills, docs, and implementation status |
379
+ | **[docs/SKILLS.md](./docs/SKILLS.md)** | Complete slash command reference - all 38+ skills with usage and examples |
380
+ | **[docs/HOOKS.md](./docs/HOOKS.md)** | All 24 enforcement hooks - what they do and when they run |
381
+ | **[docs/AGENTS.md](./docs/AGENTS.md)** | Specialized subagents - parallel-researcher, schema-generator, visual-analyzer |
382
+ | **[docs/ORCHESTRATOR.md](./docs/ORCHESTRATOR.md)** | Master workflow controller - /hustle-build, decomposition, shared decisions |
383
+ | **[docs/PARALLEL_AUTONOMOUS_WORKFLOW.md](./docs/PARALLEL_AUTONOMOUS_WORKFLOW.md)** | Up to 5 Opus agents in parallel with git worktrees |
384
+ | **[docs/AUTONOMOUS_LOOPS.md](./docs/AUTONOMOUS_LOOPS.md)** | Ralph Wiggum pattern - self-terminating agent loops |
385
+ | **[docs/CONFIGURATION.md](./docs/CONFIGURATION.md)** | All configurable options, autonomous mode, logging & audit trail |
386
+ | **[docs/ARCHITECTURE_DECISION_RECORDS.md](./docs/ARCHITECTURE_DECISION_RECORDS.md)** | ADRs for significant decisions during research/interview phases |
387
+ | **[docs/REGROUNDING.md](./docs/REGROUNDING.md)** | 7-turn context refresh system - prevents "lost in the middle" problem |
388
+ | **[docs/PLUGIN_ARCHITECTURE.md](./docs/PLUGIN_ARCHITECTURE.md)** | How the plugin system works - installation, state, lifecycle |
389
+ | **[docs/BRAND_GUIDE.md](./docs/BRAND_GUIDE.md)** | Brand guide setup and ShadCN integration |
390
+ | **[docs/CLAUDE_CODE_BEST_PRACTICES.md](./docs/CLAUDE_CODE_BEST_PRACTICES.md)** | Industry best practices for Claude Code - hooks, subagents, context engineering |
391
+
392
+ ### Workflow Guides
393
+
394
+ | Document | Purpose |
395
+ | -------- | ------- |
396
+ | **[docs/API-CREATE.md](./docs/API-CREATE.md)** | Complete 14-phase API workflow reference with examples |
397
+ | **[docs/HUSTLE-UI-CREATE.md](./docs/HUSTLE-UI-CREATE.md)** | UI component workflow with Storybook integration |
398
+ | **[docs/HUSTLE-UI-CREATE-PAGE.md](./docs/HUSTLE-UI-CREATE-PAGE.md)** | Page workflow with Playwright E2E tests |
399
+ | **[docs/HUSTLE-COMBINE.md](./docs/HUSTLE-COMBINE.md)** | API orchestration patterns (sequential, parallel, conditional) |
400
+
401
+ ### Testing & Quality Assurance
402
+
403
+ Comprehensive testing documentation for verifying all 75 skills, 64 hooks, and 9 agents:
404
+
405
+ | Document | Purpose |
406
+ | -------- | ------- |
407
+ | **[TESTING_CHECKLIST.md](./TESTING_CHECKLIST.md)** | Complete checklist of 150+ behaviors to verify |
408
+ | **[AUTONOMOUS_TESTING.md](./AUTONOMOUS_TESTING.md)** | Self-healing test runner for overnight execution |
409
+
410
+ Quick verification after installation:
411
+ ```bash
412
+ ls .claude/commands/ | wc -l # Should be 30
413
+ find .skills -name "SKILL.md" | wc -l # Should be 44
414
+ find .claude/hooks -name "*.py" | wc -l # Should be 64
415
+ ls .claude/agents/ | wc -l # Should be 9
416
+ ```
417
+
418
+ ### Code Quality
419
+
420
+ | Document | Purpose |
421
+ | -------- | ------- |
422
+ | **[docs/PRE-COMMIT-SETUP.md](./docs/PRE-COMMIT-SETUP.md)** | Husky + lint-staged configuration for automated checks |
423
+ | **[docs/ESLINT-CONFIG.md](./docs/ESLINT-CONFIG.md)** | Type-aware ESLint with TypeScript integration |
424
+ | **[docs/SCHEMA-LINT.md](./docs/SCHEMA-LINT.md)** | Zod schema validation and linting rules |
425
+ | **[docs/SECURITY-AUDIT.md](./docs/SECURITY-AUDIT.md)** | Dependency audit, license check, secret scanning |
426
+
427
+ ### Guides
428
+
429
+ | Document | Purpose |
430
+ | -------- | ------- |
431
+ | **[INSTALLATION_GUIDE.md](./INSTALLATION_GUIDE.md)** | Step-by-step setup including MCP config, environment variables, troubleshooting |
432
+ | **[BEST_PRACTICES_ANALYSIS.md](./BEST_PRACTICES_ANALYSIS.md)** | Phase documentation with workflow diagrams and enforcement logic |
433
+ | **[.skills/README.md](./.skills/README.md)** | Agent Skills format compatibility and cross-platform notes |
434
+
435
+ ### Project Info
436
+
437
+ | Document | Purpose |
438
+ | -------- | ------- |
439
+ | **[CHANGELOG.md](./CHANGELOG.md)** | Version history with features and release notes |
440
+ | **[ROADMAP.md](./ROADMAP.md)** | Future features and enhancement plans |
224
441
 
225
442
  ---
226
443
 
227
444
  ## Configuration
228
445
 
229
- | File | Purpose |
230
- | ---------------------------- | -------------------------------------------- |
231
- | `.claude/settings.json` | Hook registration, tool permissions |
232
- | `.claude/api-dev-state.json` | Current workflow state, phase progress |
233
- | `.claude/research/` | Cached documentation with freshness tracking |
234
- | `.claude/registry.json` | All created APIs, components, pages |
235
- | `templates/.env.example` | Environment variable template |
446
+ > **Complete reference:** [docs/CONFIGURATION.md](./docs/CONFIGURATION.md)
447
+
448
+ | File | Purpose |
449
+ | ------------------------------------ | -------------------------------------------- |
450
+ | `.claude/settings.json` | Hook registration, tool permissions |
451
+ | `.claude/hustle-build-defaults.json` | Autonomous mode, ADR settings, defaults |
452
+ | `.claude/api-dev-state.json` | Current workflow state, phase progress |
453
+ | `.claude/research/` | Cached documentation with freshness tracking |
454
+ | `.claude/registry.json` | APIs, components, pages, ADRs registry |
455
+ | `.claude/workflow-logs/` | Auto-answer audit logs for post-hoc review |
456
+ | `.claude/adrs/` | Architecture Decision Records |
457
+ | `templates/.env.example` | Environment variable template |
236
458
 
237
459
  ---
238
460
 
@@ -255,6 +477,139 @@ npx @hustle-together/api-dev-tools --with-sandpack # Live code editing
255
477
 
256
478
  ---
257
479
 
480
+ ## FAQ
481
+
482
+ ### General
483
+
484
+ **Q: What's the main purpose of this package?**
485
+
486
+ A: To provide a systematic, research-first approach to building Next.js applications with AI. Instead of letting AI improvise from memory, this package enforces a 14-phase workflow that researches documentation first, interviews you about requirements, writes tests before code, and verifies the implementation against docs.
487
+
488
+ **Q: Does this work with Claude Code only?**
489
+
490
+ A: It's designed for Claude Code but works with any AI assistant that supports the Agent Skills format (VS Code, Cursor, etc). The hooks require Python 3.9+.
491
+
492
+ **Q: Is this for Next.js only?**
493
+
494
+ A: The workflows are optimized for Next.js (App Router), but the TDD patterns and research-first approach work with any framework. Component workflows assume React.
495
+
496
+ ---
497
+
498
+ ### Workflows
499
+
500
+ **Q: What's the difference between `/api-create` and `/hustle-build`?**
501
+
502
+ A: `/api-create` builds a single API endpoint through all 14 phases. `/hustle-build` is an orchestrator that can decompose complex requests ("build a dashboard with auth and payments") into multiple coordinated workflows.
503
+
504
+ **Q: Why 14 phases? Isn't that too many?**
505
+
506
+ A: Each phase serves a specific purpose. The research phases (3, 5) ensure we use current docs, not outdated training data. The interview phase (4) captures YOUR requirements, not generic assumptions. The verification phase (10) catches implementation drift. Skipping phases leads to bugs and rework.
507
+
508
+ **Q: Can I skip the interview phase?**
509
+
510
+ A: Yes, with autonomous mode (enabled by default). Set `autonomous.skip_interviews: true` in `.claude/hustle-build-defaults.json`. The system will auto-select comprehensive defaults based on "(Recommended)" options in skills. All auto-answers are logged to `.claude/workflow-logs/` for post-hoc review.
511
+
512
+ **Q: What are Architecture Decision Records (ADRs)?**
513
+
514
+ A: ADRs capture significant design decisions with context. During research, when multiple options are discovered (e.g., Supabase vs Firebase vs Postgres), an ADR is auto-generated with trade-offs. This gives users informed context BEFORE the interview. After selection, the ADR is updated with the decision. See [docs/ARCHITECTURE_DECISION_RECORDS.md](./docs/ARCHITECTURE_DECISION_RECORDS.md).
515
+
516
+ ---
517
+
518
+ ### Testing
519
+
520
+ **Q: What's the difference between E2E, Visual, and Storybook tests?**
521
+
522
+ | Test Type | Tool | What It Tests | When to Use |
523
+ |-----------|------|---------------|-------------|
524
+ | **E2E** | Playwright | Full user flows (click, type, navigate) | Critical paths: login, checkout |
525
+ | **Visual** | Playwright + Haiku | Screenshot comparison across viewports | UI regressions, responsive design |
526
+ | **Storybook** | Storybook | Component states in isolation | Component props, variants |
527
+ | **Unit** | Vitest | Functions, hooks, utilities | Business logic, data transforms |
528
+
529
+ **Q: How many viewports does visual testing cover?**
530
+
531
+ A: 7 viewports: Mobile (375px), Mobile Notch (393px), Mobile Landscape (667px), Tablet Portrait (768px), Tablet Landscape (1024px), Small Desktop (1280px), Desktop (1920px). Each includes safe area insets for notched devices.
532
+
533
+ **Q: What browsers does Playwright test?**
534
+
535
+ A: Chromium, Firefox, and WebKit. This covers all desktop browsers plus mobile webviews (Capacitor/Tauri use these same engines).
536
+
537
+ ---
538
+
539
+ ### Security
540
+
541
+ **Q: How does `/test-review` detect security issues?**
542
+
543
+ A: Two layers:
544
+ 1. **ESLint rules** (deterministic): `eslint-plugin-security` and `eslint-plugin-no-unsanitized` catch XSS, injection, path traversal, etc.
545
+ 2. **AI checklist** (structured): Follows a security checklist for auth, input validation, data exposure, OWASP Top 10.
546
+
547
+ **Q: What security vulnerabilities can it catch?**
548
+
549
+ SQL Injection, XSS, Command Injection, Path Traversal, Prototype Pollution, Auth Bypass, Exposed Secrets, CSRF, Rate Limiting gaps, ReDoS, and more.
550
+
551
+ ---
552
+
553
+ ### Multi-Platform
554
+
555
+ **Q: Can I build desktop/mobile apps?**
556
+
557
+ A: The package focuses on web-first development. For desktop, we recommend Tauri (lighter than Electron). For mobile, we recommend Capacitor (wraps your web app). Both use web technologies, so your Playwright tests cover them.
558
+
559
+ **Q: Do I need Expo or React Native?**
560
+
561
+ A: No. Expo/React Native are different codebases. Capacitor wraps your existing Next.js app in a native shell, no code rewrite needed.
562
+
563
+ ---
564
+
565
+ ### Registry & State
566
+
567
+ **Q: Are my settings saved between sessions?**
568
+
569
+ A: Yes. The `.claude/registry.json` persists project-wide and stores:
570
+ - All APIs, components, pages you've created
571
+ - Orchestrator defaults (error handling, auth method, etc.)
572
+ - Visual test results
573
+
574
+ The `.claude/api-dev-state.json` tracks current workflow progress (resets per workflow).
575
+
576
+ **Q: What does the registry track?**
577
+
578
+ APIs, Components, Pages, Hooks, Utils, Types, Context Providers, and Orchestrator Defaults.
579
+
580
+ ---
581
+
582
+ ### Token Usage
583
+
584
+ **Q: How do I track token costs?**
585
+
586
+ A: Run `/token-report` to see estimated token usage by phase. Uses ccusage to parse Claude Code logs. Note: Estimates may vary ±10% from actual billing.
587
+
588
+ **Q: Which phases use the most tokens?**
589
+
590
+ A: Typically Research phases (3, 5) use 40-50% of tokens. If this is too high, use more targeted search queries.
591
+
592
+ ---
593
+
594
+ ### Troubleshooting
595
+
596
+ **Q: Hooks aren't running - what's wrong?**
597
+
598
+ A: Check:
599
+ 1. Python 3.9+ is installed: `python3 --version`
600
+ 2. Hooks are executable: `chmod +x .claude/hooks/*.py`
601
+ 3. Settings.json has correct hook paths
602
+
603
+ **Q: Research is outdated - how do I refresh?**
604
+
605
+ A: Delete `.claude/research/[api-name]/` folder. Next workflow will re-research. Or wait 7 days (auto-refresh).
606
+
607
+ **Q: Workflow stopped mid-phase - how do I resume?**
608
+
609
+ A: Run `/api-status` to see current state, then run the appropriate phase command (e.g., `/green` if stopped during TDD Green).
610
+
611
+ ---
612
+
258
613
  ## Support
259
614
 
260
615
  - **Issues**: [GitHub Issues](https://github.com/hustle-together/api-dev-tools/issues)
@@ -262,4 +617,19 @@ npx @hustle-together/api-dev-tools --with-sandpack # Live code editing
262
617
 
263
618
  ---
264
619
 
620
+ ## Credits & Acknowledgments
621
+
622
+ This project incorporates patterns and techniques from the AI engineering community:
623
+
624
+ | Pattern | Credit | Reference |
625
+ |---------|--------|-----------|
626
+ | **Ralph Wiggum Pattern** | Geoffrey Huntley | [ghuntley.com/ralph](https://ghuntley.com/ralph/) |
627
+ | **TDD Workflow** | Kent Beck | Test-Driven Development methodology |
628
+ | **Context7 MCP** | Upstash | [context7.com](https://context7.com) |
629
+ | **GitHub MCP** | GitHub/Anthropic | Model Context Protocol |
630
+
631
+ See [docs/CLAUDE_CODE_BEST_PRACTICES.md](./docs/CLAUDE_CODE_BEST_PRACTICES.md) for complete acknowledgments.
632
+
633
+ ---
634
+
265
635
  **License:** MIT | **Author:** [Hustle Together](https://github.com/hustle-together)