Skip to content

Fix extension skill command reference rendering - #4116

Open
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:fix/3451-extension-skill-command-refs
Open

Fix extension skill command reference rendering#4116
WOLIKIMCHENG wants to merge 1 commit into
github:mainfrom
WOLIKIMCHENG:fix/3451-extension-skill-command-refs

Conversation

@WOLIKIMCHENG

Copy link
Copy Markdown
Contributor

Description

Normalizes literal slash-dot command references when extension commands are rendered into generated SKILL.md files for skills-based integrations.

This keeps the existing __SPECKIT_COMMAND_*__ token path intact, and adds coverage for literal references such as /speckit.foo.bar so generated extension skills use the active integration's invocation style ($speckit-foo-bar, /speckit-foo-bar, or /skill:speckit-foo-bar).

Scope is limited to generated extension skills. Bare prose, native skill references, URLs, and file-like references are preserved.

Fixes #3451.

Testing

  • .venv/bin/python -m pytest tests/test_extension_skills.py -q
  • .venv/bin/python -m pytest tests/test_agent_config_consistency.py -q
  • UV_CACHE_DIR=/tmp/spec-kit-uv-cache uvx ruff@0.15.0 check src tests
  • git diff --check -- src/specify_cli/extensions/__init__.py tests/test_extension_skills.py extensions/EXTENSION-USER-GUIDE.md

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

Normalizes literal slash-dot command references in generated extension skills.

Changes:

  • Adds integration-specific command rendering.
  • Preserves native, URL, bare, and selected file-like references.
  • Adds tests and author guidance.
Show a summary per file
File Description
src/specify_cli/extensions/__init__.py Normalizes literal command references.
tests/test_extension_skills.py Tests invocation styles and exclusions.
extensions/EXTENSION-USER-GUIDE.md Documents portable command references.

Review details

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Suppressed comments (1)

src/specify_cli/extensions/init.py:1628

  • The right boundary both accepts a following / and rejects every following ., so /speckit.foo.bar/scripts/run.sh is incorrectly rewritten even though it is path-like, while the ordinary sentence Run /speckit.foo.bar. is not rewritten at all. Reject / as a path continuation, but treat . as a continuation only when another identifier segment follows.
                    r"(?![A-Za-z0-9_.-])"
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines +1613 to +1620
if command_name.rsplit(".", 1)[-1] in {
"json",
"md",
"toml",
"txt",
"yaml",
"yml",
}:

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

[Bug]: Extension command references not rewritten for skills-based integrations (Codex), breaking cross-command invocation

3 participants