mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-07 00:24:50 +08:00
The direct CLI wrappers for agents, skills, and mcp treated nested help flags as ordinary operands. That made commands like `claw mcp show --help` report a missing server and `claw skills install --help` fall into filesystem install logic instead of surfacing usage. This change normalizes help-path arguments before dispatch so nested help stays on the help path. The regression tests cover both handler-level behavior and end-to-end CLI output for nested help and unknown subcommands with trailing help flags. Constraint: Keep the fix scoped to direct CLI slash-command wrappers without changing unrelated parser behavior Rejected: Rework top-level argument parsing for all subcommands | broader risk than needed for the regression Confidence: high Scope-risk: narrow Reversibility: clean Directive: If more nested subcommands are added, extend the help-path normalization table before relying on raw operand dispatch Tested: cargo build -p commands -p rusty-claude-cli Tested: cargo test -p commands -p rusty-claude-cli Not-tested: cargo clippy -p commands -p rusty-claude-cli --all-targets --no-deps -- -D warnings (pre-existing warnings in untouched files block clean run)