Skip to content

Add OpenClaw bundle support and harden DeepWork MCP flow#387

Open
tylerwillis wants to merge 3 commits intomainfrom
feat/openclaw-support
Open

Add OpenClaw bundle support and harden DeepWork MCP flow#387
tylerwillis wants to merge 3 commits intomainfrom
feat/openclaw-support

Conversation

@tylerwillis
Copy link
Copy Markdown
Contributor

Summary

This PR makes DeepWork work cleanly with stock OpenClaw without requiring users to patch OpenClaw itself.

It does four things:

  • adds an OpenClaw bundle under plugins/openclaw/ with MCP wiring, workflow/review skills, and a bootstrap hook
  • adds get_active_workflow and validate_step_outputs MCP tools for safer session recovery and step submission
  • hardens root/session handling so OpenClaw resolves the real workspace root and can recover from stale session hints
  • updates OpenClaw-specific review guidance to use stock OpenClaw delegation primitives

Why

OpenClaw’s runtime surface differs from Claude Code:

  • review delegation uses stock OpenClaw delegation primitives rather than Claude-specific agent tools
  • the MCP server can be launched from the plugin bundle directory instead of the real workspace root
  • session restore/resume benefits from an explicit get_active_workflow path
  • agents need a dry-run validator before finished_step

Without these changes, DeepWork can point OpenClaw at the wrong root, give it the wrong review instructions, or make step submission more brittle than it needs to be.

What Changed

OpenClaw bundle

  • add plugins/openclaw/.codex-plugin/plugin.json
  • add plugins/openclaw/.mcp.json
  • add OpenClaw workflow/review skills
  • add deepwork-openclaw-bootstrap hook
  • document installation and runtime expectations in plugins/openclaw/README.md

MCP workflow improvements

  • add get_active_workflow
  • add validate_step_outputs
  • document the expanded MCP interface in doc/mcp_interface.md

Root and session handling

  • normalize OpenClaw plugin-bundle roots back to the enclosing workspace root
  • rebind state/status helpers when the effective root changes
  • prefer the current OpenClaw runtime session hint over stale workspace bootstrap state when needed

OpenClaw review flow

  • format OpenClaw review guidance around stock OpenClaw delegation primitives
  • keep review instruction paths workspace-relative
  • add short deterministic aliases for review instruction files to make them easier for OpenClaw agents to use reliably

Non-goals

  • this PR does not patch OpenClaw itself
  • this PR does not change standard DeepWork jobs beyond what is needed for host compatibility
  • this PR does not include local smoke jobs, bootstrap artifacts, or test-run debris

Testing

Ran:

  • uv run pytest tests/unit/jobs/mcp/test_tools.py tests/unit/jobs/mcp/test_roots.py tests/unit/jobs/mcp/test_state.py tests/unit/jobs/mcp/test_status.py tests/unit/jobs/mcp/test_quality_gate.py tests/unit/review/test_formatter.py tests/unit/review/test_instructions.py tests/unit/review/test_mcp.py tests/unit/plugins/test_openclaw_plugin.py -q
  • uv run pytest tests/unit/plugins/test_claude_plugin.py tests/integration/test_quality_gate_integration.py tests/e2e/test_claude_code_integration.py -q
  • uv run pytest tests/unit/jobs/mcp/test_server.py tests/unit/jobs/mcp/test_schemas.py -q

Results:

  • 307 passed
  • 57 passed, 1 skipped, 1 xfailed
  • 64 passed

The MCP workflow runtime changes from this branch have been extracted into
a separate draft PR (#394) for independent review. This branch now contains
only the OpenClaw bundle content.

Note: with MCP hardening removed, `uvx deepwork serve --platform openclaw`
will reject "openclaw" as an unsupported platform (FORMATTERS registry
only knows "claude" on main). That is expected during this review split —
determines whether the MCP changes are actually required to ship OpenClaw
support, or whether the bundle can work on the main-branch runtime alone.
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.

2 participants