You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(integrations): own invocation rendering - #4983
Moves command naming and invocation rendering ownership into integration classes, using the behavior characterized by #4975 as the preservation boundary.
The shared init, command registrar, extension skill and hook paths, preset rendering, and integration runtime now resolve naming and invocation behavior through the active integration. Dollar-prefixed skills, Kimi's /skill: syntax, Cline/Forge/Junie formatting, and mode-sensitive Bob/Copilot behavior live with their owning integrations. The obsolete _invocation_style.py identity tables are removed, and extension code no longer imports concrete integration formatters.
Generated filenames, command-reference replacement, displayed and hook invocations, custom non-Spec-Kit hook commands, and dual-mode behavior remain unchanged. Identity checks intentionally retained are limited to onboarding guidance and companion/content artifact handling, which are outside this ownership change.
After rebasing onto current upstream/main: .venv/bin/python -m pytest tests/integrations/test_integration_characterization.py tests/test_extensions.py::TestHookInvocationRendering tests/test_agent_config_consistency.py -q — 56 passed.
git diff --check, .venv/bin/python -m compileall -q src/specify_cli, and uvx ruff check --select F <changed Python files> — passed.
The sample-project coverage is exercised by the table-driven specify init completion-guidance characterization tests for Command Code, Forge, Kimi, Copilot, and DSH.
AI Disclosure
I did not use AI assistance for this contribution
I did use AI assistance (fill in the disclosure below)
AI disclosure: GitHub Copilot, powered by GPT-5.6 Sol, operated autonomously in autopilot mode with the runtime-default reasoning setting. It inspected the integration design and characterization baseline, implemented the production and test changes, ran focused and full validation, authored the commit, and drafted this pull request description.
After rebasing onto current upstream main, .venv/bin/python -m pytest tests/specify_cli/presets/test_manager_skills.py::TestPresetSkills::test_skill_switch_then_command_switch_remove_restores_skill_refs tests/integrations/test_integration_characterization.py -q — 14 passed.
git diff --check, Ruff fatal-error checks, and source compilation passed.
AI disclosure: Posted on behalf of Manfred Riem by GitHub Copilot using GPT-5.6 Sol in autonomous autopilot mode; implementation, test generation, validation, commit authoring, and comment drafting were AI-assisted.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in a7370854. _validate_implementation() now requires invocation_prefix to be a non-empty string and skills_invocation_only to be a boolean. The invalid public-attribute matrix covers None, empty/non-string prefixes, and non-boolean mode flags, and design/integration.md documents both type requirements.
pins command unregistration to the target project's adapter registry for the complete cleanup operation, with an interleaved same-key adapter regression that protects unrelated files;
passes resolved output mode independently from command-reference separator through template rendering, preserving skills-only prefixes for adapters with custom separators;
retains the prior validation fix for invocation_prefix and skills_invocation_only in rebased commit 82cf3756.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 63db5158. Artifact resolution now executes the integration-owned filename lookup inside project_integrations(project_root). Extension update backup, preflight candidate tracking, and rollback cleanup all use a shared project-scoped naming helper, so a later same-key adapter load cannot combine project A's registrar snapshot with project B's naming hook.
Added two interleaved-project regressions: artifact resolution snapshots A, loads B, and still resolves A's materialized command; a failed extension update loads B after A's registrar snapshot, removes A's managed command, and verifies rollback restores the original A-named file.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The cross-cutting rendering changes affect project-scoped adapters, destructive cleanup, and rollback paths that warrant final maintainer verification.
Add regression tests for manager skill resolver delegation
src/specify_cli/extensions/__init__.py:1641
The new tests at tests/test_extensions.py:3985-4062 call CommandRegistrar.register_commands_for_agent(), which delegates to agents.CommandRegistrar.register_commands() (extensions/__init__.py:4433), not this manager method. Existing manager tests cover built-in spellings but would not catch reverting this resolver delegation.
Add regression cases through ExtensionManager._register_extension_skills() or install_from_directory(..., register_commands=False), with Codex skills mode enabled. Check that a resolver override receives the full body and skills_enabled=True, and that a missing integration uses the base resolver with the configured separator. Assert the generated SKILL.md content in both cases. This covers the changed execution path required by CONTRIBUTING.md:227-248.
AI disclosure: GitHub Copilot for the requester; model/settings unavailable, autonomous review and suggestions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Moves command naming and invocation rendering ownership into integration classes, using the behavior characterized by #4975 as the preservation boundary.
The shared init, command registrar, extension skill and hook paths, preset rendering, and integration runtime now resolve naming and invocation behavior through the active integration. Dollar-prefixed skills, Kimi's
/skill:syntax, Cline/Forge/Junie formatting, and mode-sensitive Bob/Copilot behavior live with their owning integrations. The obsolete_invocation_style.pyidentity tables are removed, and extension code no longer imports concrete integration formatters.Generated filenames, command-reference replacement, displayed and hook invocations, custom non-Spec-Kit hook commands, and dual-mode behavior remain unchanged. Identity checks intentionally retained are limited to onboarding guidance and companion/content artifact handling, which are outside this ownership change.
Testing
uv run specify --helpuv sync && uv run pytestExact commands and results:
uv sync --extra test --quiet— passed..venv/bin/python -m pytest tests/integrations/test_integration_characterization.py tests/integrations/test_base.py tests/integrations/test_registry.py tests/integrations/test_integration_alquimia.py tests/integrations/test_integration_docker_agent.py tests/integrations/test_integration_droid.py tests/integrations/test_integration_dsh.py tests/integrations/test_integration_zed.py tests/extensions/bug/test_bug_hooks.py tests/extensions/github/test_github_extension.py -q— 1,487 passed, 4 skipped..venv/bin/python -m pytest tests/test_extensions.py::TestHookInvocationRendering tests/integrations/test_integration_characterization.py tests/integrations/test_integration_cline.py tests/integrations/test_integration_forge.py tests/integrations/test_integration_junie.py tests/integrations/test_base.py -q— 219 passed..venv/bin/python -m pytest tests/integrations tests/specify_cli/integrations tests/extensions tests/specify_cli/extensions tests/specify_cli/presets tests/specify_cli/test_command_init.py tests/test_init_dir.py tests/test_init_dir_cli.py tests/test_extension_registration.py tests/test_extension_skills.py tests/test_extensions.py tests/test_presets.py tests/test_command_template_hooks.py -q— 6,255 passed, 14 skipped..venv/bin/python -m pytest tests/test_agent_config_consistency.py -q— 31 passed..venv/bin/python -m pytest tests -q— 12,581 passed, 101 skipped.upstream/main:.venv/bin/python -m pytest tests/integrations/test_integration_characterization.py tests/test_extensions.py::TestHookInvocationRendering tests/test_agent_config_consistency.py -q— 56 passed.git diff --check,.venv/bin/python -m compileall -q src/specify_cli, anduvx ruff check --select F <changed Python files>— passed.The sample-project coverage is exercised by the table-driven
specify initcompletion-guidance characterization tests for Command Code, Forge, Kimi, Copilot, and DSH.AI Disclosure
AI disclosure: GitHub Copilot, powered by GPT-5.6 Sol, operated autonomously in autopilot mode with the runtime-default reasoning setting. It inspected the integration design and characterization baseline, implemented the production and test changes, ran focused and full validation, authored the commit, and drafted this pull request description.