Build your platform primitive.
Name the moment. Declare the contract. The schema generates as you type.
Every event your platform declares passes through the same decision engine. Select a station.
Two declared entities entering the resolver. Principal is the authority making the request — not just a user ID, but a typed entity whose credentials legitimize the action. An AI agent can send a request, but the principal behind it is the human whose authority the agent is acting under. Target is what the action touches: a typed record with a stable ID that can be retrieved, audited, and linked in the causality chain.
A single function: given this principal, this target, and this action, what does the current policy version say? It evaluates declared rules in sequence, traverses the relationship graph, and produces one decision. No guessing. No re-implementation per surface. Every caller gets the same answer from the same source. This is how one platform stops being a collection of permission copies and becomes one permission system.
Three possible outcomes: allow, deny, mutate. Each paired with a policy fingerprint — a hash of the exact rule set version that was evaluated. If the policy changes tomorrow, events from today still point to the policy in force when they happened. That fingerprint is what makes audits possible years later without replaying the log. It is the difference between "denied" and "denied because of these specific rules, at this specific version, at this specific moment."
This is your event contract. Copy it. Version it. Ship it as your platform's first declared primitive. Build your policy resolver on top. Every surface reads from the same source.
Copied to clipboard.
Primitive saved. (Stub — wire to your store when ready.)
A platform primitive is not a spec. It is a contract. Once declared, it is the ground truth that every surface, every AI, every audit reads from. Start here. Build up from it.