Files
cleveragents-core/features/actor_cli_yaml.feature
freemo f7993d7309 feat(cli): align actor commands to YAML
Align actor add/remove/list/show commands to YAML-first configs,
namespaced names, and --format json|yaml|plain output support.

Changes:
- Add --format option to list, show, add, and update commands
- Add --update flag to add command for updating existing actors
- Add _actor_spec_dict helper for structured output serialization
- Update _print_actor to support format_output rendering
- Add Behave feature tests for CLI format scenarios (11 scenarios)
- Add Robot Framework integration test for show output fields
- Add ASV benchmark for actor CLI parsing overhead
- Add CLI reference documentation for actor commands

ISSUES CLOSED: #288
2026-02-24 19:12:01 +00:00

64 lines
2.3 KiB
Gherkin

Feature: Actor CLI YAML-first alignment
As a developer
I want actor CLI commands aligned to YAML-first configs
So that actors can be managed with namespaced names and multiple output formats
Scenario: Actor list outputs JSON format
Given an actor CLI runner
When I run actor list with two actors using format json
Then the actor list output should be valid JSON
Scenario: Actor list outputs YAML format
Given an actor CLI runner
When I run actor list with two actors using format yaml
Then the actor list output should contain YAML keys
Scenario: Actor list outputs plain format
Given an actor CLI runner
When I run actor list with two actors using format plain
Then the actor list output should contain plain text fields
Scenario: Actor show outputs JSON format
Given an actor CLI runner
When I run actor show with format json
Then the actor show output should be valid JSON with actor fields
Scenario: Actor show outputs YAML format
Given an actor CLI runner
When I run actor show with format yaml
Then the actor show output should contain YAML actor keys
Scenario: Actor show outputs plain format
Given an actor CLI runner
When I run actor show with format plain
Then the actor show output should contain plain actor fields
Scenario: Actor add with update flag
Given an actor CLI runner
And I have an actor JSON config file
When I run actor add with update flag
Then the actor add should pass the loaded config
And the output should say Actor updated
Scenario: Actor add outputs JSON format
Given an actor CLI runner
And I have an actor JSON config file
When I run actor add with format json
Then the actor add output should contain JSON data
Scenario: Actor add with YAML config file and format
Given an actor CLI runner
And I have an actor YAML-only config file
When I run actor add with format yaml
Then the actor add output should contain YAML data
Scenario: Actor remove by namespaced name
Given an actor CLI runner
When I run actor remove with namespaced name
Then the actor remove should succeed for namespaced name
Scenario: Actor update outputs JSON format
Given an actor CLI runner
When I run actor update with format json
Then the actor update output should contain JSON data