start-vibing 3.0.7 → 3.0.8

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.
Files changed (36) hide show
  1. package/README.md +64 -51
  2. package/package.json +1 -1
  3. package/template/.claude/CLAUDE.md +702 -229
  4. package/template/.claude/agents/claude-md-compactor.md +2 -14
  5. package/template/.claude/agents/documenter.md +0 -7
  6. package/template/.claude/agents/domain-updater.md +2 -7
  7. package/template/.claude/config/README.md +10 -8
  8. package/template/.claude/config/domain-mapping.json +1 -1
  9. package/template/.claude/settings.json +0 -129
  10. package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +51 -416
  11. package/template/.claude/skills/codebase-knowledge/domains/mcp-integration.md +37 -204
  12. package/template/CLAUDE.md +65 -701
  13. package/template/.claude/agents/_archive/13-debugging/build-error-fixer.md +0 -207
  14. package/template/.claude/agents/_archive/13-debugging/debugger.md +0 -149
  15. package/template/.claude/agents/_archive/13-debugging/error-stack-analyzer.md +0 -141
  16. package/template/.claude/agents/_archive/13-debugging/network-debugger.md +0 -208
  17. package/template/.claude/agents/_archive/13-debugging/runtime-error-fixer.md +0 -181
  18. package/template/.claude/agents/_archive/13-debugging/type-error-resolver.md +0 -185
  19. package/template/.claude/agents/_archive/14-validation/final-validator.md +0 -93
  20. package/template/.claude/commands/feature.md +0 -48
  21. package/template/.claude/commands/fix.md +0 -80
  22. package/template/.claude/commands/research.md +0 -107
  23. package/template/.claude/commands/validate.md +0 -72
  24. package/template/.claude/config/mcp-config.json +0 -344
  25. package/template/.claude/hooks/SETUP.md +0 -126
  26. package/template/.claude/hooks/run-hook.cmd +0 -46
  27. package/template/.claude/hooks/run-hook.sh +0 -43
  28. package/template/.claude/hooks/run-hook.ts +0 -230
  29. package/template/.claude/hooks/security-check.js +0 -202
  30. package/template/.claude/hooks/stop-validator.ts +0 -1667
  31. package/template/.claude/hooks/user-prompt-submit.ts +0 -104
  32. package/template/.claude/scripts/mcp-quick-install.ts +0 -151
  33. package/template/.claude/scripts/setup-mcps.ts +0 -651
  34. package/template/.claude/skills/hook-development/SKILL.md +0 -343
  35. package/template/.claude/skills/mongoose-patterns/SKILL.md +0 -499
  36. package/template/.claude/skills/playwright-automation/SKILL.md +0 -438
@@ -1,125 +1,185 @@
1
1
  # Claude Development System - Agent Context
2
2
 
3
- This file provides context for all agents. For user-facing rules, see `/CLAUDE.md`.
3
+ This file provides detailed context for the development system. For user-facing project rules, see `/CLAUDE.md`.
4
4
 
5
5
  ---
6
6
 
7
- ## CLAUDE.md Validation (STOP HOOK ENFORCED)
7
+ ## System Architecture
8
+
9
+ ```
10
+ .claude/
11
+ ├── agents/ # 6 active subagents (flat structure)
12
+ │ └── _archive/ # 82+ archived agents (unused, kept for reference)
13
+ ├── skills/ # 20 skill systems with cache
14
+ ├── scripts/ # Utility scripts (validate-skills.sh)
15
+ ├── config/ # Project-specific configuration
16
+ └── commands/ # Slash commands (feature, fix, research, validate)
17
+ ```
18
+
19
+ ---
20
+
21
+ ## Agents (6 Active Subagents)
22
+
23
+ | Agent | Model | Color | Purpose |
24
+ |-------|-------|-------|---------|
25
+ | **research-web** | sonnet | cyan | Researches best practices (2024-2026) before implementing new features |
26
+ | **documenter** | sonnet | blue | Maps files to domains, creates/updates domain documentation |
27
+ | **domain-updater** | haiku | purple | Records problems, solutions, gotchas in existing domain files |
28
+ | **commit-manager** | haiku | green | Manages git commits, conventional format, workflow completion |
29
+ | **claude-md-compactor** | sonnet | orange | Compacts CLAUDE.md when it exceeds 40k chars |
30
+ | **tester-unit** | sonnet | yellow | Creates unit tests with Vitest for new functions and utilities |
31
+
32
+ ### Agent -> Skill Mapping
8
33
 
9
- The stop hook validates `/CLAUDE.md` before allowing task completion:
34
+ | Agent | Primary Skill | Secondary |
35
+ |-------|---------------|-----------|
36
+ | research-web | research-cache | codebase-knowledge |
37
+ | documenter | docs-tracker | codebase-knowledge |
38
+ | domain-updater | codebase-knowledge | docs-tracker |
39
+ | commit-manager | workflow-state | docs-tracker |
40
+ | claude-md-compactor | - | - |
41
+ | tester-unit | test-coverage | - |
10
42
 
11
- | Check | Requirement |
12
- | ----------------- | --------------------------------------------------------- |
13
- | Character limit | Max 40,000 chars |
14
- | Required sections | Last Change, 30s Overview, Stack, Architecture |
15
- | Last Change | Must be updated with session info (branch, date, summary) |
16
- | Content depth | Relevant rule/flow sections must also be updated |
17
- | No stacking | Only ONE Last Change section (latest only) |
18
- | Branch | Must be on main (PR merged) |
19
- | Git tree | Must be clean (no uncommitted changes) |
43
+ ### Agent Workflow Order
20
44
 
21
- **If CLAUDE.md exceeds 40k chars:** Compact it by removing verbose explanations, keeping critical sections.
45
+ ```
46
+ implement -> quality gates -> domain-updater -> commit-manager -> complete
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Skills (20 Active)
52
+
53
+ Skills are auto-injected into context when the task matches their description. All use the imperative pattern for 95%+ auto-invocation.
54
+
55
+ ### Development Skills
22
56
 
23
- **If not on main:** Complete PR workflow (commit, push, PR, merge, checkout main).
57
+ | Skill | Trigger | Description |
58
+ |-------|---------|-------------|
59
+ | **bun-runtime** | Bun scripts, packages, bundling | Runtime patterns and best practices |
60
+ | **typescript-strict** | Writing/editing .ts/.tsx files | Strict mode: index access, null checks, generics |
61
+ | **react-patterns** | React components, hooks, state | React 19 patterns and best practices |
62
+ | **nextjs-app-router** | Next.js pages, layouts, server components | App Router patterns, data fetching |
63
+ | **trpc-api** | tRPC routers, procedures, middleware | Type-safe API patterns |
64
+ | **zod-validation** | User input, API params, form data | Zod schemas, type inference |
65
+ | **shadcn-ui** | shadcn/ui components | Theming, accessibility, customization |
66
+ | **tailwind-patterns** | Tailwind CSS classes | Responsive, dark mode, animations |
24
67
 
25
- ### Content Depth Rule (CLAUDE_MD_SHALLOW_UPDATE)
68
+ ### Quality & Testing Skills
26
69
 
27
- > **"Last Change" = WHAT was done. Other sections = HOW things work NOW. Both MUST be current.**
70
+ | Skill | Trigger | Description |
71
+ |-------|---------|-------------|
72
+ | **quality-gate** | Before any commit | Runs typecheck, lint, test, build in sequence |
73
+ | **security-scan** | API, auth, user data code | OWASP Top 10, Zod validation (HAS VETO POWER) |
74
+ | **test-coverage** | After implementing features | Creates Vitest unit + Playwright E2E tests |
75
+ | **final-check** | Before completing any task | Validates skills used, docs updated (HAS VETO POWER) |
28
76
 
29
- The stop-validator categorizes changed files and maps them to CLAUDE.md sections:
77
+ ### Infrastructure & DevOps Skills
30
78
 
31
- | Changed Files | Must Also Update |
32
- |---------------|-----------------|
33
- | API/CRUD routes | Critical Rules, HTTP Requests |
34
- | UI components | UI Architecture, Component Organization |
35
- | Pages/layouts | Architecture, Next.js App Router Patterns |
36
- | Styling/aesthetics | UI Architecture, Design System |
37
- | Auth/middleware | Critical Rules, Workflow |
38
- | Database/models | Architecture, Critical Rules |
39
- | Config files | Stack, Configuration |
40
- | Hooks/scripts | Workflow, Stop Hook Validations |
79
+ | Skill | Trigger | Description |
80
+ |-------|---------|-------------|
81
+ | **docker-patterns** | Dockerfile, docker-compose | Multi-stage builds, security patterns |
82
+ | **git-workflow** | Git operations | Commit, branch, merge workflow rules |
83
+ | **performance-patterns** | Slow app, optimization needed | React renders, bundle size, memory leaks |
84
+ | **debugging-patterns** | Errors, stack traces, bugs | Runtime, build, and network error resolution |
41
85
 
42
- If ONLY "Last Change" was modified but **significant** categorized source files changed, `CLAUDE_MD_SHALLOW_UPDATE` blocks completion.
86
+ ### Documentation & Research Skills
43
87
 
44
- **Exempt (minor changes):** < 3 categorized files AND < 30 lines changed AND no new files = Last Change only is OK.
88
+ | Skill | Trigger | Description |
89
+ |-------|---------|-------------|
90
+ | **codebase-knowledge** | Before implementing features | Maps files by domain, tracks connections |
91
+ | **docs-tracker** | After implementation | Detects modified files, creates/updates docs |
92
+ | **research-cache** | Before web research | Checks cached findings to avoid redundant searches |
93
+ | **ui-ux-audit** | Before UI features | Competitors, WCAG 2.1, responsiveness |
45
94
 
46
95
  ---
47
96
 
48
- ## System Architecture
97
+ ## Plugins (5 via enabledPlugins)
49
98
 
50
- ```
51
- .claude/
52
- ├── agents/ # 6 active subagents (flat structure)
53
- │ └── _archive/ # 82+ archived agents (unused, kept for reference)
54
- ├── skills/ # 23 skill systems with cache
55
- ├── scripts/ # Validation scripts (validate-claude-md.ts)
56
- ├── config/ # Project-specific configuration
57
- ├── commands/ # Slash commands (feature, fix, research, validate)
58
- └── hooks/ # stop-validator.ts, user-prompt-submit.ts
59
- ```
99
+ Plugins are auto-installed via `enabledPlugins` in settings.json. They replaced archived agents.
100
+
101
+ | Plugin | Mechanism | Purpose | Replaces |
102
+ |--------|-----------|---------|----------|
103
+ | **typescript-lsp** | LSP server (auto) | Type diagnostics, go-to-def | ts-strict-checker agent |
104
+ | **security-guidance** | PreToolUse hook (auto) | OWASP, vulnerability scan | security-auditor agent |
105
+ | **code-review** | `/code-review` command | Code quality, PR analysis | code-reviewer agent |
106
+ | **commit-commands** | `/commit` command | Git commit, push, PR flows | commit-manager (PR part) |
107
+ | **frontend-design** | `/frontend-design` command | Production-grade UI design | ui-ux-reviewer agent |
60
108
 
61
109
  ---
62
110
 
63
- ## MCP Servers
111
+ ## UI/UX Development (Mandatory Review Process)
112
+
113
+ Any task that touches UI code (`.tsx`, `.jsx`, components, pages, layouts) requires:
114
+
115
+ ### Required Tools
64
116
 
65
- Available MCP servers and their usage:
117
+ | Tool | Purpose | When |
118
+ |------|---------|------|
119
+ | **`/frontend-design` plugin** | Production-grade UI design with high design quality | Before implementing ANY UI feature |
120
+ | **ui-ux-audit skill** | Competitor research, WCAG 2.1 accessibility, responsive audit | Before UI implementation |
121
+ | **Playwright MCP** | Visual verification across viewports (375px, 768px, 1280px+) | After UI implementation |
66
122
 
67
- | Server | Purpose | Used By |
68
- | --------------------- | ---------------------------------- | ---------------------------------------- |
69
- | `context7` | Up-to-date library documentation | research-web agent, direct use |
70
- | `sequential-thinking` | Complex problem-solving | Direct use for planning |
71
- | `memory` | Persistent knowledge graph | domain-updater agent, direct use |
72
- | `playwright` | Browser automation (`--user-data-dir` for persistent sessions) | Direct use for E2E testing |
73
- | `nextjs-devtools` | Next.js specific development tools | Direct use in Next.js projects |
74
- | `mongodb` | MongoDB database operations | Direct use for DB queries |
123
+ ### UI Review Workflow
124
+
125
+ ```
126
+ 1. Research competitors (ui-ux-audit skill)
127
+ 2. Design with /frontend-design plugin
128
+ 3. Implement separate layouts for mobile/tablet/desktop
129
+ 4. Verify with Playwright MCP (all 3 viewports)
130
+ 5. Validate WCAG 2.1 accessibility
131
+ ```
75
132
 
76
- ### MCP Usage Rules
133
+ ### Platform-Specific UIs (NOT just responsive)
77
134
 
78
- - Use `context7` before implementing features with external libraries
79
- - Use `memory` to persist patterns across sessions
80
- - Use `playwright` for E2E testing (sessions persist via `--user-data-dir`)
81
- - Plugins handle security (security-guidance hook) and types (typescript-lsp) automatically
135
+ | Platform | Layout |
136
+ | ----------------- | ------------------------------------------- |
137
+ | Mobile (375px) | Full-screen modals, bottom nav, touch-first |
138
+ | Tablet (768px) | Condensed dropdowns, hybrid nav |
139
+ | Desktop (1280px+) | Sidebar left, top navbar with search |
140
+
141
+ > Never use "responsive-only" design. Build separate UI layouts per platform.
82
142
 
83
143
  ---
84
144
 
85
- ## Configuration Files
145
+ ## MCP Servers (Strict Usage Rules)
86
146
 
87
- Project-specific settings are in `.claude/config/`:
147
+ ### Required MCPs (ALWAYS use these)
88
148
 
89
- | File | Purpose |
90
- | --------------------- | ------------------------------ |
91
- | `project-config.json` | Stack, structure, commands |
92
- | `domain-mapping.json` | File patterns to domains |
93
- | `quality-gates.json` | Quality check commands |
94
- | `testing-config.json` | Test framework and conventions |
95
- | `security-rules.json` | Security audit rules |
149
+ | Server | Purpose | When to Use |
150
+ |--------|---------|-------------|
151
+ | `context7` | Up-to-date library documentation | **ALWAYS** before implementing with ANY library. Never assume docs -- always query. |
152
+ | `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. |
153
+ | `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. |
96
154
 
97
- **RULE:** Agents MUST read config files before acting. Do NOT hardcode project specifics.
155
+ > These 3 MCPs are **non-negotiable**. Skipping them leads to outdated code, poor planning, and untested UIs.
98
156
 
99
- ---
157
+ ### Standard MCPs
100
158
 
101
- ## Agent Skill Mapping
159
+ | Server | Purpose | When to Use |
160
+ |--------|---------|-------------|
161
+ | `memory` | Persistent knowledge graph | Store/recall project patterns across sessions |
162
+ | `nextjs-devtools` | Next.js development tools | Next.js projects (runtime errors, routes, cache) |
163
+ | `mongodb` | MongoDB database operations | DB queries, schema inspection |
164
+ | `jira` | Issue tracking | Pull tasks, create issues, update status |
165
+ | `git` | Git operations | Repo search, history, diffs |
166
+ | `fetch` | Web page reading | Fetch URLs as markdown |
102
167
 
103
- ### Active Subagents (6)
168
+ ---
104
169
 
105
- | Agent | Primary Skill | Secondary |
106
- | ------------------ | ------------------ | ------------------ |
107
- | research-web | research-cache | codebase-knowledge |
108
- | documenter | docs-tracker | codebase-knowledge |
109
- | domain-updater | codebase-knowledge | docs-tracker |
110
- | commit-manager | workflow-state | docs-tracker |
111
- | claude-md-compactor| - | - |
112
- | tester-unit | test-coverage | - |
170
+ ## Configuration Files
113
171
 
114
- ### Plugins (replace archived agents)
172
+ Project-specific settings in `.claude/config/`:
115
173
 
116
- | Plugin | Replaces Old Agent | Mechanism |
117
- | ------------------ | ------------------- | ----------------- |
118
- | security-guidance | security-auditor | PreToolUse hook |
119
- | typescript-lsp | ts-strict-checker | LSP server |
120
- | code-review | code-reviewer | /code-review cmd |
121
- | frontend-design | ui-ux-reviewer | /frontend-design |
122
- | commit-commands | commit-manager (PR) | /commit cmd |
174
+ | File | Purpose |
175
+ |------|---------|
176
+ | `project-config.json` | Stack, structure, commands |
177
+ | `domain-mapping.json` | File patterns to domains |
178
+ | `quality-gates.json` | Quality check commands |
179
+ | `testing-config.json` | Test framework and conventions |
180
+ | `security-rules.json` | Security audit rules |
181
+
182
+ Agents read config files before acting. Do NOT hardcode project specifics.
123
183
 
124
184
  ---
125
185
 
@@ -127,7 +187,7 @@ Project-specific settings are in `.claude/config/`:
127
187
 
128
188
  ### Before ANY implementation:
129
189
 
130
- 1. **Read config** from `.claude/config/` for project specifics
190
+ 1. Read config from `.claude/config/` for project specifics
131
191
  2. Read relevant skill SKILL.md file
132
192
  3. Check skill cache for existing data
133
193
  4. Research if needed (research-web agent or web search)
@@ -135,10 +195,32 @@ Project-specific settings are in `.claude/config/`:
135
195
  ### After implementation:
136
196
 
137
197
  1. Update skill cache with changes
138
- 2. Run quality gates (bun run typecheck && lint && test)
139
- 3. Security handled automatically by security-guidance plugin (PreToolUse hook)
140
- 4. **Update domains** via domain-updater agent (BEFORE commit, keeps git clean)
141
- 5. **Commit** via commit-manager agent (FINAL step)
198
+ 2. Run quality gates (`bun run typecheck && lint && test`)
199
+ 3. Security handled automatically by security-guidance plugin
200
+ 4. Update domains via domain-updater agent
201
+ 5. **Update CLAUDE.md** with architecture/rule changes (see rule below)
202
+ 6. Commit via commit-manager agent (FINAL step)
203
+
204
+ ---
205
+
206
+ ## CLAUDE.md Update Rule (POST-IMPLEMENTATION)
207
+
208
+ After completing any implementation or change that modifies architecture, rules, or conventions:
209
+
210
+ 1. **Update `/CLAUDE.md`** -- The root project CLAUDE.md must reflect current state
211
+ 2. **What to update:**
212
+ - `Last Change` section with branch, date, summary
213
+ - Any section affected by the changes (Architecture, Rules, Stack, etc.)
214
+ - New patterns, gotchas, or conventions discovered
215
+ 3. **What counts as "architecture change":**
216
+ - New files/folders added to the project structure
217
+ - New dependencies or tools added
218
+ - Workflow changes
219
+ - New API routes, pages, or components
220
+ - Configuration changes
221
+ - Any change that a future Claude session would need to know about
222
+ 4. **Format:** Keep it concise. Tables and bullet points over prose.
223
+ 5. **Character limit:** Max 40,000 chars. If exceeded, invoke claude-md-compactor agent.
142
224
 
143
225
  ---
144
226
 
@@ -191,40 +273,15 @@ api.interceptors.response.use(
191
273
  | Type responses | `api.get<UserResponse>('/users')` |
192
274
  | Handle errors centrally | Use interceptors, not try/catch everywhere |
193
275
 
194
- ### When to Create API Wrapper
195
-
196
- ```typescript
197
- // If you call the same endpoint multiple times, create a wrapper:
198
- // lib/api/users.ts
199
- export const usersApi = {
200
- getAll: () => api.get<User[]>('/users'),
201
- getById: (id: string) => api.get<User>(`/users/${id}`),
202
- create: (data: CreateUser) => api.post<User>('/users', data),
203
- update: (id: string, data: UpdateUser) => api.patch<User>(`/users/${id}`, data),
204
- delete: (id: string) => api.delete(`/users/${id}`),
205
- };
206
- ```
207
-
208
- ### FORBIDDEN
209
-
210
- | Don't | Do Instead |
211
- |-------|------------|
212
- | `fetch('/api/...')` | `api.get('/...')` |
213
- | `axios.get(...)` | `api.get(...)` |
214
- | `withCredentials: false` | Always `true` |
215
- | Inline error handling | Use interceptors |
216
-
217
276
  ---
218
277
 
219
278
  ## Enforcement Mechanisms
220
279
 
221
- What blocks the flow if rules are violated:
222
-
223
- | Mechanism | Type | Blocks When |
224
- | --------------------------- | -------------- | --------------------------------------------------- |
225
- | **security-guidance plugin** | PreToolUse hook | Sensitive data exposure, missing validation, OWASP |
226
- | **stop-validator hook** | Stop hook | Branch not main, uncommitted changes, docs missing |
227
- | **quality gates** | Manual / CI | Typecheck, lint, or test failures |
280
+ | Mechanism | Type | Blocks When |
281
+ |-----------|------|-------------|
282
+ | **security-guidance plugin** | PreToolUse hook (auto) | Sensitive data exposure, missing validation, OWASP |
283
+ | **quality gates** | Manual / CI | Typecheck, lint, or test failures |
284
+ | **final-check skill** | Skill (manual) | Any rule violated, tests failing, docs missing |
228
285
 
229
286
  ---
230
287
 
@@ -236,178 +293,594 @@ All implementations MUST:
236
293
  - [ ] Pass lint (`bun run lint`)
237
294
  - [ ] Pass unit tests (`bun run test`)
238
295
  - [ ] Pass build (`bun run build`)
239
- - [ ] Use Playwright MCP for browser testing when needed
240
296
  - [ ] Have documentation updated (documenter agent)
241
- - [ ] Security validated by security-guidance plugin (automatic via hook)
297
+ - [ ] Security validated by security-guidance plugin (automatic)
242
298
  - [ ] Be committed with conventional commits
243
299
  - [ ] Have domains updated with session learnings (domain-updater agent)
300
+ - [ ] Have CLAUDE.md updated with architecture/rule changes
244
301
 
245
302
  ---
246
303
 
247
- ## Claude 4.6 Best Practices
304
+ ## Domain Documentation
248
305
 
249
- > **Source:** [Anthropic Claude 4 Best Practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-4-best-practices)
306
+ Domain docs prevent Claude from re-exploring the codebase every session.
250
307
 
251
- ### Model Selection
308
+ ### Location
252
309
 
253
- | Model | API ID | Cost (In/Out) | Best For |
254
- |-------|--------|---------------|----------|
255
- | **Opus 4.6** | `claude-opus-4-6` | $5/$25 MTok | Orchestrators, long-horizon tasks, 128K output |
256
- | **Sonnet 4.6** | `claude-sonnet-4-6` | $3/$15 MTok | Daily coding, teammates (5x cheaper) |
257
- | **Haiku 4.5** | `claude-haiku-4-5-20251001` | $1/$5 MTok | Classification, simple tasks |
310
+ ```
311
+ .claude/skills/codebase-knowledge/domains/
312
+ ├── claude-system.md # This development system
313
+ ├── authentication.md
314
+ ├── api.md
315
+ ├── ui-components.md
316
+ └── ...
317
+ ```
258
318
 
259
- ### Effort Levels
319
+ ### Domain Mapping
260
320
 
261
- | Level | Behavior | Use Case |
262
- |-------|----------|----------|
263
- | `max` | Always thinks, no limits | Complex architecture (**Opus ONLY**) |
264
- | `high` | Deep thinking (DEFAULT) | Agentic tasks, complex coding |
265
- | `medium` | Moderate, may skip simple | Most workloads |
266
- | `low` | Minimal thinking | Subagents, teammates, high-volume |
321
+ Configured in `.claude/config/domain-mapping.json`:
267
322
 
268
- **CLI:** `/model` then arrow keys to adjust effort.
323
+ | Domain | File Patterns |
324
+ |--------|---------------|
325
+ | authentication | `**/auth/**`, `**/*auth*.ts` |
326
+ | api | `**/api/**`, `**/routers/**` |
327
+ | database | `**/models/**`, `**/*.model.ts` |
328
+ | ui-components | `**/components/**/*.tsx` |
329
+ | pages | `**/app/**/page.tsx` |
269
330
 
270
- ### Adaptive Thinking (Replaces budget_tokens)
331
+ ### Documentation Agents
271
332
 
272
- ```typescript
273
- // CORRECT for 4.6 models
274
- thinking: { type: "adaptive" },
275
- output_config: { effort: "medium" }
333
+ | Agent | Role | When |
334
+ |-------|------|------|
335
+ | **documenter** | Maps files to domains, creates/updates domain files | AFTER implementation |
336
+ | **domain-updater** | Records problems, solutions, gotchas | BEFORE commit |
337
+
338
+ ---
339
+
340
+ ## FORBIDDEN Actions
341
+
342
+ | Action | Reason |
343
+ | ------------------------------ | ---------------------------- |
344
+ | Write in non-English | ALL code/docs MUST be in EN |
345
+ | Skip typecheck | Catches runtime errors |
346
+ | Relative imports (shared) | Breaks when files move |
347
+ | Use `@types/` alias | Reserved by TypeScript |
348
+ | Use `any` type | Defeats strict mode |
349
+ | Skip docker build test | May fail in production |
350
+ | Define types in `src/` | Must be in `types/` |
351
+ | Skip research for new features | Leads to outdated patterns |
352
+ | Skip todo list creation | Loses track of tasks |
353
+ | Make responsive UI only | Must be separate UIs |
354
+ | Commit directly to main | Create feature/fix branches |
355
+ | Skip documenter agent | Documentation is mandatory |
356
+ | Leave files undocumented | Domain docs prevent re-exploration |
357
+ | Stack Last Change entries | Keep only the LATEST |
358
+ | Use Cards on mobile | Waste space in flex-col |
359
+ | Edit JSX without UI review | Use frontend-design plugin or research competitors |
360
+ | Skip planning for features | Use EnterPlanMode first |
361
+ | Skip domain documentation | MUST update domains/*.md |
362
+ | Only update CLAUDE.md | Domains are detail, CLAUDE.md is summary |
363
+ | Skip flow documentation | Document architecture changes in CLAUDE.md |
364
+ | Use MUI/Chakra | Use shadcn/ui + Radix for personality control |
365
+ | Neumorphism on forms | Accessibility issues, use Glassmorphism |
366
+ | Scroll animations on dashboard | Use only on landing/marketing pages |
367
+ | 3D elements on mobile | Performance issues, use sparingly |
368
+ | Masonry grid on mobile | Use vertical lists instead |
369
+ | Mix animation libraries | Pick one primary (Framer or GSAP) |
370
+ | Wildcard icon imports | Use named imports (`import { X } from 'lucide-react'`) |
371
+ | React Icons in production | Use Lucide + Simple Icons directly |
372
+ | Files > 400 lines | MUST split into smaller components |
373
+ | Page components in /components | Use `app/[page]/_components/` |
374
+ | Skip cn utility | MUST use clsx + tailwind-merge |
375
+ | 'use client' at top level | Push to leaf components only |
376
+ | Waterfall data fetching | Use Promise.all() for parallel |
377
+ | Skip loading.tsx | Add skeleton loaders for data pages |
378
+ | Skip CLAUDE.md update | MUST update after implementations |
379
+
380
+ ---
381
+
382
+ ## UI Architecture (MANDATORY)
383
+
384
+ > Web apps MUST have **separate UIs** for each platform, NOT just "responsive design".
276
385
 
277
- // DEPRECATED (will be removed)
278
- thinking: { type: "enabled", budget_tokens: 10000 }
386
+ | Platform | Layout |
387
+ | ----------------- | ------------------------------------------- |
388
+ | Mobile (375px) | Full-screen modals, bottom nav, touch-first |
389
+ | Tablet (768px) | Condensed dropdowns, hybrid nav |
390
+ | Desktop (1280px+) | Sidebar left, top navbar with search |
391
+
392
+ ### JSX Editing = UI Review (MANDATORY)
393
+
394
+ ANY task that edits `.tsx` or `.jsx` files MUST consider all 3 viewports:
395
+
396
+ - Use `/frontend-design` plugin for production-grade UI
397
+ - Design separate layouts for mobile (375px), tablet (768px), desktop (1280px+)
398
+ - Research competitor UIs before implementing new features
399
+
400
+ ---
401
+
402
+ ## UI/UX Design Rules
403
+
404
+ ### Mobile FORBIDDEN Patterns
405
+
406
+ | Pattern | Problem | Use Instead |
407
+ |---------|---------|-------------|
408
+ | Cards in flex-col | Waste vertical space, poor scanning | Compact lists with dividers |
409
+ | Card grids | Too cramped, hard to tap | Full-width list items |
410
+ | Nested cards | Confusing hierarchy | Flat structure |
411
+ | Multiple CTAs per card | Touch confusion | Single primary action |
412
+
413
+ ### Design Principles
414
+
415
+ | Platform | Density | Navigation | Actions |
416
+ |----------|---------|------------|---------|
417
+ | Mobile | LOW - space for touch | Bottom tab bar | Bottom sheet |
418
+ | Tablet | MEDIUM - hybrid | Side + top | Context menus |
419
+ | Desktop | HIGH - data dense | Fixed sidebar | Inline + hover |
420
+
421
+ ### Component Choices
422
+
423
+ ```
424
+ Mobile: Lists > Cards, Sheets > Modals, Tabs > Dropdowns
425
+ Tablet: Collapsible cards, Split views, Floating actions
426
+ Desktop: Data tables, Multi-column forms, Keyboard shortcuts
279
427
  ```
280
428
 
281
- Adaptive thinking enables **interleaved thinking** — Claude reasons BETWEEN tool calls.
429
+ ---
282
430
 
283
- ### Prompting Rules (CRITICAL)
431
+ ## Design System Reference
284
432
 
285
- **AVOID (causes overtriggering):**
286
- - "CRITICAL: You MUST use..."
287
- - "be thorough", "think carefully", "do not be lazy"
288
- - "use the think tool to plan your approach"
433
+ > **Full docs in**: `.claude/skills/research-cache/cache/` (12 detailed files)
289
434
 
290
- **USE INSTEAD:**
291
- - "Use this tool when..." (softer language)
292
- - Remove anti-laziness prompts entirely
293
- - Lower effort level instead of adding constraints
435
+ ### Required Libraries
294
436
 
295
- **Why:** Opus 4.6 does MORE upfront exploration than older models. Anti-laziness prompts cause runaway thinking.
437
+ ```bash
438
+ # Core utilities (MANDATORY)
439
+ bun add clsx tailwind-merge class-variance-authority
440
+ bun add -D tailwindcss-animate
296
441
 
297
- ### Tool Use Patterns
442
+ # Animation & feedback
443
+ bun add @formkit/auto-animate framer-motion sonner
298
444
 
299
- ```text
300
- # Claude will only SUGGEST:
301
- "Can you suggest some changes?"
445
+ # Skeleton loaders
446
+ bun add react-loading-skeleton
302
447
 
303
- # Claude will IMPLEMENT:
304
- "Change this function to improve performance."
448
+ # Copy-paste from: magicui.design, ui.aceternity.com, hover.dev
305
449
  ```
306
450
 
307
- For proactive action by default, add to system prompt:
308
- ```text
309
- By default, implement changes rather than only suggesting them.
451
+ ### The `cn` Utility (MANDATORY)
452
+
453
+ ```typescript
454
+ // lib/utils.ts - MUST HAVE in every project
455
+ import { clsx, type ClassValue } from 'clsx';
456
+ import { twMerge } from 'tailwind-merge';
457
+
458
+ export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
310
459
  ```
311
460
 
312
- ### Subagent Control
461
+ ---
313
462
 
314
- Opus 4.6 has a **strong predilection for subagents** — may spawn them when direct grep/read is faster.
463
+ ## Icon Libraries (MANDATORY)
315
464
 
316
- **Use subagents when:** Parallel tasks, isolated context, independent workstreams
317
- **Work directly when:** Sequential operations, single-file edits, shared state needed
465
+ | Library | Use For | Icons | Import |
466
+ |---------|---------|-------|--------|
467
+ | **Lucide React** | UI icons (shadcn default) | 1,600+ | `import { Camera } from 'lucide-react'` |
468
+ | **Simple Icons** | Brand logos ONLY | 3,150+ | `import { SiReact } from '@icons-pack/react-simple-icons'` |
318
469
 
319
- ```text
320
- # Add if seeing excessive subagent use:
321
- For simple tasks, sequential operations, or single-file edits, work directly.
470
+ ```typescript
471
+ // CORRECT: Named imports (tree-shakable, ~1KB per icon)
472
+ import { Camera, User, Settings } from 'lucide-react';
473
+
474
+ // FORBIDDEN: Wildcard imports (bundles ALL icons, +30KB)
475
+ import * as Icons from 'lucide-react';
322
476
  ```
323
477
 
324
- ### Avoid Over-Engineering
478
+ ---
479
+
480
+ ## Aesthetic Libraries
481
+
482
+ | Library | Purpose | When |
483
+ |---------|---------|------|
484
+ | **clsx + tailwind-merge** | className management | ALWAYS |
485
+ | **class-variance-authority** | Component variants | Reusable components |
486
+ | **tailwindcss-animate** | Micro-interactions | Animations |
487
+ | **react-loading-skeleton** | Loading states | Data fetching |
488
+
489
+ ---
325
490
 
326
- Opus 4.6 tends to create extra files and unnecessary abstractions.
491
+ ## Component Organization (MANDATORY)
327
492
 
328
- ```text
329
- # Add to prompt:
330
- Avoid over-engineering. Only make changes directly requested.
331
- Don't add features, docstrings, or error handling beyond what's asked.
493
+ ### Component Location Rules
494
+
495
+ | Question | Location |
496
+ |----------|----------|
497
+ | Used in ONE page only? | `app/[page]/_components/` |
498
+ | Used across 2+ features? | `components/shared/` |
499
+ | UI primitive (Button, Input)? | `components/ui/` |
500
+ | Layout element (Header, Footer)? | `components/layout/` |
501
+
502
+ ### File Size Rules
503
+
504
+ | Lines | Action |
505
+ |-------|--------|
506
+ | < 200 | Keep in single file |
507
+ | 200-400 | Consider splitting |
508
+ | > 400 | **MUST split** into smaller components |
509
+
510
+ ---
511
+
512
+ ## Next.js App Router Patterns (MANDATORY)
513
+
514
+ ### Server vs Client Components
515
+
516
+ ```tsx
517
+ // DEFAULT: Server Component (no directive needed)
518
+ export default async function Page({ params }) {
519
+ const data = await fetch('...');
520
+ return <ClientButton data={data} />;
521
+ }
522
+
523
+ // Client Component (push to leaves)
524
+ 'use client';
525
+ export function ClientButton({ data }) {
526
+ const [state, setState] = useState();
527
+ return <button onClick={() => setState(!state)}>{data}</button>;
528
+ }
332
529
  ```
333
530
 
334
- ### Parallel Tool Calls
531
+ ### Layout Context Pattern
532
+
533
+ ```tsx
534
+ // app/layout.tsx - Root layout with providers
535
+ import { Providers } from '@/components/providers';
536
+
537
+ export default function RootLayout({ children }) {
538
+ return (
539
+ <html lang="en">
540
+ <body>
541
+ <Providers>{children}</Providers>
542
+ </body>
543
+ </html>
544
+ );
545
+ }
546
+
547
+ // components/providers.tsx - Client-side providers
548
+ 'use client';
549
+ export function Providers({ children }) {
550
+ return (
551
+ <QueryClientProvider client={queryClient}>
552
+ <ThemeProvider>
553
+ {children}
554
+ <Toaster />
555
+ </ThemeProvider>
556
+ </QueryClientProvider>
557
+ );
558
+ }
559
+ ```
560
+
561
+ ### Parallel Data Fetching
562
+
563
+ ```tsx
564
+ // CORRECT: Parallel fetches
565
+ const [user, posts] = await Promise.all([getUser(), getPosts()]);
335
566
 
336
- ```text
337
- # Add for maximum efficiency:
338
- If calling multiple tools with no dependencies, make all calls in parallel.
567
+ // AVOID: Waterfall (sequential)
568
+ const user = await getUser();
569
+ const posts = await getPosts(); // Waits for user
339
570
  ```
340
571
 
341
- ### Cost Control
572
+ ---
573
+
574
+ ## Grid Layouts (Choose by Context)
575
+
576
+ | Grid Type | Use For | Mobile |
577
+ |-----------|---------|--------|
578
+ | **Bento Grid** | Landing, features, portfolios | Stacks vertically |
579
+ | **12-Column** | Dashboards, admin panels | Collapse to 1-2 cols |
580
+ | **Masonry** | Galleries, Pinterest-style | Use vertical list |
581
+ | **Card Grid** | Products, team, blog archive | Stack to single col |
582
+ | **Split Grid** | Hero sections, auth pages | Stack vertically |
583
+ | **Kanban** | Project management, tasks | Horizontal scroll |
584
+
585
+ > **Cache**: `grid-layout-patterns-2025.md`
586
+
587
+ ---
588
+
589
+ ## Modal/Dialog Patterns (Choose by Action)
590
+
591
+ | Modal Type | Use For | Mobile |
592
+ |------------|---------|--------|
593
+ | **Centered Dialog** | Confirmations, short forms | Full-screen |
594
+ | **Slide-over/Drawer** | Filters, settings, details | Bottom sheet |
595
+ | **Bottom Sheet** | Actions, sharing, quick forms | Native feel |
596
+ | **Command Palette** | CMD+K, power users | Full-screen |
597
+ | **Wizard/Stepper** | Multi-step forms, onboarding | Full-screen |
598
+ | **Lightbox** | Images, videos | Full-screen |
599
+
600
+ > **Cache**: `modal-dialog-design-patterns-2024-2025.md`
601
+
602
+ ---
603
+
604
+ ## List Patterns (Choose by Data)
605
+
606
+ | List Type | Use For | Key Feature |
607
+ |-----------|---------|-------------|
608
+ | **Simple List** | Basic items, settings | Dividers |
609
+ | **Avatar List** | Users, contacts | Profile images |
610
+ | **Expandable/Accordion** | FAQs, nested content | Collapse/expand |
611
+ | **Swipeable List** | Mobile actions | Left/right swipe |
612
+ | **Drag & Drop** | Reordering | dnd-kit (NOT react-beautiful-dnd) |
613
+ | **Virtualized** | 1000+ items | react-window or react-virtuoso |
614
+ | **Timeline** | Activity feed, history | Vertical line |
615
+ | **Chat/Messages** | Conversations | Bubbles left/right |
342
616
 
343
- | Issue | Solution |
344
- |-------|----------|
345
- | Runaway thinking | Lower effort (not prompt constraints) |
346
- | `stop_reason: "max_tokens"` | Increase `max_tokens` to 64K+ |
347
- | High costs | Use `low` effort for subagents |
348
- | Billing confusion | Billed for FULL thinking, not visible summary |
617
+ > **Cache**: `list-design-patterns-web-apps.md`
349
618
 
350
- ### Common Pitfalls
619
+ ---
620
+
621
+ ## Multi-Step Forms (MANDATORY for complex forms)
351
622
 
352
- | Pitfall | Fix |
353
- |---------|-----|
354
- | `max` effort on Sonnet/Haiku | Error Opus only |
355
- | Prefilled responses | Deprecated in 4.6 |
356
- | Multiple agents editing same file | Isolate files per agent |
357
- | Aggressive prompts from older models | Remove "MUST", "CRITICAL" |
623
+ | Pattern | Use For | Progress |
624
+ |---------|---------|----------|
625
+ | **Horizontal Stepper** | Onboarding, checkout | Numbers at top |
626
+ | **Card-based Steps** | Settings, profiles | Expandable cards |
627
+ | **Slide Animation** | Typeform-style | Left/right slide |
628
+ | **Accordion Steps** | Long forms | Collapsible sections |
358
629
 
359
- ### API Examples
630
+ ### Form Stack (MANDATORY)
360
631
 
361
632
  ```typescript
362
- // Standard agentic call
363
- await client.messages.create({
364
- model: "claude-opus-4-6",
365
- max_tokens: 64000,
366
- thinking: { type: "adaptive" },
367
- output_config: { effort: "high" },
368
- messages: [...]
633
+ // react-hook-form + Zod + per-step validation
634
+ const { trigger } = useForm<FormData>({ resolver: zodResolver(schema) });
635
+
636
+ const nextStep = async () => {
637
+ const isValid = await trigger(currentStepFields);
638
+ if (!isValid) return;
639
+ setStep(step + 1);
640
+ };
641
+ ```
642
+
643
+ > **Cache**: `multi-step-form-patterns.md`
644
+
645
+ ---
646
+
647
+ ## Toast Notifications (MANDATORY: Sonner)
648
+
649
+ ```typescript
650
+ // Install: pnpm dlx shadcn@latest add sonner
651
+ import { toast } from "sonner";
652
+
653
+ // Promise-based (loading -> success/error)
654
+ toast.promise(saveData(), {
655
+ loading: 'Saving...',
656
+ success: 'Saved!',
657
+ error: 'Failed to save',
369
658
  });
370
659
 
371
- // Cost-optimized subagent
372
- await client.messages.create({
373
- model: "claude-sonnet-4-6",
374
- max_tokens: 16000,
375
- thinking: { type: "adaptive" },
376
- output_config: { effort: "low" },
377
- messages: [...]
660
+ // With action button
661
+ toast('File deleted', {
662
+ action: { label: 'Undo', onClick: () => restoreFile() },
378
663
  });
379
664
  ```
380
665
 
666
+ > **Duration**: 4s info, 7s+ errors. Max 3-5 visible toasts.
667
+
668
+ > **Cache**: `react-toast-notifications.md`
669
+
381
670
  ---
382
671
 
383
- ## Domain Updater Agent
672
+ ## Optimistic UI (MANDATORY for mutations)
384
673
 
385
- The **domain-updater** runs BEFORE commit-manager to ensure git stays clean.
674
+ > Show instant feedback, rollback on error.
386
675
 
387
- ### Purpose
676
+ ### Pattern 1: useOptimistic (React 19)
388
677
 
389
- - Document **problems encountered** during the session
390
- - Record **solutions** applied to fix issues
391
- - Add **prevention tips** for future sessions
392
- - Update **attention points** with new learnings
393
- - Keep domain knowledge **current and accurate**
678
+ ```typescript
679
+ const [optimisticItems, addOptimistic] = useOptimistic(
680
+ items,
681
+ (state, newItem) => [...state, { ...newItem, pending: true }]
682
+ );
394
683
 
395
- ### Trigger
684
+ async function addItem(data: ItemData) {
685
+ addOptimistic(data); // Instant UI update
686
+ try {
687
+ await api.post('/items', data);
688
+ } catch {
689
+ toast.error('Failed to add');
690
+ // State auto-reverts
691
+ }
692
+ }
693
+ ```
396
694
 
397
- Runs in the workflow:
695
+ ### Pattern 2: TanStack Query
696
+
697
+ ```typescript
698
+ useMutation({
699
+ mutationFn: updateItem,
700
+ onMutate: async (newData) => {
701
+ await queryClient.cancelQueries({ queryKey: ['items'] });
702
+ const previous = queryClient.getQueryData(['items']);
703
+ queryClient.setQueryData(['items'], (old) =>
704
+ old.map(item => item.id === newData.id ? { ...item, ...newData } : item)
705
+ );
706
+ return { previous };
707
+ },
708
+ onError: (err, vars, context) => {
709
+ queryClient.setQueryData(['items'], context.previous); // Rollback
710
+ toast.error('Update failed');
711
+ },
712
+ onSettled: () => queryClient.invalidateQueries({ queryKey: ['items'] }),
713
+ });
714
+ ```
715
+
716
+ > **Cache**: `optimistic-ui-patterns-react.md`
717
+
718
+ ---
398
719
 
399
- 1. AFTER implementation and quality gates pass
400
- 2. BEFORE commit-manager (so changes are included in commit)
401
- 3. Stop hook blocks session end until domains are updated (if source files were modified)
720
+ ## Data Display Patterns
721
+
722
+ ### Tables
723
+
724
+ | Style | Use For |
725
+ |-------|---------|
726
+ | **Striped rows** | Long lists, scanning |
727
+ | **Sticky header** | Scrollable data |
728
+ | **Expandable rows** | Details on demand |
729
+ | **Sortable columns** | Data comparison |
730
+ | **Virtualized** | 1000+ rows (TanStack Virtual) |
731
+
732
+ ### Cards
733
+
734
+ | Style | Use For |
735
+ |-------|---------|
736
+ | **Stats/KPI Card** | Metrics with trends |
737
+ | **Product Card** | E-commerce listings |
738
+ | **Profile Card** | User information |
739
+ | **Interactive Card** | Hover effects, animations |
740
+
741
+ > **Cache**: `data-display-patterns-2024-2025.md`
742
+
743
+ ---
744
+
745
+ ## Navigation Patterns
746
+
747
+ | Type | Desktop | Mobile |
748
+ |------|---------|--------|
749
+ | **Header** | Fixed top navbar | Hamburger menu |
750
+ | **Sidebar** | Fixed left, collapsible | Overlay drawer |
751
+ | **Tabs** | Horizontal tabs | Bottom tab bar |
752
+ | **Breadcrumbs** | Path navigation | Simplified |
753
+
754
+ > **Cache**: `navigation-header-design-patterns-2025.md`
755
+
756
+ ---
402
757
 
403
- ### Workflow Order
758
+ ## Animation Libraries
404
759
 
760
+ | Library | Use When | Bundle |
761
+ |---------|----------|--------|
762
+ | **AutoAnimate** | 90% of UI (lists, tabs, dropdowns) | Minimal |
763
+ | **Framer Motion** | Page transitions, gestures, layouts | 32KB |
764
+ | **GSAP** | Scroll-driven, complex timelines | 23KB |
765
+ | **Magic UI** | Landing pages, marketing | Copy-paste |
766
+ | **Aceternity UI** | Portfolios, 3D effects | Copy-paste |
767
+
768
+ ---
769
+
770
+ ## Design Trends (2025)
771
+
772
+ | Trend | Use For | Avoid |
773
+ |-------|---------|-------|
774
+ | **Glassmorphism** | Modals, overlays, dark mode | Light backgrounds |
775
+ | **Minimalism** | Mobile, SaaS, accessibility | Marketing sites |
776
+ | **Bold Typography** | Landing hero, brands | Data dashboards |
777
+
778
+ ---
779
+
780
+ ## Mandatory Planning
781
+
782
+ > Use `EnterPlanMode` for non-trivial tasks BEFORE implementing.
783
+
784
+ | Task Type | Plan Required |
785
+ |-----------|---------------|
786
+ | New feature | YES |
787
+ | UI changes (any JSX) | YES |
788
+ | Multi-file changes | YES |
789
+ | Bug fix (simple) | NO |
790
+ | Single-line fix | NO |
791
+
792
+ ### Plan Format
793
+
794
+ ```
795
+ 1. Analyze current state
796
+ 2. Identify affected files
797
+ 3. Design approach (with alternatives)
798
+ 4. Get user approval
799
+ 5. THEN implement
800
+ ```
801
+
802
+ ---
803
+
804
+ ## Critical Rules
805
+
806
+ ### Path Aliases (MANDATORY)
807
+
808
+ | Alias | Maps To | Use For |
809
+ | ---------- | ------------------- | ------------- |
810
+ | `$types/*` | `./types/*` | Type defs |
811
+ | `@common` | `./common/index.ts` | Logger, utils |
812
+ | `@db` | `./common/db/` | DB connection |
813
+
814
+ > **NEVER** use `@types/` (reserved by TypeScript)
815
+
816
+ ### Types Location
817
+
818
+ - **ALL** interfaces/types MUST be in `types/` folder
819
+ - **NEVER** define types in `src/` files
820
+ - **EXCEPTION:** Zod inferred types and Mongoose Documents
821
+
822
+ ### TypeScript Strict
823
+
824
+ ```typescript
825
+ process.env['VARIABLE']; // CORRECT (bracket notation)
826
+ source: 'listed' as const; // CORRECT (literal type)
827
+ ```
828
+
829
+ ---
830
+
831
+ ## Quality Gates
832
+
833
+ ```bash
834
+ bun run typecheck # MUST pass
835
+ bun run lint # MUST pass
836
+ bun run test # MUST pass
837
+ docker compose build # MUST pass
838
+ bash .claude/scripts/validate-skills.sh # Skills activation check
405
839
  ```
406
- implement → quality gates → domain-updater → commit-manager → complete-task
407
- ↑ ↑
408
- (updates domains) (commits all changes)
840
+
841
+ ---
842
+
843
+ ## Commit Format
844
+
845
+ ```
846
+ [type]: [description]
847
+
848
+ - Detail 1
849
+ - Detail 2
850
+
851
+ Generated with Claude Code
409
852
  ```
410
853
 
411
- ### Configuration
854
+ Types: `feat`, `fix`, `refactor`, `docs`, `chore`
855
+
856
+ ---
412
857
 
413
- Reads domain patterns from `.claude/config/domain-mapping.json`
858
+ ## NRY (Never Repeat Yourself)
859
+
860
+ Common Claude mistakes to avoid:
861
+
862
+ - Multi-line bash with `\` continuations (breaks permissions)
863
+ - Relative paths in permission patterns
864
+ - Executing agent logic manually (use Task tool)
865
+ - Using bash for file operations (use Read/Write/Edit)
866
+ - Ignoring context size (use `/compact`)
867
+
868
+ ---
869
+
870
+ ## Claude 4.6 Best Practices
871
+
872
+ ### Model Selection
873
+
874
+ | Model | API ID | Best For |
875
+ |-------|--------|----------|
876
+ | **Opus 4.6** | `claude-opus-4-6` | Orchestrators, long-horizon tasks |
877
+ | **Sonnet 4.6** | `claude-sonnet-4-6` | Daily coding (5x cheaper) |
878
+ | **Haiku 4.5** | `claude-haiku-4-5-20251001` | Simple tasks |
879
+
880
+ ### Key Rules
881
+
882
+ - Use adaptive thinking (`thinking: { type: "adaptive" }`)
883
+ - Avoid aggressive prompts ("MUST", "CRITICAL") -- causes overtriggering
884
+ - Lower effort level instead of adding constraints
885
+ - Use subagents for parallel tasks, work directly for sequential
886
+ - Avoid over-engineering -- only make requested changes