Skip to content

Commit c47cdaa

Browse files
authored
fix: archive add-antigravity-support and fix-cline-workflows-implementation (#423)
Archives two changes that were missing complete requirement content in their spec deltas, which would have caused data loss during archival: 1. add-antigravity-support: Adds Antigravity IDE support to cli-init and cli-update with proper workflow file generation in `.agent/workflows/` 2. fix-cline-workflows-implementation: Corrects Cline paths from `.clinerules/` to `.clinerules/workflows/` to match Cline's official workflow conventions Both deltas were fixed to include all 15 slash command scenarios (14 existing + 1 new Antigravity) to prevent loss of existing requirements when archived.
1 parent ea5aa0e commit c47cdaa

File tree

13 files changed

+408
-31
lines changed

13 files changed

+408
-31
lines changed

openspec/changes/add-antigravity-support/specs/cli-init/spec.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

openspec/changes/add-antigravity-support/specs/cli-update/spec.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

openspec/changes/add-antigravity-support/proposal.md renamed to openspec/changes/archive/2025-12-30-add-antigravity-support/proposal.md

File renamed without changes.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Delta for CLI Update
2+
3+
## MODIFIED Requirements
4+
### Requirement: Slash Command Updates
5+
The update command SHALL refresh existing slash command files for configured tools without creating new ones, and ensure the OpenCode archive command accepts change ID arguments.
6+
7+
#### Scenario: Updating slash commands for Antigravity
8+
- **WHEN** `.agent/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
9+
- **THEN** refresh the OpenSpec-managed portion of each file so the workflow copy matches other tools while preserving the existing single-field `description` frontmatter
10+
- **AND** skip creating any missing workflow files during update, mirroring the behavior for Windsurf and other IDEs
11+
12+
#### Scenario: Updating slash commands for Claude Code
13+
- **WHEN** `.claude/commands/openspec/` contains `proposal.md`, `apply.md`, and `archive.md`
14+
- **THEN** refresh each file using shared templates
15+
- **AND** ensure templates include instructions for the relevant workflow stage
16+
17+
#### Scenario: Updating slash commands for CodeBuddy Code
18+
- **WHEN** `.codebuddy/commands/openspec/` contains `proposal.md`, `apply.md`, and `archive.md`
19+
- **THEN** refresh each file using shared templates
20+
- **AND** ensure templates include instructions for the relevant workflow stage
21+
22+
#### Scenario: Updating slash commands for Cline
23+
- **WHEN** `.clinerules/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
24+
- **THEN** refresh each file using shared templates
25+
- **AND** include Cline-specific Markdown heading frontmatter
26+
- **AND** ensure templates include instructions for the relevant workflow stage
27+
28+
#### Scenario: Updating slash commands for Crush
29+
- **WHEN** `.crush/commands/` contains `openspec/proposal.md`, `openspec/apply.md`, and `openspec/archive.md`
30+
- **THEN** refresh each file using shared templates
31+
- **AND** include Crush-specific frontmatter with OpenSpec category and tags
32+
- **AND** ensure templates include instructions for the relevant workflow stage
33+
34+
#### Scenario: Updating slash commands for Cursor
35+
- **WHEN** `.cursor/commands/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
36+
- **THEN** refresh each file using shared templates
37+
- **AND** ensure templates include instructions for the relevant workflow stage
38+
39+
#### Scenario: Updating slash commands for Factory Droid
40+
- **WHEN** `.factory/commands/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
41+
- **THEN** refresh each file using the shared Factory templates that include YAML frontmatter for the `description` and `argument-hint` fields
42+
- **AND** ensure the template body retains the `$ARGUMENTS` placeholder so user input keeps flowing into droid
43+
- **AND** update only the content inside the OpenSpec managed markers, leaving any unmanaged notes untouched
44+
- **AND** skip creating missing files during update
45+
46+
#### Scenario: Updating slash commands for OpenCode
47+
- **WHEN** `.opencode/command/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
48+
- **THEN** refresh each file using shared templates
49+
- **AND** ensure templates include instructions for the relevant workflow stage
50+
- **AND** ensure the archive command includes `$ARGUMENTS` placeholder in frontmatter for accepting change ID arguments
51+
52+
#### Scenario: Updating slash commands for Windsurf
53+
- **WHEN** `.windsurf/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
54+
- **THEN** refresh each file using shared templates wrapped in OpenSpec markers
55+
- **AND** ensure templates include instructions for the relevant workflow stage
56+
- **AND** skip creating missing files (the update command only refreshes what already exists)
57+
58+
#### Scenario: Updating slash commands for Kilo Code
59+
- **WHEN** `.kilocode/workflows/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
60+
- **THEN** refresh each file using shared templates wrapped in OpenSpec markers
61+
- **AND** ensure templates include instructions for the relevant workflow stage
62+
- **AND** skip creating missing files (the update command only refreshes what already exists)
63+
64+
#### Scenario: Updating slash commands for Codex
65+
- **GIVEN** the global Codex prompt directory contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
66+
- **WHEN** a user runs `openspec update`
67+
- **THEN** refresh each file using the shared slash-command templates (including placeholder guidance)
68+
- **AND** preserve any unmanaged content outside the OpenSpec marker block
69+
- **AND** skip creation when a Codex prompt file is missing
70+
71+
#### Scenario: Updating slash commands for GitHub Copilot
72+
- **WHEN** `.github/prompts/` contains `openspec-proposal.prompt.md`, `openspec-apply.prompt.md`, and `openspec-archive.prompt.md`
73+
- **THEN** refresh each file using shared templates while preserving the YAML frontmatter
74+
- **AND** update only the OpenSpec-managed block between markers
75+
- **AND** ensure templates include instructions for the relevant workflow stage
76+
77+
#### Scenario: Updating slash commands for Gemini CLI
78+
- **WHEN** `.gemini/commands/openspec/` contains `proposal.toml`, `apply.toml`, and `archive.toml`
79+
- **THEN** refresh the body of each file using the shared proposal/apply/archive templates
80+
- **AND** replace only the content between `<!-- OPENSPEC:START -->` and `<!-- OPENSPEC:END -->` markers inside the `prompt = """` block so the TOML framing (`description`, `prompt`) stays intact
81+
- **AND** skip creating any missing `.toml` files during update; only pre-existing Gemini commands are refreshed
82+
83+
#### Scenario: Updating slash commands for iFlow CLI
84+
- **WHEN** `.iflow/commands/` contains `openspec-proposal.md`, `openspec-apply.md`, and `openspec-archive.md`
85+
- **THEN** refresh each file using shared templates
86+
- **AND** preserve the YAML frontmatter with `name`, `id`, `category`, and `description` fields
87+
- **AND** update only the OpenSpec-managed block between markers
88+
- **AND** ensure templates include instructions for the relevant workflow stage
89+
90+
#### Scenario: Missing slash command file
91+
- **WHEN** a tool lacks a slash command file
92+
- **THEN** do not create a new file during update

openspec/changes/add-antigravity-support/tasks.md renamed to openspec/changes/archive/2025-12-30-add-antigravity-support/tasks.md

File renamed without changes.

openspec/changes/fix-cline-workflows-implementation/proposal.md renamed to openspec/changes/archive/2025-12-30-fix-cline-workflows-implementation/proposal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ The Cline implementation was architecturally incorrect. According to Cline's off
88
- **BREAKING**: Existing Cline users will need to re-run `openspec init` to get the corrected workflow files
99

1010
## Impact
11-
- Affected specs: cli-init (corrected Cline workflow paths)
11+
- Affected specs: cli-init, cli-update (corrected Cline workflow paths)
1212
- Affected code: `src/core/configurators/slash/cline.ts`, test files, README.md
1313
- Modified files: `.clinerules/workflows/openspec-*.md` (moved from `.clinerules/openspec-*.md`)

0 commit comments

Comments
 (0)