|
| 1 | +# Delta for CLI Init |
| 2 | + |
| 3 | +## MODIFIED Requirements |
| 4 | +### Requirement: Slash Command Configuration |
| 5 | +The init command SHALL generate slash command files for supported editors using shared templates. |
| 6 | + |
| 7 | +#### Scenario: Generating slash commands for Antigravity |
| 8 | +- **WHEN** the user selects Antigravity during initialization |
| 9 | +- **THEN** create `.agent/workflows/openspec-proposal.md`, `.agent/workflows/openspec-apply.md`, and `.agent/workflows/openspec-archive.md` |
| 10 | +- **AND** ensure each file begins with YAML frontmatter that contains only a `description: <stage summary>` field followed by the shared OpenSpec workflow instructions wrapped in managed markers |
| 11 | +- **AND** populate the workflow body with the same proposal/apply/archive guidance used for other tools so Antigravity behaves like Windsurf while pointing to the `.agent/workflows/` directory |
| 12 | + |
| 13 | +#### Scenario: Generating slash commands for Claude Code |
| 14 | +- **WHEN** the user selects Claude Code during initialization |
| 15 | +- **THEN** create `.claude/commands/openspec/proposal.md`, `.claude/commands/openspec/apply.md`, and `.claude/commands/openspec/archive.md` |
| 16 | +- **AND** populate each file from shared templates so command text matches other tools |
| 17 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 18 | + |
| 19 | +#### Scenario: Generating slash commands for CodeBuddy Code |
| 20 | +- **WHEN** the user selects CodeBuddy Code during initialization |
| 21 | +- **THEN** create `.codebuddy/commands/openspec/proposal.md`, `.codebuddy/commands/openspec/apply.md`, and `.codebuddy/commands/openspec/archive.md` |
| 22 | +- **AND** populate each file from shared templates so command text matches other tools |
| 23 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 24 | + |
| 25 | +#### Scenario: Generating slash commands for Cline |
| 26 | +- **WHEN** the user selects Cline during initialization |
| 27 | +- **THEN** create `.clinerules/openspec-proposal.md`, `.clinerules/openspec-apply.md`, and `.clinerules/openspec-archive.md` |
| 28 | +- **AND** populate each file from shared templates so command text matches other tools |
| 29 | +- **AND** include Cline-specific Markdown heading frontmatter |
| 30 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 31 | + |
| 32 | +#### Scenario: Generating slash commands for Crush |
| 33 | +- **WHEN** the user selects Crush during initialization |
| 34 | +- **THEN** create `.crush/commands/openspec/proposal.md`, `.crush/commands/openspec/apply.md`, and `.crush/commands/openspec/archive.md` |
| 35 | +- **AND** populate each file from shared templates so command text matches other tools |
| 36 | +- **AND** include Crush-specific frontmatter with OpenSpec category and tags |
| 37 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 38 | + |
| 39 | +#### Scenario: Generating slash commands for Cursor |
| 40 | +- **WHEN** the user selects Cursor during initialization |
| 41 | +- **THEN** create `.cursor/commands/openspec-proposal.md`, `.cursor/commands/openspec-apply.md`, and `.cursor/commands/openspec-archive.md` |
| 42 | +- **AND** populate each file from shared templates so command text matches other tools |
| 43 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 44 | + |
| 45 | +#### Scenario: Generating slash commands for Factory Droid |
| 46 | +- **WHEN** the user selects Factory Droid during initialization |
| 47 | +- **THEN** create `.factory/commands/openspec-proposal.md`, `.factory/commands/openspec-apply.md`, and `.factory/commands/openspec-archive.md` |
| 48 | +- **AND** populate each file from shared templates that include Factory-compatible YAML frontmatter for the `description` and `argument-hint` fields |
| 49 | +- **AND** include the `$ARGUMENTS` placeholder in the template body so droid receives any user-supplied input |
| 50 | +- **AND** wrap the generated content in OpenSpec managed markers so `openspec update` can safely refresh the commands |
| 51 | + |
| 52 | +#### Scenario: Generating slash commands for OpenCode |
| 53 | +- **WHEN** the user selects OpenCode during initialization |
| 54 | +- **THEN** create `.opencode/commands/openspec-proposal.md`, `.opencode/commands/openspec-apply.md`, and `.opencode/commands/openspec-archive.md` |
| 55 | +- **AND** populate each file from shared templates so command text matches other tools |
| 56 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 57 | + |
| 58 | +#### Scenario: Generating slash commands for Windsurf |
| 59 | +- **WHEN** the user selects Windsurf during initialization |
| 60 | +- **THEN** create `.windsurf/workflows/openspec-proposal.md`, `.windsurf/workflows/openspec-apply.md`, and `.windsurf/workflows/openspec-archive.md` |
| 61 | +- **AND** populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools |
| 62 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 63 | + |
| 64 | +#### Scenario: Generating slash commands for Kilo Code |
| 65 | +- **WHEN** the user selects Kilo Code during initialization |
| 66 | +- **THEN** create `.kilocode/workflows/openspec-proposal.md`, `.kilocode/workflows/openspec-apply.md`, and `.kilocode/workflows/openspec-archive.md` |
| 67 | +- **AND** populate each file from shared templates (wrapped in OpenSpec markers) so workflow text matches other tools |
| 68 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 69 | + |
| 70 | +#### Scenario: Generating slash commands for Codex |
| 71 | +- **WHEN** the user selects Codex during initialization |
| 72 | +- **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/prompts` if set) |
| 73 | +- **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) |
| 74 | +- **AND** wrap the generated content in OpenSpec markers so `openspec update` can refresh the prompts without touching surrounding custom notes |
| 75 | + |
| 76 | +#### Scenario: Generating slash commands for GitHub Copilot |
| 77 | +- **WHEN** the user selects GitHub Copilot during initialization |
| 78 | +- **THEN** create `.github/prompts/openspec-proposal.prompt.md`, `.github/prompts/openspec-apply.prompt.md`, and `.github/prompts/openspec-archive.prompt.md` |
| 79 | +- **AND** populate each file with YAML frontmatter containing a `description` field that summarizes the workflow stage |
| 80 | +- **AND** include `$ARGUMENTS` placeholder to capture user input |
| 81 | +- **AND** wrap the shared template body with OpenSpec markers so `openspec update` can refresh the content |
| 82 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 83 | + |
| 84 | +#### Scenario: Generating slash commands for Gemini CLI |
| 85 | +- **WHEN** the user selects Gemini CLI during initialization |
| 86 | +- **THEN** create `.gemini/commands/openspec/proposal.toml`, `.gemini/commands/openspec/apply.toml`, and `.gemini/commands/openspec/archive.toml` |
| 87 | +- **AND** populate each file as TOML that sets a stage-specific `description = "<summary>"` and a multi-line `prompt = """` block with the shared OpenSpec template |
| 88 | +- **AND** wrap the OpenSpec managed markers (`<!-- OPENSPEC:START -->` / `<!-- OPENSPEC:END -->`) inside the `prompt` value so `openspec update` can safely refresh the body between markers without touching the TOML framing |
| 89 | +- **AND** ensure the slash-command copy matches the existing proposal/apply/archive templates used by other tools |
| 90 | + |
| 91 | +#### Scenario: Generating slash commands for iFlow CLI |
| 92 | +- **WHEN** the user selects iFlow CLI during initialization |
| 93 | +- **THEN** create `.iflow/commands/openspec-proposal.md`, `.iflow/commands/openspec-apply.md`, and `.iflow/commands/openspec-archive.md` |
| 94 | +- **AND** populate each file from shared templates so command text matches other tools |
| 95 | +- **AND** include YAML frontmatter with `name`, `id`, `category`, and `description` fields for each command |
| 96 | +- **AND** wrap the generated content in OpenSpec managed markers so `openspec update` can safely refresh the commands |
| 97 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 98 | + |
| 99 | +#### Scenario: Generating slash commands for RooCode |
| 100 | +- **WHEN** the user selects RooCode during initialization |
| 101 | +- **THEN** create `.roo/commands/openspec-proposal.md`, `.roo/commands/openspec-apply.md`, and `.roo/commands/openspec-archive.md` |
| 102 | +- **AND** populate each file from shared templates so command text matches other tools |
| 103 | +- **AND** include simple Markdown headings (e.g., `# OpenSpec: Proposal`) without YAML frontmatter |
| 104 | +- **AND** wrap the generated content in OpenSpec managed markers where applicable so `openspec update` can safely refresh the commands |
| 105 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
0 commit comments