Skip to content

camilooscargbaptista/nexus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

NEXUS

Autonomous Engineering Intelligence Platform

The first AI system that analyzes, reasons about, and auto-remediates architectural problems in your codebase.

Tests Packages TypeScript License

Girardelli Tecnologia — Anthropic Claude Partner Network


What is Nexus?

Nexus is not a linter. It's an autonomous engineering intelligence platform that unifies three battle-tested AI tools into a single pipeline:

Perception (Architect) → Reasoning (CTO Toolkit) → Validation (Sentinel Method) → Action

SonarQube tells you there's a code smell. Nexus tells you why it exists, what the business impact is, and how to fix it — then fixes it.

The Pipeline

  1. PerceptionArchitect analyzes your codebase: C4 diagrams, dependency graphs, anti-pattern detection, architecture score (0-100)
  2. ReasoningCTO Toolkit routes findings to 24 specialized skills via smart context-aware routing
  3. ValidationSentinel Method validates that every fix meets quality, security, and performance standards
  4. Action — ReactionEngine auto-remediates issues, sends alerts (Slack, webhook), generates reports

Quick Start

# Install
git clone https://github.com/camilooscargbaptista/nexus.git
cd nexus && npm install

# Run all 1308 tests
npx jest

# CLI (coming soon to npm)
nexus analyze .          # Full codebase analysis
nexus score .            # Quick architecture score
nexus status             # Current health overview
nexus history            # Trend tracking over time

Architecture

┌──────────────────────────────────────────────────────────────┐
│                        NEXUS PLATFORM                        │
│                                                              │
│  ┌──────────┐  ┌──────────────┐  ┌───────────────┐          │
│  │ CLI / CI │  │ Cloud API    │  │ MCP Servers   │          │
│  │ Plugin   │  │ (Express)    │  │ (3 servers)   │   Entry  │
│  └────┬─────┘  └──────┬───────┘  └──────┬────────┘  Points  │
│       └───────────────┬┘────────────────┘                    │
│                       ▼                                      │
│  ┌─────────────────────────────────────────────────┐         │
│  │              NexusPipeline                       │         │
│  │                                                  │         │
│  │  ┌─────────────┐    ┌──────────────┐             │         │
│  │  │  Architect   │───▶│ ToolkitRouter │            │  Core   │
│  │  │  Adapter     │    │ (24 skills)   │            │         │
│  │  └─────────────┘    └──────┬───────┘             │         │
│  │         │                  │                      │         │
│  │         ▼                  ▼                      │         │
│  │  ┌─────────────┐    ┌──────────────┐             │         │
│  │  │  Sentinel   │◀───│ NexusEventBus │            │         │
│  │  │  Adapter    │    └──────────────┘             │         │
│  │  └──────┬──────┘                                 │         │
│  │         ▼                                        │         │
│  │  NexusPipelineResult                             │         │
│  └─────────────────────────────────────────────────┘         │
│                       │                                      │
│                       ▼                                      │
│  ┌─────────────────────────────────────────────────┐         │
│  │           Autonomy + Intelligence Layer           │         │
│  │                                                  │         │
│  │  IntentRouter · PersonaSystem · SessionState     │ Intelligence │
│  │  ReactionEngine · DriftDetector · SkillComposer  │         │
│  │  ProviderMesh · BM25Search · LLMRecommender     │         │
│  │  BatchExecutor · QueryPlanner · MiddlewareChain  │         │
│  └─────────────────────────────────────────────────┘         │
│                       │                                      │
│                       ▼                                      │
│  ┌─────────────────────────────────────────────────┐         │
│  │           Cloud + Dashboard                      │         │
│  │                                                  │  Product│
│  │  REST API · Auth · Team Management               │         │
│  │  React Dashboard · Score Trends · Findings       │         │
│  └─────────────────────────────────────────────────┘         │
└──────────────────────────────────────────────────────────────┘

Monorepo Packages

Package Description Key Modules
@nexus/types Shared type system LLMProvider, NexusEvent, SystemEvent, Pipeline types
@nexus/events Event bus NexusEventBus, MiddlewareChain, withLogging, withTiming
@nexus/core Engine Orchestrator, ProviderMesh, ModelRouter, PersonaSystem, ToolGateway, SessionState, Tribunal, ResilientHttpClient, TTLCache, RateLimiter, BatchExecutor, QueryPlanner, BR Validators (CPF/CNPJ/CEP), Markdown Formatting, ConstitutionEngine, ReflectionLoop, HealthSupervisor, StressDetector, HealthReportGenerator, RewardTracker, FeedbackCollector, RewardReportGenerator, TokenEstimator, ContextPrioritizer, ContextWindowManager
@nexus/bridge Integration layer ArchitectAdapter, SentinelAdapter, ToolkitRouter, ReactionEngine, NexusPipeline, IntentRouter, DriftDetector, SkillMeta (Zod), AutoRegistry, BM25Index, SkillSearchEngine, LLMRecommender, CriticAdapter, IntentClassifier, RoutingStrategy, SupervisorRouter, MCPToolBridge, ExecutionPlan, PipelineOrchestrator, PipelineReportGenerator, SpecParser, SpecTemplate, SpecGenerator, EpicDecomposer, StoryGenerator, SprintPlanner, C4Generator, DataModelGenerator, ArchitectureGenerator
@nexus/autonomy Self-improvement AEP Generator, Debt Prevention, Remediation
@nexus/cloud Backend API Express routes, Auth, Team/Project services, Prisma schema + repositories (PostgreSQL), rate limiting
@nexus/dashboard Frontend React 18 + Tailwind + Recharts components (4 pages, 20+ components)
@nexus/mcp MCP Protocol Perception, Reasoning, Validation servers, MCPClient, MCPDiscovery
@nexus/cli CLI tool nexus analyze/score/status/history with ANSI output
@nexus/app GitHub App PR analysis, webhook handlers

Key Differentiators

Capability SonarQube CodeClimate Snyk NEXUS
Static Analysis Yes Yes Yes Yes
Architecture Analysis No No No Yes
LLM Reasoning No No No Yes
Multi-Model Routing No No No Yes
Auto-Remediation No No Partial Yes
Domain-Aware No No No Yes
Trend Tracking Basic Yes No Yes

ProviderMesh — Multi-Model Intelligence

Nexus routes tasks to the optimal LLM based on complexity and cost:

Task Model Cost/1M tokens Use Case
Quick classification Claude Haiku $0.80 in / $4.00 out Triage, routing, simple analysis
Balanced analysis Claude Sonnet $3.00 in / $15.00 out Code review, architecture assessment
Deep reasoning Claude Opus $15.00 in / $75.00 out Complex refactoring, novel solutions
import { setupNexusMesh } from "@nexus/core";

const mesh = setupNexusMesh({ apiKey: process.env.ANTHROPIC_API_KEY });
// Automatically routes to the right model based on task complexity

Development Status

Completed (Sprints 1–10 + Resilience/Governance/Intelligence/Domain)

  • Core Engine — Orchestrator, ProviderMesh, ToolGateway, ModelRouter
  • Bridge Layer — Architect/Sentinel/Toolkit integration, NexusPipeline
  • Event System — NexusEventBus with typed events and correlation
  • Autonomy — PersonaSystem, IntentRouter, SessionState, DriftDetector, SkillComposer
  • ReactionEngine — Event-driven auto-response with severity filtering and cooldowns
  • Cloud Backend — Express API with auth, team, project management
  • Dashboard — React 18 + Tailwind components (charts, findings, pipeline, team)
  • MCP Servers — Perception, Reasoning, Validation protocol servers
  • CLI — nexus analyze/score/status/history with trend tracking
  • Architect Bridge — Transform layer for raw Architect → Nexus format
  • Action Executors — Console, File, Webhook, Composite execution
  • Claude Mesh Providers — Pre-configured Haiku/Sonnet/Opus providers
  • Resilience Layer — ResilientHttpClient (CircuitBreaker), TTLCache (LRU+TTL), RateLimiter (sliding window)
  • Governance + Discovery — SkillMeta (Zod validation), AutoRegistry (convention-based), Middleware Logging (correlation IDs)
  • Intelligence Layer — BM25 Search (zero-dep), LLMRecommender (BM25→LLM fallback), BatchExecutor (parallel DAG)
  • Domain-Specific — BR Validators 🇧🇷 (CPF/CNPJ/CEP), Markdown Formatting, QueryPlanner (objective decomposition)
  • Self-Reflection Engine — ConstitutionEngine (quality rules), ReflectionLoop (Training-Free RL), CriticAdapter (code-specific evaluation)
  • Health Supervisor — HealthSupervisor (8 health signals), StressDetector (15 patterns), HealthReportGenerator (Markdown reports)
  • Supervisor Agent Router — IntentClassifier (9 categories), RoutingStrategy (hybrid BM25+intent), SupervisorRouter (LLM-powered)
  • MCP Client Gateway — MCPClient (JSON-RPC 2.0), MCPDiscovery (multi-server), MCPToolBridge (MCP→Nexus skills)
  • Reward Tracker — RewardTracker (RLHF), FeedbackCollector (multi-source), RewardReportGenerator (Markdown)
  • Context Window Manager — TokenEstimator (10 models), ContextPrioritizer (budget selection), ContextWindowManager (prompt assembly)
  • Autonomous Pipeline — ExecutionPlan (DAG), PipelineOrchestrator (end-to-end), PipelineReportGenerator
  • Spec Generator — SpecParser (semantic extraction), SpecTemplate (10-section C4), SpecGenerator (text→spec)
  • Sprint Planner — EpicDecomposer (9-category), StoryGenerator (BDD), SprintPlanner (velocity-based)
  • Quality Fixes — Tribunal consensus (semantic similarity), cloud rate limiting, pipeline string bug
  • Architecture Generator — C4Generator (3-level Mermaid), DataModelGenerator (Prisma+SQL+OpenAPI), ArchitectureGenerator
  • Prisma Connect — 7 Prisma repos (PostgreSQL), auto-detect connection, graceful shutdown, in-memory fallback
  • 1308 tests passing across all packages

Next Up

  • npm publish @nexus/cli
  • GitHub Actions plugin
  • Cloud dashboard deployment (Vercel)
  • GitHub OAuth integration
  • Landing page at girardellitecnologia.com/nexus

Tech Stack

Runtime: Node.js 18+ · TypeScript 5.x · ESM

Backend: Express · Prisma · JWT · Zod validation

Frontend: React 18 · Tailwind CSS · Recharts · Next.js

AI: Anthropic Claude API (Haiku/Sonnet/Opus) · Multi-model routing

Testing: Jest · ts-jest · 1308 tests

Infra: Docker · AWS · GitHub Actions


Author

Camilo Girardelli — CTO & Co-founder at Girardelli Tecnologia

  • IEEE Senior Member
  • Anthropic Claude Partner Network
  • 19+ years building enterprise systems (Vodafone, Western Union, NBCUniversal, Mobly)
  • Postgraduate AI/ML — UT Austin

License

Business Source License 1.1 (BSL 1.1)

  • Free for: personal use, evaluation, development, open-source projects, companies with <$1M annual revenue
  • Requires license for: commercial use by companies with >$1M annual revenue
  • Change date: 4 years after each release → converts to Apache 2.0
  • Additional use grant: Non-production use is always permitted

See LICENSE for full terms.

About

Autonomous Engineering Intelligence — AI-powered codebase analysis, reasoning, and auto-remediation. Unifies Architect + Sentinel Method + CTO Toolkit into one pipeline. TypeScript monorepo, 909 tests.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors