mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
8822557bcd
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.
31 lines
1.9 KiB
Markdown
31 lines
1.9 KiB
Markdown
## Implementation Tasks
|
|
|
|
- [x] Create `src/core/configurators/slash/github-copilot.ts` implementing `SlashCommandConfigurator` base class
|
|
- Implement `getRelativePath()` to return `.github/prompts/openspec-{proposal,apply,archive}.prompt.md`
|
|
- Implement `getFrontmatter()` to generate YAML frontmatter with `description` field and include `$ARGUMENTS` placeholder
|
|
- 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"` and `isAvailable = true`
|
|
|
|
- [x] Register GitHub Copilot configurator in `src/core/configurators/slash/registry.ts`
|
|
- Import `GitHubCopilotSlashCommandConfigurator`
|
|
- Add to `SLASH_COMMAND_CONFIGURATORS` array
|
|
- Update tool picker display name to "GitHub Copilot"
|
|
|
|
- [x] Update `src/core/init.ts` to 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.md` files
|
|
- Display "(already configured)" when prompt files exist
|
|
|
|
- [x] Update `src/core/update.ts` to refresh GitHub Copilot prompts when they exist
|
|
- Call `updateExisting()` for GitHub Copilot configurator when `.github/prompts/` contains OpenSpec prompt files
|
|
|
|
- [x] 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
|
|
|
|
- [x] 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
|