On this page
Policies
Meaning
A Policy is reusable declarative rule meaning that can be referenced wherever the App needs a policy decision without embedding framework or implementation behavior.
A Policy owns the reusable rule. A use site owns the fact that the Policy applies there.
Canonical shape
A Policy may define:
- optional Group membership;
- description and universal semantic metadata;
- optional typed context requirements/provisions;
- an optional named Expression rule.
policies:
orders.CanEditOrder:
group:
$ref: "#/groups/orders"
description: May edit an order
context:
requires:
actor:
$ref: "#/schemas/identity.Actor"
provides:
order:
$ref: "#/schemas/orders.Order"
rule:
$ref: "#/expressions/orders.CanEditOrderRule"
context.requires and context.provides are named canonical value references. The Expression registry owns reusable computation/rule structure; Policy owns the decision contract and the fact that its rule applies.
Use sites
Policies may be referenced by concepts such as:
- Operation access requirements;
- Schema fields;
- Schema projections;
- Groups and Applications through effective scope;
- Parts through
when; - View and Workflow transitions.
Those concepts do not redefine the Policy.
Boundaries
Policies must not encode framework-specific guards, middleware, decorators, database-provider rules, UI controls, or generated implementation structure.
Policy evaluation infrastructure may interpret canonical Policy and Expression meaning, but implementation/runtime mechanics are not authored Policy semantics.