Per maintainer request: - Remove the internal/scratch docs/sleep/ tree (reports, raw logs, blog run JSON, sweep.jsonl) — 23 files — and the root PUBLISHING.md. These were working notes, not reference docs. - Take the dedicated SkillOpt-Sleep content out of the main README (News bullet + section) and host it in the rendered guide instead: new section 9 in docs/guideline.html (deployment companion, the three plugins, opt-in experience replay / dream rollouts) with a sidebar entry. - Fix the README's opening reference so "Documentation & Reproduction Guide" links directly to the rendered GitHub Pages page, not the raw .html source. - Repoint the now-removed docs/sleep links in the plugin READMEs to the guide section. The plugin code (plugins/, skillopt_sleep/) is unchanged; only docs move. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
SkillOpt-Sleep — GitHub Copilot integration
Give Copilot (CLI or VS Code) a nightly sleep cycle via a tiny MCP
server that exposes the skillopt_sleep engine as tools. MCP is GitHub's
supported way to extend Copilot, so this works across Copilot CLI, VS Code, and
other MCP clients with the same server.
What's here
| File | Purpose |
|---|---|
mcp_server.py |
stdlib-only MCP (stdio) server exposing sleep_* tools |
mcp-config.example.json |
drop-in MCP server config |
copilot-instructions.snippet.md |
paste into .github/copilot-instructions.md |
Install
Requires Python ≥ 3.10. No third-party packages — the server is pure stdlib.
-
Register the MCP server. Add the server to your Copilot MCP config (Copilot CLI:
~/.copilot/mcp-config.json; VS Code: your MCP settings). Usemcp-config.example.jsonas a template — setSKILLOPT_SLEEP_REPOto this repo's path:{ "mcpServers": { "skillopt-sleep": { "command": "python3", "args": ["/abs/path/SkillOpt-Sleep/plugins/copilot/mcp_server.py"], "env": { "SKILLOPT_SLEEP_REPO": "/abs/path/SkillOpt-Sleep" } } } } -
(Optional) Tell Copilot about it. Append
copilot-instructions.snippet.mdto your repo's.github/copilot-instructions.mdso Copilot reaches for the tools when the user asks to "run the sleep cycle".
Use
Ask Copilot things like "run the sleep cycle", "what did the last sleep
propose?", "adopt the staged sleep proposal". Copilot calls the MCP tools:
sleep_status, sleep_dry_run, sleep_run, sleep_adopt, sleep_harvest.
Each tool takes optional project, backend (mock/claude/codex), and
scope arguments. Default backend is mock (no API spend).
Verify the server directly (no Copilot needed)
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| SKILLOPT_SLEEP_REPO="$(pwd)" python3 plugins/copilot/mcp_server.py
You should see the server info and the five sleep_* tools.
Notes / status
- MCP is the stable, official Copilot extension surface, so this is the most portable of the three integrations (one server → CLI + IDE).
- The engine and all its controls (gate on/off, multi-rollout, budget, preferences, optimizer/target split) are identical across platforms — see the SkillOpt-Sleep guide section.