AIP-38: POLICY (policy/v1): composable policy block
A markdown + frontmatter format for declaring policy on a resource — access grants (who can perform which actions), defaults (per-block behavioural defaults), limits (rate / quota caps), and requirements (cross-cutting must-haves like MFA / approval). Composable inline | ref | file. Granted on AIP-39 ACTION ids — implementations / TOOLs are decoupled from policy.
| Field | Value |
|---|---|
| AIP | 38 |
| Title | POLICY (policy/v1): composable policy block |
| Status | Review |
| Type | Schema |
| Domain | policy.sh |
| Requires | AIP-7 (governance), AIP-23 (IDENTITY-ref), AIP-54 (REF), AIP-39 (ACTION) |
| Consumers | WORKSPACE.md, STORAGE.md, SANDBOX.md, CODE.md, SECRETS.md, TOOL.md |
Abstract
POLICY.md is a markdown-with-frontmatter file format that packages
the policy applied to a resource — access grants (who can perform
which actions), defaults (per-block behavioural defaults),
limits (rate / quota caps), and requirements (cross-cutting
must-haves like MFA, signatures, approvals).
Policy is composable: any AIP that owns a resource (WORKSPACE,
STORAGE, SANDBOX, CODE, SECRETS, TOOL) MAY embed a policy: block
inline, ref to a sibling POLICY.md file, or reference a published
policy (e.g. @acme/team-baseline).
Grants are made on AIP-39 ACTION ids — never on
TOOL ids directly. This decouples policy from implementation: granting
storage:commit covers every TOOL implementing that action,
including future ones. One tool can still be targeted, implements or
not, through the AIP-39 action tool:invoke scoped by the tool's name
(see §Scope matching): that is a
scope on an action, not a grant on a TOOL id.
The format pairs with the standard entry-point function,
definePolicy(...), whose signature any implementation in any
language exposes.
Motivation
The AIP series accumulated several ad-hoc access mechanisms before this AIP was drafted:
- AIP-19 SECRETS.md had a per-slug
access:block. - AIP-18 COLLECTION.md had per-item lints.
- AIP-7 governance defined approval at the runtime layer.
- WORKSPACE.md, STORAGE.md, etc. had no explicit access model — implicit "the workspace's owner can do anything."
Five problems compound when there's no unified policy primitive:
-
Each resource-owning AIP reinvents grants. SECRETS.md has
access: { operators: [...], ttl_seconds: ... }. Future primitives would each invent their own. No shared shape. -
Cross-resource policies are impossible. "Bob can commit AND execute" needs to be expressed in two separate
access:blocks, one per AIP. No single declarative policy. -
Org-wide baselines can't be shared. Each workspace duplicates "all org members can read." No composition.
-
Defaults aren't policy-able. "All sandboxes in this workspace default to no-egress" has no home — only individual sandbox configs can specify it.
-
Limits are nowhere. "Max 5 concurrent sandboxes per user" is a real ops requirement with no spec.
POLICY.md extracts the policy declaration into a portable, reusable
block that covers all four axes (grants, defaults, limits,
requirements) and composes across the AIP series via consistent
embedding.
Design principles
-
Policy is declarative; enforcement is runtime. This AIP specifies the SHAPE of policy. Enforcement (deciding "is this action allowed right now?") happens via AIP-7 governance at runtime, consuming the resolved policy view.
-
Grants on ACTIONs, not implementors.
actions: [{ action: "storage:commit" }]covers every implementor (every TOOL withimplements: storage:commit). Granting on TOOL ids would re-couple policy to implementation. -
Default deny, opt-in allow. When
default: deny(recommended), only explicitly granted (principal, action) pairs are allowed.default: allowis supported but flagged as risky. -
Composable like everything else. Policy refs accept
inline | ref | file. An array of refs composes (multiple policies merge with explicit conflict resolution). -
Most-restrictive wins on conflicts. When composed policies disagree, the more restrictive answer wins.
default: denybeatsdefault: allow. A grant cannot be silently overridden by a later policy unless that policy explicitly denies it (effect: deny, added 2026-10-23). -
Conditions are pluggable. A grant MAY carry conditions (
during-business-hours,mfa-recent,ip-range). Hosts support a subset; unknown conditions cause grants to be skipped (logged), not crashed.
Specification
File location
POLICY files live wherever the consumer expects:
.policy/
team-baseline/POLICY.md ← a workspace-local policy
marketing-overrides/POLICY.mdOr as a sibling to the resource:
.tools/git-commit/
TOOL.md
POLICY.md ← policy for this specific toolA "policy library" is a WORKSPACE.md with
publish.visibility: public containing many .policy/<slug>/POLICY.md
files. Other workspaces ref via the registry address scheme.
Frontmatter
YAML frontmatter, delimited by --- lines. All fields are
case-sensitive.
Required fields
| Field | Type | Description |
|---|---|---|
schema | string | Always policy/v1. |
Optional fields (standalone POLICY.md only — when embedded inline, schema/id/version are absent)
| Field | Type | Description |
|---|---|---|
id | string | Globally addressable id @<owner-slug>/<policy-slug>. Required for standalone files. |
version | semver string | Spec version of THIS file. |
Policy content fields
| Field | Type | Default | Description |
|---|---|---|---|
default | enum | "deny" | Default decision when no grant matches: "allow" | "deny". "deny" strongly recommended. |
grants | array | [] | Access grants. See grant schema below. |
defaults | object | {} | Per-block behavioural defaults (e.g. defaults.sandbox.network_egress: []). Keys are AIP block names (storage, sandbox, secrets, code). Values are partial block configs. |
limits | array | [] | Resource limits. Each { kind, value, scope?, per? | window?, applies_to? }. |
requirements | array | [] | Cross-cutting must-haves. Each { kind, applies_to: [<action-ref>...] , ... condition fields }. |
metadata | object | {} | Free-form, namespaced. |
Grant schema
grants:
- principal: <identity-ref> # AIP-23 identity-ref scheme
effect: allow # optional, "allow" | "deny" (default: allow)
actions: # array of action refs
- { action: <action-ref> }
- { action: <action-ref>, scope?: <string> } # narrow grant
conditions: [<condition>] # optional
ttl_seconds: <number> # optional, time-bound
granted_at: <ISO 8601> # optional, audit metadata
granted_by: <identity-ref> # optional, audit metadata
revoked: <boolean> # optional, soft-revoke markereffect defaults to allow. A grant with effect: deny is an
explicit deny; see §Explicit deny.
Each principal is an AIP-23 identity-ref
in any of its forms (inline / ref / file).
Standard schemes: operator://<id>, user://<id>, user://current,
org://<id>, guild://<id>, bot://<name>, group://<name>,
role://owner|editor|viewer (relative to the resource), session://<id>
(a live session of this host, AIP-46),
session-label://<label> and session-label://<prefix>* (the live
sessions of this host carrying that operator label, AIP-46 §Operator
label), * (wildcard). The members of a group:// are defined by the
host, not by AIP-23, and group:// is not used for
sessions (AIP-46 §Who may message whom).
Each action in actions is an AIP-39 ACTION ref
in any of its forms. * is a wildcard for "any action in this
target_kind" when used as a suffix (storage:*).
Condition schema
conditions:
- { kind: "during-business-hours", timezone: "America/Los_Angeles" }
- { kind: "ip-range", cidr: "10.0.0.0/8" }
- { kind: "mfa-recent", within_seconds: 600 }
- { kind: "approval-from", role: "manager", count: 1 }
- { kind: "signed-by", role: "admin" }Hosts MAY support a subset. Unknown conditions cause the grant to be
skipped (logged at warn level), NOT to crash the policy
evaluation.
Limit schema
limits:
- kind: "max-concurrent-sandboxes"
value: 5
scope: "user" # per user, per workspace, etc.
- kind: "rate-tool-calls"
value: 100
per: "minute"
applies_to: ["storage:commit"] # action refs (optional — default: all)
- kind: "max-egress-bytes-per-day"
value: 10000000
- kind: "spend-usd"
value: 25 # USD ceiling over the window
window: "PT5H" # rolling 5-hour window
scope: "session" # "session" | "auth-profile"per and window are mutually exclusive: a limit declares at most one.
See §Rolling limit windows and spend limits.
Requirement schema
requirements:
- kind: "mfa-recent"
within_seconds: 600
applies_to: ["storage:swap-provider", "secrets:rotate:*"]
- kind: "signed-by"
role: "admin"
applies_to: ["sandbox:network-egress"]
- kind: "approval-from"
count: 2
role: "engineer"
applies_to: ["storage:delete-files"]Composition pattern (inline | ref | file)
When embedded in a consumer (WORKSPACE.md, STORAGE.md, etc.), the
policy: field accepts:
# Inline
policy:
inline:
default: deny
grants:
- principal: "operator://bob"
actions: [{ action: "storage:commit" }]
# Ref to a registry-published policy
policy: { ref: "@acme/team-baseline" }
# Shorthand:
policy: "@acme/team-baseline"
# File (workspace-local POLICY.md)
policy: { file: "./policy/main.POLICY.md" }
# Shorthand:
policy: "./policy/main"
# Array (multiple policies compose, last-wins on conflicts but most-restrictive on default)
policy:
- { ref: "@acme/org-baseline" }
- { ref: "@acme/marketing-team" }
- inline:
grants:
- { principal: "operator://eve", actions: [{ action: "storage:swap-provider" }] }definePolicy standard signature
definePolicy(definition: PolicyDefinition): PolicyHandle
interface PolicyDefinition {
schema?: "policy/v1"
id?: string
version?: string
default?: "allow" | "deny"
grants?: Grant[]
defaults?: Record<string, Record<string, unknown>>
limits?: Limit[]
requirements?: Requirement[]
metadata?: Record<string, unknown>
}
interface Grant {
principal: IdentityRef
effect?: "allow" | "deny" // default "allow"
actions: Array<{ action: ActionRef; scope?: string }>
conditions?: Condition[]
ttlSeconds?: number
grantedAt?: string
grantedBy?: IdentityRef
revoked?: boolean
}
interface Limit {
kind: string // host-extensible
value: number
scope?: string // "user" | "workspace" | "org" | "session" | "auth-profile" | host-specific
per?: string // "second" | "minute" | "hour" | "day"
window?: string // rolling ISO-8601 duration, e.g. "PT5H" | "P7D"; XOR per
appliesTo?: ActionRef[]
}
interface Requirement {
kind: string // host-extensible (mfa-recent, signed-by, approval-from, …)
appliesTo?: ActionRef[]
[k: string]: unknown // kind-specific fields
}Conformance rules
-
Default is
deny. A POLICY withoutdefaultset MUST be evaluated asdefault: deny. Hosts SHOULD warn whendefault: allowis declared (audit-significant choice). -
Compose by union of allow grants, explicit deny override, and most-restrictive on default and requirements. When N policies compose, the agent's effective permissions are the union of all grants with
effect: allow. A matching grant witheffect: denywins over any allow, in any composed policy, regardless of which policy declares it. The default decision isdenyif ANY composed policy declaresdefault: deny. All requirements from all policies apply (ANDed). -
Wildcards in actions resolve at evaluation time.
actions: [{ action: "storage:*" }]at grant time is checked against the action being attempted at evaluation time. Hosts MUST resolve wildcards by querying registered actions sharing the prefix. -
TTLs are wall-clock from
granted_at. A grant withttl_seconds: 86400andgranted_at: 2026-05-03T00:00:00Zexpires at2026-05-04T00:00:00Z. Hosts MUST refuse expired grants even ifgranted_atis missing (treat as expired). -
Conditions are AND, never OR. A grant with multiple conditions requires ALL to be satisfied. To express OR, declare two grants.
-
Unknown conditions / limit kinds / requirement kinds skip. The grant is treated as if the unknown condition is unsatisfied (deny). Hosts MUST log this at
warnlevel so authors know. -
No I/O at parse time. Parsing a POLICY.md MUST NOT trigger identity resolution, action resolution, or registry lookup. Resolution is lazy at evaluation time.
Audit + governance integration
Every policy decision (grant matched / denied / condition failed / requirement unsatisfied) MUST be loggable via AIP-7 governance audit hooks. The decision record carries:
interface PolicyDecisionRecord {
decision: "allow" | "deny"
reason: "no-grant" | "condition-failed" | "requirement-failed" | "limit-exceeded" | "explicit-revoke" | "explicit-deny" | "resource-policy-unavailable" | "ttl-expired" | "matched-grant"
principal: IdentityRef
action: ActionRef
grantId?: string
policyChain: Array<{
source: "inline" | { ref: string } | { file: string }
layer: number
attachment: "subject" | "resource"
}>
evaluatedAt: string // ISO 8601
}This record is what audit consumers ingest, not raw POLICY.md.
Explicit deny (added 2026-10-23)
Draft AIP-38 amendment (2026-10-23). Normative identifiers (field names, literals, reason strings) are English and final.
Problem. default: deny plus positive grants can express "only X",
but not "everything the group allows except X". IAM solved this with an
explicit deny that outranks any allow. This amendment adds the same
primitive without changing the meaning of a policy that does not use it.
A grant gains an optional effect field:
grants:
- principal: "group://contractors"
effect: deny
actions:
- { action: "model:invoke", scope: "selector:frontier-models" }effect?: "allow" | "deny", default"allow".- A matching deny wins over any allow, in any composed policy and at any layer. "Matching" is the usual (principal, action, scope, conditions, TTL) test: a deny only applies where its own conditions hold and its TTL is not expired.
revoked: truestill disables a grant. Revocation is not a deny: a revoked grant contributes nothing, while an active deny actively removes a permission.- The decision record reports
reason: "explicit-deny"when a deny is the reason an action was refused. It reportsreason: "explicit-revoke"when the only grants that would have matched are revoked.
Resource and subject policies (added 2026-10-23)
Policy can be attached at two points:
- Subject policy: bound to the principal. An AIP-42
agent's
policyfield and an operator's ownpolicyare subject policies. - Resource policy: embedded in the resource itself, using the
resource-owning AIP's
policy:block. Examples: a sandbox, a storage, an auth profile.
When both a subject policy and a resource policy exist for an action, the action is allowed only when BOTH evaluate to allow. Neither can relax the other: the effective decision is the intersection of the two decisions, and an explicit deny in either one wins. When no resource policy exists, the subject policy alone decides, which is exactly the pre-amendment behaviour.
Every policy consulted is recorded in the decision record's
policyChain, with attachment: "subject" | "resource" and its
layer in the composition order. A resource policy that cannot be
loaded fails closed (deny), with reason: "resource-policy-unavailable".
Scope matching (added 2026-10-23)
A grant's scope narrows which instances of an action it covers. A
host MUST match it as follows:
- Exact string: the scope equals the requested scope.
*glob suffix: a scope ending in*matches any requested scope sharing the prefix (a lone*matches every scope). A*in any other position is not a wildcard.- Typed scope forms: an action MAY define typed scope forms
<kind>:<value>.label:<label>matches when the operator label of the target session (AIP-46 §Operator label, never its free-textlabel) equals<label>;label:<prefix>*matches when that label begins with<prefix>, and an empty prefix (label:*) matches nothing. AIP-39 declares both forms for the session actions. selector:<id>: the requested scope is a member of the set resolved from the saved selector named<id>. Selector resolution is defined by AIP-43 § Selectors referenced by policy. Matching is membership in the resolved set and MUST fail closed (deny) when the selector cannot be resolved.- No
scope: the grant matches every scope of that action.
Scope vocabularies are action-specific. The standard runtime actions define theirs in AIP-39 §Standard runtime actions.
Tool names (tool:invoke, added 2026-10-29)
The scope of the AIP-39 action tool:invoke is a tool name, and the
requested scope is the full name of the tool being called:
<server>/<name>, the AIP-54 tool-body grammar. A
daemon built-in tool uses the server agentproto. tool:invoke
defines no typed scope form (rule 3): its scopes are plain names,
matched by rules 1, 2 and 5 only.
- Exact name.
pygmalion/cron_creatematches that one tool and no other. The comparison is on the whole string and is case-sensitive. - A whole server, or a family of names. Rule 2 already gives these
forms, so there is no new syntax:
agentproto/*matches every tool of the serveragentproto, andpygmalion/cron_*matches every tool ofpygmalionwhose name begins withcron_. A server name cannot contain/, so<server>/*never reaches another server. A scope such asagentproto*is a valid rule 2 prefix but also reaches a server namedagentproto-extra, so authors SHOULD write<server>/*for a whole server. A lone*matches every tool. - A bare name matches nothing. A scope without a server, such as
cron_create, equals no requested scope. A host that holds a legacy bare name for a daemon built-in MUST turn it intoagentproto/<name>before it forms the requested scope, so the legacy spelling never needs its own grant. - No scope. A
tool:invokegrant withoutscopecovers every tool (rule 5): an allow admits any tool the rest of the policy does not deny, and a deny refuses every tool. - No selector form. AIP-43
defines no selector over tool names for this action, so a
selector:<id>scope ontool:invokecannot be resolved. Rule 4's fail-closed behaviour applies: the host evaluates an allow grant with this scope as not matching and a deny grant with this scope as matching.
grants:
- principal: "operator://pm-katchy"
effect: deny
actions:
- { action: "tool:invoke", scope: "pygmalion/cron_create" }
- { action: "tool:invoke", scope: "pygmalion/cron_*" }
- principal: "operator://pm-katchy"
actions:
- { action: "tool:invoke", scope: "katchy/*" }The deny wins over any allow (§Explicit deny), including an allow that
another composed policy grants on tool:invoke with a wider scope. An
AIP-42 tools entry with deny: [cron_create] on the
server pygmalion is the AGENT-level projection of the first scope
above.
Delegation ceiling (added 2026-10-23)
A nested principal never holds more authority than its parent. The ceiling is a decision rule, not an operation on grant sets. A request made by a nested principal is allowed only if BOTH of the following hold:
- It is allowed when evaluated for the child, using the child's subject policy.
- It is allowed when re-evaluated with the parent as principal, using the parent's subject policy, and this test repeats recursively up the chain to the root principal.
A refusal at any level denies the request. Re-evaluating with the parent as principal means the same action, scope, and conditions are tested, with the child's principal replaced by the parent's; a deny that applies to the parent therefore applies to the child. This is the generic form of the rule AIP-46 already states for delegation and spawn: a child policy can narrow, never widen. Hosts MUST evaluate the ceiling before creating the nested principal, not rely on the child to enforce it.
Rolling limit windows and spend limits (added 2026-10-23)
Limit.per only names a fixed unit (second, minute, hour, day).
Many real ceilings are rolling and longer, such as "25 USD in the last
5 hours" or "1000 calls in the last 7 days". A Limit therefore gains
an optional window:
window?: string, an ISO-8601 duration ("PT5H","P7D"). ISO-8601 is the canonical form everywhere in AIP-38. A host MAY accept shorthand on input (5h,7d) but MUST normalize it to ISO-8601 before storing or evaluating. The window is rolling, measured back from evaluation time, not a calendar bucket.perandwindoware mutually exclusive. A limit declaring both is invalid. A limit declaring neither is a static cap (for examplemax-concurrent-sandboxes).
One standard limit kind is registered:
limits:
- kind: spend-usd
value: 25 # USD ceiling
window: PT5H # over the rolling window
scope: session # "session" | "auth-profile"kind: "spend-usd":valueis a USD ceiling accumulated overwindowfor the givenscope.spend-usdaccumulates thecostUsdreported permodel:invokeunder the session cost model in AIP-46. That is the billing basis chosen on purpose:costUsdis known at invocation time, so the host can refuse the next invoke, whereasamortizedCostUsdis an allocation that depends on later usage. On an API keycostUsdis the real bill; on a subscription it bounds usage at API-equivalent price; on a free model it is 0, so aspend-usdlimit never blocks a free model (rate limits govern those). A host that cannot reportcostUsdfor an invocation MUST count it at the catalog price of the model and tokens when it has one, and otherwise SHOULD treat the limit as not enforceable for that session and say so in the decision report, instead of counting 0 silently.scope: "session"aggregates spend over the session's lineage: a successor declared viasucceeds, or a continue-fresh handoff, shares the bucket of the session it replaces, so a handoff does not reset the cap.scope: "auth-profile"is the hard cap: it aggregates spend across all sessions that use the profile. Hosts MAY support both scopes.- Exceeding the ceiling denies new
model:invokeactions and the decision is reported (reason: "limit-exceeded"). It never kills a running turn: an in-flight inference completes, and only the next invocation is refused.
Example — standalone POLICY.md
---
schema: policy/v1
id: "@acme/marketing-team"
version: 1.2.0
default: deny
grants:
# All marketing operators can read + write storage
- principal: { ref: "@acme/groups/marketing-operators" }
actions:
- { action: "@agentik/actions/standard/storage-read" }
- { action: "@agentik/actions/standard/storage-write" }
- { action: "@agentik/actions/standard/storage-commit" }
# Bob can also push and swap branches
- principal: "operator://bob"
actions:
- { action: "@agentik/actions/standard/storage-push" }
- { action: "@agentik/actions/standard/storage-swap-branch" }
# Acting user can read everything
- principal: "user://current"
actions:
- { action: "storage:read" }
# Eve has time-bound elevated access
- principal: "operator://eve"
actions:
- { action: "storage:swap-provider" }
ttl_seconds: 604800
granted_at: "2026-05-03T00:00:00Z"
granted_by: "user://contractor-admin"
defaults:
sandbox:
network_egress: [] # default: no egress for new sandboxes
read_only: false
storage:
read_only: false
limits:
- { kind: "rate-tool-calls", value: 100, per: "minute" }
- { kind: "max-concurrent-sandboxes", value: 5, scope: "user" }
- { kind: "max-egress-bytes-per-day", value: 10000000 }
requirements:
- kind: "mfa-recent"
within_seconds: 600
applies_to:
- "storage:swap-provider"
- "@agentik/actions/standard/secrets-rotate"
---
## Description
Baseline policy for Acme's marketing workspace. Wraps org-baseline
with team-specific overrides — Bob has push access, Eve has time-bound
provider-swap access, all marketing operators can read/write storage.
Composed by every Acme marketing guild via:
```yaml
# WORKSPACE.md
policy:
- { ref: "@acme/org-baseline" }
- { ref: "@acme/marketing-team" }
## Backward compatibility
- AIP-19 SECRETS.md `access:` block continues to work (back-compat
alias). Hosts SHOULD migrate `access: { operators: [...] }` to the
POLICY block at parse time, transparent to authors.
- TOOL.md `requires: { tools: [...] }` (existing field) remains
per-tool. POLICY.md is for cross-resource grants.
- Workspaces without an explicit `policy:` block evaluate as
`default: deny` PLUS host policy fallback (typically: workspace owner
has all permissions, others have none).
### The 2026-10-23 explicit-deny-and-composition amendment (draft)
A policy with no `effect` evaluates exactly as before: every grant is
an allow, grants compose by union, and `default` still decides when no
grant matches. Explicit deny only changes an outcome where a matching
deny exists, and no pre-amendment policy can contain one. Resource and
subject policies are opt-in: a resource with no `policy:` block is
decided by the subject policy alone, as before. A grant with no `scope`
still matches every scope of its action. The only additions are new
optional fields (`effect`, `window`, `attachment` in the decision
record) and two new reason values (`explicit-deny` and
`resource-policy-unavailable`; an unresolvable selector reports as
`no-grant`), all of which a pre-amendment consumer treats as absent or
unknown. The reference implementation stored the auth-profile spend
scope as `"profile"`; migration MUST rewrite stored limits to
`scope: "auth-profile"`.
### The 2026-10-29 tool-invoke amendment (draft)
§Scope matching gains one paragraph, §Tool names, that says how the
scopes of the new AIP-39 action `tool:invoke` match. Rules 1 to 5 are
unchanged and a policy that does not name `tool:invoke` is evaluated
exactly as before. The schema adds no field; it only checks the shape
of the `scope` of a `tool:invoke` grant.
## Security considerations
POLICY.md is **declarative**: a malicious manifest can grant itself
arbitrary permissions. Hosts MUST:
- Treat workspace-authored POLICY.md as **untrusted** for grants on
resources outside that workspace's owner scope. A workspace-resident
agent cannot grant itself permissions on the org's other workspaces.
- Require admin signing (`requirements: signed-by: role: admin`) for
privilege-escalating grants (granting `storage:swap-provider`,
`secrets:rotate:*`, `policy:edit`).
- Audit all policy compositions — when N policies merge, log the
resolution chain so reviewers can see "this grant came from
`@acme/org-baseline`."
The composition rule "most-restrictive wins" is a security floor.
Hosts MUST NOT silently allow policies to relax stricter parents
unless the parent explicitly opts into delegation.
## Open questions
1. **Policy versioning + delegation.** When `@acme/[email protected]`
ships breaking changes, do dependent workspaces auto-fail or
auto-upgrade? Likely: pin via `.workspace-lock.json`.
2. **Negative grants (explicit deny).** Resolved by the 2026-10-23
amendment: a grant carries `effect: "deny"` and a matching deny wins
over any allow. See [§Explicit deny](#explicit-deny-added-2026-10-23).
3. **Policy mutation audit.** When POLICY.md is edited, who's allowed
and who reviews? Recursive — POLICY governs POLICY edits.
## See also
- [AIP-7 — governance](/docs/aip-7) — runtime enforcement of policy decisions
- [AIP-19 — SECRETS.md](/docs/aip-19) — `access:` block migrating to this AIP
- [AIP-23 — IDENTITY-ref](/docs/aip-23#identity-reference-block-cross-aip-composable-primitive) — `principal` schemes
- [AIP-26 — CODE.md](/docs/aip-26) — consumer (`policy?:` field)
- [AIP-54 — REF.md](/docs/aip-54) — ref primitive
- [AIP-34 — WORKSPACE.md](/docs/aip-34) — primary consumer
- [AIP-35 — STORAGE.md](/docs/aip-35) — consumer
- [AIP-36 — SANDBOX.md](/docs/aip-36) — consumer
- [AIP-39 — ACTION.md](/docs/aip-39) — `actions:` references
- [`./resources/aip-38/draft/POLICY.schema.json`](https://github.com/agentproto/agentproto/tree/main/specs/resources/aip-38/draft) — schema validatorResources
Supporting artifacts for AIP-38. Links open the file on GitHub — markdown and JSON render natively in GitHub's viewer. Browse the full resource tree →
AIP-37: LIFECYCLE (lifecycle/v1): event vocabulary
A vocabulary AIP defining the standard lifecycle event names that hosts fire and that policy blocks (storage sync, sandbox lifecycle, etc.) reference. Not a runtime — just a shared language so configs across hosts mean the same thing.
AIP-39: ACTION (action/v1): verb primitive
A markdown + frontmatter format for declaring an abstract verb / operation that can be performed on a resource — its identity, semantics, side-effect profile, approval class, and lifecycle events. The pivot primitive that TOOL implements (with LLM schema), POLICY references (for grants), INTENT routes to (from user verbs), and WORKFLOW steps invoke. Bottom-up — implementations declare which actions they implement.