fix: keep --ai as a supported init alias
Summary
- keep
specify init --ai <key>as a supported short alias instead of warning about removal - remove the
--aideprecation panel while preserving mutual exclusion with--integration - document
--aialongside--integrationin the core reference and README
Closes #2636.
Verification
uv sync --extra testuv run pytest tests/integrations/test_cli.py::TestInitIntegrationFlag::test_integration_and_ai_mutually_exclusive tests/integrations/test_cli.py::TestInitIntegrationFlag::test_ai_copilot_does_not_emit_deprecation_warning tests/integrations/test_cli.py::TestInitIntegrationFlag::test_ai_generic_alias_does_not_emit_deprecation_warning -q-> 3 passedPYTHONUTF8=1 PYTHONIOENCODING=utf-8 uv run specify --help-> passedgit diff --check-> passed
Note: the full tests/integrations/test_cli.py suite reached 68 passed / 1 skipped but 7 unrelated symlink-safety tests failed on this Windows checkout with WinError 1314 because symlink creation requires elevated privileges.
AI-assisted work
This patch was prepared with AI assistance and manually reviewed. I added the no-deprecation regression expectation first, observed it fail on the existing warning, then reran the affected tests after the implementation change.
AI-assisted follow-up pushed in 0f023bc.
Verification:
uv sync --extra testuv run pytest tests/integrations/test_cli.py::TestInitIntegrationFlag::test_integration_and_ai_mutually_exclusive tests/integrations/test_cli.py::TestInitIntegrationFlag::test_init_help_explains_ai_alias_and_generic_options tests/integrations/test_cli.py::TestInitIntegrationFlag::test_ai_copilot_does_not_emit_deprecation_warning tests/integrations/test_cli.py::TestInitIntegrationFlag::test_ai_generic_alias_does_not_emit_deprecation_warning -q-> 4 passeduv run specify init --helpgit diff --check
Rebased/resolved the conflict against current main after the init command refactor. The branch now ports the existing --ai alias behavior into src/specify_cli/commands/init.py and _agent_config.py rather than reintroducing the old inline init command.
Current head: 2381193
Verified locally:
UV_CACHE_DIR=/private/tmp/spec-kit-2637-uv-cache uv sync --extra testUV_CACHE_DIR=/private/tmp/spec-kit-2637-uv-cache uv run pytest tests/integrations/test_cli.py::TestInitIntegrationFlag::test_integration_and_ai_mutually_exclusive tests/integrations/test_cli.py::TestInitIntegrationFlag::test_init_help_explains_ai_alias_and_generic_options tests/integrations/test_cli.py::TestInitIntegrationFlag::test_ai_copilot_does_not_emit_deprecation_warning tests/integrations/test_cli.py::TestInitIntegrationFlag::test_ai_generic_alias_does_not_emit_deprecation_warning -q(4 passed)UV_CACHE_DIR=/private/tmp/spec-kit-2637-uv-cache uv run pytest tests/integrations/test_cli.py -q(77 passed)UV_CACHE_DIR=/private/tmp/spec-kit-2637-uv-cache uv run specify init --helpgit diff --check
AI-assisted follow-up pushed in cf2295b.
This addresses the review-note cleanup around the --ai alias docs/tests:
- clarifies the core docs wording to say
--integration <key>is equivalent to--ai <key> - keeps the no-deprecation assertion checking the raw Rich/Typer output after stripping ANSI and normalizing text, so deprecation text cannot be hidden by pre-normalization
Verified locally on the current head:
UV_CACHE_DIR=/private/tmp/spec-kit-2637-uv-cache uv run pytest tests/integrations/test_cli.py -q(77 passed)git diff --check
gh pr checks still reports no check rows for this branch.