@hustle-together/api-dev-tools 3.9.2 → 3.10.0

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 (30) hide show
  1. package/README.md +311 -19
  2. package/bin/cli.js +54 -7
  3. package/commands/hustle-api-create.md +13 -13
  4. package/commands/hustle-ui-create-page.md +933 -0
  5. package/hooks/api-workflow-check.py +160 -2
  6. package/hooks/check-api-routes.py +168 -0
  7. package/hooks/enforce-a11y-audit.py +202 -0
  8. package/hooks/enforce-brand-guide.py +115 -5
  9. package/hooks/enforce-page-components.py +186 -0
  10. package/hooks/enforce-page-data-schema.py +155 -0
  11. package/hooks/generate-manifest-entry.py +181 -1
  12. package/hooks/session-startup.py +95 -5
  13. package/hooks/update-ui-showcase.py +67 -3
  14. package/package.json +1 -2
  15. package/templates/api-dev-state.json +39 -1
  16. package/templates/settings.json +16 -0
  17. package/templates/shared/HeroHeader.tsx +1 -1
  18. package/demo/hustle-together/blog/gemini-vs-claude-widgets.html +0 -959
  19. package/demo/hustle-together/blog/interview-driven-api-development.html +0 -1146
  20. package/demo/hustle-together/blog/tdd-for-ai.html +0 -982
  21. package/demo/hustle-together/index.html +0 -1312
  22. package/demo/workflow-demo-v3.5-backup.html +0 -5008
  23. package/demo/workflow-demo.html +0 -6202
  24. /package/templates/api-showcase/{APICard.tsx → _components/APICard.tsx} +0 -0
  25. /package/templates/api-showcase/{APIModal.tsx → _components/APIModal.tsx} +0 -0
  26. /package/templates/api-showcase/{APIShowcase.tsx → _components/APIShowcase.tsx} +0 -0
  27. /package/templates/api-showcase/{APITester.tsx → _components/APITester.tsx} +0 -0
  28. /package/templates/ui-showcase/{PreviewCard.tsx → _components/PreviewCard.tsx} +0 -0
  29. /package/templates/ui-showcase/{PreviewModal.tsx → _components/PreviewModal.tsx} +0 -0
  30. /package/templates/ui-showcase/{UIShowcase.tsx → _components/UIShowcase.tsx} +0 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Hustle Development Tools for Claude Code v3.9.2
1
+ # Hustle Development Tools for Claude Code v3.10.0
2
2
 
3
3
  **Interview-driven, research-first API and UI development with 100% phase enforcement**
4
4
 
@@ -20,13 +20,13 @@ npx @hustle-together/api-dev-tools --with-sandpack --with-storybook
20
20
  ```
21
21
 
22
22
  **What Gets Installed:**
23
- - 10 Hustle slash commands (API + UI + Combine)
24
- - 34 enforcement hooks (Python scripts)
23
+ - 11 Hustle slash commands (API + UI + Page + Combine)
24
+ - 38 enforcement hooks (Python scripts)
25
25
  - Multi-element state tracking (`api-dev-state.json`)
26
26
  - **Central registry** (`registry.json`) - tracks all APIs, components, pages
27
27
  - **Brand guide** (`BRAND_GUIDE.md`) - default branding template
28
- - **Showcase pages** - `/dev-tools`, `/api-showcase`, `/ui-showcase` *(NEW)*
29
- - **Component/Page templates** - Storybook stories, Playwright E2E tests *(NEW)*
28
+ - **Showcase pages** - `/dev-tools`, `/api-showcase`, `/ui-showcase`
29
+ - **Component/Page templates** - Storybook stories, Playwright E2E tests
30
30
  - Research cache with 7-day freshness (`research/`)
31
31
  - Session logging (`api-sessions/`)
32
32
  - MCP server integrations (Context7, GitHub)
@@ -34,8 +34,60 @@ npx @hustle-together/api-dev-tools --with-sandpack --with-storybook
34
34
  **Start Your First Workflow:**
35
35
  ```bash
36
36
  /hustle-api-create my-endpoint # For APIs
37
- /hustle-ui-create # For UI components/pages (NEW)
38
- ```
37
+ /hustle-ui-create # For UI components
38
+ /hustle-ui-create-page # For Next.js pages (NEW in v3.10)
39
+ /hustle-combine # For API orchestration
40
+ ```
41
+
42
+ ## What's New in v3.10.0
43
+
44
+ ### UI Page Mode Complete
45
+ Full `/hustle-ui-create-page` workflow with dedicated documentation and hooks:
46
+ - **Page Types**: landing, dashboard, form, list, detail, auth
47
+ - **Page-Specific Hooks**: `check-api-routes.py`, `enforce-page-components.py`, `enforce-page-data-schema.py`
48
+ - **Playwright E2E**: Full test suite generation with 15+ test cases
49
+ - **Data Schema Validation**: Ensures API response types defined before implementation
50
+
51
+ ### Combine Workflow Completion
52
+ Enhanced API orchestration with validation:
53
+ - **2+ API Selection**: Validation that at least 2 APIs are selected
54
+ - **Flow Types**: sequential, parallel, conditional orchestration patterns
55
+ - **Orchestration Examples**: Auto-generated curl examples for combined endpoints
56
+ - **Registry Verification**: Checks all source APIs exist before orchestration
57
+
58
+ ### Accessibility Automation
59
+ New `enforce-a11y-audit.py` hook:
60
+ - Triggers after TDD Green phase for UI workflows
61
+ - WCAG 2.1 Level AA/AAA checklist injection
62
+ - axe-core command generation for Storybook and pages
63
+ - 4-step verification reminder (Responsive, Data, Tests, A11y)
64
+
65
+ ### Brand Color Validation
66
+ Enhanced `enforce-brand-guide.py`:
67
+ - Extracts allowed colors from BRAND_GUIDE.md
68
+ - Validates hex colors, Tailwind classes, CSS variables
69
+ - Notifies on non-brand color usage
70
+ - Supports common utility colors (primary, secondary, accent, etc.)
71
+
72
+ ### UI Showcase Auto-Population
73
+ `update-ui-showcase.py` now generates `data.json` from registry:
74
+ - Components: id, name, type, path, storybook_url, variants, props
75
+ - Pages: id, name, route, page_type, data_sources, requires_auth
76
+ - Automatic refresh on each UI workflow completion
77
+
78
+ ### Enhanced State Template
79
+ `api-dev-state.json` now includes:
80
+ - `workflow` field: api-create, combine-api, ui-create-component, ui-create-page
81
+ - `combine_config`: source_elements, flow_type, error_strategy, orchestration
82
+ - `ui_config`: mode, component_type, page_type, accessibility_level, data_sources
83
+
84
+ ### Session Startup Context
85
+ `session-startup.py` now shows workflow-specific context:
86
+ - Combine workflows: source APIs, flow type, error strategy
87
+ - UI workflows: brand guide status, component/page type, a11y level
88
+ - Workflow-specific reminders and key files
89
+
90
+ ---
39
91
 
40
92
  ## What's New in v3.9.2
41
93
 
@@ -4646,40 +4698,106 @@ npx @hustle-together/api-dev-tools --scope=project
4646
4698
 
4647
4699
  ### Optional Development Tools
4648
4700
 
4649
- After running the installer, you may want to set up additional development tools:
4701
+ The following tools enhance UI development but are **optional**. You can install them:
4702
+ 1. **During NPX install** - Using `--with-*` flags (see below)
4703
+ 2. **During UI workflow** - Hooks will prompt when needed
4650
4704
 
4651
- **Storybook (Component Development)**
4705
+ #### Installation Methods
4706
+
4707
+ **Option 1: Install with NPX Flags**
4652
4708
  ```bash
4653
- npx storybook@latest init
4709
+ # Install all optional tools at once
4710
+ npx @hustle-together/api-dev-tools --with-storybook --with-playwright --with-sandpack
4711
+
4712
+ # Or selectively
4713
+ npx @hustle-together/api-dev-tools --with-storybook
4654
4714
  ```
4715
+
4716
+ **Option 2: Install During UI Workflow**
4717
+ When you run `/hustle-ui-create` without the required tools:
4718
+ 1. The hook **blocks** writing test/story files
4719
+ 2. You see the exact install command needed
4720
+ 3. Claude offers to run the install for you
4721
+ 4. After installing, the workflow continues automatically
4722
+
4723
+ This "just-in-time" installation means you only install what you actually need.
4724
+
4725
+ ---
4726
+
4727
+ #### Tool Details
4728
+
4729
+ **Storybook (Component Development)**
4730
+ | Property | Value |
4731
+ |----------|-------|
4732
+ | Size | ~50MB |
4733
+ | Purpose | Visual component testing, interactive docs |
4734
+ | Required for | `/hustle-ui-create` (component mode) |
4735
+ | Without it | Cannot write `.stories.tsx` files |
4736
+ | Install flag | `--with-storybook` |
4737
+ | Manual command | `npx storybook@latest init` |
4738
+ | Hook | `check-storybook-setup.py` |
4739
+
4655
4740
  Used for:
4656
4741
  - Interactive component development
4657
4742
  - Visual testing of variants
4658
4743
  - Component documentation
4659
4744
 
4660
- The installer creates Storybook story templates (`Component.stories.tsx`) but does **not** install Storybook itself. The `check-storybook-setup.py` hook will detect if Storybook is installed and guide you through setup.
4745
+ ---
4661
4746
 
4662
4747
  **Playwright (E2E Testing)**
4663
- ```bash
4664
- npm init playwright@latest
4665
- ```
4748
+ | Property | Value |
4749
+ |----------|-------|
4750
+ | Size | ~200MB (includes browser binaries) |
4751
+ | Purpose | End-to-end page testing, cross-browser |
4752
+ | Required for | `/hustle-ui-create` (page mode) |
4753
+ | Without it | Cannot write `.e2e.test.ts` files |
4754
+ | Install flag | `--with-playwright` |
4755
+ | Manual command | `npm init playwright@latest` |
4756
+ | Hook | `check-playwright-setup.py` |
4757
+
4666
4758
  Used for:
4667
4759
  - Page-level E2E tests
4668
4760
  - Accessibility testing
4669
4761
  - Cross-browser verification
4670
4762
 
4671
- The installer creates Playwright test templates (`page.e2e.test.ts`) but does **not** install Playwright itself. The `check-playwright-setup.py` hook will detect if Playwright is installed and guide you through setup.
4763
+ ---
4672
4764
 
4673
4765
  **Sandpack (Live UI Previews)**
4674
- ```bash
4675
- pnpm add @codesandbox/sandpack-react
4676
- ```
4766
+ | Property | Value |
4767
+ |----------|-------|
4768
+ | Size | ~5MB |
4769
+ | Purpose | Live code editing in UI Showcase |
4770
+ | Required for | Interactive component playground |
4771
+ | Without it | Static previews only (still functional) |
4772
+ | Install flag | `--with-sandpack` |
4773
+ | Manual command | `npm install @codesandbox/sandpack-react` |
4774
+
4677
4775
  Used for:
4678
4776
  - Live component editing in UI Showcase
4679
4777
  - Interactive code previews
4680
4778
  - No server required
4681
4779
 
4682
- The UI Showcase page uses Sandpack for live component previews. Without it, components will display in a static iframe.
4780
+ ---
4781
+
4782
+ #### UI Workflow Hook Behavior
4783
+
4784
+ When Storybook or Playwright is not installed:
4785
+
4786
+ ```
4787
+ ┌─────────────────────────────────────────────────────────────┐
4788
+ │ HOOK BLOCKED: check-storybook-setup.py │
4789
+ ├─────────────────────────────────────────────────────────────┤
4790
+ │ Cannot write .stories.tsx without Storybook installed. │
4791
+ │ │
4792
+ │ Install with: npx storybook@latest init │
4793
+ │ │
4794
+ │ Or skip stories and continue (Phase 8-10 will be blocked) │
4795
+ └─────────────────────────────────────────────────────────────┘
4796
+ ```
4797
+
4798
+ Claude will then offer: "Would you like me to install Storybook now?"
4799
+
4800
+ This ensures you're always informed about what's needed without forcing installation upfront.
4683
4801
 
4684
4802
  ### Showcase Pages
4685
4803
 
@@ -6887,6 +7005,180 @@ Browse sessions: /hustle-api-sessions --list
6887
7005
 
6888
7006
  </details>
6889
7007
 
7008
+ <details>
7009
+ <summary><strong>enforce-a11y-audit.py</strong> - Accessibility Audit (v3.10.0+)</summary>
7010
+
7011
+ **Event:** PostToolUse (Write|Edit)
7012
+ **Purpose:** Trigger WCAG accessibility audit after TDD Green phase for UI workflows
7013
+
7014
+ **The Problem It Solves:**
7015
+ UI components and pages often ship with accessibility violations:
7016
+ - Missing alt text
7017
+ - Poor color contrast
7018
+ - No keyboard navigation
7019
+ - Missing ARIA labels
7020
+
7021
+ **How It Works:**
7022
+ 1. Detects UI workflow (ui-create-component or ui-create-page)
7023
+ 2. Checks if TDD Green phase is complete
7024
+ 3. Injects WCAG 2.1 checklist into context
7025
+ 4. Provides axe-core commands for automated testing
7026
+
7027
+ **Example 1: Accessibility Audit Required**
7028
+ ```
7029
+ Accessibility audit required for Button (WCAG 2.1 AA)
7030
+
7031
+ Quick Commands:
7032
+ # Storybook accessibility check
7033
+ pnpm storybook --ci
7034
+ pnpm dlx @storybook/test-runner --url http://localhost:6006
7035
+
7036
+ WCAG 2.1 AA Checklist:
7037
+ - Color contrast: 4.5:1 for normal text, 3:1 for large text
7038
+ - Focus visible: All interactive elements show focus state
7039
+ - Keyboard nav: All functionality accessible via keyboard
7040
+ - Labels: All form inputs have associated labels
7041
+ - Alt text: All images have meaningful alt text
7042
+ ```
7043
+
7044
+ **Example 2: Page Accessibility Check**
7045
+ ```
7046
+ # Page accessibility check
7047
+ pnpm dev
7048
+ # Then in another terminal:
7049
+ pnpm dlx @axe-core/cli http://localhost:3000/dashboard
7050
+
7051
+ # Or use Playwright accessibility tests:
7052
+ pnpm test:e2e --grep 'accessibility'
7053
+ ```
7054
+
7055
+ </details>
7056
+
7057
+ <details>
7058
+ <summary><strong>check-api-routes.py</strong> - Verify API Routes Exist (v3.10.0+)</summary>
7059
+
7060
+ **Event:** PreToolUse (Write|Edit)
7061
+ **Purpose:** Block page implementation until required API routes exist
7062
+
7063
+ **The Problem It Solves:**
7064
+ Pages are implemented before their data sources exist:
7065
+ - Page expects `/api/users` but route doesn't exist
7066
+ - Frontend code calls APIs that haven't been created
7067
+ - Runtime errors in production
7068
+
7069
+ **How It Works:**
7070
+ 1. Detects ui-create-page workflow
7071
+ 2. Checks Phase 7 (ENVIRONMENT) status
7072
+ 3. Scans project for existing API routes
7073
+ 4. Blocks page.tsx creation if environment check incomplete
7074
+
7075
+ **Example 1: Environment Check Required**
7076
+ ```
7077
+ ENVIRONMENT CHECK REQUIRED (Phase 7)
7078
+
7079
+ You are implementing the main page, but the Environment phase is not complete.
7080
+
7081
+ Before implementing page.tsx:
7082
+ 1. Verify required API routes exist
7083
+ 2. Check authentication configuration
7084
+ 3. Verify required packages are installed
7085
+ 4. Update state: phases.environment_check.status = "complete"
7086
+
7087
+ Existing API Routes Found:
7088
+ - /api/v2/brandfetch
7089
+ - /api/v2/openai
7090
+ - /api/v2/wordpress
7091
+ ... and 12 more
7092
+
7093
+ If you need new API routes, use /api-create to create them first.
7094
+ ```
7095
+
7096
+ </details>
7097
+
7098
+ <details>
7099
+ <summary><strong>enforce-page-components.py</strong> - Registry Component Reuse (v3.10.0+)</summary>
7100
+
7101
+ **Event:** PreToolUse (Write|Edit)
7102
+ **Purpose:** Check registry for reusable components before creating new ones
7103
+
7104
+ **The Problem It Solves:**
7105
+ Duplicate components are created instead of reusing existing ones:
7106
+ - Multiple Button components across the project
7107
+ - Inconsistent styling and behavior
7108
+ - Wasted development time
7109
+
7110
+ **How It Works:**
7111
+ 1. Detects ui-create-page workflow
7112
+ 2. Checks if creating a standalone component (src/components/)
7113
+ 3. Loads registry.json to show available components
7114
+ 4. Blocks if Page Analysis phase not complete
7115
+
7116
+ **Example 1: Page Analysis Required**
7117
+ ```
7118
+ PAGE ANALYSIS REQUIRED (Phase 5)
7119
+
7120
+ You are creating a new standalone component, but Page Analysis phase is not complete.
7121
+
7122
+ Before creating new components:
7123
+ 1. Check the registry for existing components
7124
+ 2. Decide which existing components to reuse
7125
+ 3. Update state: phases.page_analysis.status = "complete"
7126
+
7127
+ Available Components in Registry:
7128
+ - Button
7129
+ - Card
7130
+ - Modal
7131
+ - Input
7132
+ - Select
7133
+ ... and 5 more
7134
+
7135
+ If you need a NEW component, consider:
7136
+ - Using /ui-create to properly create and document it
7137
+ - Or create a page-specific component in src/app/{page}/_components/
7138
+ ```
7139
+
7140
+ **Note:** Page-specific components in `_components/` folders are always allowed.
7141
+
7142
+ </details>
7143
+
7144
+ <details>
7145
+ <summary><strong>enforce-page-data-schema.py</strong> - Data Schema Validation (v3.10.0+)</summary>
7146
+
7147
+ **Event:** PreToolUse (Write|Edit)
7148
+ **Purpose:** Ensure API response types are defined before page implementation
7149
+
7150
+ **The Problem It Solves:**
7151
+ Pages are implemented without knowing the data structure:
7152
+ - TypeScript errors when data shape is wrong
7153
+ - Runtime errors from missing properties
7154
+ - Inconsistent data handling
7155
+
7156
+ **How It Works:**
7157
+ 1. Detects ui-create-page workflow
7158
+ 2. Checks Phase 6 (DATA SCHEMA) status
7159
+ 3. Blocks page.tsx/layout.tsx creation if schema not complete
7160
+ 4. Allows type files and test files to be written
7161
+
7162
+ **Example 1: Data Schema Required**
7163
+ ```
7164
+ DATA SCHEMA REQUIRED (Phase 6)
7165
+
7166
+ You are trying to implement page code, but the data schema phase is not complete.
7167
+
7168
+ Before writing page implementation:
7169
+ 1. Define TypeScript interfaces for API responses
7170
+ 2. Create types in src/app/{page}/_types/index.ts
7171
+ 3. Update state: phases.data_schema.status = "complete"
7172
+
7173
+ Page implementation requires knowing the data structure first.
7174
+ ```
7175
+
7176
+ **What's Allowed Without Schema:**
7177
+ - Type definition files (`_types/`)
7178
+ - Test files (`__tests__/`, `.test.`, `.spec.`)
7179
+
7180
+ </details>
7181
+
6890
7182
  ---
6891
7183
 
6892
7184
  ## Links
package/bin/cli.js CHANGED
@@ -758,7 +758,7 @@ function main() {
758
758
  // Success Summary
759
759
  // ========================================
760
760
  log('\n' + '═'.repeat(60), 'green');
761
- log('🎉 API Development Tools v3.9.2 installed successfully!', 'green');
761
+ log('🎉 API Development Tools v3.10.0 installed successfully!', 'green');
762
762
  log('═'.repeat(60) + '\n', 'green');
763
763
 
764
764
  log('📋 What was installed:', 'bright');
@@ -774,7 +774,10 @@ function main() {
774
774
  log(' MCP: context7, github (via claude mcp add)', 'blue');
775
775
  log(' Test UI: /api-test page + /api/test-structure API (if Next.js)', 'blue');
776
776
 
777
- log('\n🆕 New in v3.9.2:', 'bright');
777
+ log('\n🆕 New in v3.10.0:', 'bright');
778
+ log(' • Enhanced installer with detailed optional tools info', 'cyan');
779
+ log(' • UI workflow auto-prompts for Storybook/Playwright installation', 'cyan');
780
+ log(' • Demo JSONs updated for 13-phase workflow accuracy', 'cyan');
778
781
  log(' • Animated 3D grid hero header on showcase pages', 'cyan');
779
782
  log(' • Dev Tools landing page at /dev-tools', 'cyan');
780
783
  log(' • Multi-endpoint API selector (e.g., /tts, /voices, /models)', 'cyan');
@@ -840,11 +843,55 @@ function main() {
840
843
  log(' /api-showcase - Interactive API testing', 'blue');
841
844
  log(' /ui-showcase - Live component previews', 'blue');
842
845
 
843
- log('\n📦 Optional Tools (use --with-* flags to auto-install):', 'yellow');
844
- log(' --with-sandpack Live component editing in UI Showcase', 'yellow');
845
- log(' --with-storybook Component development environment', 'yellow');
846
- log(' --with-playwright E2E testing framework', 'yellow');
847
- log('\n Example: npx @hustle-together/api-dev-tools --with-sandpack --with-storybook\n', 'yellow');
846
+ // Enhanced Optional Development Tools Section
847
+ log('\n' + '─'.repeat(60), 'yellow');
848
+ log('📦 OPTIONAL DEVELOPMENT TOOLS', 'yellow');
849
+ log(''.repeat(60), 'yellow');
850
+ log(' The following tools are OPTIONAL but enhance UI development.', 'bright');
851
+ log(' Install now with flags, or later when prompted during /hustle-ui-create.\n', 'bright');
852
+
853
+ log(' ┌──────────────────────────────────────────────────────────┐', 'cyan');
854
+ log(' │ STORYBOOK (Component Development) │', 'cyan');
855
+ log(' ├──────────────────────────────────────────────────────────┤', 'cyan');
856
+ log(' │ Size: ~50MB │', 'cyan');
857
+ log(' │ Purpose: Visual component testing, interactive docs │', 'cyan');
858
+ log(' │ Required: /hustle-ui-create (component mode) │', 'cyan');
859
+ log(' │ Without: Cannot write .stories.tsx files │', 'cyan');
860
+ log(' │ Install: --with-storybook flag OR during UI workflow │', 'cyan');
861
+ log(' │ Command: npx storybook@latest init │', 'cyan');
862
+ log(' └──────────────────────────────────────────────────────────┘', 'cyan');
863
+
864
+ log(' ┌──────────────────────────────────────────────────────────┐', 'magenta');
865
+ log(' │ PLAYWRIGHT (E2E Testing) │', 'magenta');
866
+ log(' ├──────────────────────────────────────────────────────────┤', 'magenta');
867
+ log(' │ Size: ~200MB (includes browser binaries) │', 'magenta');
868
+ log(' │ Purpose: End-to-end page testing, cross-browser │', 'magenta');
869
+ log(' │ Required: /hustle-ui-create-page (page mode) │', 'magenta');
870
+ log(' │ Without: Cannot write .e2e.test.ts files │', 'magenta');
871
+ log(' │ Install: --with-playwright flag OR during UI workflow │', 'magenta');
872
+ log(' │ Command: npm init playwright@latest │', 'magenta');
873
+ log(' └──────────────────────────────────────────────────────────┘', 'magenta');
874
+
875
+ log(' ┌──────────────────────────────────────────────────────────┐', 'blue');
876
+ log(' │ SANDPACK (Live Editing) │', 'blue');
877
+ log(' ├──────────────────────────────────────────────────────────┤', 'blue');
878
+ log(' │ Size: ~5MB │', 'blue');
879
+ log(' │ Purpose: Live code editing in UI Showcase │', 'blue');
880
+ log(' │ Required: Interactive component playground │', 'blue');
881
+ log(' │ Without: Static previews only (still functional) │', 'blue');
882
+ log(' │ Install: --with-sandpack flag │', 'blue');
883
+ log(' │ Command: npm install @codesandbox/sandpack-react │', 'blue');
884
+ log(' └──────────────────────────────────────────────────────────┘', 'blue');
885
+
886
+ log('\n 💡 UI Workflow Behavior:', 'bright');
887
+ log(' When you run /hustle-ui-create without Storybook or Playwright:', 'bright');
888
+ log(' 1. The hook will BLOCK writing test/story files', 'bright');
889
+ log(' 2. You\'ll see the install command and be prompted to install', 'bright');
890
+ log(' 3. After installing, the workflow continues automatically', 'bright');
891
+ log(' 4. You can skip and install later, but Phase 8-10 will be blocked', 'bright');
892
+
893
+ log('\n Example with all optional tools:', 'yellow');
894
+ log(' npx @hustle-together/api-dev-tools --with-storybook --with-playwright --with-sandpack\n', 'yellow');
848
895
 
849
896
  // ========================================
850
897
  // 5. Verify Installation
@@ -101,7 +101,7 @@ Both conditions must be true for the flag to be set.
101
101
  /hustle-api-create [endpoint]
102
102
 
103
103
 
104
- ┌─ PHASE 0: DISAMBIGUATION ─────────────────────────────────┐
104
+ ┌─ PHASE 1: DISAMBIGUATION ─────────────────────────────────┐
105
105
  │ Search 3-5 variations of the term: │
106
106
  │ • "[term]" │
107
107
  │ • "[term] API" │
@@ -128,7 +128,7 @@ Both conditions must be true for the flag to be set.
128
128
  └───────────────────────────────────────────────────────────┘
129
129
  │ Clear
130
130
 
131
- ┌─ PHASE 1: SCOPE CONFIRMATION ─────────────────────────────┐
131
+ ┌─ PHASE 2: SCOPE ──────────────────────────────────────────┐
132
132
  │ │
133
133
  │ Present your understanding, then: │
134
134
  │ │
@@ -153,7 +153,7 @@ Both conditions must be true for the flag to be set.
153
153
  └───────────────────────────────────────────────────────────┘
154
154
 
155
155
 
156
- ┌─ PHASE 2: INITIAL RESEARCH ───────────────────────────────┐
156
+ ┌─ PHASE 3: INITIAL RESEARCH ───────────────────────────────┐
157
157
  │ │
158
158
  │ Execute 2-3 initial searches: │
159
159
  │ • Context7: "[library/api name]" │
@@ -183,7 +183,7 @@ Both conditions must be true for the flag to be set.
183
183
  └───────────────────────────────────────────────────────────┘
184
184
 
185
185
 
186
- ┌─ PHASE 3: INTERVIEW (Generated FROM Research) ────────────┐
186
+ ┌─ PHASE 4: INTERVIEW (Generated FROM Research) ────────────┐
187
187
  │ │
188
188
  │ For EACH parameter discovered in research, ask ONE │
189
189
  │ question at a time using AskUserQuestion: │
@@ -235,7 +235,7 @@ Both conditions must be true for the flag to be set.
235
235
  └───────────────────────────────────────────────────────────┘
236
236
 
237
237
 
238
- ┌─ PHASE 4: DEEP RESEARCH (Adaptive) ───────────────────────┐
238
+ ┌─ PHASE 5: DEEP RESEARCH (Adaptive) ───────────────────────┐
239
239
  │ │
240
240
  │ Based on interview answers, PROPOSE additional research. │
241
241
  │ │
@@ -260,7 +260,7 @@ Both conditions must be true for the flag to be set.
260
260
  └───────────────────────────────────────────────────────────┘
261
261
 
262
262
 
263
- ┌─ PHASE 5: SCHEMA DESIGN ──────────────────────────────────┐
263
+ ┌─ PHASE 6: SCHEMA ─────────────────────────────────────────┐
264
264
  │ │
265
265
  │ Create Zod schema from research + interview, then: │
266
266
  │ │
@@ -285,7 +285,7 @@ Both conditions must be true for the flag to be set.
285
285
  └───────────────────────────────────────────────────────────┘
286
286
 
287
287
 
288
- ┌─ PHASE 6: ENVIRONMENT CHECK ──────────────────────────────┐
288
+ ┌─ PHASE 7: ENVIRONMENT ────────────────────────────────────┐
289
289
  │ │
290
290
  │ Check required API keys, show status table, then: │
291
291
  │ │
@@ -309,7 +309,7 @@ Both conditions must be true for the flag to be set.
309
309
  └───────────────────────────────────────────────────────────┘
310
310
 
311
311
 
312
- ┌─ PHASE 7: TDD RED (Write Failing Tests) ──────────────────┐
312
+ ┌─ PHASE 8: TDD RED (Write Failing Tests) ──────────────────┐
313
313
  │ │
314
314
  │ Generate test matrix from schema + interview, then: │
315
315
  │ │
@@ -335,7 +335,7 @@ Both conditions must be true for the flag to be set.
335
335
  └───────────────────────────────────────────────────────────┘
336
336
 
337
337
 
338
- ┌─ PHASE 8: TDD GREEN (Minimal Implementation) ─────────────┐
338
+ ┌─ PHASE 9: TDD GREEN (Minimal Implementation) ─────────────┐
339
339
  │ │
340
340
  │ Write minimal code to pass ALL tests. │
341
341
  │ Tests derived from schema. │
@@ -347,7 +347,7 @@ Both conditions must be true for the flag to be set.
347
347
  └───────────────────────────────────────────────────────────┘
348
348
 
349
349
 
350
- ┌─ PHASE 9: VERIFY (Re-Research After Green) ───────────────┐
350
+ ┌─ PHASE 10: VERIFY (Re-Research After Green) ──────────────┐
351
351
  │ │
352
352
  │ MANDATORY: Re-read original documentation. │
353
353
  │ Compare implementation to docs, then: │
@@ -374,7 +374,7 @@ Both conditions must be true for the flag to be set.
374
374
  └───────────────────────────────────────────────────────────┘
375
375
 
376
376
 
377
- ┌─ PHASE 10: TDD REFACTOR ──────────────────────────────────┐
377
+ ┌─ PHASE 11: TDD REFACTOR ──────────────────────────────────┐
378
378
  │ │
379
379
  │ Clean up code while tests stay green: │
380
380
  │ • Extract reusable patterns │
@@ -386,7 +386,7 @@ Both conditions must be true for the flag to be set.
386
386
  └───────────────────────────────────────────────────────────┘
387
387
 
388
388
 
389
- ┌─ PHASE 11: DOCUMENTATION ─────────────────────────────────┐
389
+ ┌─ PHASE 12: DOCUMENTATION ─────────────────────────────────┐
390
390
  │ │
391
391
  │ Update documentation files, then: │
392
392
  │ │
@@ -411,7 +411,7 @@ Both conditions must be true for the flag to be set.
411
411
  └───────────────────────────────────────────────────────────┘
412
412
 
413
413
 
414
- ┌─ PHASE 12: COMPLETION ────────────────────────────────────┐
414
+ ┌─ PHASE 13: COMPLETION ────────────────────────────────────┐
415
415
  │ │
416
416
  │ Final verification: │
417
417
  │ • All tests passing │