Skip to content

Commit 237e918

Browse files
feat(integrations): add Devin for Terminal skills-based integration (#2364)
* feat(integrations): add Devin for Terminal skills-based integration - Register DevinIntegration as a SkillsIntegration with .devin/skills/ layout - Add catalog entry, docs row, and supported-agents listing - Display /speckit-<command> hyphen syntax in init "Next Steps" panel (matches Claude/Cursor/Copilot skills mode, since Devin invokes skills by directory name) Closes #2346 * fix(devin): implement -p non-interactive dispatch; clarify skills comment Addresses Copilot review on PR #2364: - Override build_exec_args() in DevinIntegration to emit 'devin -p <prompt> [--model X]' for non-interactive text dispatch (verified Devin CLI supports -p / --print). Returns None when output_json=True since Devin has no structured-output flag, so CommandStep workflows that require JSON cleanly raise NotImplementedError instead of crashing on an unknown CLI flag. requires_cli=True is retained for tool detection. - Extend the skills-integrations enumeration comment in specify_cli/__init__.py to include copilot and devin so the comment matches the code below it. * fix(devin): always return exec args; document plain-text stdout Addresses third Copilot review comment on PR #2364. Returning None from build_exec_args() when output_json=True incorrectly used the codebase's IDE-only sentinel: workflow CommandStep checks 'impl.build_exec_args("test") is None' to detect non-dispatchable integrations (test_workflows.py exercises this with WindsurfIntegration). The previous implementation made Devin appear non-dispatchable to all command steps even though it runs fine via 'devin -p'. Always return the args list. When output_json is requested, Devin is still dispatched and returns plain-text stdout instead of structured JSON; the docstring documents this explicitly. * docs(devin): include claude in skills-integrations enumeration comment Addresses Copilot review on PR #2364: the comment listing skills integrations omitted Claude, which is also a SkillsIntegration subclass. Updated to keep the comment accurate for future readers. * test(devin): add build_exec_args regression tests; bump catalog updated_at Addresses Copilot review on PR #2364, per @mnriem's request to 'address the Copilot feedback, especially the testing ask': - tests/integrations/test_integration_devin.py: add TestDevinBuildExecArgs with three regression assertions: * build_exec_args returns args (not the None IDE-only sentinel) * --output-format is never emitted, regardless of output_json * --model flag is passed through correctly - integrations/catalog.json: bump top-level updated_at to reflect the Devin entry addition so downstream catalog consumers can detect the change reliably.
1 parent ab9c702 commit 237e918

7 files changed

Lines changed: 161 additions & 5 deletions

File tree

.github/ISSUE_TEMPLATE/agent_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ body:
88
value: |
99
Thanks for requesting a new agent! Before submitting, please check if the agent is already supported.
1010
11-
**Currently supported agents**: Claude Code, Gemini CLI, GitHub Copilot, Cursor, Qwen Code, opencode, Codex CLI, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy, Qoder CLI, Kiro CLI, Amp, SHAI, Tabnine CLI, Antigravity, IBM Bob, Mistral Vibe, Kimi Code, Trae, Pi Coding Agent, iFlow CLI
11+
**Currently supported agents**: Claude Code, Gemini CLI, GitHub Copilot, Cursor, Qwen Code, opencode, Codex CLI, Windsurf, Kilo Code, Auggie CLI, Roo Code, CodeBuddy, Qoder CLI, Kiro CLI, Amp, SHAI, Tabnine CLI, Antigravity, IBM Bob, Mistral Vibe, Kimi Code, Trae, Pi Coding Agent, iFlow CLI, Devin for Terminal
1212
1313
- type: input
1414
id: agent-name

docs/reference/integrations.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The Specify CLI supports a wide range of AI coding agents. When you run `specify
1313
| [CodeBuddy CLI](https://www.codebuddy.ai/cli) | `codebuddy` | |
1414
| [Codex CLI](https://github.com/openai/codex) | `codex` | Skills-based integration; installs skills into `.agents/skills` and invokes them as `$speckit-<command>` |
1515
| [Cursor](https://cursor.sh/) | `cursor-agent` | |
16+
| [Devin for Terminal](https://cli.devin.ai/docs) | `devin` | Skills-based integration; installs skills into `.devin/skills/` and invokes them as `/speckit-<command>` |
1617
| [Forge](https://forgecode.dev/) | `forge` | |
1718
| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `gemini` | |
1819
| [GitHub Copilot](https://code.visualstudio.com/) | `copilot` | |

integrations/catalog.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema_version": "1.0",
3-
"updated_at": "2026-04-08T00:00:00Z",
3+
"updated_at": "2026-04-28T00:00:00Z",
44
"catalog_url": "https://raw.githubusercontent.com/github/spec-kit/main/integrations/catalog.json",
55
"integrations": {
66
"claude": {
@@ -66,6 +66,15 @@
6666
"repository": "https://github.com/github/spec-kit",
6767
"tags": ["cli", "skills"]
6868
},
69+
"devin": {
70+
"id": "devin",
71+
"name": "Devin for Terminal",
72+
"version": "1.0.0",
73+
"description": "Devin for Terminal CLI skills-based integration",
74+
"author": "spec-kit-core",
75+
"repository": "https://github.com/github/spec-kit",
76+
"tags": ["cli", "skills"]
77+
},
6978
"qwen": {
7079
"id": "qwen",
7180
"name": "Qwen Code",

src/specify_cli/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ def init(
15281528
step_num = 2
15291529

15301530
# Determine skill display mode for the next-steps panel.
1531-
# Skills integrations (codex, kimi, agy, trae, cursor-agent) should show skill invocation syntax.
1531+
# Skills integrations (codex, claude, kimi, agy, trae, cursor-agent, copilot, devin) should show skill invocation syntax.
15321532
from .integrations.base import SkillsIntegration as _SkillsInt
15331533
_is_skills_integration = isinstance(resolved_integration, _SkillsInt) or getattr(resolved_integration, "_skills_mode", False)
15341534

@@ -1539,7 +1539,8 @@ def init(
15391539
trae_skill_mode = selected_ai == "trae"
15401540
cursor_agent_skill_mode = selected_ai == "cursor-agent" and (ai_skills or _is_skills_integration)
15411541
copilot_skill_mode = selected_ai == "copilot" and _is_skills_integration
1542-
native_skill_mode = codex_skill_mode or claude_skill_mode or kimi_skill_mode or agy_skill_mode or trae_skill_mode or cursor_agent_skill_mode or copilot_skill_mode
1542+
devin_skill_mode = selected_ai == "devin"
1543+
native_skill_mode = codex_skill_mode or claude_skill_mode or kimi_skill_mode or agy_skill_mode or trae_skill_mode or cursor_agent_skill_mode or copilot_skill_mode or devin_skill_mode
15431544

15441545
if codex_skill_mode and not ai_skills:
15451546
# Integration path installed skills; show the helpful notice
@@ -1551,6 +1552,9 @@ def init(
15511552
if cursor_agent_skill_mode and not ai_skills:
15521553
steps_lines.append(f"{step_num}. Start Cursor Agent in this project directory; spec-kit skills were installed to [cyan].cursor/skills[/cyan]")
15531554
step_num += 1
1555+
if devin_skill_mode:
1556+
steps_lines.append(f"{step_num}. Start Devin in this project directory; spec-kit skills were installed to [cyan].devin/skills[/cyan]")
1557+
step_num += 1
15541558
usage_label = "skills" if native_skill_mode else "slash commands"
15551559

15561560
def _display_cmd(name: str) -> str:
@@ -1560,7 +1564,7 @@ def _display_cmd(name: str) -> str:
15601564
return f"/speckit-{name}"
15611565
if kimi_skill_mode:
15621566
return f"/skill:speckit-{name}"
1563-
if cursor_agent_skill_mode or copilot_skill_mode:
1567+
if cursor_agent_skill_mode or copilot_skill_mode or devin_skill_mode:
15641568
return f"/speckit-{name}"
15651569
return f"/speckit.{name}"
15661570

src/specify_cli/integrations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def _register_builtins() -> None:
5656
from .codex import CodexIntegration
5757
from .copilot import CopilotIntegration
5858
from .cursor_agent import CursorAgentIntegration
59+
from .devin import DevinIntegration
5960
from .forge import ForgeIntegration
6061
from .gemini import GeminiIntegration
6162
from .generic import GenericIntegration
@@ -86,6 +87,7 @@ def _register_builtins() -> None:
8687
_register(CodexIntegration())
8788
_register(CopilotIntegration())
8889
_register(CursorAgentIntegration())
90+
_register(DevinIntegration())
8991
_register(ForgeIntegration())
9092
_register(GeminiIntegration())
9193
_register(GenericIntegration())
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
"""Devin for Terminal integration — skills-based agent.
2+
3+
Devin uses the ``.devin/skills/speckit-<name>/SKILL.md`` layout and
4+
reads project context from ``AGENTS.md`` at the repo root. The CLI
5+
binary is ``devin`` and skills are invoked via ``/<name>`` inside an
6+
interactive ``devin`` session.
7+
8+
See: https://cli.devin.ai/docs/extensibility/skills/overview
9+
"""
10+
11+
from __future__ import annotations
12+
13+
from ..base import IntegrationOption, SkillsIntegration
14+
15+
16+
class DevinIntegration(SkillsIntegration):
17+
"""Integration for Cognition AI's Devin for Terminal."""
18+
19+
key = "devin"
20+
config = {
21+
"name": "Devin for Terminal",
22+
"folder": ".devin/",
23+
"commands_subdir": "skills",
24+
"install_url": "https://cli.devin.ai/docs",
25+
"requires_cli": True,
26+
}
27+
registrar_config = {
28+
"dir": ".devin/skills",
29+
"format": "markdown",
30+
"args": "$ARGUMENTS",
31+
"extension": "/SKILL.md",
32+
}
33+
context_file = "AGENTS.md"
34+
35+
def build_exec_args(
36+
self,
37+
prompt: str,
38+
*,
39+
model: str | None = None,
40+
output_json: bool = True,
41+
) -> list[str] | None:
42+
"""Build non-interactive CLI args for Devin for Terminal.
43+
44+
Devin supports ``devin -p <prompt>`` for single-turn execution
45+
and ``--model`` for model selection, but its CLI has no flag
46+
for structured JSON output. When ``output_json`` is requested,
47+
Devin is still dispatched normally and returns plain-text
48+
stdout instead of structured JSON. ``requires_cli=True`` is
49+
kept on the integration for tool detection.
50+
"""
51+
args = [self.key, "-p", prompt]
52+
if model:
53+
args.extend(["--model", model])
54+
return args
55+
56+
@classmethod
57+
def options(cls) -> list[IntegrationOption]:
58+
return [
59+
IntegrationOption(
60+
"--skills",
61+
is_flag=True,
62+
default=True,
63+
help="Install as agent skills (default for Devin)",
64+
),
65+
]
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
"""Tests for DevinIntegration."""
2+
3+
from .test_integration_base_skills import SkillsIntegrationTests
4+
5+
6+
class TestDevinIntegration(SkillsIntegrationTests):
7+
KEY = "devin"
8+
FOLDER = ".devin/"
9+
COMMANDS_SUBDIR = "skills"
10+
REGISTRAR_DIR = ".devin/skills"
11+
CONTEXT_FILE = "AGENTS.md"
12+
13+
14+
class TestDevinBuildExecArgs:
15+
"""Regression tests for DevinIntegration.build_exec_args.
16+
17+
Devin's CLI has no --output-format flag, so build_exec_args must
18+
omit it regardless of the output_json argument. The integration
19+
must also remain dispatchable (must not return None, which is the
20+
codebase's IDE-only sentinel checked by CommandStep).
21+
"""
22+
23+
def test_returns_args_not_none_for_dispatch(self):
24+
"""Devin is CLI-dispatchable; build_exec_args must not return None."""
25+
from specify_cli.integrations.devin import DevinIntegration
26+
27+
impl = DevinIntegration()
28+
args = impl.build_exec_args("test prompt")
29+
assert args is not None, (
30+
"DevinIntegration.build_exec_args must not return None. "
31+
"None is the codebase sentinel for IDE-only integrations "
32+
"(see WindsurfIntegration); Devin is dispatchable via 'devin -p'."
33+
)
34+
assert args[:3] == ["devin", "-p", "test prompt"]
35+
36+
def test_output_json_does_not_emit_output_format_flag(self):
37+
"""Devin has no --output-format flag; output_json=True must not add it."""
38+
from specify_cli.integrations.devin import DevinIntegration
39+
40+
impl = DevinIntegration()
41+
args_json = impl.build_exec_args("hello", output_json=True)
42+
args_text = impl.build_exec_args("hello", output_json=False)
43+
44+
assert "--output-format" not in args_json
45+
assert "json" not in args_json[3:]
46+
# The two should be identical: output_json is documented as having
47+
# no effect on the command line for Devin (plain-text stdout).
48+
assert args_json == args_text
49+
50+
def test_model_flag_passed_through(self):
51+
"""--model is supported and should appear when provided."""
52+
from specify_cli.integrations.devin import DevinIntegration
53+
54+
impl = DevinIntegration()
55+
args = impl.build_exec_args("hi", model="claude-sonnet-4")
56+
assert args == ["devin", "-p", "hi", "--model", "claude-sonnet-4"]
57+
58+
59+
class TestDevinAutoPromote:
60+
"""--ai devin auto-promotes to integration path."""
61+
62+
def test_ai_devin_without_ai_skills_auto_promotes(self, tmp_path):
63+
"""--ai devin should work the same as --integration devin."""
64+
from typer.testing import CliRunner
65+
from specify_cli import app
66+
67+
runner = CliRunner()
68+
target = tmp_path / "test-proj"
69+
result = runner.invoke(
70+
app,
71+
["init", str(target), "--ai", "devin", "--no-git", "--ignore-agent-tools", "--script", "sh"],
72+
)
73+
74+
assert result.exit_code == 0, f"init --ai devin failed: {result.output}"
75+
assert (target / ".devin" / "skills" / "speckit-plan" / "SKILL.md").exists()

0 commit comments

Comments
 (0)