Add Devin plugin (plugins/devin): MCP server + ATIF-v1.7 harvest#88
Add Devin plugin (plugins/devin): MCP server + ATIF-v1.7 harvest#88xerxes-y wants to merge 4 commits into
Conversation
Wires the skillopt_sleep engine into Devin (Cognition) via an MCP server, following the same thin-shell pattern as plugins/copilot. - mcp_server.py: stdlib-only stdio MCP server exposing the standard sleep_* tools (status, dry-run, run, adopt, harvest). REPO_ROOT defaults to ../.. so it finds skillopt_sleep automatically when run from plugins/devin/. - harvest_devin.py: converts Devin ATIF-v1.7 transcripts, agentmemory, and .devin/skills/*/SKILL.md into the Claude Code-compatible JSONL the engine consumes; enriches with taskKey + outcome envelopes (hard test/build signal or judge rubric). Workspace auto-detection; cross-platform paths. - judge.py, mcp-config.example.json, devin-rules.snippet.md, README.md. - plugins/README.md: add Devin to the platform + install tables. No changes to skillopt_sleep; shells out to `python -m skillopt_sleep` like the other plugins. Pure stdlib; default backend mock (no API spend). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for the Devin integration @xerxes-y — the thin-shell MCP pattern mirroring Two things before we can evaluate this for merge: 1. Could you share some test/validation results? Right now the PR adds no tests, and the harvester + MCP server are non-trivial. A short demonstration would go a long way — e.g. running 2. Likely path bug: CLAUDE_HOME = os.environ.get(
"SKILLOPT_DEVIN_CLAUDE_HOME",
os.path.expanduser("~/.skillopt-sleep-devin"),
)Only the fallback default gets Also note the CLA check is still pending — that'll need to pass before merge. Appreciate the contribution; with some validation output and that path fix this'll be in good shape. |
…ture Review fixes: - Path bug: SKILLOPT_DEVIN_CLAUDE_HOME (and SKILLOPT_SLEEP_REPO) read from the env are now wrapped in os.path.expanduser, so the documented "~/..." config no longer passes a literal ~ to --claude-home (which yielded zero mined sessions). expanduser on an absolute default is a no-op. - tests/test_devin_plugin.py: tool-schema completeness, action→subcommand map, backend enum, the CLAUDE_HOME expansion regression, and an ATIF-v1.7 harvest shape test against a bundled fixture. - plugins/devin/fixtures/devin_sample.json: sample ATIF-v1.7 transcript. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mirror the copilot MCP server: same rich _TOOL_SCHEMA (source, model, tasks_file, target_skill_path, max_sessions, max_tasks, lookback_hours, auto_adopt, json, edit_budget, hour, minute) and generic flag forwarding, plus sleep_schedule / sleep_unschedule. Devin specifics retained: the ATIF-v1.7 harvest step (run before data-reading actions, engine pointed at it via --claude-home, default --source claude) and post-adopt sync into .devin/skills/. Tests + README + rules snippet updated for the 7-tool interface. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A harvested single-turn Devin session spanned only 1s (reply written 1000ms after the prompt), which the engine's harvest filter conservatively classifies as a <3s headless replay (skillopt_sleep Issue microsoft#62) and skips — so a real single-turn session mined 0 tasks. Widen the prompt->reply gap to 5s. With this, an end-to-end dry-run mines the task: "night 1: 1 sessions -> 1 tasks". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
PR reply — post this as a comment on the microsoft/SkillOpt PRThanks for the careful review! Both points addressed in 1. Path bug — fixedGood catch. 2. Tests + validationAdded Harvest a sample ATIF-v1.7 transcript → The converted transcript carries the grouping key on the user turn:
Full i.e. harvest → mine → replay → held-out gate all run; the mock backend While validating this I found and fixed a real integration bug: a harvested 3. Schema / tool parity with copilotAlso went ahead and brought the server to full parity with |
|
@microsoft-github-policy-service agree |
Wires the skillopt_sleep engine into Devin (Cognition) via an MCP server, following the same thin-shell pattern as plugins/copilot.
No changes to skillopt_sleep; shells out to
python -m skillopt_sleeplike the other plugins. Pure stdlib; default backend mock (no API spend).