start-vibing 2.0.10 → 2.0.12

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 (130) hide show
  1. package/README.md +177 -177
  2. package/package.json +42 -42
  3. package/template/.claude/CLAUDE.md +174 -174
  4. package/template/.claude/agents/01-orchestration/agent-selector.md +130 -130
  5. package/template/.claude/agents/01-orchestration/checkpoint-manager.md +142 -142
  6. package/template/.claude/agents/01-orchestration/context-manager.md +138 -138
  7. package/template/.claude/agents/01-orchestration/error-recovery.md +182 -182
  8. package/template/.claude/agents/01-orchestration/orchestrator.md +114 -114
  9. package/template/.claude/agents/01-orchestration/parallel-coordinator.md +141 -141
  10. package/template/.claude/agents/01-orchestration/task-decomposer.md +121 -121
  11. package/template/.claude/agents/01-orchestration/workflow-router.md +114 -114
  12. package/template/.claude/agents/02-typescript/bun-runtime-expert.md +197 -197
  13. package/template/.claude/agents/02-typescript/esm-resolver.md +193 -193
  14. package/template/.claude/agents/02-typescript/import-alias-enforcer.md +158 -158
  15. package/template/.claude/agents/02-typescript/ts-generics-helper.md +183 -183
  16. package/template/.claude/agents/02-typescript/ts-migration-helper.md +238 -238
  17. package/template/.claude/agents/02-typescript/ts-strict-checker.md +180 -180
  18. package/template/.claude/agents/02-typescript/ts-types-analyzer.md +199 -199
  19. package/template/.claude/agents/02-typescript/type-definition-writer.md +187 -187
  20. package/template/.claude/agents/02-typescript/zod-schema-designer.md +212 -212
  21. package/template/.claude/agents/02-typescript/zod-validator.md +158 -158
  22. package/template/.claude/agents/03-testing/playwright-assertions.md +265 -265
  23. package/template/.claude/agents/03-testing/playwright-e2e.md +247 -247
  24. package/template/.claude/agents/03-testing/playwright-fixtures.md +234 -234
  25. package/template/.claude/agents/03-testing/playwright-multi-viewport.md +256 -256
  26. package/template/.claude/agents/03-testing/playwright-page-objects.md +247 -247
  27. package/template/.claude/agents/03-testing/test-cleanup-manager.md +248 -248
  28. package/template/.claude/agents/03-testing/test-data-generator.md +254 -254
  29. package/template/.claude/agents/03-testing/tester-integration.md +278 -278
  30. package/template/.claude/agents/03-testing/tester-unit.md +207 -207
  31. package/template/.claude/agents/03-testing/vitest-config.md +287 -287
  32. package/template/.claude/agents/04-docker/container-health.md +255 -255
  33. package/template/.claude/agents/04-docker/deployment-validator.md +225 -225
  34. package/template/.claude/agents/04-docker/docker-compose-designer.md +281 -281
  35. package/template/.claude/agents/04-docker/docker-env-manager.md +235 -235
  36. package/template/.claude/agents/04-docker/docker-multi-stage.md +241 -241
  37. package/template/.claude/agents/04-docker/dockerfile-optimizer.md +208 -208
  38. package/template/.claude/agents/05-database/database-seeder.md +273 -273
  39. package/template/.claude/agents/05-database/mongodb-query-optimizer.md +230 -230
  40. package/template/.claude/agents/05-database/mongoose-aggregation.md +306 -306
  41. package/template/.claude/agents/05-database/mongoose-index-optimizer.md +182 -182
  42. package/template/.claude/agents/05-database/mongoose-schema-designer.md +267 -267
  43. package/template/.claude/agents/06-security/auth-session-validator.md +68 -68
  44. package/template/.claude/agents/06-security/input-sanitizer.md +80 -80
  45. package/template/.claude/agents/06-security/owasp-checker.md +97 -97
  46. package/template/.claude/agents/06-security/permission-auditor.md +100 -100
  47. package/template/.claude/agents/06-security/security-auditor.md +84 -84
  48. package/template/.claude/agents/06-security/sensitive-data-scanner.md +83 -83
  49. package/template/.claude/agents/07-documentation/api-documenter.md +136 -136
  50. package/template/.claude/agents/07-documentation/changelog-manager.md +105 -105
  51. package/template/.claude/agents/07-documentation/documenter.md +76 -76
  52. package/template/.claude/agents/07-documentation/domain-updater.md +81 -81
  53. package/template/.claude/agents/07-documentation/jsdoc-generator.md +114 -114
  54. package/template/.claude/agents/07-documentation/readme-generator.md +135 -135
  55. package/template/.claude/agents/08-git/branch-manager.md +58 -58
  56. package/template/.claude/agents/08-git/commit-manager.md +63 -63
  57. package/template/.claude/agents/08-git/pr-creator.md +76 -76
  58. package/template/.claude/agents/09-quality/code-reviewer.md +71 -71
  59. package/template/.claude/agents/09-quality/quality-checker.md +67 -67
  60. package/template/.claude/agents/10-research/best-practices-finder.md +89 -89
  61. package/template/.claude/agents/10-research/competitor-analyzer.md +106 -106
  62. package/template/.claude/agents/10-research/pattern-researcher.md +93 -93
  63. package/template/.claude/agents/10-research/research-cache-manager.md +76 -76
  64. package/template/.claude/agents/10-research/research-web.md +98 -98
  65. package/template/.claude/agents/10-research/tech-evaluator.md +101 -101
  66. package/template/.claude/agents/11-ui-ux/accessibility-auditor.md +136 -136
  67. package/template/.claude/agents/11-ui-ux/design-system-enforcer.md +125 -125
  68. package/template/.claude/agents/11-ui-ux/skeleton-generator.md +118 -118
  69. package/template/.claude/agents/11-ui-ux/ui-desktop.md +132 -132
  70. package/template/.claude/agents/11-ui-ux/ui-mobile.md +98 -98
  71. package/template/.claude/agents/11-ui-ux/ui-tablet.md +110 -110
  72. package/template/.claude/agents/12-performance/api-latency-analyzer.md +156 -156
  73. package/template/.claude/agents/12-performance/bundle-analyzer.md +113 -113
  74. package/template/.claude/agents/12-performance/memory-leak-detector.md +137 -137
  75. package/template/.claude/agents/12-performance/performance-profiler.md +115 -115
  76. package/template/.claude/agents/12-performance/query-optimizer.md +124 -124
  77. package/template/.claude/agents/12-performance/render-optimizer.md +154 -154
  78. package/template/.claude/agents/13-debugging/build-error-fixer.md +207 -207
  79. package/template/.claude/agents/13-debugging/debugger.md +149 -149
  80. package/template/.claude/agents/13-debugging/error-stack-analyzer.md +141 -141
  81. package/template/.claude/agents/13-debugging/network-debugger.md +208 -208
  82. package/template/.claude/agents/13-debugging/runtime-error-fixer.md +181 -181
  83. package/template/.claude/agents/13-debugging/type-error-resolver.md +185 -185
  84. package/template/.claude/agents/14-validation/final-validator.md +93 -93
  85. package/template/.claude/agents/_backup/analyzer.md +134 -134
  86. package/template/.claude/agents/_backup/code-reviewer.md +279 -279
  87. package/template/.claude/agents/_backup/commit-manager.md +219 -219
  88. package/template/.claude/agents/_backup/debugger.md +280 -280
  89. package/template/.claude/agents/_backup/documenter.md +237 -237
  90. package/template/.claude/agents/_backup/domain-updater.md +197 -197
  91. package/template/.claude/agents/_backup/final-validator.md +169 -169
  92. package/template/.claude/agents/_backup/orchestrator.md +149 -149
  93. package/template/.claude/agents/_backup/performance.md +232 -232
  94. package/template/.claude/agents/_backup/quality-checker.md +240 -240
  95. package/template/.claude/agents/_backup/research.md +315 -315
  96. package/template/.claude/agents/_backup/security-auditor.md +192 -192
  97. package/template/.claude/agents/_backup/tester.md +566 -566
  98. package/template/.claude/agents/_backup/ui-ux-reviewer.md +247 -247
  99. package/template/.claude/config/README.md +30 -30
  100. package/template/.claude/config/mcp-config.json +344 -344
  101. package/template/.claude/config/project-config.json +53 -53
  102. package/template/.claude/config/quality-gates.json +46 -46
  103. package/template/.claude/config/security-rules.json +45 -45
  104. package/template/.claude/config/testing-config.json +164 -164
  105. package/template/.claude/hooks/SETUP.md +126 -126
  106. package/template/.claude/hooks/run-hook.ts +176 -176
  107. package/template/.claude/hooks/stop-validator.ts +852 -825
  108. package/template/.claude/hooks/user-prompt-submit.ts +886 -886
  109. package/template/.claude/scripts/mcp-quick-install.ts +151 -151
  110. package/template/.claude/scripts/setup-mcps.ts +651 -651
  111. package/template/.claude/settings.json +275 -275
  112. package/template/.claude/skills/bun-runtime/SKILL.md +430 -430
  113. package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +431 -431
  114. package/template/.claude/skills/codebase-knowledge/domains/mcp-integration.md +295 -295
  115. package/template/.claude/skills/debugging-patterns/SKILL.md +485 -485
  116. package/template/.claude/skills/docker-patterns/SKILL.md +555 -555
  117. package/template/.claude/skills/git-workflow/SKILL.md +454 -454
  118. package/template/.claude/skills/mongoose-patterns/SKILL.md +499 -499
  119. package/template/.claude/skills/nextjs-app-router/SKILL.md +327 -327
  120. package/template/.claude/skills/performance-patterns/SKILL.md +547 -547
  121. package/template/.claude/skills/playwright-automation/SKILL.md +438 -438
  122. package/template/.claude/skills/react-patterns/SKILL.md +389 -389
  123. package/template/.claude/skills/research-cache/SKILL.md +222 -222
  124. package/template/.claude/skills/shadcn-ui/SKILL.md +511 -511
  125. package/template/.claude/skills/tailwind-patterns/SKILL.md +465 -465
  126. package/template/.claude/skills/test-coverage/SKILL.md +467 -467
  127. package/template/.claude/skills/trpc-api/SKILL.md +434 -434
  128. package/template/.claude/skills/typescript-strict/SKILL.md +367 -367
  129. package/template/.claude/skills/zod-validation/SKILL.md +403 -403
  130. package/template/CLAUDE.md +117 -117
@@ -1,431 +1,431 @@
1
- # Claude System
2
-
3
- ## Last Update
4
-
5
- - **Date:** 2026-01-03
6
- - **Commit:** d429772
7
- - **Session:** Universal hook runner with multi-runtime fallback support
8
-
9
- ## Files
10
-
11
- ### Agents (14 total)
12
-
13
- - `.claude/agents/analyzer.md` - Analyzes change impact, approves files
14
- - `.claude/agents/code-reviewer.md` - **NEW** Reviews code quality, patterns, best practices
15
- - `.claude/agents/commit-manager.md` - Manages git commits, runs complete-task
16
- - `.claude/agents/debugger.md` - **NEW** Traces bugs to root cause, analyzes errors
17
- - `.claude/agents/documenter.md` - Creates/updates documentation
18
- - `.claude/agents/domain-updater.md` - Updates domain knowledge after sessions
19
- - `.claude/agents/final-validator.md` - Final validation with VETO power
20
- - `.claude/agents/orchestrator.md` - Coordinates entire workflow
21
- - `.claude/agents/performance.md` - **NEW** Profiles code, identifies bottlenecks
22
- - `.claude/agents/quality-checker.md` - Runs quality gates
23
- - `.claude/agents/research.md` - Researches best practices (2024-2025) before implementation
24
- - `.claude/agents/security-auditor.md` - Security audit with VETO power
25
- - `.claude/agents/tester.md` - Creates unit and E2E tests
26
- - `.claude/agents/ui-ux-reviewer.md` - Reviews UI/UX patterns
27
-
28
- ### Scripts
29
-
30
- - `.claude/scripts/validate-claude-md.ts` - CLAUDE.md validation (char limit, sections, git state)
31
-
32
- ### Hooks
33
-
34
- - `.claude/hooks/run-hook.ts` - **NEW** Universal hook runner with multi-runtime fallback (python3 -> python -> bun -> npx tsx)
35
- - `.claude/hooks/run-hook.sh` - **NEW** Shell wrapper for Unix/Linux/Mac
36
- - `.claude/hooks/run-hook.cmd` - **NEW** Batch wrapper for Windows
37
- - `.claude/hooks/stop-validator.py` - Stop hook enforcement: branch protection + documentation check
38
- - `.claude/hooks/stop-validator.ts` - **NEW** TypeScript fallback version of stop-validator
39
- - `.claude/hooks/user-prompt-submit.py` - Agent selection guidance before prompt processing
40
- - `.claude/hooks/user-prompt-submit.ts` - **NEW** TypeScript fallback version of user-prompt-submit
41
- - `.claude/hooks/check-documentation.py` - Documentation verification hook
42
- - `.claude/hooks/SETUP.md` - Hook system documentation
43
-
44
- ### Skills (with Progressive Disclosure)
45
-
46
- - `.claude/skills/codebase-knowledge/` - Domain mapping system
47
- - `.claude/skills/docs-tracker/` - Documentation tracking
48
- - `.claude/skills/final-check/` - Final validation rules
49
- - `.claude/skills/quality-gate/` - Quality gate definitions
50
- - `scripts/check-all.sh` - **NEW** Runs all quality checks
51
- - `.claude/skills/research-cache/` - Best practices research cache
52
- - `.claude/skills/security-scan/` - Security audit rules
53
- - `reference/owasp-top-10.md` - **NEW** OWASP Top 10 reference
54
- - `scripts/scan.py` - **NEW** Automated security scanner
55
- - `.claude/skills/test-coverage/` - Test coverage tracking
56
- - `reference/playwright-patterns.md` - **NEW** Playwright E2E patterns
57
- - `scripts/coverage-check.sh` - **NEW** Coverage verification script
58
- - `.claude/skills/ui-ux-audit/` - UI/UX audit rules
59
-
60
- ### Configuration
61
-
62
- - `.claude/settings.json` - Agent registration, flows, rules
63
- - `.claude/workflow-state.json` - Current task state
64
- - `.claude/CLAUDE.md` - System documentation
65
-
66
- ### Config Files (NEW - 2024-12-19)
67
-
68
- - `.claude/config/project-config.json` - Stack, structure, commands
69
- - `.claude/config/domain-mapping.json` - File patterns to domains
70
- - `.claude/config/quality-gates.json` - Quality check commands
71
- - `.claude/config/testing-config.json` - Test framework config
72
- - `.claude/config/security-rules.json` - Security audit rules
73
- - `.claude/config/README.md` - Config documentation
74
-
75
- ### Root Files
76
-
77
- - `CLAUDE.md` - Development rules with fallback instruction for agent files (116 lines, generalist)
78
- - `PROJECT.md` - Project-specific details (Solana Listeners)
79
-
80
- ## Connections
81
-
82
- - **All domains:** domain-updater reads/updates domain files after sessions
83
- - **Infrastructure:** Hooks enforce workflow rules project-wide
84
-
85
- ## Recent Commits
86
-
87
- | Hash | Date | Description |
88
- | ------- | ---------- | --------------------------------------------------------------------- |
89
- | d429772 | 2026-01-03 | feat(agents): restructure agent system with 82 specialized sub-agents |
90
- | 70ca50f | 2026-01-02 | feat(start-vibing): auto-install Claude Code and self-update |
91
- | 5c74c95 | 2026-01-02 | feat: add specialized agents and progressive disclosure to skills |
92
- | b5c483b | 2026-01-02 | docs: add agents/skills comparison research with industry benchmarks |
93
- | 0f2c1ff | 2026-01-02 | fix: block ALL changes on main branch, not just protected files |
94
-
95
- ## Problems & Solutions
96
-
97
- ### 2026-01-03 - Universal Hook Runner with Multi-Runtime Fallback
98
-
99
- **Problem:**
100
- Stop hook was failing with `/bin/sh: 1: python: not found` error when Python was not installed on the user's system.
101
-
102
- **Root Cause:**
103
- Hooks were hardcoded to use `python .claude/hooks/*.py` which fails if Python is not in PATH.
104
-
105
- **Solution:**
106
- Created a universal hook runner (`run-hook.ts`) that:
107
-
108
- 1. Tries multiple runtimes in priority order: python3 -> python -> bun -> npx tsx
109
- 2. Python remains primary (user preference)
110
- 3. TypeScript versions of hooks serve as fallback
111
- 4. Returns safe default if no runtime available (doesn't block user)
112
-
113
- **Files Added:**
114
-
115
- - `.claude/hooks/run-hook.ts` - Universal runner with runtime detection
116
- - `.claude/hooks/run-hook.sh` - Shell wrapper for Unix
117
- - `.claude/hooks/run-hook.cmd` - Batch wrapper for Windows
118
- - `.claude/hooks/stop-validator.ts` - TypeScript fallback
119
- - `.claude/hooks/user-prompt-submit.ts` - TypeScript fallback
120
-
121
- **Files Modified:**
122
-
123
- - `.claude/settings.json` - Updated hook commands to use `bun .claude/hooks/run-hook.ts <hook-name>`
124
- - `.claude/hooks/SETUP.md` - Updated documentation
125
-
126
- **Prevention:**
127
-
128
- - Always provide TypeScript fallbacks for Python hooks
129
- - Use runtime detection instead of hardcoded interpreter paths
130
- - Return safe defaults instead of failing
131
-
132
- ---
133
-
134
- ### 2026-01-02 - start-vibing v2.0.0 with Auto-install and Self-update
135
-
136
- **Context:**
137
- User wanted start-vibing to automatically install Claude Code and keep itself updated.
138
-
139
- **Solution:**
140
-
141
- 1. Added 3 new modules to start-vibing:
142
- - `platform.ts` - OS/shell detection (Windows/macOS/Linux)
143
- - `update.ts` - Self-update check with 1-hour cache
144
- - `claude.ts` - Claude Code detection/installation/launch
145
- 2. CLI now checks npm registry for updates on every run
146
- 3. Detects if Claude Code is installed, auto-installs if missing
147
- 4. Launches `claude --dangerously-skip-permissions` after setup
148
- 5. New CLI options: `--no-claude`, `--no-update-check`
149
-
150
- **Result:**
151
-
152
- - Published as start-vibing v2.0.0 on npm
153
- - Zero new runtime dependencies
154
- - Works on Windows (PowerShell, CMD), macOS, and Linux
155
-
156
- **Files Added:**
157
-
158
- - `packages/start-vibing/src/platform.ts`
159
- - `packages/start-vibing/src/update.ts`
160
- - `packages/start-vibing/src/claude.ts`
161
-
162
- ---
163
-
164
- ### 2026-01-02 - Added Specialized Agents and Progressive Disclosure
165
-
166
- **Context:**
167
- Research showed system scored 8.55/10, missing specialized agents and progressive disclosure.
168
-
169
- **Solution:**
170
-
171
- 1. Added 3 new agents:
172
- - `performance.md` - Profiles code, identifies bottlenecks, optimizes
173
- - `debugger.md` - Traces bugs to root cause, analyzes errors
174
- - `code-reviewer.md` - Reviews code quality before testing
175
- 2. Added progressive disclosure to skills:
176
- - Reference files with detailed knowledge
177
- - Executable scripts for automation
178
- 3. Updated workflows:
179
- - code-reviewer in default_flow
180
- - debugger in bug_fix_flow
181
- - New performance_flow
182
-
183
- **Result:**
184
- Score improved from 8.55 to 9.2/10. System now has 14 agents total.
185
-
186
- **Files Added:**
187
-
188
- - `.claude/agents/code-reviewer.md`
189
- - `.claude/agents/debugger.md`
190
- - `.claude/agents/performance.md`
191
- - `.claude/skills/quality-gate/scripts/check-all.sh`
192
- - `.claude/skills/security-scan/reference/owasp-top-10.md`
193
- - `.claude/skills/security-scan/scripts/scan.py`
194
- - `.claude/skills/test-coverage/reference/playwright-patterns.md`
195
- - `.claude/skills/test-coverage/scripts/coverage-check.sh`
196
-
197
- ---
198
-
199
- ### 2026-01-02 - Stop Hook Enhanced for System Files
200
-
201
- **Problem:**
202
- Stop hook was only checking source files for documentation, but allowing changes to system/config files (CLAUDE.md, .claude/, PROJECT.md) directly on main branch without branch protection.
203
-
204
- **Root Cause:**
205
- SYSTEM_CONFIG_PATTERNS were only used for documentation checks, not for branch protection enforcement.
206
-
207
- **Solution:**
208
- Enhanced stop-validator.py to:
209
-
210
- 1. Created `is_system_config_file()` function to detect system/config files
211
- 2. Added `requires_branch_protection()` that checks BOTH source AND system/config files
212
- 3. Updated main() logic to detect and block both types of files on main branch
213
- 4. System files require branch protection but NOT documentation (they ARE docs/configs)
214
-
215
- **Files Modified:**
216
-
217
- - `.claude/hooks/stop-validator.py` - Added system/config file detection functions
218
- - `CLAUDE.md` - Added fallback instruction to read agent files directly if Task tool fails
219
-
220
- **Prevention:**
221
-
222
- - System/config files now treated as protected alongside source code
223
- - Branch protection enforced for CLAUDE.md, .claude/, PROJECT.md
224
- - Documentation requirement applies only to source files, not system files
225
-
226
- ---
227
-
228
- ### 2024-12-19 - Workflow Manager Removed
229
-
230
- **Problem:**
231
- The workflow-manager.py script and enforcement hooks (pre-tool-use.py, post-tool-use.py, stop-validation.py) were blocking operations and adding unnecessary complexity.
232
-
233
- **Root Cause:**
234
- The system was designed with strict workflow enforcement that prevented Claude from working flexibly.
235
-
236
- **Solution:**
237
-
238
- - Deleted workflow-manager.py, pre-tool-use.py, post-tool-use.py, stop-validation.py
239
- - Removed references from all documentation
240
- - Simplified settings.local.json to only keep UserPromptSubmit hook
241
- - Agents now work independently without state tracking requirements
242
-
243
- **Prevention:**
244
- Trust agents to coordinate naturally through Task tool invocation rather than enforcing artificial state machine.
245
-
246
- ---
247
-
248
- - Git tree is clean after session ends
249
-
250
- **Prevention:**
251
-
252
- - domain-updater priority: 9 (runs after final-validator)
253
- - commit-manager priority: 10 (FINAL step)
254
- - Stop hook enforces both must run before session ends
255
-
256
- ---
257
-
258
- ### 2024-12-18 - domain-updater Not Available as Subagent
259
-
260
- **Problem:**
261
- Tried to invoke domain-updater via Task tool but got "Agent type 'domain-updater' not found"
262
-
263
- **Root Cause:**
264
- Agents defined in `.claude/agents/*.md` are instructions for Claude to follow, not subagent_types in Claude Code system
265
-
266
- **Solution:**
267
- Execute domain-updater logic manually or use documenter agent which has similar capabilities
268
-
269
- **Prevention:**
270
- To make an agent invokable via Task tool, it needs to be registered in Claude Code's internal system (separate from .claude/agents/)
271
-
272
- ## Attention Points
273
-
274
- - [2026-01-03] **Hooks use universal runner** - `bun .claude/hooks/run-hook.ts <hook-name>` tries python3 -> python -> bun -> npx tsx
275
- - [2026-01-03] **TypeScript hook fallbacks** - All Python hooks have `.ts` versions for when Python unavailable
276
- - [2026-01-02] **System files protected alongside source** - CLAUDE.md, .claude/, PROJECT.md require branch protection
277
- - [2026-01-02] **CLAUDE.md fallback instruction** - If Task tool fails, read agent files directly from .claude/agents/
278
- - [2024-12-18] **Workflow is enforced by hooks** - Cannot skip steps, hooks will block
279
- - [2024-12-18] **domain-updater is MANDATORY** - Stop hook blocks if not executed
280
- - [2026-01-02] **14 agents total** - Added code-reviewer, debugger, performance agents
281
- - ~~[2024-12-18] **10 agents total**~~ - OUTDATED: Now 14 agents
282
- - [2024-12-18] **Config files (.claude/\*) don't require tests** - Excluded from source file checks
283
- - [2024-12-18] ~~**domain-updater runs complete-task**~~ - OUTDATED: commit-manager now runs complete-task
284
- - [2024-12-18] **.claude/agents/ vs subagent_type** - Agents in .claude/agents/ are instructions, not Claude Code subagents
285
- - [2024-12-18] **Never bypass workflow manually** - Follow the agents properly, don't mark as executed without running
286
- - [2024-12-18] **Use Task tool for agents** - UserPromptSubmit now reminds to use Task(subagent_type="agent-name") instead of manual execution
287
- - [2024-12-18] **Workflow order fixed** - domain-updater runs BEFORE commit-manager (not after) for clean git
288
- - [2024-12-18] **commit-manager is FINAL** - It runs complete-task, not domain-updater
289
- - [2024-12-18] **Stop hook enforces commit** - Blocks if domain-updater ran but commit-manager didn't
290
- - [2024-12-18] **Research agent added** - Mandatory for features/fixes, runs after analyzer
291
- - [2026-01-02] **Progressive disclosure** - Skills have reference/ and scripts/ folders for detailed knowledge
292
- - ~~[2024-12-18] **11 agents total**~~ - OUTDATED: Now 14 agents
293
- - [2024-12-18] **workflow-state.json in .gitignore** - Transient state, not tracked in git
294
- - [2024-12-19] **Config files for project specifics** - Agents read from `.claude/config/*.json` instead of hardcoding
295
- - [2024-12-19] **CLAUDE.md < 300 lines** - Best practice from Anthropic, ideally < 60 lines
296
- - [2024-12-19] **PROJECT.md for project details** - Separate from generic CLAUDE.md
297
- - [2024-12-19] **Pre-tool-use wildcard issue** - Pattern `.claude/config/*` doesn't match absolute paths, use specific files
298
- - [2024-12-19] **Tester agent v3.0** - Complete Playwright E2E architecture with fixture-based cleanup
299
- - [2024-12-19] **E2E cleanup is MANDATORY** - Track all created IDs, delete ONLY tracked data after tests
300
- - [2024-12-19] **Multi-viewport testing** - Desktop (1280x800), Tablet (768x1024), iPhone SE (375x667) required
301
- - [2024-12-19] **DB validation in E2E** - Always verify database state after UI actions
302
- - [2024-12-19] **Real auth only** - Never mock authentication in E2E tests
303
- - [2024-12-19] **data-testid required** - All interactive elements must have data-testid attributes
304
- - [2024-12-19] **SKILL.md YAML frontmatter** - ALL skills MUST have `---` frontmatter with name, description
305
- - [2024-12-19] **Skill name format** - max 64 chars, lowercase, letters/numbers/hyphens only
306
- - [2024-12-19] **Skill description** - max 1024 chars, describes WHAT skill does and WHEN to use it
307
- - [2024-12-19] **allowed-tools optional** - Comma-separated tool names to restrict skill capabilities
308
- - [2024-12-19] **Hooks config correct** - settings.json hooks format is valid, uses command type with python scripts
309
-
310
- ## Problems & Solutions (2024-12-19)
311
-
312
- ### 2024-12-19 - CLAUDE.md Too Long and Specific
313
-
314
- **Problem:**
315
- CLAUDE.md had 594 lines, 95% specific to Solana Listeners project. Too long for Claude to follow consistently.
316
-
317
- **Root Cause:**
318
- Project-specific details (workers, docker config, path aliases examples) mixed with universal rules.
319
-
320
- **Solution:**
321
-
322
- 1. Reduced CLAUDE.md to 115 lines (universal rules only)
323
- 2. Created `PROJECT.md` with project-specific details
324
- 3. Created `.claude/config/` with JSON configs for project specifics
325
- 4. Updated agents to read from config files
326
-
327
- **Prevention:**
328
-
329
- - Keep CLAUDE.md under 300 lines (ideally < 60)
330
- - Put project specifics in PROJECT.md
331
- - Use `.claude/config/` for things agents need to adapt to
332
-
333
- ---
334
-
335
- ### 2024-12-19 - Pre-Tool-Use Wildcard Pattern Not Working
336
-
337
- **Problem:**
338
- Approved files with pattern `.claude/config/*` but hook still blocked edits to `.claude/config/project-config.json`
339
-
340
- **Root Cause:**
341
- Hook checks `file_path.startswith(approved[:-1])` but file_path is absolute path `C:/Users/.../` while approved is relative `.claude/config/*`
342
-
343
- **Solution:**
344
- Approve each file individually instead of using wildcard patterns
345
-
346
- **Prevention:**
347
- When using approve-files, list specific files rather than wildcards if path matching issues occur
348
-
349
- ---
350
-
351
- ### 2024-12-19 - E2E Test Data Pollution
352
-
353
- **Problem:**
354
- E2E tests created data in the database but didn't clean up, causing test pollution and confusion with real data.
355
-
356
- **Root Cause:**
357
- Tests were creating users, items, etc. but not tracking or deleting them after completion.
358
-
359
- **Solution:**
360
- Implemented fixture-based cleanup pattern:
361
-
362
- 1. `createdIds` fixture tracks all created document IDs by collection
363
- 2. `trackCreated(collection, id)` function to register created data
364
- 3. Auto-cleanup runs after each test, even on failure
365
- 4. Only deletes tracked IDs, never affects real data
366
-
367
- **Prevention:**
368
-
369
- - Always use `trackCreated()` immediately after creating data
370
- - Use the custom `test` from fixtures, not base Playwright `test`
371
- - Verify cleanup is working with DB inspection
372
-
373
- ---
374
-
375
- ### 2024-12-19 - Tester Agent Missing E2E Architecture
376
-
377
- **Problem:**
378
- Tester agent didn't have comprehensive E2E testing patterns for Playwright.
379
-
380
- **Root Cause:**
381
- Previous version focused on unit tests, lacked E2E architecture.
382
-
383
- **Solution:**
384
- Rewrote tester.md with complete Playwright architecture:
385
-
386
- - Fixture-based cleanup pattern
387
- - Multi-viewport testing (desktop, tablet, mobile)
388
- - Database validation after UI actions
389
- - API testing (REST and tRPC)
390
- - Real authentication flows
391
- - Storage state for session reuse
392
- - Security testing (forbidden requests, rate limiting)
393
-
394
- **Prevention:**
395
-
396
- - Always test all viewports
397
- - Always verify DB state, don't trust UI alone
398
- - Use real auth, never mock it
399
-
400
- ---
401
-
402
- ### 2024-12-19 - Skills Missing YAML Frontmatter
403
-
404
- **Problem:**
405
- All SKILL.md files started with `# Title` instead of YAML frontmatter, making them undiscoverable by Claude Code.
406
-
407
- **Root Cause:**
408
- Skills were created as plain markdown without the required YAML frontmatter that Claude Code uses to discover and load skills.
409
-
410
- **Solution:**
411
- Added YAML frontmatter to all 8 SKILL.md files:
412
-
413
- ```yaml
414
- ---
415
- name: skill-name-lowercase
416
- description: What skill does and when to use it
417
- allowed-tools: Tool1, Tool2 # optional
418
- ---
419
- ```
420
-
421
- **Fixed Files:**
422
-
423
- - quality-gate, security-scan, codebase-knowledge, docs-tracker
424
- - final-check, ui-ux-audit, research-cache, test-coverage
425
-
426
- **Prevention:**
427
-
428
- - Quality-checker now validates SKILL.md format
429
- - All new skills MUST start with YAML frontmatter
430
- - name: lowercase-with-hyphens, max 64 chars
431
- - description: non-empty, max 1024 chars
1
+ # Claude System
2
+
3
+ ## Last Update
4
+
5
+ - **Date:** 2026-01-03
6
+ - **Commit:** d429772
7
+ - **Session:** Universal hook runner with multi-runtime fallback support
8
+
9
+ ## Files
10
+
11
+ ### Agents (14 total)
12
+
13
+ - `.claude/agents/analyzer.md` - Analyzes change impact, approves files
14
+ - `.claude/agents/code-reviewer.md` - **NEW** Reviews code quality, patterns, best practices
15
+ - `.claude/agents/commit-manager.md` - Manages git commits, runs complete-task
16
+ - `.claude/agents/debugger.md` - **NEW** Traces bugs to root cause, analyzes errors
17
+ - `.claude/agents/documenter.md` - Creates/updates documentation
18
+ - `.claude/agents/domain-updater.md` - Updates domain knowledge after sessions
19
+ - `.claude/agents/final-validator.md` - Final validation with VETO power
20
+ - `.claude/agents/orchestrator.md` - Coordinates entire workflow
21
+ - `.claude/agents/performance.md` - **NEW** Profiles code, identifies bottlenecks
22
+ - `.claude/agents/quality-checker.md` - Runs quality gates
23
+ - `.claude/agents/research.md` - Researches best practices (2024-2025) before implementation
24
+ - `.claude/agents/security-auditor.md` - Security audit with VETO power
25
+ - `.claude/agents/tester.md` - Creates unit and E2E tests
26
+ - `.claude/agents/ui-ux-reviewer.md` - Reviews UI/UX patterns
27
+
28
+ ### Scripts
29
+
30
+ - `.claude/scripts/validate-claude-md.ts` - CLAUDE.md validation (char limit, sections, git state)
31
+
32
+ ### Hooks
33
+
34
+ - `.claude/hooks/run-hook.ts` - **NEW** Universal hook runner with multi-runtime fallback (python3 -> python -> bun -> npx tsx)
35
+ - `.claude/hooks/run-hook.sh` - **NEW** Shell wrapper for Unix/Linux/Mac
36
+ - `.claude/hooks/run-hook.cmd` - **NEW** Batch wrapper for Windows
37
+ - `.claude/hooks/stop-validator.py` - Stop hook enforcement: branch protection + documentation check
38
+ - `.claude/hooks/stop-validator.ts` - **NEW** TypeScript fallback version of stop-validator
39
+ - `.claude/hooks/user-prompt-submit.py` - Agent selection guidance before prompt processing
40
+ - `.claude/hooks/user-prompt-submit.ts` - **NEW** TypeScript fallback version of user-prompt-submit
41
+ - `.claude/hooks/check-documentation.py` - Documentation verification hook
42
+ - `.claude/hooks/SETUP.md` - Hook system documentation
43
+
44
+ ### Skills (with Progressive Disclosure)
45
+
46
+ - `.claude/skills/codebase-knowledge/` - Domain mapping system
47
+ - `.claude/skills/docs-tracker/` - Documentation tracking
48
+ - `.claude/skills/final-check/` - Final validation rules
49
+ - `.claude/skills/quality-gate/` - Quality gate definitions
50
+ - `scripts/check-all.sh` - **NEW** Runs all quality checks
51
+ - `.claude/skills/research-cache/` - Best practices research cache
52
+ - `.claude/skills/security-scan/` - Security audit rules
53
+ - `reference/owasp-top-10.md` - **NEW** OWASP Top 10 reference
54
+ - `scripts/scan.py` - **NEW** Automated security scanner
55
+ - `.claude/skills/test-coverage/` - Test coverage tracking
56
+ - `reference/playwright-patterns.md` - **NEW** Playwright E2E patterns
57
+ - `scripts/coverage-check.sh` - **NEW** Coverage verification script
58
+ - `.claude/skills/ui-ux-audit/` - UI/UX audit rules
59
+
60
+ ### Configuration
61
+
62
+ - `.claude/settings.json` - Agent registration, flows, rules
63
+ - `.claude/workflow-state.json` - Current task state
64
+ - `.claude/CLAUDE.md` - System documentation
65
+
66
+ ### Config Files (NEW - 2024-12-19)
67
+
68
+ - `.claude/config/project-config.json` - Stack, structure, commands
69
+ - `.claude/config/domain-mapping.json` - File patterns to domains
70
+ - `.claude/config/quality-gates.json` - Quality check commands
71
+ - `.claude/config/testing-config.json` - Test framework config
72
+ - `.claude/config/security-rules.json` - Security audit rules
73
+ - `.claude/config/README.md` - Config documentation
74
+
75
+ ### Root Files
76
+
77
+ - `CLAUDE.md` - Development rules with fallback instruction for agent files (116 lines, generalist)
78
+ - `PROJECT.md` - Project-specific details (Solana Listeners)
79
+
80
+ ## Connections
81
+
82
+ - **All domains:** domain-updater reads/updates domain files after sessions
83
+ - **Infrastructure:** Hooks enforce workflow rules project-wide
84
+
85
+ ## Recent Commits
86
+
87
+ | Hash | Date | Description |
88
+ | ------- | ---------- | --------------------------------------------------------------------- |
89
+ | d429772 | 2026-01-03 | feat(agents): restructure agent system with 82 specialized sub-agents |
90
+ | 70ca50f | 2026-01-02 | feat(start-vibing): auto-install Claude Code and self-update |
91
+ | 5c74c95 | 2026-01-02 | feat: add specialized agents and progressive disclosure to skills |
92
+ | b5c483b | 2026-01-02 | docs: add agents/skills comparison research with industry benchmarks |
93
+ | 0f2c1ff | 2026-01-02 | fix: block ALL changes on main branch, not just protected files |
94
+
95
+ ## Problems & Solutions
96
+
97
+ ### 2026-01-03 - Universal Hook Runner with Multi-Runtime Fallback
98
+
99
+ **Problem:**
100
+ Stop hook was failing with `/bin/sh: 1: python: not found` error when Python was not installed on the user's system.
101
+
102
+ **Root Cause:**
103
+ Hooks were hardcoded to use `python .claude/hooks/*.py` which fails if Python is not in PATH.
104
+
105
+ **Solution:**
106
+ Created a universal hook runner (`run-hook.ts`) that:
107
+
108
+ 1. Tries multiple runtimes in priority order: python3 -> python -> bun -> npx tsx
109
+ 2. Python remains primary (user preference)
110
+ 3. TypeScript versions of hooks serve as fallback
111
+ 4. Returns safe default if no runtime available (doesn't block user)
112
+
113
+ **Files Added:**
114
+
115
+ - `.claude/hooks/run-hook.ts` - Universal runner with runtime detection
116
+ - `.claude/hooks/run-hook.sh` - Shell wrapper for Unix
117
+ - `.claude/hooks/run-hook.cmd` - Batch wrapper for Windows
118
+ - `.claude/hooks/stop-validator.ts` - TypeScript fallback
119
+ - `.claude/hooks/user-prompt-submit.ts` - TypeScript fallback
120
+
121
+ **Files Modified:**
122
+
123
+ - `.claude/settings.json` - Updated hook commands to use `bun .claude/hooks/run-hook.ts <hook-name>`
124
+ - `.claude/hooks/SETUP.md` - Updated documentation
125
+
126
+ **Prevention:**
127
+
128
+ - Always provide TypeScript fallbacks for Python hooks
129
+ - Use runtime detection instead of hardcoded interpreter paths
130
+ - Return safe defaults instead of failing
131
+
132
+ ---
133
+
134
+ ### 2026-01-02 - start-vibing v2.0.0 with Auto-install and Self-update
135
+
136
+ **Context:**
137
+ User wanted start-vibing to automatically install Claude Code and keep itself updated.
138
+
139
+ **Solution:**
140
+
141
+ 1. Added 3 new modules to start-vibing:
142
+ - `platform.ts` - OS/shell detection (Windows/macOS/Linux)
143
+ - `update.ts` - Self-update check with 1-hour cache
144
+ - `claude.ts` - Claude Code detection/installation/launch
145
+ 2. CLI now checks npm registry for updates on every run
146
+ 3. Detects if Claude Code is installed, auto-installs if missing
147
+ 4. Launches `claude --dangerously-skip-permissions` after setup
148
+ 5. New CLI options: `--no-claude`, `--no-update-check`
149
+
150
+ **Result:**
151
+
152
+ - Published as start-vibing v2.0.0 on npm
153
+ - Zero new runtime dependencies
154
+ - Works on Windows (PowerShell, CMD), macOS, and Linux
155
+
156
+ **Files Added:**
157
+
158
+ - `packages/start-vibing/src/platform.ts`
159
+ - `packages/start-vibing/src/update.ts`
160
+ - `packages/start-vibing/src/claude.ts`
161
+
162
+ ---
163
+
164
+ ### 2026-01-02 - Added Specialized Agents and Progressive Disclosure
165
+
166
+ **Context:**
167
+ Research showed system scored 8.55/10, missing specialized agents and progressive disclosure.
168
+
169
+ **Solution:**
170
+
171
+ 1. Added 3 new agents:
172
+ - `performance.md` - Profiles code, identifies bottlenecks, optimizes
173
+ - `debugger.md` - Traces bugs to root cause, analyzes errors
174
+ - `code-reviewer.md` - Reviews code quality before testing
175
+ 2. Added progressive disclosure to skills:
176
+ - Reference files with detailed knowledge
177
+ - Executable scripts for automation
178
+ 3. Updated workflows:
179
+ - code-reviewer in default_flow
180
+ - debugger in bug_fix_flow
181
+ - New performance_flow
182
+
183
+ **Result:**
184
+ Score improved from 8.55 to 9.2/10. System now has 14 agents total.
185
+
186
+ **Files Added:**
187
+
188
+ - `.claude/agents/code-reviewer.md`
189
+ - `.claude/agents/debugger.md`
190
+ - `.claude/agents/performance.md`
191
+ - `.claude/skills/quality-gate/scripts/check-all.sh`
192
+ - `.claude/skills/security-scan/reference/owasp-top-10.md`
193
+ - `.claude/skills/security-scan/scripts/scan.py`
194
+ - `.claude/skills/test-coverage/reference/playwright-patterns.md`
195
+ - `.claude/skills/test-coverage/scripts/coverage-check.sh`
196
+
197
+ ---
198
+
199
+ ### 2026-01-02 - Stop Hook Enhanced for System Files
200
+
201
+ **Problem:**
202
+ Stop hook was only checking source files for documentation, but allowing changes to system/config files (CLAUDE.md, .claude/, PROJECT.md) directly on main branch without branch protection.
203
+
204
+ **Root Cause:**
205
+ SYSTEM_CONFIG_PATTERNS were only used for documentation checks, not for branch protection enforcement.
206
+
207
+ **Solution:**
208
+ Enhanced stop-validator.py to:
209
+
210
+ 1. Created `is_system_config_file()` function to detect system/config files
211
+ 2. Added `requires_branch_protection()` that checks BOTH source AND system/config files
212
+ 3. Updated main() logic to detect and block both types of files on main branch
213
+ 4. System files require branch protection but NOT documentation (they ARE docs/configs)
214
+
215
+ **Files Modified:**
216
+
217
+ - `.claude/hooks/stop-validator.py` - Added system/config file detection functions
218
+ - `CLAUDE.md` - Added fallback instruction to read agent files directly if Task tool fails
219
+
220
+ **Prevention:**
221
+
222
+ - System/config files now treated as protected alongside source code
223
+ - Branch protection enforced for CLAUDE.md, .claude/, PROJECT.md
224
+ - Documentation requirement applies only to source files, not system files
225
+
226
+ ---
227
+
228
+ ### 2024-12-19 - Workflow Manager Removed
229
+
230
+ **Problem:**
231
+ The workflow-manager.py script and enforcement hooks (pre-tool-use.py, post-tool-use.py, stop-validation.py) were blocking operations and adding unnecessary complexity.
232
+
233
+ **Root Cause:**
234
+ The system was designed with strict workflow enforcement that prevented Claude from working flexibly.
235
+
236
+ **Solution:**
237
+
238
+ - Deleted workflow-manager.py, pre-tool-use.py, post-tool-use.py, stop-validation.py
239
+ - Removed references from all documentation
240
+ - Simplified settings.local.json to only keep UserPromptSubmit hook
241
+ - Agents now work independently without state tracking requirements
242
+
243
+ **Prevention:**
244
+ Trust agents to coordinate naturally through Task tool invocation rather than enforcing artificial state machine.
245
+
246
+ ---
247
+
248
+ - Git tree is clean after session ends
249
+
250
+ **Prevention:**
251
+
252
+ - domain-updater priority: 9 (runs after final-validator)
253
+ - commit-manager priority: 10 (FINAL step)
254
+ - Stop hook enforces both must run before session ends
255
+
256
+ ---
257
+
258
+ ### 2024-12-18 - domain-updater Not Available as Subagent
259
+
260
+ **Problem:**
261
+ Tried to invoke domain-updater via Task tool but got "Agent type 'domain-updater' not found"
262
+
263
+ **Root Cause:**
264
+ Agents defined in `.claude/agents/*.md` are instructions for Claude to follow, not subagent_types in Claude Code system
265
+
266
+ **Solution:**
267
+ Execute domain-updater logic manually or use documenter agent which has similar capabilities
268
+
269
+ **Prevention:**
270
+ To make an agent invokable via Task tool, it needs to be registered in Claude Code's internal system (separate from .claude/agents/)
271
+
272
+ ## Attention Points
273
+
274
+ - [2026-01-03] **Hooks use universal runner** - `bun .claude/hooks/run-hook.ts <hook-name>` tries python3 -> python -> bun -> npx tsx
275
+ - [2026-01-03] **TypeScript hook fallbacks** - All Python hooks have `.ts` versions for when Python unavailable
276
+ - [2026-01-02] **System files protected alongside source** - CLAUDE.md, .claude/, PROJECT.md require branch protection
277
+ - [2026-01-02] **CLAUDE.md fallback instruction** - If Task tool fails, read agent files directly from .claude/agents/
278
+ - [2024-12-18] **Workflow is enforced by hooks** - Cannot skip steps, hooks will block
279
+ - [2024-12-18] **domain-updater is MANDATORY** - Stop hook blocks if not executed
280
+ - [2026-01-02] **14 agents total** - Added code-reviewer, debugger, performance agents
281
+ - ~~[2024-12-18] **10 agents total**~~ - OUTDATED: Now 14 agents
282
+ - [2024-12-18] **Config files (.claude/\*) don't require tests** - Excluded from source file checks
283
+ - [2024-12-18] ~~**domain-updater runs complete-task**~~ - OUTDATED: commit-manager now runs complete-task
284
+ - [2024-12-18] **.claude/agents/ vs subagent_type** - Agents in .claude/agents/ are instructions, not Claude Code subagents
285
+ - [2024-12-18] **Never bypass workflow manually** - Follow the agents properly, don't mark as executed without running
286
+ - [2024-12-18] **Use Task tool for agents** - UserPromptSubmit now reminds to use Task(subagent_type="agent-name") instead of manual execution
287
+ - [2024-12-18] **Workflow order fixed** - domain-updater runs BEFORE commit-manager (not after) for clean git
288
+ - [2024-12-18] **commit-manager is FINAL** - It runs complete-task, not domain-updater
289
+ - [2024-12-18] **Stop hook enforces commit** - Blocks if domain-updater ran but commit-manager didn't
290
+ - [2024-12-18] **Research agent added** - Mandatory for features/fixes, runs after analyzer
291
+ - [2026-01-02] **Progressive disclosure** - Skills have reference/ and scripts/ folders for detailed knowledge
292
+ - ~~[2024-12-18] **11 agents total**~~ - OUTDATED: Now 14 agents
293
+ - [2024-12-18] **workflow-state.json in .gitignore** - Transient state, not tracked in git
294
+ - [2024-12-19] **Config files for project specifics** - Agents read from `.claude/config/*.json` instead of hardcoding
295
+ - [2024-12-19] **CLAUDE.md < 300 lines** - Best practice from Anthropic, ideally < 60 lines
296
+ - [2024-12-19] **PROJECT.md for project details** - Separate from generic CLAUDE.md
297
+ - [2024-12-19] **Pre-tool-use wildcard issue** - Pattern `.claude/config/*` doesn't match absolute paths, use specific files
298
+ - [2024-12-19] **Tester agent v3.0** - Complete Playwright E2E architecture with fixture-based cleanup
299
+ - [2024-12-19] **E2E cleanup is MANDATORY** - Track all created IDs, delete ONLY tracked data after tests
300
+ - [2024-12-19] **Multi-viewport testing** - Desktop (1280x800), Tablet (768x1024), iPhone SE (375x667) required
301
+ - [2024-12-19] **DB validation in E2E** - Always verify database state after UI actions
302
+ - [2024-12-19] **Real auth only** - Never mock authentication in E2E tests
303
+ - [2024-12-19] **data-testid required** - All interactive elements must have data-testid attributes
304
+ - [2024-12-19] **SKILL.md YAML frontmatter** - ALL skills MUST have `---` frontmatter with name, description
305
+ - [2024-12-19] **Skill name format** - max 64 chars, lowercase, letters/numbers/hyphens only
306
+ - [2024-12-19] **Skill description** - max 1024 chars, describes WHAT skill does and WHEN to use it
307
+ - [2024-12-19] **allowed-tools optional** - Comma-separated tool names to restrict skill capabilities
308
+ - [2024-12-19] **Hooks config correct** - settings.json hooks format is valid, uses command type with python scripts
309
+
310
+ ## Problems & Solutions (2024-12-19)
311
+
312
+ ### 2024-12-19 - CLAUDE.md Too Long and Specific
313
+
314
+ **Problem:**
315
+ CLAUDE.md had 594 lines, 95% specific to Solana Listeners project. Too long for Claude to follow consistently.
316
+
317
+ **Root Cause:**
318
+ Project-specific details (workers, docker config, path aliases examples) mixed with universal rules.
319
+
320
+ **Solution:**
321
+
322
+ 1. Reduced CLAUDE.md to 115 lines (universal rules only)
323
+ 2. Created `PROJECT.md` with project-specific details
324
+ 3. Created `.claude/config/` with JSON configs for project specifics
325
+ 4. Updated agents to read from config files
326
+
327
+ **Prevention:**
328
+
329
+ - Keep CLAUDE.md under 300 lines (ideally < 60)
330
+ - Put project specifics in PROJECT.md
331
+ - Use `.claude/config/` for things agents need to adapt to
332
+
333
+ ---
334
+
335
+ ### 2024-12-19 - Pre-Tool-Use Wildcard Pattern Not Working
336
+
337
+ **Problem:**
338
+ Approved files with pattern `.claude/config/*` but hook still blocked edits to `.claude/config/project-config.json`
339
+
340
+ **Root Cause:**
341
+ Hook checks `file_path.startswith(approved[:-1])` but file_path is absolute path `C:/Users/.../` while approved is relative `.claude/config/*`
342
+
343
+ **Solution:**
344
+ Approve each file individually instead of using wildcard patterns
345
+
346
+ **Prevention:**
347
+ When using approve-files, list specific files rather than wildcards if path matching issues occur
348
+
349
+ ---
350
+
351
+ ### 2024-12-19 - E2E Test Data Pollution
352
+
353
+ **Problem:**
354
+ E2E tests created data in the database but didn't clean up, causing test pollution and confusion with real data.
355
+
356
+ **Root Cause:**
357
+ Tests were creating users, items, etc. but not tracking or deleting them after completion.
358
+
359
+ **Solution:**
360
+ Implemented fixture-based cleanup pattern:
361
+
362
+ 1. `createdIds` fixture tracks all created document IDs by collection
363
+ 2. `trackCreated(collection, id)` function to register created data
364
+ 3. Auto-cleanup runs after each test, even on failure
365
+ 4. Only deletes tracked IDs, never affects real data
366
+
367
+ **Prevention:**
368
+
369
+ - Always use `trackCreated()` immediately after creating data
370
+ - Use the custom `test` from fixtures, not base Playwright `test`
371
+ - Verify cleanup is working with DB inspection
372
+
373
+ ---
374
+
375
+ ### 2024-12-19 - Tester Agent Missing E2E Architecture
376
+
377
+ **Problem:**
378
+ Tester agent didn't have comprehensive E2E testing patterns for Playwright.
379
+
380
+ **Root Cause:**
381
+ Previous version focused on unit tests, lacked E2E architecture.
382
+
383
+ **Solution:**
384
+ Rewrote tester.md with complete Playwright architecture:
385
+
386
+ - Fixture-based cleanup pattern
387
+ - Multi-viewport testing (desktop, tablet, mobile)
388
+ - Database validation after UI actions
389
+ - API testing (REST and tRPC)
390
+ - Real authentication flows
391
+ - Storage state for session reuse
392
+ - Security testing (forbidden requests, rate limiting)
393
+
394
+ **Prevention:**
395
+
396
+ - Always test all viewports
397
+ - Always verify DB state, don't trust UI alone
398
+ - Use real auth, never mock it
399
+
400
+ ---
401
+
402
+ ### 2024-12-19 - Skills Missing YAML Frontmatter
403
+
404
+ **Problem:**
405
+ All SKILL.md files started with `# Title` instead of YAML frontmatter, making them undiscoverable by Claude Code.
406
+
407
+ **Root Cause:**
408
+ Skills were created as plain markdown without the required YAML frontmatter that Claude Code uses to discover and load skills.
409
+
410
+ **Solution:**
411
+ Added YAML frontmatter to all 8 SKILL.md files:
412
+
413
+ ```yaml
414
+ ---
415
+ name: skill-name-lowercase
416
+ description: What skill does and when to use it
417
+ allowed-tools: Tool1, Tool2 # optional
418
+ ---
419
+ ```
420
+
421
+ **Fixed Files:**
422
+
423
+ - quality-gate, security-scan, codebase-knowledge, docs-tracker
424
+ - final-check, ui-ux-audit, research-cache, test-coverage
425
+
426
+ **Prevention:**
427
+
428
+ - Quality-checker now validates SKILL.md format
429
+ - All new skills MUST start with YAML frontmatter
430
+ - name: lowercase-with-hyphens, max 64 chars
431
+ - description: non-empty, max 1024 chars