Files
Tabish Bidiwale b3d31d224d feat: add GitHub Copilot slash command support (#128)
* 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
2025-10-09 02:23:42 +11:00

2.1 KiB

MODIFIED Requirements

Requirement: Slash Command Configuration

The init command SHALL generate slash command files for supported editors using shared templates.

Scenario: Generating slash commands for Claude Code

  • WHEN the user selects Claude Code during initialization
  • THEN create .claude/commands/openspec/proposal.md, .claude/commands/openspec/apply.md, and .claude/commands/openspec/archive.md
  • AND populate each file from shared templates so command text matches other tools
  • AND each template includes instructions for the relevant OpenSpec workflow stage

Scenario: Generating slash commands for Cursor

  • WHEN the user selects Cursor during initialization
  • THEN create .cursor/commands/openspec-proposal.md, .cursor/commands/openspec-apply.md, and .cursor/commands/openspec-archive.md
  • AND populate each file from shared templates so command text matches other tools
  • AND each template includes instructions for the relevant OpenSpec workflow stage

Scenario: Generating slash commands for OpenCode

  • WHEN the user selects OpenCode during initialization
  • THEN create .opencode/commands/openspec-proposal.md, .opencode/commands/openspec-apply.md, and .opencode/commands/openspec-archive.md
  • AND populate each file from shared templates so command text matches other tools
  • AND each template includes instructions for the relevant OpenSpec workflow stage

Scenario: Generating slash commands for GitHub Copilot

  • WHEN the user selects GitHub Copilot during initialization
  • THEN create .github/prompts/openspec-proposal.prompt.md, .github/prompts/openspec-apply.prompt.md, and .github/prompts/openspec-archive.prompt.md
  • AND populate each file with YAML frontmatter containing a description field that summarizes the workflow stage
  • AND include $ARGUMENTS placeholder to capture user input
  • AND wrap the shared template body with OpenSpec markers so openspec update can refresh the content
  • AND each template includes instructions for the relevant OpenSpec workflow stage