Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ These tools have built-in OpenSpec commands. Select the OpenSpec integration whe
| **CodeBuddy Code (CLI)** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.codebuddy/commands/`) — see [docs](https://www.codebuddy.ai/cli) |
| **CoStrict** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.cospec/openspec/commands/`) — see [docs](https://costrict.ai)|
| **Cursor** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` |
| **Cline** | Rules in `.clinerules/` directory (`.clinerules/openspec-*.md`) |
| **Cline** | Workflows in `.clinerules/workflows/` directory (`.clinerules/workflows/openspec-*.md`) |
| **Crush** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.crush/commands/openspec/`) |
| **Factory Droid** | `/openspec-proposal`, `/openspec-apply`, `/openspec-archive` (`.factory/commands/`) |
| **Gemini CLI** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.gemini/commands/openspec/`) |
Expand Down
13 changes: 13 additions & 0 deletions openspec/changes/fix-cline-workflows-implementation/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Why
The Cline implementation was architecturally incorrect. According to Cline's official documentation, Cline uses workflows for on-demand automation and rules for behavioral guidelines. The OpenSpec slash commands are procedural workflows (scaffold → implement → archive), not behavioral rules, so they should be placed in `.clinerules/workflows/` instead of `.clinerules/`.

## What Changes
- Update ClineSlashCommandConfigurator to use `.clinerules/workflows/` paths instead of `.clinerules/` paths
- Update all tests to expect the correct workflow file locations
- Update README.md documentation to reflect workflows instead of rules
- **BREAKING**: Existing Cline users will need to re-run `openspec init` to get the corrected workflow files

## Impact
- Affected specs: cli-init (corrected Cline workflow paths)
- Affected code: `src/core/configurators/slash/cline.ts`, test files, README.md
- Modified files: `.clinerules/workflows/openspec-*.md` (moved from `.clinerules/openspec-*.md`)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Delta for CLI Init

## MODIFIED Requirements
### Requirement: Slash Command Configuration

#### Scenario: Generating slash commands for Cline
- **WHEN** the user selects Cline during initialization
- **THEN** create `.clinerules/workflows/openspec-proposal.md`, `.clinerules/workflows/openspec-apply.md`, and `.clinerules/workflows/openspec-archive.md`
- **AND** populate each file from shared templates so command text matches other tools
- **AND** include Cline-specific Markdown heading frontmatter
- **AND** each template includes instructions for the relevant OpenSpec workflow stage
13 changes: 13 additions & 0 deletions openspec/changes/fix-cline-workflows-implementation/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## 1. Update ClineSlashCommandConfigurator
- [x] Change FILE_PATHS in `src/core/configurators/slash/cline.ts` from `.clinerules/openspec-*.md` to `.clinerules/workflows/openspec-*.md`

## 2. Update Tests
- [x] Update "should refresh existing Cline rule files" test in `test/core/update.test.ts` to use workflow paths
- [x] Update "should create Cline rule files with templates" test in `test/core/init.test.ts` to use workflow paths

## 3. Update Documentation
- [x] Update README.md table to show "Workflows in `.clinerules/workflows/` directory" for Cline

## 4. Validate Changes
- [x] Ensure all tests pass with the new paths
- [x] Verify the change follows OpenSpec conventions
6 changes: 3 additions & 3 deletions src/core/configurators/slash/cline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { SlashCommandConfigurator } from './base.js';
import { SlashCommandId } from '../../templates/index.js';

const FILE_PATHS: Record<SlashCommandId, string> = {
proposal: '.clinerules/openspec-proposal.md',
apply: '.clinerules/openspec-apply.md',
archive: '.clinerules/openspec-archive.md'
proposal: '.clinerules/workflows/openspec-proposal.md',
apply: '.clinerules/workflows/openspec-apply.md',
archive: '.clinerules/workflows/openspec-archive.md'
};

export class ClineSlashCommandConfigurator extends SlashCommandConfigurator {
Expand Down
8 changes: 4 additions & 4 deletions test/core/init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,22 +481,22 @@ describe('InitCommand', () => {
expect(updatedContent).toContain('Custom instructions here');
});

it('should create Cline rule files with templates', async () => {
it('should create Cline workflow files with templates', async () => {
queueSelections('cline', DONE);

await initCommand.execute(testDir);

const clineProposal = path.join(
testDir,
'.clinerules/openspec-proposal.md'
'.clinerules/workflows/openspec-proposal.md'
);
const clineApply = path.join(
testDir,
'.clinerules/openspec-apply.md'
'.clinerules/workflows/openspec-apply.md'
);
const clineArchive = path.join(
testDir,
'.clinerules/openspec-archive.md'
'.clinerules/workflows/openspec-archive.md'
);

expect(await fileExists(clineProposal)).toBe(true);
Expand Down
6 changes: 3 additions & 3 deletions test/core/update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ More rules after.`;
expect(fileExists).toBe(false);
});

it('should refresh existing Cline rule files', async () => {
it('should refresh existing Cline workflow files', async () => {
const proposalPath = path.join(
testDir,
'.clinerules/openspec-proposal.md'
'.clinerules/workflows/openspec-proposal.md'
);
await fs.mkdir(path.dirname(proposalPath), { recursive: true });
const initialContent = `# OpenSpec: Proposal
Expand Down Expand Up @@ -331,7 +331,7 @@ Old slash content
);
expect(logMessage).toContain('AGENTS.md (created)');
expect(logMessage).toContain(
'Updated slash commands: .clinerules/openspec-proposal.md'
'Updated slash commands: .clinerules/workflows/openspec-proposal.md'
);

consoleSpy.mockRestore();
Expand Down
Loading