izanagi-ai 2.9.3 → 2.9.5

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 (185) hide show
  1. package/.manifest +89 -7
  2. package/.opencode/agent/techlead.md +2 -1
  3. package/agents/adversarial-critic-agent.json +53 -0
  4. package/agents/evaluator-agent.json +52 -0
  5. package/agents/researcher-agent.json +52 -0
  6. package/core/evaluation-engine.md +64 -0
  7. package/core/execution-graph.md +60 -0
  8. package/core/model-router.md +64 -0
  9. package/core/self-healing.md +62 -0
  10. package/core/skill-resolver.json +48 -1
  11. package/core/tracing.md +42 -0
  12. package/dist/cli/commands/agent.d.ts +7 -0
  13. package/dist/cli/commands/agent.d.ts.map +1 -0
  14. package/dist/cli/commands/agent.js +84 -0
  15. package/dist/cli/commands/agent.js.map +1 -0
  16. package/dist/cli/commands/benchmark.d.ts +5 -0
  17. package/dist/cli/commands/benchmark.d.ts.map +1 -0
  18. package/dist/cli/commands/benchmark.js +119 -0
  19. package/dist/cli/commands/benchmark.js.map +1 -0
  20. package/dist/cli/commands/chat.d.ts.map +1 -1
  21. package/dist/cli/commands/chat.js +1 -62
  22. package/dist/cli/commands/chat.js.map +1 -1
  23. package/dist/cli/commands/diagnose.d.ts +9 -0
  24. package/dist/cli/commands/diagnose.d.ts.map +1 -0
  25. package/dist/cli/commands/diagnose.js +118 -0
  26. package/dist/cli/commands/diagnose.js.map +1 -0
  27. package/dist/cli/commands/doctor.d.ts +1 -1
  28. package/dist/cli/commands/doctor.d.ts.map +1 -1
  29. package/dist/cli/commands/doctor.js +53 -1
  30. package/dist/cli/commands/doctor.js.map +1 -1
  31. package/dist/cli/commands/eval.d.ts +10 -0
  32. package/dist/cli/commands/eval.d.ts.map +1 -0
  33. package/dist/cli/commands/eval.js +116 -0
  34. package/dist/cli/commands/eval.js.map +1 -0
  35. package/dist/cli/commands/memory.d.ts +5 -0
  36. package/dist/cli/commands/memory.d.ts.map +1 -0
  37. package/dist/cli/commands/memory.js +68 -0
  38. package/dist/cli/commands/memory.js.map +1 -0
  39. package/dist/cli/commands/run.d.ts +7 -0
  40. package/dist/cli/commands/run.d.ts.map +1 -1
  41. package/dist/cli/commands/run.js +73 -7
  42. package/dist/cli/commands/run.js.map +1 -1
  43. package/dist/cli/commands/skill.d.ts +9 -0
  44. package/dist/cli/commands/skill.d.ts.map +1 -0
  45. package/dist/cli/commands/skill.js +135 -0
  46. package/dist/cli/commands/skill.js.map +1 -0
  47. package/dist/cli/commands/trace.d.ts +7 -0
  48. package/dist/cli/commands/trace.d.ts.map +1 -0
  49. package/dist/cli/commands/trace.js +93 -0
  50. package/dist/cli/commands/trace.js.map +1 -0
  51. package/dist/cli/commands/workflow.d.ts +7 -0
  52. package/dist/cli/commands/workflow.d.ts.map +1 -0
  53. package/dist/cli/commands/workflow.js +85 -0
  54. package/dist/cli/commands/workflow.js.map +1 -0
  55. package/dist/cli/index.d.ts.map +1 -1
  56. package/dist/cli/index.js +53 -3
  57. package/dist/cli/index.js.map +1 -1
  58. package/dist/runtime/benchmarks/definitions.d.ts +9 -0
  59. package/dist/runtime/benchmarks/definitions.d.ts.map +1 -0
  60. package/dist/runtime/benchmarks/definitions.js +145 -0
  61. package/dist/runtime/benchmarks/definitions.js.map +1 -0
  62. package/dist/runtime/benchmarks/registry.d.ts +17 -0
  63. package/dist/runtime/benchmarks/registry.d.ts.map +1 -0
  64. package/dist/runtime/benchmarks/registry.js +50 -0
  65. package/dist/runtime/benchmarks/registry.js.map +1 -0
  66. package/dist/runtime/benchmarks/runner.d.ts +36 -0
  67. package/dist/runtime/benchmarks/runner.d.ts.map +1 -0
  68. package/dist/runtime/benchmarks/runner.js +199 -0
  69. package/dist/runtime/benchmarks/runner.js.map +1 -0
  70. package/dist/runtime/contracts/artifacts.d.ts +39 -0
  71. package/dist/runtime/contracts/artifacts.d.ts.map +1 -0
  72. package/dist/runtime/contracts/artifacts.js +192 -0
  73. package/dist/runtime/contracts/artifacts.js.map +1 -0
  74. package/dist/runtime/evaluation/engine.d.ts +69 -0
  75. package/dist/runtime/evaluation/engine.d.ts.map +1 -0
  76. package/dist/runtime/evaluation/engine.js +160 -0
  77. package/dist/runtime/evaluation/engine.js.map +1 -0
  78. package/dist/runtime/evolution/learning.d.ts +28 -0
  79. package/dist/runtime/evolution/learning.d.ts.map +1 -0
  80. package/dist/runtime/evolution/learning.js +92 -0
  81. package/dist/runtime/evolution/learning.js.map +1 -0
  82. package/dist/runtime/factories/agent-factory.d.ts +42 -0
  83. package/dist/runtime/factories/agent-factory.d.ts.map +1 -0
  84. package/dist/runtime/factories/agent-factory.js +135 -0
  85. package/dist/runtime/factories/agent-factory.js.map +1 -0
  86. package/dist/runtime/factories/skill-factory.d.ts +46 -0
  87. package/dist/runtime/factories/skill-factory.d.ts.map +1 -0
  88. package/dist/runtime/factories/skill-factory.js +124 -0
  89. package/dist/runtime/factories/skill-factory.js.map +1 -0
  90. package/dist/runtime/memory/store.d.ts +64 -0
  91. package/dist/runtime/memory/store.d.ts.map +1 -0
  92. package/dist/runtime/memory/store.js +207 -0
  93. package/dist/runtime/memory/store.js.map +1 -0
  94. package/dist/runtime/model/router.d.ts +28 -0
  95. package/dist/runtime/model/router.d.ts.map +1 -0
  96. package/dist/runtime/model/router.js +131 -0
  97. package/dist/runtime/model/router.js.map +1 -0
  98. package/dist/runtime/observability/tracer.d.ts +76 -0
  99. package/dist/runtime/observability/tracer.d.ts.map +1 -0
  100. package/dist/runtime/observability/tracer.js +188 -0
  101. package/dist/runtime/observability/tracer.js.map +1 -0
  102. package/dist/runtime/orchestration/graph.d.ts +49 -0
  103. package/dist/runtime/orchestration/graph.d.ts.map +1 -0
  104. package/dist/runtime/orchestration/graph.js +138 -0
  105. package/dist/runtime/orchestration/graph.js.map +1 -0
  106. package/dist/runtime/orchestration/planner.d.ts +48 -0
  107. package/dist/runtime/orchestration/planner.d.ts.map +1 -0
  108. package/dist/runtime/orchestration/planner.js +163 -0
  109. package/dist/runtime/orchestration/planner.js.map +1 -0
  110. package/dist/runtime/orchestrator.d.ts +83 -0
  111. package/dist/runtime/orchestrator.d.ts.map +1 -0
  112. package/dist/runtime/orchestrator.js +296 -0
  113. package/dist/runtime/orchestrator.js.map +1 -0
  114. package/dist/runtime/recovery/healing.d.ts +56 -0
  115. package/dist/runtime/recovery/healing.d.ts.map +1 -0
  116. package/dist/runtime/recovery/healing.js +186 -0
  117. package/dist/runtime/recovery/healing.js.map +1 -0
  118. package/dist/runtime/routing/resolver.d.ts +61 -0
  119. package/dist/runtime/routing/resolver.d.ts.map +1 -0
  120. package/dist/runtime/routing/resolver.js +279 -0
  121. package/dist/runtime/routing/resolver.js.map +1 -0
  122. package/dist/runtime/routing/scorer.d.ts +41 -0
  123. package/dist/runtime/routing/scorer.d.ts.map +1 -0
  124. package/dist/runtime/routing/scorer.js +95 -0
  125. package/dist/runtime/routing/scorer.js.map +1 -0
  126. package/dist/runtime/security/skill-scanner.d.ts +35 -0
  127. package/dist/runtime/security/skill-scanner.d.ts.map +1 -0
  128. package/dist/runtime/security/skill-scanner.js +164 -0
  129. package/dist/runtime/security/skill-scanner.js.map +1 -0
  130. package/dist/runtime/tests/benchmark.test.d.ts +2 -0
  131. package/dist/runtime/tests/benchmark.test.d.ts.map +1 -0
  132. package/dist/runtime/tests/benchmark.test.js +86 -0
  133. package/dist/runtime/tests/benchmark.test.js.map +1 -0
  134. package/dist/runtime/tests/cli.test.d.ts +2 -0
  135. package/dist/runtime/tests/cli.test.d.ts.map +1 -0
  136. package/dist/runtime/tests/cli.test.js +77 -0
  137. package/dist/runtime/tests/cli.test.js.map +1 -0
  138. package/dist/runtime/tests/contracts.test.d.ts +2 -0
  139. package/dist/runtime/tests/contracts.test.d.ts.map +1 -0
  140. package/dist/runtime/tests/contracts.test.js +84 -0
  141. package/dist/runtime/tests/contracts.test.js.map +1 -0
  142. package/dist/runtime/tests/evaluation.test.d.ts +2 -0
  143. package/dist/runtime/tests/evaluation.test.d.ts.map +1 -0
  144. package/dist/runtime/tests/evaluation.test.js +88 -0
  145. package/dist/runtime/tests/evaluation.test.js.map +1 -0
  146. package/dist/runtime/tests/graph.test.d.ts +2 -0
  147. package/dist/runtime/tests/graph.test.d.ts.map +1 -0
  148. package/dist/runtime/tests/graph.test.js +116 -0
  149. package/dist/runtime/tests/graph.test.js.map +1 -0
  150. package/dist/runtime/tests/healing.test.d.ts +2 -0
  151. package/dist/runtime/tests/healing.test.d.ts.map +1 -0
  152. package/dist/runtime/tests/healing.test.js +202 -0
  153. package/dist/runtime/tests/healing.test.js.map +1 -0
  154. package/dist/runtime/tests/memory.test.d.ts +2 -0
  155. package/dist/runtime/tests/memory.test.d.ts.map +1 -0
  156. package/dist/runtime/tests/memory.test.js +86 -0
  157. package/dist/runtime/tests/memory.test.js.map +1 -0
  158. package/dist/runtime/tests/model.test.d.ts +2 -0
  159. package/dist/runtime/tests/model.test.d.ts.map +1 -0
  160. package/dist/runtime/tests/model.test.js +41 -0
  161. package/dist/runtime/tests/model.test.js.map +1 -0
  162. package/dist/runtime/tests/routing.test.d.ts +2 -0
  163. package/dist/runtime/tests/routing.test.d.ts.map +1 -0
  164. package/dist/runtime/tests/routing.test.js +148 -0
  165. package/dist/runtime/tests/routing.test.js.map +1 -0
  166. package/dist/runtime/tests/tracer.test.d.ts +2 -0
  167. package/dist/runtime/tests/tracer.test.d.ts.map +1 -0
  168. package/dist/runtime/tests/tracer.test.js +90 -0
  169. package/dist/runtime/tests/tracer.test.js.map +1 -0
  170. package/dist/runtime/types.d.ts +406 -0
  171. package/dist/runtime/types.d.ts.map +1 -0
  172. package/dist/runtime/types.js +10 -0
  173. package/dist/runtime/types.js.map +1 -0
  174. package/package.json +4 -2
  175. package/skills/adversarial-critique/SKILL.md +60 -0
  176. package/skills/architecture-patterns/SKILL.md +194 -72
  177. package/skills/economia-tokens/SKILL.md +242 -37
  178. package/skills/economia-tokens/references.md +25 -8
  179. package/skills/evaluation/SKILL.md +80 -0
  180. package/skills/failure-patterns/SKILL.md +67 -0
  181. package/skills/handoff-protocol/SKILL.md +61 -0
  182. package/skills/qa/SKILL.md +225 -230
  183. package/skills/security-privacy/SKILL.md +154 -68
  184. package/skills/systematic-debugging/SKILL.md +126 -56
  185. package/skills/web-perf-seo/SKILL.md +219 -70
package/.manifest CHANGED
@@ -1,12 +1,32 @@
1
1
  {
2
2
  "name": "izanagi-ai",
3
- "version": "2.9.3",
3
+ "version": "2.9.5",
4
4
  "description": "Izanagi AI - Modular Skill-Oriented AI Prompt & Agent Framework for Autonomous Software Engineering",
5
5
  "author": "Pedro Henrique Sanches Leal",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/pedrohenriquesanchesleal4-debug/izanagi-ai#readme",
8
- "generatedAt": "2026-08-11T11:45:59.900Z",
8
+ "generatedAt": "2026-08-11T12:46:08.320Z",
9
9
  "agents": [
10
+ {
11
+ "id": "adversarial-critic",
12
+ "name": "Adversarial Critic",
13
+ "version": "1.0.0",
14
+ "file": "agents/adversarial-critic-agent.json",
15
+ "role": "Crítica adversarial de implementações: caçar bugs, falhas de segurança, problemas de arquitetura, requisitos faltantes, problemas de performance, edge cases, suposições incorretas, overengineering e AI slop",
16
+ "skills": [
17
+ "code-auditor",
18
+ "security-privacy",
19
+ "anti-ai-slop",
20
+ "complexity-analyzer",
21
+ "qa",
22
+ "self-critique"
23
+ ],
24
+ "chains": [
25
+ "critique_code",
26
+ "critique_ui",
27
+ "critique_architecture"
28
+ ]
29
+ },
10
30
  {
11
31
  "id": "animation",
12
32
  "name": "Animation Engineer",
@@ -205,6 +225,25 @@
205
225
  "diagram"
206
226
  ]
207
227
  },
228
+ {
229
+ "id": "evaluator",
230
+ "name": "Evaluator",
231
+ "version": "1.0.0",
232
+ "file": "agents/evaluator-agent.json",
233
+ "role": "Avaliação estruturada de resultados de agentes e workflows: score por métricas, verdict (PASS/PASS_WITH_WARNINGS/FAIL/BLOCKED/UNKNOWN), detecção de regressões e recomendações acionáveis",
234
+ "skills": [
235
+ "qa",
236
+ "confidence-estimator",
237
+ "code-auditor",
238
+ "self-critique",
239
+ "memoria-projeto"
240
+ ],
241
+ "chains": [
242
+ "evaluate_code",
243
+ "evaluate_architecture",
244
+ "evaluate_automation"
245
+ ]
246
+ },
208
247
  {
209
248
  "id": "form-engineer",
210
249
  "name": "Form & UI Engineer",
@@ -290,6 +329,25 @@
290
329
  "regression"
291
330
  ]
292
331
  },
332
+ {
333
+ "id": "researcher",
334
+ "name": "Researcher",
335
+ "version": "1.0.0",
336
+ "file": "agents/researcher-agent.json",
337
+ "role": "Pesquisa estruturada baseada em evidência: coleta de fatos com fontes citadas, distinção FACT/ASSUMPTION/INFERENCE/UNKNOWN, priorização de fontes oficiais e relatório com nível de confiança",
338
+ "skills": [
339
+ "deep-research",
340
+ "confidence-estimator",
341
+ "hallucination-detection",
342
+ "documentation-writer",
343
+ "memoria-projeto"
344
+ ],
345
+ "chains": [
346
+ "research_stack",
347
+ "research_market",
348
+ "research_technical"
349
+ ]
350
+ },
293
351
  {
294
352
  "id": "security",
295
353
  "name": "Security Engineer",
@@ -368,7 +426,7 @@
368
426
  "skills": [
369
427
  {
370
428
  "name": "Skill Library",
371
- "count": 142,
429
+ "count": 146,
372
430
  "skills": [
373
431
  {
374
432
  "id": "a11y",
@@ -382,6 +440,12 @@
382
440
  "version": "1.0.0",
383
441
  "path": "skills/accessibility-reviewer/SKILL.md"
384
442
  },
443
+ {
444
+ "id": "adversarial-critic",
445
+ "name": "adversarial-critique",
446
+ "version": "1.0.0",
447
+ "path": "skills/adversarial-critique/SKILL.md"
448
+ },
385
449
  {
386
450
  "id": "agentic-coding",
387
451
  "name": "agentic-coding",
@@ -432,7 +496,7 @@
432
496
  },
433
497
  {
434
498
  "id": "architecture-patterns",
435
- "name": "Skill Architecture Patterns — Izanagi",
499
+ "name": "architecture-patterns",
436
500
  "version": "1.0.0",
437
501
  "path": "skills/architecture-patterns/SKILL.md"
438
502
  },
@@ -472,6 +536,12 @@
472
536
  "version": "1.0.0",
473
537
  "path": "skills/automation-security/SKILL.md"
474
538
  },
539
+ {
540
+ "id": "avaliacao",
541
+ "name": "evaluation",
542
+ "version": "1.0.0",
543
+ "path": "skills/evaluation/SKILL.md"
544
+ },
475
545
  {
476
546
  "id": "brainstorming",
477
547
  "name": "brainstorming",
@@ -712,6 +782,12 @@
712
782
  "version": "1.0.0",
713
783
  "path": "skills/error-recovery/SKILL.md"
714
784
  },
785
+ {
786
+ "id": "failure-patterns",
787
+ "name": "failure-patterns",
788
+ "version": "1.0.0",
789
+ "path": "skills/failure-patterns/SKILL.md"
790
+ },
715
791
  {
716
792
  "id": "fan-out",
717
793
  "name": "Parallel Agents (Fan-Out & Swarm Orc",
@@ -754,6 +830,12 @@
754
830
  "version": "1.0.0",
755
831
  "path": "skills/hallucination-detection/SKILL.md"
756
832
  },
833
+ {
834
+ "id": "handoff",
835
+ "name": "handoff-protocol",
836
+ "version": "1.0.0",
837
+ "path": "skills/handoff-protocol/SKILL.md"
838
+ },
757
839
  {
758
840
  "id": "handoff-sessao",
759
841
  "name": "handoff-sessao",
@@ -918,7 +1000,7 @@
918
1000
  },
919
1001
  {
920
1002
  "id": "qa",
921
- "name": "Skill QA",
1003
+ "name": "qa",
922
1004
  "version": "1.0.0",
923
1005
  "path": "skills/qa/SKILL.md"
924
1006
  },
@@ -1014,7 +1096,7 @@
1014
1096
  },
1015
1097
  {
1016
1098
  "id": "security-privacy",
1017
- "name": "Skill Security & Privacy — Izanagi",
1099
+ "name": "security-privacy",
1018
1100
  "version": "1.0.0",
1019
1101
  "path": "skills/security-privacy/SKILL.md"
1020
1102
  },
@@ -1206,7 +1288,7 @@
1206
1288
  },
1207
1289
  {
1208
1290
  "id": "web-perf-engineer",
1209
- "name": "Skill Web Performance & SEO — Izanagi",
1291
+ "name": "web-perf-seo",
1210
1292
  "version": "1.0.0",
1211
1293
  "path": "skills/web-perf-seo/SKILL.md"
1212
1294
  },
@@ -24,4 +24,5 @@ Você é o **Tech Lead** do Izanagi AI, responsável por elevar o patamar técni
24
24
  ## Sempre & Nunca
25
25
 
26
26
  - **Sempre**: Exigir code review estruturado em 5 dimensões; fornecer o fix funcional em diff; atualizar a memória persistente do projeto.
27
- - **Nunca**: Aprovar PRs sem análise profunda ("LGTM"); fazer comentários de review vagos ou ríspidos; aceitar acúmulo de débitos técnicos críticos sem mitigação.
27
+ - **Nunca**: Aprovar PRs sem análise profunda ("LGTM"); fazer comentários de review vagos ou ríspidos; aceitar acúmulo de débitos técnicos críticos sem mitigação.
28
+
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "Adversarial Critic",
3
+ "version": "1.0.0",
4
+ "role": "Crítica adversarial de implementações: caçar bugs, falhas de segurança, problemas de arquitetura, requisitos faltantes, problemas de performance, edge cases, suposições incorretas, overengineering e AI slop",
5
+ "identity": "Você é o ADVERSARIAL CRITIC do Izanagi AI. Sua única função é TENTAR QUEBRAR a implementação — você não implementa. Você procura ativamente por problemas antes que eles cheguem à produção.\n\nO QUE PROCURAR (checklist adversarial):\n1. BUGS: condições de corrida, null/undefined, off-by-one, estados inconsistentes, async mal tratado, memory leaks.\n2. SEGURANÇA: injection (SQL/XSS/command), auth quebrada, secrets expostos, IDOR, SSRF, CORS errado, headers ausentes.\n3. ARQUITETURA: acoplamento, camadas violadas, dependências circulares, teste de configuração na lógica.\n4. REQUISITOS FALTANTES: requisitos do pedido que não foram implementados ou implementados pela metade.\n5. PERFORMANCE: N+1, loops O(n²), renderizações desnecessárias, assets pesados.\n6. EDGE CASES: input vazio, valores extremos, unicodde, timezone, locale, concorrência.\n7. SUPOSIÇÕES INCORRETAS: premissas sobre o ambiente, dados, comportamento de terceiros.\n8. OVERENGINEERING: abstrações desnecessárias, complexidade sem retorno.\n9. AI SLOP: UI genérica, copy clichê, padrões de design robóticos.\n\nFORMATO DE SAÍDA:\nPara cada problema: severidade (CRITICAL/HIGH/MEDIUM/LOW), arquivo+linha quando aplicável, descrição do impacto e sugestão de correção concreta. No final: veredicto de prontidão (READY / READY_WITH_FIXES / NOT_READY) e lista priorizada de fixes.\n\nREGRAS:\n- Você NÃO corrige: apenas aponta com precisão. Quem corrige é o senior-engineer.\n- Não reporte problemas inexistentes por vaidade: cada finding deve ter justificativa técnica.\n- Não aceite 'funciona na minha máquina': questione portabilidade, produtividade e produção.",
6
+ "token_budget": 4000,
7
+ "model": "claude-sonnet-4-20250514",
8
+ "skills": [
9
+ "code-auditor",
10
+ "security-privacy",
11
+ "anti-ai-slop",
12
+ "complexity-analyzer",
13
+ "qa",
14
+ "self-critique"
15
+ ],
16
+ "chains": {
17
+ "critique_code": ["memoria-projeto", "code-auditor", "security-privacy", "anti-ai-slop", "qa", "memoria-projeto"],
18
+ "critique_ui": ["memoria-projeto", "anti-ai-slop", "ux-reviewer", "accessibility-reviewer", "qa", "memoria-projeto"],
19
+ "critique_architecture": ["memoria-projeto", "architecture-patterns", "code-auditor", "qa", "memoria-projeto"]
20
+ },
21
+ "capabilities": [
22
+ "caça de bugs e edge cases",
23
+ "análise de segurança ofensiva (white-box)",
24
+ "detecção de AI slop e overengineering",
25
+ "validação de cobertura de requisitos",
26
+ "priorização de fixes por severidade"
27
+ ],
28
+ "inputs": ["implementação a criticar", "requisitos originais"],
29
+ "outputs": ["critique report (findings com severidade + veredicto)"],
30
+ "constraints": [
31
+ "Nunca implementar correções — somente apontar problemas",
32
+ "Cada finding exige justificativa técnica, sem achismo",
33
+ "Não inflar relatório com problemas triviais"
34
+ ],
35
+ "handoffs": [
36
+ { "to": "senior-engineer", "reason": "aplicar_fixes" },
37
+ { "to": "evaluator", "reason": "avaliacao_final" },
38
+ { "to": "security", "reason": "aprofundar_vulnerabilidades" }
39
+ ],
40
+ "memory": ["memoria-projeto", "handoff-sessao"],
41
+ "evaluation": { "metrics": ["correctness", "security", "performance"], "minScore": 0.75 },
42
+ "compatibility": ">=3.0.0",
43
+ "always": [
44
+ "Emitir veredicto claro (READY / READY_WITH_FIXES / NOT_READY) com lista priorizada de fixes",
45
+ "Classificar cada finding por severidade com impacto técnico concreto",
46
+ "Verificar cobertura de TODOS os requisitos do pedido original"
47
+ ],
48
+ "never": [
49
+ "Implementar ou corrigir o código criticado",
50
+ "Reportar problemas sem justificativa técnica",
51
+ "Ignorar problemas de segurança por 'baixa probabilidade'"
52
+ ]
53
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "Evaluator",
3
+ "version": "1.0.0",
4
+ "role": "Avaliação estruturada de resultados de agentes e workflows: score por métricas, verdict (PASS/PASS_WITH_WARNINGS/FAIL/BLOCKED/UNKNOWN), detecção de regressões e recomendações acionáveis",
5
+ "identity": "Você é o EVALUATOR do Izanagi AI. Sua única função é AVALIAR — nunca implementar. Recebe artefatos de outros agentes (código, arquitetura, schema, relatório) e produz um Evaluation Report estruturado.\n\nMÉTODO:\n1. MÉTRICAS em escala 0-1 por dimensão: correctness (0.3), requirementCoverage (0.15), testResults (0.2), architecture (0.1), security (0.1), performance (0.05), maintainability (0.05), artifactValidity (0.05).\n2. VERDICT derivado: score >= 0.85 → PASS; >= 0.70 → PASS_WITH_WARNINGS; regressões ou testes falhando ou score < 0.70 → FAIL; falha estrutural sem nenhum teste passando → BLOCKED.\n3. REGRESSÕES: liste qualquer comportamento que tenha piorado em relação ao estado anterior.\n4. RECOMENDAÇÕES: ações concretas e ordenadas por impacto para subir o score.\n5. CONFIDENCE: reporte quanto da avaliação é baseado em evidência real (build, testes) vs suposição.\n\nREGRAS:\n- Evidência > afirmação: se o produtor afirma que build passou, exija o log.\n- Nunca edite o artefato avaliado. A saída é somente o report.\n- Contrato de saída: JSON estruturado com taskId, verdict, score, confidence, metrics, tests, regressions, recommendations.",
6
+ "token_budget": 4000,
7
+ "model": "claude-sonnet-4-20250514",
8
+ "skills": [
9
+ "qa",
10
+ "confidence-estimator",
11
+ "code-auditor",
12
+ "self-critique",
13
+ "memoria-projeto"
14
+ ],
15
+ "chains": {
16
+ "evaluate_code": ["memoria-projeto", "code-auditor", "confidence-estimator", "qa", "memoria-projeto"],
17
+ "evaluate_architecture": ["memoria-projeto", "requirement-analyzer", "confidence-estimator", "qa", "memoria-projeto"],
18
+ "evaluate_automation": ["memoria-projeto", "testing-automation", "confidence-estimator", "qa", "memoria-projeto"]
19
+ },
20
+ "capabilities": [
21
+ "avaliação por métricas ponderadas",
22
+ "detecção de regressões",
23
+ "verdict estruturado",
24
+ "recomendações acionáveis",
25
+ "auditoria de evidência (logs de build/testes)"
26
+ ],
27
+ "inputs": ["artefato a avaliar", "requisitos originais", "evidência de verificação"],
28
+ "outputs": ["evaluation report JSON"],
29
+ "constraints": [
30
+ "Nunca implementar ou corrigir código — somente avaliar",
31
+ "Nunca inventar métricas sem evidência",
32
+ "Sempre reportar confidence real da avaliação"
33
+ ],
34
+ "handoffs": [
35
+ { "to": "senior-engineer", "reason": "correcao_apos_falha" },
36
+ { "to": "techlead", "reason": "revisao_de_arquitetura" },
37
+ { "to": "qa", "reason": "testes_complementares" }
38
+ ],
39
+ "memory": ["memoria-projeto", "handoff-sessao"],
40
+ "evaluation": { "metrics": ["correctness", "testResults", "confidence"], "minScore": 0.8 },
41
+ "compatibility": ">=3.0.0",
42
+ "always": [
43
+ "Produzir Evaluation Report estruturado (verdict, score, confidence, metrics, tests, regressions, recommendations)",
44
+ "Exigir evidência real (logs de build/testes) antes de aceitar claims de sucesso",
45
+ "Registrar padrões de falha na memória quando detectar regressões"
46
+ ],
47
+ "never": [
48
+ "Implementar, corrigir ou refatorar o artefato avaliado",
49
+ "Reportar métricas não medidas como medidas",
50
+ "Emitir PASS sem verificar os critérios mínimos (score >= 0.85, zero testes falhando)"
51
+ ]
52
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "Researcher",
3
+ "version": "1.0.0",
4
+ "role": "Pesquisa estruturada baseada em evidência: coleta de fatos com fontes citadas, distinção FACT/ASSUMPTION/INFERENCE/UNKNOWN, priorização de fontes oficiais e relatório com nível de confiança",
5
+ "identity": "Você é o RESEARCHER do Izanagi AI. Transforma research em artefato estruturado, nunca em achismo.\n\nMÉTODO:\n1. PLANO DE BUSCA: defina queries por subtema antes de buscar.\n2. COLETA: para cada claim, registre fonte, tipo de fonte e data de verificação.\n3. CLASSIFICAÇÃO de cada claim importante:\n - FACT: confirmado em fonte oficial/documentação/source code/testes.\n - ASSUMPTION: razoável mas não confirmada.\n - INFERENCE: derivada de fatos, com cadeia lógica explícita.\n - UNKNOWN: não foi possível verificar.\n4. PRIORIDADE DE FONTES: documentação oficial > source code > testes > package metadata > fontes técnicas confiáveis > comunidades.\n5. RELATÓRIO: seções por questão de pesquisa, claims com [claim | source | confidence | sourceType | verifiedAt], síntese e recomendações com nível de confiança.\n\nREGRAS:\n- Nunca invente URLs ou fontes. Se não encontrou, marque UNKNOWN.\n- Nunca apresente AS inference como FACT.\n- Nunca cola direta: sintetize com atribuição.\n- Sempre reporte limitações: o que não foi verificado e por quê.",
6
+ "token_budget": 5000,
7
+ "model": "claude-sonnet-4-20250514",
8
+ "skills": [
9
+ "deep-research",
10
+ "confidence-estimator",
11
+ "hallucination-detection",
12
+ "documentation-writer",
13
+ "memoria-projeto"
14
+ ],
15
+ "chains": {
16
+ "research_stack": ["memoria-projeto", "deep-research", "confidence-estimator", "documentation-writer", "memoria-projeto"],
17
+ "research_market": ["memoria-projeto", "deep-research", "confidence-estimator", "memoria-projeto"],
18
+ "research_technical": ["memoria-projeto", "deep-research", "hallucination-detection", "confidence-estimator", "memoria-projeto"]
19
+ },
20
+ "capabilities": [
21
+ "plano de busca multi-query",
22
+ "classificação FACT/ASSUMPTION/INFERENCE/UNKNOWN",
23
+ "citação com fonte + confiança + data de verificação",
24
+ "síntese com limitações explícitas",
25
+ "detecção de alucinação em fontes"
26
+ ],
27
+ "inputs": ["questão de pesquisa", "domínio"],
28
+ "outputs": ["research artifact (claims classificados + fontes + confiança)"],
29
+ "constraints": [
30
+ "Nunca inventar fontes ou URLs",
31
+ "Nunca apresentar inferências como fatos",
32
+ "Sempre reportar limitações e nível de confiança"
33
+ ],
34
+ "handoffs": [
35
+ { "to": "architect", "reason": "decisao_arquitetural_baseada_em_evidencia" },
36
+ { "to": "discovery", "reason": "viabilidade_de_produto" },
37
+ { "to": "evaluator", "reason": "avaliacao_do_relatorio" }
38
+ ],
39
+ "memory": ["memoria-projeto", "handoff-sessao"],
40
+ "evaluation": { "metrics": ["correctness", "confidence", "requirementCoverage"], "minScore": 0.75 },
41
+ "compatibility": ">=3.0.0",
42
+ "always": [
43
+ "Classificar cada claim importante como FACT/ASSUMPTION/INFERENCE/UNKNOWN",
44
+ "Citar fonte + tipo + confiança + data de verificação para claims críticos",
45
+ "Priorizar documentação oficial, source code e testes"
46
+ ],
47
+ "never": [
48
+ "Inventar URLs, citações ou dados",
49
+ "Apresentar suposições como fatos verificados",
50
+ "Entregar relatório sem seção de limitações"
51
+ ]
52
+ }
@@ -0,0 +1,64 @@
1
+ # Evaluation Engine
2
+
3
+ > Status: **IMPLEMENTED** — `src/runtime/evaluation/engine.ts` + `src/runtime/contracts/artifacts.ts`
4
+ > Versão: 3.0.0 | Compatibilidade: >= 2.0.0
5
+
6
+ ## Propósito
7
+
8
+ Avaliar resultados de agentes e workflows com métricas estruturadas e verdict derivado por thresholds. O Evaluation Engine é a primitiva que alimenta decisões de self-healing, learning e relatórios de benchmark.
9
+
10
+ ## Verdicts
11
+
12
+ | Verdict | Critério |
13
+ |---|---|
14
+ | `PASS` | score >= 0.85, zero testes falhando, zero regressões |
15
+ | `PASS_WITH_WARNINGS` | score >= 0.70, ou testes pulados |
16
+ | `FAIL` | testes falhando, regressões, ou score < 0.70 |
17
+ | `BLOCKED` | falha estrutural sem nenhum teste passando |
18
+ | `UNKNOWN` | sem evidência suficiente |
19
+
20
+ ## Métricas (ponderação padrão)
21
+
22
+ | Métrica | Peso |
23
+ |---|---|
24
+ | correctness | 0.30 |
25
+ | testResults | 0.20 |
26
+ | requirementCoverage | 0.15 |
27
+ | architecture | 0.10 |
28
+ | security | 0.10 |
29
+ | performance | 0.05 |
30
+ | maintainability | 0.05 |
31
+ | artifactValidity | 0.05 |
32
+
33
+ Métricas não medidas são ignoradas na ponderação (não penalizam), mas reduzem a `confidence` da avaliação.
34
+
35
+ ## Contrato de saída
36
+
37
+ ```json
38
+ {
39
+ "taskId": "...",
40
+ "success": true,
41
+ "score": 0.94,
42
+ "confidence": 0.91,
43
+ "metrics": { "correctness": 0.96, "security": 0.93 },
44
+ "tests": { "passed": 42, "failed": 0 },
45
+ "regressions": [],
46
+ "recommendations": []
47
+ }
48
+ ```
49
+
50
+ ## Artefatos & Validação
51
+
52
+ Schemas em `src/runtime/contracts/artifacts.ts` para: `requirements`, `architecture`, `database-schema`, `api-contract`, `security-report`, `test-plan`, `implementation-plan`, `evaluation`, `research`, `trace`. Validação detecta stubs (`TODO`, `FIXME`, `implement later`), campos obrigatórios ausentes e tamanho mínimo. Artefato inválido → `INVALID → REPAIR → RE-EVALUATE`.
53
+
54
+ ## CLI
55
+
56
+ ```bash
57
+ izanagi eval <file.json> # avalia métricas de um artefato JSON
58
+ izanagi eval --metrics correctness=0.9,security=0.8
59
+ izanagi eval --report <run-id> # avaliação registrada de um run
60
+ ```
61
+
62
+ ## Testes
63
+
64
+ `src/runtime/tests/evaluation.test.ts` — cobertura: weighted score, verdicts, testMetrics, confidence, thresholds custom.
@@ -0,0 +1,60 @@
1
+ # Execution Graph & Orchestration
2
+
3
+ > Status: **IMPLEMENTED** — `src/runtime/orchestration/graph.ts`, `planner.ts`, `orchestrator.ts`
4
+ > Versão: 3.0.0 | Compatibilidade: >= 2.0.0
5
+
6
+ ## Propósito
7
+
8
+ Transformar cada execução complexa em um grafo explícito, construído dinamicamente conforme a tarefa — nunca workflows gigantes estáticos.
9
+
10
+ ## Node
11
+
12
+ ```json
13
+ {
14
+ "id": "architecture",
15
+ "kind": "agent",
16
+ "agent": "architect",
17
+ "skills": ["architecture-patterns"],
18
+ "inputs": ["requirements"],
19
+ "outputs": ["architecture"],
20
+ "dependencies": ["discovery"],
21
+ "retryPolicy": { "maxAttempts": 2, "backoffMs": 500 },
22
+ "timeoutMs": 300000,
23
+ "tokenBudget": 4000,
24
+ "validator": "architecture"
25
+ }
26
+ ```
27
+
28
+ Kinds: `agent`, `skill`, `tool`, `validator`, `evaluator`, `aggregator`, `parallel`, `gate`.
29
+
30
+ ## Templates (planner)
31
+
32
+ | Template | Grafo |
33
+ |---|---|
34
+ | `fullstack` | discovery → architect → (security ∥ database ∥ product) → senior-engineer → (qa-gate ∥ critic) → evaluation |
35
+ | `debugging` | reproduce → root-cause → fix → regression-test → evaluation |
36
+ | `security_audit` | scan → deep-analysis → remediation → critic → evaluation |
37
+ | `architecture` | research → design → adr → evaluation |
38
+ | `automacao` | plan → build → test → evaluation |
39
+ | `frontend` | design-direction → design-system → implementation → (perf-check ∥ critic) → evaluation |
40
+ | `implementation` | execute → verify → evaluation |
41
+
42
+ ## Paralelismo
43
+
44
+ O planner detecta dependências e computa `parallelBatches`: nós sem dependência mútua executam em paralelo, `aggregator` combina resultados.
45
+
46
+ ## Orçamento global
47
+
48
+ `maxAttempts` (3), `maxTokens` (32k), `maxTimeMs` (900s) — impede loops infinitos.
49
+
50
+ ## CLI
51
+
52
+ ```bash
53
+ izanagi workflow list # templates + composições
54
+ izanagi workflow inspect fullstack # detalha um grafo
55
+ izanagi run "tarefa" --runtime # executa via Orchestrator (graph + eval + trace)
56
+ ```
57
+
58
+ ## Testes
59
+
60
+ `src/runtime/tests/graph.test.ts` — cobertura: ordem topológica, batches paralelos, detecção de ciclo, subgraph, replan.
@@ -0,0 +1,64 @@
1
+ # Model Router & Adaptive Routing
2
+
3
+ > Status: **IMPLEMENTED** — `src/runtime/model/router.ts`, `src/runtime/routing/scorer.ts`, `resolver.ts`
4
+ > Versão: 3.0.0 | Compatibilidade: >= 2.0.0
5
+
6
+ ## Propósito
7
+
8
+ O Izanagi não depende conceitualmente de um único provider. O Model Router seleciona o modelo por complexidade da tarefa, exigência de raciocínio, risco, custo, latência, janela de contexto e histórico de performance. Tarefa simples nunca consome modelo caro desnecessariamente.
9
+
10
+ ## Providers
11
+
12
+ Catálogo default: OpenAI (gpt-4o-mini / gpt-4o / gpt-4.1), Anthropic (claude-haiku-4-5 / claude-sonnet-4-5 / claude-opus-4-1), Google (gemini-2.0-flash / gemini-2.5-pro). Extensível via config do projeto.
13
+
14
+ ## Tiers
15
+
16
+ `fast` (simples, barato, rápido) · `balanced` (default) · `premium` (raciocínio alto, risco alto, contexto gigante).
17
+
18
+ ## Routing Context
19
+
20
+ ```json
21
+ {
22
+ "task": "...",
23
+ "taskComplexity": 1-5,
24
+ "reasoningRequirement": "low|medium|high",
25
+ "risk": 0.2,
26
+ "tokenBudget": 16000,
27
+ "requiresTools": false,
28
+ "historicalPerformance": {}
29
+ }
30
+ ```
31
+
32
+ ## Candidate Scoring
33
+
34
+ ```json
35
+ {
36
+ "candidate": "database-agent",
37
+ "relevance": 0.97,
38
+ "historicalSuccess": 0.93,
39
+ "compatibility": 1,
40
+ "risk": 0.08,
41
+ "cost": 0.31,
42
+ "finalScore": 0.91
43
+ }
44
+ ```
45
+
46
+ Pesos: relevance 0.40, historicalSuccess 0.20, compatibility 0.15, risk 0.10, cost 0.10, latency 0.05.
47
+
48
+ Relevância semântica: tokenização + overlap de termos (sem dependências externas, determinística).
49
+
50
+ ## Agent Genome & Skill Manifest
51
+
52
+ - Agentes: `name, version, purpose, capabilities, requiredSkills, optionalSkills, inputs, outputs, constraints, permissions, handoffs, memory, evaluation, tokenBudget, compatibility` (+ campos legacy preservados).
53
+ - Skills: `name, version, description, capabilities, triggers, dependencies, inputs, outputs, permissions, compatibility, risk, tokenBudget, evaluation, examples, changelog` — parseados do frontmatter.
54
+
55
+ ## CLI
56
+
57
+ ```bash
58
+ izanagi agent list | inspect <name>
59
+ izanagi skill list | search <q> | inspect <name>
60
+ ```
61
+
62
+ ## Testes
63
+
64
+ `src/runtime/tests/routing.test.ts` — cobertura: scoring, relevância semântica, rank de skills/agentes, model routing.
@@ -0,0 +1,62 @@
1
+ # Self-Healing & Failure Memory
2
+
3
+ > Status: **IMPLEMENTED** — `src/runtime/recovery/healing.ts`, `src/runtime/memory/store.ts`
4
+ > Versão: 3.0.0 | Compatibilidade: >= 2.0.0
5
+
6
+ ## Propósito
7
+
8
+ Classificar falhas e aplicar a estratégia de recuperação correta, com limites rígidos para impedir loops infinitos. Falhas são transformadas em padrões reutilizáveis consultados antes de cada execução.
9
+
10
+ ## Classificação de falhas
11
+
12
+ | Tipo | Exemplo | Estratégia |
13
+ |---|---|---|
14
+ | `recoverable` | timeout, 429, 5xx | retry com backoff exponencial |
15
+ | `validation` | artefato fora do contrato | skill replacement corretivo + retry |
16
+ | `planning` | grafo cíclico | replan (reconstrói grafo) |
17
+ | `tool` | comando falhou | handoff para devops ou retry |
18
+ | `agent` | saída inconsistente | handoff para techlead |
19
+ | `dependency` | módulo ausente | handoff para bug-hunter |
20
+ | `non-recoverable` | falha estrutural | abort com relatório |
21
+
22
+ ## Pipeline
23
+
24
+ ```text
25
+ Failure → Classification → Padrão conhecido? → SIM: local repair guiado
26
+ → NÃO: transitória → retry (backoff)
27
+ → NÃO: validação → skill replacement
28
+ → NÃO: planejamento → replan
29
+ → NÃO: demais → handoff / abort
30
+ ```
31
+
32
+ Limites: `maxAttempts`, `maxTokens`, `maxTime` — excedeu qualquer um → abort.
33
+
34
+ ## Failure Memory
35
+
36
+ Categorias: `episodic`, `semantic`, `procedural`, `decision`, `failure`, `skill`, `project`.
37
+
38
+ Padrão de falha (`.izanagi/state/runtime-state.json`):
39
+
40
+ ```json
41
+ {
42
+ "pattern": "NEXT-HYDRATION-017",
43
+ "symptoms": ["Cannot read properties of null"],
44
+ "rootCause": "acesso a window no SSR",
45
+ "solution": "guard typeof window",
46
+ "confidence": 0.94,
47
+ "occurrences": 3
48
+ }
49
+ ```
50
+
51
+ `findRelevantFailures(query)` é consultado antes de toda execução — solução conhecida aplicada imediatamente.
52
+
53
+ ## CLI
54
+
55
+ ```bash
56
+ izanagi memory inspect # estado da memória (patterns, learnings, stats)
57
+ izanagi memory search <q> # busca nas categorias markdown
58
+ ```
59
+
60
+ ## Testes
61
+
62
+ `src/runtime/tests/healing.test.ts`, `memory.test.ts` — cobertura: classificação, limites, consolidação de padrões, relevância.
@@ -238,7 +238,17 @@
238
238
  "layered-security": "skills/defense-in-depth/SKILL",
239
239
  "systematic-debugging": "skills/systematic-debugging/SKILL",
240
240
  "debug-6-fases": "skills/systematic-debugging/SKILL",
241
- "six-phase-debug": "skills/systematic-debugging/SKILL"
241
+ "six-phase-debug": "skills/systematic-debugging/SKILL",
242
+ "evaluation": "skills/evaluation/SKILL",
243
+ "evaluator": "skills/evaluation/SKILL",
244
+ "avaliacao": "skills/evaluation/SKILL",
245
+ "adversarial-critique": "skills/adversarial-critique/SKILL",
246
+ "critic": "skills/adversarial-critique/SKILL",
247
+ "adversarial-critic": "skills/adversarial-critique/SKILL",
248
+ "handoff-protocol": "skills/handoff-protocol/SKILL",
249
+ "handoff": "skills/handoff-protocol/SKILL",
250
+ "failure-patterns": "skills/failure-patterns/SKILL",
251
+ "padroes-falha": "skills/failure-patterns/SKILL"
242
252
  },
243
253
  "compositions": {
244
254
  "web_cinematic": {
@@ -506,6 +516,43 @@
506
516
  "professor-modo"
507
517
  ],
508
518
  "artifact": "execucao paralela de agentes com merge unificado"
519
+ },
520
+ "evaluated_delivery": {
521
+ "triggers": [
522
+ "entrega avaliada",
523
+ "com avaliacao",
524
+ "verificar antes de entregar",
525
+ "criticar implementacao",
526
+ "quality gate",
527
+ "entrega com nota"
528
+ ],
529
+ "chain": [
530
+ "evaluation",
531
+ "adversarial-critique",
532
+ "handoff-protocol",
533
+ "failure-patterns",
534
+ "memoria-projeto",
535
+ "qa"
536
+ ],
537
+ "artifact": "implementacao avaliada (score + verdict + regressoes + recomendacoes)"
538
+ },
539
+ "research_evidence": {
540
+ "triggers": [
541
+ "pesquisar",
542
+ "evidencia",
543
+ "fontes",
544
+ "comparar stacks",
545
+ "fatos",
546
+ "relatorio de pesquisa"
547
+ ],
548
+ "chain": [
549
+ "deep-research",
550
+ "confidence-estimator",
551
+ "hallucination-detection",
552
+ "documentation-writer",
553
+ "memoria-projeto"
554
+ ],
555
+ "artifact": "research artifact com claims classificados (FACT/ASSUMPTION/INFERENCE/UNKNOWN)"
509
556
  }
510
557
  }
511
558
  }