superkit-mcp-server 1.0.2 → 1.1.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.
- package/ARCHITECTURE.md +102 -102
- package/README.md +67 -63
- package/SUPERKIT.md +168 -168
- package/agents/code-archaeologist.md +106 -0
- package/agents/coder.md +90 -90
- package/agents/data-engineer.md +28 -28
- package/agents/devops-engineer.md +242 -0
- package/agents/git-manager.md +203 -203
- package/agents/orchestrator.md +4 -0
- package/agents/penetration-tester.md +188 -0
- package/agents/performance-optimizer.md +187 -0
- package/agents/planner.md +270 -270
- package/agents/qa-automation-engineer.md +103 -0
- package/agents/quant-developer.md +32 -28
- package/agents/reviewer.md +100 -100
- package/agents/scout.md +222 -222
- package/agents/tester.md +274 -274
- package/agents/ui-designer.md +208 -208
- package/build/index.js +53 -1
- package/build/tools/validators/__tests__/apiSchema.test.js +23 -23
- package/build/tools/validators/__tests__/convertRules.test.js +5 -5
- package/build/tools/validators/__tests__/frontendDesign.test.js +12 -12
- package/build/tools/validators/__tests__/geoChecker.test.js +19 -19
- package/build/tools/validators/__tests__/mobileAudit.test.js +12 -12
- package/build/tools/validators/__tests__/reactPerformanceChecker.test.js +17 -17
- package/build/tools/validators/__tests__/securityScan.test.js +6 -6
- package/build/tools/validators/__tests__/seoChecker.test.js +16 -16
- package/build/tools/validators/__tests__/typeCoverage.test.js +14 -14
- package/package.json +33 -33
- package/skills/meta/README.md +30 -30
- package/skills/meta/api-design/SKILL.md +134 -134
- package/skills/meta/code-review/SKILL.md +44 -37
- package/skills/meta/code-review/checklists/pre-merge.md +25 -25
- package/skills/meta/code-review/workflows/architecture-pass.md +26 -26
- package/skills/meta/code-review/workflows/performance-pass.md +27 -27
- package/skills/meta/code-review/workflows/security-pass.md +29 -29
- package/skills/meta/compound-docs/SKILL.md +133 -133
- package/skills/meta/debug/SKILL.md +40 -40
- package/skills/meta/debug/templates/bug-report.template.md +31 -31
- package/skills/meta/debug/workflows/reproduce-issue.md +20 -20
- package/skills/meta/docker/SKILL.md +126 -126
- package/skills/meta/examples/supabase/SKILL.md +46 -46
- package/skills/meta/examples/supabase/references/best-practices.md +319 -319
- package/skills/meta/examples/supabase/references/common-patterns.md +373 -373
- package/skills/meta/examples/supabase/templates/migration-template.sql +49 -49
- package/skills/meta/examples/supabase/templates/rls-policy-template.sql +77 -77
- package/skills/meta/examples/supabase/workflows/debugging.md +260 -260
- package/skills/meta/examples/supabase/workflows/migration-workflow.md +211 -211
- package/skills/meta/examples/supabase/workflows/rls-policies.md +244 -244
- package/skills/meta/examples/supabase/workflows/schema-design.md +321 -321
- package/skills/meta/file-todos/SKILL.md +88 -88
- package/skills/meta/mobile/SKILL.md +140 -140
- package/skills/meta/nextjs/SKILL.md +101 -101
- package/skills/meta/performance/SKILL.md +130 -130
- package/skills/meta/react-patterns/SKILL.md +83 -83
- package/skills/meta/security/SKILL.md +114 -114
- package/skills/meta/session-resume/SKILL.md +96 -96
- package/skills/meta/tailwind/SKILL.md +139 -139
- package/skills/meta/testing/SKILL.md +43 -43
- package/skills/meta/testing/references/vitest-patterns.md +45 -45
- package/skills/meta/testing/templates/component-test.template.tsx +37 -37
- package/skills/tech/alpha-vantage/SKILL.md +142 -0
- package/skills/tech/alpha-vantage/references/commodities.md +153 -0
- package/skills/tech/alpha-vantage/references/economic-indicators.md +158 -0
- package/skills/tech/alpha-vantage/references/forex-crypto.md +154 -0
- package/skills/tech/alpha-vantage/references/fundamentals.md +223 -0
- package/skills/tech/alpha-vantage/references/intelligence.md +138 -0
- package/skills/tech/alpha-vantage/references/options.md +93 -0
- package/skills/tech/alpha-vantage/references/technical-indicators.md +374 -0
- package/skills/tech/alpha-vantage/references/time-series.md +157 -0
- package/skills/tech/financial-modeling/SKILL.md +18 -0
- package/skills/tech/financial-modeling/skills/3-statements/SKILL.md +368 -0
- package/skills/tech/financial-modeling/skills/3-statements/references/formatting.md +118 -0
- package/skills/tech/financial-modeling/skills/3-statements/references/formulas.md +292 -0
- package/skills/tech/financial-modeling/skills/3-statements/references/sec-filings.md +125 -0
- package/skills/tech/financial-modeling/skills/dcf-model/SKILL.md +1211 -0
- package/skills/tech/financial-modeling/skills/dcf-model/TROUBLESHOOTING.md +40 -0
- package/skills/tech/financial-modeling/skills/dcf-model/requirements.txt +8 -0
- package/skills/tech/financial-modeling/skills/dcf-model/scripts/validate_dcf.py +292 -0
- package/skills/tech/financial-modeling/skills/lbo-model/SKILL.md +236 -0
- package/skills/tech/financial-modeling/skills/merger-model/SKILL.md +108 -0
- package/skills/tech/intelligent-routing/SKILL.md +5 -5
- package/workflows/README.md +191 -191
- package/workflows/adr.md +174 -174
- package/workflows/changelog.md +74 -74
- package/workflows/compound.md +323 -323
- package/workflows/compound_health.md +74 -74
- package/workflows/create-agent-skill.md +139 -139
- package/workflows/cycle.md +144 -144
- package/workflows/deploy-docs.md +84 -84
- package/workflows/development-rules.md +37 -37
- package/workflows/doc.md +95 -95
- package/workflows/documentation-management.md +29 -29
- package/workflows/explore.md +146 -146
- package/workflows/generate_command.md +106 -106
- package/workflows/heal-skill.md +97 -97
- package/workflows/housekeeping.md +229 -229
- package/workflows/kit-setup.md +102 -102
- package/workflows/map-codebase.md +78 -0
- package/workflows/orchestration-protocol.md +38 -38
- package/workflows/plan-compound.md +439 -433
- package/workflows/plan_review.md +269 -248
- package/workflows/primary-workflow.md +32 -32
- package/workflows/promote_pattern.md +86 -86
- package/workflows/release-docs.md +82 -82
- package/workflows/report-bug.md +135 -135
- package/workflows/reproduce-bug.md +118 -118
- package/workflows/resolve_pr.md +133 -133
- package/workflows/resolve_todo.md +128 -128
- package/workflows/review-compound.md +376 -359
- package/workflows/skill-review.md +127 -127
- package/workflows/specs.md +257 -257
- package/workflows/triage-sprint.md +102 -102
- package/workflows/triage.md +152 -152
- package/workflows/work.md +399 -399
- package/workflows/xcode-test.md +93 -93
package/agents/ui-designer.md
CHANGED
|
@@ -1,208 +1,208 @@
|
|
|
1
|
-
# UI/UX Designer Agent
|
|
2
|
-
|
|
3
|
-
## Role
|
|
4
|
-
Design user interface and experience.
|
|
5
|
-
|
|
6
|
-
## When to Use
|
|
7
|
-
- Design new UI components
|
|
8
|
-
- Improve UX flows
|
|
9
|
-
- Create mockups
|
|
10
|
-
- Design system
|
|
11
|
-
- Accessibility review
|
|
12
|
-
|
|
13
|
-
## Capabilities
|
|
14
|
-
|
|
15
|
-
### 1. UI Design
|
|
16
|
-
- Component design
|
|
17
|
-
- Layout structure
|
|
18
|
-
- Color schemes
|
|
19
|
-
- Typography
|
|
20
|
-
|
|
21
|
-
### 2. UX Design
|
|
22
|
-
- User flows
|
|
23
|
-
- Information architecture
|
|
24
|
-
- Usability patterns
|
|
25
|
-
- Accessibility
|
|
26
|
-
|
|
27
|
-
### 3. Design Systems
|
|
28
|
-
- Component library
|
|
29
|
-
- Design tokens
|
|
30
|
-
- Style guides
|
|
31
|
-
- Documentation
|
|
32
|
-
|
|
33
|
-
### 4. Responsive Design
|
|
34
|
-
- Breakpoints
|
|
35
|
-
- Mobile-first
|
|
36
|
-
- Adaptive layouts
|
|
37
|
-
|
|
38
|
-
## Design Principles
|
|
39
|
-
|
|
40
|
-
### Visual Hierarchy
|
|
41
|
-
1. Size (larger = more important)
|
|
42
|
-
2. Color (contrast draws attention)
|
|
43
|
-
3. Position (top-left = primary)
|
|
44
|
-
4. Spacing (grouping related items)
|
|
45
|
-
|
|
46
|
-
### Color Guidelines
|
|
47
|
-
```css
|
|
48
|
-
/* Primary palette */
|
|
49
|
-
--primary: #3B82F6;
|
|
50
|
-
--primary-dark: #2563EB;
|
|
51
|
-
--primary-light: #60A5FA;
|
|
52
|
-
|
|
53
|
-
/* Semantic colors */
|
|
54
|
-
--success: #10B981;
|
|
55
|
-
--warning: #F59E0B;
|
|
56
|
-
--error: #EF4444;
|
|
57
|
-
--info: #3B82F6;
|
|
58
|
-
|
|
59
|
-
/* Neutral */
|
|
60
|
-
--gray-50: #F9FAFB;
|
|
61
|
-
--gray-900: #111827;
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Typography Scale
|
|
65
|
-
```css
|
|
66
|
-
--text-xs: 0.75rem; /* 12px */
|
|
67
|
-
--text-sm: 0.875rem; /* 14px */
|
|
68
|
-
--text-base: 1rem; /* 16px */
|
|
69
|
-
--text-lg: 1.125rem; /* 18px */
|
|
70
|
-
--text-xl: 1.25rem; /* 20px */
|
|
71
|
-
--text-2xl: 1.5rem; /* 24px */
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Spacing Scale
|
|
75
|
-
```css
|
|
76
|
-
--space-1: 0.25rem; /* 4px */
|
|
77
|
-
--space-2: 0.5rem; /* 8px */
|
|
78
|
-
--space-4: 1rem; /* 16px */
|
|
79
|
-
--space-6: 1.5rem; /* 24px */
|
|
80
|
-
--space-8: 2rem; /* 32px */
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Accessibility Checklist
|
|
84
|
-
|
|
85
|
-
- [ ] Color contrast >= 4.5:1
|
|
86
|
-
- [ ] Focus indicators visible
|
|
87
|
-
- [ ] Alt text for images
|
|
88
|
-
- [ ] Keyboard navigation
|
|
89
|
-
- [ ] Screen reader compatible
|
|
90
|
-
- [ ] Touch targets >= 44px
|
|
91
|
-
|
|
92
|
-
## Component Patterns
|
|
93
|
-
|
|
94
|
-
### Button States
|
|
95
|
-
- Default
|
|
96
|
-
- Hover
|
|
97
|
-
- Active/Pressed
|
|
98
|
-
- Focused
|
|
99
|
-
- Disabled
|
|
100
|
-
- Loading
|
|
101
|
-
|
|
102
|
-
### Form Fields
|
|
103
|
-
- Label (required indicator)
|
|
104
|
-
- Input
|
|
105
|
-
- Helper text
|
|
106
|
-
- Error message
|
|
107
|
-
- Success state
|
|
108
|
-
|
|
109
|
-
## Dark Mode Guidelines
|
|
110
|
-
|
|
111
|
-
### CSS Variables Pattern
|
|
112
|
-
```css
|
|
113
|
-
:root {
|
|
114
|
-
/* Light mode (default) */
|
|
115
|
-
--bg-primary: #ffffff;
|
|
116
|
-
--bg-secondary: #f9fafb;
|
|
117
|
-
--text-primary: #111827;
|
|
118
|
-
--text-secondary: #6b7280;
|
|
119
|
-
--border: #e5e7eb;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
[data-theme="dark"] {
|
|
123
|
-
--bg-primary: #111827;
|
|
124
|
-
--bg-secondary: #1f2937;
|
|
125
|
-
--text-primary: #f9fafb;
|
|
126
|
-
--text-secondary: #9ca3af;
|
|
127
|
-
--border: #374151;
|
|
128
|
-
}
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Dark Mode Checklist
|
|
132
|
-
- [ ] All colors use CSS variables
|
|
133
|
-
- [ ] Images have dark variants or opacity
|
|
134
|
-
- [ ] Shadows reduced in dark mode
|
|
135
|
-
- [ ] Borders visible but subtle
|
|
136
|
-
- [ ] Focus states visible
|
|
137
|
-
- [ ] Charts/graphs adapted
|
|
138
|
-
|
|
139
|
-
### Theme Toggle
|
|
140
|
-
```typescript
|
|
141
|
-
function toggleTheme() {
|
|
142
|
-
const current = document.documentElement.dataset.theme;
|
|
143
|
-
document.documentElement.dataset.theme =
|
|
144
|
-
current === 'dark' ? 'light' : 'dark';
|
|
145
|
-
localStorage.setItem('theme', current === 'dark' ? 'light' : 'dark');
|
|
146
|
-
}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Animation/Motion Guidelines
|
|
150
|
-
|
|
151
|
-
### Animation Principles
|
|
152
|
-
| Principle | Description |
|
|
153
|
-
|-----------|-------------|
|
|
154
|
-
| Duration | 150-300ms for micro, 300-500ms for page |
|
|
155
|
-
| Easing | `ease-out` for enter, `ease-in` for exit |
|
|
156
|
-
| Purpose | Guide attention, provide feedback |
|
|
157
|
-
|
|
158
|
-
### Common Animations
|
|
159
|
-
```css
|
|
160
|
-
/* Fade in */
|
|
161
|
-
@keyframes fadeIn {
|
|
162
|
-
from { opacity: 0; }
|
|
163
|
-
to { opacity: 1; }
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/* Slide up */
|
|
167
|
-
@keyframes slideUp {
|
|
168
|
-
from { transform: translateY(10px); opacity: 0; }
|
|
169
|
-
to { transform: translateY(0); opacity: 1; }
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/* Scale */
|
|
173
|
-
@keyframes scaleIn {
|
|
174
|
-
from { transform: scale(0.95); opacity: 0; }
|
|
175
|
-
to { transform: scale(1); opacity: 1; }
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
### CSS Transition Utilities
|
|
180
|
-
```css
|
|
181
|
-
.transition-fast { transition: all 150ms ease-out; }
|
|
182
|
-
.transition-base { transition: all 200ms ease-out; }
|
|
183
|
-
.transition-slow { transition: all 300ms ease-out; }
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### Reduce Motion
|
|
187
|
-
```css
|
|
188
|
-
@media (prefers-reduced-motion: reduce) {
|
|
189
|
-
*, *::before, *::after {
|
|
190
|
-
animation-duration: 0.01ms !important;
|
|
191
|
-
transition-duration: 0.01ms !important;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
## Best Practices
|
|
197
|
-
1. Design for accessibility first
|
|
198
|
-
2. Use consistent spacing
|
|
199
|
-
3. Follow platform conventions
|
|
200
|
-
4. Test on real devices
|
|
201
|
-
5. Get user feedback
|
|
202
|
-
6. **Support dark mode from start**
|
|
203
|
-
7. **Respect prefers-reduced-motion**
|
|
204
|
-
|
|
205
|
-
## Related Agents
|
|
206
|
-
- **Coder** - implement designs
|
|
207
|
-
- **Fullstack Developer** - build complete UI
|
|
208
|
-
|
|
1
|
+
# UI/UX Designer Agent
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
Design user interface and experience.
|
|
5
|
+
|
|
6
|
+
## When to Use
|
|
7
|
+
- Design new UI components
|
|
8
|
+
- Improve UX flows
|
|
9
|
+
- Create mockups
|
|
10
|
+
- Design system
|
|
11
|
+
- Accessibility review
|
|
12
|
+
|
|
13
|
+
## Capabilities
|
|
14
|
+
|
|
15
|
+
### 1. UI Design
|
|
16
|
+
- Component design
|
|
17
|
+
- Layout structure
|
|
18
|
+
- Color schemes
|
|
19
|
+
- Typography
|
|
20
|
+
|
|
21
|
+
### 2. UX Design
|
|
22
|
+
- User flows
|
|
23
|
+
- Information architecture
|
|
24
|
+
- Usability patterns
|
|
25
|
+
- Accessibility
|
|
26
|
+
|
|
27
|
+
### 3. Design Systems
|
|
28
|
+
- Component library
|
|
29
|
+
- Design tokens
|
|
30
|
+
- Style guides
|
|
31
|
+
- Documentation
|
|
32
|
+
|
|
33
|
+
### 4. Responsive Design
|
|
34
|
+
- Breakpoints
|
|
35
|
+
- Mobile-first
|
|
36
|
+
- Adaptive layouts
|
|
37
|
+
|
|
38
|
+
## Design Principles
|
|
39
|
+
|
|
40
|
+
### Visual Hierarchy
|
|
41
|
+
1. Size (larger = more important)
|
|
42
|
+
2. Color (contrast draws attention)
|
|
43
|
+
3. Position (top-left = primary)
|
|
44
|
+
4. Spacing (grouping related items)
|
|
45
|
+
|
|
46
|
+
### Color Guidelines
|
|
47
|
+
```css
|
|
48
|
+
/* Primary palette */
|
|
49
|
+
--primary: #3B82F6;
|
|
50
|
+
--primary-dark: #2563EB;
|
|
51
|
+
--primary-light: #60A5FA;
|
|
52
|
+
|
|
53
|
+
/* Semantic colors */
|
|
54
|
+
--success: #10B981;
|
|
55
|
+
--warning: #F59E0B;
|
|
56
|
+
--error: #EF4444;
|
|
57
|
+
--info: #3B82F6;
|
|
58
|
+
|
|
59
|
+
/* Neutral */
|
|
60
|
+
--gray-50: #F9FAFB;
|
|
61
|
+
--gray-900: #111827;
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Typography Scale
|
|
65
|
+
```css
|
|
66
|
+
--text-xs: 0.75rem; /* 12px */
|
|
67
|
+
--text-sm: 0.875rem; /* 14px */
|
|
68
|
+
--text-base: 1rem; /* 16px */
|
|
69
|
+
--text-lg: 1.125rem; /* 18px */
|
|
70
|
+
--text-xl: 1.25rem; /* 20px */
|
|
71
|
+
--text-2xl: 1.5rem; /* 24px */
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Spacing Scale
|
|
75
|
+
```css
|
|
76
|
+
--space-1: 0.25rem; /* 4px */
|
|
77
|
+
--space-2: 0.5rem; /* 8px */
|
|
78
|
+
--space-4: 1rem; /* 16px */
|
|
79
|
+
--space-6: 1.5rem; /* 24px */
|
|
80
|
+
--space-8: 2rem; /* 32px */
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Accessibility Checklist
|
|
84
|
+
|
|
85
|
+
- [ ] Color contrast >= 4.5:1
|
|
86
|
+
- [ ] Focus indicators visible
|
|
87
|
+
- [ ] Alt text for images
|
|
88
|
+
- [ ] Keyboard navigation
|
|
89
|
+
- [ ] Screen reader compatible
|
|
90
|
+
- [ ] Touch targets >= 44px
|
|
91
|
+
|
|
92
|
+
## Component Patterns
|
|
93
|
+
|
|
94
|
+
### Button States
|
|
95
|
+
- Default
|
|
96
|
+
- Hover
|
|
97
|
+
- Active/Pressed
|
|
98
|
+
- Focused
|
|
99
|
+
- Disabled
|
|
100
|
+
- Loading
|
|
101
|
+
|
|
102
|
+
### Form Fields
|
|
103
|
+
- Label (required indicator)
|
|
104
|
+
- Input
|
|
105
|
+
- Helper text
|
|
106
|
+
- Error message
|
|
107
|
+
- Success state
|
|
108
|
+
|
|
109
|
+
## Dark Mode Guidelines
|
|
110
|
+
|
|
111
|
+
### CSS Variables Pattern
|
|
112
|
+
```css
|
|
113
|
+
:root {
|
|
114
|
+
/* Light mode (default) */
|
|
115
|
+
--bg-primary: #ffffff;
|
|
116
|
+
--bg-secondary: #f9fafb;
|
|
117
|
+
--text-primary: #111827;
|
|
118
|
+
--text-secondary: #6b7280;
|
|
119
|
+
--border: #e5e7eb;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[data-theme="dark"] {
|
|
123
|
+
--bg-primary: #111827;
|
|
124
|
+
--bg-secondary: #1f2937;
|
|
125
|
+
--text-primary: #f9fafb;
|
|
126
|
+
--text-secondary: #9ca3af;
|
|
127
|
+
--border: #374151;
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Dark Mode Checklist
|
|
132
|
+
- [ ] All colors use CSS variables
|
|
133
|
+
- [ ] Images have dark variants or opacity
|
|
134
|
+
- [ ] Shadows reduced in dark mode
|
|
135
|
+
- [ ] Borders visible but subtle
|
|
136
|
+
- [ ] Focus states visible
|
|
137
|
+
- [ ] Charts/graphs adapted
|
|
138
|
+
|
|
139
|
+
### Theme Toggle
|
|
140
|
+
```typescript
|
|
141
|
+
function toggleTheme() {
|
|
142
|
+
const current = document.documentElement.dataset.theme;
|
|
143
|
+
document.documentElement.dataset.theme =
|
|
144
|
+
current === 'dark' ? 'light' : 'dark';
|
|
145
|
+
localStorage.setItem('theme', current === 'dark' ? 'light' : 'dark');
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Animation/Motion Guidelines
|
|
150
|
+
|
|
151
|
+
### Animation Principles
|
|
152
|
+
| Principle | Description |
|
|
153
|
+
|-----------|-------------|
|
|
154
|
+
| Duration | 150-300ms for micro, 300-500ms for page |
|
|
155
|
+
| Easing | `ease-out` for enter, `ease-in` for exit |
|
|
156
|
+
| Purpose | Guide attention, provide feedback |
|
|
157
|
+
|
|
158
|
+
### Common Animations
|
|
159
|
+
```css
|
|
160
|
+
/* Fade in */
|
|
161
|
+
@keyframes fadeIn {
|
|
162
|
+
from { opacity: 0; }
|
|
163
|
+
to { opacity: 1; }
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Slide up */
|
|
167
|
+
@keyframes slideUp {
|
|
168
|
+
from { transform: translateY(10px); opacity: 0; }
|
|
169
|
+
to { transform: translateY(0); opacity: 1; }
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Scale */
|
|
173
|
+
@keyframes scaleIn {
|
|
174
|
+
from { transform: scale(0.95); opacity: 0; }
|
|
175
|
+
to { transform: scale(1); opacity: 1; }
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### CSS Transition Utilities
|
|
180
|
+
```css
|
|
181
|
+
.transition-fast { transition: all 150ms ease-out; }
|
|
182
|
+
.transition-base { transition: all 200ms ease-out; }
|
|
183
|
+
.transition-slow { transition: all 300ms ease-out; }
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Reduce Motion
|
|
187
|
+
```css
|
|
188
|
+
@media (prefers-reduced-motion: reduce) {
|
|
189
|
+
*, *::before, *::after {
|
|
190
|
+
animation-duration: 0.01ms !important;
|
|
191
|
+
transition-duration: 0.01ms !important;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Best Practices
|
|
197
|
+
1. Design for accessibility first
|
|
198
|
+
2. Use consistent spacing
|
|
199
|
+
3. Follow platform conventions
|
|
200
|
+
4. Test on real devices
|
|
201
|
+
5. Get user feedback
|
|
202
|
+
6. **Support dark mode from start**
|
|
203
|
+
7. **Respect prefers-reduced-motion**
|
|
204
|
+
|
|
205
|
+
## Related Agents
|
|
206
|
+
- **Coder** - implement designs
|
|
207
|
+
- **Fullstack Developer** - build complete UI
|
|
208
|
+
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
5
5
|
import * as path from "path";
|
|
6
6
|
import * as fs from "fs/promises";
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
@@ -18,6 +18,7 @@ const server = new Server({
|
|
|
18
18
|
}, {
|
|
19
19
|
capabilities: {
|
|
20
20
|
tools: {},
|
|
21
|
+
prompts: {},
|
|
21
22
|
},
|
|
22
23
|
});
|
|
23
24
|
// Helper function to read directory contents, tracking if they are directories or files
|
|
@@ -151,6 +152,57 @@ const TOOLS = [
|
|
|
151
152
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
152
153
|
return { tools: TOOLS };
|
|
153
154
|
});
|
|
155
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
156
|
+
try {
|
|
157
|
+
const workflowsPath = path.join(superKitRoot, "workflows");
|
|
158
|
+
const workflows = await fs.readdir(workflowsPath);
|
|
159
|
+
const prompts = [];
|
|
160
|
+
for (const file of workflows) {
|
|
161
|
+
if (file.endsWith(".md")) {
|
|
162
|
+
const filePath = path.join(workflowsPath, file);
|
|
163
|
+
const content = await fs.readFile(filePath, "utf-8");
|
|
164
|
+
const descriptionMatch = content.match(/description:\s*(.+)/);
|
|
165
|
+
const description = descriptionMatch ? descriptionMatch[1].trim() : `Workflow ${file}`;
|
|
166
|
+
prompts.push({
|
|
167
|
+
name: file.replace(".md", ""),
|
|
168
|
+
description: description,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return { prompts };
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
console.error("Error listing prompts:", err.message);
|
|
176
|
+
return { prompts: [] };
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
180
|
+
const promptName = request.params.name;
|
|
181
|
+
const workflowFile = `${promptName}.md`;
|
|
182
|
+
const basePath = path.join(superKitRoot, "workflows");
|
|
183
|
+
const safePath = getSafePath(basePath, workflowFile);
|
|
184
|
+
if (!safePath) {
|
|
185
|
+
throw new Error("Invalid prompt requested");
|
|
186
|
+
}
|
|
187
|
+
try {
|
|
188
|
+
const content = await fs.readFile(safePath, "utf-8");
|
|
189
|
+
return {
|
|
190
|
+
description: `Loaded workflow: ${promptName}`,
|
|
191
|
+
messages: [
|
|
192
|
+
{
|
|
193
|
+
role: "user",
|
|
194
|
+
content: {
|
|
195
|
+
type: "text",
|
|
196
|
+
text: content,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
],
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
throw new Error(`Prompt not found: ${promptName}`);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
154
206
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
155
207
|
try {
|
|
156
208
|
if (request.params.name === "call_tool_auto_preview") {
|
|
@@ -9,16 +9,16 @@ describe('schemaValidator', () => {
|
|
|
9
9
|
});
|
|
10
10
|
describe('validatePrismaSchema', () => {
|
|
11
11
|
it('should detect bad model names and missing fields', async () => {
|
|
12
|
-
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
13
|
-
model user {
|
|
14
|
-
name String
|
|
15
|
-
}
|
|
16
|
-
model Post {
|
|
17
|
-
id String @id
|
|
18
|
-
userId String
|
|
19
|
-
createdAt DateTime
|
|
20
|
-
}
|
|
21
|
-
enum role { ADMIN, USER }
|
|
12
|
+
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
13
|
+
model user {
|
|
14
|
+
name String
|
|
15
|
+
}
|
|
16
|
+
model Post {
|
|
17
|
+
id String @id
|
|
18
|
+
userId String
|
|
19
|
+
createdAt DateTime
|
|
20
|
+
}
|
|
21
|
+
enum role { ADMIN, USER }
|
|
22
22
|
`);
|
|
23
23
|
const issues = await validatePrismaSchema('/mock.prisma');
|
|
24
24
|
expect(issues.some(i => i.includes("Model 'user' should be PascalCase"))).toBe(true);
|
|
@@ -47,11 +47,11 @@ describe('apiValidator', () => {
|
|
|
47
47
|
});
|
|
48
48
|
describe('checkApiCode', () => {
|
|
49
49
|
it('should detect missing api practices', async () => {
|
|
50
|
-
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
51
|
-
function handler() {
|
|
52
|
-
// no try, no status, no security check
|
|
53
|
-
return "hello";
|
|
54
|
-
}
|
|
50
|
+
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
51
|
+
function handler() {
|
|
52
|
+
// no try, no status, no security check
|
|
53
|
+
return "hello";
|
|
54
|
+
}
|
|
55
55
|
`);
|
|
56
56
|
const res = await checkApiCode('route.ts');
|
|
57
57
|
expect(res.issues.some(i => i.includes('No error handling'))).toBe(true);
|
|
@@ -59,14 +59,14 @@ describe('apiValidator', () => {
|
|
|
59
59
|
expect(res.passed.length).toBe(0);
|
|
60
60
|
});
|
|
61
61
|
it('should pass good practices', async () => {
|
|
62
|
-
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
63
|
-
import { z } from 'zod';
|
|
64
|
-
function handler(req, res) {
|
|
65
|
-
try {
|
|
66
|
-
const jwtToken = "123";
|
|
67
|
-
return res.status(200).send("hello");
|
|
68
|
-
} catch(e) {}
|
|
69
|
-
}
|
|
62
|
+
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
63
|
+
import { z } from 'zod';
|
|
64
|
+
function handler(req, res) {
|
|
65
|
+
try {
|
|
66
|
+
const jwtToken = "123";
|
|
67
|
+
return res.status(200).send("hello");
|
|
68
|
+
} catch(e) {}
|
|
69
|
+
}
|
|
70
70
|
`);
|
|
71
71
|
const res = await checkApiCode('route.ts');
|
|
72
72
|
expect(res.passed.some(i => i.includes('Error handling'))).toBe(true);
|
|
@@ -15,11 +15,11 @@ describe('convertRules', () => {
|
|
|
15
15
|
it('should correctly parse frontmatter and generate rules', async () => {
|
|
16
16
|
vi.mocked(fs.stat).mockResolvedValue({ isDirectory: () => true });
|
|
17
17
|
vi.mocked(fs.readdir).mockResolvedValue(['async-waterfall.md']);
|
|
18
|
-
vi.mocked(fs.readFile).mockResolvedValue(`---
|
|
19
|
-
title: Waterfall check
|
|
20
|
-
impact: HIGH
|
|
21
|
-
tags: perf
|
|
22
|
-
---
|
|
18
|
+
vi.mocked(fs.readFile).mockResolvedValue(`---
|
|
19
|
+
title: Waterfall check
|
|
20
|
+
impact: HIGH
|
|
21
|
+
tags: perf
|
|
22
|
+
---
|
|
23
23
|
Content body of the rule here.`);
|
|
24
24
|
vi.mocked(fs.mkdir).mockResolvedValue(undefined);
|
|
25
25
|
vi.mocked(fs.writeFile).mockResolvedValue(undefined);
|
|
@@ -9,20 +9,20 @@ describe('accessibilityChecker', () => {
|
|
|
9
9
|
});
|
|
10
10
|
describe('checkAccessibility', () => {
|
|
11
11
|
it('should detect input without label and img without alt', async () => {
|
|
12
|
-
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
13
|
-
<input type="text" name="bad" />
|
|
14
|
-
<button>Click me</button>
|
|
12
|
+
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
13
|
+
<input type="text" name="bad" />
|
|
14
|
+
<button>Click me</button>
|
|
15
15
|
`);
|
|
16
16
|
const issues = await checkAccessibility('test.html');
|
|
17
17
|
expect(issues.some(i => i.includes('Input without label'))).toBe(true);
|
|
18
18
|
expect(issues.some(i => i.includes('Missing lang'))).toBe(false); // only checks if <html> exists
|
|
19
19
|
});
|
|
20
20
|
it('should pass good inputs', async () => {
|
|
21
|
-
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
22
|
-
<html lang="en">
|
|
23
|
-
<input type="text" aria-label="Good" />
|
|
24
|
-
<button aria-label="Close">X</button>
|
|
25
|
-
</html>
|
|
21
|
+
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
22
|
+
<html lang="en">
|
|
23
|
+
<input type="text" aria-label="Good" />
|
|
24
|
+
<button aria-label="Close">X</button>
|
|
25
|
+
</html>
|
|
26
26
|
`);
|
|
27
27
|
const issues = await checkAccessibility('test.html');
|
|
28
28
|
expect(issues).toEqual([]); // Skip link is only requested if <main> or <body> is present
|
|
@@ -39,10 +39,10 @@ describe('uxAudit', () => {
|
|
|
39
39
|
name: 'test.tsx',
|
|
40
40
|
isDirectory: () => false
|
|
41
41
|
}]);
|
|
42
|
-
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
43
|
-
<button onClick={() => {}}>Submit</button>
|
|
44
|
-
<img src="foo.jpg">
|
|
45
|
-
<p style="color: #000000; font-family: purple;">Hello</p>
|
|
42
|
+
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
43
|
+
<button onClick={() => {}}>Submit</button>
|
|
44
|
+
<img src="foo.jpg">
|
|
45
|
+
<p style="color: #000000; font-family: purple;">Hello</p>
|
|
46
46
|
`);
|
|
47
47
|
const res = await runUxAudit('.');
|
|
48
48
|
expect(res.passed).toBe(false);
|
|
@@ -8,21 +8,21 @@ describe('geoChecker', () => {
|
|
|
8
8
|
});
|
|
9
9
|
describe('checkGeoPage', () => {
|
|
10
10
|
it('should detect structured schema and H1s', async () => {
|
|
11
|
-
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
12
|
-
<html lang="en">
|
|
13
|
-
<head>
|
|
14
|
-
<script type="application/ld+json">
|
|
15
|
-
{
|
|
16
|
-
"@type": "Article",
|
|
17
|
-
"author": "Test Author"
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
</head>
|
|
21
|
-
<body>
|
|
22
|
-
<h1>Main Title</h1>
|
|
23
|
-
<p>Some content with numbers like 50% and $100.</p>
|
|
24
|
-
</body>
|
|
25
|
-
</html>
|
|
11
|
+
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
12
|
+
<html lang="en">
|
|
13
|
+
<head>
|
|
14
|
+
<script type="application/ld+json">
|
|
15
|
+
{
|
|
16
|
+
"@type": "Article",
|
|
17
|
+
"author": "Test Author"
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<h1>Main Title</h1>
|
|
23
|
+
<p>Some content with numbers like 50% and $100.</p>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
26
26
|
`);
|
|
27
27
|
const result = await checkGeoPage('/mock/page.html');
|
|
28
28
|
expect(result.passed.some(m => m.includes('JSON-LD structured data'))).toBe(true);
|
|
@@ -31,10 +31,10 @@ describe('geoChecker', () => {
|
|
|
31
31
|
expect(result.score).toBeGreaterThan(0);
|
|
32
32
|
});
|
|
33
33
|
it('should flag missing structural tags', async () => {
|
|
34
|
-
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
35
|
-
<body>
|
|
36
|
-
<p>No headings, no structure, no stats.</p>
|
|
37
|
-
</body>
|
|
34
|
+
vi.mocked(fs.readFile).mockResolvedValue(`
|
|
35
|
+
<body>
|
|
36
|
+
<p>No headings, no structure, no stats.</p>
|
|
37
|
+
</body>
|
|
38
38
|
`);
|
|
39
39
|
const result = await checkGeoPage('/mock/bad.html');
|
|
40
40
|
expect(result.issues.some(m => m.includes('No JSON-LD'))).toBe(true);
|