Skip to content

fix: keep --ai as a supported init alias#2637

Open
puneetdixit200 wants to merge 4 commits into
github:mainfrom
puneetdixit200:codex/keep-ai-alias
Open

fix: keep --ai as a supported init alias#2637
puneetdixit200 wants to merge 4 commits into
github:mainfrom
puneetdixit200:codex/keep-ai-alias

Conversation

@puneetdixit200
Copy link
Copy Markdown

@puneetdixit200 puneetdixit200 commented May 20, 2026

Summary

  • keep specify init --ai <key> as a supported short alias instead of warning about removal
  • remove the --ai deprecation panel while preserving mutual exclusion with --integration
  • document --ai alongside --integration in the core reference and README

Closes #2636.

Verification

  • uv sync --extra test
  • uv 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 passed
  • PYTHONUTF8=1 PYTHONIOENCODING=utf-8 uv run specify --help -> passed
  • git 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.

Copilot AI review requested due to automatic review settings May 20, 2026 06:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates the CLI behavior and documentation so the legacy --ai flag no longer emits a deprecation warning and is treated as a short alias for selecting an integration.

Changes:

  • Remove the --ai deprecation warning panel from specify init.
  • Update integration tests to assert no deprecation warning is printed for --ai.
  • Update docs/README to document --ai as a short alias for --integration.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
tests/integrations/test_cli.py Updates expectations to ensure --ai no longer prints a deprecation warning.
src/specify_cli/init.py Removes deprecation-warning construction/printing and related import; updates --integration help text.
docs/reference/core.md Documents --ai as a short alias and adds an example.
README.md Documents --ai as a short alias and adds an example usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/specify_cli/__init__.py Outdated
Comment thread tests/integrations/test_cli.py Outdated
Comment thread docs/reference/core.md Outdated
Comment thread docs/reference/core.md Outdated
@puneetdixit200 puneetdixit200 marked this pull request as ready for review May 20, 2026 07:01
@puneetdixit200 puneetdixit200 requested a review from mnriem as a code owner May 20, 2026 07:01
Copilot AI review requested due to automatic review settings May 20, 2026 09:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread src/specify_cli/__init__.py Outdated
preset: str = typer.Option(None, "--preset", help="Install a preset during initialization (by preset ID)"),
branch_numbering: str = typer.Option(None, "--branch-numbering", help="Branch numbering strategy: 'sequential' (001, 002, …, 1000, … — expands past 999 automatically) or 'timestamp' (YYYYMMDD-HHMMSS)"),
integration: str = typer.Option(None, "--integration", help="Use the new integration system (e.g. --integration copilot). Mutually exclusive with --ai."),
integration: str = typer.Option(None, "--integration", help="Coding agent integration to use (e.g. --integration copilot). Equivalent to --ai; mutually exclusive with --ai."),
Comment thread tests/integrations/test_cli.py Outdated
assert "Commands will no longer be available" not in normalized_output
assert "--ai is deprecated" not in normalized_output
assert "deprecated --ai" not in normalized_output
assert re.search(r"(--ai.{0,80}deprecated|deprecated.{0,80}--ai)", normalized_output, re.IGNORECASE) is None
Comment thread tests/integrations/test_cli.py Outdated
assert "Commands will no longer be available" not in normalized_output
assert "--ai is deprecated" not in normalized_output
assert "deprecated --ai" not in normalized_output
assert re.search(r"(--ai.{0,80}deprecated|deprecated.{0,80}--ai)", normalized_output, re.IGNORECASE) is None
Copilot AI review requested due to automatic review settings May 21, 2026 03:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment on lines +47 to +63
assert "Deprecation Warning" not in output
assert "no longer be available" not in output
assert "Commands will no longer be available" not in output
assert "--ai is deprecated" not in output
assert "deprecated --ai" not in output
assert (
re.search(r"(--ai.{0,80}deprecated|deprecated.{0,80}--ai)", output, re.IGNORECASE)
is None
)
assert (
re.search(r"(--ai.{0,120}0\.10\.0|0\.10\.0.{0,120}--ai)", output, re.IGNORECASE)
is None
)
assert (
re.search(r"(--ai.{0,120}next steps|next steps.{0,120}--ai)", output, re.IGNORECASE)
is None
)
Comment on lines +126 to +127
"or generic (requires --ai-commands-dir). Equivalent to --integration; "
"do not combine them."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: don't depreciate --ai in favor of --integration .. keep both! ai is so much easier to type!

3 participants