@cli Feature: CLI output formats parity As a developer using the CleverAgents CLI I want all action and plan commands to support --format json|yaml|plain|table|rich So that I can integrate CLI output with external tooling Background: Given a CLI output format test runner And a mocked lifecycle service for format tests # Action list --format json Scenario: Action list outputs valid JSON Given there are actions for format testing When I run action list with --format json Then the output should be valid JSON And the JSON should contain key "namespaced_name" # Action show --format yaml Scenario: Action show outputs valid YAML Given there is a single action for format testing When I run action show with --format yaml Then the output should be valid YAML And the YAML should contain key "namespaced_name" # Plan list --format json Scenario: Plan list outputs valid JSON Given there are plans for format testing When I run plan list with --format json Then the output should be valid JSON And the JSON should contain key "plan_id" # Plan status --format json (single plan) Scenario: Plan status single plan outputs valid JSON Given there is a single plan for format testing When I run plan status with plan id and --format json Then the output should be valid JSON And the JSON should contain key "processing_state" # Plan status --format plain (single plan) Scenario: Plan status single plan outputs plain text Given there is a single plan for format testing When I run plan status with plan id and --format plain Then the format output should contain "plan_id:" And the format output should contain "processing_state:" # Action list --format table Scenario: Action list outputs table format Given there are actions for format testing When I run action list with --format table Then the format output should contain "namespaced_name" # Action list --format plain Scenario: Action list outputs plain format Given there are actions for format testing When I run action list with --format plain Then the format output should contain "namespaced_name:" # Action archive --format json Scenario: Action archive outputs valid JSON Given there is an archivable action for format testing When I run action archive with --format json Then the output should be valid JSON And the JSON should contain key "archived" # Plan status list all --format json Scenario: Plan status no args outputs valid JSON for list Given there are plans for format status listing When I run plan status without id and --format json Then the output should be valid JSON And the JSON should contain key "plan_id" # Plan use --format json Scenario: Plan use outputs valid JSON Given there is an action for plan use format test When I run plan use with --format json Then the output should be valid JSON And the JSON should contain key "plan_id" # Plan cancel --format json Scenario: Plan cancel outputs valid JSON Given there is a plan for cancel format test When I run plan cancel with --format json Then the output should be valid JSON And the JSON should contain key "processing_state" # Format consistency: same data, different renders Scenario: JSON and YAML contain the same action keys Given there is a single action for format testing When I run action show with --format json And I save the output keys as json_keys And I run action show with --format yaml And I save the output keys as yaml_keys Then json_keys and yaml_keys should match # Direct formatting module tests Scenario: Format output handles all format types for dict When I call format_output with a dict and format json Then the format result should be valid JSON dict When I call format_output with a dict and format yaml Then the format result should be valid YAML dict When I call format_output with a dict and format plain Then the format result should contain plain key-value pairs When I call format_output with a dict and format table Then the format result should contain table output # fix(cli): format_output() rich format must produce styled output, not JSON Scenario: Format output rich format produces styled terminal output not JSON When I call format_output with a dict and format rich Then the format result should contain rich styled output And the format result should not be valid JSON # fix(cli): format_output() color format must produce ANSI-colored output not plain text Scenario: Format output color format produces ANSI-colored output not plain text When I call format_output with a dict and format color Then the format result should contain color styled output And the format result should not be plain text only Scenario: Format output handles list data When I call format_output with a list and format plain Then the format result should contain separator lines Scenario: Format output rich format handles list data When I call format_output with a list and format rich Then the format result should contain rich styled list output And the format result should not be valid JSON Scenario: Format output color format handles list data When I call format_output with a list and format color Then the format result should contain color styled list output And the format result should not be plain text only Scenario: Serialize value handles enums and nested dicts When I call serialize_value with enum and nested data Then the serialized result should have string enum values