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,269 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Quality Agent (com Memória)
|
|
3
|
-
*
|
|
4
|
-
* Responsabilidades:
|
|
5
|
-
* - Executar lint (ESLint)
|
|
6
|
-
* - Executar type check (TypeScript)
|
|
7
|
-
* - Executar build
|
|
8
|
-
* - Executar testes
|
|
9
|
-
* - Dar decisão final GO/NO-GO
|
|
10
|
-
* - Aprender com falhas de build recorrentes
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { spawn } from 'child_process';
|
|
14
|
-
import * as fs from 'fs';
|
|
15
|
-
import { BaseAgent, TaskContext, TaskResult } from '../../base/base-agent.js';
|
|
16
|
-
|
|
17
|
-
export interface QualityCheckResult extends TaskResult {
|
|
18
|
-
checks: {
|
|
19
|
-
lint: { passed: boolean; errors: number; warnings: number };
|
|
20
|
-
typecheck: { passed: boolean; errors: number };
|
|
21
|
-
build: { passed: boolean; error?: string };
|
|
22
|
-
tests: { passed: boolean; total: number; failed: number };
|
|
23
|
-
};
|
|
24
|
-
decision: 'GO' | 'NO-GO';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export class QualityAgent extends BaseAgent {
|
|
28
|
-
constructor(memoryBasePath: string = '.agents/memory') {
|
|
29
|
-
super('quality-agent', memoryBasePath);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Implementação da validação de qualidade
|
|
34
|
-
*/
|
|
35
|
-
async executeTask(taskDescription: string, context: TaskContext): Promise<TaskResult> {
|
|
36
|
-
console.log('\n🔠Executando validações de qualidade...\n');
|
|
37
|
-
|
|
38
|
-
const checks = {
|
|
39
|
-
lint: await this.runLint(),
|
|
40
|
-
typecheck: await this.runTypeCheck(),
|
|
41
|
-
build: await this.runBuild(),
|
|
42
|
-
tests: await this.runTests()
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// Decisão GO/NO-GO
|
|
46
|
-
const decision = this.makeDecision(checks);
|
|
47
|
-
|
|
48
|
-
const success = decision === 'GO';
|
|
49
|
-
const details = this.formatChecks(checks, decision);
|
|
50
|
-
|
|
51
|
-
const issues: string[] = [];
|
|
52
|
-
if (!checks.lint.passed) issues.push(`Lint: ${checks.lint.errors} erro(s)`);
|
|
53
|
-
if (!checks.typecheck.passed) issues.push(`TypeCheck: ${checks.typecheck.errors} erro(s)`);
|
|
54
|
-
if (!checks.build.passed) issues.push('Build falhou');
|
|
55
|
-
if (!checks.tests.passed) issues.push(`Tests: ${checks.tests.failed} falhou(ram)`);
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
success,
|
|
59
|
-
details,
|
|
60
|
-
issues: issues.length > 0 ? issues : undefined,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Executa lint
|
|
66
|
-
*/
|
|
67
|
-
private async runLint(): Promise<{ passed: boolean; errors: number; warnings: number }> {
|
|
68
|
-
console.log(' 📠Executando lint...');
|
|
69
|
-
|
|
70
|
-
return new Promise((resolve) => {
|
|
71
|
-
// Verificar se package.json tem script de lint
|
|
72
|
-
if (!this.hasScript('lint')) {
|
|
73
|
-
console.log(' âï¸ Lint não configurado');
|
|
74
|
-
resolve({ passed: true, errors: 0, warnings: 0 });
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const lint = spawn('npm', ['run', 'lint'], { shell: true });
|
|
79
|
-
|
|
80
|
-
let output = '';
|
|
81
|
-
lint.stdout.on('data', (data) => { output += data.toString(); });
|
|
82
|
-
lint.stderr.on('data', (data) => { output += data.toString(); });
|
|
83
|
-
|
|
84
|
-
lint.on('close', (code) => {
|
|
85
|
-
const errors = (output.match(/error/gi) || []).length;
|
|
86
|
-
const warnings = (output.match(/warning/gi) || []).length;
|
|
87
|
-
const passed = code === 0;
|
|
88
|
-
|
|
89
|
-
console.log(` ${passed ? '✅' : 'âŒ'} Lint: ${errors} erro(s), ${warnings} aviso(s)`);
|
|
90
|
-
resolve({ passed, errors, warnings });
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
lint.on('error', () => {
|
|
94
|
-
resolve({ passed: false, errors: 1, warnings: 0 });
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Executa type check
|
|
101
|
-
*/
|
|
102
|
-
private async runTypeCheck(): Promise<{ passed: boolean; errors: number }> {
|
|
103
|
-
console.log(' 🔤 Executando type check...');
|
|
104
|
-
|
|
105
|
-
return new Promise((resolve) => {
|
|
106
|
-
const tsc = spawn('npx', ['tsc', '--noEmit'], { shell: true });
|
|
107
|
-
|
|
108
|
-
let output = '';
|
|
109
|
-
tsc.stdout.on('data', (data) => { output += data.toString(); });
|
|
110
|
-
tsc.stderr.on('data', (data) => { output += data.toString(); });
|
|
111
|
-
|
|
112
|
-
tsc.on('close', (code) => {
|
|
113
|
-
const errors = (output.match(/error TS/g) || []).length;
|
|
114
|
-
const passed = code === 0;
|
|
115
|
-
|
|
116
|
-
console.log(` ${passed ? '✅' : 'âŒ'} TypeCheck: ${errors} erro(s)`);
|
|
117
|
-
resolve({ passed, errors });
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
tsc.on('error', () => {
|
|
121
|
-
console.log(' âï¸ TypeScript não disponÃvel');
|
|
122
|
-
resolve({ passed: true, errors: 0 });
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Executa build
|
|
129
|
-
*/
|
|
130
|
-
private async runBuild(): Promise<{ passed: boolean; error?: string }> {
|
|
131
|
-
console.log(' ðŸ—ï¸ Executando build...');
|
|
132
|
-
|
|
133
|
-
return new Promise((resolve) => {
|
|
134
|
-
if (!this.hasScript('build')) {
|
|
135
|
-
console.log(' âï¸ Build não configurado');
|
|
136
|
-
resolve({ passed: true });
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const build = spawn('npm', ['run', 'build'], { shell: true });
|
|
141
|
-
|
|
142
|
-
let output = '';
|
|
143
|
-
build.stdout.on('data', (data) => { output += data.toString(); });
|
|
144
|
-
build.stderr.on('data', (data) => { output += data.toString(); });
|
|
145
|
-
|
|
146
|
-
build.on('close', (code) => {
|
|
147
|
-
const passed = code === 0;
|
|
148
|
-
const error = passed ? undefined : output.substring(0, 500);
|
|
149
|
-
|
|
150
|
-
console.log(` ${passed ? '✅' : 'âŒ'} Build ${passed ? 'passou' : 'falhou'}`);
|
|
151
|
-
resolve({ passed, error });
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
build.on('error', () => {
|
|
155
|
-
resolve({ passed: false, error: 'Erro ao executar build' });
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Executa testes
|
|
162
|
-
*/
|
|
163
|
-
private async runTests(): Promise<{ passed: boolean; total: number; failed: number }> {
|
|
164
|
-
console.log(' 🧪 Executando testes...');
|
|
165
|
-
|
|
166
|
-
return new Promise((resolve) => {
|
|
167
|
-
if (!this.hasScript('test')) {
|
|
168
|
-
console.log(' âï¸ Testes não configurados');
|
|
169
|
-
resolve({ passed: true, total: 0, failed: 0 });
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const test = spawn('npm', ['run', 'test', '--', '--passWithNoTests'], { shell: true });
|
|
174
|
-
|
|
175
|
-
let output = '';
|
|
176
|
-
test.stdout.on('data', (data) => { output += data.toString(); });
|
|
177
|
-
test.stderr.on('data', (data) => { output += data.toString(); });
|
|
178
|
-
|
|
179
|
-
test.on('close', (code) => {
|
|
180
|
-
const passed = code === 0;
|
|
181
|
-
const total = (output.match(/Tests:.*?(\d+) total/)?.[1] || '0');
|
|
182
|
-
const failed = (output.match(/Tests:.*?(\d+) failed/)?.[1] || '0');
|
|
183
|
-
|
|
184
|
-
console.log(` ${passed ? '✅' : 'âŒ'} Tests: ${failed} falhou(ram) de ${total}`);
|
|
185
|
-
resolve({ passed, total: parseInt(total), failed: parseInt(failed) });
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
test.on('error', () => {
|
|
189
|
-
resolve({ passed: true, total: 0, failed: 0 });
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Verifica se script existe no package.json
|
|
196
|
-
*/
|
|
197
|
-
private hasScript(scriptName: string): boolean {
|
|
198
|
-
try {
|
|
199
|
-
const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
|
|
200
|
-
return !!packageJson.scripts?.[scriptName];
|
|
201
|
-
} catch {
|
|
202
|
-
return false;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Toma decisão GO/NO-GO
|
|
208
|
-
*/
|
|
209
|
-
private makeDecision(checks: QualityCheckResult['checks']): 'GO' | 'NO-GO' {
|
|
210
|
-
// Bloqueadores: lint errors, type errors, build failed
|
|
211
|
-
if (checks.lint.errors > 0) return 'NO-GO';
|
|
212
|
-
if (checks.typecheck.errors > 0) return 'NO-GO';
|
|
213
|
-
if (!checks.build.passed) return 'NO-GO';
|
|
214
|
-
if (!checks.tests.passed) return 'NO-GO';
|
|
215
|
-
|
|
216
|
-
return 'GO';
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Formata resultado dos checks
|
|
221
|
-
*/
|
|
222
|
-
private formatChecks(checks: QualityCheckResult['checks'], decision: 'GO' | 'NO-GO'): string {
|
|
223
|
-
let details = `Decisão: ${decision}\n`;
|
|
224
|
-
details += `Lint: ${checks.lint.passed ? 'OK' : 'FALHOU'}\n`;
|
|
225
|
-
details += `TypeCheck: ${checks.typecheck.passed ? 'OK' : 'FALHOU'}\n`;
|
|
226
|
-
details += `Build: ${checks.build.passed ? 'OK' : 'FALHOU'}\n`;
|
|
227
|
-
details += `Tests: ${checks.tests.passed ? 'OK' : 'FALHOU'}`;
|
|
228
|
-
return details;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Especialidade padrão do Quality Agent
|
|
233
|
-
*/
|
|
234
|
-
protected getDefaultSpecialty(): string {
|
|
235
|
-
return `# Quality Agent - Especialidade
|
|
236
|
-
|
|
237
|
-
## Responsabilidades
|
|
238
|
-
- Executar lint (ESLint)
|
|
239
|
-
- Executar type check (TypeScript)
|
|
240
|
-
- Executar build
|
|
241
|
-
- Executar testes unitários e integração
|
|
242
|
-
- Dar decisão final GO/NO-GO
|
|
243
|
-
- Garantir qualidade do código
|
|
244
|
-
|
|
245
|
-
## Expertise
|
|
246
|
-
- Testing (Jest, Vitest, Playwright, Cypress)
|
|
247
|
-
- Linting (ESLint, Prettier)
|
|
248
|
-
- TypeScript
|
|
249
|
-
- CI/CD
|
|
250
|
-
- Code Quality Metrics
|
|
251
|
-
- Test Coverage
|
|
252
|
-
|
|
253
|
-
## Regras
|
|
254
|
-
- Zero erros de lint (warnings são aceitáveis)
|
|
255
|
-
- Zero erros de type check
|
|
256
|
-
- Build deve passar
|
|
257
|
-
- Todos os testes devem passar
|
|
258
|
-
- Cobertura de testes > 80% (recomendado)
|
|
259
|
-
|
|
260
|
-
## Tarefas TÃpicas
|
|
261
|
-
- Validar qualidade antes de commit
|
|
262
|
-
- Executar suite completa de testes
|
|
263
|
-
- Dar GO/NO-GO para deploy
|
|
264
|
-
- Identificar problemas de qualidade
|
|
265
|
-
- Sugerir melhorias de código
|
|
266
|
-
`;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# Memória do Agente quality
|
|
2
|
-
|
|
3
|
-
Última atualização: 2026-02-08T06:24:05Z
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 📊 EstatÃsticas
|
|
8
|
-
|
|
9
|
-
- Total de sucessos: 0
|
|
10
|
-
- Total de falhas: 8
|
|
11
|
-
- Taxa de sucesso: 0%
|
|
12
|
-
- Aprendizados acumulados: 0
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## ✅ Sucessos Recentes
|
|
17
|
-
_Nenhum sucesso registrado ainda._
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## ⌠Falhas Registradas
|
|
22
|
-
|
|
23
|
-
### 25/01/2026 - `1769351012233-8iq3diadc`
|
|
24
|
-
|
|
25
|
-
**Tarefa**: Tarefa falhou
|
|
26
|
-
|
|
27
|
-
**Motivo**: Decisão: NO-GO
|
|
28
|
-
Lint: OK
|
|
29
|
-
TypeCheck: FALHOU
|
|
30
|
-
Build: OK
|
|
31
|
-
Tests: FALHOU
|
|
32
|
-
|
|
33
|
-
**Lição aprendida**: Revisar integração com o sistema de build
|
|
34
|
-
|
|
35
|
-
### 25/01/2026 - `1769351012228-znimww07t`
|
|
36
|
-
|
|
37
|
-
**Tarefa**: Executar lint, typecheck, build e dar GO/NO-GO final
|
|
38
|
-
|
|
39
|
-
**Motivo**: Decisão: NO-GO
|
|
40
|
-
Lint: OK
|
|
41
|
-
TypeCheck: FALHOU
|
|
42
|
-
Build: OK
|
|
43
|
-
Tests: FALHOU
|
|
44
|
-
|
|
45
|
-
### 24/01/2026 - `1769269851402-qx70c6kbg`
|
|
46
|
-
|
|
47
|
-
**Tarefa**: Executar lint, typecheck, build e dar GO/NO-GO final
|
|
48
|
-
|
|
49
|
-
**Motivo**: Decisão: NO-GO
|
|
50
|
-
Lint: OK
|
|
51
|
-
TypeCheck: FALHOU
|
|
52
|
-
Build: OK
|
|
53
|
-
Tests: FALHOU
|
|
54
|
-
|
|
55
|
-
### 24/01/2026 - `1769254256874-5hy2s1uqr`
|
|
56
|
-
|
|
57
|
-
**Tarefa**: Executar lint, typecheck, build e dar GO/NO-GO final
|
|
58
|
-
|
|
59
|
-
**Motivo**: Decisão: NO-GO
|
|
60
|
-
Lint: OK
|
|
61
|
-
TypeCheck: FALHOU
|
|
62
|
-
Build: OK
|
|
63
|
-
Tests: FALHOU
|
|
64
|
-
|
|
65
|
-
### 24/01/2026 - `1769254251000-z0qxliysk`
|
|
66
|
-
|
|
67
|
-
**Tarefa**: Executar lint, typecheck, build e dar GO/NO-GO final
|
|
68
|
-
|
|
69
|
-
**Motivo**: Decisão: NO-GO
|
|
70
|
-
Lint: OK
|
|
71
|
-
TypeCheck: FALHOU
|
|
72
|
-
Build: OK
|
|
73
|
-
Tests: FALHOU
|
|
74
|
-
|
|
75
|
-
### 24/01/2026 - `1769254245505-f8crsz8wr`
|
|
76
|
-
|
|
77
|
-
**Tarefa**: Executar lint, typecheck, build e dar GO/NO-GO final
|
|
78
|
-
|
|
79
|
-
**Motivo**: Decisão: NO-GO
|
|
80
|
-
Lint: OK
|
|
81
|
-
TypeCheck: FALHOU
|
|
82
|
-
Build: OK
|
|
83
|
-
Tests: FALHOU
|
|
84
|
-
|
|
85
|
-
### 24/01/2026 - `1769252942499-4hah8cbvu`
|
|
86
|
-
|
|
87
|
-
**Tarefa**: Executar lint, typecheck, build e dar GO/NO-GO final
|
|
88
|
-
|
|
89
|
-
**Motivo**: Decisão: NO-GO
|
|
90
|
-
Lint: OK
|
|
91
|
-
TypeCheck: FALHOU
|
|
92
|
-
Build: OK
|
|
93
|
-
Tests: FALHOU
|
|
94
|
-
|
|
95
|
-
### 23/01/2026 - `1769137692468-2vntl6niu`
|
|
96
|
-
|
|
97
|
-
**Tarefa**: Inicializar memória do agente
|
|
98
|
-
|
|
99
|
-
**Motivo**: Decisão: NO-GO
|
|
100
|
-
Lint: OK
|
|
101
|
-
TypeCheck: FALHOU
|
|
102
|
-
Build: OK
|
|
103
|
-
Tests: FALHOU
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## 🧠Aprendizados
|
|
108
|
-
|
|
109
|
-
_Nenhum aprendizado registrado ainda._
|
|
110
|
-
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Quality Agent - Especialidade
|
|
2
|
-
|
|
3
|
-
## Responsabilidades
|
|
4
|
-
- Executar lint (ESLint)
|
|
5
|
-
- Executar type check (TypeScript)
|
|
6
|
-
- Executar build
|
|
7
|
-
- Executar testes unitários e integração
|
|
8
|
-
- Dar decisão final GO/NO-GO
|
|
9
|
-
- Garantir qualidade do código
|
|
10
|
-
|
|
11
|
-
## Expertise
|
|
12
|
-
- Testing (Jest, Vitest, Playwright, Cypress)
|
|
13
|
-
- Linting (ESLint, Prettier)
|
|
14
|
-
- TypeScript
|
|
15
|
-
- CI/CD
|
|
16
|
-
- Code Quality Metrics
|
|
17
|
-
- Test Coverage
|
|
18
|
-
|
|
19
|
-
## Regras
|
|
20
|
-
- Zero erros de lint (warnings são aceitáveis)
|
|
21
|
-
- Zero erros de type check
|
|
22
|
-
- Build deve passar
|
|
23
|
-
- Todos os testes devem passar
|
|
24
|
-
- Cobertura de testes > 80% (recomendado)
|
|
25
|
-
|
|
26
|
-
## Tarefas Típicas
|
|
27
|
-
- Validar qualidade antes de commit
|
|
28
|
-
- Executar suite completa de testes
|
|
29
|
-
- Dar GO/NO-GO para deploy
|
|
30
|
-
- Identificar problemas de qualidade
|
|
31
|
-
- Sugerir melhorias de código
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# RAG Agent
|
|
2
|
-
|
|
3
|
-
## 🎯 Responsabilidade
|
|
4
|
-
|
|
5
|
-
Especialista em Retrieval-Augmented Generation (RAG), busca semântica, embeddings e sistemas de conhecimento baseados em LLMs.
|
|
6
|
-
|
|
7
|
-
## 🛠️ Skills Disponíveis
|
|
8
|
-
|
|
9
|
-
### 🔍 RAG & Semantic Search
|
|
10
|
-
|
|
11
|
-
*Skills RAG serão mapeadas quando adicionadas*
|
|
12
|
-
|
|
13
|
-
#### [notebooklm](../../skills/notebooklm/)
|
|
14
|
-
**Propósito**: NotebookLM integration
|
|
15
|
-
**Quando usar**: RAG com Google NotebookLM
|
|
16
|
-
|
|
17
|
-
## 📋 Tarefas Típicas
|
|
18
|
-
|
|
19
|
-
- ✅ Implementar sistemas RAG
|
|
20
|
-
- ✅ Configurar busca semântica
|
|
21
|
-
- ✅ Criar embeddings de documentos
|
|
22
|
-
- ✅ Otimizar retrieval
|
|
23
|
-
- ✅ Validar qualidade de respostas
|
|
24
|
-
- ✅ Integrar vector databases
|
|
25
|
-
|
|
26
|
-
## 🔗 Dependências
|
|
27
|
-
|
|
28
|
-
- `BaseAgent`
|
|
29
|
-
- `MemorySystem`
|
|
30
|
-
- `SkillManager`
|
|
31
|
-
|
|
32
|
-
## 🔄 Fluxo de Trabalho
|
|
33
|
-
|
|
34
|
-
1. **Consulta memória**: Busca implementações RAG similares
|
|
35
|
-
2. **Carrega skills**: RAG patterns
|
|
36
|
-
3. **Executa implementação**: Setup de busca semântica
|
|
37
|
-
4. **Registra resultado**: Salva config em memory.md
|
|
38
|
-
|
|
39
|
-
## 📊 Memória
|
|
40
|
-
|
|
41
|
-
Ver [memory.md](./memory.md) para histórico de sistemas RAG implementados.
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { BaseAgent, TaskContext, TaskResult } from '../../base/base-agent.js';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import * as path from 'path';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* RAG Agent - Especialista em Retrieval-Augmented Generation
|
|
7
|
-
*
|
|
8
|
-
* Responsabilidades:
|
|
9
|
-
* - RAG implementation
|
|
10
|
-
* - Vector databases
|
|
11
|
-
* - Embedding strategies
|
|
12
|
-
* - LLM integration
|
|
13
|
-
*
|
|
14
|
-
* Skills: rag-implementation, rag-engineer, llm-app-patterns,
|
|
15
|
-
* langfuse, langgraph
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export class RAGAgent extends BaseAgent {
|
|
19
|
-
private skillsPath: string;
|
|
20
|
-
|
|
21
|
-
constructor(memoryPath: string) {
|
|
22
|
-
super('rag-agent', memoryPath);
|
|
23
|
-
this.skillsPath = path.join(process.cwd(), 'skills');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async executeTask(taskDescription: string, context: TaskContext): Promise<TaskResult> {
|
|
27
|
-
console.log(`\n📚 RAG Agent analisando tarefa...\n`);
|
|
28
|
-
|
|
29
|
-
const issues: string[] = [];
|
|
30
|
-
const recommendations: string[] = [];
|
|
31
|
-
|
|
32
|
-
// Análise de RAG Implementation
|
|
33
|
-
if (taskDescription.toLowerCase().includes('rag') ||
|
|
34
|
-
taskDescription.toLowerCase().includes('retrieval')) {
|
|
35
|
-
|
|
36
|
-
recommendations.push('✅ Escolher vector database adequado (Pinecone, Weaviate, Qdrant)');
|
|
37
|
-
recommendations.push('✅ Implementar chunking strategy eficiente');
|
|
38
|
-
recommendations.push('✅ Usar embeddings de qualidade (OpenAI, Cohere)');
|
|
39
|
-
recommendations.push('✅ Implementar hybrid search (vector + keyword)');
|
|
40
|
-
recommendations.push('✅ Adicionar reranking para melhor relevância');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Análise de Vector Database
|
|
44
|
-
if (taskDescription.toLowerCase().includes('vector') ||
|
|
45
|
-
taskDescription.toLowerCase().includes('embedding')) {
|
|
46
|
-
|
|
47
|
-
recommendations.push('✅ Definir dimensão de embeddings adequada');
|
|
48
|
-
recommendations.push('✅ Criar Ãndices otimizados');
|
|
49
|
-
recommendations.push('✅ Implementar metadata filtering');
|
|
50
|
-
recommendations.push('✅ Usar batch operations para performance');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Análise de LLM Integration
|
|
54
|
-
if (taskDescription.toLowerCase().includes('llm') ||
|
|
55
|
-
taskDescription.toLowerCase().includes('language model')) {
|
|
56
|
-
|
|
57
|
-
recommendations.push('✅ Implementar prompt templates');
|
|
58
|
-
recommendations.push('✅ Usar context window eficientemente');
|
|
59
|
-
recommendations.push('✅ Adicionar fallback para rate limits');
|
|
60
|
-
recommendations.push('✅ Implementar caching de respostas');
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Análise de Observability
|
|
64
|
-
if (taskDescription.toLowerCase().includes('observability') ||
|
|
65
|
-
taskDescription.toLowerCase().includes('monitoring')) {
|
|
66
|
-
|
|
67
|
-
recommendations.push('✅ Usar Langfuse para tracing');
|
|
68
|
-
recommendations.push('✅ Monitorar custos de API');
|
|
69
|
-
recommendations.push('✅ Rastrear quality metrics');
|
|
70
|
-
recommendations.push('✅ Implementar feedback loops');
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const success = issues.length === 0;
|
|
74
|
-
|
|
75
|
-
return {
|
|
76
|
-
success,
|
|
77
|
-
details: success
|
|
78
|
-
? `RAG Agent: ${recommendations.length} recomendações`
|
|
79
|
-
: `RAG Agent: ${issues.length} problemas encontrados`,
|
|
80
|
-
recommendations,
|
|
81
|
-
blockers: issues
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# RAG 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,152 +0,0 @@
|
|
|
1
|
-
# Security Agent
|
|
2
|
-
|
|
3
|
-
## 🎯 Responsabilidade
|
|
4
|
-
|
|
5
|
-
Auditor de segurança especializado em identificar vulnerabilidades, validar implementações seguras e garantir conformidade com OWASP e melhores práticas de segurança.
|
|
6
|
-
|
|
7
|
-
## 🛠️ Skills Disponíveis
|
|
8
|
-
|
|
9
|
-
### 🔒 Segurança de API
|
|
10
|
-
|
|
11
|
-
#### [api-security-best-practices](../../skills/api-security-best-practices/)
|
|
12
|
-
**Propósito**: Melhores práticas de segurança para APIs
|
|
13
|
-
**Quando usar**: Ao auditar ou implementar APIs
|
|
14
|
-
**Capacidades**: Autenticação, autorização, rate limiting, validação
|
|
15
|
-
|
|
16
|
-
#### [broken-authentication](../../skills/broken-authentication/)
|
|
17
|
-
**Propósito**: Detectar falhas de autenticação
|
|
18
|
-
**Quando usar**: Auditoria de sistemas de login/auth
|
|
19
|
-
**Capacidades**: Session management, password policies, MFA
|
|
20
|
-
|
|
21
|
-
### 🔐 Autenticação & Autorização
|
|
22
|
-
|
|
23
|
-
#### [jwt-security](../../skills/jwt-security/)
|
|
24
|
-
**Propósito**: Segurança em JWT tokens
|
|
25
|
-
**Quando usar**: Implementar/auditar JWT
|
|
26
|
-
**Capacidades**: Token validation, signing algorithms, refresh tokens
|
|
27
|
-
|
|
28
|
-
#### [oauth-openid](../../skills/oauth-openid/)
|
|
29
|
-
**Propósito**: OAuth 2.0 e OpenID Connect
|
|
30
|
-
**Quando usar**: Implementar autenticação federada
|
|
31
|
-
**Capacidades**: Authorization flows, scopes, PKCE
|
|
32
|
-
|
|
33
|
-
### 🛡️ Proteção contra Vulnerabilidades
|
|
34
|
-
|
|
35
|
-
#### [sql-injection-prevention](../../skills/sql-injection-prevention/)
|
|
36
|
-
**Propósito**: Prevenir SQL Injection
|
|
37
|
-
**Quando usar**: Auditoria de queries de banco
|
|
38
|
-
**Capacidades**: Prepared statements, ORM, input sanitization
|
|
39
|
-
|
|
40
|
-
#### [xss-prevention](../../skills/xss-prevention/)
|
|
41
|
-
**Propósito**: Prevenir Cross-Site Scripting
|
|
42
|
-
**Quando usar**: Auditoria de input/output
|
|
43
|
-
**Capacidades**: Sanitization, CSP, encoding
|
|
44
|
-
|
|
45
|
-
#### [csrf-prevention](../../skills/csrf-prevention/)
|
|
46
|
-
**Propósito**: Prevenir CSRF attacks
|
|
47
|
-
**Quando usar**: Proteger formulários/mutations
|
|
48
|
-
**Capacidades**: CSRF tokens, SameSite cookies
|
|
49
|
-
|
|
50
|
-
### 🗄️ Segurança de Banco de Dados
|
|
51
|
-
|
|
52
|
-
#### [postgres-security](../../skills/postgres-security/)
|
|
53
|
-
**Propósito**: Segurança PostgreSQL
|
|
54
|
-
**Quando usar**: Configurar/auditar banco
|
|
55
|
-
**Capacidades**: RLS, roles, encryption, auditing
|
|
56
|
-
|
|
57
|
-
### 🌐 Web Security
|
|
58
|
-
|
|
59
|
-
#### [security-headers](../../skills/security-headers/)
|
|
60
|
-
**Propósito**: Headers de segurança HTTP
|
|
61
|
-
**Quando usar**: Configurar servidores web
|
|
62
|
-
**Capacidades**: HSTS, CSP, X-Frame-Options, CORS
|
|
63
|
-
|
|
64
|
-
#### [input-validation](../../skills/input-validation/)
|
|
65
|
-
**Propósito**: Validação robusta de inputs
|
|
66
|
-
**Quando usar**: Processar dados do usuário
|
|
67
|
-
**Capacidades**: Schema validation, sanitization, type checking
|
|
68
|
-
|
|
69
|
-
### 📋 Frameworks & Standards
|
|
70
|
-
|
|
71
|
-
#### [owasp-top-10](../../skills/owasp-top-10/)
|
|
72
|
-
**Propósito**: OWASP Top 10 vulnerabilities
|
|
73
|
-
**Quando usar**: Auditoria geral de segurança
|
|
74
|
-
**Capacidades**: Checklist completo OWASP
|
|
75
|
-
|
|
76
|
-
#### [secure-coding-practices](../../skills/secure-coding-practices/)
|
|
77
|
-
**Propósito**: Práticas de código seguro
|
|
78
|
-
**Quando usar**: Code review, desenvolvimento
|
|
79
|
-
**Capacidades**: Input validation, error handling, secrets management
|
|
80
|
-
|
|
81
|
-
### 🧪 Testing & Assessment
|
|
82
|
-
|
|
83
|
-
#### [security-testing](../../skills/security-testing/)
|
|
84
|
-
**Propósito**: Testes de segurança
|
|
85
|
-
**Quando usar**: Validar implementações
|
|
86
|
-
**Capacidades**: Automated scanning, manual testing
|
|
87
|
-
|
|
88
|
-
#### [threat-modeling](../../skills/threat-modeling/)
|
|
89
|
-
**Propósito**: Modelagem de ameaças
|
|
90
|
-
**Quando usar**: Design de sistemas
|
|
91
|
-
**Capacidades**: STRIDE, attack trees, risk assessment
|
|
92
|
-
|
|
93
|
-
#### [secure-architecture](../../skills/secure-architecture/)
|
|
94
|
-
**Propósito**: Arquitetura segura
|
|
95
|
-
**Quando usar**: Design de aplicações
|
|
96
|
-
**Capacidades**: Zero trust, defense in depth, least privilege
|
|
97
|
-
|
|
98
|
-
#### [ethical-hacking-methodology](../../skills/ethical-hacking-methodology/)
|
|
99
|
-
**Propósito**: Metodologia de hacking ético
|
|
100
|
-
**Quando usar**: Pentests estruturados
|
|
101
|
-
|
|
102
|
-
#### [cloud-penetration-testing](../../skills/cloud-penetration-testing/)
|
|
103
|
-
**Propósito**: Pentest cloud geral
|
|
104
|
-
**Quando usar**: Auditar cloud (multi-provider)
|
|
105
|
-
|
|
106
|
-
#### [file-path-traversal](../../skills/file-path-traversal/)
|
|
107
|
-
**Propósito**: Path traversal attacks
|
|
108
|
-
**Quando usar**: Testar vulnerabilidades de arquivo
|
|
109
|
-
|
|
110
|
-
#### [file-uploads](../../skills/file-uploads/)
|
|
111
|
-
**Propósito**: Segurança de file uploads
|
|
112
|
-
**Quando usar**: Validar uploads seguros
|
|
113
|
-
|
|
114
|
-
#### [html-injection-testing](../../skills/html-injection-testing/)
|
|
115
|
-
**Propósito**: Testes de HTML injection
|
|
116
|
-
**Quando usar**: Complementar XSS testing
|
|
117
|
-
|
|
118
|
-
#### [idor-testing](../../skills/idor-testing/)
|
|
119
|
-
**Propósito**: Insecure Direct Object Reference
|
|
120
|
-
**Quando usar**: Testar controle de acesso
|
|
121
|
-
|
|
122
|
-
#### [cc-skill-security-review](../../skills/cc-skill-security-review/)
|
|
123
|
-
**Propósito**: Security code review
|
|
124
|
-
**Quando usar**: Revisar código por segurança
|
|
125
|
-
|
|
126
|
-
## 📋 Tarefas Típicas
|
|
127
|
-
|
|
128
|
-
- ✅ Auditar autenticação e autorização
|
|
129
|
-
- ✅ Detectar vulnerabilidades OWASP Top 10
|
|
130
|
-
- ✅ Validar implementação de security headers
|
|
131
|
-
- ✅ Revisar políticas de senha e MFA
|
|
132
|
-
- ✅ Verificar proteção contra injection attacks
|
|
133
|
-
- ✅ Auditar configurações de banco de dados
|
|
134
|
-
- ✅ Validar sanitização e validação de inputs
|
|
135
|
-
- ✅ Revisar gestão de tokens e sessões
|
|
136
|
-
|
|
137
|
-
## 🔗 Dependências
|
|
138
|
-
|
|
139
|
-
- `BaseAgent`
|
|
140
|
-
- `MemorySystem`
|
|
141
|
-
- `SkillManager`
|
|
142
|
-
|
|
143
|
-
## 🔄 Fluxo de Trabalho
|
|
144
|
-
|
|
145
|
-
1. **Consulta memória**: Busca vulnerabilidades similares já detectadas
|
|
146
|
-
2. **Carrega skills**: Seleciona skills relevantes para auditoria
|
|
147
|
-
3. **Executa auditoria**: Valida segurança com checklist OWASP
|
|
148
|
-
4. **Registra findings**: Salva vulnerabilidades em memory.md
|
|
149
|
-
|
|
150
|
-
## 📊 Memória
|
|
151
|
-
|
|
152
|
-
Ver [memory.md](./memory.md) para histórico de vulnerabilidades detectadas e correções aplicadas.
|