Statewright enforces per-phase tool restrictions on AI agents via a deterministic Rust state machine engine integrated through MCP and agent hooks.
Key Takeaways
Models under 13GB fail to retain enough file context for accurate edits regardless of guardrails; 13.8GB+ models went from 2/10 to 10/10 on a 5-task SWE-bench subset with Statewright constraints.
Hard enforcement blocks tool calls at the protocol layer for Claude Code, Codex, and opencode; Cursor gets advisory-only rules because MCP alone cannot gate tool calls in its architecture.
Core Rust engine (crates/engine) is Apache 2.0 and embeddable with no runtime dependencies; full-stack self-hosting permitted under FSL-1.1 (converts to Apache 2.0 in 2029).
Workflows are JSON-defined state machines with guards, command allow-lists, bash destructive-op blocking, approval gates, and env scoping – agents can generate them via statewright_create_workflow.
Free tier allows 3 workflows with 72-hour run history; Pro is $29/mo for unlimited workflows.