@hustle-together/api-dev-tools 3.12.3 → 4.5.1
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 +7 -463
- package/.claude/documentation-audit.json +114 -0
- package/.claude/registry.json +289 -0
- package/.claude/settings.json +45 -1
- 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 +116 -17
- package/.skills/api-research/SKILL.md +130 -0
- package/.skills/docs-sync/SKILL.md +260 -0
- package/.skills/docs-update/SKILL.md +205 -0
- package/.skills/hustle-brand/SKILL.md +368 -0
- package/.skills/hustle-build/SKILL.md +786 -0
- package/.skills/hustle-build-review/SKILL.md +518 -0
- 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 +575 -0
- package/README.md +426 -56
- package/bin/cli.js +1538 -88
- package/commands/hustle-api-create.md +22 -0
- package/commands/hustle-build.md +259 -0
- package/commands/hustle-combine.md +81 -2
- package/commands/hustle-ui-create-page.md +84 -2
- package/commands/hustle-ui-create.md +82 -2
- package/hooks/__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 +305 -0
- package/hooks/check-update.py +132 -0
- package/hooks/completion-promise-detector.py +293 -0
- package/hooks/context-capacity-warning.py +171 -0
- package/hooks/docs-update-check.py +120 -0
- package/hooks/enforce-dry-run.py +134 -0
- package/hooks/enforce-external-research.py +25 -0
- package/hooks/enforce-interview.py +20 -0
- package/hooks/generate-adr-options.py +282 -0
- package/hooks/hook_utils.py +609 -0
- package/hooks/lib/__pycache__/__init__.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/greptile.cpython-314.pyc +0 -0
- package/hooks/lib/__pycache__/ntfy.cpython-314.pyc +0 -0
- package/hooks/ntfy-on-question.py +240 -0
- package/hooks/orchestrator-completion.py +313 -0
- package/hooks/orchestrator-handoff.py +267 -0
- package/hooks/orchestrator-session-startup.py +146 -0
- package/hooks/parallel-orchestrator.py +451 -0
- package/hooks/periodic-reground.py +270 -67
- package/hooks/project-document-prompt.py +302 -0
- package/hooks/remote-question-proxy.py +284 -0
- package/hooks/remote-question-server.py +1224 -0
- package/hooks/run-code-review.py +176 -29
- package/hooks/run-visual-qa.py +338 -0
- package/hooks/session-logger.py +27 -1
- package/hooks/session-startup.py +113 -0
- package/hooks/update-adr-decision.py +236 -0
- package/hooks/update-api-showcase.py +13 -1
- package/hooks/update-testing-checklist.py +195 -0
- package/hooks/update-ui-showcase.py +13 -1
- package/package.json +7 -3
- package/scripts/extract-schema-docs.cjs +322 -0
- package/templates/.skills/hustle-interview/SKILL.md +174 -0
- package/templates/CLAUDE-SECTION.md +89 -64
- package/templates/adr-viewer/_components/ADRViewer.tsx +326 -0
- package/templates/api-dev-state.json +33 -1
- package/templates/api-showcase/_components/APIModal.tsx +100 -8
- package/templates/api-showcase/_components/APIShowcase.tsx +36 -4
- package/templates/api-showcase/_components/APITester.tsx +367 -58
- package/templates/brand-page/page.tsx +645 -0
- package/templates/component/Component.visual.spec.ts +30 -24
- package/templates/docs/page.tsx +230 -0
- 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 +136 -0
- package/templates/hustle-dev-dashboard/page.tsx +365 -0
- package/templates/page/page.e2e.test.ts +30 -26
- package/templates/performance-budgets.json +63 -5
- package/templates/playwright-report/page.tsx +258 -0
- package/templates/registry.json +279 -3
- package/templates/review-dashboard/page.tsx +510 -0
- package/templates/settings.json +155 -7
- package/templates/test-results/page.tsx +237 -0
- package/templates/typedoc.json +19 -0
- package/templates/ui-showcase/_components/UIShowcase.tsx +48 -1
- package/templates/ui-showcase/_components/VisualTestingDashboard.tsx +579 -0
- package/templates/ui-showcase/page.tsx +1 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-e2e
|
|
3
|
+
description: Run Playwright end-to-end tests with cross-browser reporting
|
|
4
|
+
tools: Bash, Read, Glob, TodoWrite
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Test E2E Skill
|
|
9
|
+
|
|
10
|
+
Run Playwright end-to-end tests across browsers with detailed reporting and failure analysis.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- After building a page or user flow
|
|
15
|
+
- Before deploying to staging
|
|
16
|
+
- When testing authentication flows
|
|
17
|
+
- To verify cross-browser compatibility
|
|
18
|
+
|
|
19
|
+
## Execution Steps
|
|
20
|
+
|
|
21
|
+
### Step 1: Check Playwright Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Verify Playwright is installed
|
|
25
|
+
npx playwright --version
|
|
26
|
+
|
|
27
|
+
# Check for playwright.config.ts
|
|
28
|
+
ls playwright.config.* 2>/dev/null
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Step 2: Start Test Server (if needed)
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Check if dev server is needed
|
|
35
|
+
# Many Playwright configs have webServer configured
|
|
36
|
+
cat playwright.config.ts | grep -A10 "webServer"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Step 3: Run E2E Tests
|
|
40
|
+
|
|
41
|
+
Execute Playwright tests:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Run all E2E tests
|
|
45
|
+
npx playwright test
|
|
46
|
+
|
|
47
|
+
# Run specific test file
|
|
48
|
+
npx playwright test tests/dashboard.spec.ts
|
|
49
|
+
|
|
50
|
+
# Run in headed mode (visible browser)
|
|
51
|
+
npx playwright test --headed
|
|
52
|
+
|
|
53
|
+
# Run specific browser
|
|
54
|
+
npx playwright test --project=chromium
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Step 4: Handle Failures
|
|
58
|
+
|
|
59
|
+
If tests fail, gather debugging info:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Show HTML report
|
|
63
|
+
npx playwright show-report
|
|
64
|
+
|
|
65
|
+
# Get trace for failed tests
|
|
66
|
+
# Traces are in test-results/
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Provide actionable feedback:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
❌ E2E Test Failures
|
|
73
|
+
|
|
74
|
+
1. tests/auth.spec.ts:24
|
|
75
|
+
Test: "should redirect to dashboard after login"
|
|
76
|
+
|
|
77
|
+
Issue: Timeout waiting for navigation
|
|
78
|
+
|
|
79
|
+
Screenshot: test-results/auth-should-redirect.png
|
|
80
|
+
Trace: test-results/auth-should-redirect/trace.zip
|
|
81
|
+
|
|
82
|
+
Suggested Fix:
|
|
83
|
+
- Check if login API is returning correctly
|
|
84
|
+
- Verify redirect URL is correct
|
|
85
|
+
- Increase timeout if server is slow
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Step 5: Cross-Browser Summary
|
|
89
|
+
|
|
90
|
+
Report results per browser:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Cross-Browser Results:
|
|
94
|
+
───────────────────────────────────
|
|
95
|
+
Browser | Passed | Failed | Skipped
|
|
96
|
+
───────────────────────────────────
|
|
97
|
+
Chromium | 24 | 0 | 0
|
|
98
|
+
Firefox | 24 | 0 | 0
|
|
99
|
+
WebKit | 23 | 1 | 0
|
|
100
|
+
Mobile Chrome| 22 | 2 | 0
|
|
101
|
+
───────────────────────────────────
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Viewport Testing
|
|
105
|
+
|
|
106
|
+
Run tests across 7 viewports:
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
const viewports = [
|
|
110
|
+
{ name: 'mobile-portrait', width: 375, height: 667 },
|
|
111
|
+
{ name: 'mobile-notch', width: 393, height: 852 },
|
|
112
|
+
{ name: 'mobile-landscape', width: 667, height: 375 },
|
|
113
|
+
{ name: 'tablet-portrait', width: 768, height: 1024 },
|
|
114
|
+
{ name: 'tablet-landscape', width: 1024, height: 768 },
|
|
115
|
+
{ name: 'small-desktop', width: 1280, height: 720 },
|
|
116
|
+
{ name: 'desktop', width: 1920, height: 1080 },
|
|
117
|
+
];
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Arguments
|
|
121
|
+
|
|
122
|
+
| Argument | Description | Default |
|
|
123
|
+
|----------|-------------|---------|
|
|
124
|
+
| `[pattern]` | Test file pattern | All tests |
|
|
125
|
+
| `--headed` | Run in visible browser | false |
|
|
126
|
+
| `--project` | Specific browser | All browsers |
|
|
127
|
+
| `--debug` | Enable debug mode | false |
|
|
128
|
+
| `--ui` | Open Playwright UI | false |
|
|
129
|
+
|
|
130
|
+
## Examples
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Run all E2E tests
|
|
134
|
+
/test-e2e
|
|
135
|
+
|
|
136
|
+
# Run auth tests only
|
|
137
|
+
/test-e2e auth
|
|
138
|
+
|
|
139
|
+
# Debug mode with visible browser
|
|
140
|
+
/test-e2e --headed --debug
|
|
141
|
+
|
|
142
|
+
# Chrome only
|
|
143
|
+
/test-e2e --project=chromium
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Output Format
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
═══════════════════════════════════════
|
|
150
|
+
E2E Test Results: ✅ PASS / ❌ FAIL
|
|
151
|
+
═══════════════════════════════════════
|
|
152
|
+
Tests: 96 passed, 0 failed (4 browsers)
|
|
153
|
+
Duration: 45s
|
|
154
|
+
Report: test-results/playwright-report/
|
|
155
|
+
═══════════════════════════════════════
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Integration with Page Workflow
|
|
159
|
+
|
|
160
|
+
This skill is automatically invoked during:
|
|
161
|
+
- `/hustle-ui-create-page` Phase 10 (Verification)
|
|
162
|
+
- Before PR creation
|
|
163
|
+
|
|
164
|
+
## See Also
|
|
165
|
+
|
|
166
|
+
- `/test-unit` - Unit tests
|
|
167
|
+
- `/test-visual` - Visual regression
|
|
168
|
+
- `/test-debug` - Debug failing tests
|