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,50 +0,0 @@
|
|
|
1
|
-
# Memória do Agente inventory
|
|
2
|
-
|
|
3
|
-
Última atualização: 2026-02-08T06:24:05Z
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 📊 EstatÃsticas
|
|
8
|
-
|
|
9
|
-
- Total de sucessos: 2
|
|
10
|
-
- Total de falhas: 0
|
|
11
|
-
- Taxa de sucesso: 100%
|
|
12
|
-
- Aprendizados acumulados: 0
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## ✅ Sucessos Recentes
|
|
17
|
-
### 23/01/2026 - `1769137695973-pg9h8i2dy`
|
|
18
|
-
|
|
19
|
-
**Tarefa**: Escanear projeto completo
|
|
20
|
-
|
|
21
|
-
**Contexto**:
|
|
22
|
-
- Arquivos: nenhum
|
|
23
|
-
- Ãreas: all
|
|
24
|
-
- Complexidade: high
|
|
25
|
-
|
|
26
|
-
**Resultado**: Inventário completo: 6009 itens catalogados
|
|
27
|
-
|
|
28
|
-
### 23/01/2026 - `1769137691451-43pslbgcz`
|
|
29
|
-
|
|
30
|
-
**Tarefa**: Inicializar memória do agente
|
|
31
|
-
|
|
32
|
-
**Contexto**:
|
|
33
|
-
- Arquivos: nenhum
|
|
34
|
-
- Ãreas: initialization
|
|
35
|
-
- Complexidade: low
|
|
36
|
-
|
|
37
|
-
**Resultado**: Scan completo: 6009 itens catalogados
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## ⌠Falhas Registradas
|
|
42
|
-
|
|
43
|
-
_Nenhuma falha registrada._
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## 🧠Aprendizados
|
|
48
|
-
|
|
49
|
-
_Nenhum aprendizado registrado ainda._
|
|
50
|
-
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# 🏭 Inventory Agent - Almoxarifado Central
|
|
2
|
-
|
|
3
|
-
## Especialidade
|
|
4
|
-
|
|
5
|
-
Agente responsável por **catalogar, organizar e fornecer acesso** a TODOS os recursos do projeto, atuando como um **almoxarifado central** onde outros agentes consultam antes de criar qualquer coisa nova.
|
|
6
|
-
|
|
7
|
-
## Responsabilidades Principais
|
|
8
|
-
|
|
9
|
-
### 1. 📦 Catalogação Completa
|
|
10
|
-
- Escanear e mapear **todos** os componentes do projeto
|
|
11
|
-
- Catalogar **todas** as variáveis (globais e exportadas)
|
|
12
|
-
- Mapear **todo** o schema do banco de dados
|
|
13
|
-
- Indexar **todos** os endpoints de API
|
|
14
|
-
- Registrar **todos** os tipos TypeScript
|
|
15
|
-
- Listar **todos** os assets (imagens, ícones, etc)
|
|
16
|
-
|
|
17
|
-
### 2. 🛡️ Prevenção de Duplicação (CRÍTICO!)
|
|
18
|
-
- **BLOQUEAR** criação de componentes duplicados
|
|
19
|
-
- **ALERTAR** quando algo similar já existe
|
|
20
|
-
- **SUGERIR** reutilização de código existente
|
|
21
|
-
- **IMPEDIR** desperdício de recursos
|
|
22
|
-
|
|
23
|
-
### 3. 🔍 Busca e Consulta
|
|
24
|
-
- Fornecer busca rápida por nome, tipo ou caminho
|
|
25
|
-
- Suportar busca fuzzy (aproximada)
|
|
26
|
-
- Permitir busca textual em metadados
|
|
27
|
-
- Retornar informações completas sobre itens
|
|
28
|
-
|
|
29
|
-
### 4. 📊 Organização e Estrutura
|
|
30
|
-
- Manter inventário atualizado em tempo real
|
|
31
|
-
- Agrupar itens por tipo e categoria
|
|
32
|
-
- Rastrear dependências entre itens
|
|
33
|
-
- Identificar itens não utilizados
|
|
34
|
-
|
|
35
|
-
## Como Outros Agentes Devem Usar
|
|
36
|
-
|
|
37
|
-
### ⚠️ REGRA OBRIGATÓRIA
|
|
38
|
-
**TODOS os agentes DEVEM consultar o Inventory Agent ANTES de criar qualquer coisa nova!**
|
|
39
|
-
|
|
40
|
-
### Exemplo de Uso Correto
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
// ❌ ERRADO - Criar sem consultar
|
|
44
|
-
await frontendAgent.createComponent('Button');
|
|
45
|
-
|
|
46
|
-
// ✅ CORRETO - Consultar primeiro
|
|
47
|
-
const check = await inventoryAgent.checkDuplication('Button', 'component');
|
|
48
|
-
|
|
49
|
-
if (check.exists) {
|
|
50
|
-
console.log('⚠️ Componente já existe!');
|
|
51
|
-
console.log(check.suggestions);
|
|
52
|
-
// Usar o existente
|
|
53
|
-
} else {
|
|
54
|
-
// Seguro criar
|
|
55
|
-
await frontendAgent.createComponent('Button');
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Inventário Mantido
|
|
60
|
-
|
|
61
|
-
### Componentes
|
|
62
|
-
- Nome, caminho, props, dependências
|
|
63
|
-
- Onde é usado
|
|
64
|
-
- Data de criação e modificação
|
|
65
|
-
|
|
66
|
-
### Variáveis
|
|
67
|
-
- Nome, tipo, escopo, valor
|
|
68
|
-
- Onde é usado
|
|
69
|
-
- Exportada ou local
|
|
70
|
-
|
|
71
|
-
### Banco de Dados
|
|
72
|
-
- Tabelas, colunas, tipos
|
|
73
|
-
- Relacionamentos (foreign keys)
|
|
74
|
-
- Onde é usado (queries, APIs)
|
|
75
|
-
|
|
76
|
-
### Endpoints
|
|
77
|
-
- Path, método HTTP, autenticação
|
|
78
|
-
- Parâmetros, body, response
|
|
79
|
-
- Onde é usado (frontend, hooks)
|
|
80
|
-
|
|
81
|
-
### Tipos TypeScript
|
|
82
|
-
- Interfaces e types
|
|
83
|
-
- Propriedades e métodos
|
|
84
|
-
- Onde é usado
|
|
85
|
-
|
|
86
|
-
## Comandos Disponíveis
|
|
87
|
-
|
|
88
|
-
### Scan Completo
|
|
89
|
-
```typescript
|
|
90
|
-
await inventoryAgent.execute({
|
|
91
|
-
description: 'scan project'
|
|
92
|
-
});
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Buscar Item
|
|
96
|
-
```typescript
|
|
97
|
-
const button = await inventoryAgent.find({
|
|
98
|
-
type: 'component',
|
|
99
|
-
name: 'Button'
|
|
100
|
-
});
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Verificar Duplicação
|
|
104
|
-
```typescript
|
|
105
|
-
const check = await inventoryAgent.checkDuplication('LoginForm', 'component');
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Buscar Similares
|
|
109
|
-
```typescript
|
|
110
|
-
const similar = await inventoryAgent.findAll({
|
|
111
|
-
type: 'component',
|
|
112
|
-
name: 'button',
|
|
113
|
-
fuzzy: true
|
|
114
|
-
});
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Métricas de Sucesso
|
|
118
|
-
|
|
119
|
-
- **0 duplicações** criadas após implementação
|
|
120
|
-
- **100% de consultas** antes de criar novos recursos
|
|
121
|
-
- **Tempo de busca** < 100ms
|
|
122
|
-
- **Inventário atualizado** em < 5 segundos após mudanças
|
|
123
|
-
|
|
124
|
-
## Aprendizados Esperados
|
|
125
|
-
|
|
126
|
-
- Padrões de nomenclatura do projeto
|
|
127
|
-
- Locais comuns para cada tipo de recurso
|
|
128
|
-
- Componentes frequentemente duplicados
|
|
129
|
-
- Oportunidades de refatoração
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# NextJS Agent
|
|
2
|
-
|
|
3
|
-
## 🎯 Responsabilidade
|
|
4
|
-
|
|
5
|
-
Especialista em desenvolvimento Next.js, SSR, SSG, API routes, otimização e deploy de aplicações modernas com React.
|
|
6
|
-
|
|
7
|
-
## 🛠️ Skills Disponíveis
|
|
8
|
-
|
|
9
|
-
### ⚡ Next.js Core
|
|
10
|
-
|
|
11
|
-
#### [nextjs-best-practices](../../skills/nextjs-best-practices/)
|
|
12
|
-
**Propósito**: Melhores práticas Next.js
|
|
13
|
-
**Quando usar**: Desenvolver/auditar apps Next.js
|
|
14
|
-
**Capacidades**:
|
|
15
|
-
- App Router vs Pages Router
|
|
16
|
-
- Server Components
|
|
17
|
-
- Client Components
|
|
18
|
-
- Data fetching patterns
|
|
19
|
-
- Caching strategies
|
|
20
|
-
|
|
21
|
-
#### [nextjs-supabase-auth](../../skills/nextjs-supabase-auth/)
|
|
22
|
-
**Propósito**: Autenticação Next.js com Supabase
|
|
23
|
-
**Quando usar**: Implementar auth com Supabase
|
|
24
|
-
**Capacidades**:
|
|
25
|
-
- Server-side auth
|
|
26
|
-
- Middleware protection
|
|
27
|
-
- Session management
|
|
28
|
-
- OAuth integration
|
|
29
|
-
|
|
30
|
-
#### [bun-development](../../skills/bun-development/)
|
|
31
|
-
**Propósito**: Desenvolvimento com Bun
|
|
32
|
-
**Quando usar**: Runtime Bun.js
|
|
33
|
-
|
|
34
|
-
## 📋 Tarefas Típicas
|
|
35
|
-
|
|
36
|
-
- ✅ Configurar projetos Next.js (App Router)
|
|
37
|
-
- ✅ Implementar SSR/SSG/ISR
|
|
38
|
-
- ✅ Otimizar performance (bundle, images)
|
|
39
|
-
- ✅ Configurar autenticação com Supabase
|
|
40
|
-
- ✅ Criar API routes
|
|
41
|
-
- ✅ Deploy em Vercel/outros
|
|
42
|
-
|
|
43
|
-
## 🔗 Dependências
|
|
44
|
-
|
|
45
|
-
- `BaseAgent`
|
|
46
|
-
- `MemorySystem`
|
|
47
|
-
- `SkillManager`
|
|
48
|
-
|
|
49
|
-
## 🔄 Fluxo de Trabalho
|
|
50
|
-
|
|
51
|
-
1. **Consulta memória**: Busca projetos Next.js similares
|
|
52
|
-
2. **Carrega skills**: nextjs-best-practices, supabase-auth
|
|
53
|
-
3. **Executa implementação**: Segue padrões App Router
|
|
54
|
-
4. **Registra resultado**: Salva configs em memory.md
|
|
55
|
-
|
|
56
|
-
## 📊 Memória
|
|
57
|
-
|
|
58
|
-
Ver [memory.md](./memory.md) para histórico de projetos Next.js.
|
|
@@ -1,114 +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
|
-
* NextJS Agent - Especialista em Next.js e React
|
|
7
|
-
*
|
|
8
|
-
* Responsabilidades:
|
|
9
|
-
* - Desenvolvimento de aplicações Next.js (App Router, Server Components)
|
|
10
|
-
* - Otimização de performance e SEO
|
|
11
|
-
* - Server Actions e API Routes
|
|
12
|
-
* - Integração com Vercel
|
|
13
|
-
*
|
|
14
|
-
* Skills: nextjs-best-practices, react-best-practices, vercel-deployment,
|
|
15
|
-
* web-performance-optimization, react-patterns
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export class NextJSAgent extends BaseAgent {
|
|
19
|
-
private skillsPath: string;
|
|
20
|
-
|
|
21
|
-
constructor(memoryPath: string) {
|
|
22
|
-
super('nextjs-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🚀 NextJS Agent analisando tarefa...\n`);
|
|
28
|
-
|
|
29
|
-
const issues: string[] = [];
|
|
30
|
-
const recommendations: string[] = [];
|
|
31
|
-
|
|
32
|
-
// Carregar skills relevantes
|
|
33
|
-
const skills = this.loadRelevantSkills([
|
|
34
|
-
'nextjs-best-practices',
|
|
35
|
-
'react-best-practices',
|
|
36
|
-
'react-patterns',
|
|
37
|
-
'vercel-deployment',
|
|
38
|
-
'web-performance-optimization'
|
|
39
|
-
]);
|
|
40
|
-
|
|
41
|
-
// Análise de Next.js
|
|
42
|
-
if (taskDescription.toLowerCase().includes('nextjs') ||
|
|
43
|
-
taskDescription.toLowerCase().includes('next.js')) {
|
|
44
|
-
|
|
45
|
-
recommendations.push('✅ Usar App Router para novas features');
|
|
46
|
-
recommendations.push('✅ Implementar Server Components quando possÃvel');
|
|
47
|
-
recommendations.push('✅ Usar Server Actions para mutations');
|
|
48
|
-
recommendations.push('✅ Otimizar imagens com next/image');
|
|
49
|
-
recommendations.push('✅ Implementar metadata para SEO');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Análise de React
|
|
53
|
-
if (taskDescription.toLowerCase().includes('component')) {
|
|
54
|
-
recommendations.push('✅ Usar TypeScript para type safety');
|
|
55
|
-
recommendations.push('✅ Implementar error boundaries');
|
|
56
|
-
recommendations.push('✅ Usar React.memo para otimização');
|
|
57
|
-
recommendations.push('✅ Seguir padrões de composição');
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Análise de Performance
|
|
61
|
-
if (taskDescription.toLowerCase().includes('performance') ||
|
|
62
|
-
taskDescription.toLowerCase().includes('otimização')) {
|
|
63
|
-
|
|
64
|
-
recommendations.push('✅ Implementar code splitting');
|
|
65
|
-
recommendations.push('✅ Usar dynamic imports');
|
|
66
|
-
recommendations.push('✅ Otimizar bundle size');
|
|
67
|
-
recommendations.push('✅ Implementar caching strategies');
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Análise de Deploy
|
|
71
|
-
if (taskDescription.toLowerCase().includes('deploy') ||
|
|
72
|
-
taskDescription.toLowerCase().includes('vercel')) {
|
|
73
|
-
|
|
74
|
-
recommendations.push('✅ Configurar variáveis de ambiente');
|
|
75
|
-
recommendations.push('✅ Implementar preview deployments');
|
|
76
|
-
recommendations.push('✅ Configurar edge functions se necessário');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const success = issues.length === 0;
|
|
80
|
-
|
|
81
|
-
return {
|
|
82
|
-
success,
|
|
83
|
-
details: success
|
|
84
|
-
? `NextJS Agent: ${recommendations.length} recomendações geradas`
|
|
85
|
-
: `NextJS Agent: ${issues.length} problemas encontrados`,
|
|
86
|
-
recommendations,
|
|
87
|
-
issues,
|
|
88
|
-
blockers: issues
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Carrega skills relevantes do diretório skills/
|
|
94
|
-
*/
|
|
95
|
-
private loadRelevantSkills(skillNames: string[]): Map<string, string> {
|
|
96
|
-
const skills = new Map<string, string>();
|
|
97
|
-
|
|
98
|
-
for (const skillName of skillNames) {
|
|
99
|
-
const skillPath = path.join(this.skillsPath, skillName, 'SKILL.md');
|
|
100
|
-
|
|
101
|
-
try {
|
|
102
|
-
if (fs.existsSync(skillPath)) {
|
|
103
|
-
const content = fs.readFileSync(skillPath, 'utf-8');
|
|
104
|
-
skills.set(skillName, content);
|
|
105
|
-
}
|
|
106
|
-
} catch (error) {
|
|
107
|
-
// Skill não encontrada, continuar
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return skills;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Next.js 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,228 +0,0 @@
|
|
|
1
|
-
# Pentest Agent
|
|
2
|
-
|
|
3
|
-
## 🎯 Responsabilidade
|
|
4
|
-
|
|
5
|
-
Especialista em testes de penetração (pentesting), identificação de vulnerabilidades, exploração ética, bug bounty hunting e segurança ofensiva.
|
|
6
|
-
|
|
7
|
-
## 🛠️ Skills Disponíveis
|
|
8
|
-
|
|
9
|
-
### 🎯 Pentesting Web
|
|
10
|
-
|
|
11
|
-
#### [webapp-pentesting](../../skills/webapp-pentesting/)
|
|
12
|
-
**Propósito**: Pentest de aplicações web
|
|
13
|
-
**Quando usar**: Auditar segurança de webapps
|
|
14
|
-
**Capacidades**:
|
|
15
|
-
- OWASP testing methodology
|
|
16
|
-
- Manual vulnerability discovery
|
|
17
|
-
- Exploitation techniques
|
|
18
|
-
- Reporting
|
|
19
|
-
|
|
20
|
-
#### [burp-suite-testing](../../skills/burp-suite-testing/)
|
|
21
|
-
**Propósito**: Testes com Burp Suite
|
|
22
|
-
**Quando usar**: Interceptar e modificar requests
|
|
23
|
-
**Capacidades**:
|
|
24
|
-
- Proxy configuration
|
|
25
|
-
- Scanner usage
|
|
26
|
-
- Intruder attacks
|
|
27
|
-
- Repeater/Sequencer
|
|
28
|
-
|
|
29
|
-
### 🔓 Autenticação & Autorização
|
|
30
|
-
|
|
31
|
-
#### [broken-authentication](../../skills/broken-authentication/)
|
|
32
|
-
**Propósito**: Explorar falhas de auth
|
|
33
|
-
**Quando usar**: Testar sistemas de login
|
|
34
|
-
**Capacidades**:
|
|
35
|
-
- Brute force testing
|
|
36
|
-
- Session hijacking
|
|
37
|
-
- Credential stuffing
|
|
38
|
-
- Password reset flaws
|
|
39
|
-
|
|
40
|
-
#### [jwt-security](../../skills/jwt-security/)
|
|
41
|
-
**Propósito**: Pentest de JWT tokens
|
|
42
|
-
**Quando usar**: Auditar implementações JWT
|
|
43
|
-
**Capacidades**:
|
|
44
|
-
- Algorithm confusion attacks
|
|
45
|
-
- Token manipulation
|
|
46
|
-
- Signature bypass
|
|
47
|
-
- Claim injection
|
|
48
|
-
|
|
49
|
-
### 🌐 API & Network
|
|
50
|
-
|
|
51
|
-
#### [api-fuzzing-bug-bounty](../../skills/api-fuzzing-bug-bounty/)
|
|
52
|
-
**Propósito**: Fuzzing de APIs
|
|
53
|
-
**Quando usar**: Descobrir bugs em APIs
|
|
54
|
-
**Capacidades**:
|
|
55
|
-
- Automated fuzzing
|
|
56
|
-
- Input validation testing
|
|
57
|
-
- Rate limit bypass
|
|
58
|
-
- Bug bounty reporting
|
|
59
|
-
|
|
60
|
-
#### [network-penetration-testing](../../skills/network-penetration-testing/)
|
|
61
|
-
**Propósito**: Pentest de redes
|
|
62
|
-
**Quando usar**: Auditar infraestrutura
|
|
63
|
-
**Capacidades**:
|
|
64
|
-
- Port scanning
|
|
65
|
-
- Service enumeration
|
|
66
|
-
- Exploit development
|
|
67
|
-
- Lateral movement
|
|
68
|
-
|
|
69
|
-
### ☁️ Cloud Pentesting
|
|
70
|
-
|
|
71
|
-
#### [aws-penetration-testing](../../skills/aws-penetration-testing/)
|
|
72
|
-
**Propósito**: Pentest AWS
|
|
73
|
-
**Quando usar**: Auditar ambientes AWS
|
|
74
|
-
**Capacidades**:
|
|
75
|
-
- IAM misconfigurations
|
|
76
|
-
- S3 bucket testing
|
|
77
|
-
- Lambda security
|
|
78
|
-
- API Gateway testing
|
|
79
|
-
|
|
80
|
-
### 🏢 Active Directory
|
|
81
|
-
|
|
82
|
-
#### [active-directory-attacks](../../skills/active-directory-attacks/)
|
|
83
|
-
**Propósito**: Ataques a AD
|
|
84
|
-
**Quando usar**: Pentest de domínios Windows
|
|
85
|
-
**Capacidades**:
|
|
86
|
-
- Kerberoasting
|
|
87
|
-
- Pass-the-hash
|
|
88
|
-
- Golden ticket
|
|
89
|
-
- Privilege escalation
|
|
90
|
-
|
|
91
|
-
### 📋 Frameworks & Standards
|
|
92
|
-
|
|
93
|
-
#### [owasp-top-10](../../skills/owasp-top-10/)
|
|
94
|
-
**Propósito**: OWASP Top 10
|
|
95
|
-
**Quando usar**: Checklist de vulnerabilidades
|
|
96
|
-
**Capacidades**:
|
|
97
|
-
- Injection testing
|
|
98
|
-
- Broken auth/access control
|
|
99
|
-
- XSS/CSRF testing
|
|
100
|
-
- Security misconfiguration
|
|
101
|
-
|
|
102
|
-
### ⬆️ Escalação & Exploração
|
|
103
|
-
|
|
104
|
-
#### [privilege-escalation](../../skills/privilege-escalation/)
|
|
105
|
-
**Propósito**: Escalação de privilégios
|
|
106
|
-
**Quando usar**: Post-exploitation
|
|
107
|
-
**Capacidades**:
|
|
108
|
-
- Linux/Windows privesc
|
|
109
|
-
- Kernel exploits
|
|
110
|
-
- SUID/sudo abuse
|
|
111
|
-
- Service exploits
|
|
112
|
-
|
|
113
|
-
#### [social-engineering](../../skills/social-engineering/)
|
|
114
|
-
**Propósito**: Engenharia social
|
|
115
|
-
**Quando usar**: Phishing e pretexting
|
|
116
|
-
**Capacidades**:
|
|
117
|
-
- Phishing campaigns
|
|
118
|
-
- Vishing/smishing
|
|
119
|
-
- Physical security
|
|
120
|
-
- Awareness training
|
|
121
|
-
|
|
122
|
-
### 🔍 Assessment & Discovery
|
|
123
|
-
|
|
124
|
-
#### [vulnerability-assessment](../../skills/vulnerability-assessment/)
|
|
125
|
-
**Propósito**: Avaliação de vulnerabilidades
|
|
126
|
-
**Quando usar**: Scan e descoberta
|
|
127
|
-
**Capacidades**:
|
|
128
|
-
- Automated scanning
|
|
129
|
-
- Vulnerability prioritization
|
|
130
|
-
- False positive analysis
|
|
131
|
-
- Remediation guidance
|
|
132
|
-
|
|
133
|
-
#### [metasploit-framework](../../skills/metasploit-framework/)
|
|
134
|
-
**Propósito**: Framework Metasploit
|
|
135
|
-
**Quando usar**: Exploitation e post-exploitation
|
|
136
|
-
|
|
137
|
-
#### [linux-privilege-escalation](../../skills/linux-privilege-escalation/)
|
|
138
|
-
**Propósito**: PrivEsc em Linux
|
|
139
|
-
**Quando usar**: Escalar privilégios em sistemas Linux
|
|
140
|
-
|
|
141
|
-
#### [network-101](../../skills/network-101/)
|
|
142
|
-
**Propósito**: Fundamentos de redes
|
|
143
|
-
**Quando usar**: Entender redes para pentest
|
|
144
|
-
|
|
145
|
-
#### [red-team-tactics](../../skills/red-team-tactics/)
|
|
146
|
-
**Propósito**: Táticas red team
|
|
147
|
-
|
|
148
|
-
#### [red-team-tools](../../skills/red-team-tools/)
|
|
149
|
-
**Propósito**: Ferramentas red team
|
|
150
|
-
|
|
151
|
-
#### [vulnerability-scanner](../../skills/vulnerability-scanner/)
|
|
152
|
-
**Propósito**: Scanners de vulnerabilidade
|
|
153
|
-
|
|
154
|
-
#### [wireshark-analysis](../../skills/wireshark-analysis/)
|
|
155
|
-
**Propósito**: Análise Wireshark
|
|
156
|
-
|
|
157
|
-
#### [shodan-reconnaissance](../../skills/shodan-reconnaissance/)
|
|
158
|
-
**Propósito**: Reconhecimento com Shodan
|
|
159
|
-
|
|
160
|
-
#### [scanning-tools](../../skills/scanning-tools/)
|
|
161
|
-
**Propósito**: Ferramentas de scanning
|
|
162
|
-
|
|
163
|
-
#### [smtp-penetration-testing](../../skills/smtp-penetration-testing/)
|
|
164
|
-
**Propósito**: Pentest SMTP
|
|
165
|
-
|
|
166
|
-
#### [ssh-penetration-testing](../../skills/ssh-penetration-testing/)
|
|
167
|
-
**Propósito**: Pentest SSH
|
|
168
|
-
|
|
169
|
-
#### [sql-injection-testing](../../skills/sql-injection-testing/)
|
|
170
|
-
**Propósito**: Testes de SQL injection
|
|
171
|
-
|
|
172
|
-
#### [sqlmap-database-pentesting](../../skills/sqlmap-database-pentesting/)
|
|
173
|
-
**Propósito**: SQLMap
|
|
174
|
-
|
|
175
|
-
#### [wordpress-penetration-testing](../../skills/wordpress-penetration-testing/)
|
|
176
|
-
**Propósito**: Pentest WordPress
|
|
177
|
-
|
|
178
|
-
#### [xss-html-injection](../../skills/xss-html-injection/)
|
|
179
|
-
**Propósito**: XSS e HTML injection
|
|
180
|
-
|
|
181
|
-
#### [windows-privilege-escalation](../../skills/windows-privilege-escalation/)
|
|
182
|
-
**Propósito**: PrivEsc Windows
|
|
183
|
-
|
|
184
|
-
#### [top-web-vulnerabilities](../../skills/top-web-vulnerabilities/)
|
|
185
|
-
**Propósito**: Top vulnerabilidades web
|
|
186
|
-
|
|
187
|
-
#### [pentest-checklist](../../skills/pentest-checklist/)
|
|
188
|
-
**Propósito**: Checklist de pentest
|
|
189
|
-
|
|
190
|
-
#### [pentest-commands](../../skills/pentest-commands/)
|
|
191
|
-
**Propósito**: Comandos de pentest
|
|
192
|
-
|
|
193
|
-
#### [webapp-testing](../../skills/webapp-testing/)
|
|
194
|
-
**Propósito**: Testes de webapp
|
|
195
|
-
|
|
196
|
-
## 📋 Tarefas Típicas
|
|
197
|
-
|
|
198
|
-
- ✅ Executar pentest de aplicações web
|
|
199
|
-
- ✅ Identificar vulnerabilidades OWASP Top 10
|
|
200
|
-
- ✅ Testar autenticação e autorização
|
|
201
|
-
- ✅ Fuzzing de APIs para descoberta de bugs
|
|
202
|
-
- ✅ Explorar vulnerabilidades encontradas
|
|
203
|
-
- ✅ Escalar privilégios em sistemas
|
|
204
|
-
- ✅ Testar configurações cloud (AWS)
|
|
205
|
-
- ✅ Documentar findings e POCs
|
|
206
|
-
|
|
207
|
-
## 🔗 Dependências
|
|
208
|
-
|
|
209
|
-
- `BaseAgent`
|
|
210
|
-
- `MemorySystem`
|
|
211
|
-
- `SkillManager`
|
|
212
|
-
- `PythonBridge` (para scripts de pentest)
|
|
213
|
-
|
|
214
|
-
## 🔄 Fluxo de Trabalho
|
|
215
|
-
|
|
216
|
-
1. **Consulta memória**: Busca vulnerabilidades similares já encontradas
|
|
217
|
-
2. **Carrega skills**: Seleciona webapp, API, network ou cloud
|
|
218
|
-
3. **Executa pentest**: Descobre e explora vulnerabilidades
|
|
219
|
-
4. **Registra findings**: Salva CVEs e POCs em memory.md
|
|
220
|
-
|
|
221
|
-
## 📊 Memória
|
|
222
|
-
|
|
223
|
-
Ver [memory.md](./memory.md) para histórico de vulnerabilidades encontradas e exploits desenvolvidos.
|
|
224
|
-
|
|
225
|
-
## 🎓 Skills Relacionadas
|
|
226
|
-
|
|
227
|
-
- [security-agent](../security/) - Para validação defensive security
|
|
228
|
-
- [webapp-pentesting](../../skills/webapp-pentesting/) - Metodologia completa
|
|
@@ -1,96 +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
|
-
* Pentest Agent - Especialista em Penetration Testing
|
|
7
|
-
*
|
|
8
|
-
* Responsabilidades:
|
|
9
|
-
* - Penetration testing
|
|
10
|
-
* - Vulnerability assessment
|
|
11
|
-
* - Ethical hacking
|
|
12
|
-
* - Security tools
|
|
13
|
-
*
|
|
14
|
-
* Skills: ethical-hacking-methodology, pentest-checklist, pentest-commands,
|
|
15
|
-
* webapp-testing, sql-injection-testing, xss-html-injection
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export class PentestAgent extends BaseAgent {
|
|
19
|
-
private skillsPath: string;
|
|
20
|
-
|
|
21
|
-
constructor(memoryPath: string) {
|
|
22
|
-
super('pentest-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🔒 Pentest Agent analisando tarefa...\n`);
|
|
28
|
-
|
|
29
|
-
const issues: string[] = [];
|
|
30
|
-
const recommendations: string[] = [];
|
|
31
|
-
|
|
32
|
-
// Análise de Penetration Testing
|
|
33
|
-
if (taskDescription.toLowerCase().includes('pentest') ||
|
|
34
|
-
taskDescription.toLowerCase().includes('penetration')) {
|
|
35
|
-
|
|
36
|
-
recommendations.push('✅ Seguir metodologia OWASP');
|
|
37
|
-
recommendations.push('✅ Obter autorização antes de testar');
|
|
38
|
-
recommendations.push('✅ Documentar todas as vulnerabilidades');
|
|
39
|
-
recommendations.push('✅ Priorizar por severidade (Critical, High, Medium, Low)');
|
|
40
|
-
recommendations.push('✅ Fornecer steps de reprodução');
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Análise de Web Application Testing
|
|
44
|
-
if (taskDescription.toLowerCase().includes('webapp') ||
|
|
45
|
-
taskDescription.toLowerCase().includes('web app')) {
|
|
46
|
-
|
|
47
|
-
recommendations.push('✅ Testar OWASP Top 10');
|
|
48
|
-
recommendations.push('✅ Verificar autenticação e autorização');
|
|
49
|
-
recommendations.push('✅ Testar input validation');
|
|
50
|
-
recommendations.push('✅ Verificar session management');
|
|
51
|
-
recommendations.push('✅ Testar file upload vulnerabilities');
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Análise de SQL Injection
|
|
55
|
-
if (taskDescription.toLowerCase().includes('sql injection') ||
|
|
56
|
-
taskDescription.toLowerCase().includes('sqli')) {
|
|
57
|
-
|
|
58
|
-
recommendations.push('✅ Testar com payloads básicos');
|
|
59
|
-
recommendations.push('✅ Usar sqlmap para testes automatizados');
|
|
60
|
-
recommendations.push('✅ Verificar blind SQL injection');
|
|
61
|
-
recommendations.push('✅ Testar time-based injection');
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Análise de XSS
|
|
65
|
-
if (taskDescription.toLowerCase().includes('xss') ||
|
|
66
|
-
taskDescription.toLowerCase().includes('cross-site scripting')) {
|
|
67
|
-
|
|
68
|
-
recommendations.push('✅ Testar reflected XSS');
|
|
69
|
-
recommendations.push('✅ Verificar stored XSS');
|
|
70
|
-
recommendations.push('✅ Testar DOM-based XSS');
|
|
71
|
-
recommendations.push('✅ Usar payloads com bypass de filtros');
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Análise de Tools
|
|
75
|
-
if (taskDescription.toLowerCase().includes('burp') ||
|
|
76
|
-
taskDescription.toLowerCase().includes('tools')) {
|
|
77
|
-
|
|
78
|
-
recommendations.push('✅ Usar Burp Suite para proxy');
|
|
79
|
-
recommendations.push('✅ Configurar scanner automatizado');
|
|
80
|
-
recommendations.push('✅ Usar Intruder para fuzzing');
|
|
81
|
-
recommendations.push('✅ Analisar requests/responses');
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const success = issues.length === 0;
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
success,
|
|
88
|
-
details: success
|
|
89
|
-
? `Pentest Agent: ${recommendations.length} recomendações de segurança`
|
|
90
|
-
: `Pentest Agent: ${issues.length} vulnerabilidades encontradas`,
|
|
91
|
-
recommendations,
|
|
92
|
-
blockers: issues
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|