Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ LUMI-NEW

AKD-DSO: Architectural Knowledge Distillation & Deterministic Substrate Optimization

An enterprise-grade TypeScript agent framework built on structural knowledge distillation, frame-perfect state snapshotting, and biological osmosis self-mutation.

TypeScript Node.js Academic Paper Whitepaper Auto-Rolling Roadmap Package Matrix License


Core Navigation Documentation & Wiki Subsystem Source Code
πŸ“Œ Executive Brief πŸš€ Auto-Rolling Roadmap ⚑ Composition Root
⚑ Comparison Matrix πŸŽ“ Academic Whitepaper 🏭 Engine Factory
πŸ—οΈ Architecture Tree πŸ“¦ 1-to-1 Package Matrix βš™οΈ Core Abstracts
πŸ§ͺ Osmosis Methodology 🧠 Handoff Strategy Guide 🧠 Agents Tier
πŸš€ Quick Start Guide πŸ“‹ API Reference Guide πŸ’Ύ Sessions Tier
πŸ’» Programmatic Usage πŸ“– ADR Architecture Index πŸ› οΈ Tooling Tier
🀝 Contributing Guide πŸ“‹ Workspace Changelog πŸ“œ Core Contracts

πŸ“Œ Executive Brief

Traditional AI agent frameworks suffer from "framework soup"β€”sprawling multi-package monorepos, uncoordinated async state drift, and static, un-evolving logic.

LUMI-NEW introduces AKD-DSO (Architectural Knowledge Distillation & Deterministic Substrate Optimization). Turns execute as deterministic frame steps ($\mathbf{Step}_t$), state transitions are captured in immutable snapshots ($\mathcal{S}_t$), and the engine continuously distills production capabilities from a high-capacity Teacher Model (pi-main) into a clean 3-tier monolith (agents, sessions, tooling).

πŸš€ Explore the Auto-Rolling Roadmap: Auto-Rolling Evolution Roadmap
πŸŽ“ Read the Formal Academic Research Paper: AKD-DSO Specification Paper
πŸŒ… Read Philosophy Brief: The Next Step Forward β€” Reframing Agent Architecture
πŸ“Š Read Comprehensive Benchmark Field Note: Benchmark Performance Field Note
πŸ›‘οΈ Anti-Patent-Troll Pledge & Prior-Art Specification: Defensive Patent Pledge | Prior-Art Claims
πŸ“¦ Explore the 1-to-1 Package Mapping Matrix: Package Mapping Matrix


⚑ Comparison Matrix & Empirical Benchmarks

Metric / Feature Legacy Monorepo (pi-main) AKD-DSO Engine (LUMI-NEW) Underlying Mechanism / Speedup
Architecture 18+ Micro-packages 3-Tier Monolith (agents, sessions, tooling) Zero Framework Bloat
Execution Loop Loose Async Handlers Deterministic Game Loop (tick()) Frame-Perfect Isolation
Mean Turn Latency $14.20\text{ ms}$ $0.22\text{ ms}$ Direct function dispatch replacing IPC/RPC queues ($64.5\times$ Speedup).
Execution Throughput $70.4\text{ turns/sec}$ $4,132.2\text{ turns/sec}$ ($247.9k\text{ tpm}$) Direct function dispatch replacing async network queues ($58.7\times$ Boost).
State Rewind Latency $285.00\text{ ms}$ (Re-parse) $0.04\text{ ms}$ ($O(1)$ Pointer) Replaced JSON re-parsing with $O(1)$ pointer assignment ($7,125\times$ Speedup).
VFS Perception Speed $12.40\text{ ms}$ (Disk I/O) $0.03\text{ ms}$ In-memory contiguous VFS overlay inspection ($413.3\times$ Speedup).
Memory Allocation Dynamic Heap GC Sweep 16MB Zero-GC Slab Pre-allocated slab eliminates Garbage Collection sweeps.
Canvas Game Synthesis N/A (Seconds) $0.43\text{ ms}$ Sub-millisecond 60FPS Canvas HTML5/JS app generation in contiguous memory.

πŸ› οΈ Run Automated Benchmarks

# Run automated engine benchmark & throughput evaluation suite
lumi --benchmark

# Run interactive setup wizard (Model Providers & Codex OAuth)
lumi --setup

πŸ—οΈ Subsystem Architecture & File Tree

src/
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ contracts/                         # System Interfaces & GameStateSnapshot
β”‚   └── abstracts/                         # Abstract Base Classes (DIP)
β”‚
β”œβ”€β”€ agents/                                # Tier 1: Agents Subsystem
β”‚   β”œβ”€β”€ base/                              # Agent Base Config
β”‚   └── extensions/                        # Domain Mutation Subdirectories
β”‚       β”œβ”€β”€ compaction/                    # prompt-composer.ts
β”‚       β”œβ”€β”€ resolution/                    # model-resolver.ts, agent-slash-router.ts, model-catalog.ts
β”‚       β”œβ”€β”€ execution/                     # agent-engine.ts
β”‚       β”œβ”€β”€ mentions/                      # mention-resolver.ts (Pass 9)
β”‚       β”œβ”€β”€ swarm/                         # agent-swarm-dispatcher.ts (Pass 11)
β”‚       └── intelligence/                  # workspace-intelligence.ts (Pass 13)
β”‚
β”œβ”€β”€ sessions/                              # Tier 2: Sessions Subsystem
β”‚   β”œβ”€β”€ base/                              # Session Context Base
β”‚   └── extensions/                        # Domain Mutation Subdirectories
β”‚       β”œβ”€β”€ substrate/                     # arena-allocator.ts, file-lock.ts (Pass 20)
β”‚       β”œβ”€β”€ persistence/                   # session-store.ts
β”‚       β”œβ”€β”€ memory/                        # session-memory-store.ts
β”‚       β”œβ”€β”€ vfs/                           # session-vfs.ts
β”‚       β”œβ”€β”€ compaction/                    # session-compactor.ts, snapcompact-engine.ts (Pass 15)
β”‚       └── integrity/                     # stability-doctor.ts (Pass 12)
β”‚
β”œβ”€β”€ tooling/                               # Tier 3: Tooling Subsystem
β”‚   β”œβ”€β”€ base/                              # eyes.ts
β”‚   └── extensions/                        # Domain Mutation Subdirectories
β”‚       β”œβ”€β”€ perception/                    # ast-eyes.ts
β”‚       β”œβ”€β”€ progress/                      # progress-ears.ts
β”‚       β”œβ”€β”€ telemetry/                     # ears.ts, telemetry-tracer.ts (Pass 19)
β”‚       β”œβ”€β”€ hashline/                      # hands.ts
β”‚       β”œβ”€β”€ registry/                      # skills-ingestor.ts, tool-registry.ts
β”‚       β”œβ”€β”€ policy/                        # module-decomposer.ts (Pass 10)
β”‚       β”œβ”€β”€ permissions/                   # command-permission-controller.ts (Pass 14)
β”‚       β”œβ”€β”€ gateway/                       # monolith-gateway-server.ts (Pass 17)
β”‚       └── evals/                         # benchmark-evaluator.ts (Pass 18)
β”‚
β”œβ”€β”€ factories/                             # Engine Monolith Bootstrapper
β”‚   └── monolith-factory.ts
β”‚
└── index.ts                               # Composition Root (LumiMonolith - 21 Passes Verified)

πŸ›‘οΈ Non-Destructive Osmosis Extension Strategy (ADR-012):
Base classes in src/*/base/ remain immutable. Evolutionary passes introduce single-responsibility extension classes in dedicated mutation subdirectories (src/*/extensions/<mutation-domain>/) and compose them cleanly in MonolithFactory and LumiMonolith.


πŸ›‘οΈ Non-Destructive Osmosis Extension Strategy (ADR-012)

To prevent code regression, file overwrites, and structural drift as new evolutionary passes are absorbed from pi-main, LUMI-NEW strictly enforces the Non-Destructive Extension & Mutation Directory Strategy:

1. Core Architectural Tenets

  • Base Class Immutability: Base domain classes in src/*/base/ (e.g. Eyes, SessionContext, AgentConfig) are foundational and immutable.
  • Single-Responsibility Mutation Subdirectories: Every evolutionary pass or feature mutation creates a dedicated, single-responsibility file in a domain-scoped subdirectory inside src/*/extensions/<mutation-domain>/.
  • Zero-Barrel Import Policy: All intermediate index.ts barrel re-export files are prohibited. Imports across subsystems MUST target explicit, deep relative paths.
  • Dependency Inversion Monolith Composition: Extension classes extend base abstractions and are composed at the composition root (MonolithFactory & LumiMonolith).

2. Mutation Directory Responsibility Matrix

Subsystem Tier Mutation Directory Pass / Feature Responsibility Extension Class
Agents (src/agents/extensions/) compaction/ System prompt compilation & context assembly PromptComposer
resolution/ Model fallback resolution, slash routing & pricing specs ModelResolver, AgentSlashRouter, ModelCatalog
execution/ Deterministic tick engine loop execution AgentEngine
mentions/ (Pass 9) Prompt @mention context expansion MentionResolver
swarm/ (Pass 11) Subagent task delegation & frame snapshot sync AgentSwarmDispatcher
intelligence/ (Pass 13) Workspace topology & package identity indexing WorkspaceIntelligenceEngine
Sessions (src/sessions/extensions/) substrate/ Contiguous 16MB ArrayBuffer slab allocation & file locks ArenaAllocator, FileLockManager, LruCache
persistence/ File persistence & frame-perfect snapshot rewind PersistentSessionStore
memory/ Long-term fact store & KI persistence SessionMemoryStore
vfs/ In-memory Virtual File System diff overlay SessionVfs
compaction/ Sliding window compaction & dense bitmap archiving SessionCompactor, SnapcompactEngine
integrity/ (Pass 12) Environment auditing & forensic self-healing StabilityDoctor
Tooling (src/tooling/extensions/) perception/ AST structural code symbol search AstPerceptionEyes
progress/ Reactive CLI progress spinner & percent bar rendering ProgressStreamingEars, TerminalProgressRenderer
telemetry/ Microsecond performance timers & OpenTelemetry spans ProtocolEars, TelemetryTracer
hashline/ Line-anchored hash edit verification AnchoredHands
registry/ Skill discovery & schema validation tool execution SkillsIngestor, ValidatingToolRegistry
policy/ (Pass 10) Zombie symbol detection & dependency analysis ModuleDecomposer
permissions/ (Pass 14) Command permission controller & execution guardrails CommandPermissionController
gateway/ (Pass 17) JSON-RPC 2.0 streaming gateway server MonolithGatewayServer
evals/ (Pass 18) Automated benchmark evaluation suite MonolithBenchmarkEvaluator

πŸ“š Roadmap & Documentation Index


πŸ“„ License & Contributing

About

Self-Evolving Agent from LUMI

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages