Add integration-aware command hints
Description
Adds integration-aware user-facing command invocation rendering so generated Spec Kit hints use the active agent syntax. Codex now renders $speckit-... hints, standard slash-command integrations keep their existing behavior, and shared templates/scripts, extension hooks, presets, and init next steps all route through the integration-owned display invocation API.
Testing
- [x] Tested locally with
uv run specify --help - [x] Ran existing tests with
uv sync && uv run pytest - [x] Tested with a sample project (if applicable)
Commands run:
uv run --extra test pytest tests/integrations tests/test_agent_config_consistency.py tests/test_workflows.py -q
uv run --extra test pytest tests/integrations/test_integration_codex.py tests/integrations/test_integration_base_skills.py -q
uv run --extra test pytest tests -k "codex and command" -q
Also initialized temporary Codex and Claude projects and verified Codex generated $speckit-plan / $speckit-git-commit without slash-form leaks, while Claude retained /speckit-plan.
AI Disclosure
- [ ] I did not use AI assistance for this contribution
- [x] I did use AI assistance (describe below)
Implemented with Codex assistance in this repository workspace.
Please address Copilot feedback and resolve conflicts
Copilot feedback is addressed: the latest Agy comment was resolved by confirming _inject_hook_command_note is inherited from SkillsIntegration, with tests/integrations/test_integration_agy.py covering that call path. All review threads are resolved and CI is green on the current SHA (5212a54). Could you please re-review when you have a chance?
I pushed an explicit Agy compatibility shim in 10d7d39 so AgyIntegration._inject_hook_command_note(...) is defined directly and forwards to SkillsIntegration._inject_hook_command_note(...). This keeps behavior centralized while addressing the Copilot concern. Local verification: 2705 passed, 9 skipped; ruff passed.
Agentic follow-up completed and pushed in b626ce0 after rebasing on latest main.
What changed after the prior update:
- Fixed the legacy
init-options.jsonhook fallback so skills integrations without readable.specify/integration.jsonrender native invocations for Agy/Trae/Devin, while preserving legacy non-skills Codex dotted slash behavior. - Removed Agy's redundant second post-processing pass; it now relies on the shared
SkillsIntegrationpath plus the explicit compatibility shim. - Added regression coverage for persisted command prefixes, Agy
$speckit-git-commithook notes, strict/corruptai_skillshandling, and legacy skills fallback rendering.
Verification on the rebased branch:
uv run pytest tests/integrations tests/test_extensions.py tests/test_workflows.py tests/test_setup_tasks.py -q->2750 passed, 9 skippeduv run --with ruff ruff check src/specify_cli tests-> passedgit diff --check-> passed
GitHub now reports the branch as mergeable and there are no unresolved review threads. The only remaining blocker I can see is the stale requested-changes review from the earlier Copilot feedback. Could you please re-review when available?
Addressed the new Copilot feedback in 35afa7f.
Change:
HookExecutornow caches integration metadata/default key/resolved integration per executor instance, so hook rendering no longer re-reads and parses.specify/integration.jsonfor each hook.- Added regression coverage that calls
_render_hook_invocation()twice and asserts the integration-state reader is invoked once.
Verification:
uv run pytest tests/test_extensions.py tests/integrations/test_integration_agy.py tests/integrations/test_integration_codex.py tests/integrations/test_integration_subcommand.py -q->370 passeduv run pytest tests/integrations tests/test_extensions.py tests/test_workflows.py tests/test_setup_tasks.py -q->2761 passed, 9 skippeduv run --with ruff ruff check src/specify_cli tests-> passedgit diff --check-> passed
The Copilot thread is now resolved.
Please rebase on main and run tests.
Rebased on latest main and pushed dd6a97a.
I also aligned the PR-added init tests with the current CLI after upstream removed --no-git.
Verification after rebase:
uv run pytest tests/integrations/test_cli.py::TestSharedInfraCommandRefs::test_full_init_codex_resolves_page_templates tests/test_init_command_invocations.py -q->4 passeduv run pytest tests/integrations tests/test_extensions.py tests/test_workflows.py tests/test_setup_tasks.py tests/test_init_command_invocations.py -q->2862 passed, 9 skippeduv run --with ruff ruff check src/specify_cli tests-> passedgit diff --check-> passed
Current local/GitHub sweep: branch is mergeable and there are no unresolved review threads. GitHub checks have not appeared yet for the new SHA.