@hustle-together/api-dev-tools 3.10.1 → 3.11.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 (96) hide show
  1. package/.claude/api-dev-state.json +159 -0
  2. package/.claude/commands/README.md +185 -0
  3. package/.claude/commands/add-command.md +209 -0
  4. package/.claude/commands/api-create.md +499 -0
  5. package/.claude/commands/api-env.md +50 -0
  6. package/.claude/commands/api-interview.md +331 -0
  7. package/.claude/commands/api-research.md +331 -0
  8. package/.claude/commands/api-status.md +259 -0
  9. package/.claude/commands/api-verify.md +231 -0
  10. package/.claude/commands/beepboop.md +97 -0
  11. package/.claude/commands/busycommit.md +112 -0
  12. package/.claude/commands/commit.md +83 -0
  13. package/.claude/commands/cycle.md +142 -0
  14. package/.claude/commands/gap.md +86 -0
  15. package/.claude/commands/green.md +142 -0
  16. package/.claude/commands/issue.md +192 -0
  17. package/.claude/commands/plan.md +168 -0
  18. package/.claude/commands/pr.md +122 -0
  19. package/.claude/commands/red.md +142 -0
  20. package/.claude/commands/refactor.md +142 -0
  21. package/.claude/commands/spike.md +142 -0
  22. package/.claude/commands/summarize.md +94 -0
  23. package/.claude/commands/tdd.md +144 -0
  24. package/.claude/commands/worktree-add.md +315 -0
  25. package/.claude/commands/worktree-cleanup.md +281 -0
  26. package/.claude/hooks/api-workflow-check.py +227 -0
  27. package/.claude/hooks/enforce-deep-research.py +185 -0
  28. package/.claude/hooks/enforce-disambiguation.py +155 -0
  29. package/.claude/hooks/enforce-documentation.py +192 -0
  30. package/.claude/hooks/enforce-environment.py +253 -0
  31. package/.claude/hooks/enforce-external-research.py +328 -0
  32. package/.claude/hooks/enforce-interview.py +421 -0
  33. package/.claude/hooks/enforce-refactor.py +189 -0
  34. package/.claude/hooks/enforce-research.py +159 -0
  35. package/.claude/hooks/enforce-schema.py +186 -0
  36. package/.claude/hooks/enforce-scope.py +160 -0
  37. package/.claude/hooks/enforce-tdd-red.py +250 -0
  38. package/.claude/hooks/enforce-verify.py +186 -0
  39. package/.claude/hooks/periodic-reground.py +154 -0
  40. package/.claude/hooks/session-startup.py +151 -0
  41. package/.claude/hooks/track-tool-use.py +626 -0
  42. package/.claude/hooks/verify-after-green.py +282 -0
  43. package/.claude/hooks/verify-implementation.py +225 -0
  44. package/.claude/research/index.json +6 -0
  45. package/.claude/settings.json +93 -0
  46. package/.claude/settings.local.json +11 -0
  47. package/.claude-plugin/marketplace.json +112 -0
  48. package/.skills/README.md +291 -0
  49. package/.skills/_shared/convert-commands.py +192 -0
  50. package/.skills/_shared/hooks/api-workflow-check.py +227 -0
  51. package/.skills/_shared/hooks/enforce-deep-research.py +185 -0
  52. package/.skills/_shared/hooks/enforce-disambiguation.py +155 -0
  53. package/.skills/_shared/hooks/enforce-documentation.py +192 -0
  54. package/.skills/_shared/hooks/enforce-environment.py +253 -0
  55. package/.skills/_shared/hooks/enforce-external-research.py +328 -0
  56. package/.skills/_shared/hooks/enforce-interview.py +421 -0
  57. package/.skills/_shared/hooks/enforce-refactor.py +189 -0
  58. package/.skills/_shared/hooks/enforce-research.py +159 -0
  59. package/.skills/_shared/hooks/enforce-schema.py +186 -0
  60. package/.skills/_shared/hooks/enforce-scope.py +160 -0
  61. package/.skills/_shared/hooks/enforce-tdd-red.py +250 -0
  62. package/.skills/_shared/hooks/enforce-verify.py +186 -0
  63. package/.skills/_shared/hooks/periodic-reground.py +154 -0
  64. package/.skills/_shared/hooks/session-startup.py +151 -0
  65. package/.skills/_shared/hooks/track-tool-use.py +626 -0
  66. package/.skills/_shared/hooks/verify-after-green.py +282 -0
  67. package/.skills/_shared/hooks/verify-implementation.py +225 -0
  68. package/.skills/_shared/install.sh +114 -0
  69. package/.skills/_shared/settings.json +93 -0
  70. package/.skills/add-command/SKILL.md +222 -0
  71. package/.skills/api-create/SKILL.md +512 -0
  72. package/.skills/api-env/SKILL.md +63 -0
  73. package/.skills/api-interview/SKILL.md +344 -0
  74. package/.skills/api-research/SKILL.md +344 -0
  75. package/.skills/api-status/SKILL.md +272 -0
  76. package/.skills/api-verify/SKILL.md +244 -0
  77. package/.skills/beepboop/SKILL.md +110 -0
  78. package/.skills/busycommit/SKILL.md +125 -0
  79. package/.skills/commit/SKILL.md +96 -0
  80. package/.skills/cycle/SKILL.md +155 -0
  81. package/.skills/gap/SKILL.md +99 -0
  82. package/.skills/green/SKILL.md +155 -0
  83. package/.skills/issue/SKILL.md +205 -0
  84. package/.skills/plan/SKILL.md +181 -0
  85. package/.skills/pr/SKILL.md +135 -0
  86. package/.skills/red/SKILL.md +155 -0
  87. package/.skills/refactor/SKILL.md +155 -0
  88. package/.skills/spike/SKILL.md +155 -0
  89. package/.skills/summarize/SKILL.md +107 -0
  90. package/.skills/tdd/SKILL.md +157 -0
  91. package/.skills/update-todos/SKILL.md +228 -0
  92. package/.skills/worktree-add/SKILL.md +328 -0
  93. package/.skills/worktree-cleanup/SKILL.md +294 -0
  94. package/CHANGELOG.md +97 -0
  95. package/README.md +58 -17
  96. package/package.json +22 -11
@@ -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,222 @@
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
+ description: Guide for creating new slash commands
16
+ argument-hint: <command-name> <description>
17
+ ---
18
+
19
+ ## General Guidelines
20
+
21
+ ### Output Style
22
+
23
+ - **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
24
+ - Write natural, descriptive code without meta-commentary about the development process
25
+ - The code should speak for itself - TDD is the process, not the product
26
+
27
+ # Slash Command Creator Guide
28
+
29
+ ## How This Command Works
30
+
31
+ The `/add-command` command shows this guide for creating new slash commands. It includes:
32
+
33
+ - Command structure and syntax
34
+ - Common patterns and examples
35
+ - Security restrictions and limitations
36
+ - Frontmatter options
37
+
38
+ **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.
39
+
40
+ ## Command Locations
41
+
42
+ - **Personal**: `~/.claude/commands/` (available across all projects)
43
+ - **Project**: `.claude/commands/` (shared with team, shows "(project)")
44
+
45
+ ## Basic Structure
46
+
47
+ ```markdown
48
+ ---
49
+ allowed-tools: Read, Glob, Grep, Bash(git status:*), Task
50
+ description: Brief description of what this command does
51
+ argument-hint: [required-arg] [optional-arg]
52
+ ---
53
+
54
+ # Command Title
55
+
56
+ Your command instructions here.
57
+
58
+ Arguments: $ARGUMENTS
59
+
60
+ File reference: @path/to/file.js
61
+
62
+ Bash command output: (exclamation)git status(backticks)
63
+ ```
64
+
65
+ ## ⚠️ Security Restrictions
66
+
67
+ **Bash Commands (exclamation prefix)**: Limited to current working directory only.
68
+
69
+ - ✅ Works: `! + backtick + git status + backtick` (in project dir)
70
+ - ❌ Blocked: `! + backtick + ls /outside/project + backtick` (outside project)
71
+ - ❌ Blocked: `! + backtick + pwd + backtick` (if referencing dirs outside project)
72
+
73
+ **File References (`@` prefix)**: No directory restrictions.
74
+
75
+ - ✅ Works: `@/path/to/system/file.md`
76
+ - ✅ Works: `@../other-project/file.js`
77
+
78
+ ## Common Patterns
79
+
80
+ ### Simple Command
81
+
82
+ ```bash
83
+ echo "Review this code for bugs and suggest fixes" > ~/.claude/commands/review.md
84
+ ```
85
+
86
+ ### Command with Arguments
87
+
88
+ **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.
89
+
90
+ ```markdown
91
+ Fix issue $ARGUMENTS following our coding standards
92
+ ```
93
+
94
+ ### Command with File References
95
+
96
+ ```markdown
97
+ Compare @src/old.js with @src/new.js and explain differences
98
+ ```
99
+
100
+ ### Command with Bash Output (Project Directory Only)
101
+
102
+ ```markdown
103
+ ---
104
+ allowed-tools: Bash(git status:*), Bash(git branch:*), Bash(git log:*)
105
+ ---
106
+ Current status: (!)git status(`)
107
+ Current branch: (!)git branch --show-current(`)
108
+ Recent commits: (!)git log --oneline -5(`)
109
+
110
+ Create commit for these changes.
111
+ ```
112
+
113
+ **Note**: Only works with commands in the current project directory.
114
+
115
+ ### Namespaced Command
116
+
117
+ **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.
118
+
119
+ ```bash
120
+ mkdir -p ~/.claude/commands/ai
121
+ echo "Ask GPT-5 about: $ARGUMENTS" > ~/.claude/commands/ai/gpt5.md
122
+ # Creates: /ai:gpt5
123
+ ```
124
+
125
+ ## Frontmatter Options
126
+
127
+ - `allowed-tools`: Tools this command can use
128
+ - **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.
129
+ - ✅ Safe for most commands: `Read`, `Glob`, `Grep`, `Bash(git status:*)`, `Task`, `AskUserQuestion`
130
+ - `description`: Brief description (shows in /help)
131
+ - `argument-hint`: Help text for arguments
132
+ - `model`: Specific model to use
133
+
134
+ ## Best Practices
135
+
136
+ ### Safe Commands (No Security Issues)
137
+
138
+ ```markdown
139
+ # System prompt editor (file reference only)
140
+ (@)path/to/system/prompt.md
141
+
142
+ Edit your system prompt above.
143
+ ```
144
+
145
+ ### Project-Specific Commands (Bash OK)
146
+
147
+ ```markdown
148
+ ---
149
+ allowed-tools: Bash(git status:*), Bash(npm list:*)
150
+ ---
151
+ Current git status: (!)git status(`)
152
+ Package info: (!)npm list --depth=0(`)
153
+
154
+ Review project state and suggest next steps.
155
+ ```
156
+
157
+ ### Cross-Directory File Access (Use @ not !)
158
+
159
+ ```markdown
160
+ # Compare config files
161
+ Compare (@)path/to/system.md with (@)project/config.md
162
+
163
+ Show differences and suggest improvements.
164
+ ```
165
+
166
+ ## Usage
167
+
168
+ After creating: `/<command-name> [arguments]`
169
+
170
+ Example: `/review` or `/ai:gpt5 "explain this code"`
171
+
172
+
173
+ ## 🛡 Project Rules (Injected into every command)
174
+
175
+ 1. **NO BROKEN BUILDS:**
176
+ - Run `pnpm test` before every `/commit`
177
+ - Ensure all tests pass
178
+ - Fix any type errors immediately
179
+
180
+ 2. **API DEVELOPMENT:**
181
+ - All new APIs MUST have Zod request/response schemas
182
+ - All APIs MUST be documented in both:
183
+ - OpenAPI spec ([src/lib/openapi/](src/lib/openapi/))
184
+ - API test manifest ([src/app/api-test/api-tests-manifest.json](src/app/api-test/api-tests-manifest.json))
185
+ - Test ALL parameters and edge cases
186
+ - Include code examples and real-world outputs
187
+
188
+ 3. **TDD WORKFLOW:**
189
+ - ALWAYS use /red → /green → /refactor cycle
190
+ - NEVER write implementation without failing test first
191
+ - Use /cycle for feature development
192
+ - Use characterization tests for refactoring
193
+
194
+ 4. **API KEY MANAGEMENT:**
195
+ - Support three loading methods:
196
+ - Server environment variables
197
+ - NEXT_PUBLIC_ variables (client-side)
198
+ - Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
199
+ - Never hardcode API keys
200
+ - Always validate key availability before use
201
+
202
+ 5. **COMPREHENSIVE TESTING:**
203
+ - When researching APIs, read actual implementation code
204
+ - Discover ALL possible parameters (not just documented ones)
205
+ - Test with various parameter combinations
206
+ - Document custom headers, query params, request/response schemas
207
+ - Include validation rules and testing notes
208
+
209
+ 6. **NO UI BLOAT:**
210
+ - This is an API project with minimal frontend
211
+ - Only keep necessary test/documentation interfaces
212
+ - Delete unused components immediately
213
+ - No unnecessary UI libraries or features
214
+
215
+ 7. **DOCUMENTATION:**
216
+ - If you change an API, you MUST update:
217
+ - OpenAPI spec
218
+ - api-tests-manifest.json
219
+ - Code examples
220
+ - Testing notes
221
+ - Document expected behavior and edge cases
222
+ - Include real-world output examples