Feature: CLI extensions for plan and action commands As a developer using the CleverAgents CLI I want automation profile, invariant, and actor override flags So that I can customize plan creation and view extended details Background: Given a cli extensions test runner And a cli extensions mocked lifecycle service # --- plan use: automation profile --- Scenario: Plan use with --automation-profile persists to plan metadata Given a cli extensions action exists When I run plan use with automation profile flag "trusted" Then the cli extensions plan use should succeed And the cli extensions plan should have automation profile "trusted" Scenario: Plan use with invalid automation profile is rejected Given a cli extensions action exists When I run plan use with automation profile flag "nonexistent-profile" Then the cli extensions plan use should fail # --- plan use: invariant flags --- Scenario: Plan use with --invariant flags persists to plan metadata Given a cli extensions action exists When I run plan use with invariant flags "No warnings" and "Keep compat" Then the cli extensions plan use should succeed And the cli extensions service received invariants "No warnings" and "Keep compat" Scenario: Plan use with single invariant flag Given a cli extensions action exists When I run plan use with single invariant "All tests must pass" Then the cli extensions plan use should succeed And the cli extensions service received single invariant "All tests must pass" # --- plan use: actor override validation (valid namespaced) --- Scenario: Plan use with valid namespaced strategy-actor Given a cli extensions action exists When I run plan use with strategy actor flag "openai/gpt-4" Then the cli extensions plan use should succeed And the cli extensions plan has strategy actor "openai/gpt-4" Scenario: Plan use with valid namespaced execution-actor Given a cli extensions action exists When I run plan use with execution actor flag "anthropic/claude-3" Then the cli extensions plan use should succeed And the cli extensions plan has execution actor "anthropic/claude-3" Scenario: Plan use with valid namespaced estimation-actor Given a cli extensions action exists When I run plan use with estimation actor flag "openai/gpt-4" Then the cli extensions plan use should succeed And the cli extensions plan has estimation actor "openai/gpt-4" Scenario: Plan use with valid namespaced invariant-actor Given a cli extensions action exists When I run plan use with invariant actor flag "openai/gpt-4" Then the cli extensions plan use should succeed And the cli extensions plan has invariant actor "openai/gpt-4" # --- plan use: actor override validation (invalid format) --- Scenario: Plan use rejects invalid strategy-actor format Given a cli extensions action exists When I run plan use with strategy actor flag "bad-format" Then the cli extensions plan use should fail with actor validation error Scenario: Plan use rejects invalid execution-actor format Given a cli extensions action exists When I run plan use with execution actor flag "no_slash" Then the cli extensions plan use should fail with actor validation error Scenario: Plan use rejects invalid estimation-actor format Given a cli extensions action exists When I run plan use with estimation actor flag "UPPERCASE/gpt" Then the cli extensions plan use should fail with actor validation error Scenario: Plan use rejects invalid invariant-actor format Given a cli extensions action exists When I run plan use with invariant actor flag "spaces are bad" Then the cli extensions plan use should fail with actor validation error # --- plan status: showing automation_profile --- Scenario: Plan status shows automation profile in table Given cli extensions plans exist with automation profile "trusted" When I run cli extensions plan status Then the cli extensions status output should contain "trusted" Scenario: Plan status shows automation profile in JSON Given cli extensions plans exist with automation profile "manual" When I run cli extensions plan status with format "json" Then the cli extensions status json output should contain automation profile "manual" # --- plan list: showing invariants when present --- Scenario: Plan lifecycle-list shows invariant count in table Given cli extensions plans exist with invariants When I run cli extensions plan lifecycle-list Then the cli extensions list output should contain invariant count Scenario: Plan lifecycle-list shows invariants in JSON Given cli extensions plans exist with invariants When I run cli extensions plan lifecycle-list with format "json" Then the cli extensions list json output should contain invariants # --- action show: optional actors --- Scenario: Action show displays estimation actor when present Given a cli extensions action with estimation actor "openai/gpt-4" When I run cli extensions action show Then the cli extensions action output should contain "Estimation Actor" And the cli extensions action output should contain "openai/gpt-4" Scenario: Action show displays invariant actor when present Given a cli extensions action with invariant actor "anthropic/claude-3" When I run cli extensions action show Then the cli extensions action output should contain "Invariant Actor" And the cli extensions action output should contain "anthropic/claude-3" Scenario: Action show displays invariants when present Given a cli extensions action with invariants When I run cli extensions action show Then the cli extensions action output should contain "Invariants" Scenario: Action show displays inputs schema when present Given a cli extensions action with inputs schema When I run cli extensions action show Then the cli extensions action output should contain "Inputs Schema" Scenario: Action show in JSON includes optional actors Given a cli extensions action with estimation actor "openai/gpt-4" When I run cli extensions action show with format "json" Then the cli extensions action json should contain "estimation_actor" Scenario: Action show in JSON includes inputs schema Given a cli extensions action with inputs schema When I run cli extensions action show with format "json" Then the cli extensions action json should contain "inputs_schema" # --- plan use: automation_profile + invariants combined --- Scenario: Plan use with automation profile and invariants together Given a cli extensions action exists When I run plan use with profile "trusted" and invariant "No regressions" Then the cli extensions plan use should succeed And the cli extensions plan should have automation profile "trusted" And the cli extensions service received single invariant "No regressions" # --- plan status: single plan view with invariants --- Scenario: Plan status single plan view renders invariants in rich panel Given cli extensions single plan exists with invariants When I run cli extensions plan status for single plan Then the cli extensions status output should contain "Invariants" And the cli extensions status output should contain "No warnings" And the cli extensions status output should contain "plan" Scenario: Plan status single plan view renders automation profile in rich panel Given cli extensions single plan exists with profile "trusted" When I run cli extensions plan status for single plan Then the cli extensions status output should contain "Automation Profile" And the cli extensions status output should contain "trusted" # --- action show: automation profile display --- Scenario: Action show displays automation profile when present Given a cli extensions action with automation profile "trusted" When I run cli extensions action show Then the cli extensions action output should contain "Automation Profile" And the cli extensions action output should contain "trusted" Scenario: Action show in JSON without invariant actor omits field Given a cli extensions action without invariant actor When I run cli extensions action show with format "json" Then the cli extensions action json should not contain "invariant_actor" # --- validate_namespaced_actor function --- Scenario: validate_namespaced_actor accepts valid names Then validate_namespaced_actor accepts "openai/gpt-4" And validate_namespaced_actor accepts "anthropic/claude-3" And validate_namespaced_actor accepts "local/my-actor" Scenario: validate_namespaced_actor rejects invalid names Then validate_namespaced_actor rejects "no-slash" And validate_namespaced_actor rejects "UPPER/case" And validate_namespaced_actor rejects "/leading-slash" And validate_namespaced_actor rejects "trail/ing/"