# πŸ“ Project Lyra β€” Cognitive Assembly Spec **Version:** 0.6.1 **Status:** Canonical reference **Purpose:** Define clear separation of Self, Thought, Reasoning, and Speech --- ## 1. High-Level Overview Lyra is composed of **four distinct cognitive layers**, plus I/O. Each layer has: - a **responsibility** - a **scope** - clear **inputs / outputs** - explicit **authority boundaries** No layer is allowed to β€œdo everything.” --- ## 2. Layer Definitions ### 2.1 Autonomy / Self (NON-LLM) **What it is** - Persistent identity - Long-term state - Mood, preferences, values - Continuity across time **What it is NOT** - Not a reasoning engine - Not a planner - Not a speaker - Not creative **Implementation** - Data + light logic - JSON / Python objects - No LLM calls **Lives at** ``` project-lyra/autonomy/self/ ``` **Inputs** - Events (user message received, response sent) - Time / idle ticks (later) **Outputs** - Self state snapshot - Flags / preferences (e.g. verbosity, tone bias) --- ### 2.2 Inner Monologue (LLM, PRIVATE) **What it is** - Internal language-based thought - Reflection - Intent formation - β€œWhat do I think about this?” **What it is NOT** - Not final reasoning - Not execution - Not user-facing **Model** - MythoMax **Lives at** ``` project-lyra/autonomy/monologue/ ``` **Inputs** - User message - Self state snapshot - Recent context summary **Outputs** - Intent - Tone guidance - Depth guidance - β€œConsult executive?” flag **Example Output** ```json { "intent": "technical_exploration", "tone": "focused", "depth": "deep", "consult_executive": true } ``` --- ### 2.3 Cortex (Reasoning & Execution) **What it is** - Thinking pipeline - Planning - Tool selection - Task execution - Draft generation **What it is NOT** - Not identity - Not personality - Not persistent self **Models** - DeepSeek-R1 β†’ Executive / Planner - GPT-4o-mini β†’ Executor / Drafter **Lives at** ``` project-lyra/cortex/ ``` **Inputs** - User message - Inner Monologue output - Memory / RAG / tools **Outputs** - Draft response (content only) - Metadata (sources, confidence, etc.) --- ### 2.4 Persona / Speech (LLM, USER-FACING) **What it is** - Voice - Style - Expression - Social behavior **What it is NOT** - Not planning - Not deep reasoning - Not decision-making **Model** - MythoMax **Lives at** ``` project-lyra/core/persona/ ``` **Inputs** - Draft response (from Cortex) - Tone + intent (from Inner Monologue) - Persona configuration **Outputs** - Final user-visible text --- ## 3. Message Flow (Authoritative) ### 3.1 Standard Message Path ``` User ↓ UI ↓ Relay ↓ Cortex ↓ Autonomy / Self (state snapshot) ↓ Inner Monologue (MythoMax) ↓ [ consult_executive? ] β”œβ”€ Yes β†’ DeepSeek-R1 (plan) └─ No β†’ skip ↓ GPT-4o-mini (execute & draft) ↓ Persona (MythoMax) ↓ Relay ↓ UI ↓ User ``` ### 3.2 Fast Path (No Thinking) ``` User β†’ UI β†’ Relay β†’ Persona β†’ Relay β†’ UI ``` --- ## 4. Authority Rules (Non-Negotiable) - Self never calls an LLM - Inner Monologue never speaks to the user - Cortex never applies personality - Persona never reasons or plans - DeepSeek never writes final answers - MythoMax never plans execution --- ## 5. Folder Mapping ``` project-lyra/ β”œβ”€β”€ autonomy/ β”‚ β”œβ”€β”€ self/ β”‚ β”œβ”€β”€ monologue/ β”‚ └── executive/ β”œβ”€β”€ cortex/ β”œβ”€β”€ core/ β”‚ └── persona/ β”œβ”€β”€ relay/ └── ui/ ``` --- ## 6. Current Status - UI βœ” - Relay βœ” - Cortex βœ” - Persona βœ” - Autonomy βœ” - Inner Monologue ⚠ partially wired - Executive gating ⚠ planned --- ## 7. Next Decision Decide whether **Inner Monologue runs every message** or **only when triggered**.