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.
Files changed (108) hide show
  1. package/.agent/skills/wegho-global-rules/SKILL.md +20 -0
  2. package/.agent/workflows/PROMPT_GUIDE.md +7 -4
  3. package/.agents/cli.ts +29 -21
  4. package/.agents/core/base-agent.ts +28 -12
  5. package/.agents/core/memory-system.ts +45 -13
  6. package/.agents/core/report-generator.ts +26 -19
  7. package/.agents/orchestrator.ts +104 -74
  8. package/.clinerules +318 -1229
  9. package/.cursorrules +0 -189
  10. package/README.md +3 -3
  11. package/docs/VERSION.md +3 -2
  12. package/package.json +3 -3
  13. package/.agents/agents/ai-agents/README.md +0 -175
  14. package/.agents/agents/ai-agents/agent.ts +0 -83
  15. package/.agents/agents/ai-agents/specialty.md +0 -14
  16. package/.agents/agents/architecture/README.md +0 -61
  17. package/.agents/agents/architecture/agent.ts +0 -238
  18. package/.agents/agents/architecture/memory.md +0 -111
  19. package/.agents/agents/architecture/specialty.md +0 -31
  20. package/.agents/agents/automation/README.md +0 -60
  21. package/.agents/agents/automation/agent.ts +0 -61
  22. package/.agents/agents/automation/specialty.md +0 -14
  23. package/.agents/agents/backend/README.md +0 -155
  24. package/.agents/agents/backend/agent.ts +0 -100
  25. package/.agents/agents/backend/specialty.md +0 -14
  26. package/.agents/agents/cloud/README.md +0 -73
  27. package/.agents/agents/cloud/agent.ts +0 -53
  28. package/.agents/agents/cloud/specialty.md +0 -14
  29. package/.agents/agents/code-auditor/README.md +0 -37
  30. package/.agents/agents/code-auditor/agent.ts +0 -334
  31. package/.agents/agents/code-auditor/specialty.md +0 -14
  32. package/.agents/agents/cro/README.md +0 -200
  33. package/.agents/agents/cro/agent.ts +0 -61
  34. package/.agents/agents/cro/specialty.md +0 -14
  35. package/.agents/agents/database/README.md +0 -67
  36. package/.agents/agents/database/agent.ts +0 -93
  37. package/.agents/agents/database/specialty.md +0 -14
  38. package/.agents/agents/devops/README.md +0 -84
  39. package/.agents/agents/devops/agent.ts +0 -54
  40. package/.agents/agents/devops/specialty.md +0 -14
  41. package/.agents/agents/documentation/README.md +0 -107
  42. package/.agents/agents/documentation/agent.ts +0 -253
  43. package/.agents/agents/documentation/memory.md +0 -56
  44. package/.agents/agents/documentation/specialty.md +0 -33
  45. package/.agents/agents/frontend/README.md +0 -188
  46. package/.agents/agents/frontend/agent.ts +0 -211
  47. package/.agents/agents/frontend/memory.md +0 -139
  48. package/.agents/agents/frontend/specialty.md +0 -30
  49. package/.agents/agents/inventory/README.md +0 -35
  50. package/.agents/agents/inventory/agent.ts +0 -758
  51. package/.agents/agents/inventory/memory.md +0 -50
  52. package/.agents/agents/inventory/specialty.md +0 -129
  53. package/.agents/agents/nextjs/README.md +0 -58
  54. package/.agents/agents/nextjs/agent.ts +0 -114
  55. package/.agents/agents/nextjs/specialty.md +0 -14
  56. package/.agents/agents/pentest/README.md +0 -228
  57. package/.agents/agents/pentest/agent.ts +0 -96
  58. package/.agents/agents/pentest/specialty.md +0 -14
  59. package/.agents/agents/planning/README.md +0 -107
  60. package/.agents/agents/planning/agent.ts +0 -389
  61. package/.agents/agents/planning/specialty.md +0 -14
  62. package/.agents/agents/project-discovery/README.md +0 -35
  63. package/.agents/agents/project-discovery/agent.ts +0 -344
  64. package/.agents/agents/project-discovery/specialty.md +0 -14
  65. package/.agents/agents/quality/README.md +0 -81
  66. package/.agents/agents/quality/agent.ts +0 -269
  67. package/.agents/agents/quality/memory.md +0 -110
  68. package/.agents/agents/quality/specialty.md +0 -31
  69. package/.agents/agents/rag/README.md +0 -41
  70. package/.agents/agents/rag/agent.ts +0 -85
  71. package/.agents/agents/rag/specialty.md +0 -14
  72. package/.agents/agents/security/README.md +0 -152
  73. package/.agents/agents/security/agent.ts +0 -218
  74. package/.agents/agents/security/memory.md +0 -91
  75. package/.agents/agents/security/specialty.md +0 -31
  76. package/.agents/agents/task-analyzer/README.md +0 -36
  77. package/.agents/agents/task-analyzer/agent.ts +0 -462
  78. package/.agents/agents/task-analyzer/specialty.md +0 -14
  79. package/.agents/agents/testing/README.md +0 -161
  80. package/.agents/agents/testing/agent.ts +0 -61
  81. package/.agents/agents/testing/specialty.md +0 -14
  82. package/.agents/agents/uiux/README.md +0 -68
  83. package/.agents/agents/uiux/agent.ts +0 -95
  84. package/.agents/agents/uiux/specialty.md +0 -14
  85. package/.agents/base/base-agent.ts +0 -331
  86. package/.agents/base/memory-system.ts +0 -397
  87. package/.agents/base/skill-manager.ts +0 -95
  88. package/.agents/convert-memory.ps1 +0 -153
  89. package/.agents/examples/reporting-example.md +0 -203
  90. package/.agents/managers/build-manager.ts +0 -304
  91. package/.agents/managers/cache-manager.ts +0 -184
  92. package/.agents/managers/checkpoint-manager.ts +0 -299
  93. package/.agents/migrate-agents.ps1 +0 -117
  94. package/.agents/templates/change-report.md +0 -55
  95. package/.agents/templates/execution-plan.md +0 -36
  96. package/.agents/unmapped-skills.txt +0 -0
  97. package/.agents/utils/agent-migrator.ts +0 -360
  98. package/.agents/utils/agent-monitor.ts +0 -102
  99. package/.agents/utils/agent-parallelizer.ts +0 -108
  100. package/.agents/utils/context-monitor.ts +0 -140
  101. package/.agents/utils/feedback-collector.ts +0 -207
  102. package/.agents/utils/file-generator.ts +0 -304
  103. package/.agents/utils/memory-converter.ts +0 -217
  104. package/.agents/utils/memory-dashboard.ts +0 -147
  105. package/.agents/utils/performance-tracker.ts +0 -275
  106. package/.agents/utils/report-generator.ts +0 -193
  107. package/.agents/utils/retry-utility.ts +0 -140
  108. package/.agents/utils/workflow-validator.ts +0 -158
@@ -1,211 +0,0 @@
1
- /**
2
- * Front-End Agent (com Memória)
3
- *
4
- * Responsabilidades:
5
- * - Garantir qualidade de UI/UX
6
- * - Validar conformidade com DESIGN_SYSTEM.md
7
- * - Implementar estados (loading, empty, error)
8
- * - Garantir acessibilidade (ARIA, contraste, teclado)
9
- * - Otimizar performance (lazy loading, code splitting)
10
- * - Aplicar regra de 500 linhas em componentes
11
- * - Aprender com sucessos e falhas
12
- */
13
-
14
- import * as fs from 'fs';
15
- import { BaseAgent, TaskContext, TaskResult } from '../../base/base-agent.js';
16
- import { validateFileLines } from '../../config.js';
17
-
18
- export interface FrontEndCheckResult extends TaskResult {
19
- passed: boolean;
20
- }
21
-
22
- export class FrontEndAgent extends BaseAgent {
23
- constructor(memoryBasePath: string = '.agents/memory') {
24
- super('frontend-agent', memoryBasePath);
25
- }
26
-
27
- /**
28
- * Implementação da validação de componente
29
- */
30
- async executeTask(taskDescription: string, context: TaskContext): Promise<TaskResult> {
31
- const issues: string[] = [];
32
- const warnings: string[] = [];
33
- const recommendations: string[] = [];
34
-
35
- // Validar cada arquivo no contexto
36
- for (const filePath of context.files) {
37
- // 1. Verificar limite de linhas
38
- const lineCheck = validateFileLines(filePath, 500);
39
- if (!lineCheck.valid) {
40
- issues.push(lineCheck.message || 'Arquivo excede 500 linhas');
41
- }
42
-
43
- // 2. Ler conteúdo do arquivo
44
- if (!fs.existsSync(filePath)) {
45
- issues.push(`Arquivo não encontrado: ${filePath}`);
46
- continue;
47
- }
48
-
49
- const content = fs.readFileSync(filePath, 'utf-8');
50
-
51
- // 3. Verificar uso de 'any' em componentes
52
- if (content.match(/:\s*any(?!\w)/g)) {
53
- warnings.push(`[${filePath}] Uso de "any" detectado - considere usar tipos específicos`);
54
- }
55
-
56
- // 4. Verificar estados de loading/error/empty
57
- const hasUseState = content.includes('useState');
58
- const hasLoading = content.match(/loading|isLoading|isPending/i);
59
- const hasError = content.match(/error|isError/i);
60
-
61
- if (hasUseState && !hasLoading) {
62
- recommendations.push(`[${filePath}] Considere adicionar estado de loading`);
63
- }
64
- if (hasUseState && !hasError) {
65
- recommendations.push(`[${filePath}] Considere adicionar tratamento de erro`);
66
- }
67
-
68
- // 5. Verificar acessibilidade básica
69
- if (content.includes('<button') && !content.match(/aria-label|aria-labelledby/)) {
70
- warnings.push(`[${filePath}] Botões sem aria-label detectados - verifique acessibilidade`);
71
- }
72
-
73
- // 6. Verificar uso de next/image
74
- if (content.includes('<img') && !content.includes('next/image')) {
75
- recommendations.push(`[${filePath}] Considere usar next/image para otimização automática`);
76
- }
77
-
78
- // 7. Verificar dangerouslySetInnerHTML sem sanitização
79
- if (content.includes('dangerouslySetInnerHTML') && !content.includes('DOMPurify')) {
80
- issues.push(`[${filePath}] dangerouslySetInnerHTML sem sanitização (DOMPurify) detectado!`);
81
- }
82
- }
83
-
84
- const success = issues.length === 0;
85
- const details = this.formatDetails(issues, warnings, recommendations);
86
-
87
- return {
88
- success,
89
- details,
90
- issues,
91
- warnings,
92
- recommendations,
93
- };
94
- }
95
-
96
- /**
97
- * Valida componente (método de conveniência)
98
- */
99
- async validateComponent(filePath: string): Promise<FrontEndCheckResult> {
100
- const context: TaskContext = {
101
- files: [filePath],
102
- areas: ['frontend'],
103
- complexity: 'low',
104
- };
105
-
106
- const result = await this.executeWithMemory(
107
- `Validar componente: ${filePath}`,
108
- context
109
- );
110
-
111
- return {
112
- ...result,
113
- passed: result.success,
114
- };
115
- }
116
-
117
- /**
118
- * Gera relatório de front-end
119
- */
120
- generateReport(results: FrontEndCheckResult[]): string {
121
- const allIssues = results.flatMap(r => r.issues || []);
122
- const allWarnings = results.flatMap(r => r.warnings || []);
123
- const allRecommendations = results.flatMap(r => r.recommendations || []);
124
-
125
- let report = '[FRONT-END IMPLEMENTATION REPORT]\n\n';
126
-
127
- if (allIssues.length > 0) {
128
- report += '❌ ISSUES (Bloqueadores):\n';
129
- allIssues.forEach(issue => report += ` - ${issue}\n`);
130
- report += '\n';
131
- }
132
-
133
- if (allWarnings.length > 0) {
134
- report += '⚠️ WARNINGS:\n';
135
- allWarnings.forEach(warning => report += ` - ${warning}\n`);
136
- report += '\n';
137
- }
138
-
139
- if (allRecommendations.length > 0) {
140
- report += '💡 RECOMENDAÇÕES:\n';
141
- allRecommendations.forEach(rec => report += ` - ${rec}\n`);
142
- report += '\n';
143
- }
144
-
145
- if (allIssues.length === 0 && allWarnings.length === 0) {
146
- report += '✅ Todos os checks passaram!\n\n';
147
- }
148
-
149
- report += '---\n';
150
- report += '[x] Regra 2 implementada (Front-End)\n';
151
-
152
- return report;
153
- }
154
-
155
- /**
156
- * Formata detalhes do resultado
157
- */
158
- private formatDetails(issues: string[], warnings: string[], recommendations: string[]): string {
159
- let details = '';
160
-
161
- if (issues.length > 0) {
162
- details += `Issues: ${issues.length}\n`;
163
- }
164
- if (warnings.length > 0) {
165
- details += `Warnings: ${warnings.length}\n`;
166
- }
167
- if (recommendations.length > 0) {
168
- details += `Recommendations: ${recommendations.length}\n`;
169
- }
170
-
171
- return details || 'Validação concluída sem problemas';
172
- }
173
-
174
- /**
175
- * Especialidade padrão do Front-End Agent
176
- */
177
- protected getDefaultSpecialty(): string {
178
- return `# Front-End Agent - Especialidade
179
-
180
- ## Responsabilidades
181
- - Validar componentes React/Next.js
182
- - Garantir acessibilidade (WCAG 2.1)
183
- - Otimizar performance (Core Web Vitals)
184
- - Aplicar design system
185
- - Implementar estados: loading, error, empty
186
-
187
- ## Expertise
188
- - React, Next.js, TypeScript
189
- - CSS, Tailwind, Design Systems
190
- - Acessibilidade (ARIA, semântica)
191
- - Performance (lazy loading, code splitting)
192
- - Server Components vs Client Components
193
-
194
- ## Regras
195
- - Componentes < 500 linhas
196
- - Sempre incluir estados: loading, error, empty
197
- - Usar next/image para imagens
198
- - Sanitizar HTML com DOMPurify
199
- - Evitar uso de 'any'
200
- - Adicionar aria-labels em botões
201
-
202
- ## Tarefas Típicas
203
- - Criar/validar componentes UI
204
- - Implementar páginas responsivas
205
- - Otimizar performance de renderização
206
- - Garantir acessibilidade
207
- - Aplicar design system
208
- `;
209
- }
210
- }
211
-
@@ -1,139 +0,0 @@
1
- # Memória do Agente frontend
2
-
3
- Última atualização: 2026-02-08T06:24:05Z
4
-
5
- ---
6
-
7
- ## 📊 Estatísticas
8
-
9
- - Total de sucessos: 9
10
- - Total de falhas: 2
11
- - Taxa de sucesso: 81.8%
12
- - Aprendizados acumulados: 0
13
-
14
- ---
15
-
16
- ## ✅ Sucessos Recentes
17
- ### 24/01/2026 - `1769264518672-y0i334z3o`
18
-
19
- **Tarefa**: Create a responsive React component with tailwind and accessibility
20
-
21
- **Contexto**:
22
- - Arquivos: nenhum
23
- - Áreas: frontend
24
- - Complexidade: low
25
-
26
- **Resultado**: Validação concluída sem problemas
27
-
28
- ### 24/01/2026 - `1769264518664-fbzf389s4`
29
-
30
- **Tarefa**: Use persistence-architecture to save files
31
-
32
- **Contexto**:
33
- - Arquivos: nenhum
34
- - Áreas: frontend
35
- - Complexidade: low
36
-
37
- **Resultado**: Validação concluída sem problemas
38
-
39
- ### 24/01/2026 - `1769264427296-1rgrkauj8`
40
-
41
- **Tarefa**: Create a responsive React component with tailwind and accessibility
42
-
43
- **Contexto**:
44
- - Arquivos: nenhum
45
- - Áreas: frontend
46
- - Complexidade: low
47
-
48
- **Resultado**: Validação concluída sem problemas
49
-
50
- ### 24/01/2026 - `1769264427288-96ax58pny`
51
-
52
- **Tarefa**: Use persistence-architecture to save files
53
-
54
- **Contexto**:
55
- - Arquivos: nenhum
56
- - Áreas: frontend
57
- - Complexidade: low
58
-
59
- **Resultado**: Validação concluída sem problemas
60
-
61
- ### 24/01/2026 - `1769254251461-k4hsfvbqw`
62
-
63
- **Tarefa**: Validar componentes React, acessibilidade e UI/UX
64
-
65
- **Contexto**:
66
- - Arquivos: nenhum
67
- - Áreas: frontend, security
68
- - Complexidade: medium
69
-
70
- **Resultado**: Validação concluída sem problemas
71
-
72
- ### 24/01/2026 - `1769254246025-1x8boxsqx`
73
-
74
- **Tarefa**: Validar componentes React, acessibilidade e UI/UX
75
-
76
- **Contexto**:
77
- - Arquivos: nenhum
78
- - Áreas: frontend, security
79
- - Complexidade: medium
80
-
81
- **Resultado**: Validação concluída sem problemas
82
-
83
- ### 24/01/2026 - `1769254240576-lqa78ngfl`
84
-
85
- **Tarefa**: Validar componentes React, acessibilidade e UI/UX
86
-
87
- **Contexto**:
88
- - Arquivos: nenhum
89
- - Áreas: frontend, auth, security
90
- - Complexidade: medium
91
-
92
- **Resultado**: Validação concluída sem problemas
93
-
94
- ### 24/01/2026 - `1769252937300-im4k3lvk3`
95
-
96
- **Tarefa**: Validar componentes React, acessibilidade e UI/UX
97
-
98
- **Contexto**:
99
- - Arquivos: nenhum
100
- - Áreas: frontend
101
- - Complexidade: low
102
-
103
- **Resultado**: Validação concluída sem problemas
104
-
105
- ### 23/01/2026 - `1769137691453-s8wj9sjh8`
106
-
107
- **Tarefa**: Inicializar memória do agente
108
-
109
- **Contexto**:
110
- - Arquivos: nenhum
111
- - Áreas: initialization
112
- - Complexidade: low
113
-
114
- **Resultado**: Validação concluída sem problemas
115
-
116
- ---
117
-
118
- ## ❌ Falhas Registradas
119
-
120
- ### 24/01/2026 - `1769263323453-e6gqddzts`
121
-
122
- **Tarefa**: Audit this code for XSS vulnerabilities and best practices
123
-
124
- **Motivo**: Issues: 2
125
-
126
-
127
- ### 24/01/2026 - `1769263323445-6rvddbv60`
128
-
129
- **Tarefa**: Create a responsive React component using tailwind patterns
130
-
131
- **Motivo**: Issues: 2
132
-
133
-
134
- ---
135
-
136
- ## 🧠 Aprendizados
137
-
138
- _Nenhum aprendizado registrado ainda._
139
-
@@ -1,30 +0,0 @@
1
- # Front-End Agent - Especialidade
2
-
3
- ## Responsabilidades
4
- - Validar componentes React/Next.js
5
- - Garantir acessibilidade (WCAG 2.1)
6
- - Otimizar performance (Core Web Vitals)
7
- - Aplicar design system
8
- - Implementar estados: loading, error, empty
9
-
10
- ## Expertise
11
- - React, Next.js, TypeScript
12
- - CSS, Tailwind, Design Systems
13
- - Acessibilidade (ARIA, semântica)
14
- - Performance (lazy loading, code splitting)
15
- - Server Components vs Client Components
16
-
17
- ## Regras
18
- - Componentes < 500 linhas
19
- - Sempre incluir estados: loading, error, empty
20
- - Usar next/image para imagens
21
- - Sanitizar HTML com DOMPurify
22
- - Evitar uso de 'any'
23
- - Adicionar aria-labels em botões
24
-
25
- ## Tarefas Típicas
26
- - Criar/validar componentes UI
27
- - Implementar páginas responsivas
28
- - Otimizar performance de renderização
29
- - Garantir acessibilidade
30
- - Aplicar design system
@@ -1,35 +0,0 @@
1
- # Inventory Agent
2
-
3
- ## 🎯 Responsabilidade
4
-
5
- Catalogar e rastrear componentes, variáveis, padrões e flows do projeto para evitar duplicações e manter consistência.
6
-
7
- ## 🛠️ Skills Disponíveis
8
-
9
- *Skills de inventário serão mapeadas quando adicionadas*
10
-
11
- ## 📋 Tarefas Típicas
12
-
13
- - ✅ Catalogar componentes criados
14
- - ✅ Rastrear variáveis e configs
15
- - ✅ Detectar duplicações
16
- - ✅ Manter registro de padrões
17
- - ✅ Consultar inventário existente
18
- - ✅ Validar unicidade
19
-
20
- ## 🔗 Dependências
21
-
22
- - `BaseAgent`
23
- - `MemorySystem`
24
- - `SkillManager`
25
-
26
- ## 🔄 Fluxo de Trabalho
27
-
28
- 1. **Consulta memória**: Busca itens similares no inventário
29
- 2. **Carrega skills**: inventory patterns
30
- 3. **Executa catalogação**: Registra novos itens
31
- 4. **Registra resultado**: Atualiza inventário em memory.md
32
-
33
- ## 📊 Memória
34
-
35
- Ver [memory.md](./memory.md) para inventário completo do projeto.