izanagi-ai 2.0.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 (195) hide show
  1. package/AGENTS.md +53 -0
  2. package/CHANGELOG.md +198 -0
  3. package/LICENSE +21 -0
  4. package/README.md +96 -0
  5. package/ROADMAP.md +131 -0
  6. package/RULES.md +202 -0
  7. package/SYSTEM.md +201 -0
  8. package/agents/INDEX.md +40 -0
  9. package/agents/architect-agent.json +15 -0
  10. package/agents/bug-hunter-agent.json +14 -0
  11. package/agents/database-agent.json +14 -0
  12. package/agents/devops-agent.json +15 -0
  13. package/agents/docs-agent.json +15 -0
  14. package/agents/pm-agent.json +14 -0
  15. package/agents/professor-agent.json +15 -0
  16. package/agents/security-agent.json +14 -0
  17. package/agents/senior-engineer-agent.json +16 -0
  18. package/agents/techlead-agent.json +15 -0
  19. package/architecture/clean-architecture.md +98 -0
  20. package/architecture/cqrs-specialist.md +102 -0
  21. package/architecture/ddd-specialist.md +97 -0
  22. package/architecture/event-driven-architect.md +79 -0
  23. package/architecture/hexagonal-architecture.md +96 -0
  24. package/architecture/microservices-expert.md +83 -0
  25. package/architecture/monolith-expert.md +67 -0
  26. package/architecture/repository-pattern.md +73 -0
  27. package/architecture/unit-of-work.md +92 -0
  28. package/backend/README.md +29 -0
  29. package/bin/nexus.js +8 -0
  30. package/core/compression-engine.md +194 -0
  31. package/core/context-engine.md +239 -0
  32. package/core/decision-engine.md +377 -0
  33. package/core/evolution-engine.md +169 -0
  34. package/core/planning-engine.md +201 -0
  35. package/core/quality-gates.md +233 -0
  36. package/core/reflection-engine.md +182 -0
  37. package/core/skill-resolver.json +169 -0
  38. package/core/token-manager.md +152 -0
  39. package/database/database-engineer.md +244 -0
  40. package/database/mysql-specialist.md +61 -0
  41. package/database/postgresql-specialist.md +70 -0
  42. package/database/redis-specialist.md +73 -0
  43. package/database/sql-optimizer.md +95 -0
  44. package/database/sqlserver-specialist.md +69 -0
  45. package/devops/ci-cd-specialist.md +101 -0
  46. package/devops/devops-engineer.md +358 -0
  47. package/devops/docker-expert.md +105 -0
  48. package/devops/git-expert.md +76 -0
  49. package/devops/git-flow-specialist.md +71 -0
  50. package/devops/kubernetes-specialist.md +84 -0
  51. package/devops/linux-specialist.md +82 -0
  52. package/devops/windows-specialist.md +43 -0
  53. package/dist/cli/commands/compile.d.ts +2 -0
  54. package/dist/cli/commands/compile.d.ts.map +1 -0
  55. package/dist/cli/commands/compile.js +44 -0
  56. package/dist/cli/commands/compile.js.map +1 -0
  57. package/dist/cli/commands/doctor.d.ts +2 -0
  58. package/dist/cli/commands/doctor.d.ts.map +1 -0
  59. package/dist/cli/commands/doctor.js +88 -0
  60. package/dist/cli/commands/doctor.js.map +1 -0
  61. package/dist/cli/commands/init.d.ts +2 -0
  62. package/dist/cli/commands/init.d.ts.map +1 -0
  63. package/dist/cli/commands/init.js +26 -0
  64. package/dist/cli/commands/init.js.map +1 -0
  65. package/dist/cli/commands/list.d.ts +2 -0
  66. package/dist/cli/commands/list.d.ts.map +1 -0
  67. package/dist/cli/commands/list.js +50 -0
  68. package/dist/cli/commands/list.js.map +1 -0
  69. package/dist/cli/commands/run.d.ts +2 -0
  70. package/dist/cli/commands/run.d.ts.map +1 -0
  71. package/dist/cli/commands/run.js +49 -0
  72. package/dist/cli/commands/run.js.map +1 -0
  73. package/dist/cli/index.d.ts +2 -0
  74. package/dist/cli/index.d.ts.map +1 -0
  75. package/dist/cli/index.js +72 -0
  76. package/dist/cli/index.js.map +1 -0
  77. package/dist/index.d.ts +3 -0
  78. package/dist/index.d.ts.map +1 -0
  79. package/dist/index.js +3 -0
  80. package/dist/index.js.map +1 -0
  81. package/dist/installer.d.ts +5 -0
  82. package/dist/installer.d.ts.map +1 -0
  83. package/dist/installer.js +86 -0
  84. package/dist/installer.js.map +1 -0
  85. package/dist/postinstall.d.ts +2 -0
  86. package/dist/postinstall.d.ts.map +1 -0
  87. package/dist/postinstall.js +8 -0
  88. package/dist/postinstall.js.map +1 -0
  89. package/frontend/README.md +19 -0
  90. package/memory/context-recovery.md +49 -0
  91. package/memory/conversation-summarizer.md +65 -0
  92. package/memory/long-term-project-memory.md +58 -0
  93. package/memory/memory-manager.md +299 -0
  94. package/memory/session-compression.md +182 -0
  95. package/memory/smart-recall.md +37 -0
  96. package/optimization/compact-example.md +87 -0
  97. package/optimization/cost-optimizer.md +53 -0
  98. package/optimization/prompt-optimizer.md +194 -0
  99. package/optimization/token-audit.md +177 -0
  100. package/optimization/token-reducer.md +202 -0
  101. package/package.json +67 -0
  102. package/security/owasp-auditor.md +249 -0
  103. package/security/pentest-reviewer.md +109 -0
  104. package/security/security-engineer.md +238 -0
  105. package/skills/INDEX.md +434 -0
  106. package/skills/accessibility-reviewer.md +63 -0
  107. package/skills/agentic-coding.md +56 -0
  108. package/skills/ai-agent/SKILL.md +107 -0
  109. package/skills/ai-agent-dev/SKILL.md +117 -0
  110. package/skills/alternative-solution-generator.md +72 -0
  111. package/skills/architecture-patterns/SKILL.md +113 -0
  112. package/skills/breaking-change-detector.md +84 -0
  113. package/skills/bug-hunter.md +234 -0
  114. package/skills/bug-prevention.md +75 -0
  115. package/skills/chaos-engineering/SKILL.md +108 -0
  116. package/skills/clean-code-validator.md +218 -0
  117. package/skills/cloud-architect/SKILL.md +78 -0
  118. package/skills/cloud-infra/SKILL.md +99 -0
  119. package/skills/code-auditor.md +24 -0
  120. package/skills/complexity-analyzer.md +102 -0
  121. package/skills/confidence-estimator.md +53 -0
  122. package/skills/continuous-improvement.md +46 -0
  123. package/skills/continuous-learning-engine.md +51 -0
  124. package/skills/cto-advisor.md +66 -0
  125. package/skills/data-engineer/SKILL.md +76 -0
  126. package/skills/data-engineering/SKILL.md +82 -0
  127. package/skills/debug-specialist.md +215 -0
  128. package/skills/dependency-analyzer.md +78 -0
  129. package/skills/design-pattern-advisor.md +78 -0
  130. package/skills/documentation-writer.md +66 -0
  131. package/skills/dry-kiss-yagni-validator.md +114 -0
  132. package/skills/economia-tokens/SKILL.md +40 -0
  133. package/skills/er-diagram-builder.md +85 -0
  134. package/skills/feature-flags/SKILL.md +95 -0
  135. package/skills/frontend/SKILL.md +327 -0
  136. package/skills/frontend-dev/SKILL.md +178 -0
  137. package/skills/graphql/SKILL.md +104 -0
  138. package/skills/hallucination-detection.md +49 -0
  139. package/skills/handoff-sessao/SKILL.md +32 -0
  140. package/skills/i18n-l10n/SKILL.md +103 -0
  141. package/skills/iac-terraform/SKILL.md +98 -0
  142. package/skills/legacy-migration/SKILL.md +91 -0
  143. package/skills/logging-expert.md +78 -0
  144. package/skills/mcp-server-dev.md +33 -0
  145. package/skills/memoria-projeto/SKILL.md +49 -0
  146. package/skills/mobile-dev/SKILL.md +82 -0
  147. package/skills/mobile-engineer/SKILL.md +74 -0
  148. package/skills/monitoring-specialist.md +59 -0
  149. package/skills/observability-expert.md +60 -0
  150. package/skills/performance-optimizer.md +239 -0
  151. package/skills/principal-engineer.md +55 -0
  152. package/skills/privacy-engineer/SKILL.md +79 -0
  153. package/skills/professor-modo/SKILL.md +33 -0
  154. package/skills/project-manager.md +74 -0
  155. package/skills/prompt-engineering.md +27 -0
  156. package/skills/qa/SKILL.md +231 -0
  157. package/skills/qa-engineer/SKILL.md +222 -0
  158. package/skills/readme-generator.md +42 -0
  159. package/skills/refactoring-specialist.md +250 -0
  160. package/skills/release-planner.md +70 -0
  161. package/skills/requirement-analyzer.md +65 -0
  162. package/skills/risk-analyzer.md +73 -0
  163. package/skills/root-cause-analyzer.md +210 -0
  164. package/skills/scalability-expert.md +73 -0
  165. package/skills/security-privacy/SKILL.md +98 -0
  166. package/skills/self-correction.md +54 -0
  167. package/skills/self-critique.md +42 -0
  168. package/skills/senior-code-reviewer.md +193 -0
  169. package/skills/sequence-diagram-builder.md +56 -0
  170. package/skills/serverless-edge/SKILL.md +103 -0
  171. package/skills/software-architect.md +356 -0
  172. package/skills/solid-validator.md +332 -0
  173. package/skills/sre-reliability/SKILL.md +115 -0
  174. package/skills/staff-engineer.md +61 -0
  175. package/skills/task-planner.md +61 -0
  176. package/skills/tech-lead.md +59 -0
  177. package/skills/technical-debt-analyzer.md +81 -0
  178. package/skills/technical-writer.md +39 -0
  179. package/skills/tradeoff-analyzer.md +79 -0
  180. package/skills/uml-generator.md +72 -0
  181. package/skills/ux-reviewer.md +61 -0
  182. package/skills/wasm/SKILL.md +133 -0
  183. package/skills/web-perf-engineer/SKILL.md +75 -0
  184. package/skills/web-perf-seo/SKILL.md +111 -0
  185. package/skills/websocket-realtime/SKILL.md +107 -0
  186. package/teaching/adaptive-teaching.md +37 -0
  187. package/teaching/code-explainer.md +172 -0
  188. package/teaching/interactive-teaching.md +41 -0
  189. package/teaching/learning-tracker.md +63 -0
  190. package/teaching/mentor-mode.md +200 -0
  191. package/teaching/professor-mode.md +222 -0
  192. package/testing/e2e-test-engineer.md +68 -0
  193. package/testing/integration-test-engineer.md +74 -0
  194. package/testing/mocking-specialist.md +78 -0
  195. package/testing/unit-test-engineer.md +209 -0
package/AGENTS.md ADDED
@@ -0,0 +1,53 @@
1
+ # AGENTS.md β€” NexusAI
2
+
3
+ NexusAI Γ© um **framework meta** (instruΓ§Γ΅es para agentes de IA), nΓ£o um projeto executΓ‘vel. O repositΓ³rio inteiro Γ© markdown + JSON β€” sem npm, sem build, sem testes, sem CI.
4
+
5
+ ## Arquitetura
6
+
7
+ - `SYSTEM.md` β€” FundaΓ§Γ£o: identidade, princΓ­pios, arquitetura em camadas (Decision β†’ Context β†’ Skill β†’ Quality β†’ Reflection β†’ Memory)
8
+ - `RULES.md` β€” 9 regras operacionais + formato de declaraΓ§Γ£o de skills + regras de comunicaΓ§Γ£o
9
+ - `core/` β€” 8 engines (decision-engine, context-engine, token-manager, compression-engine, reflection-engine, evolution-engine, quality-gates, planning-engine)
10
+ - `agents/` β€” 10 agentes prΓ©-definidos como JSONs que compΓ΅em skills
11
+ - `skills/INDEX.md` β€” Registro central de todas as 111 skills. **Qualquer skill nova deve ser registrada aqui**
12
+ - `core/skill-resolver.json` β€” Mapeia short IDs para paths de skills. **Qualquer skill nova deve ter alias aqui** para ser usada por agentes
13
+
14
+ ## Regras-chave
15
+
16
+ - **Toda skill precisa de entrada em dois lugares**: `skills/INDEX.md` + `core/skill-resolver.json`
17
+ - **Formato de skill**: YAML header (name, version, priority, dependencies, triggers, token_budget, compatibility) + seΓ§Γ΅es (Identity β†’ Goals β†’ Workflow β†’ Decision Tree β†’ Rules β†’ Checklists β†’ Metrics β†’ Evolution)
18
+ - **Agentes**: JSON com `skills` (array de short IDs), `chains` (mapa de tipo de task β†’ chain de skills), `always`/`never`
19
+ - **Task routing**: `RULES.md:86-106` β€” 6 classificaΓ§Γ΅es (new_project, bug, refactor, review, question, security_audit) + fallback genΓ©rico
20
+ - **Output format** obrigatΓ³rio (RULES.md seΓ§Γ£o 2.1): `## Context` β†’ `## File` (com path) β†’ `## Notes`
21
+ - **Token budgets** (SYSTEM.md:115-120): 2048 soft / 4096 hard por resposta, 8192 contexto, compressΓ£o automΓ‘tica >70%
22
+ - **Quality Gates** (SYSTEM.md:129-135): Security β†’ Style β†’ Clarity β†’ Conciseness β†’ Completeness (nesta ordem)
23
+ - **5 proibiΓ§Γ΅es** (RULES.md:49-53): nΓ£o adivinhar APIs, nΓ£o codificar sem entender o codebase, nΓ£o repetir contexto, nΓ£o ignorar convenΓ§Γ΅es, nΓ£o hardcodear secrets
24
+
25
+ ## Estrutura de diretΓ³rios
26
+
27
+ | DiretΓ³rio | ConteΓΊdo |
28
+ |-----------|----------|
29
+ | `core/` | Engines do sistema (8 skills) |
30
+ | `architecture/` | PadrΓ΅es arquiteturais (Clean Arch, Hexagonal, DDD, CQRS, etc.) |
31
+ | `coding/` | Skills de engenharia (backend, frontend, React, Laravel, etc.) |
32
+ | `skills/` | 77+ skills especializadas (quality, debugging, cloud, devops, etc.) |
33
+ | `agents/` | DefiniΓ§Γ΅es de agentes como JSON |
34
+ | `memory/` | Gerenciamento de memΓ³ria (6 skills) |
35
+ | `teaching/` | Modo professor e ensino adaptativo |
36
+ | `testing/` | Testes unitΓ‘rios, integraΓ§Γ£o, E2E, mocking |
37
+ | `security/` | OWASP, pentest, seguranΓ§a |
38
+ | `database/` | SQL, PostgreSQL, MySQL, Redis |
39
+ | `devops/` | Docker, K8s, CI/CD, Linux |
40
+ | `optimization/` | ReduΓ§Γ£o de tokens, otimizaΓ§Γ£o de prompt, custo |
41
+
42
+ ## ConvenΓ§Γ΅es
43
+
44
+ - **VersΓ£o atual**: v2.0.0 (SemVer). CHANGELOG.md e ROADMAP.md mostram o plano atΓ© v3.0.0
45
+ - **Idioma**: maior parte em portuguΓͺs (descriΓ§Γ΅es de agentes, READMEs); conteΓΊdo tΓ©cnico em inglΓͺs
46
+ - **Filosofia**: "Architecture first. Code second." β€” nunca pular planejamento
47
+ - O framework Γ© **carregado** via `load NexusAI/SYSTEM.md`, nΓ£o via runtime
48
+
49
+ ## Design Preference (Default)
50
+
51
+ - **Estilo visual**: Futurista Apple-like β€” fundo escuro, glassmorphism, gradientes suaves, partΓ­culas animadas, 3D tilt em cards, tipografia bold, animaΓ§Γ΅es sutis, sem excesso de "cara de IA"
52
+ - **Stack**: a stack (React, Vue, HTML/CSS/JS, etc.) Γ© definida pelo contexto do projeto ou pelo que o usuΓ‘rio pedir β€” o estilo visual se adapta Γ  stack, nΓ£o o contrΓ‘rio
53
+ - **Exceptions**: quando o usuΓ‘rio pedir um estilo especΓ­fico, seguir a solicitaΓ§Γ£o
package/CHANGELOG.md ADDED
@@ -0,0 +1,198 @@
1
+ # Changelog
2
+
3
+ > All notable changes to the Nexus AI framework.
4
+
5
+ ---
6
+
7
+ ## [2.0.0] β€” 2026-07-22
8
+
9
+ ### Changed
10
+ - Version bump to v2.0.0 (all Phases 1-6 implemented)
11
+ - Cleansed project-specific references for public release
12
+ - Fixed all broken paths in decision-engine skill chain matrix
13
+ - Registered 31 orphan skills in INDEX.md and skill-resolver.json
14
+ - Corrected count mismatches across INDEX.md, CHANGELOG.md, ROADMAP.md
15
+ - Updated ROADMAP.md to reflect actual implementation state
16
+
17
+ ## [1.0.0] β€” 2026-07-17
18
+
19
+ ### Added
20
+
21
+ #### Core
22
+ - `SYSTEM.md` β€” Foundation: identity, principles, architecture, token budget, quality gates, memory, evolution.
23
+ - `RULES.md` β€” 9 golden rules, skill declaration, communication, memory, quality, security, error recovery.
24
+ - `README.md` β€” Entry point, quick start, principles table.
25
+ - `decision-engine.md` β€” 15 category classification, skill chain matrix, keyword routing, 70% confidence threshold.
26
+ - `context-engine.md` β€” 4-section context window, load prioritization, compression algorithm, relevance scoring.
27
+ - `token-manager.md` β€” 4-tier budget, priority-based allocation, real-time monitor, compression triggers.
28
+ - `compression-engine.md` β€” 4 compression levels (lossless β†’ emergency), 5 strategies, decision preservation.
29
+ - `reflection-engine.md` β€” Post-task self-review, 5-dimension scoring, pattern detection (50-task rolling window).
30
+ - `evolution-engine.md` β€” 6 pattern β†’ action mappings, 4 change types, auto-apply rules, full traceability.
31
+ - `quality-gates.md` β€” 5 gates (security, style, clarity, conciseness, completeness), security is fatal.
32
+ - `planning-engine.md` β€” Atomic step decomposition, topological sort, effort estimation, circular dependency detection.
33
+
34
+ #### Memory (6)
35
+ - `memory-manager.md` β€” 3-tier (session/project/long-term), JSON storage, knowledge graph, recall engine.
36
+ - `session-compression.md` β€” 200-token session summary, decision/error/action preservation.
37
+ - `conversation-summarizer.md` β€” 68:1 compression, extraction priority, YAML summary format.
38
+ - `context-recovery.md` β€” Session recovery flow, recovery prompt template.
39
+ - `smart-recall.md` β€” Relevance scoring (keyword 0.4 + recency 0.3 + relation 0.3).
40
+ - `long-term-project-memory.md` β€” Persistent project context across sessions.
41
+
42
+ #### Optimization (3)
43
+ - `token-reducer.md` β€” 6 reduction techniques, format selection matrix (8 types).
44
+ - `prompt-optimizer.md` β€” 4 optimization passes (noise, implicit, ambiguity, structure).
45
+ - `cost-optimizer.md` β€” Token cost tracking, infrastructure optimization strategies.
46
+
47
+ #### Architecture (10)
48
+ - `clean-architecture.md` β€” Layers, directory structure, dependency rule.
49
+ - `hexagonal-architecture.md` β€” Ports & Adapters, testability, infrastructure swap.
50
+ - `cqrs-specialist.md` β€” Read/write separation, when to use/avoid.
51
+ - `event-driven-architect.md` β€” Events, brokers (RabbitMQ/Kafka/Redis), idempotency.
52
+ - `ddd-specialist.md` β€” Building blocks, ubiquitous language, aggregate example.
53
+ - `microservices-expert.md` β€” When to use/avoid, key patterns, service template.
54
+ - `monolith-expert.md` β€” Modular monolith, migration path to microservices.
55
+ - `repository-pattern.md` β€” Interface contract, implementation, rules.
56
+ - `unit-of-work.md` β€” Transactional consistency, commit/rollback, clear.
57
+
58
+ #### Coding (13)
59
+ - `backend-engineer.md` β€” Multi-language (PHP, Node, Python, C#), conventions, checklist.
60
+ - `frontend-engineer.md` β€” React + TS + Tailwind, state management (5 states), a11y, performance.
61
+ - `api-designer.md` β€” REST conventions, response envelope, auth decision tree, rate limiting, OpenAPI.
62
+ - `laravel-specialist.md` β€” Eloquent, Form Requests, Policies, conventions, patterns.
63
+ - `php-specialist.md` β€” PHP 8.x features, PSR-12, PHPStan level max config.
64
+ - `javascript-specialist.md` β€” ES2022+, functional patterns, checklist.
65
+ - `typescript-specialist.md` β€” Strict mode, discriminated unions, branded types, tsconfig.
66
+ - `python-specialist.md` β€” Python 3.11+, typing, dataclasses, async.
67
+ - `react-specialist.md` β€” Hooks, RSC, compound components, performance checklist.
68
+ - `vue-specialist.md` β€” Composition API, Pinia, TypeScript, conventions.
69
+ - `nodejs-specialist.md` β€” Express/Fastify, error handling, services, checklist.
70
+ - `java-specialist.md` β€” Java 17+, Spring Boot 3, records, virtual threads.
71
+ - `csharp-specialist.md` β€” .NET 8, Minimal APIs, primary constructors, records.
72
+
73
+ #### Security (3)
74
+ - `security-engineer.md` β€” OWASP Top 10, secrets detection (7 regex), security report.
75
+ - `owasp-auditor.md` β€” Full OWASP Top 10 audit, CVSS severity, CVE references.
76
+ - `pentest-reviewer.md` β€” 5 attack categories (IDOR, priv esc, mass assignment, SSRF), report format.
77
+
78
+ #### Quality (12)
79
+ - `senior-code-reviewer.md` β€” 6-dimension scoring, 4 severity levels, YAML report.
80
+ - `clean-code-validator.md` β€” 6 validation categories, function size heuristic, before/after examples.
81
+ - `solid-validator.md` β€” 5 principles with checklists, score, refactoring recommendations.
82
+ - `dry-kiss-yagni-validator.md` β€” 3 principles with checks and examples.
83
+ - `complexity-analyzer.md` β€” Cyclomatic complexity (McCabe), cognitive complexity, thresholds.
84
+ - `bug-prevention.md` β€” 4 prevention layers, 8 bug patterns with detection and prevention.
85
+ - `design-pattern-advisor.md` β€” Decision tree, pattern suggestions, anti-patterns.
86
+ - `refactoring-specialist.md` β€” 12 code smells, 3 techniques, safety checklist, plan template.
87
+ - `technical-debt-analyzer.md` β€” 6 debt categories, estimation formula, prioritized backlog.
88
+ - `breaking-change-detector.md` β€” API and database breaking changes, detection flow.
89
+ - `performance-optimizer.md` β€” Audit workflow, bottleneck types, caching strategy (4 levels).
90
+ - `scalability-expert.md` β€” 4 scaling dimensions, horizontal scaling checklist, sharding.
91
+
92
+ #### Testing (4)
93
+ - `unit-test-engineer.md` β€” Pest/Jest/pytest/xUnit, Arrange-Act-Assert, edge case checklist, naming convention.
94
+ - `integration-test-engineer.md` β€” Scope, Laravel/Pest example, database testing.
95
+ - `e2e-test-engineer.md` β€” Cypress/Playwright, critical journeys, example.
96
+ - `mocking-specialist.md` β€” 5 double types, frameworks (Mockery, Jest, Mockito, Moq), rules.
97
+
98
+ #### DevOps (8)
99
+ - `devops-engineer.md` β€” 8-step workflow, Docker, CI/CD, monitoring, backup, security hardening, runbook.
100
+ - `docker-expert.md` β€” Multi-stage, image optimization, compose for dev, security.
101
+ - `kubernetes-specialist.md` β€” Deployment template, resources (ConfigMap, Secret, Ingress, HPA).
102
+ - `git-expert.md` β€” Trunk-based vs Git Flow, commit conventions, useful commands.
103
+ - `git-flow-specialist.md` β€” Branch structure, workflow, commands.
104
+ - `ci-cd-specialist.md` β€” Pipeline stages, GitHub Actions example, quality gates.
105
+ - `linux-specialist.md` β€” Server hardening, performance tuning, commands.
106
+ - `windows-specialist.md` β€” IIS, PowerShell, Windows-specific config.
107
+
108
+ #### Database (6)
109
+ - `database-engineer.md` β€” Naming conventions, data types, index strategy, migration safety levels.
110
+ - `sql-optimizer.md` β€” EXPLAIN ANALYZE, index rules, sargable predicates, query rewrites.
111
+ - `postgresql-specialist.md` β€” JSONB, full-text search, partitioning, CTEs.
112
+ - `mysql-specialist.md` β€” InnoDB, EXPLAIN FORMAT=JSON, performance tuning.
113
+ - `sqlserver-specialist.md` β€” T-SQL, execution plans, indexed views.
114
+ - `redis-specialist.md` β€” Data structures (5 types), use cases, eviction policies.
115
+
116
+ #### Engineering Roles (4)
117
+ - `principal-engineer.md` β€” Technical vision, org-level standards, decision framework.
118
+ - `staff-engineer.md` β€” Deep technical excellence, large feature delivery, mentorship.
119
+ - `tech-lead.md` β€” Team leadership, daily rhythm, engineering-product bridge.
120
+ - `cto-advisor.md` β€” Strategic advice, stakeholder communication, budget and risk.
121
+
122
+ #### Debugging (3)
123
+ - `bug-hunter.md` β€” 8-step protocol, binary isolation, debugging decision tree, bug report format.
124
+ - `debug-specialist.md` β€” 6-step protocol, error pattern library (4 patterns), quick diagnostics CLI.
125
+ - `root-cause-analyzer.md` β€” 5 Whys, Fishbone, Premortem, 7 root cause categories, pattern detection.
126
+
127
+ #### Teaching (6)
128
+ - `professor-mode.md` — 4-level detection (beginner→expert), 4 teaching strategies, interactive exercises.
129
+ - `mentor-mode.md` β€” 4 guidance principles, Socratic questioning, learning roadmap generator.
130
+ - `code-explainer.md` — 4 explanation levels (overview→expert), YAML format, pattern highlighting.
131
+ - `interactive-teaching.md` β€” 6 exercise types, interaction flow with correction feedback.
132
+ - `adaptive-teaching.md` β€” Difficulty/pace/style adaptation rules based on performance.
133
+ - `learning-tracker.md` β€” Persistent learning record, confidence scoring, progress report.
134
+
135
+ #### Analysis (5)
136
+ - `requirement-analyzer.md` β€” Extraction process, functional/non-functional categorization, structured format.
137
+ - `risk-analyzer.md` β€” Probability Γ— Impact matrix, risk register, mitigation planning.
138
+ - `dependency-analyzer.md` β€” Security, freshness, compatibility, license audit, report format.
139
+ - `tradeoff-analyzer.md` β€” 6 criteria with weights, weighted scoring, recommendation.
140
+ - `alternative-solution-generator.md` β€” 3+ options format with pros/cons/effort per option.
141
+
142
+ #### Documentation (6)
143
+ - `documentation-writer.md` β€” 5 documentation types, README template.
144
+ - `technical-writer.md` β€” DiΓ‘taxis framework (tutorials/how-to/reference/explanation), writing principles.
145
+ - `readme-generator.md` β€” Automated sections, badge generation, stack extraction.
146
+ - `uml-generator.md` β€” PlantUML + Mermaid class/component/use case diagrams.
147
+ - `sequence-diagram-builder.md` β€” PlantUML + Mermaid sequence diagrams with actor flow.
148
+ - `er-diagram-builder.md` β€” PlantUML + Mermaid ER diagrams from schema.
149
+
150
+ #### Project Management (3)
151
+ - `project-manager.md` β€” Milestones, sprint tracking, velocity, stakeholder communication.
152
+ - `task-planner.md` β€” Atomic task breakdown, estimation guidelines (1-8 points), acceptance criteria.
153
+ - `release-planner.md` β€” Version bump rules, release checklist, changelog entry format.
154
+
155
+ #### UX/Observability (5)
156
+ - `ux-reviewer.md` β€” 10 Nielsen heuristics, severity-graded report.
157
+ - `accessibility-reviewer.md` β€” WCAG 2.2 AA (perceivable/operable/understandable/robust), audit tools.
158
+ - `logging-expert.md` β€” Structured JSON logging, what to log/not log by level.
159
+ - `observability-expert.md` β€” 3 pillars (logs/metrics/traces), RED metrics, dashboard structure.
160
+ - `monitoring-specialist.md` β€” Alert rules (critical/warning), incident response (6 steps).
161
+
162
+ #### Self-Improvement (6)
163
+ - `self-correction.md` β€” Error detection, correction protocol (acknowledge/explain/correct/prevent/log).
164
+ - `self-critique.md` β€” 8 critique questions, proactive revision process.
165
+ - `continuous-improvement.md` β€” Improvement cycle, effectiveness tracking.
166
+ - `hallucination-detection.md` β€” 4 confidence levels (90%+ to <50%), detection patterns.
167
+ - `confidence-estimator.md` β€” Source reliability scoring, communication patterns per confidence level.
168
+ - `continuous-learning-engine.md` β€” 3 learning sources, knowledge gap detection.
169
+
170
+ #### Skills (1)
171
+ - `INDEX.md` β€” Complete registry of all 111 skills with status and file paths.
172
+
173
+ ---
174
+
175
+ ### Stats
176
+
177
+ | Category | Skills |
178
+ |----------|--------|
179
+ | Core | 8 |
180
+ | Architecture | 10 |
181
+ | Coding | 13 |
182
+ | Security | 3 |
183
+ | Quality | 12 |
184
+ | Testing | 4 |
185
+ | Database | 6 |
186
+ | DevOps | 8 |
187
+ | Engineering Roles | 4 |
188
+ | Debugging | 3 |
189
+ | Teaching | 6 |
190
+ | Memory | 6 |
191
+ | Optimization | 3 |
192
+ | Analysis | 5 |
193
+ | Documentation | 6 |
194
+ | Project Management | 3 |
195
+ | UX/Observability | 5 |
196
+ | Self-Improvement | 6 |
197
+ | **Total** | **111** |
198
+
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pedro Henrique Sanches Leal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT{TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # NexusAI
2
+
3
+ Framework modular, skill-oriented para agentes de IA especializados em desenvolvimento de software e automaΓ§Γ£o.
4
+
5
+ > **Filosofia:** Arquitetura primeiro. CΓ³digo depois. Qualidade medida. EvoluΓ§Γ£o contΓ­nua.
6
+
7
+ ---
8
+
9
+ ## InstalaΓ§Γ£o & CLI via NPM
10
+
11
+ O NexusAI possui uma **CLI executΓ‘vel** que pode ser utilizada via `npx` ou instalada globalmente.
12
+
13
+ ```bash
14
+ # ExecuΓ§Γ£o direta via npx (sem instalaΓ§Γ£o permanente)
15
+ npx nexusai-cli run "Criar API REST com Laravel e JWT"
16
+
17
+ # Ou instalaΓ§Γ£o global
18
+ npm install -g nexusai-cli
19
+
20
+ # Agora use diretamente o comando nexus / nexusai
21
+ nexus run "Refatorar camada de autenticaΓ§Γ£o"
22
+ nexus list skills
23
+ nexus doctor
24
+ ```
25
+
26
+ ---
27
+
28
+ ## Comandos Principais da CLI
29
+
30
+ | Comando | DescriΓ§Γ£o |
31
+ |---|---|
32
+ | `nexus run "<task>"` | Analisa a tarefa, seleciona o agente ideal e mapeia a corrente de skills. |
33
+ | `nexus compile <agente> [arquivo]` | Compila um System Prompt completo do agente + fundaΓ§Γ£o do sistema para arquivo ou stdout. |
34
+ | `nexus init` | Inicializa regras `.nexus/` no seu projeto atual. |
35
+ | `nexus list [skills\|agents]` | Lista todas as skills e agentes registrados com seus aliases. |
36
+ | `nexus doctor` | Valida integridade do framework, JSONs de agentes e mapeamentos de aliases. |
37
+
38
+ ---
39
+
40
+ ## Estrutura do Projeto
41
+
42
+ ```
43
+ NexusAI/
44
+ β”œβ”€β”€ bin/ ExecutΓ‘vel da CLI (bin/nexus.js)
45
+ β”œβ”€β”€ src/cli/ CΓ³digo fonte dos comandos CLI
46
+ β”œβ”€β”€ core/ Motor central (decisΓ£o, contexto, reflexΓ£o, skill-resolver)
47
+ β”œβ”€β”€ agents/ DefiniΓ§Γ΅es de Agentes de IA em JSON
48
+ β”œβ”€β”€ skills/ Skill base (80+ skills especializadas em Markdown)
49
+ β”œβ”€β”€ memory/ Gerenciamento de memΓ³ria e compressΓ£o
50
+ β”œβ”€β”€ optimization/ ReduΓ§Γ£o de tokens e custos
51
+ β”œβ”€β”€ teaching/ Modo professor e aprendizado adaptativo
52
+ β”œβ”€β”€ architecture/ PadrΓ΅es arquiteturais e design
53
+ β”œβ”€β”€ coding/ Skills de engenharia de software
54
+ β”œβ”€β”€ security/ OWASP, autenticaΓ§Γ£o, auditoria
55
+ β”œβ”€β”€ testing/ Testes unitΓ‘rios, integraΓ§Γ£o, E2E
56
+ β”œβ”€β”€ devops/ Docker, CI/CD, infraestrutura
57
+ β”œβ”€β”€ database/ SQL, NoSQL, otimizaΓ§Γ£o
58
+ β”œβ”€β”€ frontend/ Skills de frontend
59
+ β”œβ”€β”€ backend/ Skills de backend
60
+ β”œβ”€β”€ package.json ConfiguraΓ§Γ£o NPM para publicaΓ§Γ£o CLI
61
+ β”œβ”€β”€ README.md DocumentaΓ§Γ£o principal
62
+ β”œβ”€β”€ SYSTEM.md FundaΓ§Γ£o do sistema
63
+ └── RULES.md Regras operacionais
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Agentes e Skills
69
+
70
+ O framework possui **80+ skills** e **10+ agentes especializados** encadeados dinamicamente via `core/skill-resolver.json`.
71
+
72
+ ```bash
73
+ # Exemplo: Compilar o System Prompt para o Arquiteto de Software
74
+ nexus compile architect prompt_arquiteto.md
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Publicando no NPM
80
+
81
+ ```bash
82
+ # Login no NPM
83
+ npm login
84
+
85
+ # Testar empacotamento em modo dry-run
86
+ npm pack --dry-run
87
+
88
+ # Publicar pacote publicamente
89
+ npm publish --access public
90
+ ```
91
+
92
+ ---
93
+
94
+ ## LicenΓ§a
95
+
96
+ MIT β€” Use, modifique, distribua. Apenas mantenha os crΓ©ditos.
package/ROADMAP.md ADDED
@@ -0,0 +1,131 @@
1
+ # Roadmap
2
+
3
+ > Vision and planned evolution for the Nexus AI framework.
4
+
5
+ ---
6
+
7
+ ## Legend
8
+
9
+ | Status | Meaning |
10
+ |--------|---------|
11
+ | βœ… | Done |
12
+ | πŸ”§ | In progress |
13
+ | πŸ“‹ | Planned |
14
+ | πŸ’‘ | Future idea |
15
+
16
+ ---
17
+
18
+ ## Phase 1 β€” Foundation (v1.0.0) βœ…
19
+
20
+ - [x] SYSTEM.md β€” Core identity and architecture
21
+ - [x] RULES.md β€” Operating rules and conventions
22
+ - [x] README.md β€” Entry point and quick start
23
+ - [x] Decision Engine β€” Task classification and routing
24
+ - [x] Context Engine β€” Minimal context window builder
25
+ - [x] Token Manager β€” Budget enforcement and monitoring
26
+ - [x] Compression Engine β€” 4-level text compression
27
+ - [x] Reflection Engine β€” Post-task self-review
28
+ - [x] Evolution Engine β€” Self-improvement from patterns
29
+ - [x] Quality Gates β€” 5-gate output validation
30
+ - [x] Planning Engine β€” Task decomposition and effort estimation
31
+ - [x] Memory Manager β€” 3-tier memory with knowledge graph
32
+ - [x] Professor Mode β€” Adaptive teaching skill
33
+ - [x] Security Engineer β€” OWASP + secrets detection
34
+ - [x] Software Architect β€” Architecture decision skill
35
+
36
+ ---
37
+
38
+ ## Phase 2 β€” Coding & Database & DevOps (v1.0.0) βœ…
39
+
40
+ ### Backend
41
+ - [x] Backend Engineer (Laravel, Node, Python, C#)
42
+ - [x] API Designer β€” REST, GraphQL, versioning
43
+ - [x] Microservices Expert β€” patterns, communication, deployment
44
+
45
+ ### Frontend
46
+ - [x] Frontend Engineer (React, Vue, Tailwind)
47
+ - [x] UX Reviewer β€” usability heuristics
48
+ - [x] Accessibility Reviewer β€” WCAG compliance
49
+
50
+ ### Database
51
+ - [x] Database Engineer β€” schema design, migrations
52
+ - [x] SQL Optimizer β€” query analysis, indexing
53
+ - [x] PostgreSQL Specialist β€” advanced features
54
+
55
+ ### DevOps
56
+ - [x] DevOps Engineer β€” infrastructure, deployment
57
+ - [x] Docker Expert β€” containers, compose, multi-stage
58
+ - [x] CI/CD Specialist β€” pipelines, automation
59
+ - [x] Cloud Architect (skills/cloud-architect)
60
+
61
+ ---
62
+
63
+ ## Phase 3 β€” Quality & Testing (v1.0.0) βœ…
64
+
65
+ - [x] Unit Test Engineer β€” TDD, coverage, mocking
66
+ - [x] Integration Test Engineer β€” API, database, external services
67
+ - [x] E2E Test Engineer β€” Cypress, Playwright
68
+ - [x] Clean Code Validator β€” naming, functions, comments
69
+ - [x] SOLID Validator β€” LSP, ISP, DIP checks
70
+ - [x] Complexity Analyzer β€” cyclomatic, cognitive complexity
71
+ - [x] Refactoring Specialist β€” patterns, migration, risk
72
+ - [x] Technical Debt Analyzer β€” debt estimation, prioritization
73
+
74
+ ---
75
+
76
+ ## Phase 4 β€” Advanced Skills (v1.0.0) βœ…
77
+
78
+ - [x] Senior Code Reviewer β€” PR review with depth
79
+ - [x] Bug Hunter β€” systematic debugging protocol
80
+ - [x] Root Cause Analyzer β€” 5 Whys, fishbone
81
+ - [x] Performance Optimizer β€” profiling, caching, N+1
82
+ - [x] Dependency Analyzer β€” version conflicts, security, updates
83
+ - [x] Risk Analyzer β€” probability Γ— impact matrix
84
+ - [x] Breaking Change Detector β€” semver validation
85
+ - [x] Release Planner β€” changelog, version bump, tags
86
+
87
+ ---
88
+
89
+ ## Phase 5 β€” Intelligence (v1.0.0) βœ…
90
+
91
+ - [ ] Knowledge Graph Auto-Builder β€” extract entities from conversations
92
+ - [x] Hallucination Detector β€” confidence scoring for statements
93
+ - [x] Confidence Estimator β€” know when to say "I'm not sure"
94
+ - [x] Alternative Solution Generator β€” always offer 2+ approaches
95
+ - [x] Trade-off Analyzer β€” structured comparison with criteria
96
+ - [x] Self-Correction Engine β€” detect error in own output, fix, log
97
+ - [x] Conversation Summarizer β€” compress entire session to 200 tokens
98
+ - [x] Context Recovery β€” resume after session break
99
+
100
+ ---
101
+
102
+ ## Phase 6 β€” Autonomy & Consolidation (v2.0.0) βœ…
103
+
104
+ - [x] Project Manager β€” track milestones, deadlines, progress
105
+ - [x] Task Planner β€” break epics into sprints
106
+ - [x] Requirement Analyzer β€” extract requirements from natural language
107
+ - [ ] Stakeholder Identifier β€” who cares about this decision?
108
+ - [x] Cost Optimizer β€” cloud cost estimation and reduction
109
+ - [x] Documentation Writer β€” auto-document codebase
110
+ - [ ] UML Diagram Generator β€” PlantUML from architecture (exists as skill)
111
+ - [x] README Generator β€” project README from structure
112
+
113
+ ---
114
+
115
+ ## Phase 7 β€” Ecosystem (v2.0.0 / v3.0.0) πŸ’‘
116
+
117
+ - [ ] Plugin System β€” third-party skills
118
+ - [ ] Skill Marketplace β€” share and install skills
119
+ - [ ] Nexus CLI β€” command-line tool to manage skills
120
+ - [ ] Nexus API β€” REST API for framework interrogation
121
+ - [ ] Multi-Agent Coordination β€” multiple Nexus agents collaborating
122
+ - [ ] Web UI β€” visual skill editor and monitor
123
+ - [ ] Analytics Dashboard β€” token usage, evolution, cost
124
+
125
+ ---
126
+
127
+ ## Current Focus
128
+
129
+ **v2.0.0** β€” Consolidation, plugin system, and CLI tooling to make NexusAI extensible and operable outside of conversation.
130
+
131
+ > "Rome wasn't built in a day. Neither is a great agent framework."