Skip to main content

Orchestration Policy

X4 orchestration policy describes validation lanes, runner profiles, escalation rules, and review gates for a repo.

Preferred path:

.github/x4/policy.yml

Legacy path still supported during migration:

.github/code-assist/policy.yml

Commands​

x4 orchestration policy validate --repo /path/to/repo
x4 orchestration policy show --repo /path/to/repo
x4 orchestration policy migrate --repo /path/to/repo --apply
x4 orchestration policy init --repo /path/to/repo --apply

Policy Lifecycle​

How Policy Is Used​

Policy is input to orchestration, not a replacement for execution:

  • CLI/control/worker layers run commands and collect evidence.
  • Mastra uses repo configuration and policy signals to decide automation scope.
  • Review gates and escalation rules determine when automation should stop for a human.