Statewright

Statewright

Your workflows across AI coding harnesses, with tools and checks for each phase

Statewright

Get started

Your workflows, in the harness you choose.

Use Statewright with Claude Code, Codex, Cursor, OpenCode, Pi, or OMX. Connect other MCP hosts for workflow control. Each integration has its own tool enforcement and model-routing capabilities.

Statewright gives each phase of your workflow its own tools, instructions, and checks. A planning phase can allow reading; implementation can enable edits; review can require evidence before completion. Define your own process or start with the engineering workflow.

This excerpt shows tool limits and transitions for two phases. It omits the rest of the workflow, including testing; see Create Your Own for a complete definition.

{
  "states": {
    "planning": {
      "allowed_tools": ["Read", "Grep", "Glob"],
      "max_iterations": 10,
      "instructions": "Read and understand the code. Do not edit.",
      "on": { "READY": "implementing" }
    },
    "implementing": {
      "allowed_tools": ["Read", "Edit", "Write"],
      "max_edit_lines": 20,
      "on": { "DONE": "testing", "FAIL": "planning" }
    }
  }
}

Each state declares which tools are available. Managed integrations can reject an unlisted tool before it runs. Enforcement depends on which host and tool path you use; connecting an unmanaged remote host does not give Statewright control over every native tool. Here's what a rejection looks like:

Tool 'Edit' is not available in the 'planning' phase.
Allowed tools: Read, Grep, Glob.
To advance, call statewright_transition with: READY -> implementing.

What You Get

The workflow is a JSON file. Define it by hand, build it in the visual editor, or have your agent call statewright_search_docs("schema") to pull the full JSON schema and generate one from context.

Guards and approval gates let you require programmatic conditions (test results, coverage thresholds) or human sign-off before transitions fire.

Run history captures Statewright-observed tool calls, transition rationale, and phase context. On managed shell paths, common write patterns such as redirects (>/>>), destructive commands (rm/shred), and in-place edits (sed -i) are screened when Write/Edit are not allowed. allowed_commands adds prefix-matched whitelisting on top.

The default engineering starter keeps your selected model. You can optionally configure models and effort per phase on supported clients; a requested route is not proof of which model executed a response.

Install

Choose your harness in the install guide, then connect and ask your agent to load a workflow. Claude Code uses its native plugin and OAuth flow; the guide also covers Codex, Cursor, OpenCode, Pi, OMX, Desktop, and custom MCP connections.

On this page