This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
A cheap prototype for testing whether typed external state makes a strong model less likely to build an impressive pile of locally plausible nonsense.
## Premise
Most coding agents are one token stream pretending to be a planner, scratchpad, architect, and release engineer at the same time. This workspace separates those roles outside the model first.
The goal is not to prove a new frontier architecture in a weekend. The goal is to find out whether explicit state channels and bounded controller actions reduce drift enough to matter.
## Core Artifacts
-`AGENTS.md`: project-specific instructions for future Codex sessions
-`state/map.yaml`: canonical, slow-changing model of the task or system
-`state/scratch.md`: temporary reasoning for one subgoal
-`state/branches.json`: branch hypotheses and branch outcomes
-`state/evidence.jsonl`: verifier outputs, acceptance reasons, and reversions
-`protocol/controller-actions.md`: allowed actions and write rules
-`notes/fresh-workspace-handoff.md`: concise summary for a fresh workspace
- use an explicit typed state-update surface for durable observations, evidence, map/frontier edits, and churn state instead of letting retrieval or transcript drift mutate the map sideways
- bake an explicit pre-compaction persistence workflow into the process, because forgetting to write down what matters and then acting surprised is not a serious engineering method
- make Epiphany an opinionated software development agent, not a generic assistant with some extra tags bolted on
- Phase 1 durable Epiphany state, Phase 2 prompt integration, a minimal Phase 3 typed client read surface, the Phase 4 hybrid retrieval/indexing slice, the first typed Epiphany state-update surface, the first typed distillation/proposal surface, and the first explicit promotion gate are all landed and verified
- the next concrete step is richer map/churn promotion on top of the explicit distill/promote/update surfaces, not more retrieval plumbing and not GUI paint
- expose typed retrieval state and typed `thread/epiphany/retrieve`
- keep retrieval read-only
- add explicit `thread/epiphany/index` for Qdrant-backed persistent semantic indexing
- preserve exact/path lookup and BM25 fallback when the persistent semantic backend is stale, missing, or unavailable
- move the heavy Epiphany-owned implementation into `epiphany-core/`, leaving vendored Codex with thin adapters plus the typed protocol/thread/app-server seam
If context pressure is clearly rising, do this **before** the hard compaction hits. A harness that only remembers to save itself after the blackout is still acting like a chat transcript with a superiority complex.
Pinned notes inside one giant prompt are better than nothing, but they are still one token soup. This workspace treats map, scratch, and output as different artifacts with different write rules.
That may still turn out to be elaborate prompt theater. Fine. At least it will be falsifiable prompt theater.
## Tiny CLI
Examples:
```powershell
python .\tools\epiphany_state.py status
python .\tools\epiphany_state.py add-evidence --type verify --status ok --note "Map and patch still agree"