-
Notifications
You must be signed in to change notification settings - Fork 3.8k
proposal: Add devin desktop support #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mehdishahdoost
wants to merge
6
commits into
Fission-AI:main
Choose a base branch
from
mehdishahdoost:feat/add-devin-desktop-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+397
−2
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e0d01c1
proposal: add devin desktop support
mehdishahdoost a0a3fb6
feat(adapters): add devin desktop command adapter
mehdishahdoost 514699e
fix(config): add devin desktop to AI_TOOLS
mehdishahdoost fd974e1
fix(devin-adapter): escape implicit YAML scalars in frontmatter
mehdishahdoost 9a8befa
test(devin-adapter): add comprehensive tests for Devin Desktop adapter
mehdishahdoost cbb8301
Add cross-platform testcase.
mehdishahdoost File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| schema: spec-driven | ||
| created: 2026-06-04 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| ## Why | ||
|
|
||
| - Windsurf has been rebranded to **Devin Desktop**, the new flagship AI coding assistant from Cognition. Users who previously used Windsurf are now transitioning to Devin Desktop. | ||
| - Devin Desktop uses the same workflow system as Windsurf (Cascade workflows stored in `.devin/workflows/`), making it a natural migration path for existing OpenSpec users. | ||
| - OpenSpec currently supports Windsurf but not Devin Desktop. Adding Devin Desktop support ensures users can continue using OpenSpec with their new tool without manual migration. | ||
| - The adapter pattern is already established and proven with Windsurf; extending it to Devin Desktop is straightforward and maintains consistency across the tool ecosystem. | ||
|
|
||
| ## What Changes | ||
|
|
||
| - Add **Devin Desktop** (`devin`) to the CLI tool picker (`openspec init`) so users can select it during setup. | ||
| - Create a new **Devin adapter** (`src/core/command-generation/adapters/devin.ts`) that generates commands in `.devin/workflows/opsx-<id>.md` with the same frontmatter structure as Windsurf. | ||
| - Register the Devin adapter in the command adapter registry (`src/core/command-generation/registry.ts`) and export it from the adapters index. | ||
| - Update `docs/supported-tools.md` to include Devin Desktop in the tool reference table. | ||
| - Ensure `openspec update` refreshes existing Devin workflows in-place, mirroring current behavior for other editors. | ||
| - Extend unit tests for init/update to cover Devin Desktop generation and updates. | ||
| - Update CLI prompts and documentation to advertise Devin Desktop support. | ||
|
|
||
| ## Impact | ||
|
|
||
| - **Specs:** `cli-init`, `cli-update`, `command-generation` | ||
| - **Code:** | ||
| - `src/core/command-generation/adapters/devin.ts` (new adapter) | ||
| - `src/core/command-generation/registry.ts` (register adapter) | ||
| - `src/core/command-generation/adapters/index.ts` (export adapter) | ||
| - CLI tool selection logic | ||
| - **Docs:** `docs/supported-tools.md` | ||
| - **Tests:** init/update integration coverage for Devin Desktop workflows | ||
|
|
||
| ## Notes | ||
|
|
||
| - This is a **migration enabler** for existing Windsurf users transitioning to Devin Desktop. | ||
| - Windsurf support can remain in place for backward compatibility with users still on Windsurf. | ||
| - The implementation closely mirrors the existing Windsurf adapter, reducing complexity and risk. |
34 changes: 34 additions & 0 deletions
34
openspec/changes/add-devin-desktop-support/specs/cli-init/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| ## 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-*.md` slash commands) | ||
| - Devin Desktop (creates or refreshes `.devin/workflows/opsx-*.md` workflows) | ||
| - Windsurf (creates or refreshes `.windsurf/workflows/opsx-*.md` workflows) | ||
| - 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 workflows for Devin Desktop | ||
| - **WHEN** the user selects Devin Desktop during initialization | ||
| - **THEN** create `.devin/workflows/opsx-propose.md`, `.devin/workflows/opsx-apply.md`, and `.devin/workflows/opsx-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 | ||
| - **AND** use the same frontmatter structure as Windsurf (name, description, category, tags) | ||
|
|
||
| #### Scenario: Generating workflows for Windsurf | ||
| - **WHEN** the user selects Windsurf during initialization | ||
| - **THEN** create `.windsurf/workflows/opsx-propose.md`, `.windsurf/workflows/opsx-apply.md`, and `.windsurf/workflows/opsx-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 |
19 changes: 19 additions & 0 deletions
19
openspec/changes/add-devin-desktop-support/specs/cli-update/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ## MODIFIED Requirements | ||
|
|
||
| ### Requirement: Slash Command Updates | ||
| The update command SHALL refresh existing slash command files for configured tools without creating new ones. | ||
|
|
||
| #### Scenario: Updating workflows for Devin Desktop | ||
| - **WHEN** `.devin/workflows/` contains `opsx-propose.md`, `opsx-apply.md`, and `opsx-archive.md` | ||
| - **THEN** refresh each file using shared templates wrapped in OpenSpec markers | ||
| - **AND** ensure templates include instructions for the relevant workflow stage | ||
| - **AND** preserve the frontmatter structure (name, description, category, tags) | ||
|
|
||
| #### Scenario: Updating workflows for Windsurf | ||
| - **WHEN** `.windsurf/workflows/` contains `opsx-propose.md`, `opsx-apply.md`, and `opsx-archive.md` | ||
| - **THEN** refresh each file using shared templates wrapped in OpenSpec markers | ||
| - **AND** ensure templates include instructions for the relevant workflow stage | ||
|
|
||
| #### Scenario: Missing workflow file | ||
| - **WHEN** a tool lacks a workflow file | ||
| - **THEN** do not create a new file during update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| # Implementation Tasks | ||
|
|
||
| ## 1. Create Devin Desktop Adapter | ||
|
|
||
| ### 1.1 Create adapter file | ||
| - Create `src/core/command-generation/adapters/devin.ts` | ||
| - Base implementation on the existing Windsurf adapter (`src/core/command-generation/adapters/windsurf.ts`) | ||
| - Use `.devin/workflows/` as the target directory | ||
| - Use `opsx-<id>.md` as the filename pattern | ||
| - Include frontmatter with: name, description, category, tags | ||
|
|
||
| ### 1.2 Implement adapter interface | ||
| - Export `devinAdapter` object implementing `ToolCommandAdapter` | ||
| - Set `toolId` to `'devin'` | ||
| - Implement `getFilePath()` to return `.devin/workflows/opsx-<id>.md` | ||
| - Implement `formatFile()` to generate YAML frontmatter + body content | ||
|
|
||
| ## 2. Register Adapter | ||
|
|
||
| ### 2.1 Update registry | ||
| - Edit `src/core/command-generation/registry.ts` | ||
| - Import the new `devinAdapter` | ||
| - Register it in the static initializer: `CommandAdapterRegistry.register(devinAdapter)` | ||
|
|
||
| ### 2.2 Export adapter | ||
| - Edit `src/core/command-generation/adapters/index.ts` | ||
| - Add export: `export { devinAdapter } from './devin.js'` | ||
| - Update main index if needed: `src/core/command-generation/index.ts` | ||
|
|
||
| ## 3. Update CLI Tool Selection | ||
|
|
||
| ### 3.1 Add Devin Desktop to tool picker | ||
| - Locate CLI initialization code that prompts for tool selection | ||
| - Add "Devin Desktop" option to the multi-select menu | ||
| - Ensure it appears alongside Windsurf and other tools | ||
| - Map selection to `devin` tool ID | ||
|
|
||
| ## 4. Update Documentation | ||
|
|
||
| ### 4.1 Update supported tools reference | ||
| - Edit `docs/supported-tools.md` | ||
| - Add Devin Desktop row to the tool directory reference table | ||
| - Include: | ||
| - Tool name and ID: `Devin Desktop (devin)` | ||
| - Skills path: `.devin/skills/openspec-*/SKILL.md` | ||
| - Command path: `.devin/workflows/opsx-<id>.md` | ||
| - Add `devin` to the available tool IDs list in the "Non-Interactive Setup" section | ||
|
mehdishahdoost marked this conversation as resolved.
|
||
|
|
||
| ### 4.2 Update README if needed | ||
| - Check if README mentions tool count or lists specific tools | ||
| - Update any references to reflect Devin Desktop support | ||
|
|
||
| ## 5. Add Tests | ||
|
|
||
| ### 5.1 Test adapter functionality | ||
| - Create or update tests for the Devin adapter | ||
| - Test `getFilePath()` returns correct path | ||
| - Test `formatFile()` generates valid YAML frontmatter | ||
| - Test cross-platform path handling (Windows, macOS, Linux) | ||
|
|
||
| ### 5.2 Test CLI integration | ||
| - Test `openspec init --tools devin` generates `.devin/workflows/` files | ||
| - Test `openspec update` refreshes existing Devin workflows | ||
| - Test that Devin Desktop appears in interactive tool selection | ||
| - Verify files are created with correct structure and content | ||
|
|
||
| ### 5.3 Test backward compatibility | ||
| - Ensure Windsurf adapter still works | ||
| - Verify both Devin and Windsurf can be selected together | ||
| - Test that existing Windsurf installations are not affected | ||
|
|
||
| ## 6. Verify and Polish | ||
|
|
||
| ### 6.1 Manual testing | ||
| - Run `openspec init` and select Devin Desktop | ||
| - Verify `.devin/workflows/` directory is created | ||
| - Check that workflow files have correct frontmatter and content | ||
| - Run `openspec update` and verify files are refreshed | ||
| - Test on Windows, macOS, and Linux if possible | ||
|
|
||
| ### 6.2 Code review checklist | ||
| - Adapter follows existing patterns (Windsurf, Cursor, Claude) | ||
| - No hardcoded paths (use `path.join()`) | ||
| - YAML escaping handles special characters | ||
| - Error handling is consistent with other adapters | ||
| - Comments are clear and helpful | ||
|
|
||
| ### 6.3 Documentation review | ||
| - Supported tools table is accurate and complete | ||
| - Tool IDs are consistent across docs | ||
| - Examples show Devin Desktop usage | ||
| - Links and references are correct | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /** | ||
| * Devin Desktop Command Adapter | ||
| * | ||
| * Formats commands for Devin Desktop following its frontmatter specification. | ||
| * Devin Desktop uses the same Cascade workflow system as Windsurf. | ||
| */ | ||
|
|
||
| import path from 'path'; | ||
| import { transformToHyphenCommands } from '../../../utils/command-references.js'; | ||
| import type { CommandContent, ToolCommandAdapter } from '../types.js'; | ||
|
|
||
| /** | ||
| * Escapes a string value for safe YAML output. | ||
| * Quotes the string if it contains special YAML characters or would be | ||
| * interpreted as an implicit YAML scalar (boolean, null, number, etc). | ||
| */ | ||
| function escapeYamlValue(value: string): string { | ||
| // Check if value needs quoting due to special YAML characters or whitespace | ||
| const hasSpecialChars = /[:\n\r#{}[\],&*!|>'"%@`]|^\s|\s$/.test(value); | ||
|
|
||
| // Check if value would be interpreted as an implicit YAML scalar | ||
| // Matches: booleans (true/false/yes/no/on/off), null variants, numbers, hex/octal | ||
| const isImplicitScalar = /^(true|false|yes|no|on|off|null|~|-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?|0x[0-9a-fA-F]+|0o[0-7]+|-|\.?)$/.test(value); | ||
|
|
||
| if (hasSpecialChars || isImplicitScalar) { | ||
| // Use double quotes and escape internal double quotes and backslashes | ||
| const escaped = value.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n'); | ||
| return `"${escaped}"`; | ||
| } | ||
| return value; | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| } | ||
|
|
||
| /** | ||
| * Formats a tags array as a YAML array with proper escaping. | ||
| */ | ||
| function formatTagsArray(tags: string[]): string { | ||
| const escapedTags = tags.map((tag) => escapeYamlValue(tag)); | ||
| return `[${escapedTags.join(', ')}]`; | ||
| } | ||
|
|
||
| /** | ||
| * Devin Desktop adapter for command generation. | ||
| * File path: .devin/workflows/opsx-<id>.md | ||
| * Frontmatter: name, description, category, tags | ||
| * | ||
| * Devin Desktop uses slash-hyphen syntax (/opsx-apply) instead of colon syntax (/opsx:apply). | ||
| */ | ||
| export const devinAdapter: ToolCommandAdapter = { | ||
| toolId: 'devin', | ||
|
|
||
| getFilePath(commandId: string): string { | ||
| return path.join('.devin', 'workflows', `opsx-${commandId}.md`); | ||
| }, | ||
|
|
||
| formatFile(content: CommandContent): string { | ||
| // Transform command references from colon to hyphen syntax | ||
| const transformedBody = transformToHyphenCommands(content.body); | ||
|
|
||
| return `--- | ||
| name: ${escapeYamlValue(content.name)} | ||
| description: ${escapeYamlValue(content.description)} | ||
| category: ${escapeYamlValue(content.category)} | ||
| tags: ${formatTagsArray(content.tags)} | ||
| --- | ||
|
|
||
| ${transformedBody} | ||
| `; | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.