Skip to content

feat(devin-cli): add skill and ACP run helper - #45

Merged
scarletkc merged 3 commits into
mainfrom
feat/devin-cli-skill
Oct 18, 2026
Merged

scarletkc merged 3 commits into
mainfrom
feat/devin-cli-skill

Conversation

@scarletkc

@scarletkc scarletkc commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add a devin-cli skill for delegating bounded coding tasks to the local Devin CLI over ACP (devin acp) from a supervising agent such as Claude Code or Codex.

The bundled scripts/devin_acp.py (standard library, Python 3.10+) has two commands:

  • run drives one Devin turn and blocks until it ends, so the caller backgrounds it with its own facility. It prints JSON lines (started, session, finished) and writes final.md, summary.json, events.jsonl and devin.stderr.log to a run directory. It supports --resume <session_id> (ACP session/load), --mode, --model, --agent-type, and a turn timeout that cancels and then stops the process tree.
  • progress summarizes a running or finished run directory: tool calls, recent tools, latest plan, denied permissions, failed tools, and time since the last event.

Permission requests are always answered with a single-use option (allow_once / reject_once). The helper never picks allow_session, allow_always, allow_always_global or switch_bypass, which persist in Devin's configuration or change the session mode. A default deny list rejects history-rewriting and branch/worktree git commands and gh publishing, and edits outside --cwd are rejected. Callers can adjust this with --deny, --no-default-deny, --allow-write-root and --read-only.

SKILL.md covers writing a self-contained brief, worktree isolation and integration, permissions and modes, model selection, monitoring, follow-ups, and verifying results. references/protocol.md records the Devin-specific ACP behavior the helper relies on: setup, session modes and config options, replay on session/load, update kinds, and the permission option IDs.

Validation

  • python -m unittest discover -s tests: 92 tests passed, including 15 new offline tests in tests/test_devin_acp.py against a scripted ACP agent (tests/fixtures/devin_acp_agent.py). They cover text and config capture, single-use permission answers and policy decisions, read-only and extra deny rules, resume without replayed text, mode validation, timeout with and without cancel acknowledgement, incomplete stop reasons, setup and process failures, unsupported client requests, progress, and CLI argument handling. Also ran tests.test_devin_acp with -W error::ResourceWarning.
  • uv tool run ruff check skills/devin-cli/scripts tests/test_devin_acp.py tests/fixtures/devin_acp_agent.py: passed.
  • python scripts/update_readme_skills.py --check, python scripts/sync_agent_runtime.py --check, gh skill publish --dry-run, git diff --check: passed. Packaged with scripts/package_skill.py (contains SKILL.md, references/protocol.md, scripts/devin_acp.py).
  • Real Devin CLI on Windows:
    • In a scratch git repository, one turn created a file, ran git status and git add (one through a single-use approval), and had git commit rejected by the default deny list. The summary reported the effective model, thought_level and speed.
    • --resume with --mode ask continued the same session and recalled the refused command without using tools.
    • An unknown --mode failed before the prompt was sent and listed the available modes.

CLI help:

usage: devin_acp.py [-h] {run,progress} ...

Run one Devin CLI task over ACP and record it, or summarize a recorded run.

Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

- Reject edit, delete and move requests without a target path.
- --read-only also rejects shell-command requests and starts in ask mode;
  editing modes are refused with it.
- One run per run directory, created owner-only; reuse is refused.
- A mode update without config options replaces the cached mode.
- Streamed answer text is logged as activity for progress.
- progress --tools 0 shows no titles; negative counts are rejected.
devin-ai-integration[bot]

This comment was marked as resolved.

@scarletkc
scarletkc merged commit 2e55254 into main Oct 18, 2026
2 checks passed
@scarletkc
scarletkc deleted the feat/devin-cli-skill branch October 18, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant