Strict argument parsing means: if the caller passes anything invalid, the CLI errors immediately instead of silently ignoring it.
Right now some of your parsers are permissive. For example, cli/src/commands/share-options.ts:3 and cli/src/commands/list-options.ts:13 skip unknown flags, and you even test for that in cli/src/commands/share-options.test.ts:93.
Concrete example:
Current behavior:
bash
What happens now:
--jsno is ignored
- command still runs
- agent thinks it asked for machine-readable output, but gets human text instead
Strict behavior:
text
Why this matters for agents:
- agents typo flags
- agents infer flags that “should exist”
- silent ignore turns a clear mistake into wrong behavior
A few more examples of “strict”:
bash
-
permissive: ignores typo, may open an interactive confirm prompt and hang automation
-
strict: Unknown option --yees. Did you mean --yes?
-
Missing value
bash
bash
bash
- strict:
Unexpected argument extra
You already do some strict validation later in cli/src/commands/share.ts:467 for things like invalid --visibility or conflicting selectors. My recommendation was to push that strictness down into the parsing layer too, especially for unknown flags and missing values.
If you want, I can sketch what a stricter parser API would look like for share, list, and remove skills.