Skip to main content

X4

Agent-assisted engineering, governed

An agent PR you cannot verify is a liability, not leverage.

X4 gives humans and agents one operational layer for multi-repo workspaces, remote validation, private previews, and GitHub workflows. Every change ships with deterministic, machine-generated evidence, so review means reading proof instead of trusting prose.

dry-run by defaultGitHub and remote-control commands plan first, execute only with explicit intent.
no localhost leaksPreview comments refuse local-only URLs. Tailnet links or nothing.
secrets never printedEnvironment contracts validate key names without echoing values.
cleanup is previewedWorktree, branch, and sandbox cleanup shows intent before force-applying.
Why X4 exists

Multi-repo agent work fragments fast.

WITHOUT X4

Each agent invents its own worktree setup.

Each repo has different validation and preview habits.

PR evidence is hand-written and hard to trust.

Remote test infrastructure has no consistent state model.

Issue-to-PR automation runs without shared guardrails.

WITH X4

One bootstrap flow, shared branch naming, one status model.

Repo policy and registry files define validation per repo.

Evidence is generated by deterministic runs, then attached.

Control plane tracks leases, workers, submissions, and cleanup.

Humans, IDEs, and agents use the same commands and paths.

System map

Three layers. Hard boundaries.

Mastra coordinates. X4 executes. The agent reasons. No layer reimplements another, which keeps the evidence auditable.

OWNS COORDINATION

Mastra orchestrator

GitHub events, workflow state, issue planning, PR follow-up, comments, checks, and draft PRs.

Mastra overview
OWNS EXECUTION

X4 CLI + control plane

Worktrees, sandboxes, tailnet previews, deterministic remote tests, evidence primitives, and worker leases.

Remote execution
OWNS REASONING

Agent and IDE adapters

Codex, Cursor, and VS Code inspect, edit, and operate through X4 instead of reinventing workflows.

IDE integration
issue - plan - approve - implement - deterministic test - evidence - draft PR - human review
From spec to merged PR

A workflow built for stateful software.

01

Normalize the work item

Turn a PM spec, GitHub issue, or follow-up comment into a scoped X4 work item with repo set, policy, and risk level.

02

Prepare the workspace

Bootstrap all attached repos, name branches consistently, install dependencies, and generate agent context.

03

Run governed implementation

Agents and humans edit through the same CLI contract, with secrets, sandboxes, and service access controlled by X4.

04

Publish proof

Remote validation, preview URLs, logs, artifacts, and check runs become the evidence package for review.