Files
cleveragents-core/features/cli_help_text_legacy_removal.feature
T
CoreRasurae cc24d8c8ac fix(cli): remove legacy plan commands from help output
Completely removed all legacy plan commands from the CLI:
    - Removed tell, build, new, current, cd, continue CLI commands
    - Removed programmatic wrapper functions (tell_command, build_command, etc.)
    - Removed legacy deprecation message
    - Updated help text to indicate V3 Plan Lifecycle exclusively
    - Removed stale references to tell/build in help output and command validation

    Removes the legacy 'tell' and 'build' CLI shortcuts from main.py:
    - Removed echo lines advertising tell/build commands
    - Removed tell/build from valid_cmds list
    - Removed tell/build from _LIGHTWEIGHT_COMMANDS frozenset
    - These dead entries were preventing helpful error messages

    Test infrastructure improvements:
    - Event bus exception test: Patch the module-level logger during emit() so that
      structlog.testing.capture_logs() can capture the logs. Without patching, the
      module-level logger created at import time is not captured by the context manager.
    - Session create/list commands: Suppress cleveragents.mcp logger to CRITICAL level
      during JSON/YAML output formatting to prevent health check warnings with ANSI codes
      from being written to stdout before JSON output, which breaks JSON parsing.
    - Extended plan_cli_coverage_boost with scenarios for estimation_result,
      invariants, execution_environment, validation_summary, and checkpoint
      coverage in _plan_spec_dict

    Documentation:
    - Created docs/Legacy_to_V3_Guide.md with comprehensive migration instructions
    - Updated CONTRIBUTING.md to document removal of legacy workflow
    - Updated CHANGELOG.md to reference issue #4181 instead of PR #10800

ISSUES CLOSED: #4181
2026-05-05 02:01:49 +00:00

43 lines
1.8 KiB
Gherkin

Feature: CLI help text removal of legacy commands
As a user seeking help with CleverAgents
I want the help text to reflect the current v3 plan lifecycle
So that I'm not confused by deprecated legacy commands
Scenario: _print_basic_help does not include "tell" command
Given the CLI main help function is called
When the basic help text is printed
Then the help should not mention tell command
Scenario: _print_basic_help does not include "build" command
Given the CLI main help function is called
When the basic help text is printed
Then the help should not mention build command
Scenario: _print_basic_help includes "plan" command with updated help
Given the CLI main help function is called
When the basic help text is printed
Then the help should mention plan command
Scenario: _print_basic_help includes "apply" shortcut command
Given the CLI main help function is called
When the basic help text is printed
Then the help should mention apply command
Scenario: Lightweight commands list does not include "tell"
Given the main function lightweight commands are configured
Then the lightweight commands set should not contain "tell"
Scenario: Lightweight commands list does not include "build"
Given the main function lightweight commands are configured
Then the lightweight commands set should not contain "build"
Scenario: Lightweight commands list includes "apply"
Given the main function lightweight commands are configured
Then the lightweight commands set should contain "apply"
Scenario: Plan command help updated to reference v3 lifecycle
Given the plan subcommand is loaded
When the plan command help text is retrieved
Then the help text should contain "V3 Plan Lifecycle"
And the help text should mention "use", "execute", and "apply"