start-vibing 1.1.2 → 1.1.4

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 (38) hide show
  1. package/package.json +1 -1
  2. package/template/.claude/CLAUDE.md +129 -168
  3. package/template/.claude/agents/analyzer.md +0 -14
  4. package/template/.claude/agents/commit-manager.md +0 -19
  5. package/template/.claude/agents/documenter.md +0 -10
  6. package/template/.claude/agents/domain-updater.md +194 -200
  7. package/template/.claude/agents/final-validator.md +0 -18
  8. package/template/.claude/agents/orchestrator.md +36 -34
  9. package/template/.claude/agents/quality-checker.md +0 -24
  10. package/template/.claude/agents/research.md +299 -262
  11. package/template/.claude/agents/security-auditor.md +1 -14
  12. package/template/.claude/agents/tester.md +0 -8
  13. package/template/.claude/agents/ui-ux-reviewer.md +80 -18
  14. package/template/.claude/commands/feature.md +48 -102
  15. package/template/.claude/config/README.md +30 -30
  16. package/template/.claude/config/project-config.json +53 -53
  17. package/template/.claude/config/quality-gates.json +46 -46
  18. package/template/.claude/config/security-rules.json +45 -45
  19. package/template/.claude/config/testing-config.json +168 -168
  20. package/template/.claude/hooks/SETUP.md +52 -181
  21. package/template/.claude/hooks/user-prompt-submit.py +184 -46
  22. package/template/.claude/settings.json +0 -39
  23. package/template/.claude/skills/codebase-knowledge/SKILL.md +145 -145
  24. package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +260 -321
  25. package/template/.claude/skills/docs-tracker/SKILL.md +239 -239
  26. package/template/.claude/skills/final-check/SKILL.md +284 -284
  27. package/template/.claude/skills/quality-gate/SKILL.md +278 -278
  28. package/template/.claude/skills/research-cache/SKILL.md +207 -207
  29. package/template/.claude/skills/security-scan/SKILL.md +206 -206
  30. package/template/.claude/skills/test-coverage/SKILL.md +441 -441
  31. package/template/.claude/skills/ui-ux-audit/SKILL.md +254 -254
  32. package/template/.claude/config/domain-mapping.json +0 -26
  33. package/template/.claude/hooks/post-tool-use.py +0 -155
  34. package/template/.claude/hooks/pre-tool-use.py +0 -159
  35. package/template/.claude/hooks/stop-validation.py +0 -155
  36. package/template/.claude/hooks/validate-commit.py +0 -200
  37. package/template/.claude/hooks/workflow-manager.py +0 -350
  38. package/template/.claude/workflow-state.schema.json +0 -200
@@ -1,321 +1,260 @@
1
- # Claude System
2
-
3
- ## Last Update
4
-
5
- - **Date:** 2024-12-19
6
- - **Commit:** pending
7
- - **Session:** Created start-vibing npm package for easy Claude setup
8
-
9
- ## Files
10
-
11
- ### Agents
12
-
13
- - `.claude/agents/analyzer.md` - Analyzes change impact, approves files
14
- - `.claude/agents/research.md` - **NEW** Researches best practices (2024-2025) before implementation
15
- - `.claude/agents/commit-manager.md` - Manages git commits, runs complete-task
16
- - `.claude/agents/documenter.md` - Creates/updates documentation
17
- - `.claude/agents/domain-updater.md` - Updates domain knowledge after sessions
18
- - `.claude/agents/final-validator.md` - Final validation with VETO power
19
- - `.claude/agents/orchestrator.md` - Coordinates entire workflow
20
- - `.claude/agents/quality-checker.md` - Runs quality gates
21
- - `.claude/agents/security-auditor.md` - Security audit with VETO power
22
- - `.claude/agents/tester.md` - Creates unit and E2E tests
23
- - `.claude/agents/ui-ux-reviewer.md` - Reviews UI/UX patterns
24
-
25
- ### Hooks
26
-
27
- - `.claude/hooks/pre-tool-use.py` - Blocks unapproved file modifications
28
- - `.claude/hooks/post-tool-use.py` - Tracks file modifications
29
- - `.claude/hooks/stop-validation.py` - Blocks incomplete workflows
30
- - `.claude/hooks/user-prompt-submit.py` - Runs on user prompt
31
- - `.claude/hooks/workflow-manager.py` - CLI for state tracking
32
-
33
- ### Skills
34
-
35
- - `.claude/skills/codebase-knowledge/` - Domain mapping system
36
- - `.claude/skills/research-cache/` - **NEW** Best practices research cache
37
- - `.claude/skills/docs-tracker/` - Documentation tracking
38
- - `.claude/skills/final-check/` - Final validation rules
39
- - `.claude/skills/quality-gate/` - Quality gate definitions
40
- - `.claude/skills/security-scan/` - Security audit rules
41
- - `.claude/skills/test-coverage/` - Test coverage tracking
42
- - `.claude/skills/ui-ux-audit/` - UI/UX audit rules
43
-
44
- ### Configuration
45
-
46
- - `.claude/settings.json` - Agent registration, flows, rules
47
- - `.claude/workflow-state.json` - Current task state
48
- - `.claude/CLAUDE.md` - System documentation
49
-
50
- ### Config Files (NEW - 2024-12-19)
51
-
52
- - `.claude/config/project-config.json` - Stack, structure, commands
53
- - `.claude/config/domain-mapping.json` - File patterns to domains
54
- - `.claude/config/quality-gates.json` - Quality check commands
55
- - `.claude/config/testing-config.json` - Test framework config
56
- - `.claude/config/security-rules.json` - Security audit rules
57
- - `.claude/config/README.md` - Config documentation
58
-
59
- ### Root Files
60
-
61
- - `CLAUDE.md` - Development rules (generalist)
62
- - `PROJECT.md` - Project-specific details (your project)
63
-
64
- ## Connections
65
-
66
- - **All domains:** domain-updater reads/updates domain files after sessions
67
- - **Infrastructure:** Hooks enforce workflow rules project-wide
68
-
69
- ## Recent Commits
70
-
71
- | Hash | Date | Description |
72
- | ---- | ---- | ----------- |
73
- | de8cda9 | 2024-12-18 | feat(hooks): add domain-updater agent and enhance Task tool guidance |
74
- | e9b4ad3 | 2024-12-18 | fix(claude-system): move complete-task from commit-manager to domain-updater |
75
- | 251dfad | 2024-12-18 | feat(claude-system): add domain-updater agent as final workflow step |
76
-
77
- ## Problems & Solutions
78
-
79
- ### 2024-12-18 - Hook Blocking File Edits
80
-
81
- **Problem:**
82
- Tried to write files without starting a task first. PreToolUse hook blocked with "No active task in workflow-state.json"
83
-
84
- **Root Cause:**
85
- The pre-tool-use hook requires:
86
- 1. Active task started via workflow-manager.py
87
- 2. Analyzer executed
88
- 3. Files approved for modification
89
-
90
- **Solution:**
91
- Run these commands before editing:
92
- ```bash
93
- python .claude/hooks/workflow-manager.py start-task --type feature --description "..."
94
- python .claude/hooks/workflow-manager.py approve-files --files "path/to/file"
95
- python .claude/hooks/workflow-manager.py agent-executed --agent analyzer --result approved
96
- ```
97
-
98
- **Prevention:**
99
- Always follow the workflow: start-task → approve-files → analyzer → implement
100
-
101
- ---
102
-
103
- ### 2024-12-18 - Stop Hook Counting .claude/ as Source Files
104
-
105
- **Problem:**
106
- Stop hook blocked with "Modified 2 source file(s) but no tests created" for .claude/ config files
107
-
108
- **Root Cause:**
109
- The source file filter didn't exclude `.claude/` directory - only excluded test, spec, .md, and docs/
110
-
111
- **Solution:**
112
- Added `.claude/` to the exclusion list in stop-validation.py line 68
113
-
114
- **Prevention:**
115
- Config files in `.claude/` don't need unit tests - they're configuration, not source code
116
-
117
- ---
118
-
119
- ### 2024-12-18 - complete-task Running Before domain-updater
120
-
121
- **Problem:**
122
- commit-manager ran `complete-task` which archived the workflow, then domain-updater couldn't edit files (no active task)
123
-
124
- **Root Cause:**
125
- Workflow order was wrong - complete-task was in commit-manager, but should run AFTER domain-updater
126
-
127
- **Solution:**
128
- - Removed `complete-task` from commit-manager
129
- - Added Step 6 to domain-updater with `complete-task`
130
- - New flow: commit-manager domain-updater complete-task
131
-
132
- **Prevention:**
133
- ~~domain-updater is now responsible for `complete-task`~~ - OUTDATED: See workflow order fix below
134
-
135
- ---
136
-
137
- ### 2024-12-18 - Workflow Order for Clean Git (FINAL FIX)
138
-
139
- **Problem:**
140
- Git tree stayed dirty after commit because domain updates happened AFTER the commit
141
-
142
- **Root Cause:**
143
- Old flow: commit-manager domain-updater complete-task
144
- This meant domain files were modified AFTER the commit, leaving uncommitted changes
145
-
146
- **Solution:**
147
- New flow: domain-updater → commit-manager → complete-task
148
- - domain-updater now runs BEFORE commit-manager
149
- - commit-manager is the FINAL agent (runs complete-task)
150
- - All changes are included in the commit
151
- - Git tree is clean after session ends
152
-
153
- **Prevention:**
154
- - domain-updater priority: 9 (runs after final-validator)
155
- - commit-manager priority: 10 (FINAL step)
156
- - Stop hook enforces both must run before session ends
157
-
158
- ---
159
-
160
- ### 2024-12-18 - domain-updater Not Available as Subagent
161
-
162
- **Problem:**
163
- Tried to invoke domain-updater via Task tool but got "Agent type 'domain-updater' not found"
164
-
165
- **Root Cause:**
166
- Agents defined in `.claude/agents/*.md` are instructions for Claude to follow, not subagent_types in Claude Code system
167
-
168
- **Solution:**
169
- Execute domain-updater logic manually or use documenter agent which has similar capabilities
170
-
171
- **Prevention:**
172
- To make an agent invokable via Task tool, it needs to be registered in Claude Code's internal system (separate from .claude/agents/)
173
-
174
- ## Attention Points
175
-
176
- - [2024-12-18] **Workflow is enforced by hooks** - Cannot skip steps, hooks will block
177
- - [2024-12-18] **domain-updater is MANDATORY** - Stop hook blocks if not executed
178
- - [2024-12-18] **10 agents total** - domain-updater added as final step (priority 10)
179
- - [2024-12-18] **Config files (.claude/*) don't require tests** - Excluded from source file checks
180
- - [2024-12-18] ~~**domain-updater runs complete-task**~~ - OUTDATED: commit-manager now runs complete-task
181
- - [2024-12-18] **.claude/agents/ vs subagent_type** - Agents in .claude/agents/ are instructions, not Claude Code subagents
182
- - [2024-12-18] **Never bypass workflow manually** - Follow the agents properly, don't mark as executed without running
183
- - [2024-12-18] **Use Task tool for agents** - UserPromptSubmit now reminds to use Task(subagent_type="agent-name") instead of manual execution
184
- - [2024-12-18] **Workflow order fixed** - domain-updater runs BEFORE commit-manager (not after) for clean git
185
- - [2024-12-18] **commit-manager is FINAL** - It runs complete-task, not domain-updater
186
- - [2024-12-18] **Stop hook enforces commit** - Blocks if domain-updater ran but commit-manager didn't
187
- - [2024-12-18] **Research agent added** - Mandatory for features/fixes, runs after analyzer
188
- - [2024-12-18] **11 agents total** - research added (priority 3)
189
- - [2024-12-18] **workflow-state.json in .gitignore** - Transient state, not tracked in git
190
- - [2024-12-19] **Config files for project specifics** - Agents read from `.claude/config/*.json` instead of hardcoding
191
- - [2024-12-19] **CLAUDE.md < 300 lines** - Best practice from Anthropic, ideally < 60 lines
192
- - [2024-12-19] **PROJECT.md for project details** - Separate from generic CLAUDE.md
193
- - [2024-12-19] **Pre-tool-use wildcard issue** - Pattern `.claude/config/*` doesn't match absolute paths, use specific files
194
- - [2024-12-19] **Tester agent v3.0** - Complete Playwright E2E architecture with fixture-based cleanup
195
- - [2024-12-19] **E2E cleanup is MANDATORY** - Track all created IDs, delete ONLY tracked data after tests
196
- - [2024-12-19] **Multi-viewport testing** - Desktop (1280x800), Tablet (768x1024), iPhone SE (375x667) required
197
- - [2024-12-19] **DB validation in E2E** - Always verify database state after UI actions
198
- - [2024-12-19] **Real auth only** - Never mock authentication in E2E tests
199
- - [2024-12-19] **data-testid required** - All interactive elements must have data-testid attributes
200
- - [2024-12-19] **SKILL.md YAML frontmatter** - ALL skills MUST have `---` frontmatter with name, description
201
- - [2024-12-19] **Skill name format** - max 64 chars, lowercase, letters/numbers/hyphens only
202
- - [2024-12-19] **Skill description** - max 1024 chars, describes WHAT skill does and WHEN to use it
203
- - [2024-12-19] **allowed-tools optional** - Comma-separated tool names to restrict skill capabilities
204
- - [2024-12-19] **Hooks config correct** - settings.json hooks format is valid, uses command type with python scripts
205
- - [2024-12-19] **start-vibing npm package** - CLI para copiar .claude para qualquer projeto
206
- - [2024-12-19] **npx/bunx CLI** - package.json bin field aponta para dist/cli.js com shebang
207
- - [2024-12-19] **Smart copy** - Preserva domains e cache, sobrescreve agents e hooks
208
-
209
- ## Problems & Solutions (2024-12-19)
210
-
211
- ### 2024-12-19 - CLAUDE.md Too Long and Specific
212
-
213
- **Problem:**
214
- CLAUDE.md had 594 lines, 95% project-specific. Too long for Claude to follow consistently.
215
-
216
- **Root Cause:**
217
- Project-specific details (workers, docker config, path aliases examples) mixed with universal rules.
218
-
219
- **Solution:**
220
- 1. Reduced CLAUDE.md to 115 lines (universal rules only)
221
- 2. Created `PROJECT.md` with project-specific details
222
- 3. Created `.claude/config/` with JSON configs for project specifics
223
- 4. Updated agents to read from config files
224
-
225
- **Prevention:**
226
- - Keep CLAUDE.md under 300 lines (ideally < 60)
227
- - Put project specifics in PROJECT.md
228
- - Use `.claude/config/` for things agents need to adapt to
229
-
230
- ---
231
-
232
- ### 2024-12-19 - Pre-Tool-Use Wildcard Pattern Not Working
233
-
234
- **Problem:**
235
- Approved files with pattern `.claude/config/*` but hook still blocked edits to `.claude/config/project-config.json`
236
-
237
- **Root Cause:**
238
- Hook checks `file_path.startswith(approved[:-1])` but file_path is absolute path `C:/Users/.../` while approved is relative `.claude/config/*`
239
-
240
- **Solution:**
241
- Approve each file individually instead of using wildcard patterns
242
-
243
- **Prevention:**
244
- When using approve-files, list specific files rather than wildcards if path matching issues occur
245
-
246
- ---
247
-
248
- ### 2024-12-19 - E2E Test Data Pollution
249
-
250
- **Problem:**
251
- E2E tests created data in the database but didn't clean up, causing test pollution and confusion with real data.
252
-
253
- **Root Cause:**
254
- Tests were creating users, items, etc. but not tracking or deleting them after completion.
255
-
256
- **Solution:**
257
- Implemented fixture-based cleanup pattern:
258
- 1. `createdIds` fixture tracks all created document IDs by collection
259
- 2. `trackCreated(collection, id)` function to register created data
260
- 3. Auto-cleanup runs after each test, even on failure
261
- 4. Only deletes tracked IDs, never affects real data
262
-
263
- **Prevention:**
264
- - Always use `trackCreated()` immediately after creating data
265
- - Use the custom `test` from fixtures, not base Playwright `test`
266
- - Verify cleanup is working with DB inspection
267
-
268
- ---
269
-
270
- ### 2024-12-19 - Tester Agent Missing E2E Architecture
271
-
272
- **Problem:**
273
- Tester agent didn't have comprehensive E2E testing patterns for Playwright.
274
-
275
- **Root Cause:**
276
- Previous version focused on unit tests, lacked E2E architecture.
277
-
278
- **Solution:**
279
- Rewrote tester.md with complete Playwright architecture:
280
- - Fixture-based cleanup pattern
281
- - Multi-viewport testing (desktop, tablet, mobile)
282
- - Database validation after UI actions
283
- - API testing (REST and tRPC)
284
- - Real authentication flows
285
- - Storage state for session reuse
286
- - Security testing (forbidden requests, rate limiting)
287
-
288
- **Prevention:**
289
- - Always test all viewports
290
- - Always verify DB state, don't trust UI alone
291
- - Use real auth, never mock it
292
-
293
- ---
294
-
295
- ### 2024-12-19 - Skills Missing YAML Frontmatter
296
-
297
- **Problem:**
298
- All SKILL.md files started with `# Title` instead of YAML frontmatter, making them undiscoverable by Claude Code.
299
-
300
- **Root Cause:**
301
- Skills were created as plain markdown without the required YAML frontmatter that Claude Code uses to discover and load skills.
302
-
303
- **Solution:**
304
- Added YAML frontmatter to all 8 SKILL.md files:
305
- ```yaml
306
- ---
307
- name: skill-name-lowercase
308
- description: What skill does and when to use it
309
- allowed-tools: Tool1, Tool2 # optional
310
- ---
311
- ```
312
-
313
- **Fixed Files:**
314
- - quality-gate, security-scan, codebase-knowledge, docs-tracker
315
- - final-check, ui-ux-audit, research-cache, test-coverage
316
-
317
- **Prevention:**
318
- - Quality-checker now validates SKILL.md format
319
- - All new skills MUST start with YAML frontmatter
320
- - name: lowercase-with-hyphens, max 64 chars
321
- - description: non-empty, max 1024 chars
1
+ # Claude System
2
+
3
+ ## Last Update
4
+
5
+ - **Date:** 2024-12-19
6
+ - **Commit:** pending
7
+ - **Session:** Fixed all skills to use YAML frontmatter format
8
+
9
+ ## Files
10
+
11
+ ### Agents
12
+
13
+ - `.claude/agents/analyzer.md` - Analyzes change impact, approves files
14
+ - `.claude/agents/research.md` - **NEW** Researches best practices (2024-2025) before implementation
15
+ - `.claude/agents/commit-manager.md` - Manages git commits, runs complete-task
16
+ - `.claude/agents/documenter.md` - Creates/updates documentation
17
+ - `.claude/agents/domain-updater.md` - Updates domain knowledge after sessions
18
+ - `.claude/agents/final-validator.md` - Final validation with VETO power
19
+ - `.claude/agents/orchestrator.md` - Coordinates entire workflow
20
+ - `.claude/agents/quality-checker.md` - Runs quality gates
21
+ - `.claude/agents/security-auditor.md` - Security audit with VETO power
22
+ - `.claude/agents/tester.md` - Creates unit and E2E tests
23
+ - `.claude/agents/ui-ux-reviewer.md` - Reviews UI/UX patterns
24
+
25
+ ### Hooks
26
+
27
+ - `.claude/hooks/user-prompt-submit.py` - Agent selection guidance before prompt processing
28
+
29
+ ### Skills
30
+
31
+ - `.claude/skills/codebase-knowledge/` - Domain mapping system
32
+ - `.claude/skills/research-cache/` - **NEW** Best practices research cache
33
+ - `.claude/skills/docs-tracker/` - Documentation tracking
34
+ - `.claude/skills/final-check/` - Final validation rules
35
+ - `.claude/skills/quality-gate/` - Quality gate definitions
36
+ - `.claude/skills/security-scan/` - Security audit rules
37
+ - `.claude/skills/test-coverage/` - Test coverage tracking
38
+ - `.claude/skills/ui-ux-audit/` - UI/UX audit rules
39
+
40
+ ### Configuration
41
+
42
+ - `.claude/settings.json` - Agent registration, flows, rules
43
+ - `.claude/workflow-state.json` - Current task state
44
+ - `.claude/CLAUDE.md` - System documentation
45
+
46
+ ### Config Files (NEW - 2024-12-19)
47
+
48
+ - `.claude/config/project-config.json` - Stack, structure, commands
49
+ - `.claude/config/domain-mapping.json` - File patterns to domains
50
+ - `.claude/config/quality-gates.json` - Quality check commands
51
+ - `.claude/config/testing-config.json` - Test framework config
52
+ - `.claude/config/security-rules.json` - Security audit rules
53
+ - `.claude/config/README.md` - Config documentation
54
+
55
+ ### Root Files
56
+
57
+ - `CLAUDE.md` - Development rules (115 lines, generalist)
58
+ - `PROJECT.md` - Project-specific details (Solana Listeners)
59
+
60
+ ## Connections
61
+
62
+ - **All domains:** domain-updater reads/updates domain files after sessions
63
+ - **Infrastructure:** Hooks enforce workflow rules project-wide
64
+
65
+ ## Recent Commits
66
+
67
+ | Hash | Date | Description |
68
+ | ---- | ---- | ----------- |
69
+ | de8cda9 | 2024-12-18 | feat(hooks): add domain-updater agent and enhance Task tool guidance |
70
+ | e9b4ad3 | 2024-12-18 | fix(claude-system): move complete-task from commit-manager to domain-updater |
71
+ | 251dfad | 2024-12-18 | feat(claude-system): add domain-updater agent as final workflow step |
72
+
73
+ ## Problems & Solutions
74
+
75
+ ### 2024-12-19 - Workflow Manager Removed
76
+
77
+ **Problem:**
78
+ 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.
79
+
80
+ **Root Cause:**
81
+ The system was designed with strict workflow enforcement that prevented Claude from working flexibly.
82
+
83
+ **Solution:**
84
+ - Deleted workflow-manager.py, pre-tool-use.py, post-tool-use.py, stop-validation.py
85
+ - Removed references from all documentation
86
+ - Simplified settings.local.json to only keep UserPromptSubmit hook
87
+ - Agents now work independently without state tracking requirements
88
+
89
+ **Prevention:**
90
+ Trust agents to coordinate naturally through Task tool invocation rather than enforcing artificial state machine.
91
+
92
+ ---
93
+ - Git tree is clean after session ends
94
+
95
+ **Prevention:**
96
+ - domain-updater priority: 9 (runs after final-validator)
97
+ - commit-manager priority: 10 (FINAL step)
98
+ - Stop hook enforces both must run before session ends
99
+
100
+ ---
101
+
102
+ ### 2024-12-18 - domain-updater Not Available as Subagent
103
+
104
+ **Problem:**
105
+ Tried to invoke domain-updater via Task tool but got "Agent type 'domain-updater' not found"
106
+
107
+ **Root Cause:**
108
+ Agents defined in `.claude/agents/*.md` are instructions for Claude to follow, not subagent_types in Claude Code system
109
+
110
+ **Solution:**
111
+ Execute domain-updater logic manually or use documenter agent which has similar capabilities
112
+
113
+ **Prevention:**
114
+ To make an agent invokable via Task tool, it needs to be registered in Claude Code's internal system (separate from .claude/agents/)
115
+
116
+ ## Attention Points
117
+
118
+ - [2024-12-18] **Workflow is enforced by hooks** - Cannot skip steps, hooks will block
119
+ - [2024-12-18] **domain-updater is MANDATORY** - Stop hook blocks if not executed
120
+ - [2024-12-18] **10 agents total** - domain-updater added as final step (priority 10)
121
+ - [2024-12-18] **Config files (.claude/*) don't require tests** - Excluded from source file checks
122
+ - [2024-12-18] ~~**domain-updater runs complete-task**~~ - OUTDATED: commit-manager now runs complete-task
123
+ - [2024-12-18] **.claude/agents/ vs subagent_type** - Agents in .claude/agents/ are instructions, not Claude Code subagents
124
+ - [2024-12-18] **Never bypass workflow manually** - Follow the agents properly, don't mark as executed without running
125
+ - [2024-12-18] **Use Task tool for agents** - UserPromptSubmit now reminds to use Task(subagent_type="agent-name") instead of manual execution
126
+ - [2024-12-18] **Workflow order fixed** - domain-updater runs BEFORE commit-manager (not after) for clean git
127
+ - [2024-12-18] **commit-manager is FINAL** - It runs complete-task, not domain-updater
128
+ - [2024-12-18] **Stop hook enforces commit** - Blocks if domain-updater ran but commit-manager didn't
129
+ - [2024-12-18] **Research agent added** - Mandatory for features/fixes, runs after analyzer
130
+ - [2024-12-18] **11 agents total** - research added (priority 3)
131
+ - [2024-12-18] **workflow-state.json in .gitignore** - Transient state, not tracked in git
132
+ - [2024-12-19] **Config files for project specifics** - Agents read from `.claude/config/*.json` instead of hardcoding
133
+ - [2024-12-19] **CLAUDE.md < 300 lines** - Best practice from Anthropic, ideally < 60 lines
134
+ - [2024-12-19] **PROJECT.md for project details** - Separate from generic CLAUDE.md
135
+ - [2024-12-19] **Pre-tool-use wildcard issue** - Pattern `.claude/config/*` doesn't match absolute paths, use specific files
136
+ - [2024-12-19] **Tester agent v3.0** - Complete Playwright E2E architecture with fixture-based cleanup
137
+ - [2024-12-19] **E2E cleanup is MANDATORY** - Track all created IDs, delete ONLY tracked data after tests
138
+ - [2024-12-19] **Multi-viewport testing** - Desktop (1280x800), Tablet (768x1024), iPhone SE (375x667) required
139
+ - [2024-12-19] **DB validation in E2E** - Always verify database state after UI actions
140
+ - [2024-12-19] **Real auth only** - Never mock authentication in E2E tests
141
+ - [2024-12-19] **data-testid required** - All interactive elements must have data-testid attributes
142
+ - [2024-12-19] **SKILL.md YAML frontmatter** - ALL skills MUST have `---` frontmatter with name, description
143
+ - [2024-12-19] **Skill name format** - max 64 chars, lowercase, letters/numbers/hyphens only
144
+ - [2024-12-19] **Skill description** - max 1024 chars, describes WHAT skill does and WHEN to use it
145
+ - [2024-12-19] **allowed-tools optional** - Comma-separated tool names to restrict skill capabilities
146
+ - [2024-12-19] **Hooks config correct** - settings.json hooks format is valid, uses command type with python scripts
147
+
148
+ ## Problems & Solutions (2024-12-19)
149
+
150
+ ### 2024-12-19 - CLAUDE.md Too Long and Specific
151
+
152
+ **Problem:**
153
+ CLAUDE.md had 594 lines, 95% specific to Solana Listeners project. Too long for Claude to follow consistently.
154
+
155
+ **Root Cause:**
156
+ Project-specific details (workers, docker config, path aliases examples) mixed with universal rules.
157
+
158
+ **Solution:**
159
+ 1. Reduced CLAUDE.md to 115 lines (universal rules only)
160
+ 2. Created `PROJECT.md` with project-specific details
161
+ 3. Created `.claude/config/` with JSON configs for project specifics
162
+ 4. Updated agents to read from config files
163
+
164
+ **Prevention:**
165
+ - Keep CLAUDE.md under 300 lines (ideally < 60)
166
+ - Put project specifics in PROJECT.md
167
+ - Use `.claude/config/` for things agents need to adapt to
168
+
169
+ ---
170
+
171
+ ### 2024-12-19 - Pre-Tool-Use Wildcard Pattern Not Working
172
+
173
+ **Problem:**
174
+ Approved files with pattern `.claude/config/*` but hook still blocked edits to `.claude/config/project-config.json`
175
+
176
+ **Root Cause:**
177
+ Hook checks `file_path.startswith(approved[:-1])` but file_path is absolute path `C:/Users/.../` while approved is relative `.claude/config/*`
178
+
179
+ **Solution:**
180
+ Approve each file individually instead of using wildcard patterns
181
+
182
+ **Prevention:**
183
+ When using approve-files, list specific files rather than wildcards if path matching issues occur
184
+
185
+ ---
186
+
187
+ ### 2024-12-19 - E2E Test Data Pollution
188
+
189
+ **Problem:**
190
+ E2E tests created data in the database but didn't clean up, causing test pollution and confusion with real data.
191
+
192
+ **Root Cause:**
193
+ Tests were creating users, items, etc. but not tracking or deleting them after completion.
194
+
195
+ **Solution:**
196
+ Implemented fixture-based cleanup pattern:
197
+ 1. `createdIds` fixture tracks all created document IDs by collection
198
+ 2. `trackCreated(collection, id)` function to register created data
199
+ 3. Auto-cleanup runs after each test, even on failure
200
+ 4. Only deletes tracked IDs, never affects real data
201
+
202
+ **Prevention:**
203
+ - Always use `trackCreated()` immediately after creating data
204
+ - Use the custom `test` from fixtures, not base Playwright `test`
205
+ - Verify cleanup is working with DB inspection
206
+
207
+ ---
208
+
209
+ ### 2024-12-19 - Tester Agent Missing E2E Architecture
210
+
211
+ **Problem:**
212
+ Tester agent didn't have comprehensive E2E testing patterns for Playwright.
213
+
214
+ **Root Cause:**
215
+ Previous version focused on unit tests, lacked E2E architecture.
216
+
217
+ **Solution:**
218
+ Rewrote tester.md with complete Playwright architecture:
219
+ - Fixture-based cleanup pattern
220
+ - Multi-viewport testing (desktop, tablet, mobile)
221
+ - Database validation after UI actions
222
+ - API testing (REST and tRPC)
223
+ - Real authentication flows
224
+ - Storage state for session reuse
225
+ - Security testing (forbidden requests, rate limiting)
226
+
227
+ **Prevention:**
228
+ - Always test all viewports
229
+ - Always verify DB state, don't trust UI alone
230
+ - Use real auth, never mock it
231
+
232
+ ---
233
+
234
+ ### 2024-12-19 - Skills Missing YAML Frontmatter
235
+
236
+ **Problem:**
237
+ All SKILL.md files started with `# Title` instead of YAML frontmatter, making them undiscoverable by Claude Code.
238
+
239
+ **Root Cause:**
240
+ Skills were created as plain markdown without the required YAML frontmatter that Claude Code uses to discover and load skills.
241
+
242
+ **Solution:**
243
+ Added YAML frontmatter to all 8 SKILL.md files:
244
+ ```yaml
245
+ ---
246
+ name: skill-name-lowercase
247
+ description: What skill does and when to use it
248
+ allowed-tools: Tool1, Tool2 # optional
249
+ ---
250
+ ```
251
+
252
+ **Fixed Files:**
253
+ - quality-gate, security-scan, codebase-knowledge, docs-tracker
254
+ - final-check, ui-ux-audit, research-cache, test-coverage
255
+
256
+ **Prevention:**
257
+ - Quality-checker now validates SKILL.md format
258
+ - All new skills MUST start with YAML frontmatter
259
+ - name: lowercase-with-hyphens, max 64 chars
260
+ - description: non-empty, max 1024 chars