Fix #1658: --ai-skills flag not working for GitHub Copilot and other agents#1660
Conversation
…ent directory structures - Added commands_subdir field to AGENT_CONFIG for all agents - Updated install_ai_skills() to use commands_subdir instead of hardcoded 'commands' - Fixed --ai-skills flag for copilot, opencode, windsurf, codex, kilocode, q, and agy - Bumped version to 0.1.5 - Updated AGENTS.md documentation with new field Affected agents now correctly locate their command templates: - copilot: .github/agents/ - opencode: .opencode/command/ (singular) - windsurf: .windsurf/workflows/ - codex: .codex/prompts/ - kilocode: .kilocode/workflows/ - q: .amazonq/prompts/ - agy: .agent/workflows/ All 51 tests pass.
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #1658 where the --ai-skills flag failed for GitHub Copilot and other agents with non-standard command directory structures. The root cause was that the install_ai_skills() function hardcoded "commands" as the subdirectory name, but 7 agents use different names (copilot uses "agents", opencode uses "command", windsurf/kilocode/agy use "workflows", and codex/q use "prompts").
The solution adds a commands_subdir field to the AGENT_CONFIG dictionary that explicitly specifies the subdirectory name for each agent, and updates install_ai_skills() to read this field instead of assuming "commands".
Changes:
- Added
commands_subdirfield to all 19 agents inAGENT_CONFIGwith agent-specific subdirectory names - Updated
install_ai_skills()function to use the newcommands_subdirfield from agent configuration - Updated
AGENTS.mddocumentation to explain the new field and its usage - Bumped version from 0.1.4 to 0.1.5 and added comprehensive changelog entry
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/specify_cli/init.py | Added commands_subdir field to all agents in AGENT_CONFIG; updated install_ai_skills() to use the field |
| pyproject.toml | Bumped version from 0.1.4 to 0.1.5 |
| CHANGELOG.md | Added detailed changelog entry for version 0.1.5 describing the fix |
| AGENTS.md | Updated documentation to explain the new commands_subdir field and its usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks @mnriem for the quick fix. |
Issue
Fixes #1658
Problem
When users ran
specify init --ai copilot --ai-skills, the skills installation failed with "command templates not found" error. This affected multiple agents with non-standard directory structures.Root Cause
The
install_ai_skills()function hardcoded"commands"as the subdirectory name, but 7 agents use different names:.github/agents/.opencode/command/(singular).windsurf/workflows/.codex/prompts/.kilocode/workflows/.amazonq/prompts/.agent/workflows/Solution
Added a
commands_subdirfield toAGENT_CONFIGthat explicitly specifies the subdirectory name for each agent. Theinstall_ai_skills()function now reads this field instead of assuming"commands".Changes
commands_subdirfield to all agents inAGENT_CONFIGinstall_ai_skills()to use the new fieldAGENTS.mddocumentationTesting
Breaking Changes
None - this is a bug fix that makes existing functionality work as intended.