Expand description
Policy aspects — reusable, cross-cutting governance attached to a whole conversation rather than scattered across stages.
Compliance is where regulated voice flows live, and it should feel like
attaching an aspect, not hand-wiring guards everywhere. A Policy is a
serializable aspect applied with
Conversation::policy; the
compiler lowers it into concrete machinery (a safety digression, a redaction
set, commit governance), always through the validated IR.
ⓘ
Conversation::new("payment")
.policy(Policy::redact(["card_number", "cvv"]))
.policy(Policy::commit("charge_card").idempotency_key("{user_id}:{amount}").compensate_with("refund"))
.policy(Policy::safety_handoff(["self_harm", "abuse"]))
/* … stages … */
.compile()?;Structs§
- Commit
Policy - Builder for a
Policy::Commitgovernance aspect.
Enums§
- Policy
- A reusable, cross-cutting policy aspect.