mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
b3d31d224d
* feat: add GitHub Copilot slash command support Add GitHub Copilot as a natively supported AI tool with custom slash commands for OpenSpec workflow operations. This enables teams using GitHub Copilot to access /openspec-proposal, /openspec-apply, and /openspec-archive directly from Copilot's chat interface. Implementation: - Create GitHubCopilotSlashCommandConfigurator that writes prompts to .github/prompts/ directory with YAML frontmatter and $ARGUMENTS placeholder following GitHub Copilot's prompt format - Register GitHub Copilot in AI_TOOLS configuration and slash command registry for automatic init/update integration - Add comprehensive test coverage for prompt generation, updates, and extend mode detection - Update documentation (README and CHANGELOG) to include GitHub Copilot in the slash-command support table The implementation follows the existing SlashCommandConfigurator pattern and integrates seamlessly with openspec init and openspec update commands. * docs: remove GitHub Copilot from tools list
1.9 KiB
1.9 KiB
Implementation Tasks
-
Create
src/core/configurators/slash/github-copilot.tsimplementingSlashCommandConfiguratorbase class- Implement
getRelativePath()to return.github/prompts/openspec-{proposal,apply,archive}.prompt.md - Implement
getFrontmatter()to generate YAML frontmatter withdescriptionfield and include$ARGUMENTSplaceholder - Implement
generateAll()to create.github/prompts/directory and write three prompt files with frontmatter, markers, and shared template bodies - Implement
updateExisting()to refresh only the managed block between markers while preserving frontmatter - Set
toolId = "github-copilot"andisAvailable = true
- Implement
-
Register GitHub Copilot configurator in
src/core/configurators/slash/registry.ts- Import
GitHubCopilotSlashCommandConfigurator - Add to
SLASH_COMMAND_CONFIGURATORSarray - Update tool picker display name to "GitHub Copilot"
- Import
-
Update
src/core/init.tsto include GitHub Copilot in the AI tool selection prompt- Add GitHub Copilot to the available tools list with detection for existing
.github/prompts/openspec-*.prompt.mdfiles - Display "(already configured)" when prompt files exist
- Add GitHub Copilot to the available tools list with detection for existing
-
Update
src/core/update.tsto refresh GitHub Copilot prompts when they exist- Call
updateExisting()for GitHub Copilot configurator when.github/prompts/contains OpenSpec prompt files
- Call
-
Add integration tests for GitHub Copilot slash command generation
- Test
generateAll()creates three prompt files with correct structure (frontmatter + markers + body) - Test
updateExisting()preserves frontmatter and only updates managed blocks - Test that missing prompt files are not created during update
- Test
-
Update documentation
- Add GitHub Copilot to README slash-command support table
- Document
.github/prompts/as the discovery location - Add CHANGELOG entry for GitHub Copilot support