Wizard refactor
Today the agent is tightly coupled to the store and to programs. We're splitting them apart. Then you can run a single program headlessly or from code, or import the agent on its own and pass in the bindings and prompts, without touching the rest of the wizard. It also lets us split the code better.
What A changes
- A draws a boundary around the agent: one exported interface, so the agent is a clean module that isn't tightly coupled to the store.
- The agent gets everything it needs to run from the program's binding, passed in directly.
- It doesn't touch the store. When it needs to surface something to the user, it goes through interaction callbacks.
What B changes
- B separates the wizard TUI, with its store and screen logic, from the logic that just runs a program.
- That makes room for the following, which are part of C:
- Running a program directly.
- Clean boundaries between programs.
- Running the agent directly.
What C changes
- C gives each host its own state and one way in: the TUI, headless and embedders all call
runProgram. The old adapter goes away.
- Other agents and tests can call
runAgent directly.
- Every layer gets its own folder, and the compiler enforces both fences.
🤖 Generated with Claude Code
Wizard refactor
Today the agent is tightly coupled to the store and to programs. We're splitting them apart. Then you can run a single program headlessly or from code, or import the agent on its own and pass in the bindings and prompts, without touching the rest of the wizard. It also lets us split the code better.
What A changes
What B changes
What C changes
runProgram. The old adapter goes away.runAgentdirectly.🤖 Generated with Claude Code