start-vibing 3.0.10 → 4.0.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.
@@ -1,901 +1,367 @@
1
- # Claude Development System - Agent Context
2
-
3
- This file provides detailed context for the development system. For user-facing project rules, see `/CLAUDE.md`.
4
-
5
- ---
6
-
7
- ## System Architecture
8
-
9
- ```
10
- .claude/
11
- ├── agents/ # 6 active subagents (flat structure)
12
- ├── skills/ # 26 skill systems with cache
13
- ├── scripts/ # Utility scripts (validate-skills.sh)
14
- ├── config/ # Project-specific configuration
15
- └── commands/ # Slash commands (feature, fix, research, validate)
16
- ```
17
-
18
- ---
19
-
20
- ## Agents (6 Active Subagents)
21
-
22
- | Agent | Model | Color | Purpose |
23
- |-------|-------|-------|---------|
24
- | **research-web** | sonnet | cyan | Researches best practices (2024-2026) before implementing new features |
25
- | **documenter** | sonnet | blue | Maps files to domains, creates/updates domain documentation |
26
- | **domain-updater** | haiku | purple | Records problems, solutions, gotchas in existing domain files |
27
- | **commit-manager** | haiku | green | Manages git commits, conventional format, workflow completion |
28
- | **claude-md-compactor** | sonnet | orange | Compacts CLAUDE.md when it exceeds 40k chars |
29
- | **tester-unit** | sonnet | yellow | Creates unit tests with Vitest for new functions and utilities |
30
-
31
- ### Agent -> Skill Mapping
32
-
33
- | Agent | Primary Skill | Secondary |
34
- |-------|---------------|-----------|
35
- | research-web | research-cache | codebase-knowledge |
36
- | documenter | docs-tracker | codebase-knowledge |
37
- | domain-updater | codebase-knowledge | docs-tracker |
38
- | commit-manager | workflow-state | docs-tracker |
39
- | claude-md-compactor | - | - |
40
- | tester-unit | test-coverage | - |
41
-
42
- ### Agent Workflow Order
43
-
44
- ```
45
- implement -> quality gates -> domain-updater -> commit-manager -> complete
46
- ```
47
-
48
- ---
49
-
50
- ## Skills (26 Active)
51
-
52
- Skills are auto-injected into context when the task matches their description. All use the imperative pattern for 95%+ auto-invocation.
53
-
54
- ### Development Skills
55
-
56
- | Skill | Trigger | Description |
57
- |-------|---------|-------------|
58
- | **bun-runtime** | Bun scripts, packages, bundling | Runtime patterns and best practices |
59
- | **typescript-strict** | Writing/editing .ts/.tsx files | Strict mode: index access, null checks, generics |
60
- | **react-patterns** | React components, hooks, state | React 19 patterns and best practices |
61
- | **nextjs-app-router** | Next.js pages, layouts, server components | App Router patterns, data fetching |
62
- | **trpc-api** | tRPC routers, procedures, middleware | Type-safe API patterns |
63
- | **zod-validation** | User input, API params, form data | Zod schemas, type inference |
64
- | **shadcn-ui** | shadcn/ui components | Theming, accessibility, customization |
65
- | **tailwind-patterns** | Tailwind CSS classes | Responsive, dark mode, animations |
66
-
67
- ### Quality & Testing Skills
68
-
69
- | Skill | Trigger | Description |
70
- |-------|---------|-------------|
71
- | **quality-gate** | Before any commit | Runs typecheck, lint, test, build in sequence |
72
- | **security-scan** | API, auth, user data code | OWASP Top 10, Zod validation (HAS VETO POWER) |
73
- | **test-coverage** | After implementing features | Creates Vitest unit + Playwright E2E tests |
74
- | **final-check** | Before completing any task | Validates skills used, docs updated (HAS VETO POWER) |
75
- | **playwright-testing** | Playwright E2E tests | Page Objects, fixtures, multi-viewport patterns |
76
- | **test-infrastructure** | Test configs, data factories | Vitest config, MongoMemoryServer, cleanup |
77
-
78
- ### Database Skills
79
-
80
- | Skill | Trigger | Description |
81
- |-------|---------|-------------|
82
- | **mongoose-patterns** | Mongoose models, queries, DB ops | Schema template, ESR indexes, aggregation, seeders |
83
-
84
- ### Infrastructure & DevOps Skills
85
-
86
- | Skill | Trigger | Description |
87
- |-------|---------|-------------|
88
- | **docker-patterns** | Dockerfile, docker-compose | Multi-stage builds, security patterns |
89
- | **git-workflow** | Git operations | Commit, branch, merge workflow rules |
90
- | **performance-patterns** | Slow app, optimization needed | React renders, bundle size, memory leaks |
91
- | **debugging-patterns** | Errors, stack traces, bugs | Runtime, build, and network error resolution |
92
-
93
- ### Documentation & Research Skills
94
-
95
- | Skill | Trigger | Description |
96
- |-------|---------|-------------|
97
- | **codebase-knowledge** | Before implementing features | Maps files by domain, tracks connections |
98
- | **docs-tracker** | After implementation | Detects modified files, creates/updates docs |
99
- | **research-cache** | Before web research | Checks cached findings to avoid redundant searches |
100
- | **ui-ux-audit** | Before UI features | Competitors, WCAG 2.1, responsiveness |
101
- | **api-docs** | After API/function changes | API docs, JSDoc, changelog management |
102
-
103
- ### Meta & SEO Skills
104
-
105
- | Skill | Trigger | Description |
106
- |-------|---------|-------------|
107
- | **skill-creator** | Creating/editing skills | Interview, draft, test, iterate loop (from anthropics/skills) |
108
- | **claude-seo** | SEO analysis, audits, sitemaps | Full SEO suite with health scoring (from AgriciDaniel/claude-seo) |
109
-
110
- ---
111
-
112
- ## Plugins (5 via enabledPlugins)
113
-
114
- Plugins are auto-installed via `enabledPlugins` in settings.json. They replaced archived agents.
115
-
116
- | Plugin | Mechanism | Purpose | Replaces |
117
- |--------|-----------|---------|----------|
118
- | **typescript-lsp** | LSP server (auto) | Type diagnostics, go-to-def | ts-strict-checker agent |
119
- | **security-guidance** | PreToolUse hook (auto) | OWASP, vulnerability scan | security-auditor agent |
120
- | **code-review** | `/code-review` command | Code quality, PR analysis | code-reviewer agent |
121
- | **commit-commands** | `/commit` command | Git commit, push, PR flows | commit-manager (PR part) |
122
- | **frontend-design** | `/frontend-design` command | Production-grade UI design | ui-ux-reviewer agent |
123
-
124
- ---
125
-
126
- ## UI/UX Development (Mandatory Review Process)
127
-
128
- Any task that touches UI code (`.tsx`, `.jsx`, components, pages, layouts) requires:
129
-
130
- ### Required Tools
131
-
132
- | Tool | Purpose | When |
133
- |------|---------|------|
134
- | **`/frontend-design` plugin** | Production-grade UI design with high design quality | Before implementing ANY UI feature |
135
- | **ui-ux-audit skill** | Competitor research, WCAG 2.1 accessibility, responsive audit | Before UI implementation |
136
- | **Playwright MCP** | Visual verification across viewports (375px, 768px, 1280px+) | After UI implementation |
137
-
138
- ### UI Review Workflow
139
-
140
- ```
141
- 1. Research competitors (ui-ux-audit skill)
142
- 2. Design with /frontend-design plugin
143
- 3. Implement separate layouts for mobile/tablet/desktop
144
- 4. Verify with Playwright MCP (all 3 viewports)
145
- 5. Validate WCAG 2.1 accessibility
146
- ```
147
-
148
- ### Platform-Specific UIs (NOT just responsive)
149
-
150
- | Platform | Layout |
151
- | ----------------- | ------------------------------------------- |
152
- | Mobile (375px) | Full-screen modals, bottom nav, touch-first |
153
- | Tablet (768px) | Condensed dropdowns, hybrid nav |
154
- | Desktop (1280px+) | Sidebar left, top navbar with search |
155
-
156
- > Never use "responsive-only" design. Build separate UI layouts per platform.
157
-
158
- ---
159
-
160
- ## MCP Servers (Strict Usage Rules)
161
-
162
- ### Required MCPs (ALWAYS use these)
163
-
164
- | Server | Purpose | When to Use |
165
- |--------|---------|-------------|
166
- | `context7` | Up-to-date library documentation | **ALWAYS** before implementing with ANY library. Never assume docs -- always query. |
167
- | `sequential-thinking` | Structured reasoning and planning | **ALWAYS** for multi-step tasks, architecture decisions, debugging complex issues, and planning implementations. Use before writing code for non-trivial features. |
168
- | `playwright` | Browser automation and E2E testing | **ALWAYS** for UI verification, E2E tests, and visual validation. Uses `--user-data-dir` for persistent sessions. Every UI change must be tested in browser. |
169
-
170
- > These 3 MCPs are **non-negotiable**. Skipping them leads to outdated code, poor planning, and untested UIs.
171
-
172
- ### Standard MCPs
173
-
174
- | Server | Purpose | When to Use |
175
- |--------|---------|-------------|
176
- | `memory` | Persistent knowledge graph | Store/recall project patterns across sessions |
177
- | `nextjs-devtools` | Next.js development tools | Next.js projects (runtime errors, routes, cache) |
178
- | `mongodb` | MongoDB database operations | DB queries, schema inspection |
179
- | `jira` | Issue tracking | Pull tasks, create issues, update status |
180
- | `git` | Git operations | Repo search, history, diffs |
181
- | `fetch` | Web page reading | Fetch URLs as markdown |
182
-
183
- ---
184
-
185
- ## Configuration Files
186
-
187
- Project-specific settings in `.claude/config/`:
188
-
189
- | File | Purpose |
190
- |------|---------|
191
- | `project-config.json` | Stack, structure, commands |
192
- | `domain-mapping.json` | File patterns to domains |
193
- | `quality-gates.json` | Quality check commands |
194
- | `testing-config.json` | Test framework and conventions |
195
- | `security-rules.json` | Security audit rules |
196
-
197
- Agents read config files before acting. Do NOT hardcode project specifics.
198
-
199
- ---
200
-
201
- ## Execution Protocol
202
-
203
- ### Before ANY implementation:
204
-
205
- 1. Read config from `.claude/config/` for project specifics
206
- 2. Read relevant skill SKILL.md file
207
- 3. Check skill cache for existing data
208
- 4. Research if needed (research-web agent or web search)
209
-
210
- ### After implementation:
211
-
212
- 1. Update skill cache with changes
213
- 2. Run quality gates (`bun run typecheck && lint && test`)
214
- 3. Security handled automatically by security-guidance plugin
215
- 4. Update domains via domain-updater agent
216
- 5. **Update CLAUDE.md** with architecture/rule changes (see rule below)
217
- 6. Commit via commit-manager agent (FINAL step)
218
-
219
- ---
220
-
221
- ## CLAUDE.md Update Rule (POST-IMPLEMENTATION)
222
-
223
- After completing any implementation or change that modifies architecture, rules, or conventions:
224
-
225
- 1. **Update `/CLAUDE.md`** -- The root project CLAUDE.md must reflect current state
226
- 2. **What to update:**
227
- - `Last Change` section with branch, date, summary
228
- - Any section affected by the changes (Architecture, Rules, Stack, etc.)
229
- - New patterns, gotchas, or conventions discovered
230
- 3. **What counts as "architecture change":**
231
- - New files/folders added to the project structure
232
- - New dependencies or tools added
233
- - Workflow changes
234
- - New API routes, pages, or components
235
- - Configuration changes
236
- - Any change that a future Claude session would need to know about
237
- 4. **Format:** Keep it concise. Tables and bullet points over prose.
238
- 5. **Character limit:** Max 40,000 chars. If exceeded, invoke claude-md-compactor agent.
239
-
240
- ---
241
-
242
- ## HTTP Requests (MANDATORY)
243
-
244
- All HTTP requests MUST use **axios** with proper configuration.
245
-
246
- ### Base Setup
247
-
248
- ```typescript
249
- // lib/api/axios.ts - Create a configured axios instance
250
- import axios from 'axios';
251
-
252
- export const api = axios.create({
253
- baseURL: process.env.NEXT_PUBLIC_API_URL || '/api',
254
- withCredentials: true, // ALWAYS for auth cookies/sessions
255
- headers: {
256
- 'Content-Type': 'application/json',
257
- },
258
- });
259
-
260
- // Request interceptor for auth tokens
261
- api.interceptors.request.use((config) => {
262
- const token = localStorage.getItem('token');
263
- if (token) {
264
- config.headers.Authorization = `Bearer ${token}`;
265
- }
266
- return config;
267
- });
268
-
269
- // Response interceptor for error handling
270
- api.interceptors.response.use(
271
- (response) => response,
272
- (error) => {
273
- if (error.response?.status === 401) {
274
- // Handle unauthorized
275
- }
276
- return Promise.reject(error);
277
- }
278
- );
279
- ```
280
-
281
- ### Usage Rules
282
-
283
- | Rule | Description |
284
- |------|-------------|
285
- | ALWAYS use `api` instance | Never raw `axios.get()` or `fetch()` |
286
- | ALWAYS `withCredentials: true` | Required for cookies/sessions |
287
- | Extend for specific APIs | Create `api.auth`, `api.payments`, etc. |
288
- | Type responses | `api.get<UserResponse>('/users')` |
289
- | Handle errors centrally | Use interceptors, not try/catch everywhere |
290
-
291
- ---
292
-
293
- ## Enforcement Mechanisms
294
-
295
- | Mechanism | Type | Blocks When |
296
- |-----------|------|-------------|
297
- | **security-guidance plugin** | PreToolUse hook (auto) | Sensitive data exposure, missing validation, OWASP |
298
- | **quality gates** | Manual / CI | Typecheck, lint, or test failures |
299
- | **final-check skill** | Skill (manual) | Any rule violated, tests failing, docs missing |
300
-
301
- ---
302
-
303
- ## Quality Requirements
304
-
305
- All implementations MUST:
306
-
307
- - [ ] Pass typecheck (`bun run typecheck`)
308
- - [ ] Pass lint (`bun run lint`)
309
- - [ ] Pass unit tests (`bun run test`)
310
- - [ ] Pass build (`bun run build`)
311
- - [ ] Have documentation updated (documenter agent)
312
- - [ ] Security validated by security-guidance plugin (automatic)
313
- - [ ] Be committed with conventional commits
314
- - [ ] Have domains updated with session learnings (domain-updater agent)
315
- - [ ] Have CLAUDE.md updated with architecture/rule changes
316
-
317
- ---
318
-
319
- ## Domain Documentation
320
-
321
- Domain docs prevent Claude from re-exploring the codebase every session.
322
-
323
- ### Location
324
-
325
- ```
326
- .claude/skills/codebase-knowledge/domains/
327
- ├── claude-system.md # This development system
328
- ├── authentication.md
329
- ├── api.md
330
- ├── ui-components.md
331
- └── ...
332
- ```
333
-
334
- ### Domain Mapping
335
-
336
- Configured in `.claude/config/domain-mapping.json`:
337
-
338
- | Domain | File Patterns |
339
- |--------|---------------|
340
- | authentication | `**/auth/**`, `**/*auth*.ts` |
341
- | api | `**/api/**`, `**/routers/**` |
342
- | database | `**/models/**`, `**/*.model.ts` |
343
- | ui-components | `**/components/**/*.tsx` |
344
- | pages | `**/app/**/page.tsx` |
345
-
346
- ### Documentation Agents
347
-
348
- | Agent | Role | When |
349
- |-------|------|------|
350
- | **documenter** | Maps files to domains, creates/updates domain files | AFTER implementation |
351
- | **domain-updater** | Records problems, solutions, gotchas | BEFORE commit |
352
-
353
- ---
354
-
355
- ## FORBIDDEN Actions
356
-
357
- | Action | Reason |
358
- | ------------------------------ | ---------------------------- |
359
- | Write in non-English | ALL code/docs MUST be in EN |
360
- | Skip typecheck | Catches runtime errors |
361
- | Relative imports (shared) | Breaks when files move |
362
- | Use `@types/` alias | Reserved by TypeScript |
363
- | Use `any` type | Defeats strict mode |
364
- | Skip docker build test | May fail in production |
365
- | Define types in `src/` | Must be in `types/` |
366
- | Skip research for new features | Leads to outdated patterns |
367
- | Skip todo list creation | Loses track of tasks |
368
- | Make responsive UI only | Must be separate UIs |
369
- | Commit directly to main | Create feature/fix branches |
370
- | Skip documenter agent | Documentation is mandatory |
371
- | Leave files undocumented | Domain docs prevent re-exploration |
372
- | Stack Last Change entries | Keep only the LATEST |
373
- | Use Cards on mobile | Waste space in flex-col |
374
- | Edit JSX without UI review | Use frontend-design plugin or research competitors |
375
- | Skip planning for features | Use EnterPlanMode first |
376
- | Skip domain documentation | MUST update domains/*.md |
377
- | Only update CLAUDE.md | Domains are detail, CLAUDE.md is summary |
378
- | Skip flow documentation | Document architecture changes in CLAUDE.md |
379
- | Use MUI/Chakra | Use shadcn/ui + Radix for personality control |
380
- | Neumorphism on forms | Accessibility issues, use Glassmorphism |
381
- | Scroll animations on dashboard | Use only on landing/marketing pages |
382
- | 3D elements on mobile | Performance issues, use sparingly |
383
- | Masonry grid on mobile | Use vertical lists instead |
384
- | Mix animation libraries | Pick one primary (Framer or GSAP) |
385
- | Wildcard icon imports | Use named imports (`import { X } from 'lucide-react'`) |
386
- | React Icons in production | Use Lucide + Simple Icons directly |
387
- | Files > 400 lines | MUST split into smaller components |
388
- | Page components in /components | Use `app/[page]/_components/` |
389
- | Skip cn utility | MUST use clsx + tailwind-merge |
390
- | 'use client' at top level | Push to leaf components only |
391
- | Waterfall data fetching | Use Promise.all() for parallel |
392
- | Skip loading.tsx | Add skeleton loaders for data pages |
393
- | Skip CLAUDE.md update | MUST update after implementations |
394
-
395
- ---
396
-
397
- ## UI Architecture (MANDATORY)
398
-
399
- > Web apps MUST have **separate UIs** for each platform, NOT just "responsive design".
400
-
401
- | Platform | Layout |
402
- | ----------------- | ------------------------------------------- |
403
- | Mobile (375px) | Full-screen modals, bottom nav, touch-first |
404
- | Tablet (768px) | Condensed dropdowns, hybrid nav |
405
- | Desktop (1280px+) | Sidebar left, top navbar with search |
406
-
407
- ### JSX Editing = UI Review (MANDATORY)
408
-
409
- ANY task that edits `.tsx` or `.jsx` files MUST consider all 3 viewports:
410
-
411
- - Use `/frontend-design` plugin for production-grade UI
412
- - Design separate layouts for mobile (375px), tablet (768px), desktop (1280px+)
413
- - Research competitor UIs before implementing new features
414
-
415
- ---
416
-
417
- ## UI/UX Design Rules
418
-
419
- ### Mobile FORBIDDEN Patterns
420
-
421
- | Pattern | Problem | Use Instead |
422
- |---------|---------|-------------|
423
- | Cards in flex-col | Waste vertical space, poor scanning | Compact lists with dividers |
424
- | Card grids | Too cramped, hard to tap | Full-width list items |
425
- | Nested cards | Confusing hierarchy | Flat structure |
426
- | Multiple CTAs per card | Touch confusion | Single primary action |
427
-
428
- ### Design Principles
429
-
430
- | Platform | Density | Navigation | Actions |
431
- |----------|---------|------------|---------|
432
- | Mobile | LOW - space for touch | Bottom tab bar | Bottom sheet |
433
- | Tablet | MEDIUM - hybrid | Side + top | Context menus |
434
- | Desktop | HIGH - data dense | Fixed sidebar | Inline + hover |
435
-
436
- ### Component Choices
437
-
438
- ```
439
- Mobile: Lists > Cards, Sheets > Modals, Tabs > Dropdowns
440
- Tablet: Collapsible cards, Split views, Floating actions
441
- Desktop: Data tables, Multi-column forms, Keyboard shortcuts
442
- ```
443
-
444
- ---
445
-
446
- ## Design System Reference
447
-
448
- > **Full docs in**: `.claude/skills/research-cache/cache/` (12 detailed files)
449
-
450
- ### Required Libraries
451
-
452
- ```bash
453
- # Core utilities (MANDATORY)
454
- bun add clsx tailwind-merge class-variance-authority
455
- bun add -D tailwindcss-animate
456
-
457
- # Animation & feedback
458
- bun add @formkit/auto-animate framer-motion sonner
459
-
460
- # Skeleton loaders
461
- bun add react-loading-skeleton
462
-
463
- # Copy-paste from: magicui.design, ui.aceternity.com, hover.dev
464
- ```
465
-
466
- ### The `cn` Utility (MANDATORY)
467
-
468
- ```typescript
469
- // lib/utils.ts - MUST HAVE in every project
470
- import { clsx, type ClassValue } from 'clsx';
471
- import { twMerge } from 'tailwind-merge';
472
-
473
- export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
474
- ```
475
-
476
- ---
477
-
478
- ## Icon Libraries (MANDATORY)
479
-
480
- | Library | Use For | Icons | Import |
481
- |---------|---------|-------|--------|
482
- | **Lucide React** | UI icons (shadcn default) | 1,600+ | `import { Camera } from 'lucide-react'` |
483
- | **Simple Icons** | Brand logos ONLY | 3,150+ | `import { SiReact } from '@icons-pack/react-simple-icons'` |
484
-
485
- ```typescript
486
- // CORRECT: Named imports (tree-shakable, ~1KB per icon)
487
- import { Camera, User, Settings } from 'lucide-react';
488
-
489
- // FORBIDDEN: Wildcard imports (bundles ALL icons, +30KB)
490
- import * as Icons from 'lucide-react';
491
- ```
492
-
493
- ---
494
-
495
- ## Aesthetic Libraries
496
-
497
- | Library | Purpose | When |
498
- |---------|---------|------|
499
- | **clsx + tailwind-merge** | className management | ALWAYS |
500
- | **class-variance-authority** | Component variants | Reusable components |
501
- | **tailwindcss-animate** | Micro-interactions | Animations |
502
- | **react-loading-skeleton** | Loading states | Data fetching |
503
-
504
- ---
505
-
506
- ## Component Organization (MANDATORY)
507
-
508
- ### Component Location Rules
509
-
510
- | Question | Location |
511
- |----------|----------|
512
- | Used in ONE page only? | `app/[page]/_components/` |
513
- | Used across 2+ features? | `components/shared/` |
514
- | UI primitive (Button, Input)? | `components/ui/` |
515
- | Layout element (Header, Footer)? | `components/layout/` |
516
-
517
- ### File Size Rules
518
-
519
- | Lines | Action |
520
- |-------|--------|
521
- | < 200 | Keep in single file |
522
- | 200-400 | Consider splitting |
523
- | > 400 | **MUST split** into smaller components |
524
-
525
- ---
526
-
527
- ## Next.js App Router Patterns (MANDATORY)
528
-
529
- ### Server vs Client Components
530
-
531
- ```tsx
532
- // DEFAULT: Server Component (no directive needed)
533
- export default async function Page({ params }) {
534
- const data = await fetch('...');
535
- return <ClientButton data={data} />;
536
- }
537
-
538
- // Client Component (push to leaves)
539
- 'use client';
540
- export function ClientButton({ data }) {
541
- const [state, setState] = useState();
542
- return <button onClick={() => setState(!state)}>{data}</button>;
543
- }
544
- ```
545
-
546
- ### Layout Context Pattern
547
-
548
- ```tsx
549
- // app/layout.tsx - Root layout with providers
550
- import { Providers } from '@/components/providers';
551
-
552
- export default function RootLayout({ children }) {
553
- return (
554
- <html lang="en">
555
- <body>
556
- <Providers>{children}</Providers>
557
- </body>
558
- </html>
559
- );
560
- }
561
-
562
- // components/providers.tsx - Client-side providers
563
- 'use client';
564
- export function Providers({ children }) {
565
- return (
566
- <QueryClientProvider client={queryClient}>
567
- <ThemeProvider>
568
- {children}
569
- <Toaster />
570
- </ThemeProvider>
571
- </QueryClientProvider>
572
- );
573
- }
574
- ```
575
-
576
- ### Parallel Data Fetching
577
-
578
- ```tsx
579
- // CORRECT: Parallel fetches
580
- const [user, posts] = await Promise.all([getUser(), getPosts()]);
581
-
582
- // AVOID: Waterfall (sequential)
583
- const user = await getUser();
584
- const posts = await getPosts(); // Waits for user
585
- ```
586
-
587
- ---
588
-
589
- ## Grid Layouts (Choose by Context)
590
-
591
- | Grid Type | Use For | Mobile |
592
- |-----------|---------|--------|
593
- | **Bento Grid** | Landing, features, portfolios | Stacks vertically |
594
- | **12-Column** | Dashboards, admin panels | Collapse to 1-2 cols |
595
- | **Masonry** | Galleries, Pinterest-style | Use vertical list |
596
- | **Card Grid** | Products, team, blog archive | Stack to single col |
597
- | **Split Grid** | Hero sections, auth pages | Stack vertically |
598
- | **Kanban** | Project management, tasks | Horizontal scroll |
599
-
600
- > **Cache**: `grid-layout-patterns-2025.md`
601
-
602
- ---
603
-
604
- ## Modal/Dialog Patterns (Choose by Action)
605
-
606
- | Modal Type | Use For | Mobile |
607
- |------------|---------|--------|
608
- | **Centered Dialog** | Confirmations, short forms | Full-screen |
609
- | **Slide-over/Drawer** | Filters, settings, details | Bottom sheet |
610
- | **Bottom Sheet** | Actions, sharing, quick forms | Native feel |
611
- | **Command Palette** | CMD+K, power users | Full-screen |
612
- | **Wizard/Stepper** | Multi-step forms, onboarding | Full-screen |
613
- | **Lightbox** | Images, videos | Full-screen |
614
-
615
- > **Cache**: `modal-dialog-design-patterns-2024-2025.md`
616
-
617
- ---
618
-
619
- ## List Patterns (Choose by Data)
620
-
621
- | List Type | Use For | Key Feature |
622
- |-----------|---------|-------------|
623
- | **Simple List** | Basic items, settings | Dividers |
624
- | **Avatar List** | Users, contacts | Profile images |
625
- | **Expandable/Accordion** | FAQs, nested content | Collapse/expand |
626
- | **Swipeable List** | Mobile actions | Left/right swipe |
627
- | **Drag & Drop** | Reordering | dnd-kit (NOT react-beautiful-dnd) |
628
- | **Virtualized** | 1000+ items | react-window or react-virtuoso |
629
- | **Timeline** | Activity feed, history | Vertical line |
630
- | **Chat/Messages** | Conversations | Bubbles left/right |
631
-
632
- > **Cache**: `list-design-patterns-web-apps.md`
633
-
634
- ---
635
-
636
- ## Multi-Step Forms (MANDATORY for complex forms)
637
-
638
- | Pattern | Use For | Progress |
639
- |---------|---------|----------|
640
- | **Horizontal Stepper** | Onboarding, checkout | Numbers at top |
641
- | **Card-based Steps** | Settings, profiles | Expandable cards |
642
- | **Slide Animation** | Typeform-style | Left/right slide |
643
- | **Accordion Steps** | Long forms | Collapsible sections |
644
-
645
- ### Form Stack (MANDATORY)
646
-
647
- ```typescript
648
- // react-hook-form + Zod + per-step validation
649
- const { trigger } = useForm<FormData>({ resolver: zodResolver(schema) });
650
-
651
- const nextStep = async () => {
652
- const isValid = await trigger(currentStepFields);
653
- if (!isValid) return;
654
- setStep(step + 1);
655
- };
656
- ```
657
-
658
- > **Cache**: `multi-step-form-patterns.md`
659
-
660
- ---
661
-
662
- ## Toast Notifications (MANDATORY: Sonner)
663
-
664
- ```typescript
665
- // Install: pnpm dlx shadcn@latest add sonner
666
- import { toast } from "sonner";
667
-
668
- // Promise-based (loading -> success/error)
669
- toast.promise(saveData(), {
670
- loading: 'Saving...',
671
- success: 'Saved!',
672
- error: 'Failed to save',
673
- });
674
-
675
- // With action button
676
- toast('File deleted', {
677
- action: { label: 'Undo', onClick: () => restoreFile() },
678
- });
679
- ```
680
-
681
- > **Duration**: 4s info, 7s+ errors. Max 3-5 visible toasts.
682
-
683
- > **Cache**: `react-toast-notifications.md`
684
-
685
- ---
686
-
687
- ## Optimistic UI (MANDATORY for mutations)
688
-
689
- > Show instant feedback, rollback on error.
690
-
691
- ### Pattern 1: useOptimistic (React 19)
692
-
693
- ```typescript
694
- const [optimisticItems, addOptimistic] = useOptimistic(
695
- items,
696
- (state, newItem) => [...state, { ...newItem, pending: true }]
697
- );
698
-
699
- async function addItem(data: ItemData) {
700
- addOptimistic(data); // Instant UI update
701
- try {
702
- await api.post('/items', data);
703
- } catch {
704
- toast.error('Failed to add');
705
- // State auto-reverts
706
- }
707
- }
708
- ```
709
-
710
- ### Pattern 2: TanStack Query
711
-
712
- ```typescript
713
- useMutation({
714
- mutationFn: updateItem,
715
- onMutate: async (newData) => {
716
- await queryClient.cancelQueries({ queryKey: ['items'] });
717
- const previous = queryClient.getQueryData(['items']);
718
- queryClient.setQueryData(['items'], (old) =>
719
- old.map(item => item.id === newData.id ? { ...item, ...newData } : item)
720
- );
721
- return { previous };
722
- },
723
- onError: (err, vars, context) => {
724
- queryClient.setQueryData(['items'], context.previous); // Rollback
725
- toast.error('Update failed');
726
- },
727
- onSettled: () => queryClient.invalidateQueries({ queryKey: ['items'] }),
728
- });
729
- ```
730
-
731
- > **Cache**: `optimistic-ui-patterns-react.md`
732
-
733
- ---
734
-
735
- ## Data Display Patterns
736
-
737
- ### Tables
738
-
739
- | Style | Use For |
740
- |-------|---------|
741
- | **Striped rows** | Long lists, scanning |
742
- | **Sticky header** | Scrollable data |
743
- | **Expandable rows** | Details on demand |
744
- | **Sortable columns** | Data comparison |
745
- | **Virtualized** | 1000+ rows (TanStack Virtual) |
746
-
747
- ### Cards
748
-
749
- | Style | Use For |
750
- |-------|---------|
751
- | **Stats/KPI Card** | Metrics with trends |
752
- | **Product Card** | E-commerce listings |
753
- | **Profile Card** | User information |
754
- | **Interactive Card** | Hover effects, animations |
755
-
756
- > **Cache**: `data-display-patterns-2024-2025.md`
757
-
758
- ---
759
-
760
- ## Navigation Patterns
761
-
762
- | Type | Desktop | Mobile |
763
- |------|---------|--------|
764
- | **Header** | Fixed top navbar | Hamburger menu |
765
- | **Sidebar** | Fixed left, collapsible | Overlay drawer |
766
- | **Tabs** | Horizontal tabs | Bottom tab bar |
767
- | **Breadcrumbs** | Path navigation | Simplified |
768
-
769
- > **Cache**: `navigation-header-design-patterns-2025.md`
770
-
771
- ---
772
-
773
- ## Animation Libraries
774
-
775
- | Library | Use When | Bundle |
776
- |---------|----------|--------|
777
- | **AutoAnimate** | 90% of UI (lists, tabs, dropdowns) | Minimal |
778
- | **Framer Motion** | Page transitions, gestures, layouts | 32KB |
779
- | **GSAP** | Scroll-driven, complex timelines | 23KB |
780
- | **Magic UI** | Landing pages, marketing | Copy-paste |
781
- | **Aceternity UI** | Portfolios, 3D effects | Copy-paste |
782
-
783
- ---
784
-
785
- ## Design Trends (2025)
786
-
787
- | Trend | Use For | Avoid |
788
- |-------|---------|-------|
789
- | **Glassmorphism** | Modals, overlays, dark mode | Light backgrounds |
790
- | **Minimalism** | Mobile, SaaS, accessibility | Marketing sites |
791
- | **Bold Typography** | Landing hero, brands | Data dashboards |
792
-
793
- ---
794
-
795
- ## Mandatory Planning
796
-
797
- > Use `EnterPlanMode` for non-trivial tasks BEFORE implementing.
798
-
799
- | Task Type | Plan Required |
800
- |-----------|---------------|
801
- | New feature | YES |
802
- | UI changes (any JSX) | YES |
803
- | Multi-file changes | YES |
804
- | Bug fix (simple) | NO |
805
- | Single-line fix | NO |
806
-
807
- ### Plan Format
808
-
809
- ```
810
- 1. Analyze current state
811
- 2. Identify affected files
812
- 3. Design approach (with alternatives)
813
- 4. Get user approval
814
- 5. THEN implement
815
- ```
816
-
817
- ---
818
-
819
- ## Critical Rules
820
-
821
- ### Path Aliases (MANDATORY)
822
-
823
- | Alias | Maps To | Use For |
824
- | ---------- | ------------------- | ------------- |
825
- | `$types/*` | `./types/*` | Type defs |
826
- | `@common` | `./common/index.ts` | Logger, utils |
827
- | `@db` | `./common/db/` | DB connection |
828
-
829
- > **NEVER** use `@types/` (reserved by TypeScript)
830
-
831
- ### Types Location
832
-
833
- - **ALL** interfaces/types MUST be in `types/` folder
834
- - **NEVER** define types in `src/` files
835
- - **EXCEPTION:** Zod inferred types and Mongoose Documents
836
-
837
- ### TypeScript Strict
838
-
839
- ```typescript
840
- process.env['VARIABLE']; // CORRECT (bracket notation)
841
- source: 'listed' as const; // CORRECT (literal type)
842
- ```
843
-
844
- ---
845
-
846
- ## Quality Gates
847
-
848
- ```bash
849
- bun run typecheck # MUST pass
850
- bun run lint # MUST pass
851
- bun run test # MUST pass
852
- docker compose build # MUST pass
853
- bash .claude/scripts/validate-skills.sh # Skills activation check
854
- ```
855
-
856
- ---
857
-
858
- ## Commit Format
859
-
860
- ```
861
- [type]: [description]
862
-
863
- - Detail 1
864
- - Detail 2
865
-
866
- Generated with Claude Code
867
- ```
868
-
869
- Types: `feat`, `fix`, `refactor`, `docs`, `chore`
870
-
871
- ---
872
-
873
- ## NRY (Never Repeat Yourself)
874
-
875
- Common Claude mistakes to avoid:
876
-
877
- - Multi-line bash with `\` continuations (breaks permissions)
878
- - Relative paths in permission patterns
879
- - Executing agent logic manually (use Task tool)
880
- - Using bash for file operations (use Read/Write/Edit)
881
- - Ignoring context size (use `/compact`)
882
-
883
- ---
884
-
885
- ## Claude 4.6 Best Practices
886
-
887
- ### Model Selection
888
-
889
- | Model | API ID | Best For |
890
- |-------|--------|----------|
891
- | **Opus 4.6** | `claude-opus-4-6` | Orchestrators, long-horizon tasks |
892
- | **Sonnet 4.6** | `claude-sonnet-4-6` | Daily coding (5x cheaper) |
893
- | **Haiku 4.5** | `claude-haiku-4-5-20251001` | Simple tasks |
894
-
895
- ### Key Rules
896
-
897
- - Use adaptive thinking (`thinking: { type: "adaptive" }`)
898
- - Avoid aggressive prompts ("MUST", "CRITICAL") -- causes overtriggering
899
- - Lower effort level instead of adding constraints
900
- - Use subagents for parallel tasks, work directly for sequential
901
- - Avoid over-engineering -- only make requested changes
1
+ # Claude Development System - Agent Context
2
+
3
+ This file provides detailed context for the development system installed by `start-vibing v4`.
4
+ For user-facing project rules, see `/CLAUDE.md`.
5
+
6
+ ---
7
+
8
+ ## What start-vibing v4 Installs
9
+
10
+ start-vibing is a CLI (`npx start-vibing`) that sets up Claude Code with a complete development system in ~30 seconds:
11
+
12
+ | Component | Count | Installation Method |
13
+ |-----------|-------|-------------------|
14
+ | **MCP Servers** | 8 | `claude mcp add` (parallel, ~20s) |
15
+ | **Plugins** | 9 | `claude plugin install` (parallel, auto-accept, ~3s) |
16
+ | **Community Skills** | 5 | Direct HTTPS download from GitHub (~0.3s) |
17
+ | **Template Files** | ~30 | File copy (agents, skills, config, CLAUDE.md) |
18
+
19
+ ### Installation Architecture
20
+
21
+ ```
22
+ npx start-vibing
23
+ ├── Phase 1: Copy template files (agents, skills, config)
24
+ ├── Phase 2: Verify/install Claude Code CLI
25
+ ├── Phase 3: Install 8 MCP servers (parallel via Promise.all)
26
+ ├── Phase 4: Install 9 plugins (parallel, stdin auto-accept 'y')
27
+ ├── Phase 5: Download 5 community skills (parallel HTTPS from GitHub)
28
+ └── Phase 6: Launch Claude Code (resume last session or new)
29
+ ```
30
+
31
+ All phases run best-effort. MCP and plugin failures are non-blocking — `settings.json` `enabledPlugins` is the fallback for plugins.
32
+
33
+ ### CLI Options
34
+
35
+ | Flag | Effect |
36
+ |------|--------|
37
+ | `--force` | Overwrite all files (including custom ones) |
38
+ | `--new` | Start fresh Claude session (default: resume last) |
39
+ | `--no-claude` | Skip Claude Code installation and launch |
40
+ | `--no-mcp` | Skip MCP server installation |
41
+ | `--no-skills` | Skip community skills installation |
42
+ | `--no-update-check` | Skip version check |
43
+
44
+ ---
45
+
46
+ ## System Architecture
47
+
48
+ ```
49
+ .claude/
50
+ ├── agents/ # 4 active subagents (flat structure)
51
+ ├── skills/ # Custom + 5 community skills (auto-injected by description match)
52
+ ├── scripts/ # Utility scripts
53
+ ├── config/ # Project-specific configuration (JSON files)
54
+ └── commands/ # Slash commands (feature, fix, research, validate)
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Agents (4 Active Subagents)
60
+
61
+ | Agent | Model | Purpose |
62
+ |-------|-------|---------|
63
+ | **research-web** | sonnet | Researches best practices (2024-2026) before implementing new features |
64
+ | **commit-manager** | haiku | Manages git commits, conventional format, merge workflow |
65
+ | **claude-md-compactor** | sonnet | Compacts CLAUDE.md when it exceeds 40k chars |
66
+ | **tester-unit** | sonnet | Creates unit tests with Vitest for new functions and utilities |
67
+
68
+ ### Agent Workflow Order
69
+
70
+ ```
71
+ implement -> quality gates -> ask user about docs -> commit-manager -> complete
72
+ ```
73
+
74
+ Agents are dispatched via the `Agent` tool with `subagent_type` matching agent names. They run autonomously and return results to the orchestrator.
75
+
76
+ ---
77
+
78
+ ## Plugins (9 via enabledPlugins)
79
+
80
+ Plugins are the primary extension mechanism. All 9 are installed in parallel with auto-accept (`stdin.write('y\n')` x3). If CLI install fails, `settings.json` `enabledPlugins` ensures they activate on next Claude session.
81
+
82
+ ### Core Workflow Plugins
83
+
84
+ | Plugin | Mechanism | Purpose |
85
+ |--------|-----------|---------|
86
+ | **superpowers** | Skills + commands | TDD, brainstorming, debugging, planning, code review, git worktrees |
87
+ | **ralph-loop** | Stop hook + command | Iterative autonomous development loop with checkpoints |
88
+ | **context7** | Skill + agent + MCP | Auto library docs replaces manual context7 MCP server |
89
+ | **code-simplifier** | Skill + command | Refine code for clarity, reduce nesting, improve naming |
90
+
91
+ ### Development Plugins
92
+
93
+ | Plugin | Mechanism | Purpose |
94
+ |--------|-----------|---------|
95
+ | **typescript-lsp** | LSP server (auto) | Type diagnostics, go-to-definition, hover info |
96
+ | **security-guidance** | PreToolUse hook (auto) | OWASP Top 10, vulnerability scan, blocks unsafe patterns |
97
+ | **code-review** | `/code-review` command | Code quality analysis, PR review |
98
+ | **commit-commands** | `/commit` command | Git commit, push, PR flows with conventional format |
99
+ | **frontend-design** | `/frontend-design` command | Production-grade UI design with competitor research |
100
+
101
+ ### Plugin Installation Details
102
+
103
+ ```typescript
104
+ // How plugins are installed (src/plugins.ts):
105
+ // 1. Check if already installed via `claude plugin list`
106
+ // 2. Spawn `claude plugin install <name>@claude-plugins-official --scope user`
107
+ // 3. Auto-accept all prompts via stdin: proc.stdin.write('y\n') x3
108
+ // 4. All 9 run in parallel via Promise.all (completes in ~3s)
109
+ // 5. Fallback: settings.json enabledPlugins activates them even if CLI install fails
110
+ ```
111
+
112
+ ### Using Superpowers (RECOMMENDED)
113
+
114
+ Superpowers provides structured workflows for feature development:
115
+
116
+ ```
117
+ /brainstorming → Before designing features (ALWAYS for creative work)
118
+ /write-plan → Plan multi-step implementations into executable specs
119
+ /execute-plan → Execute plans with TDD (red-green-refactor cycle)
120
+ /systematic-debugging → Debug with root-cause analysis (not guessing)
121
+ /verification-before-completion → Verify before claiming work is done
122
+ /requesting-code-review → Get review after major features
123
+ /dispatching-parallel-agents → Run 2+ independent tasks in parallel via subagents
124
+ /using-git-worktrees → Isolate feature work from current branch
125
+ ```
126
+
127
+ ### Using Ralph Loop (FOR BIG TASKS)
128
+
129
+ Ralph Loop runs Claude autonomously in a continuous implementation loop:
130
+
131
+ ```
132
+ /ralph-loop "implement full CRUD for users" --max-iterations 10
133
+ /cancel-ralph → Abort if needed
134
+ ```
135
+
136
+ All file changes and git history persist between iterations. Best for multi-file features, complex refactors, or sustained autonomous work.
137
+
138
+ ### Using Code Simplifier (POST-IMPLEMENTATION)
139
+
140
+ After implementing, run `/simplify` to:
141
+ - Reduce nesting and redundancy
142
+ - Improve naming and readability
143
+ - Replace nested ternaries with early returns
144
+ - Simplify without changing behavior
145
+
146
+ ---
147
+
148
+ ## MCP Servers (8 Installed)
149
+
150
+ All 8 MCPs are installed in parallel via `claude mcp add -s user` (~20s total). Each runs as a subprocess spawned by Claude Code on demand.
151
+
152
+ ### Required MCPs (ALWAYS use these)
153
+
154
+ | Server | Package | Purpose |
155
+ |--------|---------|---------|
156
+ | `sequential-thinking` | `@modelcontextprotocol/server-sequential-thinking` | Structured reasoning for multi-step tasks, architecture decisions, debugging |
157
+ | `playwright` | `@playwright/mcp@latest` | Browser automation for UI verification, E2E tests, visual validation |
158
+
159
+ > These 2 are **non-negotiable**. Skipping them leads to poor planning and untested UIs.
160
+
161
+ > **Note**: `context7` is now a **plugin** with auto-invocation skill (not an MCP). Library docs are fetched automatically when you use any library.
162
+
163
+ ### Standard MCPs
164
+
165
+ | Server | Package | Transport | Purpose |
166
+ |--------|---------|-----------|---------|
167
+ | `memory` | `@modelcontextprotocol/server-memory` | stdio (npx) | Persistent knowledge graph across sessions |
168
+ | `nextjs-devtools` | `next-devtools-mcp@latest` | stdio (npx) | Next.js runtime errors, routes, cache inspection |
169
+ | `mongodb` | `@mongodb-js/mongodb-mcp-server` | stdio (npx) | MongoDB queries, schema inspection, aggregation |
170
+ | `jira` | `@aashari/mcp-server-atlassian-jira` | stdio (npx) | Issue tracking, task management |
171
+ | `git` | `mcp-server-git` | stdio (uvx) | Git operations, repo search, history, diffs |
172
+ | `fetch` | `mcp-server-fetch` | stdio (uvx) | Fetch web pages as markdown |
173
+
174
+ ### Optional MCPs (install manually)
175
+
176
+ These are shown to the user after setup but not auto-installed:
177
+
178
+ | Server | Install Command |
179
+ |--------|----------------|
180
+ | `github` | `claude mcp add --transport http -s user github https://api.githubcopilot.com/mcp/` |
181
+ | `sentry` | `claude mcp add --transport http -s user sentry https://mcp.sentry.dev/mcp` |
182
+ | `figma` | `claude mcp add --transport http -s user figma https://mcp.figma.com/mcp` |
183
+ | `linear` | `claude mcp add --transport http -s user linear https://mcp.linear.app/sse` |
184
+ | `stripe` | `claude mcp add --transport http -s user stripe https://mcp.stripe.com` |
185
+ | `vercel` | `claude mcp add --transport http -s user vercel https://mcp.vercel.com` |
186
+
187
+ ---
188
+
189
+ ## Community Skills (5 from GitHub)
190
+
191
+ Skills are SKILL.md files placed in `.claude/skills/<name>/SKILL.md`. They are auto-injected into Claude's context when the task matches their frontmatter `description`.
192
+
193
+ ### Installation Method
194
+
195
+ Community skills are downloaded directly from GitHub raw URLs (the `skillsadd` npm package is deprecated — its backend `skills.ws` is down). Each skill is a single SKILL.md file.
196
+
197
+ ```typescript
198
+ // How skills are installed (src/skills.ts):
199
+ // 1. Check if .claude/skills/<name>/SKILL.md already exists (skip if so)
200
+ // 2. HTTPS GET from raw.githubusercontent.com/<owner>/<repo>/main/skills/<name>/SKILL.md
201
+ // 3. Write to .claude/skills/<name>/SKILL.md
202
+ // 4. All 5 run in parallel via Promise.all (completes in ~0.3s)
203
+ // 5. No external CLI dependency — just Node.js https module
204
+ ```
205
+
206
+ ### Installed Skills
207
+
208
+ | Skill | Source Repo | Purpose |
209
+ |-------|------------|---------|
210
+ | **react-best-practices** | `vercel-labs/agent-skills` | React/Next.js performance optimization rules |
211
+ | **web-design-guidelines** | `vercel-labs/agent-skills` | 100+ WCAG accessibility + UX audit rules |
212
+ | **composition-patterns** | `vercel-labs/agent-skills` | Compound component and composition patterns |
213
+ | **webapp-testing** | `anthropics/skills` | Real browser test execution with Playwright |
214
+ | **mcp-builder** | `anthropics/skills` | Guide for building MCP servers |
215
+
216
+ ### Adding More Skills
217
+
218
+ To install additional skills from [skills.sh](https://skills.sh), use the working CLI:
219
+
220
+ ```bash
221
+ # List available skills in a repo
222
+ npx skills add vercel-labs/agent-skills --list
223
+
224
+ # Install a specific skill
225
+ npx skills add vercel-labs/agent-skills --skill <name> --yes
226
+
227
+ # Install from anthropics
228
+ npx skills add anthropics/skills --skill <name> --yes
229
+
230
+ # Manual fallback (if CLI fails)
231
+ mkdir -p .claude/skills/<name>
232
+ curl -o .claude/skills/<name>/SKILL.md \
233
+ https://raw.githubusercontent.com/<owner>/<repo>/main/skills/<name>/SKILL.md
234
+ ```
235
+
236
+ ---
237
+
238
+ ## Configuration Files
239
+
240
+ Project-specific settings in `.claude/config/`:
241
+
242
+ | File | Purpose |
243
+ |------|---------|
244
+ | `project-config.json` | Stack, structure, commands |
245
+ | `quality-gates.json` | Quality check commands |
246
+ | `testing-config.json` | Test framework and conventions |
247
+ | `security-rules.json` | Security audit rules |
248
+
249
+ Agents read config files before acting. Do NOT hardcode project specifics — update the JSON files instead.
250
+
251
+ ---
252
+
253
+ ## settings.json (enabledPlugins)
254
+
255
+ The `.claude/settings.json` file contains `enabledPlugins` which is the fallback mechanism for plugin activation. Even if `claude plugin install` fails, having the plugin listed in `enabledPlugins` ensures Claude prompts to install it on first use.
256
+
257
+ ```json
258
+ {
259
+ "enabledPlugins": {
260
+ "typescript-lsp@claude-plugins-official": true,
261
+ "security-guidance@claude-plugins-official": true,
262
+ "code-review@claude-plugins-official": true,
263
+ "commit-commands@claude-plugins-official": true,
264
+ "frontend-design@claude-plugins-official": true,
265
+ "superpowers@claude-plugins-official": true,
266
+ "ralph-loop@claude-plugins-official": true,
267
+ "context7@claude-plugins-official": true,
268
+ "code-simplifier@claude-plugins-official": true
269
+ }
270
+ }
271
+ ```
272
+
273
+ ---
274
+
275
+ ## Execution Protocol
276
+
277
+ ### Before Implementation
278
+
279
+ 1. Use `/brainstorming` for creative work or feature design
280
+ 2. Use `/write-plan` for multi-step tasks
281
+ 3. Use `context7` (auto via plugin) for library docs
282
+ 4. Research if needed (research-web agent or web search)
283
+
284
+ ### During Implementation
285
+
286
+ 1. Use superpowers TDD (red-green-refactor)
287
+ 2. Use `/ralph-loop` for autonomous big tasks
288
+ 3. Run quality gates as you go
289
+
290
+ ### After Implementation
291
+
292
+ 1. Run `/simplify` (code-simplifier) on changed files
293
+ 2. Run quality gates (`bun run typecheck && lint && test`)
294
+ 3. Ask user if they want documentation in `/docs`
295
+ 4. Commit via commit-manager agent (FINAL step)
296
+ 5. Update CLAUDE.md with architecture changes
297
+
298
+ ---
299
+
300
+ ## Documentation Policy
301
+
302
+ > Documentation is NOT automatic. It lives in `/docs` and is created only when the user asks.
303
+
304
+ ### After Completing Work
305
+
306
+ Always ask the user:
307
+ ```
308
+ Done! Finished [task]. Want me to:
309
+ 1. Document this in /docs?
310
+ 2. Move on to something else?
311
+ ```
312
+
313
+ ### What NOT to Do
314
+
315
+ - Do NOT auto-generate domain docs
316
+ - Do NOT maintain `.claude/skills/codebase-knowledge/domains/`
317
+ - Do NOT run documenter or domain-updater agents (they were removed in v4)
318
+ - Do NOT create documentation without user consent
319
+
320
+ ---
321
+
322
+ ## Quality Requirements
323
+
324
+ All implementations MUST:
325
+
326
+ - [ ] Pass typecheck (`bun run typecheck`)
327
+ - [ ] Pass lint (`bun run lint`)
328
+ - [ ] Pass unit tests (`bun run test`)
329
+ - [ ] Be committed with conventional commits
330
+ - [ ] Have CLAUDE.md updated with architecture/rule changes
331
+
332
+ ---
333
+
334
+ ## FORBIDDEN Actions
335
+
336
+ | Action | Reason |
337
+ | ------------------------------ | ---------------------------- |
338
+ | Write in non-English | ALL code/docs MUST be in EN |
339
+ | Skip typecheck | Catches runtime errors |
340
+ | Use `any` type | Defeats strict mode |
341
+ | Define types in `src/` | Must be in `types/` |
342
+ | Commit directly to main | Create feature/fix branches |
343
+ | Auto-document without asking | Always ask user first |
344
+ | Skip superpowers for features | Use brainstorming + TDD |
345
+ | Skip code-simplifier | Run /simplify post-implementation |
346
+ | Use MUI/Chakra | Use shadcn/ui + Radix |
347
+ | Files > 400 lines | MUST split into smaller |
348
+ | 'use client' at top level | Push to leaf components only |
349
+ | Waterfall data fetching | Use Promise.all() for parallel |
350
+ | Skip CLAUDE.md update | MUST update after implementations |
351
+
352
+ ---
353
+
354
+ ## Updating start-vibing
355
+
356
+ ```bash
357
+ # Update to latest version
358
+ npx start-vibing@latest
359
+
360
+ # Force overwrite all template files (preserves custom skills)
361
+ npx start-vibing --force
362
+
363
+ # Check current version
364
+ npx start-vibing --version
365
+ ```
366
+
367
+ Template files use smart copy: `.claude/settings.json`, `CLAUDE.md`, and custom skills in `.claude/skills/` are preserved by default. Use `--force` to overwrite everything.