@hustle-together/api-dev-tools 3.12.3 → 3.12.16
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/commands/hustle-build.md +259 -0
- package/.claude/commands/hustle-combine.md +1089 -0
- package/.claude/commands/hustle-ui-create-page.md +1078 -0
- package/.claude/commands/hustle-ui-create.md +1058 -0
- package/.claude/hooks/auto-answer.py +305 -0
- package/.claude/hooks/cache-research.py +337 -0
- package/.claude/hooks/check-api-routes.py +168 -0
- package/.claude/hooks/check-playwright-setup.py +103 -0
- package/.claude/hooks/check-storybook-setup.py +81 -0
- package/.claude/hooks/check-update.py +132 -0
- package/.claude/hooks/completion-promise-detector.py +293 -0
- package/.claude/hooks/context-capacity-warning.py +171 -0
- package/.claude/hooks/detect-interruption.py +165 -0
- package/.claude/hooks/docs-update-check.py +120 -0
- package/.claude/hooks/enforce-a11y-audit.py +202 -0
- package/.claude/hooks/enforce-brand-guide.py +241 -0
- package/.claude/hooks/enforce-component-type-confirm.py +97 -0
- package/.claude/hooks/enforce-dry-run.py +134 -0
- package/.claude/hooks/enforce-freshness.py +184 -0
- package/.claude/hooks/enforce-page-components.py +186 -0
- package/.claude/hooks/enforce-page-data-schema.py +155 -0
- package/.claude/hooks/enforce-questions-sourced.py +146 -0
- package/.claude/hooks/enforce-schema-from-interview.py +248 -0
- package/.claude/hooks/enforce-ui-disambiguation.py +108 -0
- package/.claude/hooks/enforce-ui-interview.py +130 -0
- package/.claude/hooks/generate-adr-options.py +282 -0
- package/.claude/hooks/generate-manifest-entry.py +1161 -0
- package/.claude/hooks/hook_utils.py +609 -0
- package/.claude/hooks/lib/__init__.py +1 -0
- package/.claude/hooks/lib/__pycache__/__init__.cpython-314.pyc +0 -0
- package/.claude/hooks/lib/__pycache__/greptile.cpython-314.pyc +0 -0
- package/.claude/hooks/lib/__pycache__/ntfy.cpython-314.pyc +0 -0
- package/.claude/hooks/lib/greptile.py +355 -0
- package/.claude/hooks/lib/ntfy.py +209 -0
- package/.claude/hooks/notify-input-needed.py +73 -0
- package/.claude/hooks/notify-phase-complete.py +90 -0
- package/.claude/hooks/ntfy-on-question.py +240 -0
- package/.claude/hooks/orchestrator-completion.py +313 -0
- package/.claude/hooks/orchestrator-handoff.py +267 -0
- package/.claude/hooks/orchestrator-session-startup.py +146 -0
- package/.claude/hooks/parallel-orchestrator.py +451 -0
- package/.claude/hooks/project-document-prompt.py +302 -0
- package/.claude/hooks/remote-question-proxy.py +284 -0
- package/.claude/hooks/remote-question-server.py +1224 -0
- package/.claude/hooks/run-code-review.py +393 -0
- package/.claude/hooks/run-visual-qa.py +338 -0
- package/.claude/hooks/session-logger.py +323 -0
- package/.claude/hooks/test-orchestrator-reground.py +248 -0
- package/.claude/hooks/track-scope-coverage.py +220 -0
- package/.claude/hooks/track-token-usage.py +121 -0
- package/.claude/hooks/update-adr-decision.py +236 -0
- package/.claude/hooks/update-api-showcase.py +161 -0
- package/.claude/hooks/update-registry.py +352 -0
- package/.claude/hooks/update-testing-checklist.py +195 -0
- package/.claude/hooks/update-ui-showcase.py +224 -0
- package/.claude/settings.local.json +7 -1
- package/.claude/test-auto-answer-bot.py +183 -0
- package/.claude/test-completion-detector.py +263 -0
- package/.claude/test-orchestrator-state.json +20 -0
- package/.claude/test-orchestrator.sh +271 -0
- package/.skills/api-create/SKILL.md +88 -3
- package/.skills/docs-sync/SKILL.md +260 -0
- package/.skills/hustle-build/SKILL.md +459 -0
- package/.skills/hustle-build-review/SKILL.md +518 -0
- package/CHANGELOG.md +87 -0
- package/README.md +86 -9
- package/bin/cli.js +1302 -88
- package/commands/hustle-api-create.md +22 -0
- package/commands/hustle-combine.md +81 -2
- package/commands/hustle-ui-create-page.md +84 -2
- package/commands/hustle-ui-create.md +82 -2
- package/hooks/auto-answer.py +228 -0
- package/hooks/check-update.py +132 -0
- package/hooks/ntfy-on-question.py +227 -0
- package/hooks/orchestrator-completion.py +313 -0
- package/hooks/orchestrator-handoff.py +189 -0
- package/hooks/orchestrator-session-startup.py +146 -0
- package/hooks/periodic-reground.py +230 -67
- package/hooks/update-api-showcase.py +13 -1
- package/hooks/update-ui-showcase.py +13 -1
- package/package.json +7 -3
- package/scripts/extract-schema-docs.cjs +322 -0
- package/templates/CLAUDE-SECTION.md +89 -64
- package/templates/api-showcase/_components/APIModal.tsx +100 -8
- package/templates/api-showcase/_components/APIShowcase.tsx +36 -4
- package/templates/api-showcase/_components/APITester.tsx +367 -58
- package/templates/docs/page.tsx +230 -0
- package/templates/hustle-build-defaults.json +84 -0
- package/templates/hustle-dev-dashboard/page.tsx +365 -0
- package/templates/playwright-report/page.tsx +258 -0
- package/templates/settings.json +88 -7
- package/templates/test-results/page.tsx +237 -0
- package/templates/typedoc.json +19 -0
- package/templates/ui-showcase/_components/UIShowcase.tsx +1 -1
- package/templates/ui-showcase/page.tsx +1 -1
- package/.claude/api-dev-state.json +0 -466
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"turn_count": 0,
|
|
3
|
+
"started_at": "2025-12-31T19:42:00.000Z",
|
|
4
|
+
"test_directory": "/Users/alfonso/test-api-dev-tools-auto",
|
|
5
|
+
"current_command": "/api-create",
|
|
6
|
+
"current_endpoint": "weather-api",
|
|
7
|
+
"current_phase": "initialization",
|
|
8
|
+
"commands_tested": {
|
|
9
|
+
"/api-create": {
|
|
10
|
+
"status": "IN PROGRESS",
|
|
11
|
+
"endpoint": "weather-api",
|
|
12
|
+
"started_at": "2025-12-31T19:42:00.000Z",
|
|
13
|
+
"phases_complete": 0,
|
|
14
|
+
"retries": 0
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"total_retries": 0,
|
|
18
|
+
"reground_history": [],
|
|
19
|
+
"auto_answer_bot_pid": null
|
|
20
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
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 "$@"
|
|
@@ -4,19 +4,92 @@ description: Complete API development workflow using interview-driven, research-
|
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Claude Code with MCP servers (Context7 for docs, GitHub for PRs), Python 3.9+ for enforcement hooks, pnpm 10.11.0+ for package management, Vitest for testing
|
|
6
6
|
metadata:
|
|
7
|
-
version: "
|
|
7
|
+
version: "4.0.0"
|
|
8
8
|
category: "development"
|
|
9
9
|
tags: ["api", "tdd", "workflow", "research", "interview", "verification", "testing"]
|
|
10
10
|
author: "Hustle Together"
|
|
11
11
|
allowed-tools: WebSearch WebFetch mcp__context7 mcp__github AskUserQuestion Read Write Edit Bash TodoWrite
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
# API Create - Comprehensive API Development Workflow
|
|
14
|
+
# API Create - Comprehensive API Development Workflow v4.0
|
|
15
15
|
|
|
16
|
-
**Usage:** `/api-create [endpoint-name]`
|
|
16
|
+
**Usage:** `/api-create [endpoint-name] [--auto] [--resume [workflow-id]]`
|
|
17
17
|
|
|
18
18
|
**Purpose:** Orchestrates the complete API development workflow using interview-driven, research-first, test-first methodology with continuous verification loops.
|
|
19
19
|
|
|
20
|
+
## Arguments
|
|
21
|
+
|
|
22
|
+
- `[endpoint-name]` - Name of the API endpoint to create
|
|
23
|
+
- `--auto` - Fully autonomous mode, auto-answers all questions with comprehensive defaults
|
|
24
|
+
- `--resume [workflow-id]` - Resume an interrupted workflow from its last phase
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Auto Mode (`--auto`)
|
|
29
|
+
|
|
30
|
+
When `--auto` flag is used:
|
|
31
|
+
|
|
32
|
+
1. **No Interactive Questions:**
|
|
33
|
+
- All questions auto-answered with comprehensive defaults
|
|
34
|
+
- Uses `.claude/hustle-build-defaults.json` for configured answers
|
|
35
|
+
- Falls back to "most comprehensive" option when no default exists
|
|
36
|
+
|
|
37
|
+
2. **Comprehensive Selection Logic:**
|
|
38
|
+
- Always selects options that include ALL available features
|
|
39
|
+
- Always enables ALL testing levels
|
|
40
|
+
- Always generates ALL documentation
|
|
41
|
+
- Prefers "Yes" over "No" for optional features
|
|
42
|
+
|
|
43
|
+
3. **Error Handling:**
|
|
44
|
+
- Test failures: Retry 3x, then log and continue
|
|
45
|
+
- Verification gaps: Log gap, continue (will review later)
|
|
46
|
+
- Missing API keys: Log warning, continue if possible
|
|
47
|
+
|
|
48
|
+
4. **Logging:**
|
|
49
|
+
- All decisions logged to `.claude/workflow-logs/api-create/[workflow-id].json`
|
|
50
|
+
- Review with `/api-create-review [workflow-id]`
|
|
51
|
+
|
|
52
|
+
**Example:**
|
|
53
|
+
```bash
|
|
54
|
+
/api-create brandfetch --auto
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Resume Mode (`--resume`)
|
|
60
|
+
|
|
61
|
+
When `--resume [workflow-id]` is used:
|
|
62
|
+
|
|
63
|
+
1. Load state from `.claude/api-dev-state.json`
|
|
64
|
+
2. Find the last incomplete phase
|
|
65
|
+
3. Continue from that point
|
|
66
|
+
4. Preserve all previous decisions
|
|
67
|
+
|
|
68
|
+
**Example:**
|
|
69
|
+
```bash
|
|
70
|
+
/api-create --resume wf-brandfetch-2025-12-28
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Orchestrated Mode
|
|
76
|
+
|
|
77
|
+
When running as part of `/hustle-build`:
|
|
78
|
+
|
|
79
|
+
1. `orchestrated: true` flag is set in state
|
|
80
|
+
2. `shared_decisions` are pre-filled from orchestrator interview
|
|
81
|
+
3. Questions covered by shared_decisions are SKIPPED
|
|
82
|
+
4. Only workflow-specific questions are asked
|
|
83
|
+
|
|
84
|
+
Check for orchestration at startup:
|
|
85
|
+
```python
|
|
86
|
+
if state.get("orchestrated"):
|
|
87
|
+
# Skip questions in shared_decisions_applied
|
|
88
|
+
skip_questions = state.get("shared_decisions_applied", [])
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
20
93
|
## ⚠️ CRITICAL: MANDATORY USER INTERACTION
|
|
21
94
|
|
|
22
95
|
**YOU MUST USE THE `AskUserQuestion` TOOL AT EVERY CHECKPOINT.**
|
|
@@ -542,6 +615,18 @@ TodoWrite([
|
|
|
542
615
|
│ │
|
|
543
616
|
│ Run /commit to create semantic commit. │
|
|
544
617
|
│ Run /pr to create pull request. │
|
|
618
|
+
│ │
|
|
619
|
+
│ ═══════════════════════════════════════════════════════ │
|
|
620
|
+
│ ✅ API CREATED: [endpoint-name] │
|
|
621
|
+
│ │
|
|
622
|
+
│ 📍 Quick Links: │
|
|
623
|
+
│ • Test it: /api-showcase │
|
|
624
|
+
│ • API Docs: /docs/api/[endpoint-name] │
|
|
625
|
+
│ • Run tests: pnpm test:api [endpoint-name] │
|
|
626
|
+
│ • TypeDoc: pnpm typedoc │
|
|
627
|
+
│ │
|
|
628
|
+
│ 📊 Dashboard: /hustle-dev-dashboard │
|
|
629
|
+
│ ═══════════════════════════════════════════════════════ │
|
|
545
630
|
└───────────────────────────────────────────────────────────┘
|
|
546
631
|
```
|
|
547
632
|
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs-sync
|
|
3
|
+
description: Synchronize documentation after code changes. Updates existing docs, creates new ones for features, and ensures README links.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires Claude Code with hooks
|
|
6
|
+
metadata:
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
category: "documentation"
|
|
9
|
+
tags: ["docs", "readme", "sync", "maintenance"]
|
|
10
|
+
author: "Hustle Together"
|
|
11
|
+
allowed-tools: Read Write Edit Glob Grep
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Docs Sync - Documentation Synchronization Skill
|
|
15
|
+
|
|
16
|
+
Ensures documentation stays in sync with code changes. Run after implementing features, fixing gaps, or adding new capabilities.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
/docs-sync # Analyze and sync all docs
|
|
22
|
+
/docs-sync [feature-name] # Sync docs for specific feature
|
|
23
|
+
/docs-sync --check # Check what needs updating (no writes)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## What This Skill Does
|
|
27
|
+
|
|
28
|
+
### 1. Analyze Recent Changes
|
|
29
|
+
|
|
30
|
+
First, examine what changed:
|
|
31
|
+
- Read git diff or recent file modifications
|
|
32
|
+
- Identify new hooks, skills, agents, or features
|
|
33
|
+
- Detect removed or deprecated functionality
|
|
34
|
+
|
|
35
|
+
### 2. Update Existing Documentation
|
|
36
|
+
|
|
37
|
+
For each affected area, update the relevant doc:
|
|
38
|
+
|
|
39
|
+
| Change Type | Doc to Update |
|
|
40
|
+
|-------------|---------------|
|
|
41
|
+
| New hook | `docs/HOOKS.md` |
|
|
42
|
+
| New skill | `docs/SKILLS.md` |
|
|
43
|
+
| New agent | `docs/AGENTS.md` |
|
|
44
|
+
| Orchestrator change | `docs/ORCHESTRATOR.md` |
|
|
45
|
+
| Re-grounding change | `docs/REGROUNDING.md` |
|
|
46
|
+
| Gap fixed | `docs/GAP_ANALYSIS.md` |
|
|
47
|
+
| Best practice added | `docs/CLAUDE_CODE_BEST_PRACTICES.md` |
|
|
48
|
+
|
|
49
|
+
### 3. Create New Documentation
|
|
50
|
+
|
|
51
|
+
If a feature warrants its own doc:
|
|
52
|
+
|
|
53
|
+
1. Create `docs/[FEATURE_NAME].md`
|
|
54
|
+
2. Use the standard header template (see below)
|
|
55
|
+
3. Add link to README.md Core Reference table
|
|
56
|
+
|
|
57
|
+
### 4. Ensure Problem/Solution Headers
|
|
58
|
+
|
|
59
|
+
Every doc MUST have this header format:
|
|
60
|
+
|
|
61
|
+
```markdown
|
|
62
|
+
# [Document Title]
|
|
63
|
+
|
|
64
|
+
**Version:** X.X.X
|
|
65
|
+
**Last Updated:** YYYY-MM-DD
|
|
66
|
+
|
|
67
|
+
> **The Problem**
|
|
68
|
+
>
|
|
69
|
+
> [Clear description of the pain point this addresses]
|
|
70
|
+
|
|
71
|
+
> **The Solution**
|
|
72
|
+
>
|
|
73
|
+
> [How this document/feature solves the problem]
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 5. Update README Links
|
|
79
|
+
|
|
80
|
+
Add any new docs to the appropriate section in README.md:
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
### Core Reference
|
|
84
|
+
|
|
85
|
+
| Document | Purpose |
|
|
86
|
+
| -------- | ------- |
|
|
87
|
+
| **[docs/NEW_DOC.md](./docs/NEW_DOC.md)** | Brief description |
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Document Header Template
|
|
93
|
+
|
|
94
|
+
Use this exact format for all documentation:
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
# [Title]
|
|
98
|
+
|
|
99
|
+
**Version:** [version]
|
|
100
|
+
**Last Updated:** [date]
|
|
101
|
+
|
|
102
|
+
> **The Problem**
|
|
103
|
+
>
|
|
104
|
+
> [Describe the specific pain point, frustration, or gap this addresses.
|
|
105
|
+
> Be concrete - what goes wrong without this? What do users struggle with?]
|
|
106
|
+
|
|
107
|
+
> **The Solution**
|
|
108
|
+
>
|
|
109
|
+
> [Explain how this document/feature solves the problem.
|
|
110
|
+
> What improvements does it provide? What's the benefit?]
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Table of Contents
|
|
115
|
+
...
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Execution Steps
|
|
121
|
+
|
|
122
|
+
### Step 1: Identify Changes
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Check what files changed recently
|
|
126
|
+
git diff --name-only HEAD~5
|
|
127
|
+
# Or check specific areas
|
|
128
|
+
ls -la hooks/
|
|
129
|
+
ls -la .skills/
|
|
130
|
+
ls -la docs/
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Look for:
|
|
134
|
+
- New `.py` files in `hooks/`
|
|
135
|
+
- New folders in `.skills/`
|
|
136
|
+
- New `.md` files in `.claude/agents/`
|
|
137
|
+
- Modified core files
|
|
138
|
+
|
|
139
|
+
### Step 2: Categorize Updates Needed
|
|
140
|
+
|
|
141
|
+
Create a checklist:
|
|
142
|
+
|
|
143
|
+
```markdown
|
|
144
|
+
## Documentation Updates Needed
|
|
145
|
+
|
|
146
|
+
### Existing Docs to Update
|
|
147
|
+
- [ ] docs/HOOKS.md - Add [hook name]
|
|
148
|
+
- [ ] docs/SKILLS.md - Add [skill name]
|
|
149
|
+
- [ ] docs/GAP_ANALYSIS.md - Mark [gap] as fixed
|
|
150
|
+
|
|
151
|
+
### New Docs to Create
|
|
152
|
+
- [ ] docs/[FEATURE].md - New feature documentation
|
|
153
|
+
|
|
154
|
+
### README Updates
|
|
155
|
+
- [ ] Add link to [new doc]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Step 3: Update Each Document
|
|
159
|
+
|
|
160
|
+
For each doc that needs updating:
|
|
161
|
+
|
|
162
|
+
1. **Read current content**
|
|
163
|
+
2. **Add/update the Problem/Solution header if missing**
|
|
164
|
+
3. **Add new sections for new features**
|
|
165
|
+
4. **Update version and date**
|
|
166
|
+
5. **Ensure See Also section includes related docs**
|
|
167
|
+
|
|
168
|
+
### Step 4: Create New Documents
|
|
169
|
+
|
|
170
|
+
For genuinely new features that need their own doc:
|
|
171
|
+
|
|
172
|
+
1. Create file with header template
|
|
173
|
+
2. Write comprehensive content
|
|
174
|
+
3. Add to README Core Reference table
|
|
175
|
+
4. Cross-link from related docs
|
|
176
|
+
|
|
177
|
+
### Step 5: Verify Links
|
|
178
|
+
|
|
179
|
+
Check all links work:
|
|
180
|
+
- Internal doc links (`[text](./OTHER_DOC.md)`)
|
|
181
|
+
- README links to docs
|
|
182
|
+
- See Also sections
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Problem/Solution Examples
|
|
187
|
+
|
|
188
|
+
### Good Example (REGROUNDING.md)
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
> **The Problem**
|
|
192
|
+
>
|
|
193
|
+
> LLMs suffer from "context dilution" - as conversations grow longer,
|
|
194
|
+
> the original instructions (CLAUDE.md, system prompts) get pushed to
|
|
195
|
+
> the "middle" of the context where attention is weakest. Claude starts
|
|
196
|
+
> forgetting the endpoint name, re-asking answered questions, and
|
|
197
|
+
> recreating existing components.
|
|
198
|
+
|
|
199
|
+
> **The Solution**
|
|
200
|
+
>
|
|
201
|
+
> The Re-Grounding System injects a comprehensive state reminder every
|
|
202
|
+
> 7 turns, pushing critical context to the END where attention is
|
|
203
|
+
> strongest. This includes current phase, key decisions, existing
|
|
204
|
+
> registry elements, and deferred features - preventing the "lost in
|
|
205
|
+
> the middle" problem.
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Good Example (ORCHESTRATOR.md)
|
|
209
|
+
|
|
210
|
+
```markdown
|
|
211
|
+
> **The Problem**
|
|
212
|
+
>
|
|
213
|
+
> Building complex features requires multiple workflows (APIs, components,
|
|
214
|
+
> pages) that depend on each other. Running them manually means answering
|
|
215
|
+
> the same questions repeatedly, managing dependency order yourself, and
|
|
216
|
+
> manually wiring completed elements together.
|
|
217
|
+
|
|
218
|
+
> **The Solution**
|
|
219
|
+
>
|
|
220
|
+
> The Orchestrator decomposes natural language requests into workflows,
|
|
221
|
+
> orders them by dependency, shares decisions across all sub-workflows
|
|
222
|
+
> (ask once, apply everywhere), and automatically wires completed
|
|
223
|
+
> elements with proper imports and types.
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Checklist Before Completing
|
|
229
|
+
|
|
230
|
+
- [ ] All affected docs have Problem/Solution headers
|
|
231
|
+
- [ ] New features are documented
|
|
232
|
+
- [ ] README links are updated
|
|
233
|
+
- [ ] Version numbers are bumped
|
|
234
|
+
- [ ] Dates are updated
|
|
235
|
+
- [ ] See Also sections cross-reference related docs
|
|
236
|
+
- [ ] GAP_ANALYSIS.md reflects current state
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Output
|
|
241
|
+
|
|
242
|
+
After running this skill, report:
|
|
243
|
+
|
|
244
|
+
```markdown
|
|
245
|
+
## Documentation Sync Complete
|
|
246
|
+
|
|
247
|
+
### Updated
|
|
248
|
+
- docs/HOOKS.md - Added auto-format hook
|
|
249
|
+
- docs/GAP_ANALYSIS.md - Marked 3 gaps as fixed
|
|
250
|
+
|
|
251
|
+
### Created
|
|
252
|
+
- docs/NEW_FEATURE.md - New feature documentation
|
|
253
|
+
|
|
254
|
+
### README
|
|
255
|
+
- Added link to NEW_FEATURE.md
|
|
256
|
+
|
|
257
|
+
### Headers Added
|
|
258
|
+
- docs/SKILLS.md - Added Problem/Solution header
|
|
259
|
+
- docs/AGENTS.md - Added Problem/Solution header
|
|
260
|
+
```
|