start-vibing 2.0.9 → 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 -172
  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 -772
  111. package/template/.claude/hooks/user-prompt-submit.ts +886 -823
  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,172 +1,174 @@
1
- # Claude Development System - Agent Context
2
-
3
- This file provides context for all agents. For user-facing rules, see `/CLAUDE.md`.
4
-
5
- ---
6
-
7
- ## CLAUDE.md Validation (STOP HOOK ENFORCED)
8
-
9
- The stop hook validates `/CLAUDE.md` before allowing task completion:
10
-
11
- | Check | Requirement |
12
- |-------|-------------|
13
- | Character limit | Max 40,000 chars |
14
- | Required sections | Last Change, 30s Overview, Stack, Architecture |
15
- | Last Change | Must be updated with session info (branch, date, summary) |
16
- | No stacking | Only ONE Last Change section (latest only) |
17
- | Branch | Must be on main (PR merged) |
18
- | Git tree | Must be clean (no uncommitted changes) |
19
-
20
- **If CLAUDE.md exceeds 40k chars:** Compact it by removing verbose explanations, keeping critical sections.
21
-
22
- **If not on main:** Complete PR workflow (commit, push, PR, merge, checkout main).
23
-
24
- ---
25
-
26
- ## System Architecture
27
-
28
- ```
29
- .claude/
30
- ├── agents/ # 82 specialized agents in 14 categories
31
- ├── skills/ # 22 skill systems with cache
32
- ├── scripts/ # Validation scripts (validate-claude-md.ts)
33
- ├── config/ # Project-specific configuration
34
- ├── commands/ # Slash commands
35
- └── hooks/ # stop-validator.ts, user-prompt-submit.ts
36
- ```
37
-
38
- ---
39
-
40
- ## MCP Servers (MANDATORY FOR AGENTS)
41
-
42
- All agents MUST use these MCP servers when applicable:
43
-
44
- | Server | Purpose | Use In Agents |
45
- | ------------------- | ----------------------------------------- | ---------------------------------------- |
46
- | `context7` | Up-to-date library documentation | research, analyzer, tester |
47
- | `sequential-thinking` | Complex problem-solving | orchestrator, analyzer, final-validator |
48
- | `memory` | Persistent knowledge graph | domain-updater, commit-manager |
49
- | `playwright` | Browser automation and E2E testing | tester, ui-ux-reviewer |
50
- | `nextjs-devtools` | Next.js specific development tools | analyzer (Next.js projects) |
51
- | `mongodb` | MongoDB database operations | tester, security-auditor |
52
-
53
- ### Agent MCP Usage Rules
54
-
55
- - **research agent**: MUST use `context7` for library docs before recommending patterns
56
- - **tester agent**: MUST use `playwright` for E2E tests
57
- - **analyzer agent**: SHOULD use `context7` to verify current API patterns
58
- - **domain-updater**: SHOULD use `memory` to persist patterns across sessions
59
- - **ui-ux-reviewer**: MUST use `playwright` to verify UI implementations
60
-
61
- ---
62
-
63
- ## Configuration Files
64
-
65
- Project-specific settings are in `.claude/config/`:
66
-
67
- | File | Purpose |
68
- | ---------------------- | ------------------------------------ |
69
- | `project-config.json` | Stack, structure, commands |
70
- | `domain-mapping.json` | File patterns to domains |
71
- | `quality-gates.json` | Quality check commands |
72
- | `testing-config.json` | Test framework and conventions |
73
- | `security-rules.json` | Security audit rules |
74
-
75
- **RULE:** Agents MUST read config files before acting. Do NOT hardcode project specifics.
76
-
77
- ---
78
-
79
- ## Agent → Skill Mapping
80
-
81
- | Agent | Primary Skill | Secondary |
82
- | ---------------- | ------------------ | -------------------------------- |
83
- | analyzer | codebase-knowledge | - |
84
- | research | research-cache | codebase-knowledge |
85
- | documenter | docs-tracker | codebase-knowledge |
86
- | tester | test-coverage | - |
87
- | ui-ux-reviewer | ui-ux-audit | - |
88
- | security-auditor | security-scan | - |
89
- | quality-checker | quality-gate | - |
90
- | final-validator | final-check | ALL |
91
- | commit-manager | workflow-state | docs-tracker, codebase-knowledge |
92
- | domain-updater | codebase-knowledge | docs-tracker |
93
-
94
- ---
95
-
96
- ## Execution Protocol
97
-
98
- ### Before ANY implementation:
99
- 1. **Read config** from `.claude/config/` for project specifics
100
- 2. Read relevant skill SKILL.md file
101
- 3. Check skill cache for existing data
102
- 4. Research if needed (web search)
103
-
104
- ### After implementation:
105
-
106
- 1. Update skill cache with changes
107
- 2. Run quality gates + record results
108
- 3. Security audit (if auth/data involved)
109
- 4. Final validation
110
- 5. **Update domains** via domain-updater agent (BEFORE commit, keeps git clean)
111
- 6. **Commit** via commit-manager agent (FINAL step)
112
-
113
- ---
114
-
115
- ## VETO Power Agents
116
-
117
- These agents CAN and MUST stop the flow if rules are violated:
118
-
119
- | Agent | Blocks When |
120
- | -------------------- | -------------------------------------------------- |
121
- | **security-auditor** | User ID from request, sensitive data, no validation |
122
- | **final-validator** | Any rule violated, tests failing, docs missing |
123
-
124
- ---
125
-
126
- ## Quality Requirements
127
-
128
- All implementations MUST:
129
-
130
- - [ ] Pass typecheck (command from config)
131
- - [ ] Pass lint (command from config)
132
- - [ ] Pass unit tests (command from config)
133
- - [ ] Pass E2E tests (command from config)
134
- - [ ] Pass build (command from config)
135
- - [ ] Have E2E tests with real auth
136
- - [ ] Have documentation in `docs/`
137
- - [ ] Be security audited
138
- - [ ] Be committed with conventional commits
139
- - [ ] Have domains updated with session learnings
140
-
141
- ---
142
-
143
- ## Domain Updater Agent
144
-
145
- The **domain-updater** runs BEFORE commit-manager to ensure git stays clean.
146
-
147
- ### Purpose
148
-
149
- - Document **problems encountered** during the session
150
- - Record **solutions** applied to fix issues
151
- - Add **prevention tips** for future sessions
152
- - Update **attention points** with new learnings
153
- - Keep domain knowledge **current and accurate**
154
-
155
- ### Trigger
156
-
157
- Runs automatically:
158
- 1. After final-validator approves in any workflow
159
- 2. BEFORE commit-manager (so changes are included in commit)
160
- 3. Stop hook blocks session end until domain-updater executes (if files were modified)
161
-
162
- ### Workflow Order
163
-
164
- ```
165
- final-validator → domain-updater → commit-manager → complete-task
166
- ↑ ↑
167
- (updates domains) (commits all + archives)
168
- ```
169
-
170
- ### Configuration
171
-
172
- Reads domain patterns from `.claude/config/domain-mapping.json`
1
+ # Claude Development System - Agent Context
2
+
3
+ This file provides context for all agents. For user-facing rules, see `/CLAUDE.md`.
4
+
5
+ ---
6
+
7
+ ## CLAUDE.md Validation (STOP HOOK ENFORCED)
8
+
9
+ The stop hook validates `/CLAUDE.md` before allowing task completion:
10
+
11
+ | Check | Requirement |
12
+ | ----------------- | --------------------------------------------------------- |
13
+ | Character limit | Max 40,000 chars |
14
+ | Required sections | Last Change, 30s Overview, Stack, Architecture |
15
+ | Last Change | Must be updated with session info (branch, date, summary) |
16
+ | No stacking | Only ONE Last Change section (latest only) |
17
+ | Branch | Must be on main (PR merged) |
18
+ | Git tree | Must be clean (no uncommitted changes) |
19
+
20
+ **If CLAUDE.md exceeds 40k chars:** Compact it by removing verbose explanations, keeping critical sections.
21
+
22
+ **If not on main:** Complete PR workflow (commit, push, PR, merge, checkout main).
23
+
24
+ ---
25
+
26
+ ## System Architecture
27
+
28
+ ```
29
+ .claude/
30
+ ├── agents/ # 82 specialized agents in 14 categories
31
+ ├── skills/ # 22 skill systems with cache
32
+ ├── scripts/ # Validation scripts (validate-claude-md.ts)
33
+ ├── config/ # Project-specific configuration
34
+ ├── commands/ # Slash commands
35
+ └── hooks/ # stop-validator.ts, user-prompt-submit.ts
36
+ ```
37
+
38
+ ---
39
+
40
+ ## MCP Servers (MANDATORY FOR AGENTS)
41
+
42
+ All agents MUST use these MCP servers when applicable:
43
+
44
+ | Server | Purpose | Use In Agents |
45
+ | --------------------- | ---------------------------------- | --------------------------------------- |
46
+ | `context7` | Up-to-date library documentation | research, analyzer, tester |
47
+ | `sequential-thinking` | Complex problem-solving | orchestrator, analyzer, final-validator |
48
+ | `memory` | Persistent knowledge graph | domain-updater, commit-manager |
49
+ | `playwright` | Browser automation and E2E testing | tester, ui-ux-reviewer |
50
+ | `nextjs-devtools` | Next.js specific development tools | analyzer (Next.js projects) |
51
+ | `mongodb` | MongoDB database operations | tester, security-auditor |
52
+
53
+ ### Agent MCP Usage Rules
54
+
55
+ - **research agent**: MUST use `context7` for library docs before recommending patterns
56
+ - **tester agent**: MUST use `playwright` for E2E tests
57
+ - **analyzer agent**: SHOULD use `context7` to verify current API patterns
58
+ - **domain-updater**: SHOULD use `memory` to persist patterns across sessions
59
+ - **ui-ux-reviewer**: MUST use `playwright` to verify UI implementations
60
+
61
+ ---
62
+
63
+ ## Configuration Files
64
+
65
+ Project-specific settings are in `.claude/config/`:
66
+
67
+ | File | Purpose |
68
+ | --------------------- | ------------------------------ |
69
+ | `project-config.json` | Stack, structure, commands |
70
+ | `domain-mapping.json` | File patterns to domains |
71
+ | `quality-gates.json` | Quality check commands |
72
+ | `testing-config.json` | Test framework and conventions |
73
+ | `security-rules.json` | Security audit rules |
74
+
75
+ **RULE:** Agents MUST read config files before acting. Do NOT hardcode project specifics.
76
+
77
+ ---
78
+
79
+ ## Agent → Skill Mapping
80
+
81
+ | Agent | Primary Skill | Secondary |
82
+ | ---------------- | ------------------ | -------------------------------- |
83
+ | analyzer | codebase-knowledge | - |
84
+ | research | research-cache | codebase-knowledge |
85
+ | documenter | docs-tracker | codebase-knowledge |
86
+ | tester | test-coverage | - |
87
+ | ui-ux-reviewer | ui-ux-audit | - |
88
+ | security-auditor | security-scan | - |
89
+ | quality-checker | quality-gate | - |
90
+ | final-validator | final-check | ALL |
91
+ | commit-manager | workflow-state | docs-tracker, codebase-knowledge |
92
+ | domain-updater | codebase-knowledge | docs-tracker |
93
+
94
+ ---
95
+
96
+ ## Execution Protocol
97
+
98
+ ### Before ANY implementation:
99
+
100
+ 1. **Read config** from `.claude/config/` for project specifics
101
+ 2. Read relevant skill SKILL.md file
102
+ 3. Check skill cache for existing data
103
+ 4. Research if needed (web search)
104
+
105
+ ### After implementation:
106
+
107
+ 1. Update skill cache with changes
108
+ 2. Run quality gates + record results
109
+ 3. Security audit (if auth/data involved)
110
+ 4. Final validation
111
+ 5. **Update domains** via domain-updater agent (BEFORE commit, keeps git clean)
112
+ 6. **Commit** via commit-manager agent (FINAL step)
113
+
114
+ ---
115
+
116
+ ## VETO Power Agents
117
+
118
+ These agents CAN and MUST stop the flow if rules are violated:
119
+
120
+ | Agent | Blocks When |
121
+ | -------------------- | --------------------------------------------------- |
122
+ | **security-auditor** | User ID from request, sensitive data, no validation |
123
+ | **final-validator** | Any rule violated, tests failing, docs missing |
124
+
125
+ ---
126
+
127
+ ## Quality Requirements
128
+
129
+ All implementations MUST:
130
+
131
+ - [ ] Pass typecheck (command from config)
132
+ - [ ] Pass lint (command from config)
133
+ - [ ] Pass unit tests (command from config)
134
+ - [ ] Pass E2E tests (command from config)
135
+ - [ ] Pass build (command from config)
136
+ - [ ] Have E2E tests with real auth
137
+ - [ ] Have documentation in `docs/`
138
+ - [ ] Be security audited
139
+ - [ ] Be committed with conventional commits
140
+ - [ ] Have domains updated with session learnings
141
+
142
+ ---
143
+
144
+ ## Domain Updater Agent
145
+
146
+ The **domain-updater** runs BEFORE commit-manager to ensure git stays clean.
147
+
148
+ ### Purpose
149
+
150
+ - Document **problems encountered** during the session
151
+ - Record **solutions** applied to fix issues
152
+ - Add **prevention tips** for future sessions
153
+ - Update **attention points** with new learnings
154
+ - Keep domain knowledge **current and accurate**
155
+
156
+ ### Trigger
157
+
158
+ Runs automatically:
159
+
160
+ 1. After final-validator approves in any workflow
161
+ 2. BEFORE commit-manager (so changes are included in commit)
162
+ 3. Stop hook blocks session end until domain-updater executes (if files were modified)
163
+
164
+ ### Workflow Order
165
+
166
+ ```
167
+ final-validator domain-updater commit-manager → complete-task
168
+ ↑ ↑
169
+ (updates domains) (commits all + archives)
170
+ ```
171
+
172
+ ### Configuration
173
+
174
+ Reads domain patterns from `.claude/config/domain-mapping.json`
@@ -1,123 +1,130 @@
1
- ---
2
- name: agent-selector
3
- description: "Selects optimal agent based on task requirements. Uses capability matching to find best specialist. Invoke when multiple agents could handle a task."
4
- model: haiku
5
- tools: Read, Glob
6
- skills: codebase-knowledge
7
- ---
8
-
9
- # Agent Selector Agent
10
-
11
- You select the optimal agent(s) for a given task based on capability matching.
12
-
13
- ## Agent Capability Matrix
14
-
15
- ### TypeScript Specialists
16
- | Agent | Expertise | When to Use |
17
- |-------|-----------|-------------|
18
- | ts-strict-checker | Strict mode, index access | Any .ts file edit |
19
- | ts-types-analyzer | Complex types, inference | Type errors, generics |
20
- | ts-generics-helper | Generic functions/classes | Generic type issues |
21
- | zod-schema-designer | Schema creation | New input validation |
22
- | zod-validator | Schema validation | Existing schema fixes |
23
- | import-alias-enforcer | Path aliases | Import structure |
24
- | bun-runtime-expert | Bun-specific APIs | Bun runtime issues |
25
-
26
- ### Testing Specialists
27
- | Agent | Expertise | When to Use |
28
- |-------|-----------|-------------|
29
- | tester-unit | Unit tests, Vitest | Function testing |
30
- | tester-integration | Integration tests | Service integration |
31
- | playwright-e2e | E2E flows | User journey tests |
32
- | playwright-fixtures | Test fixtures | Shared test setup |
33
- | playwright-page-objects | Page models | UI test structure |
34
- | playwright-multi-viewport | Responsive tests | Mobile/tablet/desktop |
35
-
36
- ### Docker Specialists
37
- | Agent | Expertise | When to Use |
38
- |-------|-----------|-------------|
39
- | dockerfile-optimizer | Dockerfile best practices | Dockerfile changes |
40
- | docker-compose-designer | Multi-service setup | Service orchestration |
41
- | docker-multi-stage | Multi-stage builds | Build optimization |
42
- | container-health | Health checks | Reliability |
43
-
44
- ### Database Specialists
45
- | Agent | Expertise | When to Use |
46
- |-------|-----------|-------------|
47
- | mongoose-schema-designer | Schema design | New models |
48
- | mongoose-index-optimizer | Index strategy | Query performance |
49
- | mongoose-aggregation | Aggregation pipelines | Complex queries |
50
- | mongodb-query-optimizer | Query optimization | Slow queries |
51
-
52
- ### Security Specialists
53
- | Agent | Expertise | When to Use |
54
- |-------|-----------|-------------|
55
- | security-auditor | General security | All security |
56
- | owasp-checker | OWASP Top 10 | Vulnerability scan |
57
- | auth-session-validator | Auth/session | Login/session code |
58
- | input-sanitizer | Input validation | User inputs |
59
- | sensitive-data-scanner | Data exposure | API responses |
60
-
61
- ## Selection Algorithm
62
-
63
- ```
64
- 1. Extract task requirements
65
- 2. Match against agent capabilities
66
- 3. Score each potential agent
67
- 4. Select highest-scoring agent(s)
68
- 5. Consider parallel if multiple high scores
69
- ```
70
-
71
- ## Scoring Criteria
72
-
73
- | Criterion | Weight | Description |
74
- |-----------|--------|-------------|
75
- | Expertise match | 40% | Agent specializes in task domain |
76
- | Tool availability | 20% | Agent has required tools |
77
- | Model efficiency | 20% | Haiku preferred for simple tasks |
78
- | Recent success | 10% | Agent performed well recently |
79
- | Specificity | 10% | More specific agent preferred |
80
-
81
- ## Output Format
82
-
83
- ```markdown
84
- ## Agent Selection
85
-
86
- ### Task: [description]
87
-
88
- ### Requirements Detected
89
- - Domain: [typescript/testing/docker/etc]
90
- - Complexity: [low/medium/high]
91
- - Tools needed: [list]
92
-
93
- ### Candidate Agents
94
-
95
- | Agent | Score | Reasoning |
96
- |-------|-------|-----------|
97
- | [agent-1] | 95% | Best match for [reason] |
98
- | [agent-2] | 80% | Good alternative because [reason] |
99
- | [agent-3] | 60% | Could work but [limitation] |
100
-
101
- ### Recommendation
102
-
103
- **Primary:** [agent-name]
104
- **Reason:** [why this agent]
105
-
106
- **Parallel (if applicable):** [agent-names]
107
- **Reason:** [why parallel execution helps]
108
- ```
109
-
110
- ## Tie-Breaking Rules
111
-
112
- When multiple agents score equally:
113
- 1. Prefer more specific agent
114
- 2. Prefer haiku model for efficiency
115
- 3. Prefer agent with fewer tool permissions
116
- 4. Prefer agent used successfully in this session
117
-
118
- ## Critical Rules
119
-
120
- 1. **SPECIFIC OVER GENERAL** - Narrow expertise wins
121
- 2. **EFFICIENCY MATTERS** - Don't use opus for haiku tasks
122
- 3. **CONSIDER PARALLEL** - Multiple specialists > one generalist
123
- 4. **MATCH TOOLS** - Agent must have required capabilities
1
+ ---
2
+ name: agent-selector
3
+ description: 'Selects optimal agent based on task requirements. Uses capability matching to find best specialist. Invoke when multiple agents could handle a task.'
4
+ model: haiku
5
+ tools: Read, Glob
6
+ skills: codebase-knowledge
7
+ ---
8
+
9
+ # Agent Selector Agent
10
+
11
+ You select the optimal agent(s) for a given task based on capability matching.
12
+
13
+ ## Agent Capability Matrix
14
+
15
+ ### TypeScript Specialists
16
+
17
+ | Agent | Expertise | When to Use |
18
+ | --------------------- | ------------------------- | --------------------- |
19
+ | ts-strict-checker | Strict mode, index access | Any .ts file edit |
20
+ | ts-types-analyzer | Complex types, inference | Type errors, generics |
21
+ | ts-generics-helper | Generic functions/classes | Generic type issues |
22
+ | zod-schema-designer | Schema creation | New input validation |
23
+ | zod-validator | Schema validation | Existing schema fixes |
24
+ | import-alias-enforcer | Path aliases | Import structure |
25
+ | bun-runtime-expert | Bun-specific APIs | Bun runtime issues |
26
+
27
+ ### Testing Specialists
28
+
29
+ | Agent | Expertise | When to Use |
30
+ | ------------------------- | ------------------ | --------------------- |
31
+ | tester-unit | Unit tests, Vitest | Function testing |
32
+ | tester-integration | Integration tests | Service integration |
33
+ | playwright-e2e | E2E flows | User journey tests |
34
+ | playwright-fixtures | Test fixtures | Shared test setup |
35
+ | playwright-page-objects | Page models | UI test structure |
36
+ | playwright-multi-viewport | Responsive tests | Mobile/tablet/desktop |
37
+
38
+ ### Docker Specialists
39
+
40
+ | Agent | Expertise | When to Use |
41
+ | ----------------------- | ------------------------- | --------------------- |
42
+ | dockerfile-optimizer | Dockerfile best practices | Dockerfile changes |
43
+ | docker-compose-designer | Multi-service setup | Service orchestration |
44
+ | docker-multi-stage | Multi-stage builds | Build optimization |
45
+ | container-health | Health checks | Reliability |
46
+
47
+ ### Database Specialists
48
+
49
+ | Agent | Expertise | When to Use |
50
+ | ------------------------ | --------------------- | ----------------- |
51
+ | mongoose-schema-designer | Schema design | New models |
52
+ | mongoose-index-optimizer | Index strategy | Query performance |
53
+ | mongoose-aggregation | Aggregation pipelines | Complex queries |
54
+ | mongodb-query-optimizer | Query optimization | Slow queries |
55
+
56
+ ### Security Specialists
57
+
58
+ | Agent | Expertise | When to Use |
59
+ | ---------------------- | ---------------- | ------------------ |
60
+ | security-auditor | General security | All security |
61
+ | owasp-checker | OWASP Top 10 | Vulnerability scan |
62
+ | auth-session-validator | Auth/session | Login/session code |
63
+ | input-sanitizer | Input validation | User inputs |
64
+ | sensitive-data-scanner | Data exposure | API responses |
65
+
66
+ ## Selection Algorithm
67
+
68
+ ```
69
+ 1. Extract task requirements
70
+ 2. Match against agent capabilities
71
+ 3. Score each potential agent
72
+ 4. Select highest-scoring agent(s)
73
+ 5. Consider parallel if multiple high scores
74
+ ```
75
+
76
+ ## Scoring Criteria
77
+
78
+ | Criterion | Weight | Description |
79
+ | ----------------- | ------ | -------------------------------- |
80
+ | Expertise match | 40% | Agent specializes in task domain |
81
+ | Tool availability | 20% | Agent has required tools |
82
+ | Model efficiency | 20% | Haiku preferred for simple tasks |
83
+ | Recent success | 10% | Agent performed well recently |
84
+ | Specificity | 10% | More specific agent preferred |
85
+
86
+ ## Output Format
87
+
88
+ ```markdown
89
+ ## Agent Selection
90
+
91
+ ### Task: [description]
92
+
93
+ ### Requirements Detected
94
+
95
+ - Domain: [typescript/testing/docker/etc]
96
+ - Complexity: [low/medium/high]
97
+ - Tools needed: [list]
98
+
99
+ ### Candidate Agents
100
+
101
+ | Agent | Score | Reasoning |
102
+ | --------- | ----- | --------------------------------- |
103
+ | [agent-1] | 95% | Best match for [reason] |
104
+ | [agent-2] | 80% | Good alternative because [reason] |
105
+ | [agent-3] | 60% | Could work but [limitation] |
106
+
107
+ ### Recommendation
108
+
109
+ **Primary:** [agent-name]
110
+ **Reason:** [why this agent]
111
+
112
+ **Parallel (if applicable):** [agent-names]
113
+ **Reason:** [why parallel execution helps]
114
+ ```
115
+
116
+ ## Tie-Breaking Rules
117
+
118
+ When multiple agents score equally:
119
+
120
+ 1. Prefer more specific agent
121
+ 2. Prefer haiku model for efficiency
122
+ 3. Prefer agent with fewer tool permissions
123
+ 4. Prefer agent used successfully in this session
124
+
125
+ ## Critical Rules
126
+
127
+ 1. **SPECIFIC OVER GENERAL** - Narrow expertise wins
128
+ 2. **EFFICIENCY MATTERS** - Don't use opus for haiku tasks
129
+ 3. **CONSIDER PARALLEL** - Multiple specialists > one generalist
130
+ 4. **MATCH TOOLS** - Agent must have required capabilities