07 — Approval Workflow
Declarative approval policies that are AI-aware and context-sensitive.
Policy Rules
Rules are evaluated top-to-bottom; first match wins.
{
"rule_id": "ai-review-required",
"condition": {
"field": "ai_contribution_percentage",
"operator": "gte",
"value": 80
},
"requires": {
"approvals": [
{ "role": "tech-lead", "count": 1 },
{ "role": "security-reviewer", "count": 1 }
]
}
}
Condition Operators
| Operator | Example |
|---|---|
equals | target_environment == "production" |
gte | ai_contribution >= 80 |
in | changed_modules in ["auth", "payment"] |
contains | pr_title contains "BREAKING" |
CLI Usage
# Validate policy
ods validate approval-policy --file policy.json
# Check PR status
ods approval check --pr 42 --policy policy.json