start-vibing 2.0.8 → 2.0.10

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