Definition
A Decision is what a policy returns. The runtime enforces it. There is no ambiguity: the Decision is the contract between policy and runtime. Start with two types. That is enough to build the first control loop:Decision Types
Fields
Computed Properties
allowed:Trueiftype == "allow"denied:Trueiftype == "deny"requires_approval:Trueiftype == "approval_required"
Composition Rules
When multiple policies match a capability, the engine composes their decisions:- No policies match: allow by default
- Any matching policy denies: return that deny decision immediately
- All matching policies allow: return the last allow decision by priority order
allow and deny participate in composition today.
Examples
When using the
@runtime.before_capability decorator, policy name and version are annotated onto the Decision automatically.Future Decision Space
The Decision type space is intentionally structured for expansion:approval_required: pause the action, send an ApprovalRequest, resume when a human approves, or deny when they rejectredact: strip or mask sensitive fields from the output before returning ittransform_input: mutate the input before executiontransform_output: mutate the output after executionroute: redirect to a different model, tool, or capabilitysandbox: execute with constrained network, filesystem, or time accesslog_only: allow but record for later review
