fix(ai-skills): exclude non-speckit copilot agent markdown from skill…#1867
fix(ai-skills): exclude non-speckit copilot agent markdown from skill…#1867darkglow-net wants to merge 7 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes #1858 by preventing install_ai_skills() from generating skills from non–spec-kit GitHub Copilot agent markdown files that may coexist in .github/agents/.
Changes:
- Update
install_ai_skills()to filter Copilot templates tospeckit.*.md. - Update the all-agents skills installation test to respect
commands_subdirand adjust Copilot’s template filename. - Add a new test ensuring non-speckit Copilot agent markdown files are ignored during skill generation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Adds Copilot-specific template globbing to avoid converting unrelated .md files into skills. |
tests/test_ai_skills.py |
Updates fixture setup to follow commands_subdir and adds coverage for ignoring non-speckit Copilot agent files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable please explain why
Fix missing `.agent` filename suffix Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes issue #1858 where install_ai_skills (for --ai copilot --ai-skills) incorrectly converts non–spec-kit Markdown files in .github/agents/ into generated skills.
Changes:
- Filter Copilot command templates during skill installation to only include
speckit.*.mdfiles. - Update the “all agents” skills install test to respect
commands_subdirand add a Copilot-specific regression test to ignore non-speckit agent Markdown.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Adds Copilot-only template glob filtering (speckit.*.md) during skill generation. |
tests/test_ai_skills.py |
Updates multi-agent install test to use commands_subdir; adds regression test ensuring non-speckit Copilot agent Markdown doesn’t generate skills. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix test assertion speckit.plan.md to speckit.plan.agent
There was a problem hiding this comment.
Pull request overview
Fixes issue #1858 where install_ai_skills incorrectly generated skills from user-authored (non–spec-kit) Copilot agent markdown files under .github/agents/.
Changes:
- Filter Copilot skill generation inputs to
speckit.*.mdtemplates only. - Update the cross-agent skills installation test to respect each agent’s
commands_subdir. - Add a regression test ensuring non-
speckit.*Copilot agent markdown files are ignored.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Adds Copilot-specific glob filtering so only speckit.*.md templates in .github/agents/ are considered for skill generation. |
tests/test_ai_skills.py |
Updates the parametrized test to use commands_subdir and adds a Copilot regression test for ignoring non-speckit agent markdown. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fix(ai-skills): normalize Copilot .agent template names and align template fallback filtering
There was a problem hiding this comment.
Pull request overview
Fixes issue #1858 where install_ai_skills incorrectly generated skills from non–spec-kit Copilot agent markdown files found in .github/agents/ when using --ai copilot --ai-skills.
Changes:
- Restricts Copilot skill-template discovery to
speckit.*.mdto avoid treating user-authored agent markdown as spec-kit command templates. - Normalizes Copilot-derived command names by stripping the
speckit.prefix and any trailing.agentsuffix for consistent skill naming/description lookup. - Adds a regression test to ensure non-speckit markdown files in
.github/agents/do not produce skills.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Filters Copilot template glob and normalizes .agent-style filenames so only spec-kit templates generate skills. |
tests/test_ai_skills.py |
Updates agent-wide skill install test to respect per-agent commands_subdir and adds a Copilot-specific regression test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Clarify comment regarding Copilot's use of templates in tests. Add extra test assertion
|
It was fun getting the opportunity to contribute to this project. I've made the corrections and re-run all tests. |
Description
Fix issue #1858 -
install_ai_skillscreates spurious skills from non-speckit agent files when using--ai copilot --ai-skillsFix:
install_ai_skills()now filters copilot command templates tospeckit.*.md- preventing user-authored agent files in agents from being incorrectly converted into skills.Other agents are unaffected since their
commands_subdirdirectories contain only speckit templates.Test: Adds
test_copilot_ignores_non_speckit_agentsto verify that non-speckit markdown files (e.g.other-agent.agent.md) in the shared agents directory are excluded from skill generation.Testing
.github/agents/specify init --ai copilot --ai-skills --here.github/skills/AI Disclosure
RCA and remediation developed with Github Copilot. Code review conducted with Opus 4.6.