@hustle-together/api-dev-tools 3.12.3 → 3.12.16

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 (96) hide show
  1. package/.claude/commands/hustle-build.md +259 -0
  2. package/.claude/commands/hustle-combine.md +1089 -0
  3. package/.claude/commands/hustle-ui-create-page.md +1078 -0
  4. package/.claude/commands/hustle-ui-create.md +1058 -0
  5. package/.claude/hooks/auto-answer.py +305 -0
  6. package/.claude/hooks/cache-research.py +337 -0
  7. package/.claude/hooks/check-api-routes.py +168 -0
  8. package/.claude/hooks/check-playwright-setup.py +103 -0
  9. package/.claude/hooks/check-storybook-setup.py +81 -0
  10. package/.claude/hooks/check-update.py +132 -0
  11. package/.claude/hooks/completion-promise-detector.py +293 -0
  12. package/.claude/hooks/context-capacity-warning.py +171 -0
  13. package/.claude/hooks/detect-interruption.py +165 -0
  14. package/.claude/hooks/docs-update-check.py +120 -0
  15. package/.claude/hooks/enforce-a11y-audit.py +202 -0
  16. package/.claude/hooks/enforce-brand-guide.py +241 -0
  17. package/.claude/hooks/enforce-component-type-confirm.py +97 -0
  18. package/.claude/hooks/enforce-dry-run.py +134 -0
  19. package/.claude/hooks/enforce-freshness.py +184 -0
  20. package/.claude/hooks/enforce-page-components.py +186 -0
  21. package/.claude/hooks/enforce-page-data-schema.py +155 -0
  22. package/.claude/hooks/enforce-questions-sourced.py +146 -0
  23. package/.claude/hooks/enforce-schema-from-interview.py +248 -0
  24. package/.claude/hooks/enforce-ui-disambiguation.py +108 -0
  25. package/.claude/hooks/enforce-ui-interview.py +130 -0
  26. package/.claude/hooks/generate-adr-options.py +282 -0
  27. package/.claude/hooks/generate-manifest-entry.py +1161 -0
  28. package/.claude/hooks/hook_utils.py +609 -0
  29. package/.claude/hooks/lib/__init__.py +1 -0
  30. package/.claude/hooks/lib/__pycache__/__init__.cpython-314.pyc +0 -0
  31. package/.claude/hooks/lib/__pycache__/greptile.cpython-314.pyc +0 -0
  32. package/.claude/hooks/lib/__pycache__/ntfy.cpython-314.pyc +0 -0
  33. package/.claude/hooks/lib/greptile.py +355 -0
  34. package/.claude/hooks/lib/ntfy.py +209 -0
  35. package/.claude/hooks/notify-input-needed.py +73 -0
  36. package/.claude/hooks/notify-phase-complete.py +90 -0
  37. package/.claude/hooks/ntfy-on-question.py +240 -0
  38. package/.claude/hooks/orchestrator-completion.py +313 -0
  39. package/.claude/hooks/orchestrator-handoff.py +267 -0
  40. package/.claude/hooks/orchestrator-session-startup.py +146 -0
  41. package/.claude/hooks/parallel-orchestrator.py +451 -0
  42. package/.claude/hooks/project-document-prompt.py +302 -0
  43. package/.claude/hooks/remote-question-proxy.py +284 -0
  44. package/.claude/hooks/remote-question-server.py +1224 -0
  45. package/.claude/hooks/run-code-review.py +393 -0
  46. package/.claude/hooks/run-visual-qa.py +338 -0
  47. package/.claude/hooks/session-logger.py +323 -0
  48. package/.claude/hooks/test-orchestrator-reground.py +248 -0
  49. package/.claude/hooks/track-scope-coverage.py +220 -0
  50. package/.claude/hooks/track-token-usage.py +121 -0
  51. package/.claude/hooks/update-adr-decision.py +236 -0
  52. package/.claude/hooks/update-api-showcase.py +161 -0
  53. package/.claude/hooks/update-registry.py +352 -0
  54. package/.claude/hooks/update-testing-checklist.py +195 -0
  55. package/.claude/hooks/update-ui-showcase.py +224 -0
  56. package/.claude/settings.local.json +7 -1
  57. package/.claude/test-auto-answer-bot.py +183 -0
  58. package/.claude/test-completion-detector.py +263 -0
  59. package/.claude/test-orchestrator-state.json +20 -0
  60. package/.claude/test-orchestrator.sh +271 -0
  61. package/.skills/api-create/SKILL.md +88 -3
  62. package/.skills/docs-sync/SKILL.md +260 -0
  63. package/.skills/hustle-build/SKILL.md +459 -0
  64. package/.skills/hustle-build-review/SKILL.md +518 -0
  65. package/CHANGELOG.md +87 -0
  66. package/README.md +86 -9
  67. package/bin/cli.js +1302 -88
  68. package/commands/hustle-api-create.md +22 -0
  69. package/commands/hustle-combine.md +81 -2
  70. package/commands/hustle-ui-create-page.md +84 -2
  71. package/commands/hustle-ui-create.md +82 -2
  72. package/hooks/auto-answer.py +228 -0
  73. package/hooks/check-update.py +132 -0
  74. package/hooks/ntfy-on-question.py +227 -0
  75. package/hooks/orchestrator-completion.py +313 -0
  76. package/hooks/orchestrator-handoff.py +189 -0
  77. package/hooks/orchestrator-session-startup.py +146 -0
  78. package/hooks/periodic-reground.py +230 -67
  79. package/hooks/update-api-showcase.py +13 -1
  80. package/hooks/update-ui-showcase.py +13 -1
  81. package/package.json +7 -3
  82. package/scripts/extract-schema-docs.cjs +322 -0
  83. package/templates/CLAUDE-SECTION.md +89 -64
  84. package/templates/api-showcase/_components/APIModal.tsx +100 -8
  85. package/templates/api-showcase/_components/APIShowcase.tsx +36 -4
  86. package/templates/api-showcase/_components/APITester.tsx +367 -58
  87. package/templates/docs/page.tsx +230 -0
  88. package/templates/hustle-build-defaults.json +84 -0
  89. package/templates/hustle-dev-dashboard/page.tsx +365 -0
  90. package/templates/playwright-report/page.tsx +258 -0
  91. package/templates/settings.json +88 -7
  92. package/templates/test-results/page.tsx +237 -0
  93. package/templates/typedoc.json +19 -0
  94. package/templates/ui-showcase/_components/UIShowcase.tsx +1 -1
  95. package/templates/ui-showcase/page.tsx +1 -1
  96. package/.claude/api-dev-state.json +0 -466
@@ -0,0 +1,259 @@
1
+ # Hustle Build - Master Orchestrator v4.6.0
2
+
3
+ **Usage:** `/hustle-build [description] [--auto] [--parallel] [--resume] [--dry-run]`
4
+
5
+ **Purpose:** Build complete features from natural language descriptions. Orchestrates API, Component, Page, and Combined workflows automatically with shared decisions.
6
+
7
+ ## Arguments
8
+
9
+ - `$ARGUMENTS` - Natural language description of what to build
10
+ - `--auto` - Fully autonomous mode, auto-answers questions with comprehensive defaults
11
+ - `--parallel` - Run up to 5 Opus agents in parallel (requires worktrees)
12
+ - `--resume [id]` - Resume an interrupted build from last checkpoint
13
+ - `--dry-run` - Show what would be created without executing
14
+ - `--max-iterations [N]` - Max retry iterations per phase (default: 5)
15
+ - `--skip-document` - Skip the project document prompt
16
+ - `--from-document [path]` - Use specified file as project document (PRD, spec)
17
+
18
+ ---
19
+
20
+ ## Quick Start
21
+
22
+ ```bash
23
+ # Simple build
24
+ /hustle-build weather dashboard with search and forecast
25
+
26
+ # With a PRD/spec document
27
+ /hustle-build --from-document ./specs/feature.md
28
+
29
+ # Fully autonomous
30
+ /hustle-build --auto e-commerce checkout with cart and payments
31
+
32
+ # Parallel execution (5 agents)
33
+ /hustle-build --parallel dashboard with stats, charts, and user settings
34
+ ```
35
+
36
+ ---
37
+
38
+ ## 10-Phase Workflow
39
+
40
+ ### Phase 1: Document Intake & Parsing
41
+ - Prompts for project document (PRD, spec, requirements)
42
+ - Parses document to extract pages, components, APIs
43
+ - Builds dependency graph
44
+ - User approves decomposition
45
+
46
+ ### Phase 2: Decomposition
47
+ - Analyzes request to identify:
48
+ - **APIs** needed (Tier 1 - no dependencies)
49
+ - **Components** needed (Tier 2 - depend on APIs)
50
+ - **Pages** needed (Tier 3 - depend on components)
51
+ - Determines execution order based on dependencies
52
+
53
+ ### Phase 3: Orchestrator Interview
54
+ - Single interview for shared decisions:
55
+ - Authentication method
56
+ - Error handling strategy
57
+ - Brand guide usage
58
+ - Caching strategy
59
+ - Answers propagate to ALL sub-workflows
60
+
61
+ ### Phases 4-6: Sub-Workflow Execution
62
+ - Executes each workflow with injected context
63
+ - Uses `/api-create` for APIs
64
+ - Uses `/hustle-ui-create` for components
65
+ - Uses `/hustle-ui-create-page` for pages
66
+ - Ralph Wiggum loops ensure quality
67
+
68
+ ### Phase 7: Integration & Wiring
69
+ - Connects components to API data
70
+ - Wires up state management
71
+ - Creates data flow patterns
72
+
73
+ ### Phase 8: Unified Testing
74
+ - Runs full test suite across all created elements
75
+ - Integration tests for API → Component → Page flow
76
+ - Visual regression tests
77
+
78
+ ### Phase 9: Documentation
79
+ - Updates registry with all new elements
80
+ - Generates API documentation
81
+ - Creates component Storybook stories
82
+
83
+ ### Phase 10: Completion
84
+ - Final verification
85
+ - Commits all changes
86
+ - Summary of created elements
87
+
88
+ ---
89
+
90
+ ## Auto Mode (`--auto`)
91
+
92
+ When `--auto` flag is used:
93
+
94
+ 1. **No Interactive Questions:**
95
+ - All questions auto-answered with comprehensive defaults
96
+ - Uses `.claude/hustle-build-defaults.json` for configured answers
97
+ - Falls back to "most comprehensive" option when no default exists
98
+
99
+ 2. **Default Selections:**
100
+ - Auth: As configured in defaults (typically JWT or API Key)
101
+ - Error Handling: partial-success
102
+ - Brand Guide: enabled
103
+ - Testing: full coverage
104
+
105
+ 3. **Logging:**
106
+ - All decisions logged to `.claude/hustle-build-state.json`
107
+ - Review with `/hustle-build-review [build-id]`
108
+
109
+ ---
110
+
111
+ ## Parallel Execution (`--parallel`)
112
+
113
+ When `--parallel` flag is used:
114
+
115
+ 1. **Creates git worktrees** for each independent workflow
116
+ 2. **Spawns up to 5 Opus agents** simultaneously
117
+ 3. **Injects shared decisions** from interview into each agent
118
+ 4. **Merges results** when all complete
119
+
120
+ ```
121
+ ┌─────────────────────────────────────────────────────────────────┐
122
+ │ PARALLEL ORCHESTRATOR │
123
+ ├─────────────────────────────────────────────────────────────────┤
124
+ │ Shared Context (from Interview) │
125
+ │ ┌───────────────────────────────────────────────────────┐ │
126
+ │ │ Auth: JWT | Errors: partial-success | Brand: yes │ │
127
+ │ └───────────────────────────────────────────────────────┘ │
128
+ │ │ │
129
+ │ ┌───────────────┼───────────────┐ │
130
+ │ ▼ ▼ ▼ │
131
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
132
+ │ │ Agent #1 │ │ Agent #2 │ │ Agent #3 │ │
133
+ │ │ /api-create │ │ /api-create │ │ /hustle-ui │ │
134
+ │ │ user-stats │ │ chart-data │ │ StatCard │ │
135
+ │ └──────────────┘ └──────────────┘ └──────────────┘ │
136
+ │ │ │ │ │
137
+ │ └───────────────┼───────────────┘ │
138
+ │ ▼ │
139
+ │ ┌───────────────────────────────────────────────────────┐ │
140
+ │ │ MERGE COORDINATOR │ │
141
+ │ │ • Combines registry entries │ │
142
+ │ │ • Resolves conflicts │ │
143
+ │ │ • Creates unified PR │ │
144
+ │ └───────────────────────────────────────────────────────┘ │
145
+ └─────────────────────────────────────────────────────────────────┘
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Ralph Wiggum Loops (Self-Terminating)
151
+
152
+ Each quality gate loops until passing:
153
+
154
+ | Phase | Loop Until | Promise Signal |
155
+ |-------|-----------|----------------|
156
+ | TDD Green | All tests pass | `<promise>TESTS_PASSING</promise>` |
157
+ | Code Review | Greptile clean | `<promise>REVIEW_CLEAN</promise>` |
158
+ | Visual QA | Haiku approves | `<promise>VISUAL_CLEAN</promise>` |
159
+ | Verification | Docs match code | `<promise>VERIFIED</promise>` |
160
+
161
+ ---
162
+
163
+ ## State Tracking
164
+
165
+ All progress tracked in `.claude/hustle-build-state.json`:
166
+
167
+ ```json
168
+ {
169
+ "build_id": "weather-dashboard-20231215",
170
+ "status": "in_progress",
171
+ "current_phase": 4,
172
+ "decomposition": {
173
+ "apis": ["weather-current", "weather-forecast"],
174
+ "components": ["SearchBar", "WeatherCard", "ForecastList"],
175
+ "pages": ["WeatherDashboard"]
176
+ },
177
+ "shared_decisions": {
178
+ "auth": "none",
179
+ "error_handling": "partial-success",
180
+ "brand_guide": true
181
+ },
182
+ "completed_workflows": ["weather-current", "weather-forecast"],
183
+ "pending_workflows": ["SearchBar", "WeatherCard"]
184
+ }
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Remote Dashboard
190
+
191
+ Monitor builds from your phone:
192
+
193
+ ```bash
194
+ # Start the dashboard server
195
+ python hooks/remote-question-server.py
196
+ ```
197
+
198
+ Access at `http://localhost:8765` or `http://YOUR_COMPUTER_IP:8765` on same network.
199
+
200
+ Features:
201
+ - Real-time phase progress
202
+ - Answer questions remotely
203
+ - Browser notifications for new questions
204
+ - Build queue visualization
205
+
206
+ ---
207
+
208
+ ## Examples
209
+
210
+ ### Example 1: Weather Dashboard
211
+ ```
212
+ /hustle-build weather dashboard with city search, current conditions, and 5-day forecast
213
+ ```
214
+
215
+ Creates:
216
+ - `weather-geocoding` API (Open-Meteo)
217
+ - `weather-forecast` API (Open-Meteo)
218
+ - `SearchBar` component
219
+ - `WeatherCard` component
220
+ - `ForecastList` component
221
+ - `WeatherDashboard` page
222
+
223
+ ### Example 2: E-commerce Checkout
224
+ ```
225
+ /hustle-build --auto checkout flow with cart summary, payment form, and order confirmation
226
+ ```
227
+
228
+ Creates:
229
+ - `cart` API
230
+ - `payments` API (Stripe)
231
+ - `orders` API
232
+ - `CartSummary` component
233
+ - `PaymentForm` component
234
+ - `OrderConfirmation` component
235
+ - `CheckoutPage` page
236
+
237
+ ### Example 3: User Dashboard
238
+ ```
239
+ /hustle-build --parallel user dashboard with profile, stats, activity feed, and settings
240
+ ```
241
+
242
+ Creates (in parallel):
243
+ - `user-profile` API
244
+ - `user-stats` API
245
+ - `activity-feed` API
246
+ - `ProfileCard` component
247
+ - `StatsGrid` component
248
+ - `ActivityFeed` component
249
+ - `SettingsPanel` component
250
+ - `DashboardPage` page
251
+
252
+ ---
253
+
254
+ ## See Also
255
+
256
+ - `/hustle-combine` - Combine existing APIs/components
257
+ - `/hustle-ui-create` - Create single component
258
+ - `/hustle-ui-create-page` - Create single page
259
+ - `/api-create` - Create single API integration