Skip to content

fix(extensions): resolve __SPECKIT_COMMAND tokens in auto-registered skills#3544

Open
WOLIKIMCHENG wants to merge 4 commits into
github:mainfrom
WOLIKIMCHENG:fix/extension-skill-command-refs
Open

fix(extensions): resolve __SPECKIT_COMMAND tokens in auto-registered skills#3544
WOLIKIMCHENG wants to merge 4 commits into
github:mainfrom
WOLIKIMCHENG:fix/extension-skill-command-refs

Conversation

@WOLIKIMCHENG

@WOLIKIMCHENG WOLIKIMCHENG commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

Resolve explicit __SPECKIT_COMMAND_<NAME>__ tokens when extension commands are rendered into generated SKILL.md files.

This updates the extension skill-registration path to call IntegrationBase.resolve_command_refs(...) after resolve_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.bar or speckit.foo.bar text.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread src/specify_cli/extensions/__init__.py Outdated
Comment on lines +1090 to +1092
body = IntegrationBase.resolve_command_refs(
body, agent_config.get("invoke_separator", ".")
)
@mnriem

mnriem commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

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.
@WOLIKIMCHENG

Copy link
Copy Markdown
Contributor Author

Addressed the feedback by making extension skill command-reference tokens render with the active agent invocation style, including $speckit-* for Codex/ZCode, while preserving literal text.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment on lines +1030 to +1031
if integration is not None:
return integration.build_command_invocation(command_name)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please address Copilot feedback

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.

3 participants