@hustle-together/api-dev-tools 3.11.1 → 3.12.2

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 +305 -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
@@ -12,8 +12,10 @@ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read
12
12
  ---
13
13
 
14
14
  ---
15
+
15
16
  description: Remind agent about TDD approach and continue conversation
16
17
  argument-hint: [optional-response-to-last-message]
18
+
17
19
  ---
18
20
 
19
21
  # TDD Reminder
@@ -33,7 +35,6 @@ argument-hint: [optional-response-to-last-message]
33
35
  The foundation of TDD is the Red-Green-Refactor cycle:
34
36
 
35
37
  1. **Red Phase**: Write ONE failing test that describes desired behavior
36
-
37
38
  - The test must fail for the RIGHT reason (not syntax/import errors)
38
39
  - Only one test at a time - this is critical for TDD discipline
39
40
  - Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
@@ -43,7 +44,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
43
44
  - Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
44
45
 
45
46
  2. **Green Phase**: Write MINIMAL code to make the test pass
46
-
47
47
  - Implement only what's needed for the current failing test
48
48
  - No anticipatory coding or extra features
49
49
  - Address the specific failure message
@@ -57,12 +57,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
57
57
  ### Core Violations
58
58
 
59
59
  1. **Multiple Test Addition**
60
-
61
60
  - Adding more than one new test at once
62
61
  - Exception: Initial test file setup or extracting shared test utilities
63
62
 
64
63
  2. **Over-Implementation**
65
-
66
64
  - Code that exceeds what's needed to pass the current failing test
67
65
  - Adding untested features, methods, or error handling
68
66
  - Implementing multiple methods when test only requires one
@@ -104,7 +102,6 @@ User response to the last message: $ARGUMENTS
104
102
 
105
103
  Please continue with TDD approach based on the above response.
106
104
 
107
-
108
105
  ## 🛡 Project Rules (Injected into every command)
109
106
 
110
107
  1. **NO BROKEN BUILDS:**
@@ -129,7 +126,7 @@ Please continue with TDD approach based on the above response.
129
126
  4. **API KEY MANAGEMENT:**
130
127
  - Support three loading methods:
131
128
  - Server environment variables
132
- - NEXT_PUBLIC_ variables (client-side)
129
+ - NEXT*PUBLIC* variables (client-side)
133
130
  - Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
134
131
  - Never hardcode API keys
135
132
  - Always validate key availability before use
@@ -154,4 +151,4 @@ Please continue with TDD approach based on the above response.
154
151
  - Code examples
155
152
  - Testing notes
156
153
  - Document expected behavior and edge cases
157
- - Include real-world output examples
154
+ - Include real-world output examples
@@ -112,6 +112,7 @@ You are a TodoWrite progress updater. Your job is to:
112
112
  ### Status Logic
113
113
 
114
114
  For a given `current_phase` number:
115
+
115
116
  - Phases < current_phase: `"completed"`
116
117
  - Phase == current_phase: `"in_progress"`
117
118
  - Phases > current_phase: `"pending"`
@@ -121,6 +122,7 @@ For a given `current_phase` number:
121
122
  User calls: `/update-todos api-create 3`
122
123
 
123
124
  You build:
125
+
124
126
  ```json
125
127
  [
126
128
  {"content": "Phase 1: Disambiguation", "status": "completed", "activeForm": "Clarified API terms"},
@@ -136,17 +138,23 @@ Then call TodoWrite with this array.
136
138
  ## Special Cases
137
139
 
138
140
  ### Initialization (phase 0)
141
+
139
142
  When `current_phase = 0`, all phases are `"pending"` with one `"in_progress"`:
143
+
140
144
  - Phase 1: `"in_progress"` (starting workflow)
141
145
  - Phases 2-13: `"pending"`
142
146
 
143
147
  ### Completion (phase 13 for 13-phase workflows)
148
+
144
149
  When `current_phase = 13`:
150
+
145
151
  - All phases: `"completed"`
146
152
  - Display completion message
147
153
 
148
154
  ### Loop-Back Scenarios
155
+
149
156
  If a verification phase fails (e.g., Phase 10 requires going back to Phase 8):
157
+
150
158
  - The calling workflow will call `/update-todos` with the looped-back phase number
151
159
  - Example: After Phase 10 fails verification → `/update-todos api-create 8`
152
160
  - Phase 8 becomes `"in_progress"` again
@@ -155,6 +163,7 @@ If a verification phase fails (e.g., Phase 10 requires going back to Phase 8):
155
163
  ## Error Handling
156
164
 
157
165
  If invalid parameters:
166
+
158
167
  - Invalid workflow name → Use `api-create` as default, warn user
159
168
  - Invalid phase number → Clamp to valid range (0-13 or 0-12)
160
169
  - Missing parameters → Ask user to provide them
@@ -162,6 +171,7 @@ If invalid parameters:
162
171
  ## Silent Operation
163
172
 
164
173
  **CRITICAL:** This is a helper skill. After calling TodoWrite, you MUST:
174
+
165
175
  - **NOT output any text to the user**
166
176
  - **NOT explain what you did**
167
177
  - **NOT ask follow-up questions**
@@ -172,38 +182,49 @@ The calling workflow (e.g., `/api-create`) will handle all user communication.
172
182
  ## Usage Examples
173
183
 
174
184
  ### From api-create workflow
185
+
175
186
  ```markdown
176
187
  # Start of workflow
188
+
177
189
  /update-todos api-create 0
178
190
 
179
191
  # After Phase 1 completes
192
+
180
193
  /update-todos api-create 1
181
194
 
182
195
  # After Phase 10 verification fails (loop back to Phase 8)
196
+
183
197
  /update-todos api-create 8
184
198
  ```
185
199
 
186
200
  ### From ui-create-component workflow
201
+
187
202
  ```markdown
188
203
  # Start of workflow
204
+
189
205
  /update-todos ui-create-component 0
190
206
 
191
207
  # After completing Brand Guide check
208
+
192
209
  /update-todos ui-create-component 2
193
210
  ```
194
211
 
195
212
  ### From combine workflow
213
+
196
214
  ```markdown
197
215
  # Start of workflow (note: only 12 phases)
216
+
198
217
  /update-todos combine 0
199
218
 
200
219
  # After Flow Type selection
220
+
201
221
  /update-todos combine 3
202
222
  ```
203
223
 
204
224
  ## Integration Points
205
225
 
206
226
  This skill is called by:
227
+
207
228
  - `.skills/api-create/SKILL.md` (or `/hustle-api-create`)
208
229
  - `.skills/hustle-ui-create/SKILL.md` (component mode)
209
230
  - `.skills/hustle-ui-create-page/SKILL.md` (page mode)
@@ -212,6 +233,7 @@ This skill is called by:
212
233
  ## Testing
213
234
 
214
235
  To test this helper independently:
236
+
215
237
  ```bash
216
238
  /update-todos api-create 5
217
239
  # Should show phases 1-4 completed, phase 5 in_progress, 6-13 pending