|
| 1 | +## MODIFIED Requirements |
| 2 | + |
| 3 | +### Requirement: Slash Command Configuration |
| 4 | + |
| 5 | +The init command SHALL generate workflow configuration files for supported editors using shared templates. |
| 6 | + |
| 7 | +#### Scenario: Generating workflow files for Claude Code |
| 8 | + |
| 9 | +- **WHEN** the user selects Claude Code during initialization |
| 10 | +- **THEN** create `.claude/commands/openspec/proposal.md`, `.claude/commands/openspec/apply.md`, and `.claude/commands/openspec/archive.md` |
| 11 | +- **AND** populate each file from shared templates so command text matches other tools |
| 12 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 13 | + |
| 14 | +#### Scenario: Generating workflow files for Amp |
| 15 | + |
| 16 | +- **WHEN** the user selects Amp during initialization |
| 17 | +- **THEN** create `.agents/skills/openspec-proposal/SKILL.md`, `.agents/skills/openspec-apply/SKILL.md`, and `.agents/skills/openspec-archive/SKILL.md` |
| 18 | +- **AND** populate each file with YAML frontmatter containing `name` and `description` fields |
| 19 | +- **AND** wrap the body in OpenSpec markers so `openspec update` can refresh the content |
| 20 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 21 | + |
| 22 | +#### Scenario: Generating workflow files for Codex |
| 23 | + |
| 24 | +- **WHEN** the user selects Codex during initialization |
| 25 | +- **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) |
| 26 | +- **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) |
| 27 | +- **AND** wrap the generated content in OpenSpec markers so `openspec update` can refresh the prompts without touching surrounding custom notes |
| 28 | + |
| 29 | +#### Scenario: Generating workflow files for GitHub Copilot |
| 30 | + |
| 31 | +- **WHEN** the user selects GitHub Copilot during initialization |
| 32 | +- **THEN** create `.github/prompts/openspec-proposal.prompt.md`, `.github/prompts/openspec-apply.prompt.md`, and `.github/prompts/openspec-archive.prompt.md` |
| 33 | +- **AND** populate each file with YAML frontmatter containing a `description` field that summarizes the workflow stage |
| 34 | +- **AND** include `$ARGUMENTS` placeholder to capture user input |
| 35 | +- **AND** wrap the shared template body with OpenSpec markers so `openspec update` can refresh the content |
| 36 | +- **AND** each template includes instructions for the relevant OpenSpec workflow stage |
| 37 | + |
| 38 | +#### Scenario: Generating workflow files for Gemini CLI |
| 39 | + |
| 40 | +- **WHEN** the user selects Gemini CLI during initialization |
| 41 | +- **THEN** create `.gemini/commands/openspec/proposal.toml`, `.gemini/commands/openspec/apply.toml`, and `.gemini/commands/openspec/archive.toml` |
| 42 | +- **AND** populate each file as TOML that sets a stage-specific `description = "<summary>"` and a multi-line `prompt = """` block with the shared OpenSpec template |
| 43 | +- **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 |
| 44 | +- **AND** ensure the workflow copy matches the existing proposal/apply/archive templates used by other tools |
0 commit comments