@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.
- package/.claude/adr-requests/.gitkeep +10 -0
- package/.claude/agents/adr-researcher.md +109 -0
- package/.claude/agents/visual-analyzer.md +183 -0
- package/.claude/api-dev-state.json +10 -0
- package/.claude/documentation-audit.json +114 -0
- package/.claude/registry.json +289 -0
- package/.claude/settings.json +45 -1
- package/.claude/settings.local.json +1 -7
- package/.claude/workflow-logs/None.json +49 -0
- package/.claude/workflow-logs/session-20251230-143727.json +106 -0
- package/.skills/adr-deep-research/SKILL.md +351 -0
- package/.skills/api-create/SKILL.md +34 -20
- package/.skills/api-research/SKILL.md +130 -0
- package/.skills/docs-update/SKILL.md +205 -0
- package/.skills/hustle-brand/SKILL.md +368 -0
- package/.skills/hustle-build/SKILL.md +365 -38
- package/.skills/parallel-spawn/SKILL.md +212 -0
- package/.skills/ralph-continue/SKILL.md +151 -0
- package/.skills/ralph-loop/SKILL.md +341 -0
- package/.skills/ralph-status/SKILL.md +87 -0
- package/.skills/refactor/SKILL.md +59 -0
- package/.skills/shadcn/SKILL.md +522 -0
- package/.skills/test-all/SKILL.md +210 -0
- package/.skills/test-builds/SKILL.md +208 -0
- package/.skills/test-debug/SKILL.md +212 -0
- package/.skills/test-e2e/SKILL.md +168 -0
- package/.skills/test-review/SKILL.md +707 -0
- package/.skills/test-unit/SKILL.md +143 -0
- package/.skills/test-visual/SKILL.md +301 -0
- package/.skills/token-report/SKILL.md +132 -0
- package/CHANGELOG.md +488 -0
- package/README.md +346 -53
- package/bin/cli.js +359 -123
- package/hooks/__pycache__/api-workflow-check.cpython-314.pyc +0 -0
- package/hooks/__pycache__/auto-answer.cpython-314.pyc +0 -0
- package/hooks/__pycache__/cache-research.cpython-314.pyc +0 -0
- package/hooks/__pycache__/check-api-routes.cpython-314.pyc +0 -0
- package/hooks/__pycache__/check-playwright-setup.cpython-314.pyc +0 -0
- package/hooks/__pycache__/check-storybook-setup.cpython-314.pyc +0 -0
- package/hooks/__pycache__/check-update.cpython-314.pyc +0 -0
- package/hooks/__pycache__/completion-promise-detector.cpython-314.pyc +0 -0
- package/hooks/__pycache__/context-capacity-warning.cpython-314.pyc +0 -0
- package/hooks/__pycache__/detect-interruption.cpython-314.pyc +0 -0
- package/hooks/__pycache__/docs-update-check.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-a11y-audit.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-brand-guide.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-component-type-confirm.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-deep-research.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-disambiguation.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-documentation.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-dry-run.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-environment.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-external-research.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-freshness.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-interview.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-page-components.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-page-data-schema.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-questions-sourced.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-refactor.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-research.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-schema-from-interview.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-schema.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-scope.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-tdd-red.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-ui-disambiguation.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-ui-interview.cpython-314.pyc +0 -0
- package/hooks/__pycache__/enforce-verify.cpython-314.pyc +0 -0
- package/hooks/__pycache__/generate-adr-options.cpython-314.pyc +0 -0
- package/hooks/__pycache__/generate-manifest-entry.cpython-314.pyc +0 -0
- package/hooks/__pycache__/hook_utils.cpython-314.pyc +0 -0
- package/hooks/__pycache__/notify-input-needed.cpython-314.pyc +0 -0
- package/hooks/__pycache__/notify-phase-complete.cpython-314.pyc +0 -0
- package/hooks/__pycache__/ntfy-on-question.cpython-314.pyc +0 -0
- package/hooks/__pycache__/orchestrator-completion.cpython-314.pyc +0 -0
- package/hooks/__pycache__/orchestrator-handoff.cpython-314.pyc +0 -0
- package/hooks/__pycache__/orchestrator-session-startup.cpython-314.pyc +0 -0
- package/hooks/__pycache__/parallel-orchestrator.cpython-314.pyc +0 -0
- package/hooks/__pycache__/periodic-reground.cpython-314.pyc +0 -0
- package/hooks/__pycache__/project-document-prompt.cpython-314.pyc +0 -0
- package/hooks/__pycache__/remote-question-proxy.cpython-314.pyc +0 -0
- package/hooks/__pycache__/remote-question-server.cpython-314.pyc +0 -0
- package/hooks/__pycache__/run-code-review.cpython-314.pyc +0 -0
- package/hooks/__pycache__/run-visual-qa.cpython-314.pyc +0 -0
- package/hooks/__pycache__/session-logger.cpython-314.pyc +0 -0
- package/hooks/__pycache__/session-startup.cpython-314.pyc +0 -0
- package/hooks/__pycache__/track-scope-coverage.cpython-314.pyc +0 -0
- package/hooks/__pycache__/track-token-usage.cpython-314.pyc +0 -0
- package/hooks/__pycache__/track-tool-use.cpython-314.pyc +0 -0
- package/hooks/__pycache__/update-adr-decision.cpython-314.pyc +0 -0
- package/hooks/__pycache__/update-api-showcase.cpython-314.pyc +0 -0
- package/hooks/__pycache__/update-registry.cpython-314.pyc +0 -0
- package/hooks/__pycache__/update-ui-showcase.cpython-314.pyc +0 -0
- package/hooks/__pycache__/verify-after-green.cpython-314.pyc +0 -0
- package/hooks/__pycache__/verify-implementation.cpython-314.pyc +0 -0
- package/hooks/api-workflow-check.py +34 -0
- package/hooks/auto-answer.py +97 -20
- package/{.claude/hooks → hooks}/completion-promise-detector.py +0 -0
- package/{.claude/hooks → hooks}/context-capacity-warning.py +0 -0
- package/{.claude/hooks → hooks}/docs-update-check.py +0 -0
- package/{.claude/hooks → hooks}/enforce-dry-run.py +0 -0
- package/hooks/enforce-external-research.py +25 -0
- package/hooks/enforce-interview.py +20 -0
- package/{.claude/hooks → hooks}/generate-adr-options.py +0 -0
- package/{.claude/hooks → hooks}/hook_utils.py +0 -0
- package/hooks/ntfy-on-question.py +15 -2
- package/hooks/orchestrator-handoff.py +81 -3
- package/{.claude/hooks → hooks}/parallel-orchestrator.py +0 -0
- package/hooks/periodic-reground.py +40 -0
- package/{.claude/hooks → hooks}/remote-question-server.py +0 -0
- package/hooks/run-code-review.py +176 -29
- package/{.claude/hooks → hooks}/run-visual-qa.py +0 -0
- package/hooks/session-logger.py +27 -1
- package/hooks/session-startup.py +113 -0
- package/{.claude/hooks → hooks}/update-adr-decision.py +0 -0
- package/package.json +1 -1
- package/templates/.skills/hustle-interview/SKILL.md +174 -0
- package/templates/adr-viewer/_components/ADRViewer.tsx +326 -0
- package/templates/api-dev-state.json +33 -1
- package/templates/brand-page/page.tsx +645 -0
- package/templates/component/Component.visual.spec.ts +30 -24
- package/templates/eslint-plugin-zod-schema/index.js +446 -0
- package/templates/eslint-plugin-zod-schema/package.json +26 -0
- package/templates/github-workflows/security.yml +274 -0
- package/templates/hustle-build-defaults.json +53 -1
- package/templates/page/page.e2e.test.ts +30 -26
- package/templates/performance-budgets.json +63 -5
- package/templates/registry.json +279 -3
- package/templates/review-dashboard/page.tsx +510 -0
- package/templates/settings.json +74 -7
- package/templates/ui-showcase/_components/UIShowcase.tsx +47 -0
- package/templates/ui-showcase/_components/VisualTestingDashboard.tsx +579 -0
- package/.claude/commands/hustle-combine.md +0 -1089
- package/.claude/commands/hustle-ui-create-page.md +0 -1078
- package/.claude/commands/hustle-ui-create.md +0 -1058
- package/.claude/hooks/auto-answer.py +0 -305
- package/.claude/hooks/cache-research.py +0 -337
- package/.claude/hooks/check-api-routes.py +0 -168
- package/.claude/hooks/check-playwright-setup.py +0 -103
- package/.claude/hooks/check-storybook-setup.py +0 -81
- package/.claude/hooks/check-update.py +0 -132
- package/.claude/hooks/detect-interruption.py +0 -165
- package/.claude/hooks/enforce-a11y-audit.py +0 -202
- package/.claude/hooks/enforce-brand-guide.py +0 -241
- package/.claude/hooks/enforce-component-type-confirm.py +0 -97
- package/.claude/hooks/enforce-freshness.py +0 -184
- package/.claude/hooks/enforce-page-components.py +0 -186
- package/.claude/hooks/enforce-page-data-schema.py +0 -155
- package/.claude/hooks/enforce-questions-sourced.py +0 -146
- package/.claude/hooks/enforce-schema-from-interview.py +0 -248
- package/.claude/hooks/enforce-ui-disambiguation.py +0 -108
- package/.claude/hooks/enforce-ui-interview.py +0 -130
- package/.claude/hooks/generate-manifest-entry.py +0 -1161
- package/.claude/hooks/lib/__init__.py +0 -1
- package/.claude/hooks/lib/greptile.py +0 -355
- package/.claude/hooks/lib/ntfy.py +0 -209
- package/.claude/hooks/notify-input-needed.py +0 -73
- package/.claude/hooks/notify-phase-complete.py +0 -90
- package/.claude/hooks/ntfy-on-question.py +0 -240
- package/.claude/hooks/orchestrator-completion.py +0 -313
- package/.claude/hooks/orchestrator-handoff.py +0 -267
- package/.claude/hooks/orchestrator-session-startup.py +0 -146
- package/.claude/hooks/run-code-review.py +0 -393
- package/.claude/hooks/session-logger.py +0 -323
- package/.claude/hooks/test-orchestrator-reground.py +0 -248
- package/.claude/hooks/track-scope-coverage.py +0 -220
- package/.claude/hooks/track-token-usage.py +0 -121
- package/.claude/hooks/update-api-showcase.py +0 -161
- package/.claude/hooks/update-registry.py +0 -352
- package/.claude/hooks/update-ui-showcase.py +0 -224
- package/.claude/test-auto-answer-bot.py +0 -183
- package/.claude/test-completion-detector.py +0 -263
- package/.claude/test-orchestrator-state.json +0 -20
- package/.claude/test-orchestrator.sh +0 -271
- /package/{.claude/commands → commands}/hustle-build.md +0 -0
- /package/{.claude/hooks → hooks}/lib/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{.claude/hooks → hooks}/lib/__pycache__/greptile.cpython-314.pyc +0 -0
- /package/{.claude/hooks → hooks}/lib/__pycache__/ntfy.cpython-314.pyc +0 -0
- /package/{.claude/hooks → hooks}/project-document-prompt.py +0 -0
- /package/{.claude/hooks → hooks}/remote-question-proxy.py +0 -0
- /package/{.claude/hooks → hooks}/update-testing-checklist.py +0 -0
|
@@ -4,7 +4,7 @@ description: Build complete features from natural language. Orchestrates API, co
|
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Requires Claude Code with hooks and MCP servers configured
|
|
6
6
|
metadata:
|
|
7
|
-
version: "4.
|
|
7
|
+
version: "4.6.0"
|
|
8
8
|
category: "orchestration"
|
|
9
9
|
tags: ["build", "workflow", "orchestrator", "autonomous"]
|
|
10
10
|
author: "Hustle Together"
|
|
@@ -20,23 +20,257 @@ Build complete features from natural language descriptions. This skill orchestra
|
|
|
20
20
|
```
|
|
21
21
|
/hustle-build [description]
|
|
22
22
|
/hustle-build --auto [description]
|
|
23
|
+
/hustle-build --parallel [description]
|
|
23
24
|
/hustle-build --resume [build-id]
|
|
24
25
|
/hustle-build --dry-run [description]
|
|
26
|
+
/hustle-build --max-iterations [N] [description]
|
|
25
27
|
```
|
|
26
28
|
|
|
27
29
|
## Arguments
|
|
28
30
|
|
|
29
31
|
- `$ARGUMENTS` - Natural language description of what to build
|
|
30
32
|
- `--auto` - Fully autonomous mode, auto-answers questions
|
|
33
|
+
- `--parallel` - Run up to 5 Opus agents in parallel (requires worktrees)
|
|
31
34
|
- `--resume [id]` - Resume an interrupted build
|
|
32
35
|
- `--dry-run` - Show what would be created without executing
|
|
36
|
+
- `--max-iterations [N]` - Max retry iterations per phase (default: 5)
|
|
37
|
+
- `--skip-document` - Skip the project document prompt
|
|
38
|
+
- `--from-document [path]` - Use specified file as project document (PRD, spec)
|
|
39
|
+
|
|
40
|
+
## Parallel Execution (Recommended for Large Builds)
|
|
41
|
+
|
|
42
|
+
When `--parallel` is used, the orchestrator:
|
|
43
|
+
|
|
44
|
+
1. **Creates git worktrees** for each independent workflow
|
|
45
|
+
2. **Spawns up to 5 Opus agents** simultaneously
|
|
46
|
+
3. **Injects shared decisions** into each agent
|
|
47
|
+
4. **Merges results** when all complete
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
51
|
+
│ PARALLEL ORCHESTRATOR │
|
|
52
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
53
|
+
│ │
|
|
54
|
+
│ Shared Context (from Interview) │
|
|
55
|
+
│ ┌───────────────────────────────────────────────────────┐ │
|
|
56
|
+
│ │ Auth: JWT | Errors: partial-success | Brand: yes │ │
|
|
57
|
+
│ └───────────────────────────────────────────────────────┘ │
|
|
58
|
+
│ │ │
|
|
59
|
+
│ ┌───────────────┼───────────────┐ │
|
|
60
|
+
│ ▼ ▼ ▼ │
|
|
61
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
62
|
+
│ │ Agent #1 │ │ Agent #2 │ │ Agent #3 │ │
|
|
63
|
+
│ │ /api-create │ │ /api-create │ │ /hustle-ui │ │
|
|
64
|
+
│ │ user-stats │ │ chart-data │ │ StatCard │ │
|
|
65
|
+
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
|
66
|
+
│ │ │ │ │
|
|
67
|
+
│ └───────────────┼───────────────┘ │
|
|
68
|
+
│ ▼ │
|
|
69
|
+
│ ┌───────────────────────────────────────────────────────┐ │
|
|
70
|
+
│ │ MERGE COORDINATOR │ │
|
|
71
|
+
│ │ • Combines registry entries │ │
|
|
72
|
+
│ │ • Resolves conflicts │ │
|
|
73
|
+
│ │ • Creates unified PR │ │
|
|
74
|
+
│ └───────────────────────────────────────────────────────┘ │
|
|
75
|
+
│ │
|
|
76
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
See [PARALLEL_AUTONOMOUS_WORKFLOW.md](../../docs/PARALLEL_AUTONOMOUS_WORKFLOW.md) for details.
|
|
80
|
+
|
|
81
|
+
## Max Iterations
|
|
82
|
+
|
|
83
|
+
Each phase has a maximum iteration count to prevent infinite loops:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"max_iterations": {
|
|
88
|
+
"default": 5,
|
|
89
|
+
"phases": {
|
|
90
|
+
"disambiguation": 2,
|
|
91
|
+
"research": 3,
|
|
92
|
+
"interview": 1,
|
|
93
|
+
"schema": 3,
|
|
94
|
+
"tdd_red": 5,
|
|
95
|
+
"tdd_green": 10,
|
|
96
|
+
"verify": 3,
|
|
97
|
+
"code_review": 3,
|
|
98
|
+
"refactor": 5
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Override with `--max-iterations`:
|
|
105
|
+
```bash
|
|
106
|
+
# Allow more retries for complex builds
|
|
107
|
+
/hustle-build --max-iterations 10 --auto complex e-commerce system
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
When max iterations reached:
|
|
111
|
+
1. Log issue to `session_archives.interrupted`
|
|
112
|
+
2. Create partial PR with work completed
|
|
113
|
+
3. Notify via NTFY
|
|
114
|
+
4. Continue with other workflows
|
|
33
115
|
|
|
34
116
|
---
|
|
35
117
|
|
|
36
|
-
## Phase 1:
|
|
118
|
+
## Phase 1: Document Intake & Parsing (Optional)
|
|
119
|
+
|
|
120
|
+
At the start of `/hustle-build`, the `project-document-prompt.py` hook asks if you have a comprehensive project document.
|
|
121
|
+
|
|
122
|
+
**Supported Document Types:**
|
|
123
|
+
- PRD (Product Requirements Document)
|
|
124
|
+
- Technical specifications
|
|
125
|
+
- Deep research outputs (from `/plan` or `/spike`)
|
|
126
|
+
- API definitions (OpenAPI, JSON specs)
|
|
127
|
+
|
|
128
|
+
**How to provide:**
|
|
129
|
+
```
|
|
130
|
+
# When prompted, you can:
|
|
131
|
+
1. Provide a file path: ./docs/my-prd.md
|
|
132
|
+
2. Paste content directly
|
|
133
|
+
3. Provide a URL to fetch
|
|
134
|
+
4. Say "no document" to skip
|
|
135
|
+
|
|
136
|
+
# Or skip the prompt entirely:
|
|
137
|
+
/hustle-build --skip-document [description]
|
|
138
|
+
|
|
139
|
+
# Or provide a document directly:
|
|
140
|
+
/hustle-build --from-document ./docs/spec.md [description]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The document is stored in `state.project_spec.raw_content` for parsing.
|
|
144
|
+
|
|
145
|
+
### Document Parsing (When project_spec exists)
|
|
146
|
+
|
|
147
|
+
If a project document was provided, analyze it to extract structured elements.
|
|
148
|
+
|
|
149
|
+
**Extraction Targets:**
|
|
150
|
+
|
|
151
|
+
| Element Type | Keywords to Find | What to Extract |
|
|
152
|
+
|-------------|------------------|-----------------|
|
|
153
|
+
| Pages | "page", "screen", "route", "/path", "view" | name, route, description, features |
|
|
154
|
+
| Components | "component", "widget", "card", "form", "button" | name, type (display/input/composite), props, variants |
|
|
155
|
+
| APIs | "API", "endpoint", "/api/", "fetch", "GET", "POST" | name, method, path, request/response schemas |
|
|
156
|
+
| Data Models | "model", "schema", "type", "interface", "entity" | name, fields, relationships |
|
|
157
|
+
| Integrations | service names (Stripe, Supabase, Auth0) | service, features used, env vars |
|
|
158
|
+
|
|
159
|
+
**Dependency Graph Construction:**
|
|
160
|
+
- APIs = Tier 1 (no dependencies)
|
|
161
|
+
- Components = Tier 2 (depend on APIs for types)
|
|
162
|
+
- Pages = Tier 3 (depend on components)
|
|
163
|
+
|
|
164
|
+
**Store extracted data in state:**
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"project_spec": {
|
|
169
|
+
"source": "file|paste|url",
|
|
170
|
+
"file_path": "./docs/my-prd.md",
|
|
171
|
+
"raw_content": "[original document]",
|
|
172
|
+
"format": "markdown|json|text",
|
|
173
|
+
"parsed_at": "[timestamp]",
|
|
174
|
+
"word_count": 2500,
|
|
175
|
+
"extracted": {
|
|
176
|
+
"summary": "E-commerce dashboard with user stats and order tracking",
|
|
177
|
+
"pages": [
|
|
178
|
+
{
|
|
179
|
+
"name": "Dashboard",
|
|
180
|
+
"route": "/dashboard",
|
|
181
|
+
"description": "Main user dashboard",
|
|
182
|
+
"features": ["stats display", "order list", "notifications"],
|
|
183
|
+
"uses_components": ["StatCard", "OrderTable"],
|
|
184
|
+
"uses_apis": ["user-stats", "orders"]
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"components": [
|
|
188
|
+
{
|
|
189
|
+
"name": "StatCard",
|
|
190
|
+
"type": "display",
|
|
191
|
+
"description": "Display individual statistic with trend",
|
|
192
|
+
"props": ["title", "value", "trend", "icon"],
|
|
193
|
+
"variants": ["primary", "secondary", "success", "warning"]
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"apis": [
|
|
197
|
+
{
|
|
198
|
+
"name": "user-stats",
|
|
199
|
+
"method": "GET",
|
|
200
|
+
"path": "/api/v2/user-stats",
|
|
201
|
+
"description": "User statistics endpoint",
|
|
202
|
+
"response_fields": ["totalOrders", "revenue", "growth"]
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"data_models": [
|
|
206
|
+
{
|
|
207
|
+
"name": "UserStats",
|
|
208
|
+
"fields": ["totalOrders: number", "revenue: number", "growth: number"]
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"integrations": [
|
|
212
|
+
{
|
|
213
|
+
"service": "supabase",
|
|
214
|
+
"features": ["auth", "database"],
|
|
215
|
+
"env_vars": ["SUPABASE_URL", "SUPABASE_ANON_KEY"]
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
"user_modifications": {
|
|
220
|
+
"added": [],
|
|
221
|
+
"removed": [],
|
|
222
|
+
"modified": []
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
**Present decomposition for approval:**
|
|
229
|
+
|
|
230
|
+
Use AskUserQuestion:
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
Based on your project document, I've identified:
|
|
234
|
+
|
|
235
|
+
**Pages (2):**
|
|
236
|
+
- Dashboard (/dashboard) - Main user dashboard
|
|
237
|
+
- Orders (/orders) - Order management
|
|
238
|
+
|
|
239
|
+
**Components (4):**
|
|
240
|
+
- StatCard (display) - Display statistic with trend
|
|
241
|
+
- OrderTable (composite) - Order listing
|
|
242
|
+
- OrderRow (display) - Single order row
|
|
243
|
+
- StatusBadge (display) - Order status indicator
|
|
244
|
+
|
|
245
|
+
**APIs (3):**
|
|
246
|
+
- user-stats (GET /api/v2/user-stats)
|
|
247
|
+
- orders (GET /api/v2/orders)
|
|
248
|
+
- order-detail (GET /api/v2/orders/[id])
|
|
249
|
+
|
|
250
|
+
**Data Models (2):**
|
|
251
|
+
- UserStats, Order
|
|
252
|
+
|
|
253
|
+
**Integrations (1):**
|
|
254
|
+
- Supabase (auth, database)
|
|
255
|
+
|
|
256
|
+
Is this decomposition correct?
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Options:
|
|
260
|
+
- "Yes, proceed with this plan (Recommended)"
|
|
261
|
+
- "Add missing elements"
|
|
262
|
+
- "Remove elements"
|
|
263
|
+
- "Re-parse document"
|
|
264
|
+
- "Skip document, use description instead"
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Phase 2: Parse Request
|
|
37
269
|
|
|
38
270
|
Parse the user's natural language request to identify required elements.
|
|
39
271
|
|
|
272
|
+
**Note:** If `project_spec.extracted` exists from Phase 1, use it as the primary decomposition source and skip manual parsing.
|
|
273
|
+
|
|
40
274
|
**Input:** $ARGUMENTS
|
|
41
275
|
|
|
42
276
|
**Look for:**
|
|
@@ -49,7 +283,7 @@ Parse the user's natural language request to identify required elements.
|
|
|
49
283
|
|
|
50
284
|
---
|
|
51
285
|
|
|
52
|
-
## Phase
|
|
286
|
+
## Phase 3: Decompose Into Workflows
|
|
53
287
|
|
|
54
288
|
For each identified element, determine:
|
|
55
289
|
|
|
@@ -90,14 +324,14 @@ Does this look correct?
|
|
|
90
324
|
```
|
|
91
325
|
|
|
92
326
|
Use AskUserQuestion with options:
|
|
93
|
-
- "Yes, proceed with this plan"
|
|
327
|
+
- "Yes, proceed with this plan (Recommended)"
|
|
94
328
|
- "Add more elements"
|
|
95
329
|
- "Remove elements"
|
|
96
330
|
- "Let me describe differently"
|
|
97
331
|
|
|
98
332
|
---
|
|
99
333
|
|
|
100
|
-
## Phase
|
|
334
|
+
## Phase 4: Orchestrator Interview
|
|
101
335
|
|
|
102
336
|
Ask HIGH-LEVEL questions that apply to ALL sub-workflows.
|
|
103
337
|
|
|
@@ -105,25 +339,25 @@ Ask HIGH-LEVEL questions that apply to ALL sub-workflows.
|
|
|
105
339
|
|
|
106
340
|
### Q1: Authentication
|
|
107
341
|
"What's the authentication requirement for this feature?"
|
|
108
|
-
- Protected (requires login)
|
|
342
|
+
- Protected (requires login) (Recommended)
|
|
109
343
|
- Public (no auth)
|
|
110
344
|
- Mixed (specify per element)
|
|
111
345
|
|
|
112
346
|
### Q2: Error Handling
|
|
113
347
|
"How should errors be handled across APIs?"
|
|
114
|
-
- Partial success (show what works)
|
|
348
|
+
- Partial success (show what works) (Recommended)
|
|
115
349
|
- Fail-fast (one fails = all fail)
|
|
116
350
|
- Retry with fallback
|
|
117
351
|
|
|
118
352
|
### Q3: Brand Guide
|
|
119
353
|
"Use project brand guide for styling?"
|
|
120
|
-
- Yes, use .claude/BRAND_GUIDE.md
|
|
354
|
+
- Yes, use .claude/BRAND_GUIDE.md (Recommended)
|
|
121
355
|
- No, custom theme
|
|
122
356
|
- Match existing page
|
|
123
357
|
|
|
124
358
|
### Q4: Testing Level
|
|
125
359
|
"What level of testing?"
|
|
126
|
-
- Full TDD (all 14 phases per element)
|
|
360
|
+
- Full TDD (all 14 phases per element) (Recommended)
|
|
127
361
|
- Essential tests only
|
|
128
362
|
- Smoke tests only
|
|
129
363
|
|
|
@@ -131,13 +365,13 @@ Store all answers in `shared_decisions` - these will be injected into sub-workfl
|
|
|
131
365
|
|
|
132
366
|
---
|
|
133
367
|
|
|
134
|
-
## Phase
|
|
368
|
+
## Phase 5: Create Orchestration State
|
|
135
369
|
|
|
136
370
|
Create `.claude/hustle-build-state.json`:
|
|
137
371
|
|
|
138
372
|
```json
|
|
139
373
|
{
|
|
140
|
-
"version": "4.
|
|
374
|
+
"version": "4.6.0",
|
|
141
375
|
"build_id": "build-[timestamp]-[name]",
|
|
142
376
|
"status": "in_progress",
|
|
143
377
|
"mode": "interactive|auto",
|
|
@@ -148,6 +382,22 @@ Create `.claude/hustle-build-state.json`:
|
|
|
148
382
|
"parsed_at": "[timestamp]"
|
|
149
383
|
},
|
|
150
384
|
|
|
385
|
+
"project_spec": {
|
|
386
|
+
"source": "file|paste|url|none",
|
|
387
|
+
"file_path": "[optional - path to document]",
|
|
388
|
+
"raw_content": "[document content if provided]",
|
|
389
|
+
"format": "markdown|json|text",
|
|
390
|
+
"parsed_at": "[timestamp]",
|
|
391
|
+
"extracted": {
|
|
392
|
+
"summary": "[AI-generated summary]",
|
|
393
|
+
"pages": [],
|
|
394
|
+
"components": [],
|
|
395
|
+
"apis": [],
|
|
396
|
+
"data_models": [],
|
|
397
|
+
"integrations": []
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
|
|
151
401
|
"orchestrator_interview": {
|
|
152
402
|
"status": "complete",
|
|
153
403
|
"decisions": {
|
|
@@ -160,14 +410,14 @@ Create `.claude/hustle-build-state.json`:
|
|
|
160
410
|
|
|
161
411
|
"decomposition": {
|
|
162
412
|
"apis": [
|
|
163
|
-
{"name": "user-stats", "status": "pending", "depends_on": []}
|
|
413
|
+
{"name": "user-stats", "status": "pending", "depends_on": [], "from_project_spec": true}
|
|
164
414
|
],
|
|
165
415
|
"components": [
|
|
166
|
-
{"name": "StatCard", "status": "pending", "depends_on": ["user-stats"]}
|
|
416
|
+
{"name": "StatCard", "status": "pending", "depends_on": ["user-stats"], "from_project_spec": true}
|
|
167
417
|
],
|
|
168
418
|
"combined_apis": [],
|
|
169
419
|
"pages": [
|
|
170
|
-
{"name": "Dashboard", "status": "pending", "depends_on": ["StatCard"]}
|
|
420
|
+
{"name": "Dashboard", "status": "pending", "depends_on": ["StatCard"], "from_project_spec": true}
|
|
171
421
|
]
|
|
172
422
|
},
|
|
173
423
|
|
|
@@ -183,13 +433,15 @@ Create `.claude/hustle-build-state.json`:
|
|
|
183
433
|
}
|
|
184
434
|
```
|
|
185
435
|
|
|
436
|
+
**Note:** Elements with `from_project_spec: true` were extracted from the project document. This helps track provenance and allows referencing the original spec during implementation.
|
|
437
|
+
|
|
186
438
|
---
|
|
187
439
|
|
|
188
|
-
## Phase
|
|
440
|
+
## Phase 6: Execute Workflows
|
|
189
441
|
|
|
190
442
|
For each workflow in execution order:
|
|
191
443
|
|
|
192
|
-
###
|
|
444
|
+
### 6.1 Set Active Workflow
|
|
193
445
|
|
|
194
446
|
Update state:
|
|
195
447
|
```json
|
|
@@ -201,7 +453,7 @@ Update state:
|
|
|
201
453
|
}
|
|
202
454
|
```
|
|
203
455
|
|
|
204
|
-
###
|
|
456
|
+
### 6.2 Invoke Sub-Workflow
|
|
205
457
|
|
|
206
458
|
The orchestrator hooks will automatically:
|
|
207
459
|
1. Inject `shared_decisions` into `api-dev-state.json`
|
|
@@ -217,27 +469,51 @@ Run the appropriate skill:
|
|
|
217
469
|
| combined_api | `/hustle-combine api` |
|
|
218
470
|
| page | `/hustle-ui-create-page [name]` |
|
|
219
471
|
|
|
220
|
-
###
|
|
472
|
+
### 6.3 Sub-Workflow Behavior
|
|
221
473
|
|
|
222
474
|
When `orchestrated: true`:
|
|
223
475
|
- Skip questions answered in `shared_decisions`
|
|
224
476
|
- Only ask element-specific questions
|
|
225
477
|
- Report completion back to orchestrator
|
|
226
478
|
|
|
227
|
-
###
|
|
479
|
+
### 6.4 On Completion
|
|
480
|
+
|
|
481
|
+
When a sub-workflow completes:
|
|
482
|
+
|
|
483
|
+
1. **Mark Complete:** Update state with `"status": "complete"`
|
|
484
|
+
2. **Find Next:** Identify next pending workflow in decomposition
|
|
228
485
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
486
|
+
3. **⚠️ CRITICAL: Use AskUserQuestion for Transitions**
|
|
487
|
+
|
|
488
|
+
You MUST use `AskUserQuestion` tool (not plain text) to ask about continuing:
|
|
489
|
+
|
|
490
|
+
```json
|
|
491
|
+
{
|
|
492
|
+
"questions": [{
|
|
493
|
+
"question": "✅ Completed [workflow-name]. Next: [next-name]. Continue?",
|
|
494
|
+
"header": "Continue",
|
|
495
|
+
"multiSelect": false,
|
|
496
|
+
"options": [
|
|
497
|
+
{"label": "Yes, proceed (Recommended)", "description": "Continue to next workflow"},
|
|
498
|
+
{"label": "Review first", "description": "Show me what was created"},
|
|
499
|
+
{"label": "Stop here", "description": "Pause build for review"}
|
|
500
|
+
]
|
|
501
|
+
}]
|
|
502
|
+
}
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
**Why:** The `auto-answer.py` hook only intercepts `AskUserQuestion` tool calls.
|
|
506
|
+
If you use plain text like "Should I continue?", auto-mode will halt.
|
|
507
|
+
|
|
508
|
+
4. **Inject Context:** Pass shared_decisions and completed element info to next workflow
|
|
233
509
|
|
|
234
510
|
---
|
|
235
511
|
|
|
236
|
-
## Phase
|
|
512
|
+
## Phase 7: Cross-Workflow Wiring
|
|
237
513
|
|
|
238
514
|
After all workflows complete, wire them together:
|
|
239
515
|
|
|
240
|
-
###
|
|
516
|
+
### 7.1 Import Generation
|
|
241
517
|
|
|
242
518
|
For pages that use components and APIs:
|
|
243
519
|
|
|
@@ -248,7 +524,7 @@ import { StatCard } from '@/components/StatCard';
|
|
|
248
524
|
import { ChartWidget } from '@/components/ChartWidget';
|
|
249
525
|
```
|
|
250
526
|
|
|
251
|
-
###
|
|
527
|
+
### 7.2 Prop Wiring
|
|
252
528
|
|
|
253
529
|
Wire component props to API response types:
|
|
254
530
|
|
|
@@ -259,13 +535,13 @@ interface DashboardProps {
|
|
|
259
535
|
}
|
|
260
536
|
```
|
|
261
537
|
|
|
262
|
-
###
|
|
538
|
+
### 7.3 Registry Updates
|
|
263
539
|
|
|
264
540
|
Update `.claude/registry.json` with all created elements and their relationships.
|
|
265
541
|
|
|
266
542
|
---
|
|
267
543
|
|
|
268
|
-
## Phase
|
|
544
|
+
## Phase 8: Final Verification
|
|
269
545
|
|
|
270
546
|
Run comprehensive test suite:
|
|
271
547
|
|
|
@@ -290,7 +566,7 @@ Report results:
|
|
|
290
566
|
|
|
291
567
|
---
|
|
292
568
|
|
|
293
|
-
## Phase
|
|
569
|
+
## Phase 9: Documentation Rollup
|
|
294
570
|
|
|
295
571
|
Generate unified documentation:
|
|
296
572
|
|
|
@@ -311,7 +587,7 @@ Generate unified documentation:
|
|
|
311
587
|
|
|
312
588
|
---
|
|
313
589
|
|
|
314
|
-
## Phase
|
|
590
|
+
## Phase 10: Completion
|
|
315
591
|
|
|
316
592
|
Mark build as complete:
|
|
317
593
|
|
|
@@ -352,27 +628,78 @@ Next Steps:
|
|
|
352
628
|
|
|
353
629
|
---
|
|
354
630
|
|
|
355
|
-
## Auto Mode Behavior
|
|
631
|
+
## Auto Mode Behavior (Test Mode)
|
|
356
632
|
|
|
357
|
-
When `--auto` flag is used:
|
|
633
|
+
When `--auto` flag is used, the workflow runs end-to-end without prompts:
|
|
634
|
+
|
|
635
|
+
```bash
|
|
636
|
+
# Full autonomous build - perfect for testing
|
|
637
|
+
/hustle-build --auto "photo gallery with search and favorites"
|
|
638
|
+
|
|
639
|
+
# Autonomous with parallel execution
|
|
640
|
+
/hustle-build --auto --parallel "e-commerce checkout flow"
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
### How It Works
|
|
358
644
|
|
|
359
645
|
1. **No Interactive Questions:**
|
|
360
646
|
- All questions auto-answered with comprehensive defaults
|
|
361
647
|
- Uses `.claude/hustle-build-defaults.json` for overrides
|
|
648
|
+
- Selects "recommended" option for every choice
|
|
649
|
+
- Uses `AskUserQuestion` tool for all prompts (auto-answer.py intercepts)
|
|
650
|
+
|
|
651
|
+
2. **ALL Phases Execute:**
|
|
652
|
+
- Auto mode ONLY auto-answers questions, it does NOT skip phases
|
|
653
|
+
- Every sub-workflow runs all 14 phases
|
|
654
|
+
- If a phase can't fully complete (missing API key), mark as "partial" not "skipped"
|
|
362
655
|
|
|
363
|
-
|
|
364
|
-
- Test failures: Retry 3x, then
|
|
365
|
-
- Verification gaps:
|
|
366
|
-
- Missing API keys:
|
|
656
|
+
3. **Error Handling:**
|
|
657
|
+
- Test failures: Retry 3x, then fix issues
|
|
658
|
+
- Verification gaps: Add tests for gaps, then fix
|
|
659
|
+
- Missing API keys: Mark phase "partial", continue
|
|
367
660
|
|
|
368
|
-
|
|
661
|
+
4. **Notifications:**
|
|
369
662
|
- Single NTFY notification at completion
|
|
370
663
|
- Includes summary and review link
|
|
371
664
|
|
|
372
|
-
|
|
665
|
+
5. **Logging:**
|
|
373
666
|
- All decisions logged to `.claude/workflow-logs/[build-id].json`
|
|
374
667
|
- Review with `/hustle-build-review [build-id]`
|
|
375
668
|
|
|
669
|
+
### Customizing Defaults
|
|
670
|
+
|
|
671
|
+
Copy the template and customize for your project:
|
|
672
|
+
|
|
673
|
+
```bash
|
|
674
|
+
cp templates/hustle-build-defaults.json .claude/hustle-build-defaults.json
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
Then edit `.claude/hustle-build-defaults.json`:
|
|
678
|
+
|
|
679
|
+
```json
|
|
680
|
+
{
|
|
681
|
+
"orchestrator": {
|
|
682
|
+
"auth_required": true, // Change to false for public APIs
|
|
683
|
+
"error_handling": "partial-success",
|
|
684
|
+
"brand_guide": true,
|
|
685
|
+
"testing_level": "essential" // Change from "full" for faster runs
|
|
686
|
+
},
|
|
687
|
+
"testing": {
|
|
688
|
+
"coverage_threshold": 80,
|
|
689
|
+
"e2e_tests": false // Skip E2E for faster testing
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
### Use Cases
|
|
695
|
+
|
|
696
|
+
| Scenario | Command |
|
|
697
|
+
|----------|---------|
|
|
698
|
+
| Full end-to-end test | `/hustle-build --auto "feature"` |
|
|
699
|
+
| Quick test (skip E2E) | Edit defaults, then `--auto` |
|
|
700
|
+
| CI/CD integration | `/hustle-build --auto --dry-run` first |
|
|
701
|
+
| Demo mode | `/hustle-build --auto --parallel` |
|
|
702
|
+
|
|
376
703
|
---
|
|
377
704
|
|
|
378
705
|
## Resume Behavior
|