Skip to content

MCP workflow hardening (extracted from PR #387)#394

Draft
nhorton wants to merge 1 commit intomainfrom
feat/mcp-workflow-hardening
Draft

MCP workflow hardening (extracted from PR #387)#394
nhorton wants to merge 1 commit intomainfrom
feat/mcp-workflow-hardening

Conversation

@nhorton
Copy link
Copy Markdown
Contributor

@nhorton nhorton commented Apr 21, 2026

Summary

MCP runtime changes extracted from the OpenClaw support PR (#387) so they can be reviewed separately.

What's here

  • New tools: get_active_workflow, validate_step_outputs
  • Platform-aware workflow invocation text and review guidance (Claude vs OpenClaw)
  • StateManager.set_project_root / StatusWriter.set_project_root to rebind paths when the root resolves mid-session
  • RootResolver normalizes an OpenClaw plugin-bundle path back to the enclosing workspace root
  • FORMATTERS registry + format_for_openclaw for review output
  • short_instruction_filename alias files alongside the canonical review instructions (for OpenClaw spawns)
  • Tests for the above

Why separate

Per @nrh: "I think the MCP is not needed, thus why I am getting it into a PR in case it is needed, then reviewing the non-mcp stuff separately in a pure-openclaw review."

Known failure (pre-existing on the openclaw branch)

tests/unit/review/test_formatter.py::TestFormatForOpenClaw::test_output_mentions_sessions_spawn and test_agent_name_becomes_agent_type fail with NameError: name '_task_name' is not defined in format_for_openclaw. The helper was never added. Left as-is for visibility — was already failing on feat/openclaw-support before extraction.

Test plan

  • uv run pytest tests/unit/jobs/mcp/ tests/unit/review/
  • Verify the two new MCP tools show up in the server instructions
  • Decide whether OpenClaw actually needs these runtime changes or can function with the main-branch MCP runtime

Adds and hardens the DeepWork MCP workflow runtime:
- New tools: get_active_workflow, validate_step_outputs
- Platform-aware workflow invocation / review-guidance text
- StateManager/StatusWriter.set_project_root rebind support
- RootResolver normalizes OpenClaw plugin-bundle roots to the enclosing workspace
- FORMATTERS registry with format_for_openclaw
- short_instruction_filename alias files for OpenClaw review spawns
- Instruction/test coverage for the above

Extracted from the feat/openclaw-support branch (PR #387) so the MCP runtime
changes can be reviewed separately from the OpenClaw bundle content.

Note: tests/unit/review/test_formatter.py::TestFormatForOpenClaw::test_output_mentions_sessions_spawn
and ::test_agent_name_becomes_agent_type were failing on the openclaw branch before extraction
(pre-existing NameError: '_task_name' helper missing in format_for_openclaw).
Left as-is for reviewer visibility.
nhorton added a commit that referenced this pull request Apr 21, 2026
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.

1 participant