Run Claude, Codex, or Gemini on every PR
GitHub or GitLab webhook arrives, mecha matches it to a worker, dispatches the prompt, writes the result back. Automatic.
Managing event-driven agentic workflows — one binary, YAML config, policy-controlled.

name: pr-reviewer
docker:
image: mecha-worker:latest
token: claude.default
env:
CLAUDE_MODEL: claude-sonnet-4-6
events:
- source: github
on: [pull_request.opened]
prompt: "Review this PR for security issues.\n\n{{.diff}}"
policy:
comment: { allow: true }
status: { allow: true }
commit: { allow: false }mecha worker add workers/pr-reviewer.yml
mecha serveEvery PR now gets an automated review — comments, status checks, labels — controlled by policy.
Event.arrive → Event.match → Task.create → Task.dispatch → Policy.filter → Task.completeFour nouns: Event, Worker, Task, Policy. The pipeline is deterministic. The LLM is the only smart part. Policy is the only gate.