@hustle-together/api-dev-tools 3.12.16 → 4.5.3

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 (180) hide show
  1. package/.claude/adr-requests/.gitkeep +10 -0
  2. package/.claude/agents/adr-researcher.md +109 -0
  3. package/.claude/agents/visual-analyzer.md +183 -0
  4. package/.claude/api-dev-state.json +10 -0
  5. package/.claude/documentation-audit.json +114 -0
  6. package/.claude/registry.json +289 -0
  7. package/.claude/settings.json +45 -1
  8. package/.claude/settings.local.json +1 -7
  9. package/.claude/workflow-logs/None.json +49 -0
  10. package/.claude/workflow-logs/session-20251230-143727.json +106 -0
  11. package/.skills/adr-deep-research/SKILL.md +351 -0
  12. package/.skills/api-create/SKILL.md +34 -20
  13. package/.skills/api-research/SKILL.md +130 -0
  14. package/.skills/docs-update/SKILL.md +205 -0
  15. package/.skills/hustle-brand/SKILL.md +368 -0
  16. package/.skills/hustle-build/SKILL.md +365 -38
  17. package/.skills/parallel-spawn/SKILL.md +212 -0
  18. package/.skills/ralph-continue/SKILL.md +151 -0
  19. package/.skills/ralph-loop/SKILL.md +341 -0
  20. package/.skills/ralph-status/SKILL.md +87 -0
  21. package/.skills/refactor/SKILL.md +59 -0
  22. package/.skills/shadcn/SKILL.md +522 -0
  23. package/.skills/test-all/SKILL.md +210 -0
  24. package/.skills/test-builds/SKILL.md +208 -0
  25. package/.skills/test-debug/SKILL.md +212 -0
  26. package/.skills/test-e2e/SKILL.md +168 -0
  27. package/.skills/test-review/SKILL.md +707 -0
  28. package/.skills/test-unit/SKILL.md +143 -0
  29. package/.skills/test-visual/SKILL.md +301 -0
  30. package/.skills/token-report/SKILL.md +132 -0
  31. package/CHANGELOG.md +488 -0
  32. package/README.md +346 -53
  33. package/bin/cli.js +359 -123
  34. package/hooks/__pycache__/api-workflow-check.cpython-314.pyc +0 -0
  35. package/hooks/__pycache__/auto-answer.cpython-314.pyc +0 -0
  36. package/hooks/__pycache__/cache-research.cpython-314.pyc +0 -0
  37. package/hooks/__pycache__/check-api-routes.cpython-314.pyc +0 -0
  38. package/hooks/__pycache__/check-playwright-setup.cpython-314.pyc +0 -0
  39. package/hooks/__pycache__/check-storybook-setup.cpython-314.pyc +0 -0
  40. package/hooks/__pycache__/check-update.cpython-314.pyc +0 -0
  41. package/hooks/__pycache__/completion-promise-detector.cpython-314.pyc +0 -0
  42. package/hooks/__pycache__/context-capacity-warning.cpython-314.pyc +0 -0
  43. package/hooks/__pycache__/detect-interruption.cpython-314.pyc +0 -0
  44. package/hooks/__pycache__/docs-update-check.cpython-314.pyc +0 -0
  45. package/hooks/__pycache__/enforce-a11y-audit.cpython-314.pyc +0 -0
  46. package/hooks/__pycache__/enforce-brand-guide.cpython-314.pyc +0 -0
  47. package/hooks/__pycache__/enforce-component-type-confirm.cpython-314.pyc +0 -0
  48. package/hooks/__pycache__/enforce-deep-research.cpython-314.pyc +0 -0
  49. package/hooks/__pycache__/enforce-disambiguation.cpython-314.pyc +0 -0
  50. package/hooks/__pycache__/enforce-documentation.cpython-314.pyc +0 -0
  51. package/hooks/__pycache__/enforce-dry-run.cpython-314.pyc +0 -0
  52. package/hooks/__pycache__/enforce-environment.cpython-314.pyc +0 -0
  53. package/hooks/__pycache__/enforce-external-research.cpython-314.pyc +0 -0
  54. package/hooks/__pycache__/enforce-freshness.cpython-314.pyc +0 -0
  55. package/hooks/__pycache__/enforce-interview.cpython-314.pyc +0 -0
  56. package/hooks/__pycache__/enforce-page-components.cpython-314.pyc +0 -0
  57. package/hooks/__pycache__/enforce-page-data-schema.cpython-314.pyc +0 -0
  58. package/hooks/__pycache__/enforce-questions-sourced.cpython-314.pyc +0 -0
  59. package/hooks/__pycache__/enforce-refactor.cpython-314.pyc +0 -0
  60. package/hooks/__pycache__/enforce-research.cpython-314.pyc +0 -0
  61. package/hooks/__pycache__/enforce-schema-from-interview.cpython-314.pyc +0 -0
  62. package/hooks/__pycache__/enforce-schema.cpython-314.pyc +0 -0
  63. package/hooks/__pycache__/enforce-scope.cpython-314.pyc +0 -0
  64. package/hooks/__pycache__/enforce-tdd-red.cpython-314.pyc +0 -0
  65. package/hooks/__pycache__/enforce-ui-disambiguation.cpython-314.pyc +0 -0
  66. package/hooks/__pycache__/enforce-ui-interview.cpython-314.pyc +0 -0
  67. package/hooks/__pycache__/enforce-verify.cpython-314.pyc +0 -0
  68. package/hooks/__pycache__/generate-adr-options.cpython-314.pyc +0 -0
  69. package/hooks/__pycache__/generate-manifest-entry.cpython-314.pyc +0 -0
  70. package/hooks/__pycache__/hook_utils.cpython-314.pyc +0 -0
  71. package/hooks/__pycache__/notify-input-needed.cpython-314.pyc +0 -0
  72. package/hooks/__pycache__/notify-phase-complete.cpython-314.pyc +0 -0
  73. package/hooks/__pycache__/ntfy-on-question.cpython-314.pyc +0 -0
  74. package/hooks/__pycache__/orchestrator-completion.cpython-314.pyc +0 -0
  75. package/hooks/__pycache__/orchestrator-handoff.cpython-314.pyc +0 -0
  76. package/hooks/__pycache__/orchestrator-session-startup.cpython-314.pyc +0 -0
  77. package/hooks/__pycache__/parallel-orchestrator.cpython-314.pyc +0 -0
  78. package/hooks/__pycache__/periodic-reground.cpython-314.pyc +0 -0
  79. package/hooks/__pycache__/project-document-prompt.cpython-314.pyc +0 -0
  80. package/hooks/__pycache__/remote-question-proxy.cpython-314.pyc +0 -0
  81. package/hooks/__pycache__/remote-question-server.cpython-314.pyc +0 -0
  82. package/hooks/__pycache__/run-code-review.cpython-314.pyc +0 -0
  83. package/hooks/__pycache__/run-visual-qa.cpython-314.pyc +0 -0
  84. package/hooks/__pycache__/session-logger.cpython-314.pyc +0 -0
  85. package/hooks/__pycache__/session-startup.cpython-314.pyc +0 -0
  86. package/hooks/__pycache__/track-scope-coverage.cpython-314.pyc +0 -0
  87. package/hooks/__pycache__/track-token-usage.cpython-314.pyc +0 -0
  88. package/hooks/__pycache__/track-tool-use.cpython-314.pyc +0 -0
  89. package/hooks/__pycache__/update-adr-decision.cpython-314.pyc +0 -0
  90. package/hooks/__pycache__/update-api-showcase.cpython-314.pyc +0 -0
  91. package/hooks/__pycache__/update-registry.cpython-314.pyc +0 -0
  92. package/hooks/__pycache__/update-ui-showcase.cpython-314.pyc +0 -0
  93. package/hooks/__pycache__/verify-after-green.cpython-314.pyc +0 -0
  94. package/hooks/__pycache__/verify-implementation.cpython-314.pyc +0 -0
  95. package/hooks/api-workflow-check.py +34 -0
  96. package/hooks/auto-answer.py +97 -20
  97. package/{.claude/hooks → hooks}/completion-promise-detector.py +0 -0
  98. package/{.claude/hooks → hooks}/context-capacity-warning.py +0 -0
  99. package/{.claude/hooks → hooks}/docs-update-check.py +0 -0
  100. package/{.claude/hooks → hooks}/enforce-dry-run.py +0 -0
  101. package/hooks/enforce-external-research.py +25 -0
  102. package/hooks/enforce-interview.py +20 -0
  103. package/{.claude/hooks → hooks}/generate-adr-options.py +0 -0
  104. package/{.claude/hooks → hooks}/hook_utils.py +0 -0
  105. package/hooks/ntfy-on-question.py +15 -2
  106. package/hooks/orchestrator-handoff.py +81 -3
  107. package/{.claude/hooks → hooks}/parallel-orchestrator.py +0 -0
  108. package/hooks/periodic-reground.py +40 -0
  109. package/{.claude/hooks → hooks}/remote-question-server.py +0 -0
  110. package/hooks/run-code-review.py +176 -29
  111. package/{.claude/hooks → hooks}/run-visual-qa.py +0 -0
  112. package/hooks/session-logger.py +27 -1
  113. package/hooks/session-startup.py +113 -0
  114. package/{.claude/hooks → hooks}/update-adr-decision.py +0 -0
  115. package/package.json +1 -1
  116. package/templates/.skills/hustle-interview/SKILL.md +174 -0
  117. package/templates/adr-viewer/_components/ADRViewer.tsx +326 -0
  118. package/templates/api-dev-state.json +33 -1
  119. package/templates/brand-page/page.tsx +645 -0
  120. package/templates/component/Component.visual.spec.ts +30 -24
  121. package/templates/eslint-plugin-zod-schema/index.js +446 -0
  122. package/templates/eslint-plugin-zod-schema/package.json +26 -0
  123. package/templates/github-workflows/security.yml +274 -0
  124. package/templates/hustle-build-defaults.json +53 -1
  125. package/templates/page/page.e2e.test.ts +30 -26
  126. package/templates/performance-budgets.json +63 -5
  127. package/templates/registry.json +279 -3
  128. package/templates/review-dashboard/page.tsx +510 -0
  129. package/templates/settings.json +74 -7
  130. package/templates/ui-showcase/_components/UIShowcase.tsx +47 -0
  131. package/templates/ui-showcase/_components/VisualTestingDashboard.tsx +579 -0
  132. package/.claude/commands/hustle-combine.md +0 -1089
  133. package/.claude/commands/hustle-ui-create-page.md +0 -1078
  134. package/.claude/commands/hustle-ui-create.md +0 -1058
  135. package/.claude/hooks/auto-answer.py +0 -305
  136. package/.claude/hooks/cache-research.py +0 -337
  137. package/.claude/hooks/check-api-routes.py +0 -168
  138. package/.claude/hooks/check-playwright-setup.py +0 -103
  139. package/.claude/hooks/check-storybook-setup.py +0 -81
  140. package/.claude/hooks/check-update.py +0 -132
  141. package/.claude/hooks/detect-interruption.py +0 -165
  142. package/.claude/hooks/enforce-a11y-audit.py +0 -202
  143. package/.claude/hooks/enforce-brand-guide.py +0 -241
  144. package/.claude/hooks/enforce-component-type-confirm.py +0 -97
  145. package/.claude/hooks/enforce-freshness.py +0 -184
  146. package/.claude/hooks/enforce-page-components.py +0 -186
  147. package/.claude/hooks/enforce-page-data-schema.py +0 -155
  148. package/.claude/hooks/enforce-questions-sourced.py +0 -146
  149. package/.claude/hooks/enforce-schema-from-interview.py +0 -248
  150. package/.claude/hooks/enforce-ui-disambiguation.py +0 -108
  151. package/.claude/hooks/enforce-ui-interview.py +0 -130
  152. package/.claude/hooks/generate-manifest-entry.py +0 -1161
  153. package/.claude/hooks/lib/__init__.py +0 -1
  154. package/.claude/hooks/lib/greptile.py +0 -355
  155. package/.claude/hooks/lib/ntfy.py +0 -209
  156. package/.claude/hooks/notify-input-needed.py +0 -73
  157. package/.claude/hooks/notify-phase-complete.py +0 -90
  158. package/.claude/hooks/ntfy-on-question.py +0 -240
  159. package/.claude/hooks/orchestrator-completion.py +0 -313
  160. package/.claude/hooks/orchestrator-handoff.py +0 -267
  161. package/.claude/hooks/orchestrator-session-startup.py +0 -146
  162. package/.claude/hooks/run-code-review.py +0 -393
  163. package/.claude/hooks/session-logger.py +0 -323
  164. package/.claude/hooks/test-orchestrator-reground.py +0 -248
  165. package/.claude/hooks/track-scope-coverage.py +0 -220
  166. package/.claude/hooks/track-token-usage.py +0 -121
  167. package/.claude/hooks/update-api-showcase.py +0 -161
  168. package/.claude/hooks/update-registry.py +0 -352
  169. package/.claude/hooks/update-ui-showcase.py +0 -224
  170. package/.claude/test-auto-answer-bot.py +0 -183
  171. package/.claude/test-completion-detector.py +0 -263
  172. package/.claude/test-orchestrator-state.json +0 -20
  173. package/.claude/test-orchestrator.sh +0 -271
  174. /package/{.claude/commands → commands}/hustle-build.md +0 -0
  175. /package/{.claude/hooks → hooks}/lib/__pycache__/__init__.cpython-314.pyc +0 -0
  176. /package/{.claude/hooks → hooks}/lib/__pycache__/greptile.cpython-314.pyc +0 -0
  177. /package/{.claude/hooks → hooks}/lib/__pycache__/ntfy.cpython-314.pyc +0 -0
  178. /package/{.claude/hooks → hooks}/project-document-prompt.py +0 -0
  179. /package/{.claude/hooks → hooks}/remote-question-proxy.py +0 -0
  180. /package/{.claude/hooks → hooks}/update-testing-checklist.py +0 -0
@@ -1,271 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # Test Orchestrator - Master test runner for all 5 commands
4
- #
5
- # This script:
6
- # 1. Creates isolated test directory
7
- # 2. Installs api-dev-tools package
8
- # 3. Copies .env.example for API keys
9
- # 4. Runs each command with auto-answer bot
10
- # 5. Validates completion with completion-detector
11
- # 6. Retries on failure (with research for solutions)
12
- # 7. Updates WORKFLOW_CHECKLIST.md with results
13
- #
14
- # Usage:
15
- # ./test-orchestrator.sh
16
- #
17
- # Version: 1.0.0
18
-
19
- set -e # Exit on error
20
-
21
- # Configuration
22
- TEST_DIR="$HOME/test-api-dev-tools-auto"
23
- SOURCE_DIR="/Users/alfonso/Documents/GitHub/api-dev-tools"
24
- ENV_EXAMPLE="$SOURCE_DIR/.env.example"
25
- NTFY_TOPIC="test_api_devtools_alerts"
26
- MAX_RETRIES=5
27
- PYTHON3="python3"
28
-
29
- # Colors for output
30
- RED='\033[0;31m'
31
- GREEN='\033[0;32m'
32
- YELLOW='\033[1;33m'
33
- BLUE='\033[0;34m'
34
- NC='\033[0m' # No Color
35
-
36
- # Logging
37
- log() {
38
- echo -e "${BLUE}[$(date +'%H:%M:%S')]${NC} $1"
39
- }
40
-
41
- log_success() {
42
- echo -e "${GREEN}[$(date +'%H:%M:%S')]${NC} ✅ $1"
43
- }
44
-
45
- log_error() {
46
- echo -e "${RED}[$(date +'%H:%M:%S')]${NC} ❌ $1"
47
- }
48
-
49
- log_warning() {
50
- echo -e "${YELLOW}[$(date +'%H:%M:%S')]${NC} ⚠️ $1"
51
- }
52
-
53
- # NTFY notification
54
- send_ntfy() {
55
- local message="$1"
56
- local title="${2:-Test Orchestrator}"
57
- local priority="${3:-3}"
58
-
59
- curl -s \
60
- -H "Title: $title" \
61
- -H "Priority: $priority" \
62
- -d "$message" \
63
- "https://ntfy.sh/$NTFY_TOPIC" > /dev/null 2>&1 || true
64
- }
65
-
66
- # Setup test environment
67
- setup_test_environment() {
68
- log "Setting up test environment at $TEST_DIR..."
69
-
70
- # Remove old test directory if exists
71
- if [ -d "$TEST_DIR" ]; then
72
- log_warning "Removing old test directory..."
73
- rm -rf "$TEST_DIR"
74
- fi
75
-
76
- # Create new test directory
77
- mkdir -p "$TEST_DIR"
78
- cd "$TEST_DIR"
79
-
80
- # Initialize git (required for api-dev-tools)
81
- git init
82
- git config user.email "test@example.com"
83
- git config user.name "Test Orchestrator"
84
-
85
- # Create basic Next.js structure
86
- log "Creating Next.js project structure..."
87
- npm init -y > /dev/null 2>&1
88
-
89
- # Copy .env.example
90
- if [ -f "$ENV_EXAMPLE" ]; then
91
- log "Copying .env.example..."
92
- cp "$ENV_EXAMPLE" "$TEST_DIR/.env"
93
- log_success ".env file copied"
94
- else
95
- log_error ".env.example not found at $ENV_EXAMPLE"
96
- log_warning "Continuing without .env file - some features may not work"
97
- fi
98
-
99
- # Install api-dev-tools (from local source for now)
100
- log "Installing api-dev-tools from local source..."
101
-
102
- # Build the package first
103
- cd "$SOURCE_DIR"
104
- npm run build > /dev/null 2>&1 || log_warning "Build may have warnings"
105
-
106
- cd "$TEST_DIR"
107
-
108
- # Install dependencies
109
- npm install --save-dev "$SOURCE_DIR" > /dev/null 2>&1 || {
110
- log_error "Failed to install api-dev-tools"
111
- exit 1
112
- }
113
-
114
- log_success "Test environment setup complete"
115
-
116
- send_ntfy "Test environment created at $TEST_DIR" "🔧 Setup Complete" 3
117
- }
118
-
119
- # Run auto-answer bot in background
120
- start_auto_answer_bot() {
121
- log "Starting auto-answer bot..."
122
-
123
- $PYTHON3 "$SOURCE_DIR/.claude/test-auto-answer-bot.py" "$TEST_DIR" > /dev/null 2>&1 &
124
- AUTO_ANSWER_PID=$!
125
-
126
- log_success "Auto-answer bot started (PID: $AUTO_ANSWER_PID)"
127
- }
128
-
129
- # Stop auto-answer bot
130
- stop_auto_answer_bot() {
131
- if [ ! -z "$AUTO_ANSWER_PID" ]; then
132
- log "Stopping auto-answer bot..."
133
- kill $AUTO_ANSWER_PID 2>/dev/null || true
134
- log_success "Auto-answer bot stopped"
135
- fi
136
- }
137
-
138
- # Test a single command
139
- test_command() {
140
- local command="$1"
141
- local endpoint="$2"
142
- local command_type="$3"
143
- local retry=0
144
-
145
- log "Testing command: $command $endpoint"
146
-
147
- while [ $retry -lt $MAX_RETRIES ]; do
148
- log "Attempt $((retry + 1))/$MAX_RETRIES..."
149
-
150
- # Start auto-answer bot
151
- start_auto_answer_bot
152
-
153
- # Run the command (this will be done via Claude Code in actual implementation)
154
- # For now, we'll log what would happen
155
- log_warning "TODO: Implement command execution via Claude Code"
156
-
157
- # Check completion
158
- $PYTHON3 "$SOURCE_DIR/.claude/test-completion-detector.py" "$TEST_DIR" "$command_type" > /tmp/completion-result.json
159
-
160
- if [ $? -eq 0 ]; then
161
- log_success "$command completed successfully!"
162
- stop_auto_answer_bot
163
-
164
- send_ntfy "✅ $command PASSED on attempt $((retry + 1))" "Test Success" 4
165
-
166
- return 0
167
- else
168
- log_error "$command failed. Analyzing..."
169
-
170
- # Show completion status
171
- cat /tmp/completion-result.json
172
-
173
- retry=$((retry + 1))
174
-
175
- if [ $retry -lt $MAX_RETRIES ]; then
176
- log_warning "Retrying..."
177
- fi
178
-
179
- stop_auto_answer_bot
180
- fi
181
- done
182
-
183
- log_error "$command failed after $MAX_RETRIES attempts"
184
- send_ntfy "❌ $command FAILED after $MAX_RETRIES attempts" "Test Failure" 5
185
-
186
- return 1
187
- }
188
-
189
- # Main test suite
190
- run_full_test_suite() {
191
- log "Starting full test suite..."
192
- send_ntfy "Starting full test suite (5 commands)" "🚀 Test Suite Started" 4
193
-
194
- local commands_passed=0
195
- local commands_failed=0
196
-
197
- # Test 1: /api-create
198
- if test_command "/api-create" "test-weather-api" "api-create"; then
199
- commands_passed=$((commands_passed + 1))
200
- else
201
- commands_failed=$((commands_failed + 1))
202
- fi
203
-
204
- # Test 2: /hustle-ui-create
205
- if test_command "/hustle-ui-create" "TestCard" "hustle-ui-create"; then
206
- commands_passed=$((commands_passed + 1))
207
- else
208
- commands_failed=$((commands_failed + 1))
209
- fi
210
-
211
- # Test 3: /hustle-ui-create-page
212
- if test_command "/hustle-ui-create-page" "test-dashboard" "hustle-ui-create-page"; then
213
- commands_passed=$((commands_passed + 1))
214
- else
215
- commands_failed=$((commands_failed + 1))
216
- fi
217
-
218
- # Test 4: /hustle-combine
219
- if test_command "/hustle-combine" "test-combined" "hustle-combine"; then
220
- commands_passed=$((commands_passed + 1))
221
- else
222
- commands_failed=$((commands_failed + 1))
223
- fi
224
-
225
- # Test 5: /hustle-build
226
- if test_command "/hustle-build" "simple dashboard" "hustle-build"; then
227
- commands_passed=$((commands_passed + 1))
228
- else
229
- commands_failed=$((commands_failed + 1))
230
- fi
231
-
232
- # Final summary
233
- log ""
234
- log "=========================================="
235
- log " TEST SUITE COMPLETE"
236
- log "=========================================="
237
- log_success "Passed: $commands_passed/5"
238
- log_error "Failed: $commands_failed/5"
239
- log "=========================================="
240
-
241
- send_ntfy "Test Suite Complete: $commands_passed/5 passed, $commands_failed/5 failed" "🏁 Tests Done" 5
242
-
243
- if [ $commands_failed -eq 0 ]; then
244
- return 0
245
- else
246
- return 1
247
- fi
248
- }
249
-
250
- # Cleanup on exit
251
- cleanup() {
252
- log "Cleaning up..."
253
- stop_auto_answer_bot
254
- }
255
-
256
- trap cleanup EXIT
257
-
258
- # Main execution
259
- main() {
260
- log "=========================================="
261
- log " API Dev Tools - Test Orchestrator"
262
- log "=========================================="
263
- log ""
264
-
265
- setup_test_environment
266
- run_full_test_suite
267
-
268
- exit $?
269
- }
270
-
271
- main "$@"
File without changes