documentation / architecture
Architecture
The request lifecycle is modular: provider and planning concerns are separated from safety, execution, orchestration, and persistence.
shell / CLI→planner→safety→executor→history
Command model
Commands use an executable name and argument vector. There is no shell-string field, and the executor passes arguments directly to the operating system.
Recovery
The orchestrator feeds failed step observations back to the planner and retries within the configured iteration bound. Planning and history failures are typed errors; safety denials and user rejections are terminal statuses.
Interfaces
AiProvider, Planner, CommandRunner, Approver, and HistoryStore keep modules independently testable with mock implementations.