@hustle-together/api-dev-tools 3.11.1 → 3.12.2
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/agents/code-reviewer.md +170 -0
- package/.claude/agents/docs-generator.md +80 -0
- package/.claude/agents/implementation-reviewer.md +119 -0
- package/.claude/agents/parallel-researcher.md +52 -0
- package/.claude/agents/research-validator.md +116 -0
- package/.claude/agents/schema-generator.md +70 -0
- package/.claude/agents/test-writer.md +104 -0
- package/.claude/api-dev-state.json +305 -56
- package/.claude/commands/README.md +21 -10
- package/.claude/commands/add-command.md +8 -5
- package/.claude/commands/api-create.md +36 -25
- package/.claude/commands/api-env.md +1 -0
- package/.claude/commands/api-interview.md +32 -19
- package/.claude/commands/api-research.md +47 -21
- package/.claude/commands/api-status.md +21 -1
- package/.claude/commands/api-verify.md +14 -13
- package/.claude/commands/beepboop.md +4 -5
- package/.claude/commands/busycommit.md +2 -3
- package/.claude/commands/commit.md +2 -3
- package/.claude/commands/cycle.md +2 -7
- package/.claude/commands/gap.md +2 -3
- package/.claude/commands/green.md +2 -7
- package/.claude/commands/issue.md +3 -8
- package/.claude/commands/ntfy-setup.md +91 -0
- package/.claude/commands/ntfy-test.md +74 -0
- package/.claude/commands/plan.md +2 -3
- package/.claude/commands/pr.md +2 -3
- package/.claude/commands/publish.md +40 -0
- package/.claude/commands/red.md +2 -7
- package/.claude/commands/refactor.md +2 -7
- package/.claude/commands/spike.md +2 -7
- package/.claude/commands/summarize.md +2 -3
- package/.claude/commands/tdd.md +2 -7
- package/.claude/commands/worktree-add.md +208 -216
- package/.claude/commands/worktree-cleanup.md +172 -178
- package/.claude/settings.json +63 -12
- package/.claude/settings.local.json +2 -1
- package/.claude-plugin/marketplace.json +2 -11
- package/.skills/README.md +55 -53
- package/.skills/_shared/settings.json +1 -1
- package/.skills/add-command/SKILL.md +10 -5
- package/.skills/api-create/SKILL.md +146 -35
- package/.skills/api-env/SKILL.md +1 -0
- package/.skills/api-interview/SKILL.md +32 -19
- package/.skills/api-research/SKILL.md +47 -21
- package/.skills/api-status/SKILL.md +21 -1
- package/.skills/api-verify/SKILL.md +14 -13
- package/.skills/beepboop/SKILL.md +6 -5
- package/.skills/busycommit/SKILL.md +4 -3
- package/.skills/commit/SKILL.md +4 -3
- package/.skills/cycle/SKILL.md +4 -7
- package/.skills/gap/SKILL.md +4 -3
- package/.skills/green/SKILL.md +4 -7
- package/.skills/issue/SKILL.md +5 -8
- package/.skills/plan/SKILL.md +4 -3
- package/.skills/pr/SKILL.md +4 -3
- package/.skills/publish/SKILL.md +160 -0
- package/.skills/red/SKILL.md +4 -7
- package/.skills/refactor/SKILL.md +4 -7
- package/.skills/spike/SKILL.md +4 -7
- package/.skills/summarize/SKILL.md +4 -3
- package/.skills/tdd/SKILL.md +4 -7
- package/.skills/update-todos/SKILL.md +22 -0
- package/.skills/worktree-add/SKILL.md +210 -216
- package/.skills/worktree-cleanup/SKILL.md +183 -187
- package/CHANGELOG.md +97 -79
- package/README.md +161 -7142
- package/bin/cli.js +448 -805
- package/commands/README.md +66 -31
- package/commands/add-command.md +8 -5
- package/commands/beepboop.md +4 -5
- package/commands/busycommit.md +2 -3
- package/commands/commit.md +2 -3
- package/commands/cycle.md +2 -7
- package/commands/gap.md +2 -3
- package/commands/green.md +2 -7
- package/commands/hustle-api-continue.md +8 -5
- package/commands/hustle-api-create.md +70 -29
- package/commands/hustle-api-env.md +1 -0
- package/commands/hustle-api-interview.md +32 -19
- package/commands/hustle-api-research.md +47 -21
- package/commands/hustle-api-sessions.md +8 -7
- package/commands/hustle-api-status.md +21 -1
- package/commands/hustle-api-verify.md +14 -13
- package/commands/hustle-combine.md +488 -241
- package/commands/hustle-ui-create-page.md +113 -50
- package/commands/hustle-ui-create.md +179 -26
- package/commands/issue.md +3 -8
- package/commands/plan.md +2 -3
- package/commands/pr.md +2 -3
- package/commands/red.md +2 -7
- package/commands/refactor.md +2 -7
- package/commands/spike.md +2 -7
- package/commands/summarize.md +2 -3
- package/commands/tdd.md +2 -7
- package/commands/worktree-add.md +208 -216
- package/commands/worktree-cleanup.md +172 -178
- package/hooks/api-workflow-check.py +5 -3
- package/hooks/enforce-component-type-confirm.py +97 -0
- package/hooks/lib/__init__.py +1 -0
- package/hooks/lib/greptile.py +355 -0
- package/hooks/lib/ntfy.py +209 -0
- package/hooks/notify-input-needed.py +73 -0
- package/hooks/notify-phase-complete.py +90 -0
- package/hooks/run-code-review.py +246 -0
- package/hooks/track-token-usage.py +121 -0
- package/package.json +13 -3
- package/scripts/collect-test-results.ts +102 -77
- package/scripts/extract-parameters.ts +112 -70
- package/scripts/generate-test-manifest.ts +118 -77
- package/templates/.env.example +57 -0
- package/templates/BRAND_GUIDE.md +92 -52
- package/templates/CLAUDE-SECTION.md +40 -37
- package/templates/SPEC.json +186 -38
- package/templates/api-dev-state.json +33 -4
- package/templates/api-showcase/_components/APICard.tsx +22 -18
- package/templates/api-showcase/_components/APIModal.tsx +110 -64
- package/templates/api-showcase/_components/APIShowcase.tsx +53 -35
- package/templates/api-showcase/_components/APITester.tsx +128 -67
- package/templates/api-showcase/page.tsx +4 -4
- package/templates/api-test/page.tsx +51 -30
- package/templates/api-test/test-structure/route.ts +43 -34
- package/templates/component/Component.stories.tsx +41 -39
- package/templates/component/Component.test.tsx +96 -78
- package/templates/component/Component.tsx +63 -52
- package/templates/component/Component.types.ts +10 -6
- package/templates/component/Component.visual.spec.ts +170 -0
- package/templates/component/index.ts +2 -2
- package/templates/dev-tools/_components/DevToolsLanding.tsx +8 -8
- package/templates/dev-tools/page.tsx +4 -3
- package/templates/mcp-servers.json +30 -2
- package/templates/page/page.e2e.test.ts +56 -48
- package/templates/page/page.tsx +3 -3
- package/templates/shared/HeroHeader.tsx +16 -15
- package/templates/shared/index.ts +1 -1
- package/templates/ui-showcase/_components/PreviewCard.tsx +20 -20
- package/templates/ui-showcase/_components/PreviewModal.tsx +149 -108
- package/templates/ui-showcase/_components/UIShowcase.tsx +43 -35
- package/templates/ui-showcase/page.tsx +4 -4
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create UI components or pages with
|
|
2
|
+
description: Create UI components or pages with 14-phase interview-driven workflow
|
|
3
3
|
argument-hint: [component-name]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hustle UI Create
|
|
7
7
|
|
|
8
|
-
**Version:** 3.
|
|
9
|
-
**
|
|
8
|
+
**Version:** 3.11.0
|
|
9
|
+
**14-phase workflow for creating UI components and pages**
|
|
10
10
|
|
|
11
11
|
You are creating a UI element using the Hustle Together interview-driven workflow.
|
|
12
12
|
|
|
13
13
|
## Pre-Flight Check
|
|
14
14
|
|
|
15
15
|
Before starting, verify state file exists:
|
|
16
|
+
|
|
16
17
|
```bash
|
|
17
18
|
cat .claude/api-dev-state.json 2>/dev/null || echo "Creating new state file"
|
|
18
19
|
```
|
|
@@ -43,35 +44,57 @@ Set `mode` based on response: "component" or "page"
|
|
|
43
44
|
|
|
44
45
|
---
|
|
45
46
|
|
|
46
|
-
# Component Mode (
|
|
47
|
+
# Component Mode (14 Phases)
|
|
47
48
|
|
|
48
49
|
## Phase 1: DISAMBIGUATION
|
|
49
50
|
|
|
50
|
-
**Goal:**
|
|
51
|
+
**Goal:** AI analyzes component, suggests type, user confirms
|
|
52
|
+
|
|
53
|
+
### Step 1: AI Analysis
|
|
54
|
+
|
|
55
|
+
Analyze the component name and description to determine complexity:
|
|
56
|
+
|
|
57
|
+
**Basic components** (single-purpose, few props):
|
|
58
|
+
|
|
59
|
+
- Button, Input, Icon, Badge, Label, Avatar, Spinner
|
|
60
|
+
|
|
61
|
+
**Complex components** (multi-part, many states, user flows):
|
|
62
|
+
|
|
63
|
+
- ChatWindow, DataTable, Modal, Sidebar, Header, Form, Dashboard
|
|
64
|
+
|
|
65
|
+
### Step 2: Present Suggestion
|
|
51
66
|
|
|
52
|
-
Ask the user:
|
|
53
67
|
```
|
|
54
68
|
Phase 1: DISAMBIGUATION
|
|
55
69
|
|
|
56
|
-
|
|
70
|
+
Based on "[component-name]", I believe this is a:
|
|
71
|
+
|
|
72
|
+
➤ [BASIC/COMPLEX] component
|
|
73
|
+
|
|
74
|
+
Reasoning: [Why you classified it this way]
|
|
57
75
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
76
|
+
Is this correct?
|
|
77
|
+
A) Yes, proceed with [Basic/Complex]
|
|
78
|
+
B) No, it's actually [the other type]
|
|
61
79
|
|
|
62
|
-
Please
|
|
80
|
+
Please confirm:
|
|
63
81
|
```
|
|
64
82
|
|
|
65
83
|
**Wait for user response.**
|
|
66
84
|
|
|
85
|
+
**HOOK: `enforce-component-type-confirm.py` blocks if user doesn't confirm.**
|
|
86
|
+
|
|
67
87
|
Update state:
|
|
88
|
+
|
|
68
89
|
```json
|
|
69
90
|
{
|
|
70
91
|
"workflow": "ui-create-component",
|
|
71
92
|
"element_name": "[component-name]",
|
|
72
93
|
"element_type": "component",
|
|
73
94
|
"ui_config": {
|
|
74
|
-
"component_type": "[
|
|
95
|
+
"component_type": "[basic|complex]",
|
|
96
|
+
"ai_suggested": "[basic|complex]",
|
|
97
|
+
"user_confirmed": true
|
|
75
98
|
},
|
|
76
99
|
"phases": {
|
|
77
100
|
"disambiguation": {
|
|
@@ -82,6 +105,8 @@ Update state:
|
|
|
82
105
|
}
|
|
83
106
|
```
|
|
84
107
|
|
|
108
|
+
**Note:** Complex components will include Playwright E2E tests in addition to Storybook.
|
|
109
|
+
|
|
85
110
|
---
|
|
86
111
|
|
|
87
112
|
## Phase 2: SCOPE
|
|
@@ -96,7 +121,7 @@ Phase 2: SCOPE CONFIRMATION
|
|
|
96
121
|
Based on your input, here's my understanding:
|
|
97
122
|
|
|
98
123
|
Component: [Name]
|
|
99
|
-
Type: [
|
|
124
|
+
Type: [Basic/Complex]
|
|
100
125
|
Purpose: [Your understanding of what this component does]
|
|
101
126
|
|
|
102
127
|
Expected Features:
|
|
@@ -149,6 +174,7 @@ If B: Ask for URL or description
|
|
|
149
174
|
### Step 3b: Design Pattern Research
|
|
150
175
|
|
|
151
176
|
Perform 2-3 targeted searches:
|
|
177
|
+
|
|
152
178
|
1. `[component-name] component best practices accessibility`
|
|
153
179
|
2. `shadcn [component-name] implementation`
|
|
154
180
|
3. `radix [component-name] primitive`
|
|
@@ -156,6 +182,7 @@ Perform 2-3 targeted searches:
|
|
|
156
182
|
Use Context7 for ShadCN/Radix documentation.
|
|
157
183
|
|
|
158
184
|
Document findings in state:
|
|
185
|
+
|
|
159
186
|
```json
|
|
160
187
|
{
|
|
161
188
|
"phases": {
|
|
@@ -209,6 +236,7 @@ Q5: [Research-derived question about specific feature]
|
|
|
209
236
|
**Wait for all answers before proceeding.**
|
|
210
237
|
|
|
211
238
|
Store all decisions in state:
|
|
239
|
+
|
|
212
240
|
```json
|
|
213
241
|
{
|
|
214
242
|
"phases": {
|
|
@@ -237,6 +265,7 @@ ls -la src/components/ui/ 2>/dev/null || echo "No existing ShadCN components"
|
|
|
237
265
|
```
|
|
238
266
|
|
|
239
267
|
If components found:
|
|
268
|
+
|
|
240
269
|
```
|
|
241
270
|
Phase 5: COMPONENT ANALYSIS
|
|
242
271
|
|
|
@@ -261,6 +290,7 @@ Please select:
|
|
|
261
290
|
**Wait for user response.**
|
|
262
291
|
|
|
263
292
|
Also check registry for custom components:
|
|
293
|
+
|
|
264
294
|
```bash
|
|
265
295
|
cat .claude/registry.json | jq '.components'
|
|
266
296
|
```
|
|
@@ -300,6 +330,7 @@ export interface [Name]Props {
|
|
|
300
330
|
```
|
|
301
331
|
|
|
302
332
|
Present to user:
|
|
333
|
+
|
|
303
334
|
```
|
|
304
335
|
Phase 6: PROPS SCHEMA
|
|
305
336
|
|
|
@@ -323,16 +354,19 @@ Please select:
|
|
|
323
354
|
**Goal:** Verify required packages and Storybook setup
|
|
324
355
|
|
|
325
356
|
Check for required packages:
|
|
357
|
+
|
|
326
358
|
```bash
|
|
327
359
|
cat package.json | jq '.dependencies, .devDependencies' | grep -E "radix|shadcn|class-variance|clsx|tailwind"
|
|
328
360
|
```
|
|
329
361
|
|
|
330
362
|
Check Storybook:
|
|
363
|
+
|
|
331
364
|
```bash
|
|
332
365
|
ls -la .storybook/ 2>/dev/null || echo "Storybook not configured"
|
|
333
366
|
```
|
|
334
367
|
|
|
335
368
|
If Storybook not found:
|
|
369
|
+
|
|
336
370
|
```
|
|
337
371
|
Phase 7: ENVIRONMENT CHECK
|
|
338
372
|
|
|
@@ -346,6 +380,7 @@ Please select:
|
|
|
346
380
|
```
|
|
347
381
|
|
|
348
382
|
Report status:
|
|
383
|
+
|
|
349
384
|
```
|
|
350
385
|
Environment Check:
|
|
351
386
|
Packages: [radix, class-variance-authority, clsx]
|
|
@@ -434,6 +469,49 @@ export const Disabled: Story = {
|
|
|
434
469
|
};
|
|
435
470
|
```
|
|
436
471
|
|
|
472
|
+
### Create Visual Regression Test (Playwright)
|
|
473
|
+
|
|
474
|
+
```typescript
|
|
475
|
+
// src/components/[Name]/__tests__/[Name].visual.spec.ts
|
|
476
|
+
|
|
477
|
+
import { test, expect } from "@playwright/test";
|
|
478
|
+
|
|
479
|
+
const STORYBOOK_URL = process.env.STORYBOOK_URL || "http://localhost:6006";
|
|
480
|
+
|
|
481
|
+
test.describe("[Name] Visual Regression", () => {
|
|
482
|
+
test("Primary variant matches baseline", async ({ page }) => {
|
|
483
|
+
await page.goto(
|
|
484
|
+
`${STORYBOOK_URL}/iframe.html?id=components-[name]--primary`,
|
|
485
|
+
);
|
|
486
|
+
await page.waitForLoadState("networkidle");
|
|
487
|
+
await expect(page.locator("#storybook-root")).toHaveScreenshot(
|
|
488
|
+
"[Name]-primary.png",
|
|
489
|
+
);
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
test("renders correctly on mobile", async ({ page }) => {
|
|
493
|
+
await page.setViewportSize({ width: 375, height: 667 });
|
|
494
|
+
await page.goto(
|
|
495
|
+
`${STORYBOOK_URL}/iframe.html?id=components-[name]--primary`,
|
|
496
|
+
);
|
|
497
|
+
await expect(page.locator("#storybook-root")).toHaveScreenshot(
|
|
498
|
+
"[Name]-mobile.png",
|
|
499
|
+
);
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
test("hover state matches baseline", async ({ page }) => {
|
|
503
|
+
await page.goto(
|
|
504
|
+
`${STORYBOOK_URL}/iframe.html?id=components-[name]--primary`,
|
|
505
|
+
);
|
|
506
|
+
await page.locator("#storybook-root > *").first().hover();
|
|
507
|
+
await page.waitForTimeout(300);
|
|
508
|
+
await expect(page.locator("#storybook-root")).toHaveScreenshot(
|
|
509
|
+
"[Name]-hover.png",
|
|
510
|
+
);
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
```
|
|
514
|
+
|
|
437
515
|
### Run Tests (Expect Failure)
|
|
438
516
|
|
|
439
517
|
```bash
|
|
@@ -569,6 +647,7 @@ Step 3: Test Results
|
|
|
569
647
|
```
|
|
570
648
|
|
|
571
649
|
Run accessibility audit:
|
|
650
|
+
|
|
572
651
|
```bash
|
|
573
652
|
pnpm dlx @axe-core/cli http://localhost:6006/iframe.html?id=components-[name]--primary
|
|
574
653
|
```
|
|
@@ -586,9 +665,35 @@ Step 4: Performance Metrics
|
|
|
586
665
|
Bundle size impact: [+X KB]
|
|
587
666
|
```
|
|
588
667
|
|
|
589
|
-
|
|
668
|
+
### Step 5: Visual Regression (Playwright)
|
|
669
|
+
|
|
670
|
+
Run visual regression tests to capture baseline screenshots:
|
|
671
|
+
|
|
672
|
+
```bash
|
|
673
|
+
pnpm playwright test src/components/[Name]/[Name].visual.spec.ts --update-snapshots
|
|
674
|
+
```
|
|
675
|
+
|
|
676
|
+
This creates baseline screenshots in Storybook for:
|
|
677
|
+
|
|
678
|
+
- All variants (primary, secondary, disabled, loading)
|
|
679
|
+
- All sizes (sm, md, lg)
|
|
680
|
+
- All viewports (mobile, tablet, desktop)
|
|
681
|
+
- Interaction states (hover, focus)
|
|
682
|
+
- Dark mode (if supported)
|
|
683
|
+
|
|
684
|
+
```
|
|
685
|
+
Step 5: Visual Regression
|
|
686
|
+
|
|
687
|
+
Variant screenshots: [X/X captured]
|
|
688
|
+
Responsive viewports: [3/3 captured]
|
|
689
|
+
Interaction states: [Hover, Focus captured]
|
|
690
|
+
Dark mode: [Captured if supported]
|
|
590
691
|
```
|
|
591
|
-
|
|
692
|
+
|
|
693
|
+
**Present 5-step results:**
|
|
694
|
+
|
|
695
|
+
```
|
|
696
|
+
Phase 10: VERIFICATION (5-Step)
|
|
592
697
|
|
|
593
698
|
Step 1: Responsive Check
|
|
594
699
|
Desktop (1920px) - Renders correctly
|
|
@@ -611,7 +716,11 @@ Step 4: Performance Metrics
|
|
|
611
716
|
Re-renders on mount: 1 (optimal)
|
|
612
717
|
Re-renders on prop change: 1 (optimal)
|
|
613
718
|
|
|
614
|
-
|
|
719
|
+
Step 5: Visual Regression
|
|
720
|
+
Playwright screenshots: 12/12 captured
|
|
721
|
+
Baseline images saved to: __snapshots__/
|
|
722
|
+
|
|
723
|
+
All 5 checks passed!
|
|
615
724
|
|
|
616
725
|
Any issues to fix?
|
|
617
726
|
A) No, all good - proceed
|
|
@@ -622,11 +731,46 @@ Any issues to fix?
|
|
|
622
731
|
|
|
623
732
|
---
|
|
624
733
|
|
|
625
|
-
## Phase 11:
|
|
734
|
+
## Phase 11: CODE REVIEW (Greptile)
|
|
735
|
+
|
|
736
|
+
**Goal:** AI-powered code review before refactoring
|
|
737
|
+
|
|
738
|
+
Run Greptile code review to catch issues early:
|
|
739
|
+
|
|
740
|
+
- Bug detection with full codebase context
|
|
741
|
+
- Security vulnerability scanning (OWASP top 10)
|
|
742
|
+
- Performance issue identification
|
|
743
|
+
- Accessibility concerns
|
|
744
|
+
|
|
745
|
+
**Requires:** GREPTILE_API_KEY + GITHUB_TOKEN
|
|
746
|
+
|
|
747
|
+
Present results:
|
|
748
|
+
|
|
749
|
+
```
|
|
750
|
+
Phase 11: CODE REVIEW
|
|
751
|
+
|
|
752
|
+
Greptile found [N] issue(s):
|
|
753
|
+
|
|
754
|
+
1. [file:line] - [severity] [issue description]
|
|
755
|
+
2. [file:line] - [severity] [issue description]
|
|
756
|
+
|
|
757
|
+
How should I proceed?
|
|
758
|
+
A) Fix all issues in refactor phase
|
|
759
|
+
B) Fix critical only, defer others
|
|
760
|
+
C) Skip - no issues to fix
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
**Wait for user response.**
|
|
764
|
+
|
|
765
|
+
---
|
|
766
|
+
|
|
767
|
+
## Phase 12: TDD REFACTOR
|
|
626
768
|
|
|
627
|
-
**Goal:**
|
|
769
|
+
**Goal:** Fix code review issues + clean up code while tests pass
|
|
628
770
|
|
|
629
771
|
Refactoring checklist:
|
|
772
|
+
|
|
773
|
+
- [ ] Address Greptile issues (bugs, security, performance)
|
|
630
774
|
- [ ] Extract repeated logic to custom hooks
|
|
631
775
|
- [ ] Optimize re-renders with useMemo/useCallback if needed
|
|
632
776
|
- [ ] Clean up unused imports
|
|
@@ -634,13 +778,14 @@ Refactoring checklist:
|
|
|
634
778
|
- [ ] Add JSDoc comments to exported functions
|
|
635
779
|
|
|
636
780
|
Run tests after each refactor:
|
|
781
|
+
|
|
637
782
|
```bash
|
|
638
783
|
pnpm test src/components/[Name]
|
|
639
784
|
```
|
|
640
785
|
|
|
641
786
|
---
|
|
642
787
|
|
|
643
|
-
## Phase
|
|
788
|
+
## Phase 13: DOCUMENTATION
|
|
644
789
|
|
|
645
790
|
**Goal:** Complete all documentation
|
|
646
791
|
|
|
@@ -651,7 +796,8 @@ Ensure `tags: ['autodocs']` is set in story meta.
|
|
|
651
796
|
### JSDoc Comments
|
|
652
797
|
|
|
653
798
|
Add to component file:
|
|
654
|
-
|
|
799
|
+
|
|
800
|
+
````typescript
|
|
655
801
|
/**
|
|
656
802
|
* [Name] component - [Brief description]
|
|
657
803
|
*
|
|
@@ -662,11 +808,12 @@ Add to component file:
|
|
|
662
808
|
* </[Name]>
|
|
663
809
|
* ```
|
|
664
810
|
*/
|
|
665
|
-
|
|
811
|
+
````
|
|
666
812
|
|
|
667
813
|
### Registry Entry
|
|
668
814
|
|
|
669
815
|
Update `.claude/registry.json`:
|
|
816
|
+
|
|
670
817
|
```json
|
|
671
818
|
{
|
|
672
819
|
"components": {
|
|
@@ -688,6 +835,7 @@ Update `.claude/registry.json`:
|
|
|
688
835
|
```
|
|
689
836
|
|
|
690
837
|
Present checklist:
|
|
838
|
+
|
|
691
839
|
```
|
|
692
840
|
Phase 12: DOCUMENTATION
|
|
693
841
|
|
|
@@ -703,7 +851,7 @@ Documentation complete?
|
|
|
703
851
|
|
|
704
852
|
---
|
|
705
853
|
|
|
706
|
-
## Phase
|
|
854
|
+
## Phase 14: COMPLETION
|
|
707
855
|
|
|
708
856
|
**Goal:** Final output and continuation prompt
|
|
709
857
|
|
|
@@ -721,9 +869,11 @@ Created Files:
|
|
|
721
869
|
- src/components/[Name]/[Name].types.ts
|
|
722
870
|
- src/components/[Name]/[Name].stories.tsx
|
|
723
871
|
- src/components/[Name]/__tests__/[Name].test.tsx
|
|
872
|
+
- src/components/[Name]/__tests__/[Name].visual.spec.ts
|
|
724
873
|
- src/components/[Name]/index.ts
|
|
725
874
|
|
|
726
875
|
Tests: All passed (ran during Phase 8-9)
|
|
876
|
+
Visual: Playwright screenshots captured (Phase 10)
|
|
727
877
|
A11y: WCAG 2.1 AA compliant
|
|
728
878
|
Brand: Matches .claude/BRAND_GUIDE.md
|
|
729
879
|
|
|
@@ -753,7 +903,7 @@ Update state: `phases.completion.status = "complete"`
|
|
|
753
903
|
|
|
754
904
|
---
|
|
755
905
|
|
|
756
|
-
# Page Mode (
|
|
906
|
+
# Page Mode (14 Phases)
|
|
757
907
|
|
|
758
908
|
Similar flow with these differences:
|
|
759
909
|
|
|
@@ -791,7 +941,10 @@ See full page mode documentation in `/hustle-ui-create-page.md` (if implementing
|
|
|
791
941
|
"phases": {
|
|
792
942
|
"disambiguation": { "status": "complete" },
|
|
793
943
|
"scope": { "status": "complete" },
|
|
794
|
-
"design_research": {
|
|
944
|
+
"design_research": {
|
|
945
|
+
"status": "complete",
|
|
946
|
+
"brand_guide_applied": true
|
|
947
|
+
},
|
|
795
948
|
"interview": { "status": "complete", "decisions": {} },
|
|
796
949
|
"component_analysis": { "status": "complete", "dependencies": [] },
|
|
797
950
|
"props_schema": { "status": "complete", "schema_file": "..." },
|
|
@@ -821,5 +974,5 @@ See full page mode documentation in `/hustle-ui-create-page.md` (if implementing
|
|
|
821
974
|
|
|
822
975
|
---
|
|
823
976
|
|
|
824
|
-
**Version:** 3.
|
|
825
|
-
**Last Updated:** 2025-12-
|
|
977
|
+
**Version:** 3.11.0
|
|
978
|
+
**Last Updated:** 2025-12-28
|
package/commands/issue.md
CHANGED
|
@@ -24,7 +24,7 @@ Process:
|
|
|
24
24
|
|
|
25
25
|
1. Fetch Issue
|
|
26
26
|
|
|
27
|
-
Try to fetch the issue using GitHub MCP (
|
|
27
|
+
Try to fetch the issue using GitHub MCP (mcp**github**issue_read tool).
|
|
28
28
|
|
|
29
29
|
If GitHub MCP is not configured, show:
|
|
30
30
|
|
|
@@ -74,7 +74,6 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
74
74
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
75
75
|
|
|
76
76
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
77
|
-
|
|
78
77
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
79
78
|
- Only one test at a time - this is critical for TDD discipline
|
|
80
79
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -84,7 +83,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
84
83
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
85
84
|
|
|
86
85
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
87
|
-
|
|
88
86
|
- Implement only what's needed for the current failing test
|
|
89
87
|
- No anticipatory coding or extra features
|
|
90
88
|
- Address the specific failure message
|
|
@@ -98,12 +96,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
98
96
|
### Core Violations
|
|
99
97
|
|
|
100
98
|
1. **Multiple Test Addition**
|
|
101
|
-
|
|
102
99
|
- Adding more than one new test at once
|
|
103
100
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
104
101
|
|
|
105
102
|
2. **Over-Implementation**
|
|
106
|
-
|
|
107
103
|
- Code that exceeds what's needed to pass the current failing test
|
|
108
104
|
- Adding untested features, methods, or error handling
|
|
109
105
|
- Implementing multiple methods when test only requires one
|
|
@@ -139,7 +135,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
135
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
140
136
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
141
137
|
|
|
142
|
-
|
|
143
138
|
## 🛡 Project Rules (Injected into every command)
|
|
144
139
|
|
|
145
140
|
1. **NO BROKEN BUILDS:**
|
|
@@ -164,7 +159,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
164
159
|
4. **API KEY MANAGEMENT:**
|
|
165
160
|
- Support three loading methods:
|
|
166
161
|
- Server environment variables
|
|
167
|
-
-
|
|
162
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
168
163
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
169
164
|
- Never hardcode API keys
|
|
170
165
|
- Always validate key availability before use
|
|
@@ -189,4 +184,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
189
184
|
- Code examples
|
|
190
185
|
- Testing notes
|
|
191
186
|
- Document expected behavior and edge cases
|
|
192
|
-
- Include real-world output examples
|
|
187
|
+
- Include real-world output examples
|
package/commands/plan.md
CHANGED
|
@@ -115,7 +115,6 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
115
115
|
- **Before /plan**: Use `/spike` if you need technical exploration first
|
|
116
116
|
- **After /plan**: Use `/red` to start TDD on first task
|
|
117
117
|
|
|
118
|
-
|
|
119
118
|
## 🛡 Project Rules (Injected into every command)
|
|
120
119
|
|
|
121
120
|
1. **NO BROKEN BUILDS:**
|
|
@@ -140,7 +139,7 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
140
139
|
4. **API KEY MANAGEMENT:**
|
|
141
140
|
- Support three loading methods:
|
|
142
141
|
- Server environment variables
|
|
143
|
-
-
|
|
142
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
144
143
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
145
144
|
- Never hardcode API keys
|
|
146
145
|
- Always validate key availability before use
|
|
@@ -165,4 +164,4 @@ Understand the requirement by asking (use AskUserQuestion if needed):
|
|
|
165
164
|
- Code examples
|
|
166
165
|
- Testing notes
|
|
167
166
|
- Document expected behavior and edge cases
|
|
168
|
-
- Include real-world output examples
|
|
167
|
+
- Include real-world output examples
|
package/commands/pr.md
CHANGED
|
@@ -69,7 +69,6 @@ Arguments: $ARGUMENTS
|
|
|
69
69
|
3. Set the base branch (default: main)
|
|
70
70
|
4. Include relevant issue references if found in commit messages
|
|
71
71
|
|
|
72
|
-
|
|
73
72
|
## 🛡 Project Rules (Injected into every command)
|
|
74
73
|
|
|
75
74
|
1. **NO BROKEN BUILDS:**
|
|
@@ -94,7 +93,7 @@ Arguments: $ARGUMENTS
|
|
|
94
93
|
4. **API KEY MANAGEMENT:**
|
|
95
94
|
- Support three loading methods:
|
|
96
95
|
- Server environment variables
|
|
97
|
-
-
|
|
96
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
98
97
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
99
98
|
- Never hardcode API keys
|
|
100
99
|
- Always validate key availability before use
|
|
@@ -119,4 +118,4 @@ Arguments: $ARGUMENTS
|
|
|
119
118
|
- Code examples
|
|
120
119
|
- Testing notes
|
|
121
120
|
- Document expected behavior and edge cases
|
|
122
|
-
- Include real-world output examples
|
|
121
|
+
- Include real-world output examples
|
package/commands/red.md
CHANGED
|
@@ -24,7 +24,6 @@ $ARGUMENTS
|
|
|
24
24
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
25
25
|
|
|
26
26
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
27
|
-
|
|
28
27
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
29
28
|
- Only one test at a time - this is critical for TDD discipline
|
|
30
29
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -34,7 +33,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
34
33
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
35
34
|
|
|
36
35
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
37
|
-
|
|
38
36
|
- Implement only what's needed for the current failing test
|
|
39
37
|
- No anticipatory coding or extra features
|
|
40
38
|
- Address the specific failure message
|
|
@@ -48,12 +46,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
48
46
|
### Core Violations
|
|
49
47
|
|
|
50
48
|
1. **Multiple Test Addition**
|
|
51
|
-
|
|
52
49
|
- Adding more than one new test at once
|
|
53
50
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
54
51
|
|
|
55
52
|
2. **Over-Implementation**
|
|
56
|
-
|
|
57
53
|
- Code that exceeds what's needed to pass the current failing test
|
|
58
54
|
- Adding untested features, methods, or error handling
|
|
59
55
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
90
86
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|
package/commands/refactor.md
CHANGED
|
@@ -22,7 +22,6 @@ Apply this document (specifically the Refactor phase), to the info given by user
|
|
|
22
22
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
23
23
|
|
|
24
24
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
25
|
-
|
|
26
25
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
27
26
|
- Only one test at a time - this is critical for TDD discipline
|
|
28
27
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -32,7 +31,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
32
31
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
33
32
|
|
|
34
33
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
35
|
-
|
|
36
34
|
- Implement only what's needed for the current failing test
|
|
37
35
|
- No anticipatory coding or extra features
|
|
38
36
|
- Address the specific failure message
|
|
@@ -46,12 +44,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
46
44
|
### Core Violations
|
|
47
45
|
|
|
48
46
|
1. **Multiple Test Addition**
|
|
49
|
-
|
|
50
47
|
- Adding more than one new test at once
|
|
51
48
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
52
49
|
|
|
53
50
|
2. **Over-Implementation**
|
|
54
|
-
|
|
55
51
|
- Code that exceeds what's needed to pass the current failing test
|
|
56
52
|
- Adding untested features, methods, or error handling
|
|
57
53
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
|
|
90
86
|
1. **Consistency check** - Look for inconsistent patterns, naming conventions, or structure across the codebase
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|
package/commands/spike.md
CHANGED
|
@@ -24,7 +24,6 @@ $ARGUMENTS
|
|
|
24
24
|
The foundation of TDD is the Red-Green-Refactor cycle:
|
|
25
25
|
|
|
26
26
|
1. **Red Phase**: Write ONE failing test that describes desired behavior
|
|
27
|
-
|
|
28
27
|
- The test must fail for the RIGHT reason (not syntax/import errors)
|
|
29
28
|
- Only one test at a time - this is critical for TDD discipline
|
|
30
29
|
- Exception: For browser-level tests or expensive setup (e.g., Storybook `*.stories.tsx`), group multiple assertions within a single test block to avoid redundant setup - but only when adding assertions to an existing interaction flow. If new user interactions are required, still create a new test. Split files by category if they exceed ~1000 lines.
|
|
@@ -34,7 +33,6 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
34
33
|
- Avoid hard-coded timeouts both in form of sleep() or timeout: 5000 etc; use proper async patterns (`waitFor`, `findBy*`, event-based sync) instead and rely on global test configs for timeout settings
|
|
35
34
|
|
|
36
35
|
2. **Green Phase**: Write MINIMAL code to make the test pass
|
|
37
|
-
|
|
38
36
|
- Implement only what's needed for the current failing test
|
|
39
37
|
- No anticipatory coding or extra features
|
|
40
38
|
- Address the specific failure message
|
|
@@ -48,12 +46,10 @@ The foundation of TDD is the Red-Green-Refactor cycle:
|
|
|
48
46
|
### Core Violations
|
|
49
47
|
|
|
50
48
|
1. **Multiple Test Addition**
|
|
51
|
-
|
|
52
49
|
- Adding more than one new test at once
|
|
53
50
|
- Exception: Initial test file setup or extracting shared test utilities
|
|
54
51
|
|
|
55
52
|
2. **Over-Implementation**
|
|
56
|
-
|
|
57
53
|
- Code that exceeds what's needed to pass the current failing test
|
|
58
54
|
- Adding untested features, methods, or error handling
|
|
59
55
|
- Implementing multiple methods when test only requires one
|
|
@@ -89,7 +85,6 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
89
85
|
- Adding types, interfaces, or a constant in order to replace magic values is perfectly fine during refactoring.
|
|
90
86
|
- Provide the agent with helpful directions so that they do not get stuck when blocking them.
|
|
91
87
|
|
|
92
|
-
|
|
93
88
|
## 🛡 Project Rules (Injected into every command)
|
|
94
89
|
|
|
95
90
|
1. **NO BROKEN BUILDS:**
|
|
@@ -114,7 +109,7 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
114
109
|
4. **API KEY MANAGEMENT:**
|
|
115
110
|
- Support three loading methods:
|
|
116
111
|
- Server environment variables
|
|
117
|
-
-
|
|
112
|
+
- NEXT*PUBLIC* variables (client-side)
|
|
118
113
|
- Custom headers (X-OpenAI-Key, X-Anthropic-Key, etc.)
|
|
119
114
|
- Never hardcode API keys
|
|
120
115
|
- Always validate key availability before use
|
|
@@ -139,4 +134,4 @@ This phase is **not part of the regular TDD workflow** and must only be applied
|
|
|
139
134
|
- Code examples
|
|
140
135
|
- Testing notes
|
|
141
136
|
- Document expected behavior and edge cases
|
|
142
|
-
- Include real-world output examples
|
|
137
|
+
- Include real-world output examples
|