mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
345f9dbb45
Archive completed changes: - add-non-interactive-init-options - slim-root-agents-file - update-cli-init-enter-selection - add-windsurf-workflows - add-kilocode-workflows - add-codex-slash-command-support - add-github-copilot-prompts Updates to specs: - cli-init: Added 7 slash command scenarios (Claude Code, Cursor, OpenCode, Windsurf, Kilo Code, Codex, GitHub Copilot) - cli-update: Added corresponding update scenarios for all 7 tools - Fixed MODIFIED requirement deltas to include all existing scenarios before archiving - Manual correction applied to preserve Windsurf scenario after archive conflicts All changes validated with --strict flag.
4.1 KiB
4.1 KiB
MODIFIED Requirements
Requirement: AI Tool Configuration
The command SHALL configure AI coding assistants with OpenSpec instructions using a marker system.
Scenario: Prompting for AI tool selection
- WHEN run interactively
- THEN prompt the user with "Which AI tools do you use?" using a multi-select menu
- AND list every available tool with a checkbox:
- Claude Code (creates or refreshes CLAUDE.md and slash commands)
- Cursor (creates or refreshes
.cursor/commands/*slash commands) - OpenCode (creates or refreshes
.opencode/command/openspec-*.mdslash commands) - Windsurf (creates or refreshes
.windsurf/workflows/openspec-*.mdworkflows) - Kilo Code (creates or refreshes
.kilocode/workflows/openspec-*.mdworkflows) - Codex (creates or refreshes global prompts at
~/.codex/prompts/openspec-*.md) - AGENTS.md standard (creates or refreshes AGENTS.md with OpenSpec markers)
- AND show "(already configured)" beside tools whose managed files exist so users understand selections will refresh content
- AND treat disabled tools as "coming soon" and keep them unselectable
- AND allow confirming with Enter after selecting one or more tools
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/command/openspec-proposal.md,.opencode/command/openspec-apply.md, and.opencode/command/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 Windsurf
- WHEN the user selects Windsurf during initialization
- THEN create
.windsurf/workflows/openspec-proposal.md,.windsurf/workflows/openspec-apply.md, and.windsurf/workflows/openspec-archive.md - AND populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools
- AND each template includes instructions for the relevant OpenSpec workflow stage
Scenario: Generating slash commands for Kilo Code
- WHEN the user selects Kilo Code during initialization
- THEN create
.kilocode/workflows/openspec-proposal.md,.kilocode/workflows/openspec-apply.md, and.kilocode/workflows/openspec-archive.md - AND populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools
- AND each template includes instructions for the relevant OpenSpec workflow stage
Scenario: Generating slash commands for Codex
- WHEN the user selects Codex during initialization
- THEN create global prompt files at
~/.codex/prompts/openspec-proposal.md,~/.codex/prompts/openspec-apply.md, and~/.codex/prompts/openspec-archive.md(or under$CODEX_HOME/promptsif set) - AND populate each file from shared templates that map the first numbered placeholder (
$1) to the primary user input (e.g., change identifier or question text) - AND wrap the generated content in OpenSpec markers so
openspec updatecan refresh the prompts without touching surrounding custom notes