Repository navigation
fix(cli): fold hyphen/case --agent names - #885
Conversation
Closes #884 ## What changed `--agent` now behaves like algorithm names, parameter names, and `--kind`: a value that matches exactly one built-in worker short ref once case and `-`/`_` are ignored resolves to it (`claude-code` → `claude_code`, `openai-compatible` → `openai_compatible`). Written specs use the canonical `agent.ref`. Kind mismatch checks still run on the folded name (`--agent claude-code` on kind=text is still refused as a WorkspaceAgent). Install-only aliases that are not a spelling fold (`deepseek-harness`, `claudecode`, `open-code`) still hint; `grok-bot` still explains it has no worker CLI. ## Verification at the tip Ran: - pytest -q tests/test_init_honor_agent.py tests/test_changelog_fragments.py tests/test_init_default_agent.py tests/test_workspace_agent_hint.py tests/test_cli_json_usage_errors.py tests/test_cli_algorithms_run.py tests/test_install_host_aliases.py → passed - live `init --agent claude-code` / `--agent openai-compatible` write the canonical refs; `grok-bot` and `kind=text --agent claude-code` still refuse Not run: - full suite — CI covers 3.9–3.13
|
Verdict: PASS Correctness. Risk. T2 by size/path (CLI validation only; no evolve-loop change). |
|
Verdict: PASS Correctness. Design. Tests / docs. New cases cover hyphen/case aliases on Risk. T2 by size (package CLI validation only; 91 lines / 3 files, under the 250-line cap). No evolve-loop or installer change. AGENT_PAUSE=false; will squash-merge when required CI is green. |
Closes #884
--agentnow folds case and-/_the same way algorithm names, parameter names, and--kindalready do.init --agent claude-codeandalgorithms run … --agent openai-compatiblewrite the canonicalagent.ref(claude_code,openai_compatible) instead of rejecting a spellingdoctor/installalready print.Kind mismatch checks still run on the folded name (
--agent claude-codeonkind=textis still refused as a WorkspaceAgent, #456). Install-only aliases that are not a spelling fold (deepseek-harness,claudecode,open-code) still hint;grok-botstill explains it has no worker CLI.Verification
pytest -q tests/test_init_honor_agent.py tests/test_changelog_fragments.py tests/test_init_default_agent.py tests/test_workspace_agent_hint.py tests/test_cli_json_usage_errors.py tests/test_cli_algorithms_run.py tests/test_install_host_aliases.pypassedinit --agent claude-code/--agent openai-compatiblewrite the canonical refs