# Project State > This file is the system's persistent memory — Stages 3-5 of the PAIMM progression. > It survives between sessions so every run resumes, not restarts. > Auto-written by the dream engine. Do not delete entries without explicit confirmation. --- ## Stage 1 · Session Notes *Written each run. Cleared when archived to Stage 2.* - Last run: 2026-06-14 - Current goal: Complete Phase 15 Fusion — multi-model panel + OpenRouter Fusion + CineFable media + Fable 5 prompt engine - Open threads: — - Fixed: build errors in fusion-executor, openrouter-fusion-executor, media-generator - Fixed: ESM require() crash in fusion panels CLI - Verified: all 43 tests pass, demo runs, CLI fusion/generate commands operational --- ## Stage 2 · Run History *Appended each session. Used for pattern recognition by the dreaming system.* | # | Date | Goal | Outcome | Key Lesson | |---|------|------|---------|------------| --- ## Stage 3 · Verified Facts *Stop guessing about these. Verified by query, experiment, or human confirmation.* ### Architecture - fable-agent is a self-improving agent system implementing the Dream → Act → Validate → Codify loop - The system is model-agnostic — PhaseExecutor, ToolOrchestrator, and SafetyBoundary handle model routing - Fable 5 and Mythos 5 are BLOCKED (US export control directive, June 12, 2026) - Opus 4.8 is the top available tier for orchestration - Fusion panel (draft → critique → fuse) matches or exceeds Fable 5 capability using available models - OpenRouter Fusion API provides Fable-tier compound model access via single API call - State persists across sessions via `~/.fable-agent/` (JSON files) and `STATE.md` / `SKILLS/` (markdown) ### Persistence - `~/.fable-agent/` stores machine-readable state (sessions, knowledge, memory, skills) - `STATE.md` stores human-readable state (facts, rules, failure modes) - `SKILLS/` stores reusable procedural knowledge with version history ### Safety - Never route to blocked models (Fable 5, Mythos 5) - On 401/403/404, auto-block the model and fall through the chain - Verifier must be a SEPARATE sub-agent with clean context — never self-critique ### Dreaming - Dream every 3 goals or N iterations - Dream cycle: review → extract patterns → distill insights → codify → dream - Skills are versioned and auto-evolved by the dream engine --- ## Stage 4 · General Rules *Consult before re-deriving. These apply across tasks.* 1. **Verifier sub-agent beats self-critique** — never have the same model check its own output. 2. **State file accumulates; it does not replace.** New facts append; nothing is deleted without explicit human confirmation. 3. **Skills sharpen every run.** After any non-trivial failure or discovery, write the lesson into the relevant SKILL file. 4. **Route by model tier.** Opus 4.8 orchestrates. Sonnet 4.6 handles hard bounded subtasks. Haiku handles quick routine work. 5. **Dynamic workflows over static scripts.** Let the agent compose its own execution plan per task. 6. **Worktrees for parallelism.** Never have two agents writing the same checkout. Each sub-agent gets its own git worktree. 7. **Fable 5 is unavailable** (blocked by US export control directive, June 12, 2026). Opus 4.8 is the ceiling. Architect accordingly. 8. **Vision self-check before declaring done.** For visual tasks, verify output against goal via a vision-capable model. 9. **Dream every 3 goals.** The compounding primitive. Without dreaming, skills don't evolve and memory doesn't consolidate. 10. **Fusion panel beats single model for high-stakes work.** Run `fable-agent fusion run` for complex research, architecture, and debugging. 11. **OpenRouter Fusion API** is the zero-effort fusion option `(--openrouter)`. Local panel dispatch gives more control `(--panel opus4.8-gpt5.5)`. 12. **CineFable media generation** available via `fable-agent generate image/video` (fal.ai, needs FAL_KEY). --- ## Stage 5 · Failure Modes *Appended on discovery. Consult before repeating tasks.* *(Add entries here as failures are discovered. Each entry: symptom, root cause, fix.)* --- ## Memory Architecture | Stage | Type | Location | Persistence | |-------|------|----------|-------------| | 1 | Session notes | This file | Cleared each run | | 2 | Run history | This file, table | Appended each run | | 3 | Verified facts | This file | Human-confirmed only | | 4 | General rules | This file | Updated by agent + human review | | 5 | Failure modes | This file | Appended on discovery | | Skills | Procedural memory | `SKILLS/` directory | Sharpened each run | | Episodic | What happened | `~/.fable-agent/memory/episodic/` | Auto-managed | | Semantic | What it means | `~/.fable-agent/memory/semantic/` | Auto-managed | | Procedural | How to do it | `~/.fable-agent/memory/procedural/` | Auto-managed | *Stage 1-2 are session memory. Stage 3-5 are durable. Skills are executable. Episodic/semantic/procedural are machine-managed.*