fable-agent/STATE.md

95 lines
4.0 KiB
Markdown

# 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: —
- Current goal: —
- Open threads: —
---
## 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
- 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.
---
## 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.*