Skip to content

Latest commit

 

History

History
84 lines (60 loc) · 2.16 KB

File metadata and controls

84 lines (60 loc) · 2.16 KB

🏗 Architecture

Overview

detoks is a wrapper system that operates in front of an LLM CLI.


End-to-End Flow

User Input

Prompt Compiler

Translation Guardrails ↓ Request Analyzer ↓
Task Graph Builder

Context Optimizer

LLM CLI (Codex / Gemini)

Output Processor

State Manager

User Output


Layers

1. CLI Layer

  • User interface
  • REPL

2. Core Layer

  • Pipeline orchestration
  • Prompt processing
  • Translation guardrails
  • Request analysis
  • LLM client boundary
  • Prompt processing
  • Translation guardrails
  • LLM client boundary
  • State management

3. LLM Layer

  • in-process node-llama-cpp inference runtime
  • Model loading and chat completion configuration

4. Integration Layer

  • CLI adapters
  • Subprocess execution

Key Characteristics

  • Unidirectional data flow
  • State-driven execution
  • Clear separation between model responsibilities and code responsibilities