Skip to content

Fix --dev extension agent symlinks#2554

Open
NgoQuocViet2001 wants to merge 1 commit into
github:mainfrom
NgoQuocViet2001:ai/dev-extension-symlink-artifacts
Open

Fix --dev extension agent symlinks#2554
NgoQuocViet2001 wants to merge 1 commit into
github:mainfrom
NgoQuocViet2001:ai/dev-extension-symlink-artifacts

Conversation

@NgoQuocViet2001
Copy link
Copy Markdown

Description

Fixes #2451.

specify extension add --dev now asks extension registration to link generated agent command files when possible. The registrar writes rendered output into an extension-local .specify-dev cache and points the agent-facing command file at it, while falling back to a normal copy when symlink creation is unavailable. The same option is threaded through extension skill registration, and unregister now removes symlinked command entries too.

Testing

  • Tested locally with PYTHONIOENCODING=utf-8 PYTHONUTF8=1 uv run specify --help
    • Note: plain uv run specify --help on this Windows cp1252 console hit an existing banner UnicodeEncodeError; the UTF-8 run passed.
  • Ran existing tests with uv sync --extra test && uv run pytest tests/test_extensions.py
  • Tested with a sample project (if applicable): covered by tests/test_extensions.py::TestExtensionAddCLI::test_add_dev_links_copilot_agent_when_supported
  • uv run pytest tests/integrations/test_integration_subcommand.py -k "extension_add or switch_migrates_extension_commands or switch_migrates_copilot_skills_extension_commands"
  • uvx ruff check src/specify_cli/agents.py src/specify_cli/extensions.py src/specify_cli/__init__.py
  • git diff --check

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

This PR was implemented with OpenAI Codex assistance. Codex helped identify the regression path, make the code changes, add tests, run validation, and draft this PR; I reviewed the resulting diff and test output before submission.

@NgoQuocViet2001 NgoQuocViet2001 requested a review from mnriem as a code owner May 14, 2026 04:17
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.

[Bug]: extension add --dev broken

1 participant