wegho-agentes 7.0.0 → 7.0.1
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.
- package/.agent/skills/wegho-global-rules/SKILL.md +20 -0
- package/.agent/workflows/PROMPT_GUIDE.md +7 -4
- package/.agents/cli.ts +29 -21
- package/.agents/core/base-agent.ts +28 -12
- package/.agents/core/memory-system.ts +45 -13
- package/.agents/core/report-generator.ts +26 -19
- package/.agents/orchestrator.ts +104 -74
- package/.clinerules +318 -1229
- package/.cursorrules +0 -189
- package/README.md +3 -3
- package/docs/VERSION.md +3 -2
- package/package.json +3 -3
- package/.agents/agents/ai-agents/README.md +0 -175
- package/.agents/agents/ai-agents/agent.ts +0 -83
- package/.agents/agents/ai-agents/specialty.md +0 -14
- package/.agents/agents/architecture/README.md +0 -61
- package/.agents/agents/architecture/agent.ts +0 -238
- package/.agents/agents/architecture/memory.md +0 -111
- package/.agents/agents/architecture/specialty.md +0 -31
- package/.agents/agents/automation/README.md +0 -60
- package/.agents/agents/automation/agent.ts +0 -61
- package/.agents/agents/automation/specialty.md +0 -14
- package/.agents/agents/backend/README.md +0 -155
- package/.agents/agents/backend/agent.ts +0 -100
- package/.agents/agents/backend/specialty.md +0 -14
- package/.agents/agents/cloud/README.md +0 -73
- package/.agents/agents/cloud/agent.ts +0 -53
- package/.agents/agents/cloud/specialty.md +0 -14
- package/.agents/agents/code-auditor/README.md +0 -37
- package/.agents/agents/code-auditor/agent.ts +0 -334
- package/.agents/agents/code-auditor/specialty.md +0 -14
- package/.agents/agents/cro/README.md +0 -200
- package/.agents/agents/cro/agent.ts +0 -61
- package/.agents/agents/cro/specialty.md +0 -14
- package/.agents/agents/database/README.md +0 -67
- package/.agents/agents/database/agent.ts +0 -93
- package/.agents/agents/database/specialty.md +0 -14
- package/.agents/agents/devops/README.md +0 -84
- package/.agents/agents/devops/agent.ts +0 -54
- package/.agents/agents/devops/specialty.md +0 -14
- package/.agents/agents/documentation/README.md +0 -107
- package/.agents/agents/documentation/agent.ts +0 -253
- package/.agents/agents/documentation/memory.md +0 -56
- package/.agents/agents/documentation/specialty.md +0 -33
- package/.agents/agents/frontend/README.md +0 -188
- package/.agents/agents/frontend/agent.ts +0 -211
- package/.agents/agents/frontend/memory.md +0 -139
- package/.agents/agents/frontend/specialty.md +0 -30
- package/.agents/agents/inventory/README.md +0 -35
- package/.agents/agents/inventory/agent.ts +0 -758
- package/.agents/agents/inventory/memory.md +0 -50
- package/.agents/agents/inventory/specialty.md +0 -129
- package/.agents/agents/nextjs/README.md +0 -58
- package/.agents/agents/nextjs/agent.ts +0 -114
- package/.agents/agents/nextjs/specialty.md +0 -14
- package/.agents/agents/pentest/README.md +0 -228
- package/.agents/agents/pentest/agent.ts +0 -96
- package/.agents/agents/pentest/specialty.md +0 -14
- package/.agents/agents/planning/README.md +0 -107
- package/.agents/agents/planning/agent.ts +0 -389
- package/.agents/agents/planning/specialty.md +0 -14
- package/.agents/agents/project-discovery/README.md +0 -35
- package/.agents/agents/project-discovery/agent.ts +0 -344
- package/.agents/agents/project-discovery/specialty.md +0 -14
- package/.agents/agents/quality/README.md +0 -81
- package/.agents/agents/quality/agent.ts +0 -269
- package/.agents/agents/quality/memory.md +0 -110
- package/.agents/agents/quality/specialty.md +0 -31
- package/.agents/agents/rag/README.md +0 -41
- package/.agents/agents/rag/agent.ts +0 -85
- package/.agents/agents/rag/specialty.md +0 -14
- package/.agents/agents/security/README.md +0 -152
- package/.agents/agents/security/agent.ts +0 -218
- package/.agents/agents/security/memory.md +0 -91
- package/.agents/agents/security/specialty.md +0 -31
- package/.agents/agents/task-analyzer/README.md +0 -36
- package/.agents/agents/task-analyzer/agent.ts +0 -462
- package/.agents/agents/task-analyzer/specialty.md +0 -14
- package/.agents/agents/testing/README.md +0 -161
- package/.agents/agents/testing/agent.ts +0 -61
- package/.agents/agents/testing/specialty.md +0 -14
- package/.agents/agents/uiux/README.md +0 -68
- package/.agents/agents/uiux/agent.ts +0 -95
- package/.agents/agents/uiux/specialty.md +0 -14
- package/.agents/base/base-agent.ts +0 -331
- package/.agents/base/memory-system.ts +0 -397
- package/.agents/base/skill-manager.ts +0 -95
- package/.agents/convert-memory.ps1 +0 -153
- package/.agents/examples/reporting-example.md +0 -203
- package/.agents/managers/build-manager.ts +0 -304
- package/.agents/managers/cache-manager.ts +0 -184
- package/.agents/managers/checkpoint-manager.ts +0 -299
- package/.agents/migrate-agents.ps1 +0 -117
- package/.agents/templates/change-report.md +0 -55
- package/.agents/templates/execution-plan.md +0 -36
- package/.agents/unmapped-skills.txt +0 -0
- package/.agents/utils/agent-migrator.ts +0 -360
- package/.agents/utils/agent-monitor.ts +0 -102
- package/.agents/utils/agent-parallelizer.ts +0 -108
- package/.agents/utils/context-monitor.ts +0 -140
- package/.agents/utils/feedback-collector.ts +0 -207
- package/.agents/utils/file-generator.ts +0 -304
- package/.agents/utils/memory-converter.ts +0 -217
- package/.agents/utils/memory-dashboard.ts +0 -147
- package/.agents/utils/performance-tracker.ts +0 -275
- package/.agents/utils/report-generator.ts +0 -193
- package/.agents/utils/retry-utility.ts +0 -140
- package/.agents/utils/workflow-validator.ts +0 -158
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Architecture Agent (com Memória)
|
|
3
|
-
*
|
|
4
|
-
* Responsabilidades:
|
|
5
|
-
* - Validar estrutura de arquivos
|
|
6
|
-
* - Garantir limite de 500 linhas por arquivo
|
|
7
|
-
* - Detectar duplicação de código
|
|
8
|
-
* - Validar separação de camadas
|
|
9
|
-
* - Aprender padrões arquiteturais que funcionam
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import * as fs from 'fs';
|
|
13
|
-
import * as path from 'path';
|
|
14
|
-
import { BaseAgent, TaskContext, TaskResult } from '../../base/base-agent.js';
|
|
15
|
-
import { validateFileLines } from '../../config.js';
|
|
16
|
-
|
|
17
|
-
export interface ArchitectureCheckResult extends TaskResult {
|
|
18
|
-
violations: Array<{
|
|
19
|
-
type: string;
|
|
20
|
-
file: string;
|
|
21
|
-
severity: 'error' | 'warning';
|
|
22
|
-
message: string;
|
|
23
|
-
suggestion: string;
|
|
24
|
-
}>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export class ArchitectureAgent extends BaseAgent {
|
|
28
|
-
constructor(memoryBasePath: string = '.agents/memory') {
|
|
29
|
-
super('architecture-agent', memoryBasePath);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Implementação da validação arquitetural
|
|
34
|
-
*/
|
|
35
|
-
async executeTask(taskDescription: string, context: TaskContext): Promise<TaskResult> {
|
|
36
|
-
const violations: ArchitectureCheckResult['violations'] = [];
|
|
37
|
-
|
|
38
|
-
for (const filePath of context.files) {
|
|
39
|
-
if (!fs.existsSync(filePath)) {
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// 1. Verificar limite de 500 linhas
|
|
44
|
-
const lineCheck = validateFileLines(filePath, 500);
|
|
45
|
-
if (!lineCheck.valid) {
|
|
46
|
-
violations.push({
|
|
47
|
-
type: 'file-too-long',
|
|
48
|
-
file: filePath,
|
|
49
|
-
severity: 'error',
|
|
50
|
-
message: `Arquivo tem ${lineCheck.lineCount} linhas (limite: 500)`,
|
|
51
|
-
suggestion: 'Refatorar: extrair funções, componentes ou classes para arquivos separados'
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
const content = fs.readFileSync(filePath, 'utf-8');
|
|
56
|
-
|
|
57
|
-
// 2. Detectar duplicação de código
|
|
58
|
-
const duplicates = this.detectCodeDuplication(content);
|
|
59
|
-
if (duplicates.length > 0) {
|
|
60
|
-
violations.push({
|
|
61
|
-
type: 'code-duplication',
|
|
62
|
-
file: filePath,
|
|
63
|
-
severity: 'warning',
|
|
64
|
-
message: `${duplicates.length} bloco(s) de código duplicado detectado(s)`,
|
|
65
|
-
suggestion: 'Extrair código duplicado para funções/componentes reutilizáveis'
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// 3. Validar separação de camadas
|
|
70
|
-
const layerViolations = this.validateLayerSeparation(filePath, content);
|
|
71
|
-
violations.push(...layerViolations);
|
|
72
|
-
|
|
73
|
-
// 4. Verificar nomenclatura
|
|
74
|
-
const namingIssues = this.validateNaming(filePath);
|
|
75
|
-
violations.push(...namingIssues);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const errors = violations.filter(v => v.severity === 'error');
|
|
79
|
-
const success = errors.length === 0;
|
|
80
|
-
|
|
81
|
-
const details = this.formatViolations(violations);
|
|
82
|
-
|
|
83
|
-
return {
|
|
84
|
-
success,
|
|
85
|
-
details,
|
|
86
|
-
issues: errors.map(v => v.message),
|
|
87
|
-
warnings: violations.filter(v => v.severity === 'warning').map(v => v.message),
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Detecta duplicação de código
|
|
93
|
-
*/
|
|
94
|
-
private detectCodeDuplication(content: string): string[] {
|
|
95
|
-
const duplicates: string[] = [];
|
|
96
|
-
const lines = content.split('\n');
|
|
97
|
-
const blockSize = 5; // MÃnimo de 5 linhas para considerar duplicação
|
|
98
|
-
|
|
99
|
-
// Algoritmo simplificado - em produção usaria algo como jscpd
|
|
100
|
-
const blocks = new Map<string, number>();
|
|
101
|
-
|
|
102
|
-
for (let i = 0; i <= lines.length - blockSize; i++) {
|
|
103
|
-
const block = lines.slice(i, i + blockSize).join('\n').trim();
|
|
104
|
-
if (block.length > 50) { // Ignorar blocos muito pequenos
|
|
105
|
-
const count = blocks.get(block) || 0;
|
|
106
|
-
blocks.set(block, count + 1);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
blocks.forEach((count, block) => {
|
|
111
|
-
if (count > 1) {
|
|
112
|
-
duplicates.push(block.substring(0, 100) + '...');
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
return duplicates;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Valida separação de camadas
|
|
121
|
-
*/
|
|
122
|
-
private validateLayerSeparation(filePath: string, content: string): ArchitectureCheckResult['violations'] {
|
|
123
|
-
const violations: ArchitectureCheckResult['violations'] = [];
|
|
124
|
-
|
|
125
|
-
// Componentes não devem ter lógica de API direta
|
|
126
|
-
if (filePath.includes('components/') && !filePath.includes('pages/')) {
|
|
127
|
-
if (content.match(/fetch\(|axios\.|supabase\./)) {
|
|
128
|
-
violations.push({
|
|
129
|
-
type: 'layer-violation',
|
|
130
|
-
file: filePath,
|
|
131
|
-
severity: 'warning',
|
|
132
|
-
message: 'Componente com chamada de API direta',
|
|
133
|
-
suggestion: 'Extrair lógica de API para hook customizado ou service'
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Utils não devem importar componentes
|
|
139
|
-
if (filePath.includes('utils/') || filePath.includes('lib/')) {
|
|
140
|
-
if (content.match(/import.*from.*components/)) {
|
|
141
|
-
violations.push({
|
|
142
|
-
type: 'layer-violation',
|
|
143
|
-
file: filePath,
|
|
144
|
-
severity: 'error',
|
|
145
|
-
message: 'Arquivo de utilidade importando componente',
|
|
146
|
-
suggestion: 'Utils devem ser independentes de componentes UI'
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
return violations;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Valida nomenclatura de arquivos
|
|
156
|
-
*/
|
|
157
|
-
private validateNaming(filePath: string): ArchitectureCheckResult['violations'] {
|
|
158
|
-
const violations: ArchitectureCheckResult['violations'] = [];
|
|
159
|
-
const fileName = path.basename(filePath);
|
|
160
|
-
|
|
161
|
-
// Componentes React devem usar PascalCase
|
|
162
|
-
if (filePath.includes('components/') && fileName.match(/^[a-z]/)) {
|
|
163
|
-
violations.push({
|
|
164
|
-
type: 'naming-convention',
|
|
165
|
-
file: filePath,
|
|
166
|
-
severity: 'warning',
|
|
167
|
-
message: 'Componente deve usar PascalCase',
|
|
168
|
-
suggestion: `Renomear para ${fileName.charAt(0).toUpperCase() + fileName.slice(1)}`
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// Hooks devem começar com 'use'
|
|
173
|
-
if (filePath.includes('hooks/') && !fileName.startsWith('use')) {
|
|
174
|
-
violations.push({
|
|
175
|
-
type: 'naming-convention',
|
|
176
|
-
file: filePath,
|
|
177
|
-
severity: 'warning',
|
|
178
|
-
message: 'Hook customizado deve começar com "use"',
|
|
179
|
-
suggestion: `Renomear para use${fileName.charAt(0).toUpperCase() + fileName.slice(1)}`
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return violations;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Formata violações
|
|
188
|
-
*/
|
|
189
|
-
private formatViolations(violations: ArchitectureCheckResult['violations']): string {
|
|
190
|
-
if (violations.length === 0) {
|
|
191
|
-
return 'Arquitetura validada com sucesso';
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
const errors = violations.filter(v => v.severity === 'error').length;
|
|
195
|
-
const warnings = violations.filter(v => v.severity === 'warning').length;
|
|
196
|
-
|
|
197
|
-
return `Violações: ${errors} erro(s), ${warnings} aviso(s)`;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Especialidade padrão do Architecture Agent
|
|
202
|
-
*/
|
|
203
|
-
protected getDefaultSpecialty(): string {
|
|
204
|
-
return `# Architecture Agent - Especialidade
|
|
205
|
-
|
|
206
|
-
## Responsabilidades
|
|
207
|
-
- Validar estrutura de arquivos
|
|
208
|
-
- Garantir limite de 500 linhas por arquivo
|
|
209
|
-
- Detectar duplicação de código
|
|
210
|
-
- Validar separação de camadas (MVC, Clean Architecture)
|
|
211
|
-
- Verificar nomenclatura consistente
|
|
212
|
-
|
|
213
|
-
## Expertise
|
|
214
|
-
- Design Patterns (Factory, Strategy, Observer, etc.)
|
|
215
|
-
- SOLID Principles
|
|
216
|
-
- Clean Architecture
|
|
217
|
-
- Microservices Architecture
|
|
218
|
-
- Modularização e Componentização
|
|
219
|
-
- DRY (Don't Repeat Yourself)
|
|
220
|
-
|
|
221
|
-
## Regras
|
|
222
|
-
- Máximo 500 linhas por arquivo
|
|
223
|
-
- Sem duplicação de código (DRY)
|
|
224
|
-
- Separação clara de responsabilidades
|
|
225
|
-
- Nomenclatura consistente (PascalCase para componentes, camelCase para funções)
|
|
226
|
-
- Componentes UI não devem ter lógica de API
|
|
227
|
-
- Utils devem ser independentes de UI
|
|
228
|
-
|
|
229
|
-
## Tarefas TÃpicas
|
|
230
|
-
- Validar estrutura de novos componentes
|
|
231
|
-
- Detectar código duplicado
|
|
232
|
-
- Sugerir refatorações
|
|
233
|
-
- Validar separação de camadas
|
|
234
|
-
- Revisar nomenclatura de arquivos
|
|
235
|
-
`;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# Memória do Agente architecture
|
|
2
|
-
|
|
3
|
-
Última atualização: 2026-02-08T06:24:05Z
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 📊 EstatÃsticas
|
|
8
|
-
|
|
9
|
-
- Total de sucessos: 7
|
|
10
|
-
- Total de falhas: 1
|
|
11
|
-
- Taxa de sucesso: 87.5%
|
|
12
|
-
- Aprendizados acumulados: 0
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## ✅ Sucessos Recentes
|
|
17
|
-
### 25/01/2026 - `1769351006457-vk0dkmr0n`
|
|
18
|
-
|
|
19
|
-
**Tarefa**: Validar estrutura de arquivos e garantir limite 500 linhas
|
|
20
|
-
|
|
21
|
-
**Contexto**:
|
|
22
|
-
- Arquivos: nenhum
|
|
23
|
-
- Ãreas: documentation
|
|
24
|
-
- Complexidade: low
|
|
25
|
-
|
|
26
|
-
**Resultado**: Arquitetura validada com sucesso
|
|
27
|
-
|
|
28
|
-
### 24/01/2026 - `1769269845287-7uyeaudv6`
|
|
29
|
-
|
|
30
|
-
**Tarefa**: Validar estrutura de arquivos e garantir limite 500 linhas
|
|
31
|
-
|
|
32
|
-
**Contexto**:
|
|
33
|
-
- Arquivos: nenhum
|
|
34
|
-
- Ãreas: inventory
|
|
35
|
-
- Complexidade: low
|
|
36
|
-
|
|
37
|
-
**Resultado**: Arquitetura validada com sucesso
|
|
38
|
-
|
|
39
|
-
### 24/01/2026 - `1769254251459-7xt71jatb`
|
|
40
|
-
|
|
41
|
-
**Tarefa**: Validar estrutura de arquivos e garantir limite 500 linhas
|
|
42
|
-
|
|
43
|
-
**Contexto**:
|
|
44
|
-
- Arquivos: nenhum
|
|
45
|
-
- Ãreas: frontend, security
|
|
46
|
-
- Complexidade: medium
|
|
47
|
-
|
|
48
|
-
**Resultado**: Arquitetura validada com sucesso
|
|
49
|
-
|
|
50
|
-
### 24/01/2026 - `1769254246022-wktgyd1f2`
|
|
51
|
-
|
|
52
|
-
**Tarefa**: Validar estrutura de arquivos e garantir limite 500 linhas
|
|
53
|
-
|
|
54
|
-
**Contexto**:
|
|
55
|
-
- Arquivos: nenhum
|
|
56
|
-
- Ãreas: frontend, security
|
|
57
|
-
- Complexidade: medium
|
|
58
|
-
|
|
59
|
-
**Resultado**: Arquitetura validada com sucesso
|
|
60
|
-
|
|
61
|
-
### 24/01/2026 - `1769254240572-gpe8pqylw`
|
|
62
|
-
|
|
63
|
-
**Tarefa**: Validar estrutura de arquivos e garantir limite 500 linhas
|
|
64
|
-
|
|
65
|
-
**Contexto**:
|
|
66
|
-
- Arquivos: nenhum
|
|
67
|
-
- Ãreas: frontend, auth, security
|
|
68
|
-
- Complexidade: medium
|
|
69
|
-
|
|
70
|
-
**Resultado**: Arquitetura validada com sucesso
|
|
71
|
-
|
|
72
|
-
### 24/01/2026 - `1769252937297-yxzqjf0lb`
|
|
73
|
-
|
|
74
|
-
**Tarefa**: Validar estrutura de arquivos e garantir limite 500 linhas
|
|
75
|
-
|
|
76
|
-
**Contexto**:
|
|
77
|
-
- Arquivos: nenhum
|
|
78
|
-
- Ãreas: frontend
|
|
79
|
-
- Complexidade: low
|
|
80
|
-
|
|
81
|
-
**Resultado**: Arquitetura validada com sucesso
|
|
82
|
-
|
|
83
|
-
### 23/01/2026 - `1769137691457-s1srymq3m`
|
|
84
|
-
|
|
85
|
-
**Tarefa**: Inicializar memória do agente
|
|
86
|
-
|
|
87
|
-
**Contexto**:
|
|
88
|
-
- Arquivos: nenhum
|
|
89
|
-
- Ãreas: initialization
|
|
90
|
-
- Complexidade: low
|
|
91
|
-
|
|
92
|
-
**Resultado**: Arquitetura validada com sucesso
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## ⌠Falhas Registradas
|
|
97
|
-
|
|
98
|
-
### 25/01/2026 - `1769351012232-4bmpgttwk`
|
|
99
|
-
|
|
100
|
-
**Tarefa**: Tarefa concluÃda com sucesso
|
|
101
|
-
|
|
102
|
-
**Motivo**: Arquitetura validada com sucesso
|
|
103
|
-
|
|
104
|
-
**Lição aprendida**: Revisar integração com o sistema de build
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## 🧠Aprendizados
|
|
109
|
-
|
|
110
|
-
_Nenhum aprendizado registrado ainda._
|
|
111
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Architecture Agent - Especialidade
|
|
2
|
-
|
|
3
|
-
## Responsabilidades
|
|
4
|
-
- Validar estrutura de arquivos
|
|
5
|
-
- Garantir limite de 500 linhas por arquivo
|
|
6
|
-
- Detectar duplicação de código
|
|
7
|
-
- Validar separação de camadas (MVC, Clean Architecture)
|
|
8
|
-
- Verificar nomenclatura consistente
|
|
9
|
-
|
|
10
|
-
## Expertise
|
|
11
|
-
- Design Patterns (Factory, Strategy, Observer, etc.)
|
|
12
|
-
- SOLID Principles
|
|
13
|
-
- Clean Architecture
|
|
14
|
-
- Microservices Architecture
|
|
15
|
-
- Modularização e Componentização
|
|
16
|
-
- DRY (Don't Repeat Yourself)
|
|
17
|
-
|
|
18
|
-
## Regras
|
|
19
|
-
- Máximo 500 linhas por arquivo
|
|
20
|
-
- Sem duplicação de código (DRY)
|
|
21
|
-
- Separação clara de responsabilidades
|
|
22
|
-
- Nomenclatura consistente (PascalCase para componentes, camelCase para funções)
|
|
23
|
-
- Componentes UI não devem ter lógica de API
|
|
24
|
-
- Utils devem ser independentes de UI
|
|
25
|
-
|
|
26
|
-
## Tarefas Típicas
|
|
27
|
-
- Validar estrutura de novos componentes
|
|
28
|
-
- Detectar código duplicado
|
|
29
|
-
- Sugerir refatorações
|
|
30
|
-
- Validar separação de camadas
|
|
31
|
-
- Revisar nomenclatura de arquivos
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Automation Agent
|
|
2
|
-
|
|
3
|
-
## 🎯 Responsabilidade
|
|
4
|
-
|
|
5
|
-
Automação de tarefas repetitivas, criação de scripts, workflows e processos automatizados.
|
|
6
|
-
|
|
7
|
-
## 🛠️ Skills Disponíveis
|
|
8
|
-
|
|
9
|
-
### 🤖 Automação
|
|
10
|
-
|
|
11
|
-
#### [browser-automation](../../skills/browser-automation/)
|
|
12
|
-
**Propósito**: Automação de browsers
|
|
13
|
-
**Quando usar**: Scraping, testing E2E
|
|
14
|
-
**Capacidades**:
|
|
15
|
-
- Puppeteer/Playwright
|
|
16
|
-
- Web scraping
|
|
17
|
-
- Form automation
|
|
18
|
-
- Testing automation
|
|
19
|
-
|
|
20
|
-
#### [file-organizer](../../skills/file-organizer/)
|
|
21
|
-
**Propósito**: Organização de arquivos
|
|
22
|
-
**Quando usar**: Automatizar organização
|
|
23
|
-
|
|
24
|
-
#### [browser-extension-builder](../../skills/browser-extension-builder/)
|
|
25
|
-
**Propósito**: Extensões de browser
|
|
26
|
-
**Quando usar**: Criar extensões Chrome/Firefox
|
|
27
|
-
|
|
28
|
-
#### [discord-bot-architect](../../skills/discord-bot-architect/)
|
|
29
|
-
**Propósito**: Bots Discord
|
|
30
|
-
**Quando usar**: Criar bots para Discord
|
|
31
|
-
|
|
32
|
-
#### [moodle-external-api-development](../../skills/moodle-external-api-development/)
|
|
33
|
-
**Propósito**: API externa Moodle
|
|
34
|
-
**Quando usar**: Integrar com Moodle
|
|
35
|
-
|
|
36
|
-
## 📋 Tarefas Típicas
|
|
37
|
-
|
|
38
|
-
- ✅ Criar scripts de automação
|
|
39
|
-
- ✅ Automatizar tarefas repetitivas
|
|
40
|
-
- ✅ Configurar workflows
|
|
41
|
-
- ✅ Implementar scraping
|
|
42
|
-
- ✅ Automatizar deploys
|
|
43
|
-
- ✅ Criar CLIs
|
|
44
|
-
|
|
45
|
-
## 🔗 Dependências
|
|
46
|
-
|
|
47
|
-
- `BaseAgent`
|
|
48
|
-
- `MemorySystem`
|
|
49
|
-
- `SkillManager`
|
|
50
|
-
|
|
51
|
-
## 🔄 Fluxo de Trabalho
|
|
52
|
-
|
|
53
|
-
1. **Consulta memória**: Busca automações similares
|
|
54
|
-
2. **Carrega skills**: browser-automation
|
|
55
|
-
3. **Executa criação**: Implementa scripts
|
|
56
|
-
4. **Registra resultado**: Salva scripts em memory.md
|
|
57
|
-
|
|
58
|
-
## 📊 Memória
|
|
59
|
-
|
|
60
|
-
Ver [memory.md](./memory.md) para histórico de automações criadas.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { BaseAgent, TaskContext, TaskResult } from '../../base/base-agent.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Automation Agent - Especialista em Automation e Tools
|
|
5
|
-
*
|
|
6
|
-
* Responsabilidades:
|
|
7
|
-
* - Workflow automation
|
|
8
|
-
* - Browser automation
|
|
9
|
-
* - Tool building
|
|
10
|
-
* - MCP development
|
|
11
|
-
*
|
|
12
|
-
* Skills: workflow-automation, browser-automation, mcp-builder,
|
|
13
|
-
* agent-tool-builder, personal-tool-builder
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
export class AutomationAgent extends BaseAgent {
|
|
17
|
-
constructor(memoryPath: string) {
|
|
18
|
-
super('automation-agent', memoryPath);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async executeTask(taskDescription: string, context: TaskContext): Promise<TaskResult> {
|
|
22
|
-
console.log(`\n🤖 Automation Agent analisando tarefa...\n`);
|
|
23
|
-
|
|
24
|
-
const recommendations: string[] = [];
|
|
25
|
-
|
|
26
|
-
if (taskDescription.toLowerCase().includes('automation') || taskDescription.toLowerCase().includes('automate')) {
|
|
27
|
-
recommendations.push('✅ Identificar tarefas repetitivas');
|
|
28
|
-
recommendations.push('✅ Criar scripts reutilizáveis');
|
|
29
|
-
recommendations.push('✅ Implementar error handling robusto');
|
|
30
|
-
recommendations.push('✅ Adicionar logging detalhado');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (taskDescription.toLowerCase().includes('browser') || taskDescription.toLowerCase().includes('playwright')) {
|
|
34
|
-
recommendations.push('✅ Usar selectors estáveis');
|
|
35
|
-
recommendations.push('✅ Implementar waits adequados');
|
|
36
|
-
recommendations.push('✅ Capturar screenshots para debug');
|
|
37
|
-
recommendations.push('✅ Usar headless mode em produção');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (taskDescription.toLowerCase().includes('workflow')) {
|
|
41
|
-
recommendations.push('✅ Mapear fluxo completo');
|
|
42
|
-
recommendations.push('✅ Identificar dependências');
|
|
43
|
-
recommendations.push('✅ Implementar retry logic');
|
|
44
|
-
recommendations.push('✅ Notificar sobre falhas');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (taskDescription.toLowerCase().includes('mcp') || taskDescription.toLowerCase().includes('tool')) {
|
|
48
|
-
recommendations.push('✅ Definir interface clara');
|
|
49
|
-
recommendations.push('✅ Documentar parâmetros');
|
|
50
|
-
recommendations.push('✅ Implementar validação de input');
|
|
51
|
-
recommendations.push('✅ Adicionar exemplos de uso');
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return {
|
|
55
|
-
success: true,
|
|
56
|
-
details: `Automation Agent: ${recommendations.length} recomendações`,
|
|
57
|
-
recommendations
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Automation Agent - Especialidade
|
|
2
|
-
|
|
3
|
-
## Responsabilidades
|
|
4
|
-
- Definir responsabilidades especÃficas
|
|
5
|
-
|
|
6
|
-
## Expertise
|
|
7
|
-
- Definir áreas de expertise
|
|
8
|
-
|
|
9
|
-
## Regras
|
|
10
|
-
- Arquivos < 500 linhas
|
|
11
|
-
- Não alucinar APIs
|
|
12
|
-
|
|
13
|
-
## Tarefas TÃpicas
|
|
14
|
-
- Listar tarefas tÃpicas
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
# Backend Agent
|
|
2
|
-
|
|
3
|
-
## 🎯 Responsabilidade
|
|
4
|
-
|
|
5
|
-
Especialista em desenvolvimento backend, APIs RESTful, Node.js, arquitetura de servidores e integração de serviços.
|
|
6
|
-
|
|
7
|
-
## 🛠️ Skills Disponíveis
|
|
8
|
-
|
|
9
|
-
### 🟢 Node.js
|
|
10
|
-
|
|
11
|
-
#### [nodejs-best-practices](../../skills/nodejs-best-practices/)
|
|
12
|
-
**Propósito**: Melhores práticas Node.js
|
|
13
|
-
**Quando usar**: Desenvolver backends Node
|
|
14
|
-
**Capacidades**:
|
|
15
|
-
- Project structure
|
|
16
|
-
- Error handling
|
|
17
|
-
- Async patterns
|
|
18
|
-
- Performance optimization
|
|
19
|
-
- Security best practices
|
|
20
|
-
|
|
21
|
-
### 🔌 APIs
|
|
22
|
-
|
|
23
|
-
#### [api-patterns](../../skills/api-patterns/)
|
|
24
|
-
**Propósito**: Padrões de design de APIs
|
|
25
|
-
**Quando usar**: Criar APIs RESTful
|
|
26
|
-
**Capacidades**:
|
|
27
|
-
- REST principles
|
|
28
|
-
- Resource naming
|
|
29
|
-
- Versioning
|
|
30
|
-
- Pagination
|
|
31
|
-
- Error responses
|
|
32
|
-
|
|
33
|
-
#### [api-documentation-generator](../../skills/api-documentation-generator/)
|
|
34
|
-
**Propósito**: Documentação de APIs
|
|
35
|
-
**Quando usar**: Documentar endpoints
|
|
36
|
-
**Capacidades**:
|
|
37
|
-
- OpenAPI/Swagger
|
|
38
|
-
- Auto-generation
|
|
39
|
-
- Interactive docs
|
|
40
|
-
- Examples
|
|
41
|
-
|
|
42
|
-
#### [backend-dev-guidelines](../../skills/backend-dev-guidelines/)
|
|
43
|
-
**Propósito**: Diretrizes de desenvolvimento backend
|
|
44
|
-
**Quando usar**: Padrões e guidelines gerais
|
|
45
|
-
|
|
46
|
-
#### [bullmq-specialist](../../skills/bullmq-specialist/)
|
|
47
|
-
**Propósito**: Filas com BullMQ
|
|
48
|
-
**Quando usar**: Processar jobs em background
|
|
49
|
-
|
|
50
|
-
#### [nestjs-expert](../../skills/nestjs-expert/)
|
|
51
|
-
**Propósito**: Framework NestJS
|
|
52
|
-
**Quando usar**: Criar APIs com NestJS
|
|
53
|
-
|
|
54
|
-
#### [graphql](../../skills/graphql/)
|
|
55
|
-
**Propósito**: GraphQL APIs
|
|
56
|
-
**Quando usar**: Implementar GraphQL
|
|
57
|
-
|
|
58
|
-
#### [database-design](../../skills/database-design/)
|
|
59
|
-
**Propósito**: Design de bancos de dados
|
|
60
|
-
**Quando usar**: Modelagem de dados
|
|
61
|
-
|
|
62
|
-
#### [nosql-expert](../../skills/nosql-expert/)
|
|
63
|
-
**Propósito**: Bancos NoSQL
|
|
64
|
-
**Quando usar**: MongoDB, DynamoDB, etc
|
|
65
|
-
|
|
66
|
-
#### [inngest](../../skills/inngest/)
|
|
67
|
-
**Propósito**: Inngest workflows
|
|
68
|
-
**Quando usar**: Event-driven workflows
|
|
69
|
-
|
|
70
|
-
#### [firebase](../../skills/firebase/)
|
|
71
|
-
**Propósito**: Firebase backend
|
|
72
|
-
**Quando usar**: BaaS com Firebase
|
|
73
|
-
|
|
74
|
-
#### [clerk-auth](../../skills/clerk-auth/)
|
|
75
|
-
**Propósito**: Autenticação com Clerk
|
|
76
|
-
**Quando usar**: Auth as a service
|
|
77
|
-
|
|
78
|
-
#### [hubspot-integration](../../skills/hubspot-integration/)
|
|
79
|
-
**Propósito**: Integração HubSpot
|
|
80
|
-
**Quando usar**: CRM integration
|
|
81
|
-
|
|
82
|
-
#### [cc-skill-backend-patterns](../../skills/cc-skill-backend-patterns/)
|
|
83
|
-
**Propósito**: Padrões backend
|
|
84
|
-
**Quando usar**: Padrões de implementação
|
|
85
|
-
|
|
86
|
-
#### [prisma-expert](../../skills/prisma-expert/)
|
|
87
|
-
**Propósito**: ORM Prisma
|
|
88
|
-
|
|
89
|
-
#### [stripe-integration](../../skills/stripe-integration/)
|
|
90
|
-
**Propósito**: Integração Stripe
|
|
91
|
-
|
|
92
|
-
#### [plaid-fintech](../../skills/plaid-fintech/)
|
|
93
|
-
**Propósito**: Integração Plaid
|
|
94
|
-
|
|
95
|
-
#### [twilio-communications](../../skills/twilio-communications/)
|
|
96
|
-
**Propósito**: Twilio (SMS/Voz)
|
|
97
|
-
|
|
98
|
-
#### [salesforce-development](../../skills/salesforce-development/)
|
|
99
|
-
**Propósito**: Desenvolvimento Salesforce
|
|
100
|
-
|
|
101
|
-
#### [shopify-apps](../../skills/shopify-apps/)
|
|
102
|
-
**Propósito**: Apps Shopify
|
|
103
|
-
|
|
104
|
-
#### [shopify-development](../../skills/shopify-development/)
|
|
105
|
-
**Propósito**: Desenvolvimento Shopify
|
|
106
|
-
|
|
107
|
-
#### [slack-bot-builder](../../skills/slack-bot-builder/)
|
|
108
|
-
**Propósito**: Bots Slack
|
|
109
|
-
|
|
110
|
-
#### [slack-gif-creator](../../skills/slack-gif-creator/)
|
|
111
|
-
**Propósito**: GIFs para Slack
|
|
112
|
-
|
|
113
|
-
#### [telegram-bot-builder](../../skills/telegram-bot-builder/)
|
|
114
|
-
**Propósito**: Bots Telegram
|
|
115
|
-
|
|
116
|
-
#### [telegram-mini-app](../../skills/telegram-mini-app/)
|
|
117
|
-
**Propósito**: Mini apps Telegram
|
|
118
|
-
|
|
119
|
-
#### [trigger-dev](../../skills/trigger-dev/)
|
|
120
|
-
**Propósito**: Trigger.dev
|
|
121
|
-
|
|
122
|
-
#### [upstash-qstash](../../skills/upstash-qstash/)
|
|
123
|
-
**Propósito**: Upstash QStash
|
|
124
|
-
|
|
125
|
-
#### [zapier-make-patterns](../../skills/zapier-make-patterns/)
|
|
126
|
-
**Propósito**: Integrações Zapier/Make
|
|
127
|
-
|
|
128
|
-
#### [segment-cdp](../../skills/segment-cdp/)
|
|
129
|
-
**Propósito**: Segment CDP
|
|
130
|
-
|
|
131
|
-
## 📋 Tarefas Típicas
|
|
132
|
-
|
|
133
|
-
- ✅ Criar APIs RESTful
|
|
134
|
-
- ✅ Implementar autenticação JWT
|
|
135
|
-
- ✅ Validar inputs e sanitizar
|
|
136
|
-
- ✅ Otimizar performance
|
|
137
|
-
- ✅ Documentar endpoints
|
|
138
|
-
- ✅ Implementar rate limiting
|
|
139
|
-
|
|
140
|
-
## 🔗 Dependências
|
|
141
|
-
|
|
142
|
-
- `BaseAgent`
|
|
143
|
-
- `MemorySystem`
|
|
144
|
-
- `SkillManager`
|
|
145
|
-
|
|
146
|
-
## 🔄 Fluxo de Trabalho
|
|
147
|
-
|
|
148
|
-
1. **Consulta memória**: Busca APIs similares
|
|
149
|
-
2. **Carrega skills**: nodejs, api-patterns
|
|
150
|
-
3. **Executa implementação**: Segue REST principles
|
|
151
|
-
4. **Registra resultado**: Salva endpoints em memory.md
|
|
152
|
-
|
|
153
|
-
## 📊 Memória
|
|
154
|
-
|
|
155
|
-
Ver [memory.md](./memory.md) para histórico de APIs criadas.
|