wegho-agentes 5.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/.agents/cli.ts +25 -8
  2. package/.agents/core/build-manager.ts +4 -1
  3. package/.agents/core/checkpoint-manager.ts +4 -1
  4. package/.agents/memory/ai-agents-agent/specialty.md +13 -0
  5. package/.agents/memory/architecture-agent/failures.json +26 -1
  6. package/.agents/memory/architecture-agent/successes.json +14 -0
  7. package/.agents/memory/automation-agent/specialty.md +13 -0
  8. package/.agents/memory/backend-agent/specialty.md +13 -0
  9. package/.agents/memory/cloud-agent/specialty.md +13 -0
  10. package/.agents/memory/cro-agent/specialty.md +13 -0
  11. package/.agents/memory/database-agent/specialty.md +13 -0
  12. package/.agents/memory/devops-agent/specialty.md +13 -0
  13. package/.agents/memory/documentation-agent/failures.json +26 -1
  14. package/.agents/memory/documentation-agent/successes.json +14 -0
  15. package/.agents/memory/frontend-agent/failures.json +33 -33
  16. package/.agents/memory/frontend-agent/successes.json +131 -131
  17. package/.agents/memory/nextjs-agent/specialty.md +13 -0
  18. package/.agents/memory/pentest-agent/specialty.md +13 -0
  19. package/.agents/memory/planning-agent/specialty.md +13 -0
  20. package/.agents/memory/quality-agent/failures.json +38 -0
  21. package/.agents/memory/rag-agent/specialty.md +13 -0
  22. package/.agents/memory/security-agent/successes.json +61 -61
  23. package/.agents/memory/testing-agent/specialty.md +13 -0
  24. package/.agents/memory/uiux-agent/specialty.md +13 -0
  25. package/.agents/orchestrator.ts +93 -19
  26. package/.agents/validate.ts +17 -0
  27. package/.clinerules +392 -14
  28. package/.cursorrules +1114 -14
  29. package/README.md +53 -36
  30. package/docs/AGENT_RULES.md +1 -1
  31. package/docs/BUILD_HISTORY.md +21 -23
  32. package/docs/VERSION.md +1 -0
  33. package/docs/builds/v5.0.0/builds-log.md +14 -0
  34. package/package.json +2 -2
package/.cursorrules CHANGED
@@ -1,18 +1,1118 @@
1
- # WEGHO Agentes - AI Instructions
1
+ # SISTEMA DE AGENTES WEGHO v5.0.0
2
2
 
3
- You are an expert developer working on the WEGHO Agentes project. You MUST follow these rules strictly.
3
+ ## HIERARQUIA OBRIGATÓRIA
4
4
 
5
- ## 🚨 ABSOLUTE RULES
6
- 1. **Rule #1: 500 Lines Limit** - NEVER create or allow a file to exceed 500 lines. Refactor immediately if this happens.
7
- 2. **Rule #2: No Hallucinations** - Do not invent APIs or database schemas. Always verify against the existing code and documentation.
8
- 3. **Rule #3: 6-Step Workflow** - Every task MUST follow the 6 steps defined in `docs/AGENT_RULES.md`.
9
- 4. **Rule #4: Source of Truth** - Follow priorities: 1. Project Code, 2. `docs/AGENT_RULES.md`, 3. Official Documentation.
5
+ ### NÍVEL 1: ORQUESTRADOR
6
+ IntelligentOrchestrator (.agents/orchestrator.ts)
10
7
 
11
- ## 🛠️ HOW TO WORK
12
- - **Check Inventory**: Always use the `InventoryAgent` logic to avoid code duplication.
13
- - **Save History**: Every change must be documented in a build file under `docs/builds/`.
14
- - **Language**: Communication and reports must be in **Português (Brasil)**. Code must be in **English**.
8
+ Responsabilidades OBRIGATÓRIAS:
9
+ 1. Receber tarefa do usuário
10
+ 2. Invocar TaskAnalyzerAgent
11
+ 3. Distribuir para agentes especializados
12
+ 4. Executar em paralelo quando possível
13
+ 5. Consolidar resultados
14
+ 6. Triggerar BuildManager
15
+ 7. Retornar relatório final
15
16
 
16
- ## 📖 REFERENCE
17
- Always keep `docs/AGENT_RULES.md` and `docs/DESIGN_SYSTEM.md` in your context.
18
- If using Gemini, PAY DOUBLE ATTENTION to the constraints in `AGENT_RULES.md` as they are non-negotiable.
17
+ Componentes Integrados:
18
+ - TaskAnalyzerAgent (análise e roteamento)
19
+ - MemorySystem (memória compartilhada)
20
+ - BuildManager (builds incrementais)
21
+ - PerformanceTracker (métricas)
22
+ - FeedbackCollector (aprendizado)
23
+ - AgentParallelizer (execução paralela)
24
+
25
+ Fluxo OBRIGATÓRIO:
26
+ 1. orchestrate(task) → TaskAnalysis
27
+ 2. selectBestAgents() → AgentAssignment[]
28
+ 3. executeWithAgent() → AgentReport[]
29
+ 4. buildManager.createBuild() → buildNumber
30
+ 5. generateFinalReport() → FinalReport
31
+
32
+ ### NÍVEL 2: TASK ANALYZER
33
+ TaskAnalyzerAgent (.agents/task-analyzer-agent.ts)
34
+
35
+ Função: Detectar áreas e selecionar agentes
36
+ Método Principal: analyzeTask(description)
37
+
38
+ FASE 1: Detecção de Áreas (detectAreas)
39
+ - Analisa keywords na descrição
40
+ - Retorna: string[] de áreas
41
+
42
+ Áreas Possíveis:
43
+ - nextjs → Next.js, App Router
44
+ - uiux → Design, Interface
45
+ - backend → API, NestJS
46
+ - database → PostgreSQL, Prisma
47
+ - ai-agents → Autonomous agents
48
+ - rag → Vector DB, LLM
49
+ - pentest → Security testing
50
+ - devops → Docker, CI/CD
51
+ - cloud → AWS, GCP, Azure
52
+ - testing → TDD, Playwright
53
+ - cro → Conversion optimization
54
+ - automation → Workflow automation
55
+ - frontend → React, componentes
56
+ - security → Vulnerabilidades
57
+ - architecture → Estrutura
58
+ - quality → Code review
59
+ - documentation → Docs
60
+
61
+ FASE 2: Seleção de Agentes (determineRequiredAgents)
62
+ - Mapeia áreas → agentes
63
+ - Adiciona agentes core (architecture, quality)
64
+ - Retorna: string[] de agent names
65
+
66
+ FASE 3: Criação de Assignments (createAgentAssignments)
67
+ - Define prioridades (1 = primeiro)
68
+ - Define dependências
69
+ - Retorna: AgentAssignment[]
70
+
71
+ ### NÍVEL 3: AGENTES ESPECIALIZADOS (20+)
72
+
73
+ #### WEB DEVELOPMENT (3 agentes)
74
+
75
+ NextJSAgent (.agents/core/nextjs-agent.ts)
76
+ - Herda: BaseAgent
77
+ - Skills: nextjs-best-practices, react-best-practices, vercel-deployment
78
+ - Keywords: nextjs, next.js, app router, server component
79
+ - Responsabilidades: App Router, Server Components, Server Actions, Image optimization, SEO metadata
80
+
81
+ UIUXAgent (.agents/core/uiux-agent.ts)
82
+ - Herda: BaseAgent
83
+ - Skills: ui-ux-pro-max, mobile-design, canvas-design
84
+ - Keywords: ui, ux, design, interface, mobile design, acessibilidade
85
+ - Responsabilidades: Design systems, Mobile responsiveness, Accessibility (a11y), User experience
86
+
87
+ FrontendAgent (.agents/core/frontend-agent.ts)
88
+ - Herda: BaseAgent
89
+ - Skills: react-patterns, component-design
90
+ - Keywords: frontend, react, component
91
+ - Responsabilidades: React components, Estado e props, Hooks patterns, Performance
92
+
93
+ #### BACKEND/DATABASE (2 agentes)
94
+
95
+ BackendAgent (.agents/core/backend-agent.ts)
96
+ - Herda: BaseAgent
97
+ - Skills: backend-dev-guidelines, nodejs-best-practices, nestjs-expert, api-patterns
98
+ - Keywords: backend, api, nestjs, microservices, graphql
99
+ - Responsabilidades: API design (REST/GraphQL), NestJS architecture, Microservices, Rate limiting
100
+
101
+ DatabaseAgent (.agents/core/database-agent.ts)
102
+ - Herda: BaseAgent
103
+ - Skills: database-design, postgres-best-practices, prisma-expert
104
+ - Keywords: database, postgres, prisma, sql, migration
105
+ - Responsabilidades: Schema design, Migrations, Query optimization, RLS policies
106
+
107
+ #### AI/ML (2 agentes)
108
+
109
+ AIAgentsAgent (.agents/core/ai-agents-agent.ts)
110
+ - Herda: BaseAgent
111
+ - Skills: autonomous-agents, autonomous-agent-patterns, ai-agents-architect
112
+ - Keywords: agent, autonomous, multi-agent, orchestrat
113
+ - Responsabilidades: Agent patterns (ReAct, Chain-of-Thought), Multi-agent systems, Tool integration, Agent orchestration
114
+
115
+ RAGAgent (.agents/core/rag-agent.ts)
116
+ - Herda: BaseAgent
117
+ - Skills: rag-implementation, rag-engineer, llm-app-patterns
118
+ - Keywords: rag, vector, embedding, llm, retrieval
119
+ - Responsabilidades: RAG implementation, Vector databases (Pinecone, Weaviate), Embedding strategies, LLM integration
120
+
121
+ #### SECURITY (2 agentes)
122
+
123
+ SecurityAgent (.agents/core/security-agent.ts)
124
+ - Herda: BaseAgent
125
+ - Skills: security-best-practices, owasp-top-10
126
+ - Keywords: security, vulnerabilidade, auth
127
+ - Responsabilidades: XSS/CSRF detection, Authentication, Data sanitization, Security headers
128
+
129
+ PentestAgent (.agents/core/pentest-agent.ts)
130
+ - Herda: BaseAgent
131
+ - Skills: ethical-hacking-methodology, pentest-checklist, webapp-testing
132
+ - Keywords: pentest, vulnerability, owasp, sql injection, xss
133
+ - Responsabilidades: Penetration testing, OWASP Top 10, SQL injection testing, Security tools (Burp Suite)
134
+
135
+ #### DEVOPS/CLOUD (2 agentes)
136
+
137
+ DevOpsAgent (.agents/core/devops-agent.ts)
138
+ - Herda: BaseAgent
139
+ - Skills: docker-expert, deployment-procedures, github-workflow-automation
140
+ - Keywords: docker, ci/cd, pipeline, deployment
141
+ - Responsabilidades: Docker containerization, CI/CD pipelines, Infrastructure as Code, Deployment automation
142
+
143
+ CloudAgent (.agents/core/cloud-agent.ts)
144
+ - Herda: BaseAgent
145
+ - Skills: aws-serverless, gcp-cloud-run, azure-functions
146
+ - Keywords: aws, gcp, azure, serverless, cloud
147
+ - Responsabilidades: AWS services, GCP deployment, Azure functions, Serverless architecture
148
+
149
+ #### TESTING/MARKETING (2 agentes)
150
+
151
+ TestingAgent (.agents/core/testing-agent.ts)
152
+ - Herda: BaseAgent
153
+ - Skills: test-driven-development, tdd-workflow, playwright-skill
154
+ - Keywords: test, tdd, playwright, e2e, unit test
155
+ - Responsabilidades: TDD workflow, Unit tests, Integration tests, E2E with Playwright
156
+
157
+ CROAgent (.agents/core/cro-agent.ts)
158
+ - Herda: BaseAgent
159
+ - Skills: ab-test-setup, form-cro, page-cro, signup-flow-cro
160
+ - Keywords: conversion, cro, a/b test, onboarding, signup
161
+ - Responsabilidades: Conversion optimization, A/B testing, User onboarding, Growth hacking
162
+
163
+ #### TOOLS/AUTOMATION (1 agente)
164
+
165
+ AutomationAgent (.agents/core/automation-agent.ts)
166
+ - Herda: BaseAgent
167
+ - Skills: workflow-automation, browser-automation, mcp-builder
168
+ - Keywords: automation, workflow, mcp, browser automation
169
+ - Responsabilidades: Workflow automation, Browser automation, Tool building, MCP development
170
+
171
+ #### CORE AGENTS (4 agentes sempre ativos)
172
+
173
+ ArchitectureAgent (.agents/core/architecture-agent.ts)
174
+ - SEMPRE incluído em todas as tarefas
175
+ - Valida: Estrutura de arquivos, limite 500 linhas, padrões
176
+ - Prioridade: 1 (executa primeiro)
177
+
178
+ QualityAgent (.agents/core/quality-agent.ts)
179
+ - SEMPRE incluído em todas as tarefas
180
+ - Valida: Code quality, clean code, best practices
181
+ - Prioridade: 4 (executa por último)
182
+
183
+ DocumentationAgent (.agents/core/documentation-agent.ts)
184
+ - Ativado quando: documentation, readme, docs
185
+ - Gera: README, comentários, documentação
186
+
187
+ InventoryAgent (.agents/core/inventory-agent.ts)
188
+ - Ativado quando: inventory, scan, almoxarifado
189
+ - Previne: Duplicação de recursos
190
+
191
+ ### NÍVEL 4: BASE AGENT
192
+ BaseAgent (.agents/core/base-agent.ts)
193
+ Classe abstrata que TODOS os agentes herdam
194
+
195
+ Propriedades OBRIGATÓRIAS:
196
+ - agentName: string
197
+ - memory: MemorySystem
198
+ - skillManager: SkillManager
199
+ - workflowSteps: WorkflowStep[]
200
+
201
+ Métodos OBRIGATÓRIOS:
202
+
203
+ executeWithMemory(task, context)
204
+ 1. Consulta memória (query)
205
+ 2. Executa executeTask()
206
+ 3. Salva resultado (store)
207
+ 4. Aprende (learnFromFeedback)
208
+
209
+ executeTask(task, context) [ABSTRATO]
210
+ - Cada agente implementa sua lógica
211
+
212
+ recordOutcome(task, context, result)
213
+ - Salva na memória
214
+
215
+ consultReferenceRepositories()
216
+ - Busca em repos de referência
217
+
218
+ Sistema de Memória:
219
+ - Localização: .agents/memory/{agentName}/
220
+ - Arquivo: executions.json
221
+ - Estrutura: {task, success, timestamp, recommendations, issues}
222
+
223
+ ### NÍVEL 5: BUILD MANAGER
224
+ BuildManager (.agents/core/build-manager.ts)
225
+ Responsabilidade: Rastrear TODAS as mudanças de arquivos
226
+
227
+ Estrutura de Dados:
228
+ - .builds/history.json: {currentVersion, currentBuild, builds[]}
229
+ - .builds/snapshots/{version}/{filepath}/build-{number}.{ext}
230
+
231
+ Métodos OBRIGATÓRIOS:
232
+
233
+ createBuild(files, agent, success, description)
234
+ 1. Incrementa buildNumber
235
+ 2. Cria snapshots de arquivos
236
+ 3. Registra no history.json
237
+ 4. Retorna buildNumber
238
+
239
+ createSnapshot(filePath, buildNumber)
240
+ - Salva cópia do arquivo
241
+
242
+ restoreFromBuild(filePath, buildNumber)
243
+ - Restaura versão anterior
244
+
245
+ incrementVersion(type: major|minor|patch)
246
+ - Atualiza versão do projeto
247
+
248
+ Trigger Automático:
249
+ - Quando: Agentes executam com sucesso
250
+ - Condição: context.files.length > 0
251
+ - Ação: buildManager.createBuild()
252
+
253
+ ### NÍVEL 6: MEMORY SYSTEM
254
+ MemorySystem (.agents/core/memory-system.ts)
255
+ Função: Armazenar e consultar execuções anteriores
256
+
257
+ Estrutura por Agente:
258
+ .agents/memory/{agentName}/executions.json
259
+
260
+ Métodos:
261
+ - store(entry: MemoryEntry): Salva execução
262
+ - query(taskDescription: string): Busca execuções similares
263
+ - getStats(agentName: string): Retorna taxa de sucesso
264
+
265
+ MemoryEntry: {id, task, success, timestamp, agentName, recommendations, issues}
266
+
267
+ ## FLUXO COMPLETO OBRIGATÓRIO
268
+
269
+ 1. ENTRADA: npm run agent "Criar API Next.js com PostgreSQL"
270
+
271
+ 2. ORQUESTRADOR: IntelligentOrchestrator.orchestrate(task)
272
+
273
+ 3. TASK ANALYZER:
274
+ - detectAreas() → [nextjs, backend, database]
275
+ - determineRequiredAgents() → [architecture-agent, nextjs-agent, backend-agent, database-agent, quality-agent]
276
+ - createAgentAssignments() → [{agentName, priority}...]
277
+
278
+ 4. EXECUÇÃO PARALELA:
279
+ - Grupo 1 (priority 1): architecture-agent.executeWithMemory()
280
+ - Grupo 2 (priority 2): nextjs-agent, backend-agent (PARALELO)
281
+ - Grupo 3 (priority 3): database-agent
282
+ - Grupo 4 (priority 4): quality-agent
283
+
284
+ 5. BUILD AUTOMÁTICO:
285
+ buildManager.createBuild(files, agents, success)
286
+ → Build 781 criado
287
+ → Snapshot: .builds/snapshots/0.0.1/src/api/route.ts/build-781.ts
288
+ → History: .builds/history.json atualizado
289
+
290
+ 6. RESULTADO: FinalReport {taskDescription, overallSuccess, buildNumber, agentReports}
291
+
292
+ ## SKILLS (200+)
293
+ nextjs-best-practices, react-patterns, postgres-best-practices, rag-implementation, docker-expert, tdd-workflow, +194 outras
294
+
295
+ ## REGRAS OBRIGATÓRIAS
296
+
297
+ 1. SEMPRE use npm run agent para tarefas complexas
298
+ 2. NUNCA pule o sistema de agentes
299
+ 3. CONFIE na memória - agentes aprendem
300
+ 4. DEIXE builds automáticos funcionarem
301
+ 5. USE keywords específicas nas tarefas
302
+ 6. CONSULTE histórico antes de recriar
303
+
304
+ v5.0.0 | 20+ Agentes | 200+ Skills | Status: OPERACIONAL
305
+
306
+ ## 📐 HIERARQUIA OBRIGATÓRIA DO SISTEMA
307
+
308
+ ### NÍVEL 1: ORQUESTRADOR (Controlador Principal)
309
+ ```
310
+ IntelligentOrchestrator (.agents/orchestrator.ts)
311
+ ├── Responsabilidades OBRIGATÓRIAS:
312
+ │ ├── 1. Receber tarefa do usuário
313
+ │ ├── 2. Invocar TaskAnalyzerAgent
314
+ │ ├── 3. Distribuir para agentes especializados
315
+ │ ├── 4. Executar em paralelo quando possível
316
+ │ ├── 5. Consolidar resultados
317
+ │ ├── 6. Triggerar BuildManager
318
+ │ └── 7. Retornar relatório final
319
+
320
+ ├── Componentes Integrados:
321
+ │ ├── TaskAnalyzerAgent (análise e roteamento)
322
+ │ ├── MemorySystem (memória compartilhada)
323
+ │ ├── BuildManager (builds incrementais)
324
+ │ ├── PerformanceTracker (métricas)
325
+ │ ├── FeedbackCollector (aprendizado)
326
+ │ └── AgentParallelizer (execução paralela)
327
+
328
+ └── Fluxo OBRIGATÓRIO:
329
+ 1. orchestrate(task) → TaskAnalysis
330
+ 2. selectBestAgents() → AgentAssignment[]
331
+ 3. executeWithAgent() → AgentReport[]
332
+ 4. buildManager.createBuild() → buildNumber
333
+ 5. generateFinalReport() → FinalReport
334
+ ```
335
+
336
+ ### NÍVEL 2: TASK ANALYZER (Roteamento Inteligente)
337
+ ```
338
+ TaskAnalyzerAgent (.agents/task-analyzer-agent.ts)
339
+ ├── Função: Detectar áreas e selecionar agentes
340
+ ├── Método Principal: analyzeTask(description)
341
+
342
+ ├── FASE 1: Detecção de Áreas (detectAreas)
343
+ │ ├── Analisa keywords na descrição
344
+ │ ├── Retorna: string[] de áreas
345
+ │ └── Áreas Possíveis:
346
+ │ ├── 'nextjs' → Next.js, App Router
347
+ │ ├── 'uiux' → Design, Interface
348
+ │ ├── 'backend' → API, NestJS
349
+ │ ├── 'database' → PostgreSQL, Prisma
350
+ │ ├── 'ai-agents' → Autonomous agents
351
+ │ ├── 'rag' → Vector DB, LLM
352
+ │ ├── 'pentest' → Security testing
353
+ │ ├── 'devops' → Docker, CI/CD
354
+ │ ├── 'cloud' → AWS, GCP, Azure
355
+ │ ├── 'testing' → TDD, Playwright
356
+ │ ├── 'cro' → Conversion optimization
357
+ │ ├── 'automation' → Workflow automation
358
+ │ ├── 'frontend' → React, componentes
359
+ │ ├── 'security' → Vulnerabilidades
360
+ │ ├── 'architecture' → Estrutura
361
+ │ ├── 'quality' → Code review
362
+ │ └── 'documentation' → Docs
363
+
364
+ ├── FASE 2: Seleção de Agentes (determineRequiredAgents)
365
+ │ ├── Mapeia áreas → agentes
366
+ │ ├── Adiciona agentes core (architecture, quality)
367
+ │ └── Retorna: string[] de agent names
368
+
369
+ └── FASE 3: Criação de Assignments (createAgentAssignments)
370
+ ├── Define prioridades (1 = primeiro)
371
+ ├── Define dependências
372
+ └── Retorna: AgentAssignment[]
373
+ ```
374
+
375
+ ### NÍVEL 3: AGENTES ESPECIALIZADOS (20+ Agentes)
376
+
377
+ #### 3.1 WEB DEVELOPMENT (3 agentes)
378
+ ```
379
+ NextJSAgent (.agents/core/nextjs-agent.ts)
380
+ ├── Herda: BaseAgent
381
+ ├── Skills: nextjs-best-practices, react-best-practices, vercel-deployment
382
+ ├── Keywords: nextjs, next.js, app router, server component
383
+ ├── Responsabilidades:
384
+ │ ├── App Router patterns
385
+ │ ├── Server Components
386
+ │ ├── Server Actions
387
+ │ ├── Image optimization
388
+ │ └── SEO metadata
389
+ └── Método: executeTask(task, context) → TaskResult
390
+
391
+ UIUXAgent (.agents/core/uiux-agent.ts)
392
+ ├── Herda: BaseAgent
393
+ ├── Skills: ui-ux-pro-max, mobile-design, canvas-design
394
+ ├── Keywords: ui, ux, design, interface, mobile design, acessibilidade
395
+ ├── Responsabilidades:
396
+ │ ├── Design systems
397
+ │ ├── Mobile responsiveness
398
+ │ ├── Accessibility (a11y)
399
+ │ └── User experience
400
+ └── Método: executeTask(task, context) → TaskResult
401
+
402
+ FrontendAgent (.agents/core/frontend-agent.ts)
403
+ ├── Herda: BaseAgent
404
+ ├── Skills: react-patterns, component-design
405
+ ├── Keywords: frontend, react, component
406
+ ├── Responsabilidades:
407
+ │ ├── React components
408
+ │ ├── Estado e props
409
+ │ ├── Hooks patterns
410
+ │ └── Performance
411
+ └── Método: executeTask(task, context) → TaskResult
412
+ ```
413
+
414
+ #### 3.2 BACKEND/DATABASE (2 agentes)
415
+ ```
416
+ BackendAgent (.agents/core/backend-agent.ts)
417
+ ├── Herda: BaseAgent
418
+ ├── Skills: backend-dev-guidelines, nodejs-best-practices, nestjs-expert, api-patterns
419
+ ├── Keywords: backend, api, nestjs, microservices, graphql
420
+ ├── Responsabilidades:
421
+ │ ├── API design (REST/GraphQL)
422
+ │ ├── NestJS architecture
423
+ │ ├── Microservices
424
+ │ └── Rate limiting
425
+ └── Método: executeTask(task, context) → TaskResult
426
+
427
+ DatabaseAgent (.agents/core/database-agent.ts)
428
+ ├── Herda: BaseAgent
429
+ ├── Skills: database-design, postgres-best-practices, prisma-expert
430
+ ├── Keywords: database, postgres, prisma, sql, migration
431
+ ├── Responsabilidades:
432
+ │ ├── Schema design
433
+ │ ├── Migrations
434
+ │ ├── Query optimization
435
+ │ └── RLS policies
436
+ └── Método: executeTask(task, context) → TaskResult
437
+ ```
438
+
439
+ #### 3.3 AI/ML (2 agentes)
440
+ ```
441
+ AIAgentsAgent (.agents/core/ai-agents-agent.ts)
442
+ ├── Herda: BaseAgent
443
+ ├── Skills: autonomous-agents, autonomous-agent-patterns, ai-agents-architect
444
+ ├── Keywords: agent, autonomous, multi-agent, orchestrat
445
+ ├── Responsabilidades:
446
+ │ ├── Agent patterns (ReAct, Chain-of-Thought)
447
+ │ ├── Multi-agent systems
448
+ │ ├── Tool integration
449
+ │ └── Agent orchestration
450
+ └── Método: executeTask(task, context) → TaskResult
451
+
452
+ RAGAgent (.agents/core/rag-agent.ts)
453
+ ├── Herda: BaseAgent
454
+ ├── Skills: rag-implementation, rag-engineer, llm-app-patterns
455
+ ├── Keywords: rag, vector, embedding, llm, retrieval
456
+ ├── Responsabilidades:
457
+ │ ├── RAG implementation
458
+ │ ├── Vector databases (Pinecone, Weaviate)
459
+ │ ├── Embedding strategies
460
+ │ └── LLM integration
461
+ └── Método: executeTask(task, context) → TaskResult
462
+ ```
463
+
464
+ #### 3.4 SECURITY (2 agentes)
465
+ ```
466
+ SecurityAgent (.agents/core/security-agent.ts)
467
+ ├── Herda: BaseAgent
468
+ ├── Skills: security-best-practices, owasp-top-10
469
+ ├── Keywords: security, vulnerabilidade, auth
470
+ ├── Responsabilidades:
471
+ │ ├── XSS, CSRF detection
472
+ │ ├── Authentication
473
+ │ ├── Data sanitization
474
+ │ └── Security headers
475
+ └── Método: executeTask(task, context) → TaskResult
476
+
477
+ PentestAgent (.agents/core/pentest-agent.ts)
478
+ ├── Herda: BaseAgent
479
+ ├── Skills: ethical-hacking-methodology, pentest-checklist, webapp-testing
480
+ ├── Keywords: pentest, vulnerability, owasp, sql injection, xss
481
+ ├── Responsabilidades:
482
+ │ ├── Penetration testing
483
+ │ ├── OWASP Top 10
484
+ │ ├── SQL injection testing
485
+ │ └── Security tools (Burp Suite)
486
+ └── Método: executeTask(task, context) → TaskResult
487
+ ```
488
+
489
+ #### 3.5 DEVOPS/CLOUD (2 agentes)
490
+ ```
491
+ DevOpsAgent (.agents/core/devops-agent.ts)
492
+ ├── Herda: BaseAgent
493
+ ├── Skills: docker-expert, deployment-procedures, github-workflow-automation
494
+ ├── Keywords: docker, ci/cd, pipeline, deployment
495
+ ├── Responsabilidades:
496
+ │ ├── Docker containerization
497
+ │ ├── CI/CD pipelines
498
+ │ ├── Infrastructure as Code
499
+ │ └── Deployment automation
500
+ └── Método: executeTask(task, context) → TaskResult
501
+
502
+ CloudAgent (.agents/core/cloud-agent.ts)
503
+ ├── Herda: BaseAgent
504
+ ├── Skills: aws-serverless, gcp-cloud-run, azure-functions
505
+ ├── Keywords: aws, gcp, azure, serverless, cloud
506
+ ├── Responsabilidades:
507
+ │ ├── AWS services
508
+ │ ├── GCP deployment
509
+ │ ├── Azure functions
510
+ │ └── Serverless architecture
511
+ └── Método: executeTask(task, context) → TaskResult
512
+ ```
513
+
514
+ #### 3.6 TESTING/MARKETING (2 agentes)
515
+ ```
516
+ TestingAgent (.agents/core/testing-agent.ts)
517
+ ├── Herda: BaseAgent
518
+ ├── Skills: test-driven-development, tdd-workflow, playwright-skill
519
+ ├── Keywords: test, tdd, playwright, e2e, unit test
520
+ ├── Responsabilidades:
521
+ │ ├── TDD workflow
522
+ │ ├── Unit tests
523
+ │ ├── Integration tests
524
+ │ └── E2E with Playwright
525
+ └── Método: executeTask(task, context) → TaskResult
526
+
527
+ CROAgent (.agents/core/cro-agent.ts)
528
+ ├── Herda: BaseAgent
529
+ ├── Skills: ab-test-setup, form-cro, page-cro, signup-flow-cro
530
+ ├── Keywords: conversion, cro, a/b test, onboarding, signup
531
+ ├── Responsabilidades:
532
+ │ ├── Conversion optimization
533
+ │ ├── A/B testing
534
+ │ ├── User onboarding
535
+ │ └── Growth hacking
536
+ └── Método: executeTask(task, context) → TaskResult
537
+ ```
538
+
539
+ #### 3.7 TOOLS/AUTOMATION (1 agente)
540
+ ```
541
+ AutomationAgent (.agents/core/automation-agent.ts)
542
+ ├── Herda: BaseAgent
543
+ ├── Skills: workflow-automation, browser-automation, mcp-builder
544
+ ├── Keywords: automation, workflow, mcp, browser automation
545
+ ├── Responsabilidades:
546
+ │ ├── Workflow automation
547
+ │ ├── Browser automation
548
+ │ ├── Tool building
549
+ │ └── MCP development
550
+ └── Método: executeTask(task, context) → TaskResult
551
+ ```
552
+
553
+ #### 3.8 CORE AGENTS (4 agentes sempre ativos)
554
+ ```
555
+ ArchitectureAgent (.agents/core/architecture-agent.ts)
556
+ ├── SEMPRE incluído em todas as tarefas
557
+ ├── Valida: Estrutura de arquivos, limite 500 linhas, padrões
558
+ └── Prioridade: 1 (executa primeiro)
559
+
560
+ QualityAgent (.agents/core/quality-agent.ts)
561
+ ├── SEMPRE incluído em todas as tarefas
562
+ ├── Valida: Code quality, clean code, best practices
563
+ └── Prioridade: 4 (executa por último)
564
+
565
+ DocumentationAgent (.agents/core/documentation-agent.ts)
566
+ ├── Ativado quando: 'documentation', 'readme', 'docs'
567
+ └── Gera: README, comentários, documentação
568
+
569
+ InventoryAgent (.agents/core/inventory-agent.ts)
570
+ ├── Ativado quando: 'inventory', 'scan', 'almoxarifado'
571
+ └── Previne: Duplicação de recursos
572
+ ```
573
+
574
+ ### NÍVEL 4: BASE AGENT (Classe Pai)
575
+ ```
576
+ BaseAgent (.agents/core/base-agent.ts)
577
+ ├── Classe abstrata que TODOS os agentes herdam
578
+
579
+ ├── Propriedades OBRIGATÓRIAS:
580
+ │ ├── agentName: string
581
+ │ ├── memory: MemorySystem
582
+ │ ├── skillManager: SkillManager
583
+ │ └── workflowSteps: WorkflowStep[]
584
+
585
+ ├── Métodos OBRIGATÓRIOS:
586
+ │ ├── executeWithMemory(task, context)
587
+ │ │ ├── 1. Consulta memória (query)
588
+ │ │ ├── 2. Executa executeTask()
589
+ │ │ ├── 3. Salva resultado (store)
590
+ │ │ └── 4. Aprende (learnFromFeedback)
591
+ │ │
592
+ │ ├── executeTask(task, context) [ABSTRATO]
593
+ │ │ └── Cada agente implementa sua lógica
594
+ │ │
595
+ │ ├── recordOutcome(task, context, result)
596
+ │ │ └── Salva na memória
597
+ │ │
598
+ │ └── consultReferenceRepositories()
599
+ │ └── Busca em repos de referência
600
+
601
+ └── Sistema de Memória:
602
+ ├── Localização: .agents/memory/{agentName}/
603
+ ├── Arquivo: executions.json
604
+ └── Estrutura:
605
+ {
606
+ "task": "descrição",
607
+ "success": true/false,
608
+ "timestamp": "ISO date",
609
+ "recommendations": [],
610
+ "issues": []
611
+ }
612
+ ```
613
+
614
+ ### NÍVEL 5: BUILD MANAGER (Versionamento)
615
+ ```
616
+ BuildManager (.agents/core/build-manager.ts)
617
+ ├── Responsabilidade: Rastrear TODAS as mudanças de arquivos
618
+
619
+ ├── Estrutura de Dados:
620
+ │ ├── .builds/history.json
621
+ │ │ ├── currentVersion: "0.0.1"
622
+ │ │ ├── currentBuild: 780
623
+ │ │ └── builds: BuildEntry[]
624
+ │ │
625
+ │ └── .builds/snapshots/{version}/{filepath}/
626
+ │ └── build-{number}.{ext}
627
+
628
+ ├── Métodos OBRIGATÓRIOS:
629
+ │ ├── createBuild(files, agent, success, description)
630
+ │ │ ├── 1. Incrementa buildNumber
631
+ │ │ ├── 2. Cria snapshots de arquivos
632
+ │ │ ├── 3. Registra no history.json
633
+ │ │ └── 4. Retorna buildNumber
634
+ │ │
635
+ │ ├── createSnapshot(filePath, buildNumber)
636
+ │ │ └── Salva cópia do arquivo
637
+ │ │
638
+ │ ├── restoreFromBuild(filePath, buildNumber)
639
+ │ │ └── Restaura versão anterior
640
+ │ │
641
+ │ └── incrementVersion(type: 'major'|'minor'|'patch')
642
+ │ └── Atualiza versão do projeto
643
+
644
+ └── Trigger Automático:
645
+ ├── Quando: Agentes executam com sucesso
646
+ ├── Condição: context.files.length > 0
647
+ └── Ação: buildManager.createBuild()
648
+ ```
649
+
650
+ ### NÍVEL 6: MEMORY SYSTEM (Aprendizado)
651
+ ```
652
+ MemorySystem (.agents/core/memory-system.ts)
653
+ ├── Função: Armazenar e consultar execuções anteriores
654
+
655
+ ├── Estrutura por Agente:
656
+ │ .agents/memory/
657
+ │ ├── nextjs-agent/
658
+ │ │ └── executions.json
659
+ │ ├── backend-agent/
660
+ │ │ └── executions.json
661
+ │ └── ... (20+ agentes)
662
+
663
+ ├── Métodos:
664
+ │ ├── store(entry: MemoryEntry)
665
+ │ │ └── Salva execução
666
+ │ │
667
+ │ ├── query(taskDescription: string)
668
+ │ │ └── Busca execuções similares
669
+ │ │
670
+ │ └── getStats(agentName: string)
671
+ │ └── Retorna taxa de sucesso
672
+
673
+ └── MemoryEntry:
674
+ {
675
+ "id": "uuid",
676
+ "task": "descrição",
677
+ "success": boolean,
678
+ "timestamp": "ISO",
679
+ "agentName": "string",
680
+ "recommendations": string[],
681
+ "issues": string[]
682
+ }
683
+ ```
684
+
685
+ ## 🔄 FLUXO COMPLETO OBRIGATÓRIO
686
+
687
+ ```
688
+ 1. ENTRADA DO USUÁRIO
689
+ └─> npm run agent "Criar API Next.js com PostgreSQL"
690
+
691
+ 2. ORQUESTRADOR RECEBE
692
+ └─> IntelligentOrchestrator.orchestrate(task)
693
+
694
+ 3. TASK ANALYZER ANALISA
695
+ ├─> detectAreas("Criar API Next.js com PostgreSQL")
696
+ │ └─> ['nextjs', 'backend', 'database']
697
+
698
+ ├─> determineRequiredAgents(areas)
699
+ │ └─> ['architecture-agent', 'nextjs-agent', 'backend-agent',
700
+ │ 'database-agent', 'quality-agent']
701
+
702
+ └─> createAgentAssignments(agents)
703
+ └─> [
704
+ {agentName: 'architecture-agent', priority: 1},
705
+ {agentName: 'nextjs-agent', priority: 2},
706
+ {agentName: 'backend-agent', priority: 2},
707
+ {agentName: 'database-agent', priority: 3},
708
+ {agentName: 'quality-agent', priority: 4}
709
+ ]
710
+
711
+ 4. ORQUESTRADOR EXECUTA (PARALELO)
712
+ ├─> Grupo 1 (priority 1): architecture-agent
713
+ │ └─> executeWithMemory()
714
+ │ ├─> Consulta memória
715
+ │ ├─> Executa validações
716
+ │ └─> Salva resultado
717
+
718
+ ├─> Grupo 2 (priority 2): nextjs-agent, backend-agent (PARALELO)
719
+ │ ├─> nextjsAgent.executeWithMemory()
720
+ │ │ └─> Recomendações Next.js
721
+ │ └─> backendAgent.executeWithMemory()
722
+ │ └─> Recomendações API
723
+
724
+ ├─> Grupo 3 (priority 3): database-agent
725
+ │ └─> databaseAgent.executeWithMemory()
726
+ │ └─> Recomendações DB
727
+
728
+ └─> Grupo 4 (priority 4): quality-agent
729
+ └─> qualityAgent.executeWithMemory()
730
+ └─> Validação final
731
+
732
+ 5. BUILD AUTOMÁTICO
733
+ └─> buildManager.createBuild(
734
+ files: ['src/api/route.ts'],
735
+ agent: 'orchestrator (nextjs, backend, database)',
736
+ success: true
737
+ )
738
+ └─> Build 781 criado
739
+ ├─> Snapshot: .builds/snapshots/0.0.1/src/api/route.ts/build-781.ts
740
+ └─> History: .builds/history.json atualizado
741
+
742
+ 6. RESULTADO CONSOLIDADO
743
+ └─> FinalReport {
744
+ taskDescription: "...",
745
+ overallSuccess: true,
746
+ buildNumber: 781,
747
+ agentReports: [...]
748
+ }
749
+ ```
750
+
751
+ ## 📚 SKILLS (200+)
752
+
753
+ Cada agente carrega skills de `skills/`:
754
+ - nextjs-best-practices/
755
+ - react-patterns/
756
+ - postgres-best-practices/
757
+ - rag-implementation/
758
+ - docker-expert/
759
+ - tdd-workflow/
760
+ - +194 outras
761
+
762
+ ## ⚡ REGRAS OBRIGATÓRIAS PARA IA
763
+
764
+ 1. **SEMPRE use npm run agent** para tarefas complexas
765
+ 2. **NUNCA pule** o sistema de agentes
766
+ 3. **CONFIE na memória** - agentes aprendem
767
+ 4. **DEIXE builds automáticos** funcionarem
768
+ 5. **USE keywords específicas** nas tarefas
769
+ 6. **CONSULTE histórico** antes de recriar
770
+
771
+ **Versão**: 5.0.0 | **Agentes**: 20+ | **Skills**: 200+ | **Status**: ✅ OPERACIONAL
772
+
773
+ Este projeto possui um **sistema completo de 20+ agentes especializados** com memória individual e build incremental automático.
774
+
775
+ ---
776
+
777
+ ## 📋 Como Usar os Agentes
778
+
779
+ ### Comando Principal
780
+ ```bash
781
+ npm run agent "sua tarefa aqui"
782
+ ```
783
+
784
+ ### Exemplo
785
+ ```bash
786
+ npm run agent "Criar API Next.js com autenticação e PostgreSQL"
787
+ ```
788
+
789
+ **O que acontece**:
790
+ 1. TaskAnalyzer detecta áreas: `nextjs`, `backend`, `database`, `security`
791
+ 2. Orquestrador seleciona agentes: NextJSAgent, BackendAgent, DatabaseAgent, SecurityAgent
792
+ 3. Cada agente executa com memória (consulta histórico, executa, salva resultado)
793
+ 4. Build automático é criado se houver mudanças
794
+ 5. Relatório consolidado é gerado
795
+
796
+ ---
797
+
798
+ ## 🤖 Agentes Disponíveis (20+)
799
+
800
+ ### Web Development
801
+ - **NextJSAgent**: Next.js, App Router, Server Components, Vercel
802
+ - Keywords: `nextjs`, `next.js`, `app router`, `server component`
803
+
804
+ - **UIUXAgent**: UI/UX, mobile design, acessibilidade
805
+ - Keywords: `ui`, `ux`, `design`, `interface`, `mobile design`
806
+
807
+ - **FrontendAgent**: React, componentes, estados
808
+ - Keywords: `frontend`, `react`, `component`
809
+
810
+ ### Backend/Database
811
+ - **BackendAgent**: Node.js, NestJS, API, GraphQL, microservices
812
+ - Keywords: `backend`, `api`, `nestjs`, `microservices`, `graphql`
813
+
814
+ - **DatabaseAgent**: PostgreSQL, Prisma, migrations, schema
815
+ - Keywords: `database`, `postgres`, `prisma`, `sql`, `migration`
816
+
817
+ ### AI/ML
818
+ - **AIAgentsAgent**: Autonomous agents, multi-agent systems, orchestration
819
+ - Keywords: `agent`, `autonomous`, `multi-agent`, `orchestrat`
820
+
821
+ - **RAGAgent**: RAG, vector databases, embeddings, LLM
822
+ - Keywords: `rag`, `vector`, `embedding`, `llm`, `retrieval`
823
+
824
+ ### Security
825
+ - **SecurityAgent**: Vulnerabilidades, XSS, CSRF, sanitização
826
+ - Keywords: `security`, `vulnerabilidade`, `auth`
827
+
828
+ - **PentestAgent**: Penetration testing, OWASP, SQL injection
829
+ - Keywords: `pentest`, `vulnerability`, `owasp`, `sql injection`, `xss`
830
+
831
+ ### DevOps/Cloud
832
+ - **DevOpsAgent**: Docker, CI/CD, pipelines, deployment
833
+ - Keywords: `docker`, `ci/cd`, `pipeline`, `deployment`
834
+
835
+ - **CloudAgent**: AWS, GCP, Azure, serverless
836
+ - Keywords: `aws`, `gcp`, `azure`, `serverless`, `cloud`
837
+
838
+ ### Testing/QA
839
+ - **TestingAgent**: TDD, Playwright, e2e, unit tests
840
+ - Keywords: `test`, `tdd`, `playwright`, `e2e`, `unit test`
841
+
842
+ ### Marketing/SEO
843
+ - **SEOAgent**: SEO, otimização, search engine
844
+ - Keywords: `seo`, `otimização`, `search engine`
845
+
846
+ - **CROAgent**: Conversion optimization, A/B testing, onboarding
847
+ - Keywords: `conversion`, `cro`, `a/b test`, `onboarding`, `signup`
848
+
849
+ ### Tools/Automation
850
+ - **AutomationAgent**: Workflow automation, browser automation, MCP
851
+ - Keywords: `automation`, `workflow`, `mcp`, `browser automation`
852
+
853
+ ### Core Agents
854
+ - **ArchitectureAgent**: Estrutura de arquivos, padrões, limite 500 linhas
855
+ - **QualityAgent**: Code review, clean code, best practices
856
+ - **DocumentationAgent**: Documentação, README, comentários
857
+ - **InventoryAgent**: Scan de recursos, anti-duplicação
858
+
859
+ ---
860
+
861
+ ## 🧠 Sistema de Memória
862
+
863
+ **Cada agente tem memória individual** em `.agents/memory/{agent-name}/`
864
+
865
+ **Fluxo com Memória**:
866
+ 1. Agente consulta: "Já fiz essa tarefa antes?"
867
+ 2. Usa aprendizados anteriores
868
+ 3. Executa tarefa
869
+ 4. Salva resultado (sucesso/falha)
870
+ 5. Aprende continuamente
871
+
872
+ **Exemplo**:
873
+ ```json
874
+ {
875
+ "task": "Criar API Next.js",
876
+ "success": true,
877
+ "timestamp": "2026-01-25T00:00:00",
878
+ "agentName": "nextjs-agent",
879
+ "recommendations": [...]
880
+ }
881
+ ```
882
+
883
+ ---
884
+
885
+ ## 📦 Build Incremental Automático
886
+
887
+ **BuildManager** rastreia todas as mudanças:
888
+
889
+ **Estrutura**:
890
+ ```
891
+ .builds/
892
+ ├── history.json (histórico completo)
893
+ └── snapshots/
894
+ └── 0.0.1/
895
+ └── src/api/route.ts/
896
+ ├── build-001.ts
897
+ ├── build-002.ts
898
+ └── build-780.ts
899
+ ```
900
+
901
+ **Quando é criado**:
902
+ - Automaticamente após execução bem-sucedida de agentes
903
+ - Quando arquivos são modificados
904
+ - Snapshot de cada arquivo é salvo
905
+
906
+ **Como usar**:
907
+ ```typescript
908
+ import { BuildManager } from './.agents/core/build-manager';
909
+
910
+ const buildManager = new BuildManager();
911
+
912
+ // Ver histórico
913
+ console.log(buildManager.generateReport());
914
+
915
+ // Restaurar de build anterior
916
+ await buildManager.restoreFromBuild('src/api/route.ts', 780);
917
+ ```
918
+
919
+ ---
920
+
921
+ ## 🎯 Quando Usar Cada Agente
922
+
923
+ ### Para Desenvolvimento Web
924
+ ```bash
925
+ npm run agent "Criar página de login com Next.js"
926
+ # Ativa: NextJSAgent, UIUXAgent, SecurityAgent
927
+ ```
928
+
929
+ ### Para APIs
930
+ ```bash
931
+ npm run agent "Criar API REST com autenticação JWT"
932
+ # Ativa: BackendAgent, SecurityAgent, DatabaseAgent
933
+ ```
934
+
935
+ ### Para Database
936
+ ```bash
937
+ npm run agent "Criar schema PostgreSQL com RLS"
938
+ # Ativa: DatabaseAgent, SecurityAgent
939
+ ```
940
+
941
+ ### Para AI/ML
942
+ ```bash
943
+ npm run agent "Implementar RAG com vector database"
944
+ # Ativa: RAGAgent, AIAgentsAgent, DatabaseAgent
945
+ ```
946
+
947
+ ### Para DevOps
948
+ ```bash
949
+ npm run agent "Configurar Docker e CI/CD"
950
+ # Ativa: DevOpsAgent, CloudAgent
951
+ ```
952
+
953
+ ### Para Testes
954
+ ```bash
955
+ npm run agent "Criar testes e2e com Playwright"
956
+ # Ativa: TestingAgent, QualityAgent
957
+ ```
958
+
959
+ ---
960
+
961
+ ## 📚 Skills Integradas (200+)
962
+
963
+ Cada agente tem acesso a skills específicas em `skills/`:
964
+
965
+ **Exemplos**:
966
+ - `skills/nextjs-best-practices/` - Melhores práticas Next.js
967
+ - `skills/react-patterns/` - Padrões React
968
+ - `skills/postgres-best-practices/` - PostgreSQL
969
+ - `skills/rag-implementation/` - RAG
970
+ - `skills/docker-expert/` - Docker
971
+ - `skills/tdd-workflow/` - TDD
972
+ - +190 outras skills
973
+
974
+ ---
975
+
976
+ ## 🚀 Regras para IA
977
+
978
+ ### 1. **Sempre use os agentes para tarefas complexas**
979
+ ```bash
980
+ # ❌ NÃO fazer manualmente
981
+ # Criar arquivo, escrever código, validar...
982
+
983
+ # ✅ USAR agentes
984
+ npm run agent "Criar componente de autenticação"
985
+ ```
986
+
987
+ ### 2. **Confie na memória dos agentes**
988
+ Os agentes aprendem com cada execução. Se já fizeram algo similar, vão usar esse conhecimento.
989
+
990
+ ### 3. **Deixe o build tracking trabalhar**
991
+ Não precisa versionar manualmente. O BuildManager cria snapshots automaticamente.
992
+
993
+ ### 4. **Use keywords específicas**
994
+ Quanto mais específico, melhor o roteamento:
995
+ - ✅ "Criar API Next.js com PostgreSQL e autenticação JWT"
996
+ - ❌ "Fazer backend"
997
+
998
+ ### 5. **Consulte o histórico de builds**
999
+ ```typescript
1000
+ const buildManager = new BuildManager();
1001
+ console.log(buildManager.generateReport());
1002
+ ```
1003
+
1004
+ ### 6. **Aproveite a paralelização**
1005
+ O orquestrador executa agentes em paralelo quando possível. Não precisa otimizar manualmente.
1006
+
1007
+ ---
1008
+
1009
+ ## 📊 Estrutura do Projeto
1010
+
1011
+ ```
1012
+ wegho-agentes/
1013
+ ├── .agents/
1014
+ │ ├── core/
1015
+ │ │ ├── nextjs-agent.ts
1016
+ │ │ ├── uiux-agent.ts
1017
+ │ │ ├── backend-agent.ts
1018
+ │ │ ├── database-agent.ts
1019
+ │ │ ├── ai-agents-agent.ts
1020
+ │ │ ├── rag-agent.ts
1021
+ │ │ ├── pentest-agent.ts
1022
+ │ │ ├── devops-agent.ts
1023
+ │ │ ├── cloud-agent.ts
1024
+ │ │ ├── testing-agent.ts
1025
+ │ │ ├── cro-agent.ts
1026
+ │ │ ├── automation-agent.ts
1027
+ │ │ ├── build-manager.ts
1028
+ │ │ └── base-agent.ts
1029
+ │ ├── memory/ (memória de cada agente)
1030
+ │ ├── orchestrator.ts
1031
+ │ └── task-analyzer-agent.ts
1032
+ ├── .builds/ (builds incrementais)
1033
+ ├── skills/ (200+ skills)
1034
+ └── scripts/
1035
+ └── test-build-system.ts
1036
+ ```
1037
+
1038
+ ---
1039
+
1040
+ ## 🎓 Exemplos Práticos
1041
+
1042
+ ### Exemplo 1: Full Stack App
1043
+ ```bash
1044
+ npm run agent "Criar aplicação Next.js com:
1045
+ - Autenticação com Supabase
1046
+ - Dashboard com gráficos
1047
+ - API REST
1048
+ - PostgreSQL com RLS
1049
+ - Deploy na Vercel"
1050
+ ```
1051
+
1052
+ **Agentes ativados**: NextJS, UIUX, Backend, Database, Security, Cloud
1053
+
1054
+ ### Exemplo 2: AI Application
1055
+ ```bash
1056
+ npm run agent "Implementar chatbot com:
1057
+ - RAG usando Pinecone
1058
+ - LLM integration
1059
+ - Vector embeddings
1060
+ - Chat history"
1061
+ ```
1062
+
1063
+ **Agentes ativados**: RAG, AIAgents, Database, Backend
1064
+
1065
+ ### Exemplo 3: DevOps Setup
1066
+ ```bash
1067
+ npm run agent "Configurar infraestrutura:
1068
+ - Docker containers
1069
+ - GitHub Actions CI/CD
1070
+ - Deploy automático AWS
1071
+ - Testes automatizados"
1072
+ ```
1073
+
1074
+ **Agentes ativados**: DevOps, Cloud, Testing
1075
+
1076
+ ---
1077
+
1078
+ ## ⚡ Performance
1079
+
1080
+ - **Execução Paralela**: Agentes independentes rodam em paralelo
1081
+ - **Memória Otimizada**: Cada agente consulta apenas sua memória
1082
+ - **Build Incremental**: Apenas arquivos modificados são salvos
1083
+ - **Skills On-Demand**: Skills carregadas apenas quando necessário
1084
+
1085
+ ---
1086
+
1087
+ ## 🔍 Debugging
1088
+
1089
+ ### Ver logs de agente específico
1090
+ ```bash
1091
+ cat .agents/memory/nextjs-agent/executions.json
1092
+ ```
1093
+
1094
+ ### Ver histórico de builds
1095
+ ```bash
1096
+ cat .builds/history.json
1097
+ ```
1098
+
1099
+ ### Testar build system
1100
+ ```bash
1101
+ npm run test:build
1102
+ ```
1103
+
1104
+ ---
1105
+
1106
+ ## 📖 Documentação Completa
1107
+
1108
+ - **Walkthrough**: Ver `.gemini/antigravity/brain/.../walkthrough.md`
1109
+ - **Resumo Executivo**: Ver `.gemini/antigravity/brain/.../resumo_executivo.md`
1110
+ - **Task Progress**: Ver `.gemini/antigravity/brain/.../task.md`
1111
+
1112
+ ---
1113
+
1114
+ **Versão**: 5.0.0
1115
+ **Status**: ✅ Sistema Completo e Operacional
1116
+ **Agentes**: 20+
1117
+ **Skills**: 200+
1118
+ **Cobertura**: ~95%