@codihaus/claude-skills 1.0.0 → 1.3.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/knowledge/domains/_index.md +105 -0
- package/knowledge/domains/ecommerce/_index.md +499 -0
- package/knowledge/domains/saas/_index.md +371 -0
- package/knowledge/stacks/_index.md +101 -0
- package/knowledge/stacks/directus/_index.md +349 -0
- package/knowledge/stacks/nextjs/_index.md +654 -0
- package/knowledge/stacks/nuxt/_index.md +469 -0
- package/package.json +3 -1
- package/project-scripts/graph.py +330 -0
- package/skills/_registry.md +61 -0
- package/skills/dev-coding/SKILL.md +16 -5
- package/skills/dev-coding-backend/SKILL.md +116 -251
- package/skills/dev-coding-frontend/SKILL.md +134 -388
- package/skills/dev-review/SKILL.md +13 -2
- package/skills/dev-scout/SKILL.md +180 -2
- package/skills/dev-scout/references/stack-patterns.md +371 -0
- package/skills/dev-specs/SKILL.md +74 -2
- package/src/commands/init.js +89 -12
- package/src/utils/project-setup.js +444 -0
- package/src/utils/skills.js +87 -1
- /package/{skills/dev-coding-frontend/references/nextjs.md → knowledge/stacks/nextjs/references/performance.md} +0 -0
|
@@ -1,127 +1,106 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dev-coding-frontend
|
|
3
3
|
description: Frontend implementation patterns and workflows
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /dev-coding-frontend - Frontend Implementation
|
|
8
8
|
|
|
9
|
-
> **
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
> - **References**: Load tech-specific from `references/` (nextjs.md, vue.md, etc.)
|
|
13
|
-
> - **Before**: Backend API contract should be documented
|
|
14
|
-
> - **After**: `/dev-test` auto-runs to verify UI works
|
|
9
|
+
> **Loaded by**: `/dev-coding` when UI work needed
|
|
10
|
+
> **Tools**: shadcn MCP, Playwright, Context7
|
|
11
|
+
> **Before**: Backend API contract should be documented
|
|
15
12
|
|
|
16
|
-
Frontend-specific
|
|
13
|
+
Frontend-specific workflow for UI components, pages, and client-side logic.
|
|
17
14
|
|
|
18
|
-
##
|
|
15
|
+
## Knowledge Loading (CRITICAL)
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
- Spec requires UI components
|
|
22
|
-
- Spec requires pages/routes
|
|
23
|
-
- Spec requires client-side logic
|
|
17
|
+
Before implementing, load relevant knowledge:
|
|
24
18
|
|
|
25
|
-
|
|
19
|
+
```
|
|
20
|
+
1. Read stack.md → plans/scout/stack.md
|
|
21
|
+
→ Identify: Framework, UI library, state management
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
2. Load stack knowledge based on detected tech:
|
|
24
|
+
| If using... | Read... | Section |
|
|
25
|
+
|--------------|-----------------------------------|-------------------|
|
|
26
|
+
| Nuxt.js | knowledge/stacks/nuxt/_index.md | "For /dev-coding" |
|
|
27
|
+
| Next.js | knowledge/stacks/nextjs/_index.md | "For /dev-coding" |
|
|
28
|
+
| Directus | knowledge/stacks/directus/_index.md | "SDK Integration" |
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
3. Load domain knowledge (if applicable):
|
|
31
|
+
| If domain... | Read... | Section |
|
|
32
|
+
|--------------|-----------------------------------|-------------------|
|
|
33
|
+
| SaaS | knowledge/domains/saas/_index.md | UI patterns |
|
|
34
|
+
| E-commerce | knowledge/domains/ecommerce/_index.md | Checkout flows |
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
4. Use loaded knowledge for:
|
|
37
|
+
→ Correct data fetching (useFetch vs useEffect vs Server Component)
|
|
38
|
+
→ Framework-specific patterns (composables vs hooks)
|
|
39
|
+
→ Domain-specific UI flows
|
|
40
|
+
```
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- Auth required?
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
### Step 1: Extract Frontend Requirements
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
From UC spec, identify:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
[ ] Pages/Routes?
|
|
50
|
+
→ Path, layout, auth required?
|
|
51
|
+
|
|
52
|
+
[ ] Components?
|
|
53
|
+
→ New, modify existing, shared vs feature-specific
|
|
43
54
|
|
|
44
55
|
[ ] State management?
|
|
45
|
-
|
|
46
|
-
- Global state
|
|
47
|
-
- Server state (API data)
|
|
56
|
+
→ Local, global, server state
|
|
48
57
|
|
|
49
58
|
[ ] Forms?
|
|
50
|
-
|
|
51
|
-
- Validation rules
|
|
52
|
-
- Submit handling
|
|
59
|
+
→ Fields, validation, submit handling
|
|
53
60
|
|
|
54
61
|
[ ] API integration?
|
|
55
|
-
|
|
56
|
-
- Request/response handling
|
|
57
|
-
- Loading/error states
|
|
62
|
+
→ Endpoints, loading/error states
|
|
58
63
|
```
|
|
59
64
|
|
|
60
65
|
### Step 2: Review API Contract
|
|
61
66
|
|
|
62
|
-
|
|
67
|
+
From backend implementation:
|
|
63
68
|
|
|
64
69
|
```markdown
|
|
65
|
-
## Available API
|
|
66
|
-
|
|
67
|
-
From backend implementation notes:
|
|
68
|
-
|
|
69
70
|
### POST /api/auth/login
|
|
70
71
|
- Request: `{ email, password }`
|
|
71
72
|
- Response: `{ token, user }`
|
|
72
73
|
- Errors: 400 (validation), 401 (credentials)
|
|
73
74
|
```
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
Match component shapes to API.
|
|
76
77
|
|
|
77
78
|
### Step 3: Component Architecture
|
|
78
79
|
|
|
79
|
-
**
|
|
80
|
+
**Order:** Base components → Feature components → Pages
|
|
80
81
|
|
|
81
82
|
```
|
|
82
|
-
Feature component structure:
|
|
83
83
|
src/
|
|
84
84
|
├── components/
|
|
85
|
-
│ ├── ui/ # Shared
|
|
86
|
-
│ │ ├── Button.tsx
|
|
87
|
-
│ │ └── Input.tsx
|
|
85
|
+
│ ├── ui/ # Shared (Button, Input)
|
|
88
86
|
│ └── features/
|
|
89
|
-
│ └── auth/ # Feature-specific
|
|
90
|
-
│ ├── LoginForm.tsx
|
|
91
|
-
│ └── SignupForm.tsx
|
|
87
|
+
│ └── auth/ # Feature-specific (LoginForm)
|
|
92
88
|
├── app/ (or pages/)
|
|
93
|
-
│ └── login/
|
|
94
|
-
│ └── page.tsx # Page that uses LoginForm
|
|
89
|
+
│ └── login/page.tsx
|
|
95
90
|
```
|
|
96
91
|
|
|
97
|
-
**Follow project conventions**
|
|
98
|
-
- Where components live
|
|
99
|
-
- Naming pattern
|
|
100
|
-
- Export style
|
|
92
|
+
**Follow project conventions** from scout.
|
|
101
93
|
|
|
102
94
|
### Step 4: Build Components
|
|
103
95
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
1. Check if base components exist (Button, Input, etc.)
|
|
108
|
-
2. Create feature components
|
|
109
|
-
3. Create/modify pages
|
|
110
|
-
4. Wire up routing
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**Component Pattern:**
|
|
96
|
+
Essential component pattern:
|
|
114
97
|
|
|
115
98
|
```tsx
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
interface LoginFormProps {
|
|
120
|
-
onSuccess?: (user: User) => void;
|
|
121
|
-
redirectTo?: string;
|
|
99
|
+
interface Props {
|
|
100
|
+
onSuccess?: (data: Data) => void;
|
|
122
101
|
}
|
|
123
102
|
|
|
124
|
-
export function
|
|
103
|
+
export function FeatureForm({ onSuccess }: Props) {
|
|
125
104
|
const [isLoading, setIsLoading] = useState(false);
|
|
126
105
|
const [error, setError] = useState<string | null>(null);
|
|
127
106
|
|
|
@@ -131,9 +110,8 @@ export function LoginForm({ onSuccess, redirectTo = '/' }: LoginFormProps) {
|
|
|
131
110
|
setError(null);
|
|
132
111
|
|
|
133
112
|
try {
|
|
134
|
-
const result = await
|
|
135
|
-
onSuccess?.(result
|
|
136
|
-
router.push(redirectTo);
|
|
113
|
+
const result = await apiCall(formData);
|
|
114
|
+
onSuccess?.(result);
|
|
137
115
|
} catch (err) {
|
|
138
116
|
setError(err.message);
|
|
139
117
|
} finally {
|
|
@@ -146,389 +124,157 @@ export function LoginForm({ onSuccess, redirectTo = '/' }: LoginFormProps) {
|
|
|
146
124
|
{error && <Alert variant="error">{error}</Alert>}
|
|
147
125
|
{/* Form fields */}
|
|
148
126
|
<Button type="submit" disabled={isLoading}>
|
|
149
|
-
{isLoading ? 'Loading...' : '
|
|
127
|
+
{isLoading ? 'Loading...' : 'Submit'}
|
|
150
128
|
</Button>
|
|
151
129
|
</form>
|
|
152
130
|
);
|
|
153
131
|
}
|
|
154
132
|
```
|
|
155
133
|
|
|
156
|
-
### Step 5:
|
|
157
|
-
|
|
158
|
-
**Create API client functions:**
|
|
159
|
-
|
|
160
|
-
```typescript
|
|
161
|
-
// lib/api/auth.ts
|
|
162
|
-
export async function login(credentials: LoginCredentials) {
|
|
163
|
-
const response = await fetch('/api/auth/login', {
|
|
164
|
-
method: 'POST',
|
|
165
|
-
headers: { 'Content-Type': 'application/json' },
|
|
166
|
-
body: JSON.stringify(credentials),
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
if (!response.ok) {
|
|
170
|
-
const error = await response.json();
|
|
171
|
-
throw new Error(error.message || 'Login failed');
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
return response.json();
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
**Handle states:**
|
|
134
|
+
### Step 5: Handle States
|
|
179
135
|
|
|
180
136
|
```tsx
|
|
181
|
-
// Loading
|
|
137
|
+
// Loading
|
|
182
138
|
{isLoading && <Spinner />}
|
|
183
139
|
|
|
184
|
-
// Error
|
|
140
|
+
// Error
|
|
185
141
|
{error && <Alert variant="error">{error}</Alert>}
|
|
186
142
|
|
|
187
|
-
// Empty
|
|
188
|
-
{items.length === 0 && <EmptyState
|
|
189
|
-
|
|
190
|
-
// Success state
|
|
191
|
-
{items.map(item => <ItemCard key={item.id} item={item} />)}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### Step 6: Form Handling
|
|
143
|
+
// Empty
|
|
144
|
+
{items.length === 0 && <EmptyState />}
|
|
195
145
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
```tsx
|
|
199
|
-
// Client-side validation
|
|
200
|
-
const validateForm = (data: FormData) => {
|
|
201
|
-
const errors: Record<string, string> = {};
|
|
202
|
-
|
|
203
|
-
if (!data.email) {
|
|
204
|
-
errors.email = 'Email is required';
|
|
205
|
-
} else if (!isValidEmail(data.email)) {
|
|
206
|
-
errors.email = 'Invalid email format';
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
if (!data.password) {
|
|
210
|
-
errors.password = 'Password is required';
|
|
211
|
-
} else if (data.password.length < 8) {
|
|
212
|
-
errors.password = 'Password must be at least 8 characters';
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return errors;
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
// Show errors
|
|
219
|
-
{errors.email && <span className="error">{errors.email}</span>}
|
|
146
|
+
// Success
|
|
147
|
+
{items.map(item => <Card key={item.id} {...item} />)}
|
|
220
148
|
```
|
|
221
149
|
|
|
222
|
-
|
|
223
|
-
- react-hook-form
|
|
224
|
-
- formik
|
|
225
|
-
- native form handling
|
|
150
|
+
### Step 6: Verify
|
|
226
151
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
Before `/dev-test` auto-runs, do quick sanity checks:
|
|
230
|
-
|
|
231
|
-
**Visual verification:**
|
|
152
|
+
Quick sanity check before `/dev-test`:
|
|
232
153
|
|
|
233
154
|
```typescript
|
|
234
|
-
//
|
|
235
|
-
await mcp__playwright__browser_navigate({ url: 'http://localhost:3000/
|
|
155
|
+
// Visual snapshot
|
|
156
|
+
await mcp__playwright__browser_navigate({ url: 'http://localhost:3000/page' });
|
|
236
157
|
await mcp__playwright__browser_snapshot({});
|
|
237
|
-
|
|
238
|
-
// Option 2: Manual check
|
|
239
|
-
// Navigate to page in browser, verify appearance
|
|
240
158
|
```
|
|
241
159
|
|
|
242
|
-
**Quick checklist:**
|
|
243
160
|
```
|
|
244
161
|
[ ] Page renders without console errors
|
|
245
162
|
[ ] Components display correctly
|
|
246
163
|
[ ] Forms accept input
|
|
247
164
|
```
|
|
248
165
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
After frontend complete, `/dev-coding` auto-triggers `/dev-test` which:
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
1. Navigate to implemented page
|
|
255
|
-
2. Execute user flow from spec
|
|
256
|
-
3. Capture console errors
|
|
257
|
-
4. Capture network failures
|
|
258
|
-
5. Report issues or confirm pass
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
**What /dev-test catches:**
|
|
262
|
-
- Console errors (React errors, JS exceptions)
|
|
263
|
-
- Network failures (API 4xx/5xx, CORS, timeouts)
|
|
264
|
-
- Missing elements (render failures)
|
|
265
|
-
- Broken interactions (form submit, navigation)
|
|
266
|
-
|
|
267
|
-
**Verification checklist (covered by /dev-test):**
|
|
268
|
-
```
|
|
269
|
-
[auto] Page renders without errors
|
|
270
|
-
[auto] Console clean (no errors/warnings)
|
|
271
|
-
[auto] API calls succeed (2xx responses)
|
|
272
|
-
[auto] User flow completes
|
|
273
|
-
[ ] Mobile responsive (manual if required)
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
## Common Patterns
|
|
277
|
-
|
|
278
|
-
### Conditional Rendering
|
|
279
|
-
|
|
280
|
-
```tsx
|
|
281
|
-
// Auth guard
|
|
282
|
-
{isAuthenticated ? <Dashboard /> : <Redirect to="/login" />}
|
|
283
|
-
|
|
284
|
-
// Loading
|
|
285
|
-
{isLoading ? <Spinner /> : <Content />}
|
|
286
|
-
|
|
287
|
-
// Permission
|
|
288
|
-
{user.canEdit && <EditButton />}
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
### Data Fetching
|
|
292
|
-
|
|
293
|
-
```tsx
|
|
294
|
-
// Server component (Next.js App Router)
|
|
295
|
-
async function PostsPage() {
|
|
296
|
-
const posts = await getPosts(); // Fetches on server
|
|
297
|
-
return <PostList posts={posts} />;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
// Client component with useEffect
|
|
301
|
-
function PostsPage() {
|
|
302
|
-
const [posts, setPosts] = useState([]);
|
|
303
|
-
const [isLoading, setIsLoading] = useState(true);
|
|
304
|
-
|
|
305
|
-
useEffect(() => {
|
|
306
|
-
getPosts().then(setPosts).finally(() => setIsLoading(false));
|
|
307
|
-
}, []);
|
|
308
|
-
|
|
309
|
-
if (isLoading) return <Spinner />;
|
|
310
|
-
return <PostList posts={posts} />;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
// With SWR/React Query
|
|
314
|
-
function PostsPage() {
|
|
315
|
-
const { data: posts, error, isLoading } = useSWR('/api/posts', fetcher);
|
|
316
|
-
|
|
317
|
-
if (isLoading) return <Spinner />;
|
|
318
|
-
if (error) return <Error message={error.message} />;
|
|
319
|
-
return <PostList posts={posts} />;
|
|
320
|
-
}
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
### Navigation
|
|
324
|
-
|
|
325
|
-
```tsx
|
|
326
|
-
// Next.js
|
|
327
|
-
import { useRouter } from 'next/navigation';
|
|
328
|
-
const router = useRouter();
|
|
329
|
-
router.push('/dashboard');
|
|
330
|
-
|
|
331
|
-
// React Router
|
|
332
|
-
import { useNavigate } from 'react-router-dom';
|
|
333
|
-
const navigate = useNavigate();
|
|
334
|
-
navigate('/dashboard');
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### Toast/Notifications
|
|
338
|
-
|
|
339
|
-
```tsx
|
|
340
|
-
// Success feedback
|
|
341
|
-
toast.success('Saved successfully');
|
|
342
|
-
|
|
343
|
-
// Error feedback
|
|
344
|
-
toast.error('Failed to save. Please try again.');
|
|
345
|
-
|
|
346
|
-
// Use project's toast library (sonner, react-hot-toast, etc.)
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
## Accessibility Checklist
|
|
166
|
+
## Essential Checklists
|
|
350
167
|
|
|
168
|
+
### Accessibility
|
|
351
169
|
```
|
|
352
170
|
[ ] Images have alt text
|
|
353
171
|
[ ] Form inputs have labels
|
|
354
172
|
[ ] Buttons have accessible names
|
|
355
|
-
[ ] Color contrast sufficient
|
|
356
173
|
[ ] Keyboard navigation works
|
|
357
174
|
[ ] Focus states visible
|
|
358
|
-
[ ] Screen reader tested (if critical)
|
|
359
175
|
```
|
|
360
176
|
|
|
361
|
-
|
|
362
|
-
|
|
177
|
+
### Responsive
|
|
363
178
|
```
|
|
364
|
-
[ ] Mobile
|
|
365
|
-
[ ] Tablet
|
|
366
|
-
[ ] Desktop
|
|
367
|
-
[ ] Touch targets
|
|
368
|
-
[ ] No horizontal scroll on mobile
|
|
179
|
+
[ ] Mobile (< 768px)
|
|
180
|
+
[ ] Tablet (768px - 1024px)
|
|
181
|
+
[ ] Desktop (> 1024px)
|
|
182
|
+
[ ] Touch targets 44px minimum
|
|
369
183
|
```
|
|
370
184
|
|
|
371
|
-
## Debugging
|
|
372
|
-
|
|
373
|
-
### Component Not Rendering
|
|
185
|
+
## Quick Debugging
|
|
374
186
|
|
|
375
187
|
```bash
|
|
376
|
-
#
|
|
377
|
-
#
|
|
378
|
-
|
|
379
|
-
# Check if component imported correctly
|
|
380
|
-
# Check if props passed correctly
|
|
381
|
-
# Check conditional rendering logic
|
|
188
|
+
# Console errors → Browser DevTools
|
|
189
|
+
# Network failures → Network tab, check CORS
|
|
190
|
+
# Styling issues → Elements panel, check classes
|
|
382
191
|
```
|
|
383
192
|
|
|
384
|
-
### API Call Failing
|
|
385
|
-
|
|
386
|
-
```bash
|
|
387
|
-
# Check Network tab in DevTools
|
|
388
|
-
# Verify URL, method, headers
|
|
389
|
-
# Check CORS if cross-origin
|
|
390
|
-
# Verify backend is running
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
### Styling Issues
|
|
394
|
-
|
|
395
|
-
```bash
|
|
396
|
-
# Check if styles imported
|
|
397
|
-
# Check class names (typos)
|
|
398
|
-
# Check CSS specificity
|
|
399
|
-
# Check for conflicting styles
|
|
400
|
-
# Use DevTools Elements panel
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
### Using Playwright for Debug
|
|
404
|
-
|
|
405
193
|
```typescript
|
|
406
|
-
//
|
|
407
|
-
await
|
|
408
|
-
filename: 'debug-screenshot.png'
|
|
409
|
-
});
|
|
410
|
-
|
|
411
|
-
// Check console messages
|
|
412
|
-
await mcp__playwright__browser_console_messages({
|
|
413
|
-
level: 'error'
|
|
414
|
-
});
|
|
415
|
-
|
|
416
|
-
// Check network requests
|
|
194
|
+
// Playwright debugging
|
|
195
|
+
await mcp__playwright__browser_console_messages({ level: 'error' });
|
|
417
196
|
await mcp__playwright__browser_network_requests({});
|
|
197
|
+
await mcp__playwright__browser_take_screenshot({ filename: 'debug.png' });
|
|
418
198
|
```
|
|
419
199
|
|
|
420
|
-
##
|
|
421
|
-
|
|
422
|
-
Load additional patterns based on detected tech:
|
|
423
|
-
|
|
424
|
-
| Tech | Reference File |
|
|
425
|
-
|------|---------------|
|
|
426
|
-
| Next.js | `references/nextjs.md` |
|
|
427
|
-
| Vue | `references/vue.md` |
|
|
428
|
-
| React | `references/react.md` |
|
|
429
|
-
| shadcn/ui | `references/shadcn.md` |
|
|
430
|
-
| Tailwind | `references/tailwind.md` |
|
|
431
|
-
|
|
432
|
-
These files contain tech-specific patterns, gotchas, and best practices. Add them as your projects use different stacks.
|
|
433
|
-
|
|
434
|
-
## Tools
|
|
200
|
+
## Stack-Specific Patterns
|
|
435
201
|
|
|
436
|
-
|
|
202
|
+
**Do not implement generic patterns. Load from stacks/:**
|
|
437
203
|
|
|
438
|
-
|
|
204
|
+
| Stack | What to load | Key patterns |
|
|
205
|
+
|-------|--------------|--------------|
|
|
206
|
+
| Nuxt.js | `stacks/nuxt/` | Composables, useFetch, SSR |
|
|
207
|
+
| Next.js | `stacks/nextjs/` | Server Components, Actions |
|
|
208
|
+
| Vue | `stacks/vue/` (future) | Composition API, reactivity |
|
|
209
|
+
| React | `stacks/react/` (future) | Hooks, state patterns |
|
|
439
210
|
|
|
211
|
+
**Example - if using Nuxt:**
|
|
212
|
+
```
|
|
213
|
+
1. Read knowledge/stacks/nuxt/_index.md
|
|
214
|
+
2. Use useFetch (not raw fetch)
|
|
215
|
+
3. Use composables pattern
|
|
216
|
+
4. Handle SSR hydration
|
|
440
217
|
```
|
|
441
|
-
1. Check available components
|
|
442
|
-
→ mcp__shadcn__list_components
|
|
443
|
-
|
|
444
|
-
2. Get component source code
|
|
445
|
-
→ mcp__shadcn__get_component("button")
|
|
446
|
-
→ mcp__shadcn__get_component("dialog")
|
|
447
|
-
|
|
448
|
-
3. Get usage examples
|
|
449
|
-
→ mcp__shadcn__get_component_demo("button")
|
|
450
|
-
→ mcp__shadcn__get_component_demo("form")
|
|
451
218
|
|
|
452
|
-
|
|
453
|
-
→ mcp__shadcn__get_component_metadata("card")
|
|
219
|
+
## Domain-Specific UI
|
|
454
220
|
|
|
455
|
-
|
|
456
|
-
→ mcp__shadcn__list_blocks
|
|
457
|
-
→ mcp__shadcn__get_block("login-01")
|
|
458
|
-
→ mcp__shadcn__get_block("dashboard-01")
|
|
459
|
-
```
|
|
221
|
+
**Load from domains/ when applicable:**
|
|
460
222
|
|
|
461
|
-
|
|
223
|
+
| Domain | What to load | Key patterns |
|
|
224
|
+
|--------|--------------|--------------|
|
|
225
|
+
| SaaS | `domains/saas/_index.md` | Pricing tables, subscription UI |
|
|
226
|
+
| E-commerce | `domains/ecommerce/_index.md` | Cart, checkout, product cards |
|
|
462
227
|
|
|
463
|
-
|
|
464
|
-
1. Check if project uses shadcn/ui
|
|
465
|
-
→ Look for components.json
|
|
466
|
-
→ Look for @/components/ui/
|
|
467
|
-
|
|
468
|
-
2. If yes, use shadcn tools:
|
|
469
|
-
→ List available components
|
|
470
|
-
→ Get source for needed components
|
|
471
|
-
→ Get demos for usage patterns
|
|
472
|
-
→ Get blocks for complex layouts
|
|
473
|
-
|
|
474
|
-
3. Adapt to project's style
|
|
475
|
-
→ Check existing component customizations
|
|
476
|
-
→ Follow project's variant patterns
|
|
477
|
-
```
|
|
228
|
+
## Tools
|
|
478
229
|
|
|
479
|
-
|
|
230
|
+
### shadcn/ui Components
|
|
480
231
|
|
|
481
232
|
```
|
|
482
|
-
|
|
233
|
+
# List components
|
|
234
|
+
mcp__shadcn__list_components
|
|
483
235
|
|
|
484
|
-
|
|
485
|
-
|
|
236
|
+
# Get component source
|
|
237
|
+
mcp__shadcn__get_component("button")
|
|
486
238
|
|
|
487
|
-
|
|
488
|
-
|
|
239
|
+
# Get usage demo
|
|
240
|
+
mcp__shadcn__get_component_demo("form")
|
|
489
241
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
242
|
+
# Get pre-built blocks
|
|
243
|
+
mcp__shadcn__list_blocks
|
|
244
|
+
mcp__shadcn__get_block("login-01")
|
|
245
|
+
mcp__shadcn__get_block("dashboard-01")
|
|
493
246
|
```
|
|
494
247
|
|
|
495
|
-
|
|
248
|
+
**Workflow:**
|
|
249
|
+
1. Check if project uses shadcn (look for `components.json`)
|
|
250
|
+
2. List available components
|
|
251
|
+
3. Get demos for patterns
|
|
252
|
+
4. Adapt to project's API
|
|
496
253
|
|
|
497
|
-
|
|
254
|
+
### Playwright (Visual Verification)
|
|
498
255
|
|
|
499
256
|
```
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
# Get accessibility snapshot
|
|
504
|
-
mcp__playwright__browser_snapshot
|
|
505
|
-
|
|
506
|
-
# Check for console errors
|
|
257
|
+
mcp__playwright__browser_navigate({ url })
|
|
258
|
+
mcp__playwright__browser_snapshot({})
|
|
259
|
+
mcp__playwright__browser_take_screenshot({ filename })
|
|
507
260
|
mcp__playwright__browser_console_messages({ level: "error" })
|
|
508
|
-
|
|
509
|
-
# Verify network requests
|
|
510
|
-
mcp__playwright__browser_network_requests
|
|
261
|
+
mcp__playwright__browser_network_requests({})
|
|
511
262
|
```
|
|
512
263
|
|
|
513
|
-
### Context7 (Documentation
|
|
264
|
+
### Context7 (Documentation)
|
|
514
265
|
|
|
515
|
-
|
|
266
|
+
```typescript
|
|
267
|
+
// Find library
|
|
268
|
+
mcp__context7__resolve-library-id({
|
|
269
|
+
libraryName: "react-hook-form",
|
|
270
|
+
query: "form validation"
|
|
271
|
+
})
|
|
516
272
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
})
|
|
523
|
-
|
|
524
|
-
2. Query documentation
|
|
525
|
-
→ mcp__context7__query-docs({
|
|
526
|
-
libraryId: "/react-hook-form/react-hook-form",
|
|
527
|
-
query: "how to validate email field"
|
|
528
|
-
})
|
|
273
|
+
// Query docs
|
|
274
|
+
mcp__context7__query-docs({
|
|
275
|
+
libraryId: "/react-hook-form/react-hook-form",
|
|
276
|
+
query: "validate email field"
|
|
277
|
+
})
|
|
529
278
|
```
|
|
530
279
|
|
|
531
|
-
|
|
532
|
-
- Framework-specific patterns (Next.js, Vue, etc.)
|
|
533
|
-
- Library APIs (React Query, Zustand, etc.)
|
|
534
|
-
- CSS framework docs (Tailwind, etc.)
|
|
280
|
+
Use for: Framework patterns, library APIs, CSS framework docs.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dev-review
|
|
3
3
|
description: Code review with focus on quality, security, and best practices
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /dev-review - Code Review
|
|
@@ -84,7 +84,18 @@ Reviews can be based on:
|
|
|
84
84
|
→ CLAUDE.md
|
|
85
85
|
→ .eslintrc, tsconfig.json
|
|
86
86
|
|
|
87
|
-
3. Read
|
|
87
|
+
3. Read stack.md and stack knowledge
|
|
88
|
+
→ plans/scout/stack.md
|
|
89
|
+
→ Check "Stack Knowledge References" section
|
|
90
|
+
→ Read each referenced knowledge/stacks/*.md file
|
|
91
|
+
→ Use "For /dev-review" sections for review checklists
|
|
92
|
+
|
|
93
|
+
Examples:
|
|
94
|
+
- Directus project → Read knowledge/stacks/directus/_index.md
|
|
95
|
+
- Nuxt project → Read knowledge/stacks/nuxt/_index.md
|
|
96
|
+
- Next.js project → Read knowledge/stacks/nextjs/_index.md
|
|
97
|
+
|
|
98
|
+
4. Read related spec (if UC provided)
|
|
88
99
|
→ plans/features/{feature}/specs/{UC}/README.md
|
|
89
100
|
```
|
|
90
101
|
|