--- status: accepted date: 2026-06-25 --- # Keep workflow state in harness phase documents The harness owns the NL→SQL workflow and all of its persistence. A session is a manifest, one document per phase (`question.md`, `schema_linking.json`, `sql_final.sql`, …) and an append-only decision ledger; there is no stored transcript, and a resumed Pi process rebuilds its context from those documents. The workflow is a linear sequence of phases declared in `harness/workflow.yaml`, and the current phase is never stored: it is an integer derived by folding the ledger. This keeps the ChironeWp3 session model, whose append-only ledger was its most reliable part, and makes resumption independent of chat history. ## Consequences What is not recorded in a phase document or in the ledger did not happen. Phase logic must be read from the fold, not from a field, and adding parallel or optional branches would require a different model than the linear workflow. Where sessions are stored changed later (ADR-0011); this ownership did not.