250 lines
3.7 KiB
Markdown
250 lines
3.7 KiB
Markdown
# 📐 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**.
|