@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
@@ -0,0 +1,351 @@
1
+ ---
2
+ name: adr-deep-research
3
+ description: Research technology options for Architecture Decision Records. Spawns parallel agents to fetch official docs, extract pros/cons, pricing, and best-use cases. Creates substantive ADRs before interview phase.
4
+ license: MIT
5
+ compatibility: Requires Claude Code with MCP servers (Context7, GitHub), Python 3.9+ for hooks
6
+ metadata:
7
+ version: "1.0.0"
8
+ category: "research"
9
+ tags: ['adr', 'research', 'architecture', 'decisions']
10
+ author: "Hustle Together"
11
+ allowed-tools: WebSearch WebFetch mcp__context7 Task Read Write Edit TodoWrite
12
+ ---
13
+
14
+ # ADR Deep Research - Technology Option Investigation
15
+
16
+ **Usage:** `/adr-deep-research [category]`
17
+
18
+ **Purpose:** Research each option for an Architecture Decision Record with real documentation, creating substantive pros/cons before the interview phase.
19
+
20
+ ## When This Skill Runs
21
+
22
+ This skill is triggered when:
23
+
24
+ 1. `generate-adr-options.py` hook detects a significant decision during research
25
+ 2. A pending request exists in `.claude/adr-requests/pending-{category}.json`
26
+ 3. User needs informed choices before the interview phase
27
+
28
+ ## What It Does
29
+
30
+ ```
31
+ ┌─────────────────────────────────────────────────────────────────┐
32
+ │ ADR DEEP RESEARCH FLOW │
33
+ ├─────────────────────────────────────────────────────────────────┤
34
+ │ │
35
+ │ 1. Read pending request: │
36
+ │ .claude/adr-requests/pending-database.json │
37
+ │ { │
38
+ │ "category": "database", │
39
+ │ "options": ["supabase", "firebase", "postgres"], │
40
+ │ "context": "User building todo app with React" │
41
+ │ } │
42
+ │ │
43
+ │ 2. Spawn parallel adr-researcher agents (one per option): │
44
+ │ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
45
+ │ │ Agent #1 │ │ Agent #2 │ │ Agent #3 │ │
46
+ │ │ supabase │ │ firebase │ │ postgres │ │
47
+ │ │ → docs │ │ → docs │ │ → docs │ │
48
+ │ │ → pros/cons │ │ → pros/cons │ │ → pros/cons │ │
49
+ │ └──────────────┘ └──────────────┘ └──────────────┘ │
50
+ │ │
51
+ │ 3. Merge results into ADR document: │
52
+ │ .claude/adrs/ADR-NNNN-database-choice.md │
53
+ │ - Real pros/cons from official docs │
54
+ │ - Pricing information │
55
+ │ - Best-for recommendations │
56
+ │ - Source URLs for verification │
57
+ │ │
58
+ │ 4. Update state and registry: │
59
+ │ - Mark request as processed │
60
+ │ - Add ADR to registry │
61
+ │ - Inject context for interview │
62
+ │ │
63
+ └─────────────────────────────────────────────────────────────────┘
64
+ ```
65
+
66
+ ## Process Steps
67
+
68
+ ### Step 1: Read Pending Request
69
+
70
+ ```bash
71
+ # Check for pending request
72
+ cat .claude/adr-requests/pending-{category}.json
73
+ ```
74
+
75
+ Expected format:
76
+
77
+ ```json
78
+ {
79
+ "category": "database",
80
+ "options": ["supabase", "firebase", "postgres"],
81
+ "context": "User building todo app with React frontend",
82
+ "endpoint": "todo-api",
83
+ "status": "pending",
84
+ "created_at": "2025-12-30T10:00:00Z"
85
+ }
86
+ ```
87
+
88
+ ### Step 2: Spawn Parallel Research Agents
89
+
90
+ For each option in the request, spawn an `adr-researcher` agent in parallel:
91
+
92
+ ```
93
+ Use Task tool with subagent_type="adr-researcher" for each option.
94
+
95
+ Spawn ALL agents in a SINGLE message (parallel execution).
96
+ ```
97
+
98
+ **Agent prompt template:**
99
+
100
+ ```
101
+ Research the following technology option for an ADR decision:
102
+
103
+ Option: {option}
104
+ Category: {category}
105
+ Context: {context}
106
+ Comparison Options: {other_options}
107
+
108
+ Return structured JSON with:
109
+ - pros (3-5 specific, factual)
110
+ - cons (3-5 specific, factual)
111
+ - best_for (1-2 ideal use cases)
112
+ - pricing (free tier, paid tiers)
113
+ - limitations (technical constraints)
114
+ - sources (documentation URLs)
115
+ ```
116
+
117
+ ### Step 3: Collect and Merge Results
118
+
119
+ Wait for all agents to complete, then merge results into a unified ADR:
120
+
121
+ ```markdown
122
+ # ADR-{NNNN}: {Category} Choice
123
+
124
+ **Status:** PROPOSED
125
+ **Date:** {date}
126
+ **Category:** {category}
127
+ **Context:** {context}
128
+ **Endpoint:** {endpoint}
129
+
130
+ ## Options Considered
131
+
132
+ ### Option 1: {Option A} (Recommended)
133
+
134
+ **Pros:**
135
+ - {Real pro from research}
136
+ - {Real pro from research}
137
+ - {Real pro from research}
138
+
139
+ **Cons:**
140
+ - {Real con from research}
141
+ - {Real con from research}
142
+
143
+ **Best For:** {Use cases from research}
144
+
145
+ **Pricing:** {Pricing from research}
146
+
147
+ **Source:** {URL from research}
148
+
149
+ ### Option 2: {Option B}
150
+
151
+ ... (same structure)
152
+
153
+ ## Decision
154
+
155
+ _Awaiting user selection in interview phase_
156
+
157
+ ## Consequences
158
+
159
+ _Will be filled after decision is made_
160
+ ```
161
+
162
+ ### Step 4: Determine Recommendation
163
+
164
+ Based on research, mark ONE option as `(Recommended)` using these criteria:
165
+
166
+ 1. **Match to context** - Which fits user's stated project best?
167
+ 2. **Developer experience** - Which has better docs, easier setup?
168
+ 3. **Cost effectiveness** - Which has best free tier for MVPs?
169
+ 4. **Community/support** - Which has more active community?
170
+
171
+ ### Step 5: Update State and Registry
172
+
173
+ Mark request as processed:
174
+
175
+ ```json
176
+ {
177
+ "status": "completed",
178
+ "completed_at": "2025-12-30T10:15:00Z",
179
+ "adr_file": ".claude/adrs/ADR-0001-database-choice.md"
180
+ }
181
+ ```
182
+
183
+ Add to registry:
184
+
185
+ ```json
186
+ {
187
+ "adrs": {
188
+ "0001-database-choice": {
189
+ "number": 1,
190
+ "title": "Database Choice",
191
+ "status": "proposed",
192
+ "date": "2025-12-30",
193
+ "category": "database",
194
+ "options_considered": ["supabase", "firebase", "postgres"],
195
+ "recommended": "supabase",
196
+ "file": ".claude/adrs/ADR-0001-database-choice.md",
197
+ "endpoint": "todo-api"
198
+ }
199
+ }
200
+ }
201
+ ```
202
+
203
+ ### Step 6: Output Summary
204
+
205
+ ```
206
+ ═══════════════════════════════════════════════════════════════════
207
+ ADR RESEARCH COMPLETE
208
+ ═══════════════════════════════════════════════════════════════════
209
+
210
+ Category: database
211
+ Options Researched: 3
212
+ • Supabase (Recommended)
213
+ • Firebase
214
+ • PostgreSQL + Prisma
215
+
216
+ ADR Created: .claude/adrs/ADR-0001-database-choice.md
217
+
218
+ Key Findings:
219
+ ───────────────────────────────────────
220
+ Supabase: Real-time + Auth built-in, free tier generous
221
+ Firebase: Google ecosystem, NoSQL only
222
+ PostgreSQL: Full control, more setup required
223
+ ───────────────────────────────────────
224
+
225
+ This ADR will be referenced during the interview phase.
226
+ The user can review options and select their preference.
227
+
228
+ ═══════════════════════════════════════════════════════════════════
229
+ ```
230
+
231
+ ## ADR Output Template
232
+
233
+ Use this template for the generated ADR:
234
+
235
+ ```markdown
236
+ # ADR-{NUMBER}: {Title}
237
+
238
+ **Status:** PROPOSED | ACCEPTED | DEPRECATED | SUPERSEDED
239
+ **Date:** YYYY-MM-DD
240
+ **Category:** {category}
241
+ **Context:** {user's project context}
242
+ **Endpoint:** {related endpoint if any}
243
+
244
+ ## Context
245
+
246
+ {Why this decision needs to be made}
247
+
248
+ ## Options Considered
249
+
250
+ ### Option 1: {Name} (Recommended)
251
+
252
+ **Pros:**
253
+ - {Specific, factual pro with detail}
254
+ - {Specific, factual pro with detail}
255
+ - {Specific, factual pro with detail}
256
+
257
+ **Cons:**
258
+ - {Specific, factual con with detail}
259
+ - {Specific, factual con with detail}
260
+
261
+ **Best For:** {Ideal use cases}
262
+
263
+ **Pricing:**
264
+ - Free: {limits}
265
+ - Paid: {tiers}
266
+
267
+ **Source:** {URL}
268
+
269
+ ### Option 2: {Name}
270
+
271
+ {Same structure}
272
+
273
+ ### Option 3: {Name}
274
+
275
+ {Same structure}
276
+
277
+ ## Decision
278
+
279
+ _Awaiting user selection in interview phase_
280
+
281
+ ## Consequences
282
+
283
+ _Will be filled after decision is made_
284
+
285
+ ## Research Metadata
286
+
287
+ | Aspect | Details |
288
+ |--------|---------|
289
+ | Researched | {timestamp} |
290
+ | Sources | {count} official docs |
291
+ | Agents | {count} parallel researchers |
292
+ | Duration | {time} |
293
+ ```
294
+
295
+ ## Configuration
296
+
297
+ ADR categories and keywords are configured in `.claude/hustle-build-defaults.json`:
298
+
299
+ ```json
300
+ {
301
+ "adr": {
302
+ "enabled": true,
303
+ "significant_decisions": {
304
+ "database": ["supabase", "firebase", "postgres", "mysql", "mongodb"],
305
+ "auth": ["api key", "oauth", "jwt", "session", "cookie"],
306
+ "cache": ["redis", "memcached", "in-memory", "cdn"],
307
+ "hosting": ["vercel", "netlify", "aws", "cloudflare"],
308
+ "state": ["redux", "zustand", "jotai", "context"],
309
+ "styling": ["tailwind", "css modules", "styled-components"]
310
+ },
311
+ "min_options_for_adr": 2
312
+ }
313
+ }
314
+ ```
315
+
316
+ ## Directory Structure
317
+
318
+ ```
319
+ .claude/
320
+ ├── adr-requests/
321
+ │ ├── pending-database.json # Awaiting research
322
+ │ ├── pending-auth.json # Awaiting research
323
+ │ └── completed-database.json # Research done
324
+ ├── adrs/
325
+ │ ├── ADR-0001-database-choice.md
326
+ │ ├── ADR-0002-auth-method.md
327
+ │ └── index.json # ADR catalog
328
+ └── registry.json # Includes adrs section
329
+ ```
330
+
331
+ ## Integration Points
332
+
333
+ - **Triggered by:** `hooks/generate-adr-options.py` (PostToolUse)
334
+ - **Uses agent:** `.claude/agents/adr-researcher.md`
335
+ - **Updates:** `.claude/registry.json` with ADR entries
336
+ - **Referenced by:** `/api-interview` for informed user choices
337
+
338
+ ## Error Handling
339
+
340
+ | Error | Action |
341
+ |-------|--------|
342
+ | No pending request | Log warning, exit gracefully |
343
+ | Agent fails | Use fallback research (WebSearch directly) |
344
+ | Partial results | Create ADR with available data, mark incomplete |
345
+ | Rate limited | Retry with backoff, continue with other options |
346
+
347
+ ## See Also
348
+
349
+ - `/api-research` - General API documentation research
350
+ - `/api-interview` - Interview phase that uses ADR context
351
+ - `docs/ARCHITECTURE_DECISION_RECORDS.md` - Full ADR documentation
@@ -4,19 +4,98 @@ description: Complete API development workflow using interview-driven, research-
4
4
  license: MIT
5
5
  compatibility: Requires Claude Code with MCP servers (Context7 for docs, GitHub for PRs), Python 3.9+ for enforcement hooks, pnpm 10.11.0+ for package management, Vitest for testing
6
6
  metadata:
7
- version: "3.0.0"
7
+ version: "4.0.0"
8
8
  category: "development"
9
9
  tags: ["api", "tdd", "workflow", "research", "interview", "verification", "testing"]
10
10
  author: "Hustle Together"
11
11
  allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read Write Edit Bash TodoWrite
12
12
  ---
13
13
 
14
- # API Create - Comprehensive API Development Workflow v3.0
14
+ # API Create - Comprehensive API Development Workflow v4.0
15
15
 
16
- **Usage:** `/api-create [endpoint-name]`
16
+ **Usage:** `/api-create [endpoint-name] [--auto] [--resume [workflow-id]]`
17
17
 
18
18
  **Purpose:** Orchestrates the complete API development workflow using interview-driven, research-first, test-first methodology with continuous verification loops.
19
19
 
20
+ ## Arguments
21
+
22
+ - `[endpoint-name]` - Name of the API endpoint to create
23
+ - `--auto` - Fully autonomous mode, auto-answers all questions with comprehensive defaults
24
+ - `--resume [workflow-id]` - Resume an interrupted workflow from its last phase
25
+
26
+ ---
27
+
28
+ ## Auto Mode (`--auto`)
29
+
30
+ When `--auto` flag is used:
31
+
32
+ 1. **No Interactive Questions:**
33
+ - All questions auto-answered with comprehensive defaults
34
+ - Uses `.claude/hustle-build-defaults.json` for configured answers
35
+ - Falls back to "most comprehensive" option when no default exists
36
+
37
+ 2. **Comprehensive Selection Logic:**
38
+ - Always selects options that include ALL available features
39
+ - Always enables ALL testing levels
40
+ - Always generates ALL documentation
41
+ - Prefers "Yes" over "No" for optional features
42
+
43
+ 3. **Phase Execution:**
44
+ - ALL phases MUST execute - no skipping in auto mode
45
+ - Phase 10 (Verify): MUST re-research and compare to implementation
46
+ - Phase 11 (Code Review): Run if GREPTILE_API_KEY exists, else mark "no API key" but still complete
47
+ - Phase 12 (Refactor): MUST run basic refactoring even if no review issues
48
+
49
+ 4. **Error Handling:**
50
+ - Test failures: Retry 3x, then fix issues
51
+ - Verification gaps: Add tests to cover gaps, then fix
52
+ - Missing API keys: Log warning but complete the phase
53
+
54
+ 5. **Logging:**
55
+ - All decisions logged to `.claude/workflow-logs/api-create/[workflow-id].json`
56
+ - Review with `/api-create-review [workflow-id]`
57
+
58
+ **Example:**
59
+ ```bash
60
+ /api-create brandfetch --auto
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Resume Mode (`--resume`)
66
+
67
+ When `--resume [workflow-id]` is used:
68
+
69
+ 1. Load state from `.claude/api-dev-state.json`
70
+ 2. Find the last incomplete phase
71
+ 3. Continue from that point
72
+ 4. Preserve all previous decisions
73
+
74
+ **Example:**
75
+ ```bash
76
+ /api-create --resume wf-brandfetch-2025-12-28
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Orchestrated Mode
82
+
83
+ When running as part of `/hustle-build`:
84
+
85
+ 1. `orchestrated: true` flag is set in state
86
+ 2. `shared_decisions` are pre-filled from orchestrator interview
87
+ 3. Questions covered by shared_decisions are SKIPPED
88
+ 4. Only workflow-specific questions are asked
89
+
90
+ Check for orchestration at startup:
91
+ ```python
92
+ if state.get("orchestrated"):
93
+ # Skip questions in shared_decisions_applied
94
+ skip_questions = state.get("shared_decisions_applied", [])
95
+ ```
96
+
97
+ ---
98
+
20
99
  ## ⚠️ CRITICAL: MANDATORY USER INTERACTION
21
100
 
22
101
  **YOU MUST USE THE `AskUserQuestion` TOOL AT EVERY CHECKPOINT.**
@@ -172,7 +251,7 @@ TodoWrite([
172
251
  │ "header": "Disambig", │
173
252
  │ "multiSelect": false, │
174
253
  │ "options": [ │
175
- │ {"label": "REST API", "description": "Official API"},│
254
+ │ {"label": "REST API (Recommended)", "description": "Official API"},│
176
255
  │ {"label": "SDK/Package", "description": "NPM wrapper"},│
177
256
  │ {"label": "Both", "description": "API + SDK"} │
178
257
  │ ] │
@@ -197,7 +276,7 @@ TodoWrite([
197
276
  │ Is this correct?", │
198
277
  │ header: "Scope", │
199
278
  │ options: [ │
200
- │ "Yes, proceed",
279
+ │ "Yes, proceed (Recommended)",
201
280
  │ "I have modifications to add", │
202
281
  │ "No, let me clarify the purpose" │
203
282
  │ ] │
@@ -252,7 +331,7 @@ TodoWrite([
252
331
  │ for more?", │
253
332
  │ header: "Research", │
254
333
  │ options: [ │
255
- │ "Proceed to interview",
334
+ │ "Proceed to interview (Recommended)",
256
335
  │ "Search more - I need [specific topic]", │
257
336
  │ "Search for something specific (I'll describe)" │
258
337
  │ ] │
@@ -304,7 +383,7 @@ TodoWrite([
304
383
  │ [summary]. All correct?", │
305
384
  │ header: "Confirm", │
306
385
  │ options: [ │
307
- │ "Yes, proceed to schema",
386
+ │ "Yes, proceed to schema (Recommended)",
308
387
  │ "Change an answer", │
309
388
  │ "Add another question" │
310
389
  │ ] │
@@ -328,7 +407,7 @@ TodoWrite([
328
407
  │ want to research: [list]. Approve?", │
329
408
  │ header: "Deep Research", │
330
409
  │ options: [ │
331
- │ "Yes, run these searches",
410
+ │ "Yes, run these searches (Recommended)",
332
411
  │ "Add more - I also need [topic]", │
333
412
  │ "Skip deep research, proceed to schema" │
334
413
  │ ] │
@@ -354,7 +433,7 @@ TodoWrite([
354
433
  │ requirements?", │
355
434
  │ header: "Schema", │
356
435
  │ options: [ │
357
- │ "Yes, schema looks correct",
436
+ │ "Yes, schema looks correct (Recommended)",
358
437
  │ "No, I need changes (I'll describe)", │
359
438
  │ "Let's redo the interview" │
360
439
  │ ] │
@@ -378,7 +457,7 @@ TodoWrite([
378
457
  │ [M] missing. Ready to start TDD?", │
379
458
  │ header: "Environment", │
380
459
  │ options: [ │
381
- │ "Yes, ready to write tests",
460
+ │ "Yes, ready to write tests (Recommended)",
382
461
  │ "No, need to set up API keys first", │
383
462
  │ "No, need to fix something else" │
384
463
  │ ] │
@@ -403,7 +482,7 @@ TodoWrite([
403
482
  │ Approve this test plan?", │
404
483
  │ header: "Tests", │
405
484
  │ options: [ │
406
- │ "Yes, write these tests",
485
+ │ "Yes, write these tests (Recommended)",
407
486
  │ "Add more scenarios (I'll describe)", │
408
487
  │ "Change a scenario (I'll describe)" │
409
488
  │ ] │
@@ -442,7 +521,7 @@ TodoWrite([
442
521
  │ How should I proceed?", │
443
522
  │ header: "Verify", │
444
523
  │ options: [ │
445
- │ "Fix gaps - loop back to Red phase", │
524
+ │ "Fix gaps - loop back to Red phase (Recommended)",│
446
525
  │ "Skip - these are intentional omissions", │
447
526
  │ "Fix some, skip others (I'll specify)" │
448
527
  │ ] │
@@ -478,7 +557,7 @@ TodoWrite([
478
557
  │ header: "Review", │
479
558
  │ multiSelect: false, │
480
559
  │ options: [ │
481
- │ {"label": "Fix all issues", "description": "Address each issue in Phase 12"},│
560
+ │ {"label": "Fix all issues (Recommended)", "description": "Address each issue in Phase 12"},│
482
561
  │ {"label": "Fix critical only", "description": "Skip medium/low priority"},│
483
562
  │ {"label": "Skip review", "description": "Proceed without fixes (not recommended)"}│
484
563
  │ ] │
@@ -517,7 +596,7 @@ TodoWrite([
517
596
  │ header: "Docs", │
518
597
  │ multiSelect: false, │
519
598
  │ options: [ │
520
- │ {"label": "Yes, complete", "description": "All docs updated"},│
599
+ │ {"label": "Yes, complete (Recommended)", "description": "All docs updated"},│
521
600
  │ {"label": "Need to add more", "description": "I'll describe what's missing"},│
522
601
  │ {"label": "Skip for now", "description": "Not recommended"}│
523
602
  │ ] │
@@ -542,6 +621,18 @@ TodoWrite([
542
621
  │ │
543
622
  │ Run /commit to create semantic commit. │
544
623
  │ Run /pr to create pull request. │
624
+ │ │
625
+ │ ═══════════════════════════════════════════════════════ │
626
+ │ ✅ API CREATED: [endpoint-name] │
627
+ │ │
628
+ │ 📍 Quick Links: │
629
+ │ • Test it: /api-showcase │
630
+ │ • API Docs: /docs/api/[endpoint-name] │
631
+ │ • Run tests: pnpm test:api [endpoint-name] │
632
+ │ • TypeDoc: pnpm typedoc │
633
+ │ │
634
+ │ 📊 Dashboard: /hustle-dev-dashboard │
635
+ │ ═══════════════════════════════════════════════════════ │
545
636
  └───────────────────────────────────────────────────────────┘
546
637
  ```
547
638
 
@@ -611,13 +702,21 @@ This command creates:
611
702
  7. **API Keys**: Support three methods (env, NEXT*PUBLIC*, custom headers)
612
703
  8. **Test Command**: `pnpm test:run` before commits
613
704
 
614
- ## Never Skip
705
+ ## Never Skip (Even in --auto mode)
706
+
707
+ **CRITICAL: ALL phases must execute - auto mode only auto-answers questions, it does NOT skip phases.**
615
708
 
616
709
  - Phase 1 (Disambiguation) - Clarify before research
617
710
  - Phase 3 (Initial Research) - Find ALL parameters
618
711
  - Phase 4 (Interview) - Questions FROM research, not templates
712
+ - Phase 5 (Deep Research) - Only skip if truly comprehensive initial research
619
713
  - Phase 8 (TDD Red) - Failing tests FIRST
620
- - Phase 10 (Verify) - Re-research after Green
621
- - Phase 12 (Documentation) - Keep docs in sync
714
+ - Phase 10 (Verify) - MUST re-research after Green - this catches memory errors
715
+ - Phase 11 (Code Review) - Run if API key exists, else document "no key" but complete phase
716
+ - Phase 12 (Refactor) - MUST run even if no review issues - always optimize
717
+ - Phase 13 (Documentation) - Keep docs in sync
718
+ - Phase 14 (Completion) - Always run final verification
622
719
  - Coverage verification - 100% required
720
+
721
+ **If a phase can't fully complete (e.g., missing API key), mark it as "partial" not "skipped".**
623
722
  </claude-commands-template>