@hustle-together/api-dev-tools 3.10.1 → 3.12.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 (178) 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 +331 -0
  9. package/.claude/commands/README.md +196 -0
  10. package/.claude/commands/add-command.md +212 -0
  11. package/.claude/commands/api-create.md +510 -0
  12. package/.claude/commands/api-env.md +51 -0
  13. package/.claude/commands/api-interview.md +344 -0
  14. package/.claude/commands/api-research.md +357 -0
  15. package/.claude/commands/api-status.md +279 -0
  16. package/.claude/commands/api-verify.md +232 -0
  17. package/.claude/commands/beepboop.md +96 -0
  18. package/.claude/commands/busycommit.md +111 -0
  19. package/.claude/commands/commit.md +82 -0
  20. package/.claude/commands/cycle.md +137 -0
  21. package/.claude/commands/gap.md +85 -0
  22. package/.claude/commands/green.md +137 -0
  23. package/.claude/commands/issue.md +187 -0
  24. package/.claude/commands/ntfy-setup.md +91 -0
  25. package/.claude/commands/ntfy-test.md +74 -0
  26. package/.claude/commands/plan.md +167 -0
  27. package/.claude/commands/pr.md +121 -0
  28. package/.claude/commands/publish.md +40 -0
  29. package/.claude/commands/red.md +137 -0
  30. package/.claude/commands/refactor.md +137 -0
  31. package/.claude/commands/spike.md +137 -0
  32. package/.claude/commands/summarize.md +93 -0
  33. package/.claude/commands/tdd.md +139 -0
  34. package/.claude/commands/worktree-add.md +307 -0
  35. package/.claude/commands/worktree-cleanup.md +275 -0
  36. package/.claude/hooks/api-workflow-check.py +227 -0
  37. package/.claude/hooks/enforce-deep-research.py +185 -0
  38. package/.claude/hooks/enforce-disambiguation.py +155 -0
  39. package/.claude/hooks/enforce-documentation.py +192 -0
  40. package/.claude/hooks/enforce-environment.py +253 -0
  41. package/.claude/hooks/enforce-external-research.py +328 -0
  42. package/.claude/hooks/enforce-interview.py +421 -0
  43. package/.claude/hooks/enforce-refactor.py +189 -0
  44. package/.claude/hooks/enforce-research.py +159 -0
  45. package/.claude/hooks/enforce-schema.py +186 -0
  46. package/.claude/hooks/enforce-scope.py +160 -0
  47. package/.claude/hooks/enforce-tdd-red.py +250 -0
  48. package/.claude/hooks/enforce-verify.py +186 -0
  49. package/.claude/hooks/periodic-reground.py +154 -0
  50. package/.claude/hooks/session-startup.py +151 -0
  51. package/.claude/hooks/track-tool-use.py +626 -0
  52. package/.claude/hooks/verify-after-green.py +282 -0
  53. package/.claude/hooks/verify-implementation.py +225 -0
  54. package/.claude/research/index.json +6 -0
  55. package/.claude/settings.json +144 -0
  56. package/.claude/settings.local.json +12 -0
  57. package/.claude-plugin/marketplace.json +103 -0
  58. package/.skills/README.md +293 -0
  59. package/.skills/_shared/convert-commands.py +192 -0
  60. package/.skills/_shared/hooks/api-workflow-check.py +227 -0
  61. package/.skills/_shared/hooks/enforce-deep-research.py +185 -0
  62. package/.skills/_shared/hooks/enforce-disambiguation.py +155 -0
  63. package/.skills/_shared/hooks/enforce-documentation.py +192 -0
  64. package/.skills/_shared/hooks/enforce-environment.py +253 -0
  65. package/.skills/_shared/hooks/enforce-external-research.py +328 -0
  66. package/.skills/_shared/hooks/enforce-interview.py +421 -0
  67. package/.skills/_shared/hooks/enforce-refactor.py +189 -0
  68. package/.skills/_shared/hooks/enforce-research.py +159 -0
  69. package/.skills/_shared/hooks/enforce-schema.py +186 -0
  70. package/.skills/_shared/hooks/enforce-scope.py +160 -0
  71. package/.skills/_shared/hooks/enforce-tdd-red.py +250 -0
  72. package/.skills/_shared/hooks/enforce-verify.py +186 -0
  73. package/.skills/_shared/hooks/periodic-reground.py +154 -0
  74. package/.skills/_shared/hooks/session-startup.py +151 -0
  75. package/.skills/_shared/hooks/track-tool-use.py +626 -0
  76. package/.skills/_shared/hooks/verify-after-green.py +282 -0
  77. package/.skills/_shared/hooks/verify-implementation.py +225 -0
  78. package/.skills/_shared/install.sh +114 -0
  79. package/.skills/_shared/settings.json +93 -0
  80. package/.skills/add-command/SKILL.md +227 -0
  81. package/.skills/api-create/SKILL.md +623 -0
  82. package/.skills/api-env/SKILL.md +64 -0
  83. package/.skills/api-interview/SKILL.md +357 -0
  84. package/.skills/api-research/SKILL.md +370 -0
  85. package/.skills/api-status/SKILL.md +292 -0
  86. package/.skills/api-verify/SKILL.md +245 -0
  87. package/.skills/beepboop/SKILL.md +111 -0
  88. package/.skills/busycommit/SKILL.md +126 -0
  89. package/.skills/commit/SKILL.md +97 -0
  90. package/.skills/cycle/SKILL.md +152 -0
  91. package/.skills/gap/SKILL.md +100 -0
  92. package/.skills/green/SKILL.md +152 -0
  93. package/.skills/issue/SKILL.md +202 -0
  94. package/.skills/plan/SKILL.md +182 -0
  95. package/.skills/pr/SKILL.md +136 -0
  96. package/.skills/publish/SKILL.md +160 -0
  97. package/.skills/red/SKILL.md +152 -0
  98. package/.skills/refactor/SKILL.md +152 -0
  99. package/.skills/spike/SKILL.md +152 -0
  100. package/.skills/summarize/SKILL.md +108 -0
  101. package/.skills/tdd/SKILL.md +154 -0
  102. package/.skills/update-todos/SKILL.md +250 -0
  103. package/.skills/worktree-add/SKILL.md +322 -0
  104. package/.skills/worktree-cleanup/SKILL.md +290 -0
  105. package/CHANGELOG.md +115 -0
  106. package/README.md +161 -7101
  107. package/bin/cli.js +448 -805
  108. package/commands/README.md +66 -31
  109. package/commands/add-command.md +8 -5
  110. package/commands/beepboop.md +4 -5
  111. package/commands/busycommit.md +2 -3
  112. package/commands/commit.md +2 -3
  113. package/commands/cycle.md +2 -7
  114. package/commands/gap.md +2 -3
  115. package/commands/green.md +2 -7
  116. package/commands/hustle-api-continue.md +8 -5
  117. package/commands/hustle-api-create.md +70 -29
  118. package/commands/hustle-api-env.md +1 -0
  119. package/commands/hustle-api-interview.md +32 -19
  120. package/commands/hustle-api-research.md +47 -21
  121. package/commands/hustle-api-sessions.md +8 -7
  122. package/commands/hustle-api-status.md +21 -1
  123. package/commands/hustle-api-verify.md +14 -13
  124. package/commands/hustle-combine.md +488 -241
  125. package/commands/hustle-ui-create-page.md +113 -50
  126. package/commands/hustle-ui-create.md +179 -26
  127. package/commands/issue.md +3 -8
  128. package/commands/plan.md +2 -3
  129. package/commands/pr.md +2 -3
  130. package/commands/red.md +2 -7
  131. package/commands/refactor.md +2 -7
  132. package/commands/spike.md +2 -7
  133. package/commands/summarize.md +2 -3
  134. package/commands/tdd.md +2 -7
  135. package/commands/worktree-add.md +208 -216
  136. package/commands/worktree-cleanup.md +172 -178
  137. package/hooks/api-workflow-check.py +5 -3
  138. package/hooks/enforce-component-type-confirm.py +97 -0
  139. package/hooks/lib/__init__.py +1 -0
  140. package/hooks/lib/greptile.py +355 -0
  141. package/hooks/lib/ntfy.py +209 -0
  142. package/hooks/notify-input-needed.py +73 -0
  143. package/hooks/notify-phase-complete.py +90 -0
  144. package/hooks/run-code-review.py +246 -0
  145. package/hooks/track-token-usage.py +121 -0
  146. package/package.json +33 -12
  147. package/scripts/collect-test-results.ts +102 -77
  148. package/scripts/extract-parameters.ts +112 -70
  149. package/scripts/generate-test-manifest.ts +118 -77
  150. package/templates/.env.example +57 -0
  151. package/templates/BRAND_GUIDE.md +92 -52
  152. package/templates/CLAUDE-SECTION.md +40 -37
  153. package/templates/SPEC.json +186 -38
  154. package/templates/api-dev-state.json +33 -4
  155. package/templates/api-showcase/_components/APICard.tsx +22 -18
  156. package/templates/api-showcase/_components/APIModal.tsx +110 -64
  157. package/templates/api-showcase/_components/APIShowcase.tsx +53 -35
  158. package/templates/api-showcase/_components/APITester.tsx +128 -67
  159. package/templates/api-showcase/page.tsx +4 -4
  160. package/templates/api-test/page.tsx +51 -30
  161. package/templates/api-test/test-structure/route.ts +43 -34
  162. package/templates/component/Component.stories.tsx +41 -39
  163. package/templates/component/Component.test.tsx +96 -78
  164. package/templates/component/Component.tsx +63 -52
  165. package/templates/component/Component.types.ts +10 -6
  166. package/templates/component/Component.visual.spec.ts +170 -0
  167. package/templates/component/index.ts +2 -2
  168. package/templates/dev-tools/_components/DevToolsLanding.tsx +8 -8
  169. package/templates/dev-tools/page.tsx +4 -3
  170. package/templates/mcp-servers.json +30 -2
  171. package/templates/page/page.e2e.test.ts +56 -48
  172. package/templates/page/page.tsx +3 -3
  173. package/templates/shared/HeroHeader.tsx +16 -15
  174. package/templates/shared/index.ts +1 -1
  175. package/templates/ui-showcase/_components/PreviewCard.tsx +20 -20
  176. package/templates/ui-showcase/_components/PreviewModal.tsx +149 -108
  177. package/templates/ui-showcase/_components/UIShowcase.tsx +43 -35
  178. package/templates/ui-showcase/page.tsx +4 -4
@@ -0,0 +1,93 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "WebSearch",
5
+ "WebFetch",
6
+ "mcp__context7",
7
+ "mcp__context7__resolve-library-id",
8
+ "mcp__context7__get-library-docs",
9
+ "mcp__github",
10
+ "Bash(claude mcp:*)",
11
+ "Bash(pnpm test:*)",
12
+ "Bash(npm test:*)",
13
+ "Bash(git status:*)",
14
+ "Bash(git diff:*)",
15
+ "Bash(git log:*)"
16
+ ]
17
+ },
18
+ "hooks": {
19
+ "SessionStart": [
20
+ {
21
+ "hooks": [
22
+ {
23
+ "type": "command",
24
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-startup.py"
25
+ }
26
+ ]
27
+ }
28
+ ],
29
+ "UserPromptSubmit": [
30
+ {
31
+ "hooks": [
32
+ {
33
+ "type": "command",
34
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/enforce-external-research.py"
35
+ }
36
+ ]
37
+ }
38
+ ],
39
+ "PreToolUse": [
40
+ {
41
+ "matcher": "Write|Edit",
42
+ "hooks": [
43
+ {
44
+ "type": "command",
45
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/enforce-research.py"
46
+ },
47
+ {
48
+ "type": "command",
49
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/enforce-interview.py"
50
+ },
51
+ {
52
+ "type": "command",
53
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/verify-implementation.py"
54
+ }
55
+ ]
56
+ }
57
+ ],
58
+ "PostToolUse": [
59
+ {
60
+ "matcher": "WebSearch|WebFetch|mcp__context7.*|AskUserQuestion",
61
+ "hooks": [
62
+ {
63
+ "type": "command",
64
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/track-tool-use.py"
65
+ },
66
+ {
67
+ "type": "command",
68
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/periodic-reground.py"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "matcher": "Bash",
74
+ "hooks": [
75
+ {
76
+ "type": "command",
77
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/verify-after-green.py"
78
+ }
79
+ ]
80
+ }
81
+ ],
82
+ "Stop": [
83
+ {
84
+ "hooks": [
85
+ {
86
+ "type": "command",
87
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/api-workflow-check.py"
88
+ }
89
+ ]
90
+ }
91
+ ]
92
+ }
93
+ }
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: add-command
3
+ description: Guide for creating new slash commands or agent skills. Provides templates and best practices. Use when extending the toolkit. Keywords: meta, commands, skills, templates, development
4
+ license: MIT
5
+ compatibility: Requires Claude Code with MCP servers (Context7, GitHub), Python 3.9+ for hooks, pnpm 10.11.0+
6
+ metadata:
7
+ version: "3.0.0"
8
+ category: "meta"
9
+ tags: ['meta', 'commands', 'skills', 'templates']
10
+ author: "Hustle Together"
11
+ allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read Write Edit Bash TodoWrite
12
+ ---
13
+
14
+ ---
15
+
16
+ description: Guide for creating new slash commands
17
+ argument-hint: <command-name> <description>
18
+
19
+ ---
20
+
21
+ ## General Guidelines
22
+
23
+ ### Output Style
24
+
25
+ - **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
26
+ - Write natural, descriptive code without meta-commentary about the development process
27
+ - The code should speak for itself - TDD is the process, not the product
28
+
29
+ # Slash Command Creator Guide
30
+
31
+ ## How This Command Works
32
+
33
+ The `/add-command` command shows this guide for creating new slash commands. It includes:
34
+
35
+ - Command structure and syntax
36
+ - Common patterns and examples
37
+ - Security restrictions and limitations
38
+ - Frontmatter options
39
+
40
+ **Note for AI**: When creating commands, you CAN use bash tools like `Bash(mkdir:*)`, `Bash(ls:*)`, `Bash(git status:*)` in the `allowed-tools` frontmatter of NEW commands - but ONLY for operations within the current project directory. This command itself doesn't need bash tools since it's just documentation.
41
+
42
+ ## Command Locations
43
+
44
+ - **Personal**: `~/.claude/commands/` (available across all projects)
45
+ - **Project**: `.claude/commands/` (shared with team, shows "(project)")
46
+
47
+ ## Basic Structure
48
+
49
+ ```markdown
50
+ ---
51
+ allowed-tools: Read, Glob, Grep, Bash(git status:*), Task
52
+ description: Brief description of what this command does
53
+ argument-hint: [required-arg] [optional-arg]
54
+ ---
55
+
56
+ # Command Title
57
+
58
+ Your command instructions here.
59
+
60
+ Arguments: $ARGUMENTS
61
+
62
+ File reference: @path/to/file.js
63
+
64
+ Bash command output: (exclamation)git status(backticks)
65
+ ```
66
+
67
+ ## ⚠️ Security Restrictions
68
+
69
+ **Bash Commands (exclamation prefix)**: Limited to current working directory only.
70
+
71
+ - ✅ Works: `! + backtick + git status + backtick` (in project dir)
72
+ - ❌ Blocked: `! + backtick + ls /outside/project + backtick` (outside project)
73
+ - ❌ Blocked: `! + backtick + pwd + backtick` (if referencing dirs outside project)
74
+
75
+ **File References (`@` prefix)**: No directory restrictions.
76
+
77
+ - ✅ Works: `@/path/to/system/file.md`
78
+ - ✅ Works: `@../other-project/file.js`
79
+
80
+ ## Common Patterns
81
+
82
+ ### Simple Command
83
+
84
+ ```bash
85
+ echo "Review this code for bugs and suggest fixes" > ~/.claude/commands/review.md
86
+ ```
87
+
88
+ ### Command with Arguments
89
+
90
+ **Note for AI**: The example below uses a fullwidth dollar sign ($, U+FF04) to prevent interpolation in this documentation. When creating actual commands, use the regular `$` character.
91
+
92
+ ```markdown
93
+ Fix issue $ARGUMENTS following our coding standards
94
+ ```
95
+
96
+ ### Command with File References
97
+
98
+ ```markdown
99
+ Compare @src/old.js with @src/new.js and explain differences
100
+ ```
101
+
102
+ ### Command with Bash Output (Project Directory Only)
103
+
104
+ ```markdown
105
+ ---
106
+ allowed-tools: Bash(git status:*), Bash(git branch:*), Bash(git log:*)
107
+ ---
108
+
109
+ Current status: (!)git status(`)
110
+ Current branch: (!)git branch --show-current(`)
111
+ Recent commits: (!)git log --oneline -5(`)
112
+
113
+ Create commit for these changes.
114
+ ```
115
+
116
+ **Note**: Only works with commands in the current project directory.
117
+
118
+ ### Namespaced Command
119
+
120
+ **Note for AI**: The example below uses a fullwidth dollar sign ($, U+FF04) to prevent interpolation in this documentation. When creating actual commands, use the regular `$` character.
121
+
122
+ ```bash
123
+ mkdir -p ~/.claude/commands/ai
124
+ echo "Ask GPT-5 about: $ARGUMENTS" > ~/.claude/commands/ai/gpt5.md
125
+ # Creates: /ai:gpt5
126
+ ```
127
+
128
+ ## Frontmatter Options
129
+
130
+ - `allowed-tools`: Tools this command can use
131
+ - **Important**: Intrusive tools like `Write`, `Edit`, `NotebookEdit` should NEVER be allowed in commands unless the user explicitly requests them. These tools modify files and should only be used when the command's purpose is to make changes.
132
+ - ✅ Safe for most commands: `Read`, `Glob`, `Grep`, `Bash(git status:*)`, `Task`, `AskUserQuestion`
133
+ - `description`: Brief description (shows in /help)
134
+ - `argument-hint`: Help text for arguments
135
+ - `model`: Specific model to use
136
+
137
+ ## Best Practices
138
+
139
+ ### Safe Commands (No Security Issues)
140
+
141
+ ```markdown
142
+ # System prompt editor (file reference only)
143
+
144
+ (@)path/to/system/prompt.md
145
+
146
+ Edit your system prompt above.
147
+ ```
148
+
149
+ ### Project-Specific Commands (Bash OK)
150
+
151
+ ```markdown
152
+ ---
153
+ allowed-tools: Bash(git status:*), Bash(npm list:*)
154
+ ---
155
+
156
+ Current git status: (!)git status(`)
157
+ Package info: (!)npm list --depth=0(`)
158
+
159
+ Review project state and suggest next steps.
160
+ ```
161
+
162
+ ### Cross-Directory File Access (Use @ not !)
163
+
164
+ ```markdown
165
+ # Compare config files
166
+
167
+ Compare (@)path/to/system.md with (@)project/config.md
168
+
169
+ Show differences and suggest improvements.
170
+ ```
171
+
172
+ ## Usage
173
+
174
+ After creating: `/<command-name> [arguments]`
175
+
176
+ Example: `/review` or `/ai:gpt5 "explain this code"`
177
+
178
+ ## 🛡 Project Rules (Injected into every command)
179
+
180
+ 1. **NO BROKEN BUILDS:**
181
+ - Run `pnpm test` before every `/commit`
182
+ - Ensure all tests pass
183
+ - Fix any type errors immediately
184
+
185
+ 2. **API DEVELOPMENT:**
186
+ - All new APIs MUST have Zod request/response schemas
187
+ - All APIs MUST be documented in both:
188
+ - OpenAPI spec ([src/lib/openapi/](src/lib/openapi/))
189
+ - API test manifest ([src/app/api-test/api-tests-manifest.json](src/app/api-test/api-tests-manifest.json))
190
+ - Test ALL parameters and edge cases
191
+ - Include code examples and real-world outputs
192
+
193
+ 3. **TDD WORKFLOW:**
194
+ - ALWAYS use /red → /green → /refactor cycle
195
+ - NEVER write implementation without failing test first
196
+ - Use /cycle for feature development
197
+ - Use characterization tests for refactoring
198
+
199
+ 4. **API KEY MANAGEMENT:**
200
+ - Support three loading methods:
201
+ - Server environment variables
202
+ - NEXT*PUBLIC* variables (client-side)
203
+ - Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
204
+ - Never hardcode API keys
205
+ - Always validate key availability before use
206
+
207
+ 5. **COMPREHENSIVE TESTING:**
208
+ - When researching APIs, read actual implementation code
209
+ - Discover ALL possible parameters (not just documented ones)
210
+ - Test with various parameter combinations
211
+ - Document custom headers, query params, request/response schemas
212
+ - Include validation rules and testing notes
213
+
214
+ 6. **NO UI BLOAT:**
215
+ - This is an API project with minimal frontend
216
+ - Only keep necessary test/documentation interfaces
217
+ - Delete unused components immediately
218
+ - No unnecessary UI libraries or features
219
+
220
+ 7. **DOCUMENTATION:**
221
+ - If you change an API, you MUST update:
222
+ - OpenAPI spec
223
+ - api-tests-manifest.json
224
+ - Code examples
225
+ - Testing notes
226
+ - Document expected behavior and edge cases
227
+ - Include real-world output examples