SPECIFICATION // ARCHITECTURAL DEEP DIVE

The 5-Layer Engine
of Autonomous Engineering.

Kobits rejects vector-similarity guessing and unverified code injection. Every pull request is the result of isolated microVM compilation, compiler-grade LSP AST indexing, and self-healing test loops.

LAYER 01 // THE METAL

Ephemeral MicroVM Cleanrooms

Agents never execute unvetted code in shared local processes or containers. Kobits boots an isolated Linux microVM sandbox in under 300ms.

  • Full root privileges inside disposable guest kernel
  • Native compiler support (Python, TypeScript, Rust, Go)
  • Zero blast radius to host repository or developer machine
// MICROVM BOOT TELEMETRY
INIT :: rootfs cleanroom
NET :: egress filter active
CPUS :: 4 vCPU allocated
MEM :: 8192 MB bounded
READY IN 284ms
LAYER 02 // COGNITIVE ARCHITECTURE

Dual-Loop Intelligence (Strategic vs. Tactical)

Single-prompt LLMs hallucinate on complex repos. Kobits separates strategic DAG planning from tactical tool loops.

  • Outer Loop (System-2): Builds dependency DAGs with strict preconditions and evidence contracts
  • Inner Loop (System-1): Executes high-frequency file edits, AST queries, and bash tool iterations
  • 1/20th the token compute cost of frontier-only monolithic agent loops
// TOPOLOGICAL DAG
[01] INTAKE & ANALYSIS
└── [02] REPRO TEST SUITE
└── [03] ENGINE MODIFICATION
└── [04] VERIFICATION (AST)
└── [05] PR GENERATION
LAYER 03 // COMPILER INTELLIGENCE

Language Server Protocol (LSP) AST Navigation

Traditional agents use embedding search (RAG) which fails on code because cosine similarity misses callers, inheritance, and type signatures.

  • Real language servers (Pyright & TypeScript language server) running inside the sandbox
  • 100% compiler precision for goto-definition, find-references, and symbols
  • Zero probabilistic guessing for function definitions across multi-file projects
// LSP SERVER HOOKS
lsp.goto_definition("UserSchema")
→ backend/models/user.py:42
lsp.find_references("verify_token")
→ 14 callers indexed across 6 modules
lsp.document_symbols("auth.py")
LAYER 04 // VERIFICATION & RECOVERY

The TDD Sentinel & Self-Healing Loop

Kobits never creates a Pull Request on hope. Before touching feature files, it writes a reproduction test case that captures the objective.

  • Automated pytest / jest test runner executions inside sandbox
  • Parses exit codes, stack traces, and compiler warnings automatically
  • Iterates up to budgeted attempts until every test passes green
// TDD SENTINEL OUTPUT
ATTEMPT 1: AssertionError: 401 != 200
HEALING : Adjusting auth headers...
ATTEMPT 2: 12 passed in 1.48s [100%]
STATUS : VERIFIED GREEN
LAYER 05 // RESILIENCE

Durable Distributed State Machine

Production missions can take 10 to 45 minutes. If a worker blips or network drops, Kobits resumes seamlessly without restarting from scratch.

  • State checkpointing in PostgreSQL and durable task lease management
  • Complete history trace: every diff, agent thought, and tool output preserved
  • Human-in-the-loop approvals for sensitive architecture or migration gates
// DURABLE CHECKPOINT
STEP 12/18 :: CHECKPOINT STORED
DB COMMIT :: 4 files modified
LEASE RESUME :: WORKER-NODE-03
ZERO RE-COMPUTE NECESSARY