start-vibing 3.0.9 → 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,305 +1,290 @@
1
- # Project Rules
2
-
3
- > **CHARACTER LIMIT**: Max 40,000 chars. Validate with `wc -m CLAUDE.md` before commit.
4
-
5
- ---
6
-
7
- ## Last Change
8
-
9
- **Branch:** main
10
- **Date:** YYYY-MM-DD
11
- **Summary:** Initial setup with start-vibing.
12
-
13
- ---
14
-
15
- ## 30 Seconds Overview
16
-
17
- UPDATE THIS WITH YOUR PROJECT DESCRIPTION
18
-
19
- ---
20
-
21
- ## Stack
22
-
23
- | Component | Technology |
24
- | ---------- | -------------------------- |
25
- | Runtime | Bun / Node.js |
26
- | Language | TypeScript **strict mode** |
27
- | Validation | Zod |
28
- | Database | MongoDB + Mongoose |
29
- | Testing | Vitest + Playwright |
30
- | UI | React + Tailwind + shadcn |
31
- | Data | TanStack Query + Sonner |
32
- | Forms | react-hook-form + Zod |
33
-
34
- ---
35
-
36
- ## Architecture
37
-
38
- ```
39
- project-root/
40
- ├── CLAUDE.md # THIS FILE - project rules (40k char max)
41
- ├── .claude/
42
- │ ├── agents/ # 6 active subagents
43
- │ └── _archive/ # Archived agents (reference only)
44
- │ ├── skills/ # 20 skill systems (auto-injected by Claude)
45
- │ ├── scripts/ # Utility scripts
46
- ├── config/ # Project configuration
47
- │ └── commands/ # Slash commands
48
- ├── src/
49
- │ ├── app/ # Next.js app router
50
- │ │ ├── (marketing)/ # Route group - public pages
51
- │ │ ├── (app)/ # Route group - authenticated
52
- │ │ │ └── dashboard/
53
- │ │ │ ├── page.tsx
54
- │ │ │ └── _components/ # Page-specific components
55
- │ │ ├── layout.tsx # Root layout with providers
56
- │ └── loading.tsx # Global loading skeleton
57
- │ ├── components/
58
- │ │ ├── ui/ # shadcn primitives
59
- │ │ ├── layout/ # Header, Sidebar, Footer
60
- │ │ ├── shared/ # Cross-feature components
61
- └── providers.tsx # Context providers (client)
62
- └── lib/
63
- ├── utils.ts # cn utility (MANDATORY)
64
- │ └── api/ # axios instances
65
- ├── types/ # ALL TypeScript interfaces (MANDATORY)
66
- ├── tests/ # Test files
67
- └── docs/ # Documentation
68
- ```
69
-
70
- ---
71
-
72
- ## Workflow
73
-
74
- ```
75
- 0. TODO LIST → Create detailed todo list from prompt
76
- 1. BRANCH Create feature/ | fix/ | refactor/ | test/
77
- 2. RESEARCH Run research-web agent for NEW features
78
- 3. IMPLEMENT → Follow project rules
79
- 4. TEST → Run tester-unit agent OR Playwright MCP
80
- 5. DOCUMENT Run documenter agent for modified files
81
- 6. UPDATE Update THIS FILE (CLAUDE.md) with changes
82
- 7. QUALITY bun run typecheck && lint && test
83
- 8. COMMIT → Conventional commits, merge to main
84
- ```
85
-
86
- ---
87
-
88
- ## CLAUDE.md Update Rule (POST-IMPLEMENTATION)
89
-
90
- > After ANY implementation or change, update this file to reflect the current state of the project.
91
-
92
- | Change Type | Sections to Update |
93
- |-------------|-------------------|
94
- | Any file change | Last Change (branch, date, summary) |
95
- | API/CRUD routes | Critical Rules, HTTP Requests |
96
- | UI components | UI Architecture, Component Organization |
97
- | Pages/layouts | Architecture |
98
- | New feature | 30s Overview, Architecture |
99
- | New gotcha | FORBIDDEN or NRY |
100
- | New dependency | Stack, Design System |
101
- | Workflow change | Workflow section |
102
-
103
- ### Rules
104
-
105
- 1. **Last Change** documents WHAT was done
106
- 2. **Other sections** document HOW things work NOW
107
- 3. **Both must be current** — updating only Last Change is insufficient for significant changes
108
- 4. Keep only the LATEST Last Change entry (no stacking)
109
-
110
- ---
111
-
112
- ## Agent System (6 Subagents + 5 Plugins)
113
-
114
- ### Subagents
115
-
116
- | Agent | Purpose |
117
- |-------|---------|
118
- | **research-web** | Researches best practices before new features |
119
- | **documenter** | Maps files to domains, creates/updates domain docs |
120
- | **domain-updater** | Records problems, solutions, learnings |
121
- | **commit-manager** | Manages git commits, conventional format |
122
- | **claude-md-compactor** | Compacts CLAUDE.md when > 40k chars |
123
- | **tester-unit** | Creates unit tests with Vitest |
124
-
125
- ### Plugins (auto-install)
126
-
127
- | Plugin | Purpose |
128
- |--------|---------|
129
- | **typescript-lsp** | Type diagnostics (auto) |
130
- | **security-guidance** | OWASP vulnerability scan (auto) |
131
- | **code-review** | `/code-review` command |
132
- | **commit-commands** | `/commit` command |
133
- | **frontend-design** | `/frontend-design` command |
134
-
135
- ### Skills (20 Active)
136
-
137
- | Category | Skills |
138
- |----------|--------|
139
- | **Development** | bun-runtime, typescript-strict, react-patterns, nextjs-app-router, trpc-api, zod-validation, shadcn-ui, tailwind-patterns |
140
- | **Quality** | quality-gate, security-scan, test-coverage, final-check |
141
- | **Infrastructure** | docker-patterns, git-workflow, performance-patterns, debugging-patterns |
142
- | **Documentation** | codebase-knowledge, docs-tracker, research-cache, ui-ux-audit |
143
-
144
- ---
145
-
146
- ## Critical Rules
147
-
148
- ### HTTP Requests (MANDATORY)
149
-
150
- | Rule | Implementation |
151
- |------|----------------|
152
- | Use axios ONLY | Never `fetch()` or raw `axios` |
153
- | `withCredentials: true` | ALWAYS for cookies/sessions |
154
- | Extend base instance | Create `lib/api/axios.ts` |
155
- | Type responses | `api.get<User>('/users')` |
156
- | Centralize errors | Use interceptors |
157
-
158
- > **See `.claude/CLAUDE.md`** for full axios setup template.
159
-
160
- ### Path Aliases (MANDATORY)
161
-
162
- | Alias | Maps To | Use For |
163
- | ---------- | ------------------- | ------------- |
164
- | `$types/*` | `./types/*` | Type defs |
165
- | `@common` | `./common/index.ts` | Logger, utils |
166
- | `@db` | `./common/db/` | DB connection |
167
-
168
- > **NEVER** use `@types/` (reserved by TypeScript)
169
-
170
- ### Types Location
171
-
172
- - **ALL** interfaces/types MUST be in `types/` folder
173
- - **NEVER** define types in `src/` files
174
- - **EXCEPTION:** Zod inferred types and Mongoose Documents
175
-
176
- ### TypeScript Strict
177
-
178
- ```typescript
179
- process.env['VARIABLE']; // CORRECT (bracket notation)
180
- source: 'listed' as const; // CORRECT (literal type)
181
- ```
182
-
183
- ---
184
-
185
- ## Quality Gates
186
-
187
- ```bash
188
- bun run typecheck # MUST pass
189
- bun run lint # MUST pass
190
- bun run test # MUST pass
191
- docker compose build # MUST pass
192
- ```
193
-
194
- ---
195
-
196
- ## Commit Format
197
-
198
- ```
199
- [type]: [description]
200
-
201
- - Detail 1
202
- - Detail 2
203
-
204
- Generated with Claude Code
205
- ```
206
-
207
- Types: `feat`, `fix`, `refactor`, `docs`, `chore`
208
-
209
- ---
210
-
211
- ## FORBIDDEN Actions
212
-
213
- | Action | Reason |
214
- | ------------------------------ | ---------------------------- |
215
- | Write in non-English | ALL code/docs MUST be in EN |
216
- | Skip typecheck | Catches runtime errors |
217
- | Relative imports (shared) | Breaks when files move |
218
- | Use `@types/` alias | Reserved by TypeScript |
219
- | Use `any` type | Defeats strict mode |
220
- | Skip docker build test | May fail in production |
221
- | Define types in `src/` | Must be in `types/` |
222
- | Skip research for new features | Leads to outdated patterns |
223
- | Skip todo list creation | Loses track of tasks |
224
- | Make responsive UI only | Must be separate UIs |
225
- | Commit directly to main | Create feature/fix branches |
226
- | Skip documenter agent | Documentation is mandatory |
227
- | Leave files undocumented | Domain docs prevent re-exploration |
228
- | Stack Last Change entries | Keep only the LATEST |
229
- | Use Cards on mobile | Waste space in flex-col |
230
- | Edit JSX without UI review | Use frontend-design plugin |
231
- | Skip planning for features | Use EnterPlanMode first |
232
- | Skip domain documentation | MUST update domains/*.md |
233
- | Skip CLAUDE.md update | MUST update after implementations |
234
- | Use MUI/Chakra | Use shadcn/ui + Radix |
235
- | Wildcard icon imports | Use named imports |
236
- | Files > 400 lines | MUST split into smaller components |
237
- | 'use client' at top level | Push to leaf components only |
238
- | Waterfall data fetching | Use Promise.all() for parallel |
239
-
240
- ---
241
-
242
- ## UI Architecture (MANDATORY)
243
-
244
- > Web apps MUST have **separate UIs** for each platform, NOT just "responsive design".
245
-
246
- | Platform | Layout |
247
- | ----------------- | ------------------------------------------- |
248
- | Mobile (375px) | Full-screen modals, bottom nav, touch-first |
249
- | Tablet (768px) | Condensed dropdowns, hybrid nav |
250
- | Desktop (1280px+) | Sidebar left, top navbar with search |
251
-
252
- ---
253
-
254
- ## MCP Servers
255
-
256
- | Server | Purpose | When to Use |
257
- | --------------------- | ----------------------- | ------------------------------------ |
258
- | `context7` | Library documentation | Before implementing with ANY library |
259
- | `sequential-thinking` | Complex problem-solving | Multi-step tasks, planning |
260
- | `memory` | Persistent knowledge | Store/recall project patterns |
261
- | `playwright` | Browser automation | UI testing, page verification |
262
-
263
- ---
264
-
265
- ## Domain Documentation
266
-
267
- > Domain docs prevent Claude from re-exploring the codebase every session.
268
-
269
- ### Location
270
-
271
- ```
272
- .claude/skills/codebase-knowledge/domains/
273
- ├── authentication.md
274
- ├── api.md
275
- ├── ui-components.md
276
- └── ...
277
- ```
278
-
279
- ---
280
-
281
- ## NRY (Never Repeat Yourself)
282
-
283
- - Multi-line bash with `\` continuations (breaks permissions)
284
- - Relative paths in permission patterns
285
- - Using bash for file operations (use Read/Write/Edit)
286
- - Ignoring context size (use `/compact`)
287
-
288
- ---
289
-
290
- ## Configuration
291
-
292
- Project-specific settings in `.claude/config/`:
293
-
294
- - `project-config.json` - Stack, structure, commands
295
- - `domain-mapping.json` - File-to-domain mapping
296
- - `quality-gates.json` - Quality check commands
297
- - `testing-config.json` - Test framework config
298
- - `security-rules.json` - Security audit rules
299
-
300
- ---
301
-
302
- ## Setup by start-vibing
303
-
304
- This project was set up with `npx start-vibing`.
305
- For updates: `npx start-vibing --force`
1
+ # Project Rules
2
+
3
+ > **CHARACTER LIMIT**: Max 40,000 chars. Validate with `wc -m CLAUDE.md` before commit.
4
+
5
+ ---
6
+
7
+ ## Last Change
8
+
9
+ **Branch:** main
10
+ **Date:** YYYY-MM-DD
11
+ **Summary:** Initial setup with start-vibing v4.
12
+
13
+ ---
14
+
15
+ ## 30 Seconds Overview
16
+
17
+ UPDATE THIS WITH YOUR PROJECT DESCRIPTION
18
+
19
+ ---
20
+
21
+ ## Stack
22
+
23
+ | Component | Technology |
24
+ | ---------- | -------------------------- |
25
+ | Runtime | Bun / Node.js |
26
+ | Language | TypeScript **strict mode** |
27
+ | Validation | Zod |
28
+ | Database | MongoDB + Mongoose |
29
+ | Testing | Vitest + Playwright |
30
+ | UI | React + Tailwind + shadcn |
31
+ | Data | TanStack Query + Sonner |
32
+ | Forms | react-hook-form + Zod |
33
+
34
+ ---
35
+
36
+ ## Architecture
37
+
38
+ ```
39
+ project-root/
40
+ ├── CLAUDE.md # THIS FILE - project rules (40k char max)
41
+ ├── .claude/
42
+ │ ├── agents/ # 4 active subagents
43
+ ├── skills/ # Custom skills (auto-injected by Claude)
44
+ │ ├── scripts/ # Utility scripts
45
+ │ ├── config/ # Project configuration
46
+ └── commands/ # Slash commands
47
+ ├── src/
48
+ ├── app/ # Next.js app router
49
+ ├── (marketing)/ # Route group - public pages
50
+ │ │ ├── (app)/ # Route group - authenticated
51
+ │ │ │ └── dashboard/
52
+ │ │ │ ├── page.tsx
53
+ │ │ │ └── _components/ # Page-specific components
54
+ │ │ ├── layout.tsx # Root layout with providers
55
+ │ │ └── loading.tsx # Global loading skeleton
56
+ ├── components/
57
+ ├── ui/ # shadcn primitives
58
+ │ │ ├── layout/ # Header, Sidebar, Footer
59
+ │ │ ├── shared/ # Cross-feature components
60
+ │ │ └── providers.tsx # Context providers (client)
61
+ │ └── lib/
62
+ ├── utils.ts # cn utility (MANDATORY)
63
+ └── api/ # axios instances
64
+ ├── types/ # ALL TypeScript interfaces (MANDATORY)
65
+ ├── tests/ # Test files
66
+ └── docs/ # Documentation (when user requests it)
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Workflow
72
+
73
+ ```
74
+ 0. TODO LIST → Create detailed todo list from prompt
75
+ 1. BRANCH → Create feature/ | fix/ | refactor/ | test/
76
+ 2. RESEARCH Use context7 plugin + web search for NEW features
77
+ 3. PLAN Use superpowers brainstorming + EnterPlanMode
78
+ 4. IMPLEMENT → Use superpowers TDD + ralph-loop for iteration
79
+ 5. TEST → Run tester-unit agent OR Playwright MCP
80
+ 6. QUALITY bun run typecheck && lint && test
81
+ 7. SIMPLIFY Run /simplify (code-simplifier) on changed files
82
+ 8. ASK USER "Done! Want me to document this in /docs?"
83
+ 9. COMMIT → Conventional commits, merge to main
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Key Plugins (9 installed)
89
+
90
+ | Plugin | Purpose | Invocation |
91
+ |--------|---------|------------|
92
+ | **superpowers** | TDD, debugging, brainstorming, planning | Auto + `/brainstorming`, `/execute-plan` |
93
+ | **ralph-loop** | Iterative autonomous dev loop | `/ralph-loop "task" --max-iterations 10` |
94
+ | **context7** | Auto library docs (replaces MCP) | Auto-invokes on library mentions |
95
+ | **code-simplifier** | Refine code quality post-implementation | `/simplify` or ask Claude |
96
+ | **typescript-lsp** | Type diagnostics, go-to-def | Auto (LSP server) |
97
+ | **security-guidance** | OWASP vulnerability scan | Auto (PreToolUse hook) |
98
+ | **code-review** | PR analysis | `/code-review` |
99
+ | **commit-commands** | Git commit, push, PR | `/commit` |
100
+ | **frontend-design** | Production-grade UI design | `/frontend-design` |
101
+
102
+ ### Superpowers Workflow (USE THIS)
103
+
104
+ ```
105
+ 1. /brainstorming → Before any creative work or feature design
106
+ 2. /write-plan → Design implementation plan
107
+ 3. /execute-plan → Execute with TDD (red-green-refactor)
108
+ 4. /systematic-debugging → When bugs appear (root cause first)
109
+ 5. /verification-before-completion → Before claiming done
110
+ ```
111
+
112
+ ### Ralph Loop (USE FOR BIG TASKS)
113
+
114
+ ```bash
115
+ /ralph-loop "implement the full auth system with login, register, forgot password" --max-iterations 15
116
+ ```
117
+
118
+ Claude works autonomously until the task is complete or hits the iteration limit.
119
+
120
+ ---
121
+
122
+ ## Agent System (4 Subagents)
123
+
124
+ | Agent | Purpose |
125
+ |-------|---------|
126
+ | **research-web** | Researches best practices before new features |
127
+ | **commit-manager** | Manages git commits, conventional format |
128
+ | **claude-md-compactor** | Compacts CLAUDE.md when > 40k chars |
129
+ | **tester-unit** | Creates unit tests with Vitest |
130
+
131
+ ---
132
+
133
+ ## Documentation Policy
134
+
135
+ > Documentation lives in `/docs` and is created **only when the user asks**.
136
+
137
+ After completing any task, Claude should ask:
138
+ ```
139
+ Done! Finished [task description]. Want me to:
140
+ 1. Document this in /docs?
141
+ 2. Move on to the next task?
142
+ ```
143
+
144
+ Do NOT auto-document. Do NOT maintain domain docs. Keep it simple.
145
+
146
+ ---
147
+
148
+ ## CLAUDE.md Update Rule (POST-IMPLEMENTATION)
149
+
150
+ > After ANY implementation, update this file to reflect the current state.
151
+
152
+ | Change Type | Sections to Update |
153
+ |-------------|-------------------|
154
+ | Any file change | Last Change (branch, date, summary) |
155
+ | New feature | 30s Overview, Architecture |
156
+ | New dependency | Stack |
157
+ | Workflow change | Workflow section |
158
+
159
+ Keep only the LATEST Last Change entry (no stacking).
160
+
161
+ ---
162
+
163
+ ## Critical Rules
164
+
165
+ ### HTTP Requests (MANDATORY)
166
+
167
+ | Rule | Implementation |
168
+ |------|----------------|
169
+ | Use axios ONLY | Never `fetch()` or raw `axios` |
170
+ | `withCredentials: true` | ALWAYS for cookies/sessions |
171
+ | Extend base instance | Create `lib/api/axios.ts` |
172
+ | Type responses | `api.get<User>('/users')` |
173
+ | Centralize errors | Use interceptors |
174
+
175
+ ### Path Aliases (MANDATORY)
176
+
177
+ | Alias | Maps To | Use For |
178
+ | ---------- | ------------------- | ------------- |
179
+ | `$types/*` | `./types/*` | Type defs |
180
+ | `@common` | `./common/index.ts` | Logger, utils |
181
+ | `@db` | `./common/db/` | DB connection |
182
+
183
+ ### TypeScript Strict
184
+
185
+ ```typescript
186
+ process.env['VARIABLE']; // CORRECT (bracket notation)
187
+ source: 'listed' as const; // CORRECT (literal type)
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Quality Gates
193
+
194
+ ```bash
195
+ bun run typecheck # MUST pass
196
+ bun run lint # MUST pass
197
+ bun run test # MUST pass
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Commit Format
203
+
204
+ ```
205
+ [type]: [description]
206
+
207
+ - Detail 1
208
+ - Detail 2
209
+
210
+ Generated with Claude Code
211
+ ```
212
+
213
+ Types: `feat`, `fix`, `refactor`, `docs`, `chore`
214
+
215
+ ---
216
+
217
+ ## FORBIDDEN Actions
218
+
219
+ | Action | Reason |
220
+ | ------------------------------ | ---------------------------- |
221
+ | Write in non-English | ALL code/docs MUST be in EN |
222
+ | Skip typecheck | Catches runtime errors |
223
+ | Use `any` type | Defeats strict mode |
224
+ | Define types in `src/` | Must be in `types/` |
225
+ | Commit directly to main | Create feature/fix branches |
226
+ | Use MUI/Chakra | Use shadcn/ui + Radix |
227
+ | Wildcard icon imports | Use named imports |
228
+ | Files > 400 lines | MUST split into smaller |
229
+ | 'use client' at top level | Push to leaf components only |
230
+ | Waterfall data fetching | Use Promise.all() for parallel |
231
+ | Auto-document without asking | Ask user first |
232
+ | Skip superpowers for features | Use brainstorming + TDD |
233
+
234
+ ---
235
+
236
+ ## UI Architecture (MANDATORY)
237
+
238
+ > Web apps MUST have **separate UIs** for each platform.
239
+
240
+ | Platform | Layout |
241
+ | ----------------- | ------------------------------------------- |
242
+ | Mobile (375px) | Full-screen modals, bottom nav, touch-first |
243
+ | Tablet (768px) | Condensed dropdowns, hybrid nav |
244
+ | Desktop (1280px+) | Sidebar left, top navbar with search |
245
+
246
+ ---
247
+
248
+ ## MCP Servers
249
+
250
+ | Server | Purpose | When to Use |
251
+ | --------------------- | ----------------------- | ------------------------------------ |
252
+ | `sequential-thinking` | Complex problem-solving | Multi-step tasks, planning |
253
+ | `memory` | Persistent knowledge | Store/recall project patterns |
254
+ | `playwright` | Browser automation | UI testing, page verification |
255
+ | `nextjs-devtools` | Next.js dev tools | Next.js projects only |
256
+ | `mongodb` | Database operations | DB queries, schema inspection |
257
+
258
+ > Note: `context7` is now a **plugin** (auto-invokes on library mentions).
259
+
260
+ ---
261
+
262
+ ## Community Skills (from GitHub)
263
+
264
+ | Skill | Source | Purpose |
265
+ |-------|--------|---------|
266
+ | **react-best-practices** | vercel-labs | React/Next.js perf optimization rules |
267
+ | **web-design-guidelines** | vercel-labs | 100+ WCAG + UX audit rules |
268
+ | **composition-patterns** | vercel-labs | Compound component patterns |
269
+ | **webapp-testing** | anthropics | Real browser test execution |
270
+ | **mcp-builder** | anthropics | MCP server development guide |
271
+
272
+ ---
273
+
274
+ ## Configuration
275
+
276
+ Edit these files in `.claude/config/` for your project:
277
+
278
+ | File | Purpose |
279
+ | --------------------- | -------------------------- |
280
+ | `project-config.json` | Stack, structure, commands |
281
+ | `quality-gates.json` | Quality check commands |
282
+ | `testing-config.json` | Test framework config |
283
+ | `security-rules.json` | Security audit rules |
284
+
285
+ ---
286
+
287
+ ## Setup by start-vibing
288
+
289
+ This project was set up with `npx start-vibing`.
290
+ For updates: `npx start-vibing --force`