fix(extensions): resolve __SPECKIT_COMMAND tokens in auto-registered skills#3544
fix(extensions): resolve __SPECKIT_COMMAND tokens in auto-registered skills#3544WOLIKIMCHENG wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Resolves explicit command-reference tokens while generating extension skills.
Changes:
- Resolves
__SPECKIT_COMMAND_*__tokens using the configured separator. - Tests token resolution and preservation of literal references.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/extensions/__init__.py |
Adds token resolution to skill generation. |
tests/test_extension_skills.py |
Adds regression tests for generated skill content. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Medium
| body = IntegrationBase.resolve_command_refs( | ||
| body, agent_config.get("invoke_separator", ".") | ||
| ) |
|
Please address Copilot feedback. I would assume for those other integrations you will need to override the method that generates the actual content? |
Resolve extension skill command-reference tokens with the active skill invocation style so Codex and ZCode use $speckit-* while slash-style agents keep their native forms. Preserve literal command-looking text.
|
Addressed the feedback by making extension skill command-reference tokens render with the active agent invocation style, including |
| if integration is not None: | ||
| return integration.build_command_invocation(command_name) |
There was a problem hiding this comment.
Updated extension skill command-reference expansion to resolve slash-style skills from persisted init options before falling back to integration state, and added Copilot to the command-ref regression matrix. Focused extension-skill tests, slash invocation coverage, Copilot invocation tests, and diff whitespace checks pass locally.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback
Description
Resolve explicit
__SPECKIT_COMMAND_<NAME>__tokens when extension commands are rendered into generatedSKILL.mdfiles.This updates the extension skill-registration path to call
IntegrationBase.resolve_command_refs(...)afterresolve_skill_placeholders()and before integration-specific skill post-processing, matching the existing command-rendering pipeline.Scope is limited to explicit
__SPECKIT_COMMAND_*__tokens for #3451 phase 2. It does not rewrite literal/speckit.foo.barorspeckit.foo.bartext.Refs #3451
Testing
git diff --check.venv/bin/python -m pytest tests/test_extension_skills.py -q.venv/bin/python -m pytest tests/test_agent_config_consistency.py -k 'skills_agent_command_token_resolves_with_hyphen' -q