Approval Workflows
Defining policy gates for changes
[!WARNING] Status: Planned. Approval workflows are part of the governance layer currently under development. The design below describes the planned behavior.
Approval Workflows will allow you to define who must sign off on a change based on what is being changed. These policies will be defined in .choochoo/approval-policies.yaml within your project structure. For an overview of how approvals fit into the platform, see the Architecture.
Policy Schema
policies:
- name: pii-change-policy
description: "Requires Security Team approval for PII changes"
trigger:
tags: ["pii", "gdpr"]
env: ["production"]
approvers:
- role: "security-engineer"
team: "sec-ops"
minApprovals: 1
slaHours: 24The trigger.tags field references compliance tags that are applied to fields in your Contracts. When a tagged field is modified, the policy is activated. The tags also feed into the Risk Scoring algorithm, which determines the severity level of the approval gate.
How It Works
- Triggering: When an artifact is submitted (
choochoo governance submit), the Engine evaluates the change against the triggers inapproval-policies.yaml. - Matching: If a policy matches (e.g., a PII field was modified in Prod), the submission enters a
pending_approvalstate. This is part of the artifact lifecycle. - Notification: The designated team is notified (via configured integrations). In The Station, pending approvals appear in the dashboard.
- Action: An approver runs
choochoo governance approve <id>. The approval is recorded in the Audit Trail. - Execution: Once all required approvals are met, the change is applied. The Decision Trace captures the full approval chain.
In CI/CD pipelines, a pending approval causes the CLI to return exit code 10 (APPROVAL_REQUIRED), blocking the pipeline until the approval is obtained.
Risk-Based Approval Levels
The number and type of approvers required depends on the risk score of the change:
| Risk Level | Score Range | Approval Required |
|---|---|---|
| Low | 0.0 – 3.0 | ✅ Auto-approved — no human intervention needed |
| Medium | 3.1 – 6.0 | 👤 Single approver from the designated team |
| High | 6.1 – 8.0 | 👥 Two approvers from different teams |
| Critical | 8.1 – 10.0 | 🔒 Executive-level security review |
The risk score is calculated based on compliance sensitivity, impact radius from the Lineage Graph, agent confidence, and environment. See Risk Scoring for the full algorithm.
Agent Interactions
When an AI agent triggers an approval workflow:
- The agent's action is paused and a Decision Trace is recorded with the pending state.
- The agent's System Card is referenced to determine if the action falls within its documented capabilities.
- If the agent has a
requires-approvalboundary, all its actions trigger approval regardless of risk score. - Boundary violations (attempting actions outside permitted scope) produce error E007 and are logged in the Audit Trail.
Emergency Overrides
In "break glass" scenarios, an admin can force an approval. This event is logged with the highest severity in the Audit Trail and will appear prominently in Compliance Reports. Emergency overrides are subject to post-hoc review and may trigger additional notifications.
Configuration
Approval policies are configured in two places:
.choochoorc— Thegovernance.requireApprovalfield lists compliance tags that always require approval..choochoo/approval-policies.yaml— Granular policies with team-specific approvers, SLAs, and environment scoping.
See the Configuration guide for the full schema and available options.
Related
Risk Scoring
Understand the algorithm that determines approval thresholds for every change.
Audit Trail
Every approval decision is permanently recorded in the immutable audit log.
Compliance Tags
The taxonomy of tags that trigger approval policies when applied to contract fields.
CLI Reference
Use choochoo governance commands to submit, approve, and reject changes.