feat(spec,parse): add repeatable clause groups - #1321
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
afb02b9 to
a3dcdce
Compare
a3dcdce to
bde9cf0
Compare
bde9cf0 to
77c2d44
Compare
77c2d44 to
664f277
Compare
5055214 to
14f6fc6
Compare
14f6fc6 to
ea0bc3a
Compare
936196b to
8b07e40
Compare
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes. Shadow comparisonParsing
|
6b00bd5 to
b908b50
Compare
b908b50 to
1b61021
Compare
1b61021 to
d74267e
Compare
d74267e to
f824fa6
Compare
f824fa6 to
715e8a5
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 715e8a5. Configure here.

Summary
Stack
Test plan
AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.
Note
Medium Risk
Core argv parsing and validation behavior change in usage-lib with new output shape (
clauses); completion logic is updated, but adopters must opt into clause specs and bump to 6.6.Overview
Release 6.6.0 introduces clauses: repeatable, separator-delimited groups of positional args that keep every instance (unlike
restart_token, which only retains the last).Specs gain a
clauseKDL node (one per command, positionalargchildren only; mutually exclusive with top-level args,restart_token, and sigil args). Parse output addsParseOutput::clausesandTokenRole::ClauseSeparator. The parser routes positionals throughactive_args, splits on the separator even afterdouble_dash="automatic", re-enables flags at boundaries, and skips env/defaults inside clause instances. Per-instance validation covers required args, variadic bounds, andrequires/conflicts/required_if*rules; a newMissingClauseArgerror is exposed.Shell completion treats clause separators like restart tokens for restarting positional completion at the first inner arg. Docs add a clauses reference page and link it from
cmd; an example spec and conformance tests cover parsing,--protection, KDL round-trip, and relationships.Reviewed by Cursor Bugbot for commit 685848a. Bugbot is set up for automated code reviews on this repo. Configure here.