# Hierarchy

- ## Frontend

  - ### Libraries

    - Typescript
    - Zodios
    - Svelte
    - NodeJS

  - ### Layout

    - #### Side pane

      Research Modes

      - Server Configuration

      - ##### Compiler

        - Compiler Configuration
        - Abstract Syntax Tree
        - Dataset Builder

      - ##### Prompting

        - Research Modes
        - Prompts
        - Prompt Configuration
        - Prompt Relations
        - Inference Window

      - ##### Trace

        - Logs

      - ##### WBS

        - Tasks
        - Phases

    - #### Status Bar

      - Compile
      - Prompt
      - WBS
      - UML

    - #### Content area

      - Terminal
      - LLM Prompt
      - WBS
    - Notifications

  - ### Classes

    - #### Base Classes

      - BaseState
      - BaseLibrary
      - BaseCRUD

    - #### Data Classes

      - Prompt / PromptLibrary
      - PromptConfig / PromptConfigLibrary
      - PromptPair / PromptPairLibrary
      - ResearchTier / ResearchTierLibrary
      - LLMModel / LLMModelLibrary
      - LLMServer / LLMServerLibrary
      - Server / ServerLibrary

  - ### UI Components

    - DynamicField
    - CrudModelView
    - GenericForm
    - TaskEditorModal
    - GenericListView
    - CollapsablePane

- ## Backend

  - ### Libraries

    - PyDantic
    - SQL Alchemy
    - PyDantic
    - FastAPI
    - Unicorn
    - SQLLite

  - ### Components

    - Engine
    - ASTSerializer
    - Controllers
    - Router / Endpoints
    - Database

    - #### API Schema

      - Create
      - Read
      - Update
      - Delete
    - Migrations & Seeds

  - ### Database Models & API Endpoints

    - ResearchMode
    - Prompt
    - PromptConfig
    - PromptPair
    - CompilerConfig
    - Manifest
    - BatchJob
    - CompilerJob
    - LLMModel
    - LLMServer
    - WBSPhase
    - WBSTask

  - ### Payloads

    - CommandPayload
    - DispatchContext

  - ### Artifacts & Persistent storage

    - CompileJobs
    - BatchJobs
    - AST / Source Code
    - Binary Code
    - BuildRegistry

  - ### Functionality

    - API Server
    - Database Storage
    - Compiler Interface
    - Data Generation

- ## Compiler

  - ### 5 Step Pipeline

    1. Frontend Lex/Parse (JSON AST to `ILanguageProvider` validation).
    2. Seeded Interning (Function/Object to Base 38 Macro mapping).
    3. Linearization (AST to 1D token stream).
    4. Logic Squeeze (SSA reduction, constant folding, DCE).
    5. Tier 0 Emission (.hex binary generation and Shadow Alias Registry mapping).

  - ### Components

    - DocumentWriter
    - Artifacts
    - Driver
    - RunConfig
    - CompilationResult/Manifest
    - ISRMap
    - Interner
    - ConfigProxy
    - Optimizer
    - SchemaBuilder
    - OptionDef
    - ILanguageProvider
    - SymbolRegistry
    - RotatingFileSink
    - TokenRegistry
    - VM

  - ### C++ Pybindings

    - Manifest
    - RunConfig
    - process_single_mission