@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.
- package/.claude/agents/code-reviewer.md +170 -0
- package/.claude/agents/docs-generator.md +80 -0
- package/.claude/agents/implementation-reviewer.md +119 -0
- package/.claude/agents/parallel-researcher.md +52 -0
- package/.claude/agents/research-validator.md +116 -0
- package/.claude/agents/schema-generator.md +70 -0
- package/.claude/agents/test-writer.md +104 -0
- package/.claude/api-dev-state.json +305 -56
- package/.claude/commands/README.md +21 -10
- package/.claude/commands/add-command.md +8 -5
- package/.claude/commands/api-create.md +36 -25
- package/.claude/commands/api-env.md +1 -0
- package/.claude/commands/api-interview.md +32 -19
- package/.claude/commands/api-research.md +47 -21
- package/.claude/commands/api-status.md +21 -1
- package/.claude/commands/api-verify.md +14 -13
- package/.claude/commands/beepboop.md +4 -5
- package/.claude/commands/busycommit.md +2 -3
- package/.claude/commands/commit.md +2 -3
- package/.claude/commands/cycle.md +2 -7
- package/.claude/commands/gap.md +2 -3
- package/.claude/commands/green.md +2 -7
- package/.claude/commands/issue.md +3 -8
- package/.claude/commands/ntfy-setup.md +91 -0
- package/.claude/commands/ntfy-test.md +74 -0
- package/.claude/commands/plan.md +2 -3
- package/.claude/commands/pr.md +2 -3
- package/.claude/commands/publish.md +40 -0
- package/.claude/commands/red.md +2 -7
- package/.claude/commands/refactor.md +2 -7
- package/.claude/commands/spike.md +2 -7
- package/.claude/commands/summarize.md +2 -3
- package/.claude/commands/tdd.md +2 -7
- package/.claude/commands/worktree-add.md +208 -216
- package/.claude/commands/worktree-cleanup.md +172 -178
- package/.claude/settings.json +63 -12
- package/.claude/settings.local.json +2 -1
- package/.claude-plugin/marketplace.json +2 -11
- package/.skills/README.md +55 -53
- package/.skills/_shared/settings.json +1 -1
- package/.skills/add-command/SKILL.md +10 -5
- package/.skills/api-create/SKILL.md +146 -35
- package/.skills/api-env/SKILL.md +1 -0
- package/.skills/api-interview/SKILL.md +32 -19
- package/.skills/api-research/SKILL.md +47 -21
- package/.skills/api-status/SKILL.md +21 -1
- package/.skills/api-verify/SKILL.md +14 -13
- package/.skills/beepboop/SKILL.md +6 -5
- package/.skills/busycommit/SKILL.md +4 -3
- package/.skills/commit/SKILL.md +4 -3
- package/.skills/cycle/SKILL.md +4 -7
- package/.skills/gap/SKILL.md +4 -3
- package/.skills/green/SKILL.md +4 -7
- package/.skills/issue/SKILL.md +5 -8
- package/.skills/plan/SKILL.md +4 -3
- package/.skills/pr/SKILL.md +4 -3
- package/.skills/publish/SKILL.md +160 -0
- package/.skills/red/SKILL.md +4 -7
- package/.skills/refactor/SKILL.md +4 -7
- package/.skills/spike/SKILL.md +4 -7
- package/.skills/summarize/SKILL.md +4 -3
- package/.skills/tdd/SKILL.md +4 -7
- package/.skills/update-todos/SKILL.md +22 -0
- package/.skills/worktree-add/SKILL.md +210 -216
- package/.skills/worktree-cleanup/SKILL.md +183 -187
- package/CHANGELOG.md +97 -79
- package/README.md +161 -7142
- package/bin/cli.js +448 -805
- package/commands/README.md +66 -31
- package/commands/add-command.md +8 -5
- package/commands/beepboop.md +4 -5
- package/commands/busycommit.md +2 -3
- package/commands/commit.md +2 -3
- package/commands/cycle.md +2 -7
- package/commands/gap.md +2 -3
- package/commands/green.md +2 -7
- package/commands/hustle-api-continue.md +8 -5
- package/commands/hustle-api-create.md +70 -29
- package/commands/hustle-api-env.md +1 -0
- package/commands/hustle-api-interview.md +32 -19
- package/commands/hustle-api-research.md +47 -21
- package/commands/hustle-api-sessions.md +8 -7
- package/commands/hustle-api-status.md +21 -1
- package/commands/hustle-api-verify.md +14 -13
- package/commands/hustle-combine.md +488 -241
- package/commands/hustle-ui-create-page.md +113 -50
- package/commands/hustle-ui-create.md +179 -26
- package/commands/issue.md +3 -8
- package/commands/plan.md +2 -3
- package/commands/pr.md +2 -3
- package/commands/red.md +2 -7
- package/commands/refactor.md +2 -7
- package/commands/spike.md +2 -7
- package/commands/summarize.md +2 -3
- package/commands/tdd.md +2 -7
- package/commands/worktree-add.md +208 -216
- package/commands/worktree-cleanup.md +172 -178
- package/hooks/api-workflow-check.py +5 -3
- package/hooks/enforce-component-type-confirm.py +97 -0
- package/hooks/lib/__init__.py +1 -0
- package/hooks/lib/greptile.py +355 -0
- package/hooks/lib/ntfy.py +209 -0
- package/hooks/notify-input-needed.py +73 -0
- package/hooks/notify-phase-complete.py +90 -0
- package/hooks/run-code-review.py +246 -0
- package/hooks/track-token-usage.py +121 -0
- package/package.json +13 -3
- package/scripts/collect-test-results.ts +102 -77
- package/scripts/extract-parameters.ts +112 -70
- package/scripts/generate-test-manifest.ts +118 -77
- package/templates/.env.example +57 -0
- package/templates/BRAND_GUIDE.md +92 -52
- package/templates/CLAUDE-SECTION.md +40 -37
- package/templates/SPEC.json +186 -38
- package/templates/api-dev-state.json +33 -4
- package/templates/api-showcase/_components/APICard.tsx +22 -18
- package/templates/api-showcase/_components/APIModal.tsx +110 -64
- package/templates/api-showcase/_components/APIShowcase.tsx +53 -35
- package/templates/api-showcase/_components/APITester.tsx +128 -67
- package/templates/api-showcase/page.tsx +4 -4
- package/templates/api-test/page.tsx +51 -30
- package/templates/api-test/test-structure/route.ts +43 -34
- package/templates/component/Component.stories.tsx +41 -39
- package/templates/component/Component.test.tsx +96 -78
- package/templates/component/Component.tsx +63 -52
- package/templates/component/Component.types.ts +10 -6
- package/templates/component/Component.visual.spec.ts +170 -0
- package/templates/component/index.ts +2 -2
- package/templates/dev-tools/_components/DevToolsLanding.tsx +8 -8
- package/templates/dev-tools/page.tsx +4 -3
- package/templates/mcp-servers.json +30 -2
- package/templates/page/page.e2e.test.ts +56 -48
- package/templates/page/page.tsx +3 -3
- package/templates/shared/HeroHeader.tsx +16 -15
- package/templates/shared/index.ts +1 -1
- package/templates/ui-showcase/_components/PreviewCard.tsx +20 -20
- package/templates/ui-showcase/_components/PreviewModal.tsx +149 -108
- package/templates/ui-showcase/_components/UIShowcase.tsx +43 -35
- package/templates/ui-showcase/page.tsx +4 -4
package/.skills/tdd/SKILL.md
CHANGED
|
@@ -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
|
-
-
|
|
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
|