NEXUS

The AI-Native Engineering Operating System

NEXUS sits between AI coding agents (Claude Code and others) and your codebase — it routes tasks to the right model, scores every change for security and architecture risk before it's written, runs parallel "universes" of implementations, and learns from every real session.

⬢ Multi-Agent Universes (M09)
⬢ Security Gate on every Edit/Write
⬢ Architecture Genome (M02)
⬢ Self-Learning (EOS-Instinct)

Core Capabilities

What NEXUS Actually Does

1. Adaptive Routing

UCB1-based router picks the right local model per task type from real benchmark history — not guesses.

integration/nexus_decisions/router.py
🧬

2. Architecture Genome

Encodes your project's layering rules and dependency policies, then scores every new file against them.

integration/nexus_governance/genome.py
🛡

3. Vulnerability Gate

Every Edit/Write/MultiEdit is scanned for OWASP-class issues (injection, hardcoded secrets, weak crypto) before it lands.

nexus_governance/execution_gate.py
🌐

4. Multiverse Engine

Spawns parallel implementations with different strategies, benchmarks them, and selects a winner via real test + governance scores.

integration/nexus_universe/
📊

5. Project Twin

A live JSON model of your project — architecture, dependencies, risks, history and predictions — regenerated on demand.

.nexus/os/project_twin.json
🧠

6. EOS-Instinct Learning

Mines every session transcript for repeated command patterns and feeds them back as reflexes in future sessions.

integration/eos_instinct/consolidate.py

System Architecture

How Claude Code & NEXUS Connect

Claude Code
Other AI Runners
CLI / MCP Clients
↓ PreToolUse / PostToolUse / Stop hooks
NEXUS GOVERNANCE GATE
Security Scanner
Architecture Genome
Production Path Rules
↓ findings → additionalContext (warn) or block
Decision Dataset
Cost Ledger
Vault Snapshots
Project Twin

Governance & Security

Findings, Not Promises

CWE-78 — OS Command Injection

Detected on subprocess.run(... + user_input, shell=True) — severity CRITICAL, blocks in mode=block.

CWE-798 — Hardcoded Credentials

Detected on hardcoded passwords/keys in source — severity CRITICAL.

CWE-321 — Hardcoded Secret Key

Detected on hardcoded secret keys — severity HIGH, fix suggestion included in the finding.

Self-audit, real numbers: NEXUS scanning its own integration/ codebase (411 Python files) found 141 real findings — 82 CRITICAL, 54 HIGH — using the same scanner wired into the pre-write gate above.

Live Metrics

Measured, Not Simulated

83.9%
Prompt-cache savings, this session
~$405 saved vs uncached · nexus_cost
87.5%
Architecture debt reduced
.nexus/os/engineering_economy_report.json
7 / 7
Bugs / incidents prevented
.nexus/os/merge_authority_report.json
72.0%
Reality accuracy (1/2 measured)
.nexus/os/reality_selection_report.json
Generated live by python3 integration/nexus_theme/banner.py . — every number above is re-derivable from source files in this repo via integration/nexus_theme/proof.py. No API calls, no synthetic data.

Connect Claude Code to NEXUS

Add to ~/.claude/settings.jsonmcpServers

"nexus": { "type": "sse", "url": "https://nexus-os.tech/mcp/sse", "headers": { "X-Nexus-Key": "<your-key>" } }