Commit Graph

1 Commits

Author SHA1 Message Date
HAL9000 3e5e5974c4 test(cli): validate docstring examples respect positional order
Implemented DocstringExampleValidator class in src/cleveragents/cli/docstring_validator.py that validates CLI command docstring examples to ensure positional arguments precede option flags and align with Typer signatures.

Added Behave feature file at features/cli_docstring_example_validation.feature containing scenarios for valid and invalid docstring examples and edge cases.

Added step definitions at features/steps/cli_docstring_example_validation_steps.py implementing Given/When/Then steps to drive validation and report mismatches.

Fixed the problematic docstring in src/cleveragents/cli/commands/plan.py (rollback_plan function) to reflect correct positional argument order and clearer usage.

The validator ensures that docstring examples have positional arguments before option flags, matching the actual Typer command signature.

ISSUES CLOSED: #9106
2026-06-02 14:01:58 -04:00