CLI and TUI Development SOP
Prerequisites
Read the module overview, then confirm the business owner, inputs, outputs, failure conditions, and permission boundary.
Procedure
- Create or adopt a project.
- Check the local environment with doctor.
- Develop with run or chat.
- Accept with check and eval.
- Use TUI for people,
--printfor text pipes, and--json-eventsfor automation; never pass the last two options together. - Automation must check both the exit code and final
run_result, while preserving stderr diagnostics. - Inject denial, budget exhaustion, timeout, and abort, then verify
2/3/124/130respectively. - For an explicit Loop, inject verification failure, pause-resume, and exhaustion; compare TUI, readline, and JSONL state order.
- Confirm resume does not replay completed steps or committed effects and requires human reconciliation for unknown effects.
- Compare TUI
/status,/artifacts, and/contextwith the final JSONLsnapshot; fields must match actual files and run state. - Run the listed module tests and
npm run check:modules. - Preserve trace, evaluation, and owner-approval evidence; do not publish without explicit authorization.
Stop conditions
Stop for unconfirmed business rules, non-reversible side effects, access outside the workspace, unavailable real credentials, or failed security gates. Ask the owner instead of expanding scope.