@hustle-together/api-dev-tools 3.10.0 → 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 (97) 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 +66 -20
  96. package/bin/cli.js +7 -6
  97. package/package.json +22 -11
@@ -0,0 +1,259 @@
1
+ # API Status - Track Implementation Progress
2
+
3
+ **Usage:** `/api-status [endpoint-name]` or `/api-status --all`
4
+
5
+ **Purpose:** View and update API implementation status, track progress, and manage V2 migration.
6
+
7
+ ## State File Integration
8
+
9
+ This command reads from `.claude/api-dev-state.json` which is automatically updated by the enforcement hooks.
10
+
11
+ ### Reading Current State
12
+
13
+ **FIRST: Read the state file to understand current progress:**
14
+
15
+ ```
16
+ Tool: Read
17
+ Path: .claude/api-dev-state.json
18
+ ```
19
+
20
+ Parse the JSON and display a formatted status report showing:
21
+ - Current endpoint being worked on
22
+ - Phase completion status (scope, research, interview, TDD, docs)
23
+ - Sources consulted during research
24
+ - Timestamps for each phase
25
+ - Verification status
26
+
27
+ ### Example State Display
28
+
29
+ ```
30
+ 📊 API Development Progress
31
+
32
+ Endpoint: stream-text
33
+ Library: vercel-ai-sdk
34
+ Started: 2025-12-06T20:00:00Z
35
+
36
+ PHASES:
37
+ ✅ Scope defined (20:00:30)
38
+ ✅ Initial research - 4 sources consulted (20:02:00)
39
+ 🔄 Interview - in progress
40
+ ⬜ Deep research
41
+ ⬜ Schema creation
42
+ ⬜ Environment check
43
+ ⬜ TDD Red
44
+ ⬜ TDD Green
45
+ ⬜ TDD Refactor
46
+ ⬜ Documentation
47
+
48
+ RESEARCH SOURCES:
49
+ • context7: @ai-sdk/core (20:01:00)
50
+ • websearch: "Vercel AI SDK streamText 2025" (20:01:30)
51
+ • webfetch: https://sdk.vercel.ai/docs (20:01:45)
52
+
53
+ VERIFICATION:
54
+ ❌ All sources fetched: false
55
+ ❌ Schema matches docs: false
56
+ ❌ Tests cover params: false
57
+ ❌ All tests passing: false
58
+ ```
59
+
60
+ ## What This Shows
61
+
62
+ ### For Specific Endpoint
63
+ ```
64
+ 📊 Status: /api/v2/generate-css
65
+
66
+ Phase: ✅ Complete
67
+ Tests: 33/33 passing (100% coverage)
68
+ Documentation: ✅ Complete
69
+
70
+ Timeline:
71
+ ✅ Interview completed (2025-12-06)
72
+ ✅ Research completed (2025-12-06)
73
+ ✅ Environment verified (2025-12-06)
74
+ ✅ Tests written (Red phase)
75
+ ✅ Implementation complete (Green phase)
76
+ ✅ Refactored (Refactor phase)
77
+ ✅ Documentation updated
78
+ ✅ Committed to git
79
+
80
+ Files:
81
+ - Route: src/app/api/v2/generate-css/route.ts
82
+ - Tests: src/app/api/v2/generate-css/__tests__/generate-css.api.test.ts
83
+ - Docs: src/v2/docs/endpoints/generate-css.md
84
+ - Research: src/v2/docs/research/gemini-flash.md
85
+
86
+ Next Steps: None - endpoint complete
87
+ ```
88
+
89
+ ### For All Endpoints
90
+ ```
91
+ 📊 V2 API Implementation Status
92
+
93
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
94
+
95
+ ✅ COMPLETE (2)
96
+ • /api/v2/health (15 tests)
97
+ • /api/v2/monitor (23 tests)
98
+
99
+ 🚧 IN PROGRESS (1)
100
+ • /api/v2/generate-css (interview complete, implementing)
101
+
102
+ 📋 PLANNED (3)
103
+ • /api/v2/generate-html
104
+ • /api/v2/chat
105
+ • /api/v2/scrape
106
+
107
+ ❌ NOT STARTED (0)
108
+
109
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
110
+
111
+ Summary:
112
+ Total endpoints: 6
113
+ Complete: 2 (33%)
114
+ In progress: 1 (17%)
115
+ Planned: 3 (50%)
116
+ Total tests: 38
117
+ Coverage: 100%
118
+
119
+ Last updated: 2025-12-06
120
+ ```
121
+
122
+ ## Commands
123
+
124
+ ### View Status
125
+ ```bash
126
+ /api-status generate-css # Specific endpoint
127
+ /api-status --all # All endpoints
128
+ ```
129
+
130
+ ### Update Status
131
+ ```bash
132
+ /api-status generate-css --phase=testing
133
+ /api-status generate-css --complete
134
+ ```
135
+
136
+ ## Status Tracking File
137
+
138
+ Updates: `/src/v2/docs/v2-api-implementation-status.md`
139
+
140
+ **Format:**
141
+ ```markdown
142
+ # V2 API Implementation Status
143
+
144
+ **Last Updated:** 2025-12-06
145
+ **Total Endpoints:** 6
146
+ **Completed:** 2 (33%)
147
+
148
+ ## Endpoints
149
+
150
+ ### ✅ /api/v2/health
151
+ - **Status:** Complete
152
+ - **Tests:** 15/15 passing
153
+ - **Coverage:** 100%
154
+ - **Interview:** [Link to docs]
155
+ - **Implemented:** 2025-12-06
156
+ - **Purpose:** System health check with dependency validation
157
+
158
+ ### 🚧 /api/v2/generate-css
159
+ - **Status:** In Progress (Testing)
160
+ - **Tests:** 20/33 passing
161
+ - **Coverage:** 85%
162
+ - **Interview:** [Link to docs]
163
+ - **Started:** 2025-12-06
164
+ - **Blocked by:** None
165
+ - **Next:** Complete remaining tests
166
+
167
+ ### 📋 /api/v2/generate-html
168
+ - **Status:** Planned
169
+ - **Priority:** High
170
+ - **Dependencies:** None
171
+ - **Interview:** Not started
172
+ - **Estimated effort:** Medium
173
+ ```
174
+
175
+ ## Integration with Workflow
176
+
177
+ ### After Interview
178
+ ```bash
179
+ /api-interview generate-css
180
+ /api-status generate-css --phase=interview-complete
181
+ ```
182
+
183
+ ### After Research
184
+ ```bash
185
+ /api-research gemini-flash
186
+ /api-status generate-css --phase=research-complete
187
+ ```
188
+
189
+ ### After TDD Cycle
190
+ ```bash
191
+ /cycle generate CSS with Gemini
192
+ /api-status generate-css --complete
193
+ ```
194
+
195
+ ### Before Commit
196
+ ```bash
197
+ pnpm test:run
198
+ /api-status --all # Verify all green
199
+ /commit
200
+ ```
201
+
202
+ ## Automatic Updates
203
+
204
+ The `/api-create` command automatically updates status:
205
+ - Interview phase → "Interview Complete"
206
+ - Red phase → "Tests Written"
207
+ - Green phase → "Implementation Complete"
208
+ - Refactor phase → "Refactored"
209
+ - Documentation → "Documentation Updated"
210
+ - Commit → "Complete"
211
+
212
+ ## Status Phases
213
+
214
+ 1. **Not Started** - No work begun
215
+ 2. **Interview Complete** - Understanding documented
216
+ 3. **Research Complete** - External docs reviewed
217
+ 4. **Environment Ready** - API keys verified
218
+ 5. **Tests Written** - Red phase complete
219
+ 6. **Implementation Complete** - Green phase complete
220
+ 7. **Refactored** - Code cleaned up
221
+ 8. **Documentation Updated** - Manifests updated
222
+ 9. **Complete** - All tests passing, committed
223
+
224
+ ## Reports
225
+
226
+ ### Coverage Report
227
+ ```bash
228
+ /api-status --coverage
229
+ ```
230
+ Shows test coverage for all V2 endpoints.
231
+
232
+ ### Migration Report
233
+ ```bash
234
+ /api-status --migration
235
+ ```
236
+ Shows progress from legacy to V2.
237
+
238
+ ### Blockers Report
239
+ ```bash
240
+ /api-status --blocked
241
+ ```
242
+ Shows endpoints blocked by missing keys, dependencies, etc.
243
+
244
+ <claude-commands-template>
245
+ ## Status Management
246
+
247
+ - Update status after each phase completion
248
+ - Keep v2-api-implementation-status.md current
249
+ - Use status to plan next work
250
+ - Reference in standup/progress reports
251
+ - Track blockers and dependencies
252
+
253
+ ## Integration Points
254
+
255
+ - Used by /api-create to track progress
256
+ - Used by /commit to verify readiness
257
+ - Used by team to see what's done
258
+ - Used for planning future work
259
+ </claude-commands-template>
@@ -0,0 +1,231 @@
1
+ # API Verify - Implementation Verification (Phase 10) v3.0
2
+
3
+ **Usage:** `/api-verify [endpoint-name]`
4
+
5
+ **Purpose:** Manually trigger Phase 10 verification - re-research documentation and compare to implementation to catch memory-based errors.
6
+
7
+ ## When to Use
8
+
9
+ - After tests pass (TDD Green complete)
10
+ - Before proceeding to Refactor phase
11
+ - When unsure if implementation matches documentation
12
+ - After significant time has passed since initial research
13
+
14
+ ## Verification Process
15
+
16
+ ### Step 1: Re-Read Original Documentation
17
+
18
+ ```
19
+ ┌────────────────────────────────────────────────────────────┐
20
+ │ RE-RESEARCHING DOCUMENTATION │
21
+ │ │
22
+ │ Fetching current documentation for: [endpoint-name] │
23
+ │ │
24
+ │ Sources: │
25
+ │ - Context7: [library-name] │
26
+ │ - Official docs: [URL] │
27
+ │ - Cached research: .claude/research/[api]/CURRENT.md │
28
+ │ │
29
+ │ Freshness: [X days old] │
30
+ └────────────────────────────────────────────────────────────┘
31
+ ```
32
+
33
+ ### Step 2: Feature-by-Feature Comparison
34
+
35
+ ```
36
+ ┌────────────────────────────────────────────────────────────┐
37
+ │ IMPLEMENTATION VERIFICATION │
38
+ │ │
39
+ │ Comparing documentation to implementation: │
40
+ │ │
41
+ │ │ Feature │ In Docs │ Implemented │ Status │
42
+ │ ├─────────────────┼─────────┼─────────────┼───────────────│
43
+ │ │ domain param │ ✓ │ ✓ │ ✅ Match │
44
+ │ │ format param │ 4 opts │ 3 opts │ ⚠️ Missing │
45
+ │ │ quality range │ 1-100 │ 1-100 │ ✅ Match │
46
+ │ │ size param │ ✓ │ ✗ │ ⚠️ Missing │
47
+ │ │ webhook support │ ✓ │ ✗ │ ℹ️ Intentional │
48
+ │ │ batch mode │ ✓ │ ✗ │ ℹ️ Intentional │
49
+ │ │
50
+ │ MATCHES: 2 │
51
+ │ MISSING: 2 │
52
+ │ INTENTIONAL OMISSIONS: 2 │
53
+ └────────────────────────────────────────────────────────────┘
54
+ ```
55
+
56
+ ### Step 3: Gap Analysis
57
+
58
+ For each discrepancy:
59
+
60
+ ```
61
+ ┌────────────────────────────────────────────────────────────┐
62
+ │ GAP #1: format parameter │
63
+ │ │
64
+ │ Documentation says: ["json", "svg", "png", "raw"] │
65
+ │ Implementation has: ["json", "svg", "png"] │
66
+ │ │
67
+ │ Missing: "raw" format │
68
+ │ │
69
+ │ Action? │
70
+ │ [x] Fix - Add "raw" format support │
71
+ │ [ ] Skip - Mark as intentional omission │
72
+ │ [ ] Defer - Add to backlog for later │
73
+ └────────────────────────────────────────────────────────────┘
74
+
75
+ ┌────────────────────────────────────────────────────────────┐
76
+ │ GAP #2: size parameter │
77
+ │ │
78
+ │ Documentation says: size parameter exists (16-4096) │
79
+ │ Implementation has: not implemented │
80
+ │ │
81
+ │ Action? │
82
+ │ [x] Fix - Add size parameter │
83
+ │ [ ] Skip - Mark as intentional omission │
84
+ │ [ ] Defer - Add to backlog for later │
85
+ └────────────────────────────────────────────────────────────┘
86
+ ```
87
+
88
+ ### Step 4: Loop Back or Proceed
89
+
90
+ ```
91
+ ┌────────────────────────────────────────────────────────────┐
92
+ │ VERIFICATION SUMMARY │
93
+ │ │
94
+ │ Gaps to fix: 2 │
95
+ │ Intentional omissions: 2 │
96
+ │ │
97
+ │ DECISION: │
98
+ │ │
99
+ │ [x] Fix gaps → Return to TDD Red (write tests for gaps) │
100
+ │ [ ] Skip all → Document as omissions, proceed to Refactor │
101
+ └────────────────────────────────────────────────────────────┘
102
+ ```
103
+
104
+ ## State File Updates
105
+
106
+ ```json
107
+ {
108
+ "phases": {
109
+ "verify": {
110
+ "status": "complete",
111
+ "gaps_found": 2,
112
+ "gaps_fixed": 2,
113
+ "intentional_omissions": [
114
+ {
115
+ "feature": "webhook support",
116
+ "reason": "User declined in interview",
117
+ "documented_at": "..."
118
+ },
119
+ {
120
+ "feature": "batch mode",
121
+ "reason": "Out of scope for v1",
122
+ "documented_at": "..."
123
+ }
124
+ ],
125
+ "re_research_done": true,
126
+ "completed_at": "..."
127
+ }
128
+ }
129
+ }
130
+ ```
131
+
132
+ ## Verification Report
133
+
134
+ Creates: `.claude/research/[api-name]/verification.md`
135
+
136
+ ```markdown
137
+ # Verification Report: [API Name]
138
+
139
+ **Date:** [current-date]
140
+ **Implementation File:** src/app/api/v2/[endpoint]/route.ts
141
+ **Test File:** src/app/api/v2/[endpoint]/__tests__/[endpoint].api.test.ts
142
+
143
+ ## Documentation Sources Re-Checked
144
+
145
+ | Source | URL | Checked |
146
+ |--------|-----|---------|
147
+ | Official docs | [URL] | ✓ |
148
+ | Context7 | [library] | ✓ |
149
+ | Cached research | .claude/research/[api]/CURRENT.md | ✓ |
150
+
151
+ ## Feature Comparison
152
+
153
+ | Feature | In Docs | Implemented | Status |
154
+ |---------|---------|-------------|--------|
155
+ | domain param | ✓ | ✓ | ✅ Match |
156
+ | format param | 4 options | 3 options | ⚠️ Fixed |
157
+ | size param | ✓ | ✓ | ⚠️ Fixed |
158
+ | webhook | ✓ | ✗ | ℹ️ Intentional |
159
+
160
+ ## Gaps Fixed
161
+
162
+ 1. **format parameter** - Added "raw" format support
163
+ - Test added: test/format-raw.test.ts:15
164
+ - Implementation: route.ts:45
165
+
166
+ 2. **size parameter** - Added size validation
167
+ - Test added: test/size-param.test.ts:10
168
+ - Implementation: route.ts:52
169
+
170
+ ## Intentional Omissions
171
+
172
+ 1. **webhook support**
173
+ - Reason: User declined in interview (Phase 4)
174
+ - Decision recorded: api-dev-state.json
175
+ - May add in v2
176
+
177
+ 2. **batch mode**
178
+ - Reason: Out of scope for initial release
179
+ - Documented for future consideration
180
+
181
+ ## Verification Result
182
+
183
+ - **Status:** PASSED
184
+ - **All documented features accounted for**
185
+ - **Ready for Refactor phase**
186
+ ```
187
+
188
+ ## Hook Integration
189
+
190
+ This command is normally triggered automatically by `verify-after-green.py` hook after tests pass.
191
+
192
+ Manual invocation is useful when:
193
+ - Hook was skipped or didn't trigger
194
+ - Want to re-verify after changes
195
+ - Research is stale and needs refresh
196
+
197
+ ## Workflow Position
198
+
199
+ ```
200
+ Phase 8: TDD Red (write tests)
201
+
202
+
203
+ Phase 9: TDD Green (implementation)
204
+
205
+
206
+ Phase 10: VERIFY ← /api-verify triggers this
207
+
208
+ ├─► Gaps found? → Loop back to Phase 8
209
+
210
+ └─► All verified → Proceed to Phase 11 (Refactor)
211
+ ```
212
+
213
+ <claude-commands-template>
214
+ ## Verification Guidelines
215
+
216
+ 1. **Re-read, don't remember** - Fresh fetch of docs every time
217
+ 2. **Feature-by-feature** - Systematic comparison
218
+ 3. **Document omissions** - Intentional != forgotten
219
+ 4. **Loop back for gaps** - Return to TDD Red if fixes needed
220
+ 5. **Update state file** - Track everything
221
+ 6. **Create verification report** - Audit trail
222
+
223
+ ## Common Gaps to Check
224
+
225
+ - Parameter counts match?
226
+ - Enum options complete?
227
+ - Range boundaries correct?
228
+ - Error codes handled?
229
+ - Optional features accounted for?
230
+ - Default values match docs?
231
+ </claude-commands-template>
@@ -0,0 +1,97 @@
1
+ ---
2
+ description: Communicate AI-generated content with transparent attribution
3
+ argument-hint: <task-description>
4
+ ---
5
+
6
+ # AI-Attributed Communication Command
7
+
8
+ Execute the user's requested task (e.g., posting PR comments, GitHub issue comments, or other communications through various MCPs), but frame the output with clear AI attribution.
9
+
10
+ ## General Guidelines
11
+
12
+ ### Output Style
13
+
14
+ - **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
15
+ - Write natural, descriptive code without meta-commentary about the development process
16
+ - The code should speak for itself - TDD is the process, not the product
17
+
18
+ ## Instructions
19
+
20
+ Arguments: $ARGUMENTS
21
+
22
+ **IMPORTANT Communication Format:**
23
+
24
+ 1. **Opening**: Begin with "*Beep boop, I am Claude Code 🤖, my user has reviewed and approved the following written by me:*"
25
+ - Use italics for this line
26
+ - Clearly establishes AI authorship
27
+
28
+ 2. **Middle**: Perform the requested task (post comment, create review, etc.)
29
+ - Execute whatever communication task the user requested
30
+ - Write the actual content that accomplishes the user's goal
31
+
32
+ 3. **Closing**: End with "*Beep boop, Claude Code 🤖 out!*"
33
+ - Use italics for this line
34
+ - Provides clear closure
35
+
36
+ ## Purpose
37
+
38
+ This command ensures transparency about AI usage while maintaining that the user has reviewed and approved the content. It prevents offloading review responsibility to other users while being open about AI assistance.
39
+
40
+ ## Examples
41
+
42
+ - Posting a GitHub PR review comment
43
+ - Adding a comment to a GitHub issue
44
+ - Responding to feedback with AI-generated explanations
45
+ - Any communication where AI attribution is valuable
46
+
47
+
48
+ ## 🛡 Project Rules (Injected into every command)
49
+
50
+ 1. **NO BROKEN BUILDS:**
51
+ - Run `pnpm test` before every `/commit`
52
+ - Ensure all tests pass
53
+ - Fix any type errors immediately
54
+
55
+ 2. **API DEVELOPMENT:**
56
+ - All new APIs MUST have Zod request/response schemas
57
+ - All APIs MUST be documented in both:
58
+ - OpenAPI spec ([src/lib/openapi/](src/lib/openapi/))
59
+ - API test manifest ([src/app/api-test/api-tests-manifest.json](src/app/api-test/api-tests-manifest.json))
60
+ - Test ALL parameters and edge cases
61
+ - Include code examples and real-world outputs
62
+
63
+ 3. **TDD WORKFLOW:**
64
+ - ALWAYS use /red → /green → /refactor cycle
65
+ - NEVER write implementation without failing test first
66
+ - Use /cycle for feature development
67
+ - Use characterization tests for refactoring
68
+
69
+ 4. **API KEY MANAGEMENT:**
70
+ - Support three loading methods:
71
+ - Server environment variables
72
+ - NEXT_PUBLIC_ variables (client-side)
73
+ - Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
74
+ - Never hardcode API keys
75
+ - Always validate key availability before use
76
+
77
+ 5. **COMPREHENSIVE TESTING:**
78
+ - When researching APIs, read actual implementation code
79
+ - Discover ALL possible parameters (not just documented ones)
80
+ - Test with various parameter combinations
81
+ - Document custom headers, query params, request/response schemas
82
+ - Include validation rules and testing notes
83
+
84
+ 6. **NO UI BLOAT:**
85
+ - This is an API project with minimal frontend
86
+ - Only keep necessary test/documentation interfaces
87
+ - Delete unused components immediately
88
+ - No unnecessary UI libraries or features
89
+
90
+ 7. **DOCUMENTATION:**
91
+ - If you change an API, you MUST update:
92
+ - OpenAPI spec
93
+ - api-tests-manifest.json
94
+ - Code examples
95
+ - Testing notes
96
+ - Document expected behavior and edge cases
97
+ - Include real-world output examples
@@ -0,0 +1,112 @@
1
+ ---
2
+ description: Create multiple atomic git commits, one logical change at a time
3
+ argument-hint: [optional-commit-description]
4
+ ---
5
+
6
+ ## General Guidelines
7
+
8
+ ### Output Style
9
+
10
+ - **Never explicitly mention TDD** in code, comments, commits, PRs, or issues
11
+ - Write natural, descriptive code without meta-commentary about the development process
12
+ - The code should speak for itself - TDD is the process, not the product
13
+
14
+ Create multiple atomic git commits, committing the smallest possible logical unit at a time
15
+
16
+ Include any of the following info if specified: $ARGUMENTS
17
+
18
+ ## Process
19
+
20
+ 1. Run `git status` and `git diff` to review changes
21
+ 2. Run `git log --oneline -5` to see recent commit style
22
+ 3. Stage relevant files with `git add`
23
+ 4. Create commit with descriptive message
24
+ 5. Verify with `git status`
25
+
26
+ ## Example
27
+
28
+ ```bash
29
+ git add <files>
30
+ git commit -m "feat(#123): add validation to user input form"
31
+ ```
32
+
33
+ ## Atomic Commit Approach
34
+
35
+ Each commit should represent ONE logical change. Do NOT bundle multiple unrelated changes into one commit.
36
+
37
+ - Identify the smallest atomic units of change
38
+ - For EACH atomic unit: stage only those files/hunks, commit, verify
39
+ - Use `git add -p` to stage partial file changes when a file contains multiple logical changes
40
+ - Repeat until all changes are committed
41
+ - It is OK to create multiple commits without stopping - keep going until `git status` shows clean
42
+
43
+ ## Multi-Commit Example
44
+
45
+ If a single file contains multiple unrelated changes, use `git add -p` to stage hunks interactively:
46
+
47
+ ```bash
48
+ # Stage only the validation-related hunks from the file
49
+ git add -p src/user-service.ts
50
+ # Select 'y' for validation hunks, 'n' for others
51
+ git commit -m "feat(#123): add email format validation"
52
+
53
+ # Stage the error handling hunks
54
+ git add -p src/user-service.ts
55
+ git commit -m "fix(#124): handle null user gracefully"
56
+
57
+ # Stage remaining changes
58
+ git add src/user-service.ts
59
+ git commit -m "refactor: extract user lookup to helper"
60
+ ```
61
+
62
+
63
+ ## 🛡 Project Rules (Injected into every command)
64
+
65
+ 1. **NO BROKEN BUILDS:**
66
+ - Run `pnpm test` before every `/commit`
67
+ - Ensure all tests pass
68
+ - Fix any type errors immediately
69
+
70
+ 2. **API DEVELOPMENT:**
71
+ - All new APIs MUST have Zod request/response schemas
72
+ - All APIs MUST be documented in both:
73
+ - OpenAPI spec ([src/lib/openapi/](src/lib/openapi/))
74
+ - API test manifest ([src/app/api-test/api-tests-manifest.json](src/app/api-test/api-tests-manifest.json))
75
+ - Test ALL parameters and edge cases
76
+ - Include code examples and real-world outputs
77
+
78
+ 3. **TDD WORKFLOW:**
79
+ - ALWAYS use /red → /green → /refactor cycle
80
+ - NEVER write implementation without failing test first
81
+ - Use /cycle for feature development
82
+ - Use characterization tests for refactoring
83
+
84
+ 4. **API KEY MANAGEMENT:**
85
+ - Support three loading methods:
86
+ - Server environment variables
87
+ - NEXT_PUBLIC_ variables (client-side)
88
+ - Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
89
+ - Never hardcode API keys
90
+ - Always validate key availability before use
91
+
92
+ 5. **COMPREHENSIVE TESTING:**
93
+ - When researching APIs, read actual implementation code
94
+ - Discover ALL possible parameters (not just documented ones)
95
+ - Test with various parameter combinations
96
+ - Document custom headers, query params, request/response schemas
97
+ - Include validation rules and testing notes
98
+
99
+ 6. **NO UI BLOAT:**
100
+ - This is an API project with minimal frontend
101
+ - Only keep necessary test/documentation interfaces
102
+ - Delete unused components immediately
103
+ - No unnecessary UI libraries or features
104
+
105
+ 7. **DOCUMENTATION:**
106
+ - If you change an API, you MUST update:
107
+ - OpenAPI spec
108
+ - api-tests-manifest.json
109
+ - Code examples
110
+ - Testing notes
111
+ - Document expected behavior and edge cases
112
+ - Include real-world output examples