One npm install. 46 agents. 7 departments. Full RAG pipeline with 5-gate harness.
YVON is an agent operating system β a fleet of 46 AI agents organized into 7 departments, backed by a production RAG pipeline with source authentication, reliability scoring, conflict detection, priority assembly, and quarantine. Multi-tenant architecture designed for managing owned brands (Novizio, Hourbour) and the AgentX SaaS platform for small businesses.
# Install
git clone https://github.com/OfficialNovizio/YVON-Engine
cd YVON-Engine
npm install
# Run all tests (285+ passing)
npm test
# Dashboard
cd dashboard && npm install && npm run dev
# Open http://localhost:3000YVON-Engine/
β
βββ Teams/ # 46 agents across 9 departments
β βββ AI & Agents/ # 8 agents β fleet management
β βββ Brand Studio/ # 11 agents β creative & marketing
β βββ Cybersecurity/ # 5 agents β security & compliance
β βββ Engineering/ # 11 agents β development & QA
β βββ Executive Office/ # 3 agents β strategy & vision
β βββ Governance/ # 3 agents β oversight & audit
β βββ Product/ # 5 agents β product & analytics
β βββ Shared OS/ # 35 logical scripts + skills
β
βββ rag/ # Python RAG Pipeline (285+ tests)
β βββ core/ # Pipeline engine (9 modules)
β β βββ injector.py # 3-layer compression (22 tests)
β β βββ strategy.py # Multi-strategy token pipeline (23 tests)
β β βββ destructor.py # Hard budget enforcement (35 tests)
β β βββ optimizer.py # Dynamic context optimizer (24 tests)
β β βββ retriever.py # Full retrieval pipeline (20 tests)
β β βββ bridge.py # CIE to/from RAG bridge (16 tests)
β β βββ embed.py # Hybrid embedder (dense + sparse) (12 tests)
β β βββ chunkify.py # Semantic chunker (17 tests)
β β βββ feedback.py # Quality feedback loop (13 tests)
β β
β βββ harness/ # 5-gate verification (2 modules)
β β βββ gates.py # Source auth, reliability, conflict, priority, quarantine (35 tests)
β β βββ disclosure.py # Progressive skill disclosure (23 tests)
β β
β βββ eval/ # Quality assessment (2 modules)
β β βββ judge.py # 6-metric LLM-as-judge scoring (10 tests)
β β βββ flywheel.py # 5-stage iterative improvement loop (12 tests)
β β
β βββ monitor/ # Field monitoring (2 modules)
β β βββ watcher.py # Attractors, degradation, coverage, drift (17 tests)
β β βββ improver.py # Weekly autonomous optimization (20 tests)
β β
β βββ verify/ # Post-hoc verification
β β βββ grounded.py # Grounded citation + self-consistency (16 tests)
β β
β βββ experiments/ # Standalone (not production)
β β βββ adaptive_recovery.py # Option 1+3 pipeline
β β βββ relational_graph.py # Option 2+4 pipeline
β β βββ benchmark.py # Comparison suite
β β βββ e2e.py # 12-scenario E2E validation
β β
β βββ books/ # Design rationale
β βββ chunks/ # chunks.json (4,839 chunked)
β βββ store/ # SQLite vector store
β
βββ src/ # TypeScript CIE + Pipelines
β βββ cie/ # Context Intelligence Engine
β βββ pipelines/ # Governance gate + content pipeline
β βββ graphs/ # Code dependency + structure graphs
β βββ toon/ # TOON compression
β
βββ dashboard/ # Next.js 14 React Dashboard
β βββ app/ # 6 pages (Brands, Detail, Monitor, Analytics, Settings, Add Brand)
β βββ components/ # Reusable (Sidebar, BrandCard, MetricCard)
β βββ lib/ # Types + API integration
β
βββ docs/ # Architecture documentation
β βββ 4LAYER.md # Multi-tenant architecture
β βββ DASHBOARD.md # Dashboard design
β βββ FULL.md # Full project architecture
β βββ GOOGLE_PATTERNS.md # Google agents-cli integration
β βββ HARNESS.md # Harness architecture
β βββ WORK_TREE.md # Complete work tree with fallbacks
β βββ CODE_STRUCTURE.md # Code organization plan
β
βββ cli/ # CLI tools (yvon.js, toonify.js)
βββ dist/ # Compiled TypeScript
βββ package.json # npm package: yvon-engine
| Department | Agents | Purpose |
|---|---|---|
| Executive Office | marcus, echo, vista | Strategy, investor relations, roadmap |
| Governance | board, precedent, sentinel | Fiduciary oversight, legal consistency, audit |
| Engineering | dev, ops, quinn, aegis, cypher, axiom, dana, raj, mia, nova, rank | Architecture, DevOps, QA, security, data, backend, frontend, mobile, SEO |
| Cybersecurity | warden, keyring, bastion, cortex, veil | GRC, IAM, infrastructure security, detection, data protection |
| Product | spec, metric, ux, loom, price | PRD, analytics, research, validation, pricing |
| AI & Agents | meta, relay, gauge, anneal, forge, scout, proto, edge | Fleet governance, integrations, quality, improvement, benchmarking, ecosystem, prototyping, adoption |
| Brand Studio | spark, atlas, lena, weave, muse, pixel, pulse, rio, nate, kai, tempo | Creative direction, brand, copywriting, storytelling, ideation, visual, social, ads, growth, analytics, audio |
Each agent follows a standard structure: agent.md (definition) β identity/ (persona) β custom/ (SKILL.md files) β operational/ (config, commands, principles, skill routing, tool requirements) β logical/ (book requirements).
QUERY: "review this headline copy for the campaign"
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 1: CLASSIFICATION + PROGRESSIVE DISCLOSURE β
β β
β Domain keyword classifier β task_type + agent_id β
β "headline + campaign" β creative_review β spark β
β β
β Progressive skill disclosure: load only 2-3 matched skills β
β from spark's roster (40-60% savings on skill context) β
ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 2: HYBRID RETRIEVAL + OPTIMIZATION β
β β
β Query rewrite (3-5 variants) β dense + sparse search β
β β cross-encoder rerank β top-20 candidates β
β β
β Dynamic optimizer: task profile β tier allocation β β
β source diversity β adversary injection (premortem) β
β β
β β
AGENT BONUS: agent's own files get +0.15 retrieval boost β
β (dev's delivery-governance competes with Shared OS wisdom) β
ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 3: HARNESS β 5 GATES IN SEQUENCE β
β β
β GATE 1 β SOURCE AUTHENTICATION β
β βββββββββββββββββββββββββββββ β
β β’ Source file exists on disk? β if not, BLOCK β
β β’ Chunk hash matches? β if not, FLAG (tampered) β
β β’ Book citation traceable? β check Teams/Books/ β
β β’ Within agent's authorized departments? β if not, BLOCK β
β β
β GATE 2 β MULTIPLICATIVE RELIABILITY β
β ββββββββββββββββββββββββββββββββββββ β
β reliability = freshness Γ authority Γ quality_score β
β Authority levels: book=1.0, standard=0.9, shared_os=0.85, β
β dept_doc=0.7, agent=0.65, skill=0.55, playbook=0.5, β
β operational=0.4, unknown=0.2 β
β Junk chunk: 0.3Γ0.2Γ0.5 = 0.03 β
β Authority: 0.9Γ1.0Γ0.95 = 0.855 β
β 948x separation between authoritative and junk β
β β
β GATE 3 β CONFLICT DETECTION β
β βββββββββββββββββββββββββββββ β
β β’ Text overlap + negation + opposition detection β
β β’ Relational graph: DEFINES, EXTENDS, CONTRADICTS, SUPERSEDES β
β β’ Same-dept needs 5 shared terms (avoid false positives) β
β β’ Contradictions flagged in context: "β οΈ Agent must reconcile" β
β β
β GATE 4 β PRIORITY-BASED BUDGET ASSEMBLY β
β ββββββββββββββββββββββββββββββββββββββ β
β P0: Agent identity (always) β
β P1: Active skills (progressive-loaded) β
β P2: Computed facts (Shared OS results) β
β P3: T1 verified chunks (load-bearing) β
β P4: T2 structural chunks β
β P5: One adversarial chunk β
β P6: T3 supplementary β
β P7: Inactive skill summaries β
β Budget fills P0βP7. Exhausted β remaining dropped. β
β β
β GATE 5 β QUARANTINE + RECOVERY β
β ββββββββββββββββββββββββββββββββββ β
β β’ Reliability < threshold β quarantine (log + notify operator) β
β β’ Recovery scan: novel facts, exceptions, contradictions β
β β’ Pull back dropped chunks that should not have been dropped β
ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 4: STRATEGY ROUTING + INJECTION β
β β
β FAST path: creative/factual/copy β Destructor v2 (64-89% save) β
β BALANCE path: everything else β Adaptive + Recovery (39-77%) β
β β
β 3-layer compression: β
β Layer 1: Sentence pruning (60-85% savings) β
β Layer 2: Citation-only mode (85-95% savings on formulas) β
β Layer 3: Agent-specific profiles (46 agents β 5 types) β
ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 5: LLM GENERATION + POST-HOC VERIFICATION β
β β
β hermes+claude β primary reasoning β
β deepseek β adversarial verification β
β chatgpt β content/creative quality β
β β
β verifier.py: β
β Layer 1: Grounded citation check (is every claim supported?) β
β Layer 2: Self-consistency check β
β Layer 3: Constitution compliance β
β β
β High-stakes tasks (legal, governance) β delegate to β
β quinn/precedent/sentinel for additional verification β
ββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PHASE 6: FEEDBACK LOOP + FIELD MONITORING β
β β
β feedback.py: quality_new = quality_old Γ 0.95 + outcome Γ 0.05 β
β field_monitor.py: attractors, degradation, coverage gaps, drift β
β self_improver.py: weekly analyze β propose β sandbox test β β
β deploy (all passing β auto; any failing β hold + report) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
20 CANDIDATE CHUNKS
β
ββββββΌβββββ
β GATE 1 β SOURCE AUTH: 18 verified Β· 1 flagged Β· 1 blocked
ββββββ¬βββββ
β
ββββββΌβββββ
β GATE 2 β RELIABILITY: freshness Γ authority Γ quality
ββββββ¬βββββ 3 quarantined (below threshold)
β
ββββββΌβββββ
β GATE 3 β CONFLICT: 1 contradiction detected (NIST vs ISO)
ββββββ¬βββββ Flag injected: "β οΈ Agent must reconcile"
β
ββββββΌβββββ
β GATE 4 β PRIORITY: P0βP5 filled (680t), P6 dropped
ββββββ¬βββββ
β
ββββββΌβββββ
β GATE 5 β QUARANTINE: 3 excluded + logged
ββββββ¬βββββ RECOVERY: 1 exception chunk pulled back
β
βΌ
VERIFIED CHUNKS (5-8 with conflict flags)
| Task Type | Strategy | Budget | Savings | Quality | When |
|---|---|---|---|---|---|
| creative_review | FAST | 80-100t | 64-89% | 0.24-0.58 | Model knows Ogilvy from training |
| copy_edit | FAST | 80t | 64% | 0.58 | Model knows grammar |
| factual_lookup | FAST | 80t | 64% | median | One citation answers query |
| standard_review | BALANCE | 1.0Γ | 60-70% | 0.50-0.70 | Needs moderate context |
| engineering_debug | BALANCE | 1.5Γ | 77% | 0.50 | Code patterns + architecture |
| financial_analysis | BALANCE | 2.0Γ | 70% | 0.70-0.80 | Formulas + caveats + sensitivity |
| governance_decision | BALANCE | 2.5Γ | 62% | 0.64 | Precedents + thresholds |
| strategic_analysis | BALANCE | 3.0Γ | 54% | 0.77 | Multiple perspectives |
| legal_review | BALANCE | 4.0Γ | 39% | 0.96 | Missing context = liability |
| Component | Savings | Method |
|---|---|---|
| Sentence pruning | 60-85% | Commander's Intent + citations only |
| Citation-only mode | 85-95% | Formula chunks β computed value + citation |
| Agent profiles | 40-70% | Per-agent compression budgets |
| Hard budget guarantee | 80-90% | 15% of input, never exceed |
| Progressive disclosure | 40-60% | Skill lazy loading per query |
| Destructor v2 | 22-91% | Adaptive to input size |
| Stacked | 90-98% | All layers active |
6 pages accessible from the sidebar:
| Route | Page | Content |
|---|---|---|
/ |
Brands | Health ring grid (hero), pipeline stats, activity timeline |
/brands/[id] |
Brand Detail | Per-brand metrics, content calendar, plan |
/monitor |
Monitor | 16 module test results, harness gate status |
/analytics |
Analytics | Pipeline runs + brand performance tables |
/settings |
Settings | Pipeline config, connected brands |
/add-brand |
Add Brand | 3-step wizard β provision β deploy |
What business owners see: Content calendar, engagement numbers, plan info β never agent internals. What operators see: Fleet health, RAG metrics, brand grid, alerts, graph vitals.
# Full test suite (all 16 modules, 285+ tests)
npm test
# Individual modules
cd rag
python3 -c "
import sys,os; sys.path.insert(0,'core'); sys.path.insert(0,'harness')
sys.path.insert(0,os.path.join('..','Teams','Shared OS','logical'))
exec(open('core/injector.py').read())
"
# Live pipeline query
cd rag
python3 -c "
import sys,os; sys.path.insert(0,'core'); sys.path.insert(0,'harness')
sys.path.insert(0,os.path.join('..','Teams','Shared OS','logical'))
from retriever import retrieve
r = retrieve('review headline copy', agent_id='spark', agent_dept='Brand Studio')
print(f'Chunks: {len(r.optimized.selected_chunks)}')
for c in r.optimized.selected_chunks:
print(f' {c.get(\"source_file\",\"?\")[:50]}')
"
# Dashboard
cd dashboard && npm install && npm run dev
# TypeScript build
npm run build
# TypeScript watch
npm run dev
# CLI
node cli/yvon.js doctor # Fleet health check
node cli/yvon.js agents # List all 46 agents
node cli/yvon.js graph # Generate knowledge graph reports- 4-layer multi-tenant architecture designed (YVON Core β Agent Layer β Integration Layer β AgentX Platform)
- Google agents-cli patterns integrated (scaffold, eval flywheel, manifest, agent cards, observability tiers)
- Complete work tree with 11 layers and fallback matrix
- Duplicate department directories removed (673 files), Teams/ is single source
- Project restructured: rag/ β core/harness/eval/monitor/verify/experiments + docs/
- Harness: 5-gate verification module built (authenticate, reliability, conflict, priority, quarantine)
- Eval: 6-metric LLM-as-judge + 5-stage quality flywheel (from Google agents-cli)
- Progressive disclosure: Skill lazy loading (40-60% context savings)
- Verifier: Post-hoc grounded citation + self-consistency + constitution
- Relational graph: Wired into harness Gate 3 (DEFINES/EXTENDS/CONTRADICTS/SUPERSEDES)
- Self-improver: Weekly autonomous optimization (analyze β propose β sandbox test β deploy)
- Field monitor: Attractors, degradation, coverage gaps, drift
- quality_score bug: chunks.json had no quality_score (all flat 0.5). Fixed in chunkify.py
- Same-source conflicts: Same-file chunks created false SUPERSEDES edges. Fixed β skip edges for same source_file
- Agent retrieval bug: Fallback path cutoff excluded all Engineering chunks (indices 3581+ of 4839). Fixed with department pre-filter + agent bonus (+0.15 for own files)
- Scoring imbalance: 45% quality weight crushed agent SKILL.md (0.65) vs wisdom docs (1.0). Rebalanced to 40/20/40
- TypeScript build: 6 compilation errors fixed (classifier regex, Promise typing, stringβunion type)
- Next.js 14 App Router with 6 pages, Tailwind, Lucide icons
- Brand health rings (signature element), 200ms transitions
- Add Brand wizard (3-step β provision), API route for pipeline data
- Design approved β Clean/Modern, Inter typography, amber/slate palette
- Git state fixed (719 staged deletions reset), .gitignore created, .DS_Store cleaned
- requirements.txt created (sentence-transformers, scikit-learn, sqlite-vec)
- npm install fixed (6 TS errors resolved, all modules compile)
- 4,839 chunks rebuilt with quality scores v2
- sentence-transformers (embeddings)
- scikit-learn (sparse vectors)
- sqlite-vec (vector store)
- pypdf, pdfplumber (document chunking)
- Next.js 14, React 18, Tailwind CSS, Lucide React (dashboard)
- TypeScript (source compilation)
| Document | Content |
|---|---|
docs/4LAYER.md |
Multi-tenant architecture for YVON + AgentX |
docs/DASHBOARD.md |
Dashboard design with Engineering agent review |
docs/FULL.md |
Complete project architecture |
docs/GOOGLE_PATTERNS.md |
Google agents-cli pattern integration |
docs/HARNESS.md |
5-gate harness architecture plan |
docs/WORK_TREE.md |
Complete work tree with 11 layers and fallbacks |
docs/CODE_STRUCTURE.md |
Code organization and restructuring plan |
MIT β YVON Engine is open source under the MIT license. Contributions welcome.