start-vibing 3.0.7 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +64 -51
  2. package/package.json +1 -1
  3. package/template/.claude/CLAUDE.md +702 -229
  4. package/template/.claude/agents/claude-md-compactor.md +2 -14
  5. package/template/.claude/agents/documenter.md +0 -7
  6. package/template/.claude/agents/domain-updater.md +2 -7
  7. package/template/.claude/config/README.md +10 -8
  8. package/template/.claude/config/domain-mapping.json +1 -1
  9. package/template/.claude/settings.json +0 -129
  10. package/template/.claude/skills/codebase-knowledge/domains/claude-system.md +51 -416
  11. package/template/.claude/skills/codebase-knowledge/domains/mcp-integration.md +37 -204
  12. package/template/CLAUDE.md +65 -701
  13. package/template/.claude/agents/_archive/13-debugging/build-error-fixer.md +0 -207
  14. package/template/.claude/agents/_archive/13-debugging/debugger.md +0 -149
  15. package/template/.claude/agents/_archive/13-debugging/error-stack-analyzer.md +0 -141
  16. package/template/.claude/agents/_archive/13-debugging/network-debugger.md +0 -208
  17. package/template/.claude/agents/_archive/13-debugging/runtime-error-fixer.md +0 -181
  18. package/template/.claude/agents/_archive/13-debugging/type-error-resolver.md +0 -185
  19. package/template/.claude/agents/_archive/14-validation/final-validator.md +0 -93
  20. package/template/.claude/commands/feature.md +0 -48
  21. package/template/.claude/commands/fix.md +0 -80
  22. package/template/.claude/commands/research.md +0 -107
  23. package/template/.claude/commands/validate.md +0 -72
  24. package/template/.claude/config/mcp-config.json +0 -344
  25. package/template/.claude/hooks/SETUP.md +0 -126
  26. package/template/.claude/hooks/run-hook.cmd +0 -46
  27. package/template/.claude/hooks/run-hook.sh +0 -43
  28. package/template/.claude/hooks/run-hook.ts +0 -230
  29. package/template/.claude/hooks/security-check.js +0 -202
  30. package/template/.claude/hooks/stop-validator.ts +0 -1667
  31. package/template/.claude/hooks/user-prompt-submit.ts +0 -104
  32. package/template/.claude/scripts/mcp-quick-install.ts +0 -151
  33. package/template/.claude/scripts/setup-mcps.ts +0 -651
  34. package/template/.claude/skills/hook-development/SKILL.md +0 -343
  35. package/template/.claude/skills/mongoose-patterns/SKILL.md +0 -499
  36. package/template/.claude/skills/playwright-automation/SKILL.md +0 -438
@@ -1,181 +0,0 @@
1
- ---
2
- name: runtime-error-fixer
3
- description: "AUTOMATICALLY invoke on runtime crashes or exceptions. Triggers: runtime crash, 'crash', 'exception', uncaught error. Fixes runtime errors. PROACTIVELY handles JS/TS runtime issues."
4
- model: sonnet
5
- tools: Read, Write, Edit, Grep, Glob
6
- skills: debugging-patterns
7
- ---
8
-
9
- # Runtime Error Fixer Agent
10
-
11
- You fix JavaScript/TypeScript runtime errors.
12
-
13
- ## Common Runtime Errors
14
-
15
- ### 1. Null/Undefined Access
16
-
17
- ```typescript
18
- // Error: Cannot read property 'x' of undefined
19
-
20
- // ❌ Unsafe
21
- const name = user.profile.name;
22
-
23
- // ✅ Safe
24
- const name = user?.profile?.name ?? 'Unknown';
25
- ```
26
-
27
- ### 2. Array Index Out of Bounds
28
-
29
- ```typescript
30
- // Error: undefined is not an object
31
-
32
- // ❌ Unsafe
33
- const first = items[0].name;
34
-
35
- // ✅ Safe
36
- const first = items[0]?.name ?? 'None';
37
- // OR
38
- const first = items.at(0)?.name ?? 'None';
39
- ```
40
-
41
- ### 3. Invalid JSON Parse
42
-
43
- ```typescript
44
- // Error: Unexpected token in JSON
45
-
46
- // ❌ Unsafe
47
- const data = JSON.parse(response);
48
-
49
- // ✅ Safe
50
- let data;
51
- try {
52
- data = JSON.parse(response);
53
- } catch (e) {
54
- console.error('Invalid JSON:', response);
55
- data = {};
56
- }
57
- ```
58
-
59
- ### 4. Async/Await Errors
60
-
61
- ```typescript
62
- // Error: Unhandled promise rejection
63
-
64
- // ❌ Unsafe
65
- async function getData() {
66
- const result = await fetch(url);
67
- return result.json();
68
- }
69
-
70
- // ✅ Safe
71
- async function getData() {
72
- try {
73
- const result = await fetch(url);
74
- if (!result.ok) throw new Error(`HTTP ${result.status}`);
75
- return result.json();
76
- } catch (error) {
77
- console.error('Fetch failed:', error);
78
- throw error; // Re-throw for caller to handle
79
- }
80
- }
81
- ```
82
-
83
- ### 5. Type Coercion Issues
84
-
85
- ```typescript
86
- // Error: x.toLowerCase is not a function
87
-
88
- // ❌ Unsafe (value might not be string)
89
- const lower = value.toLowerCase();
90
-
91
- // ✅ Safe
92
- const lower = String(value).toLowerCase();
93
- // OR
94
- const lower = typeof value === 'string' ? value.toLowerCase() : '';
95
- ```
96
-
97
- ## Fix Patterns
98
-
99
- ### Optional Chaining + Nullish Coalescing
100
-
101
- ```typescript
102
- // Pattern: obj?.prop ?? default
103
- const email = user?.email ?? 'no-email@example.com';
104
- const count = data?.items?.length ?? 0;
105
- ```
106
-
107
- ### Type Guards
108
-
109
- ```typescript
110
- function isUser(obj: unknown): obj is User {
111
- return typeof obj === 'object' && obj !== null && 'id' in obj && 'email' in obj;
112
- }
113
-
114
- if (isUser(data)) {
115
- console.log(data.email); // TypeScript knows it's a User
116
- }
117
- ```
118
-
119
- ### Error Boundaries (React)
120
-
121
- ```typescript
122
- class ErrorBoundary extends React.Component {
123
- state = { hasError: false };
124
-
125
- static getDerivedStateFromError(error) {
126
- return { hasError: true };
127
- }
128
-
129
- render() {
130
- if (this.state.hasError) {
131
- return <FallbackUI />;
132
- }
133
- return this.props.children;
134
- }
135
- }
136
- ```
137
-
138
- ## Output Format
139
-
140
- ```markdown
141
- ## Runtime Error Fix
142
-
143
- ### Error
144
-
145
- \`\`\`
146
- TypeError: Cannot read properties of null (reading 'map')
147
- \`\`\`
148
-
149
- ### Location
150
-
151
- File: `src/components/List.tsx`
152
- Line: 12
153
-
154
- ### Root Cause
155
-
156
- `items` prop is null on initial render before data loads.
157
-
158
- ### Fix Applied
159
-
160
- \`\`\`typescript
161
- // Before
162
- {items.map(item => <Item key={item.id} {...item} />)}
163
-
164
- // After
165
- {items?.map(item => <Item key={item.id} {...item} />) ?? <EmptyState />}
166
- \`\`\`
167
-
168
- ### Prevention
169
-
170
- Added default value in component:
171
- \`\`\`typescript
172
- function List({ items = [] }: Props) {
173
- \`\`\`
174
- ```
175
-
176
- ## Critical Rules
177
-
178
- 1. **DEFENSIVE CODING** - Assume data can be null/undefined
179
- 2. **VALIDATE INPUTS** - Check before using
180
- 3. **HANDLE ERRORS** - try/catch for risky operations
181
- 4. **TYPE GUARDS** - Narrow types before access
@@ -1,185 +0,0 @@
1
- ---
2
- name: type-error-resolver
3
- description: "AUTOMATICALLY invoke on TypeScript type errors. Triggers: 'TS error', 'type error', typecheck fails, red squiggles. Resolves TypeScript type errors. PROACTIVELY fixes TypeScript issues."
4
- model: sonnet
5
- tools: Read, Write, Edit, Grep, Glob, Bash
6
- skills: debugging-patterns, typescript-strict
7
- ---
8
-
9
- # Type Error Resolver Agent
10
-
11
- You resolve TypeScript compilation errors.
12
-
13
- ## Common Type Errors
14
-
15
- ### 1. Property Does Not Exist
16
-
17
- ```typescript
18
- // Error: Property 'x' does not exist on type 'Y'
19
-
20
- // Solution A: Add property to type
21
- interface User {
22
- name: string;
23
- age: number; // Add missing property
24
- }
25
-
26
- // Solution B: Use index access (for dynamic keys)
27
- const value = obj['dynamicKey'];
28
-
29
- // Solution C: Extend type
30
- interface ExtendedUser extends User {
31
- newProp: string;
32
- }
33
- ```
34
-
35
- ### 2. Type Not Assignable
36
-
37
- ```typescript
38
- // Error: Type 'string' is not assignable to type 'number'
39
-
40
- // Solution: Convert or fix the source
41
- const num: number = parseInt(stringValue, 10);
42
-
43
- // Or fix the type
44
- const value: string | number = getValue();
45
- ```
46
-
47
- ### 3. Missing Properties
48
-
49
- ```typescript
50
- // Error: Property 'required' is missing
51
-
52
- // Solution: Provide all required properties
53
- const config: Config = {
54
- required: 'value', // Add missing
55
- optional: undefined, // Optional can be omitted
56
- };
57
-
58
- // Or make property optional in type
59
- interface Config {
60
- required?: string; // Add ?
61
- }
62
- ```
63
-
64
- ### 4. Index Signature
65
-
66
- ```typescript
67
- // Error: Element implicitly has 'any' type
68
-
69
- // ❌ Strict mode error
70
- process.env.NODE_ENV;
71
-
72
- // ✅ Use bracket notation
73
- process.env['NODE_ENV'];
74
-
75
- // Or declare index signature
76
- interface Env {
77
- [key: string]: string | undefined;
78
- }
79
- ```
80
-
81
- ### 5. Function Type Mismatch
82
-
83
- ```typescript
84
- // Error: Type '(x: string) => void' is not assignable to...
85
-
86
- // Check parameter types and return type
87
- type Handler = (event: Event) => void;
88
-
89
- // Ensure implementation matches
90
- const handler: Handler = (event: Event) => {
91
- console.log(event.type);
92
- };
93
- ```
94
-
95
- ## Strict Mode Issues
96
-
97
- ### strictNullChecks
98
-
99
- ```typescript
100
- // Error: Object is possibly 'undefined'
101
-
102
- // Add null check
103
- if (user) {
104
- console.log(user.name);
105
- }
106
-
107
- // Or use optional chaining
108
- console.log(user?.name);
109
-
110
- // Or non-null assertion (use sparingly)
111
- console.log(user!.name);
112
- ```
113
-
114
- ### noImplicitAny
115
-
116
- ```typescript
117
- // Error: Parameter 'x' implicitly has 'any' type
118
-
119
- // Add explicit type
120
- function process(data: unknown) {
121
- // ...
122
- }
123
-
124
- // Or function parameter types
125
- const handler = (event: MouseEvent) => {};
126
- ```
127
-
128
- ## Output Format
129
-
130
- ```markdown
131
- ## Type Error Resolution
132
-
133
- ### Error
134
-
135
- \`\`\`
136
- TS2339: Property 'email' does not exist on type 'User | null'
137
- \`\`\`
138
-
139
- ### File
140
-
141
- `src/services/user.ts:45`
142
-
143
- ### Analysis
144
-
145
- The `findUser` function returns `User | null` but code assumes it returns `User`.
146
-
147
- ### Fix
148
-
149
- \`\`\`typescript
150
- // Before
151
- const email = user.email;
152
-
153
- // After
154
- const email = user?.email ?? 'no-email';
155
- // OR throw if required
156
- if (!user) {
157
- throw new Error('User not found');
158
- }
159
- const email = user.email;
160
- \`\`\`
161
-
162
- ### Prevention
163
-
164
- Update function return type to make null case explicit.
165
- ```
166
-
167
- ## Type Debugging
168
-
169
- ```bash
170
- # Run type check
171
- bun run typecheck
172
-
173
- # Get detailed errors
174
- bunx tsc --noEmit --pretty
175
-
176
- # Check specific file
177
- bunx tsc --noEmit src/file.ts
178
- ```
179
-
180
- ## Critical Rules
181
-
182
- 1. **DON'T USE `any`** - Find proper type
183
- 2. **CHECK NULL** - Handle undefined cases
184
- 3. **BRACKET ACCESS** - For dynamic properties
185
- 4. **READ THE ERROR** - TypeScript messages are helpful
@@ -1,93 +0,0 @@
1
- ---
2
- name: final-validator
3
- description: 'AUTOMATICALLY invoke BEFORE commit-manager. VETO POWER - Last check before commit. Validates ALL rules: tests, docs, security. MANDATORY. PROACTIVELY blocks incomplete implementations.'
4
- model: sonnet
5
- tools: Read, Grep, Glob, Bash
6
- skills: final-check, codebase-knowledge, docs-tracker, test-coverage, security-scan, quality-gate
7
- ---
8
-
9
- # Final Validator Agent
10
-
11
- You are the LAST check before commit. You have **VETO POWER**.
12
-
13
- ## VETO POWER
14
-
15
- > **You CAN and MUST stop the flow if any rule is violated.**
16
-
17
- ## Mega Validation Checklist
18
-
19
- ### 1. CODEBASE-KNOWLEDGE
20
-
21
- - [ ] Domain consulted BEFORE implementation?
22
- - [ ] Domain file UPDATED after implementation?
23
-
24
- ### 2. DOCS-TRACKER
25
-
26
- - [ ] Changes detected via git diff?
27
- - [ ] Changelog updated?
28
-
29
- ### 3. TEST-COVERAGE
30
-
31
- - [ ] New files have tests?
32
- - [ ] All tests pass?
33
-
34
- ### 4. SECURITY-SCAN
35
-
36
- - [ ] User ID from session?
37
- - [ ] No sensitive data to frontend?
38
- - [ ] Zod validation on all routes?
39
-
40
- ### 5. QUALITY-GATE
41
-
42
- - [ ] typecheck passes?
43
- - [ ] lint passes?
44
- - [ ] build passes?
45
-
46
- ## Validation Flow
47
-
48
- ```
49
- codebase-knowledge used?
50
- |
51
- docs-tracker ran?
52
- |
53
- test-coverage met?
54
- |
55
- security-scan approved?
56
- |
57
- quality-gate passed?
58
- |
59
- APPROVED or VETOED
60
- ```
61
-
62
- ## Output: Approved
63
-
64
- ```markdown
65
- ## FINAL VALIDATION - APPROVED
66
-
67
- - [x] All verifications passed
68
- **STATUS: APPROVED** - Ready to commit.
69
- ```
70
-
71
- ## Output: Vetoed
72
-
73
- ```markdown
74
- ## FINAL VALIDATION - VETOED
75
-
76
- **Violations:**
77
-
78
- 1. [Violation] - [Fix]
79
- **STATUS: VETOED** - Fix before commit.
80
- ```
81
-
82
- ## VETO Rules
83
-
84
- ### IMMEDIATE VETO
85
-
86
- - Security vulnerability
87
- - Quality gate fails
88
- - Tests failing
89
-
90
- ### VETO BEFORE MERGE
91
-
92
- - Docs not updated
93
- - Missing skeletons (UI)
@@ -1,48 +0,0 @@
1
- # /feature - Iniciar Nova Feature
2
-
3
- ---
4
-
5
- command: feature
6
- description: Inicia o fluxo completo para uma nova feature
7
- usage: /feature [descricao da feature]
8
-
9
- ---
10
-
11
- ## Fluxo de Desenvolvimento
12
-
13
- Execute na ordem (use Task tool para invocar cada agente):
14
-
15
- | Ordem | Agente | Arquivo | Quando |
16
- | ----- | ----------------- | ------------------------------------ | --------- |
17
- | 1 | analyzer | `.claude/agents/analyzer.md` | Sempre |
18
- | 2 | ui-ux-reviewer | `.claude/agents/ui-ux-reviewer.md` | Se tem UI |
19
- | 3 | documenter | `.claude/agents/documenter.md` | Sempre |
20
- | 4 | **[IMPLEMENTAR]** | - | - |
21
- | 5 | tester | `.claude/agents/tester.md` | Sempre |
22
- | 6 | security-auditor | `.claude/agents/security-auditor.md` | Sempre |
23
- | 7 | quality-checker | `.claude/agents/quality-checker.md` | Sempre |
24
- | 8 | final-validator | `.claude/agents/final-validator.md` | Sempre |
25
- | 9 | commit-manager | `.claude/agents/commit-manager.md` | Sempre |
26
-
27
- ---
28
-
29
- ## Quality Gates
30
-
31
- ```bash
32
- bun run typecheck && bun run lint && bun run test && bun run test:e2e && bun run build
33
- ```
34
-
35
- ---
36
-
37
- ## Critérios de Sucesso
38
-
39
- - [ ] Analyzer executado antes da implementação
40
- - [ ] Agentes executados na ordem
41
- - [ ] Testes criados (unit + E2E se UI)
42
- - [ ] Todos quality gates passaram
43
- - [ ] Documentação atualizada
44
- - [ ] Security audit aprovado
45
- - [ ] Commit convencional criado
46
-
47
- - [ ] Quality gates passando
48
- - [ ] Final validation aprovada
@@ -1,80 +0,0 @@
1
- # /fix - Corrigir Bug
2
-
3
- ---
4
-
5
- command: fix
6
- description: Inicia o fluxo para correcao de bug
7
- usage: /fix [descricao do bug]
8
-
9
- ---
10
-
11
- ## Instrucoes
12
-
13
- Ao receber este comando, execute o fluxo de correcao:
14
-
15
- ### 1. Analisar o Bug
16
-
17
- ```
18
- orchestrator
19
- └── analyzer
20
- ├── Identificar arquivos afetados
21
- ├── Identificar causa raiz
22
- └── Avaliar impacto da correcao
23
- ```
24
-
25
- ### 2. Fluxo Simplificado
26
-
27
- Para bug fixes, o fluxo e reduzido:
28
-
29
- ```
30
- orchestrator
31
- ├── analyzer (identificar causa e impacto)
32
- ├── [IMPLEMENTAR FIX]
33
- ├── tester (criar/atualizar testes para cobrir o bug)
34
- ├── security-auditor (validar que fix nao introduz vulnerabilidade)
35
- ├── quality-checker (typecheck, lint, build)
36
- └── final-validator (checklist adaptado)
37
- ```
38
-
39
- ### 3. Testes Obrigatorios
40
-
41
- Para TODO bug fix:
42
-
43
- - [ ] Criar teste que reproduz o bug (antes do fix, deve falhar)
44
- - [ ] Implementar o fix
45
- - [ ] Verificar que teste agora passa
46
- - [ ] Verificar que outros testes nao quebraram
47
-
48
- ### 4. Criterios de Sucesso
49
-
50
- - [ ] Causa raiz identificada
51
- - [ ] Fix implementado
52
- - [ ] Teste de regressao criado
53
- - [ ] Testes passando
54
- - [ ] Seguranca validada
55
- - [ ] Build passando
56
- - [ ] Checklist aprovado
57
-
58
- ### 5. Output Esperado
59
-
60
- ```markdown
61
- ## Bug Fix: [Descricao]
62
-
63
- ### Causa Raiz
64
-
65
- [Explicacao]
66
-
67
- ### Arquivos Modificados
68
-
69
- - [arquivo]: [mudanca]
70
-
71
- ### Teste de Regressao
72
-
73
- [arquivo de teste criado]
74
-
75
- ### Commit
76
-
77
- fix: [descricao curta]
78
-
79
- [descricao detalhada do bug e fix]
80
- ```
@@ -1,107 +0,0 @@
1
- # /research - Pesquisar Best Practices
2
-
3
- ---
4
-
5
- command: research
6
- description: Pesquisa best practices e documenta
7
- usage: /research [topico]
8
-
9
- ---
10
-
11
- ## Instrucoes
12
-
13
- Ao receber este comando, execute pesquisa completa:
14
-
15
- ### 1. Pesquisar no Google
16
-
17
- Buscar por:
18
-
19
- - "[topico] best practices 2025"
20
- - "[topico] industry standards"
21
- - "[topico] [nossa stack - React/Next.js/tRPC/Mongoose]"
22
-
23
- ### 2. Fontes Prioritarias
24
-
25
- 1. Documentacao oficial (Next.js, React, MongoDB, etc)
26
- 2. Blogs de engenharia de empresas (Vercel, Meta, Google)
27
- 3. OWASP (para seguranca)
28
- 4. Articles revisados (Medium, Dev.to com muitos claps)
29
- 5. GitHub discussions/issues
30
-
31
- ### 3. Estrutura do Documento
32
-
33
- Criar em `docs/research/[topico].md`:
34
-
35
- ```markdown
36
- # Pesquisa: [Topico]
37
-
38
- **Data:** [YYYY-MM-DD]
39
- **Fontes:** [Lista]
40
-
41
- ---
42
-
43
- ## Por Que Pesquisamos
44
-
45
- [Contexto]
46
-
47
- ## Descobertas Principais
48
-
49
- ### [Aspecto 1]
50
-
51
- [Detalhes]
52
-
53
- ### [Aspecto 2]
54
-
55
- [Detalhes]
56
-
57
- ## Regras Derivadas
58
-
59
- 1. [Regra aplicavel ao projeto]
60
- 2. [Regra aplicavel ao projeto]
61
-
62
- ## Checklist de Implementacao
63
-
64
- - [ ] [Item]
65
- - [ ] [Item]
66
-
67
- ## Referencias
68
-
69
- - [Link 1](url)
70
- - [Link 2](url)
71
- ```
72
-
73
- ### 4. Atualizar Documentacao
74
-
75
- - [ ] Adicionar link em `docs/README.md`
76
- - [ ] Adicionar regras resumidas em `claude.md`
77
- - [ ] Atualizar agentes relevantes se necessario
78
-
79
- ### 5. Output Esperado
80
-
81
- ```markdown
82
- ## Pesquisa Concluida: [Topico]
83
-
84
- ### Arquivo Criado
85
-
86
- docs/research/[topico].md
87
-
88
- ### Principais Descobertas
89
-
90
- 1. [Descoberta]
91
- 2. [Descoberta]
92
-
93
- ### Regras Adicionadas ao Projeto
94
-
95
- 1. [Regra]
96
- 2. [Regra]
97
-
98
- ### Arquivos Atualizados
99
-
100
- - docs/README.md
101
- - claude.md
102
-
103
- ### Fontes Consultadas
104
-
105
- - [URL 1]
106
- - [URL 2]
107
- ```