CLI Safety Model
The CLI is read-only until you say otherwise. Every write — creating an order, adjusting inventory, moving money — requires an explicit--apply.
That default exists because the CLI is frequently held by an agent, and an agent exploring your
data should not be able to change it as a side effect of looking.
Read-only by default
--apply, no mutation. A misinterpreted request costs you a wrong answer, not a wrong write.
Explicit write intent
--apply
describes what would happen; it doesn’t do it.
Why this shape
This is the same principle as the decision gate: the default
outcome of ambiguity is no action, not a guess. Forgetting
--apply gets you a read; there is no
way to forget your way into a write.Scoping an agent
--apply is the coarse control. For an agent, layer these:
Separate the read path from the write path. Give an exploratory agent a wrapper that cannot
pass --apply at all, rather than trusting it to omit the flag.
Use stateset-direct for anything automated. The natural-language binary interprets phrasing,
so the same instruction can resolve differently as the model changes. Deterministic commands
produce the same action every run.
Point at a copy first. --db <path> selects the database. Run a new agent against a copy of
the store before pointing it at the real one.
--json when parsing. Prose output shape isn’t a contract; the JSON shape is.
What --apply does not protect against
It is a gate on intent, not on correctness. --apply "refund order #12345 for $2999.00" will
attempt exactly that. For value-based limits and human approval on consequential actions, use the
review gate and High-Value Action threshold.