Repository navigation
v0.15.0
Every CLI flag and argument declares its presence explicitly, on strictcli 0.41.0.
Context
strictcli 0.41.0 makes the per-flag presence declaration mandatory -- exactly
one of presence="required", presence="optional" or default=, never
inferred from the shape of another declaration -- and bans value defaults on
any command declaring effect="mutating", on the grounds that absence must never
resolve to a value the invocation did not state.
claudestream's five session commands plus agent run are all mutating, so the
ban reached 48 of the CLI's 51 declared defaults, and 16 further declarations
carried no presence at all (they were implicitly required under the old rules).
0.41.0 also removed required= from arg(), so the previous spelling did not even
import.
The triage was per site rather than mechanical. Every default="" turned out to
be an empty-string sentinel whose absence was reconstructed downstream by
testing the value for falsiness -- cwd or None, if profile:,
system_prompt or None -- so those flags declare optionality and deliver None,
which is passed straight through to SessionConfig. The behavioral switches
(--footer, --color, --raw, --stdin, --skip-permissions, --json-output) took the
third remedy the ban allows: they declare optionality and name their fallback
in their own help text, with one helper as the single place absence becomes
that fallback. --var keeps default=[], the one default the ban leaves legal.
The machine-output migration is deliberately not part of this. claudestream's
JSON output is a stream of one object per line, not the single document
strictcli's envelope describes, and the per-line framing that would be needed
does not exist in the framework yet. The design questions are written down in
todo/per-line-envelope-for-the-jsonl-event-stream.md rather than answered
privately here.
Breaking
- strictcli 0.41.0 is now required, and every CLI flag and argument declares its presence explicitly.
--helpstates for each one whether it is required, optional or carries a default, and an optional flag's help says what omitting it means. One behavior follows from it: an explicitly supplied empty prompt is now a supplied prompt, soclaudestream send "" --stdinreports the both-sources conflict instead of silently letting--stdinwin.