Skip to content

Fix preset skill description precedence#2538

Merged
mnriem merged 2 commits into
github:mainfrom
WOLIKIMCHENG:fix-preset-skill-description
May 14, 2026
Merged

Fix preset skill description precedence#2538
mnriem merged 2 commits into
github:mainfrom
WOLIKIMCHENG:fix-preset-skill-description

Conversation

@WOLIKIMCHENG
Copy link
Copy Markdown
Contributor

Summary

  • Preserve preset command frontmatter descriptions when registering preset-generated skills
  • Add a regression test for a speckit.taskstoissues core command override

Fixes #2528

Tests

  • UV_CACHE_DIR=/tmp/uv-cache-spec-kit uv run pytest tests/test_presets.py::TestPresetSkills::test_core_command_override_skill_uses_preset_command_description -q
  • UV_CACHE_DIR=/tmp/uv-cache-spec-kit uv run pytest tests/test_presets.py::TestPresetSkills -q
  • git diff --check -- src/specify_cli/presets.py tests/test_presets.py

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a precedence bug in preset-generated SKILL.md creation so that when a preset overrides a core command, the propagated skill description comes from the preset command’s frontmatter (instead of being overwritten by the hardcoded SKILL_DESCRIPTIONS fallback). It also adds a regression test to prevent the speckit.taskstoissues override case from breaking again.

Changes:

  • Update preset skill registration to prefer command frontmatter description and only fall back to SKILL_DESCRIPTIONS when no description is provided.
  • Add a regression test ensuring a preset override of speckit.taskstoissues keeps the preset command description in the generated skill file.
Show a summary per file
File Description
src/specify_cli/presets.py Adjusts description selection logic during preset skill registration to respect preset command frontmatter precedence.
tests/test_presets.py Adds a regression test covering core command override skill description precedence for taskstoissues.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread src/specify_cli/presets.py
Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback

@WOLIKIMCHENG
Copy link
Copy Markdown
Contributor Author

Thanks for the review — I updated the restore/reconcile paths so they preserve command frontmatter descriptions before falling back to SKILL_DESCRIPTIONS, and added regression coverage for both cases.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new

@mnriem mnriem requested review from Copilot and mnriem May 14, 2026 17:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new

@mnriem mnriem merged commit be38280 into github:main May 14, 2026
11 checks passed
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented May 14, 2026

Thank you!

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]: preset --ai-skills propagation ignores override description for core command taskstoissues

3 participants