7ea13cb6d6
Add the `list` subcommand to the validation CLI command group. This fixes issue #8621 where users were unable to list registered validations through the CLI interface due to the command not being implemented and registered. Changes: - Added `list` command with --namespace/-n, --source/-s, and --pattern/-p (regex) filters for listing validation agents - Extracted shared helper functions into new validation_helpers.py module - Updated imports in validation.py to use extracted helpers instead of inline private functions - Fixed lint and formatting issues Testing: - Added BDD regression test feature file (features/validation_list_command.feature) with 7 scenarios covering: empty state, rich table display, namespace/source/pattern filtering, JSON output, and YAML output modes - Added corresponding step definitions in features/steps/validation_list_command_steps.py ISSUES CLOSED: #8621
49 lines
2.2 KiB
Gherkin
49 lines
2.2 KiB
Gherkin
Feature: Validation list command
|
|
As a CleverAgents user
|
|
I want to list all registered validations through the CLI
|
|
So that I can inspect my validation configurations
|
|
|
|
@tdd_issue_8621
|
|
Scenario: List validations shows empty state with no registrations
|
|
Given a validation list command runner
|
|
When I run the validation list command with no registered validations
|
|
Then the output should contain "No validations found"
|
|
And the output should contain "Register one with 'agents validation add --config <file>'"
|
|
|
|
@tdd_issue_8621
|
|
Scenario: List validations displays all registrations in rich table format
|
|
Given a tool registry with registered validation tools
|
|
When I run the validation list command
|
|
Then the output should display a rich table
|
|
And the table should contain column headers "Name", "Mode", "Source", "Description"
|
|
|
|
@tdd_issue_8621
|
|
Scenario: List validations filters by namespace
|
|
Given a tool registry with namespaced validation tools
|
|
When I run the validation list command with namespace filter "local"
|
|
Then the output should only include validations matching namespace "local"
|
|
|
|
@tdd_issue_8621
|
|
Scenario: List validations filters by source
|
|
Given a tool registry with different sourced validation tools
|
|
When I run the validation list command with source filter "custom"
|
|
Then the output should only include validations from source "custom"
|
|
|
|
@tdd_issue_8621
|
|
Scenario: List validations filters by regex pattern
|
|
Given a tool registry with numbered validation tools
|
|
When I run the validation list command with pattern "coverage.*"
|
|
Then the output should only include matching validation names
|
|
|
|
@tdd_issue_8621
|
|
Scenario: List validations outputs JSON format
|
|
Given a tool registry with registered validation tools
|
|
When I run the validation list command with format "json"
|
|
Then the output should be valid JSON containing the registered validations
|
|
|
|
@tdd_issue_8621
|
|
Scenario: List validations outputs YAML format
|
|
Given a tool registry with registered validation tools
|
|
When I run the validation list command with format "yaml"
|
|
Then the output should be valid YAML containing the registered validations
|