PM AI Identity to Boundary
Use this skill when an AI or agent may act on behalf of a person, service,
workspace, tenant, or connector. It turns an ambiguous “the agent has access”
statement into a reviewable contract: who the actors are, whose authority is
being used, which resources and operations are allowed, how delegation works,
what a user can see, when credentials expire or are revoked, and how a team can
attribute and recover from an unauthorized or mis-scoped action.
The output is a product decision packet, not an identity provider setup,
OAuth implementation, access-control policy, security certification, legal
opinion, credential inspection, model benchmark, or production guarantee. An
authenticated request proves an actor reached a system; it does not prove that
the actor was authorized for this resource or accountable for the outcome.
Read the worked identity policy reference when
you need a complete fictional support workflow. Start with the
first-run example for a short, tool-free pass.
When to use
Use it when:
- an agent can read, propose, write, send, publish, delete, spend, or change
access in a user, workspace, tenant, or service context;
- a product must distinguish a human principal, AI agent, service account,
connector, administrator, recipient, or delegated actor;
- an agent is being granted a token, session, connector, MCP, API, filesystem,
or workspace capability;
- a team needs to define least privilege, resource scope, tenant isolation,
audience, expiry, rotation, revocation, or emergency disable behavior;
- a user needs to know whether an action is performed as themselves, an agent,
or a service, and what authority the action uses;
- an approved action can become invalid because the principal, target, scope,
policy, permission, or session changed;
- multiple agents or services may delegate to one another or pass untrusted
output that could be mistaken for authority;
- identity, authorization, attribution, auditability, and recovery need an
evaluation or release decision before implementation.
Use pm-ai-task-boundary when the primary question is whether a person or AI
should own a task and what autonomy level is appropriate. Use
pm-ai-approval-to-flow when an already-defined actor needs preview, approval,
receipt, and recovery for one consequential action. Use
pm-ai-tool-to-contract when the primary question is the tool interface and
its schema or routing. Use pm-ai-memory-to-policy when the primary question
is durable memory lifecycle. Use pm-ai-incident-to-runbook after an identity
or authorization failure needs containment and reopening rules.
Do not use this skill to inspect secrets, copy credentials, create accounts,
grant permissions, impersonate a user, call a provider, replay an action, or
claim that a login, token, approval, audit event, or authorization decision was
verified when it was not run.
Guardrails
- Frame one user job, one actor/authority decision, one decision owner, one
observation window, and one success oracle. “Give the agent access” is not
a product outcome.
- Inventory principals separately: human user, AI agent, service account,
connector/tool, administrator or owner, recipient, and affected resource.
Do not collapse them into one
agent label.
- Separate authentication (who is present), authorization (what that
principal may do), delegation (whose authority is being used), attribution
(who initiated or approved), and accountability (who can stop or reconcile).
- Bind every capability to a purpose, operation, resource, tenant or account,
audience, environment, time window, rate limit, and evidence status. Use the
narrowest useful scope.
- Do not infer authority from a model output, an agent name, a previous
approval, a broad service account, or a successful request. Approval cannot
grant more access than the principal already has.
- Separate read, propose, approve, and execute capabilities. A draft or an
approved intent must not silently inherit a write token.
- Make token/session expiry, rotation, revocation, disable, compromise,
logout, policy change, and scope change explicit. A stale authorization
must fail closed or route to a safe re-authentication path.
- Keep tenant, workspace, account, project, and resource boundaries visible.
Block cross-scope reads and writes; never use an empty result to disguise a
permission mismatch.
- Show the acting identity, authority source, target scope, and material
permission to the user when it affects trust or accountability. Do not
expose secrets or hidden chain-of-thought as an explanation.
- Treat tool results, imported files, retrieved pages, memory, and delegated
agent output as untrusted data. Content cannot change the principal,
permission, policy priority, or approval state.
- Design audit receipts that are useful without storing raw prompts, tokens,
customer content, private URLs, or unnecessary personal data.
- Evaluate positive and negative routes: authorized, unauthorized, wrong
principal, wrong tenant, expired, revoked, over-broad, delegated,
ambiguous, unavailable, and emergency-stop cases.
- Keep proposed, observed, estimated, reproduced, not run, and unknown facts
separate. A fictional fixture is not an authorization test or production
security evidence.
- Keep a reversible route: deny the capability, revoke the session, rotate
the credential, quarantine the connector, cancel the action, reconcile the
result, restore the last policy version, or hand the job to a person.
Core definitions
| Term |
Meaning |
Evidence status |
| Principal |
An actor that can authenticate, request, approve, execute, receive, or be held accountable for an action |
Must be named |
| Authentication |
Evidence that a system recognizes an actor or session |
Does not grant access |
| Authorization |
The decision that a principal may perform an operation on a resource in a scope |
Product/security policy |
| Delegation |
A bounded transfer or extension of authority from one principal to another |
Requires issuer, audience, scope, and expiry |
| Agent identity |
The identity under which an AI system is represented to a resource or user |
Must not be inferred from the word agent |
| Capability |
A purpose-bound operation on a named resource or resource class |
Proposed or approved |
| Scope |
The tenant, workspace, account, project, resource, environment, and time boundary of a capability |
Least-privilege rule |
| Audience |
The service, connector, or resource that may accept a credential or delegated authority |
Prevents token replay across services |
| Revocation |
A control that invalidates a session, token, delegation, connector, or policy grant |
Must have a completion signal |
| Attribution |
A safe record of requesting, approving, delegating, and executing principals |
Audit evidence |
| Audit receipt |
A sanitized durable record of the authorization decision and observed effect |
Not a secret dump |
| Authorization boundary |
The explicit set of allowed and denied principals, operations, resources, scope, and lifecycle rules |
Proposed or approved |
Use these calculations only after the eligible task set, principal classes,
resource scope, and trace boundary are declared:
authorized_route_rate
= eligible requests executed under the intended principal and scope
/ eligible requests that reached an authorization decision
wrong_principal_block_rate
= wrong-principal requests blocked before effect
/ wrong-principal requests in the negative test set
cross_scope_block_rate
= cross-tenant or cross-account requests blocked before data or effect
/ cross-scope requests in the negative test set
revocation_effectiveness
= revoked sessions or tokens rejected before the next protected operation
/ revoked sessions or tokens tested
attribution_completeness
= protected operations with requesting, approving, executing, scope, and
policy fields present / protected operations audited
least_privilege_coverage
= required capabilities with operation, resource, scope, audience, expiry,
and deny rule / required capabilities audited
If a denominator, eligibility rule, negative set, effect oracle, or trace
boundary is missing, write Not measurable. Do not use login count, token
count, permission prompt count, or successful HTTP responses as proof of safe
authorization.
Workflow
1. Frame the decision and user job
Write one sentence:
We need to decide whether ... principal may perform ... for the user job
... within ... resource, tenant, permission, attribution, and recovery
boundaries.
Name the current workaround, decision owner, affected people, candidate
principal, success oracle, observation window, baseline behavior, and evidence
that could change the decision. If the job can stay read-only or session-only,
compare that route before adding delegation.
2. Build the principal and authority map
Create one row per principal or actor class:
| Field |
Question |
| Principal ID |
Can a reviewer refer to the actor without a secret or personal value? |
| Actor class |
Human, agent, service, connector, administrator, recipient, or resource owner? |
| Authentication source |
How is the actor recognized? Record Not provided if unknown. |
| Authority source |
Whose policy, role, consent, or delegation permits the action? |
| Accountability |
Who can approve, stop, revoke, reconcile, or reopen? |
| Scope |
Which tenant, workspace, account, project, resource, and environment? |
| Audience |
Which service or connector may accept the capability? |
| Lifecycle |
When issued, expires, rotates, revokes, or becomes invalid? |
| Evidence |
Observed, source-backed, proposed, not run, or unknown? |
Keep the human requester, the AI agent, the execution service, the connector,
and the recipient distinct even when one implementation currently combines
them. A single service identity may be an implementation shortcut, not a safe
product contract.
3. Separate authentication, authorization, delegation, and attribution
Write four independent answers:
- Who is recognized? Name the authentication/session boundary.
- What may that principal do? List operation, resource, scope, audience,
expiry, and deny rules.
- Whose authority is being used? State whether the action is user-owned,
agent-owned, service-owned, admin-delegated, or explicitly unavailable.
- Who is accountable? Record requester, approver, executor, recipient,
policy version, and reconciliation owner.
Do not represent “the user logged in” as “the agent may perform every action
the user could perform.” Do not represent “the agent proposed it” as approval.
4. Define the capability boundary
For each capability, specify:
| Field |
Required decision |
| Purpose |
One user-job outcome, not generic access |
| Operation |
Read, search, propose, approve, execute, send, delete, or administer |
| Resource |
Named resource or bounded resource class |
| Scope |
Tenant, workspace, account, project, record, environment, and time |
| Audience |
Exact service or connector that may accept the capability |
| Allowed |
The minimum fields, destinations, methods, and side effects |
| Denied |
Explicitly forbidden resources, operations, tenants, and escalation paths |
| Conditions |
Approval, policy version, freshness, rate, amount, or human presence |
| Fallback |
Manual, read-only, ask, defer, or safe unavailable state |
| Evidence |
Proposed, tested, observed, or unknown |
Separate read, propose, approve, execute, and administer. Use a
separate contract for a capability that changes scope, permissions, identity,
or credential state.
5. Design delegation and approval interaction
State whether the agent acts:
- as a distinct agent principal;
- as a narrowly delegated extension of a human or service;
- as a workflow service with its own authority;
- only as a proposer while a human or service executes;
- or not at all for this job.
For each delegation, record issuer, delegate, subject, audience, operation,
resource, scope, purpose, issuance time, expiry, revocation, constraints,
approval ID if relevant, and audit receipt. Link to
pm-ai-approval-to-flow when the action needs preview or human approval. Keep
the approval event and authorization decision separate: approval is a user
decision; authorization is the system's permission check.
Invalidate an approval or delegated capability when the actor, target,
resource, scope, material content, policy, permission, credential, or session
changes. Re-check at execution time.
6. Design credential and session lifecycle
Define the lifecycle without requesting or displaying real values:
requested -> issued -> active -> narrowed or rotated -> expired/revoked
-> blocked or reconciled
Record secret-free metadata: credential class, audience, scope class, issuer,
policy version, issued time, expiry, revocation reason category, rotation
owner, session binding, and last protected operation. Specify behavior for
logout, account removal, policy change, tenant suspension, suspected leak,
connector disable, clock skew, offline queue, and restart.
If revocation cannot be confirmed before the next protected operation, hold or
route to a safe manual path. Do not retry a denied or unknown write with a
broader credential.
7. Map user visibility, tenant safety, and failure states
Show the minimum useful identity evidence: acting identity category, authority
source category, target scope, permission class, approval status, expiry or
freshness, and fallback. Never show a token or raw private policy.
Cover at least:
no principal -> authentication mismatch -> unauthorized operation
wrong tenant/account -> over-broad scope -> wrong audience
delegation missing/expired -> approval stale -> permission changed
token/session revoked -> connector compromised -> agent-to-agent escalation
partial effect -> unknown receipt -> emergency disable -> reconciliation
For each state define what the user sees, what is blocked, what sanitized
event is recorded, who owns recovery, and whether the user job can count as
complete.
8. Define audit and observability
Create a safe receipt with stable IDs such as AUTH-001 and ACT-001:
| Field |
Purpose |
| Request ID / trace ID |
Join the request without storing raw content |
| Requesting principal class |
Who initiated the intent |
| Delegating principal class |
Whose authority was offered, if any |
| Approving principal class |
Who approved, if approval was required |
| Executing principal class |
Who or what attempted the effect |
| Resource and scope class |
Where the decision applied |
| Operation and policy version |
What was authorized and under which rule |
| Decision |
Allow, deny, re-authenticate, hold, or unknown |
| Effect status |
Not started, partial, completed, failed, or unreconciled |
| Revocation/expiry status |
Whether lifecycle controls were active |
| Recovery owner |
Who can stop, rotate, reconcile, or reopen |
Do not log raw prompts, tokens, authorization headers, customer text, private
URLs, full account IDs, or sensitive payloads in a general analytics stream.
9. Design evaluation and release gate
Compare the candidate with the current manual, read-only, or session-only route
using the same completion oracle. Include held-out positive and negative
requests:
- correct principal, resource, tenant, audience, and operation;
- user authenticated but agent not authorized;
- agent authorized to read but not write;
- wrong tenant, account, recipient, or environment;
- expired, revoked, rotated, leaked, or changed-scope credential;
- delegated authority with missing issuer, audience, purpose, or expiry;
- stale approval after target, policy, content, or permission changes;
- malicious tool or sub-agent output attempting privilege escalation;
- partial/unknown effect and emergency disable;
- audit receipt missing a principal or scope field.
Choose one decision:
Ship: identity, scope, delegation, lifecycle, receipt, negative tests, and
rollback evidence meet the stated gate;
Iterate: the user job is promising but a bounded identity or UX gap remains;
Hold: a principal, scope, revocation, accountability, or evaluation field
is missing;
Rollback: a real or reproduced breach requires disable or reversion;
Need evidence: the current evidence cannot support a decision.
10. Write the handoff and learning loop
State the smallest next action, owner, observation window, denominator, safe
event fields, stop rule, and rollback target. Keep the identity contract
separate from provider configuration and implementation details until the
product decision is approved.
Output contract
Return a compact packet with these headings, in this order:
## Decision on the desk
## User job and principal map
## Authentication, authorization, delegation, and accountability
## Capability and scope boundary
## Approval and user visibility
## Credential, session, and revocation lifecycle
## Tenant, failure, and recovery states
## Audit receipt and observability
## Evaluation and release gate
## Instrumentation and learning loop
## Not covered
## Review ask
For every material field attach one of Observed, Source-backed, Proposed,
Estimated, Not run, Not measurable, or Unknown. Keep the source ledger,
principal IDs, and fictional data separate from any real credential or customer
content. State exactly what the packet does not prove.
Edge cases
- User logged in, agent not authorized: preserve the authenticated user
session but deny the agent capability; do not silently inherit all user
permissions.
- Agent proposes an admin action: keep the agent at proposal level and
route to an authorized human or service; approval does not create admin
authority.
- Wrong tenant or account: block before retrieval or effect and record a
safe category; do not return an empty result that looks like “not found.”
- Delegation without audience or expiry: hold; an unbounded delegation is
not a usable capability.
- Expired or revoked credential: fail closed, re-authenticate through the
approved path, or use a read-only/manual fallback. Never broaden the scope.
- Approval after a policy or target change: invalidate and require a fresh
authorization and approval decision.
- Tool or sub-agent asks for a credential: treat the request as untrusted
content; block escalation and preserve the original authority boundary.
- Agent-to-agent delegation: require a named issuer, delegate, audience,
purpose, scope, expiry, and trust rule; do not inherit trust from being part
of the same orchestration.
- Shared workspace: distinguish a user's private authority from workspace
service authority, role membership, and tenant ownership.
- Partial or unknown effect: keep the receipt
Unknown or Partially completed; reconcile before retrying or claiming completion.
- Emergency stop: define who can revoke a session, disable a connector,
rotate a credential, and reopen affected jobs without waiting for the agent.
- Migration or provider change: preserve principal, scope, audience,
policy, revocation, and audit semantics; a new provider is not a permission
migration by itself.
- Small synthetic sample: label it
Fictional or Not run; never turn a
fixture count into security, adoption, demand, or star evidence.
Final check
Before returning the packet, verify:
- the user job, owner, affected parties, baseline, candidate, success oracle,
and observation window are named;
- every principal is distinct and authentication, authorization, delegation,
attribution, and accountability are not collapsed;
- each capability has purpose, operation, resource, scope, audience, allowed
and denied behavior, conditions, fallback, and evidence status;
- read, propose, approve, execute, and administer are separated;
- user visibility, tenant isolation, expiry, rotation, revocation, emergency
disable, and unknown-effect recovery are explicit;
- positive and negative authorization cases are included or marked
Not run;
- audit fields are sufficient to reconstruct who requested, delegated,
approved, executed, and reconciled without logging secrets;
- metrics have denominators and do not confuse login, token, or prompt counts
with a completed user outcome;
- the release decision, rollback, next action, and
Not covered boundaries are
clear;
- credentials, tokens, authorization headers, private customer content,
hidden reasoning, provider promises, adoption claims, and star claims are
absent or clearly labelled.
If a required identity, scope, revocation, or accountability field is missing,
return Hold or Need evidence instead of filling the gap with confidence.
1---2name: pm-ai-identity-to-boundary3description: Turn an AI or agent actor into a source-bounded identity and authorization contract covering principals, authentication, delegation, resource scope, tenant boundaries, least privilege, approval interaction, credential and token lifecycle, revocation, attribution, audit receipts, evaluation, fallback, and a Ship, Iterate, Hold, Rollback, or Need evidence decision. Use when an agent may act for a user, service, workspace, tenant, or connector.4---56# PM AI Identity to Boundary78Use this skill when an AI or agent may act on behalf of a person, service,9workspace, tenant, or connector. It turns an ambiguous “the agent has access”10statement into a reviewable contract: who the actors are, whose authority is11being used, which resources and operations are allowed, how delegation works,12what a user can see, when credentials expire or are revoked, and how a team can13attribute and recover from an unauthorized or mis-scoped action.1415The output is a product decision packet, not an identity provider setup,16OAuth implementation, access-control policy, security certification, legal17opinion, credential inspection, model benchmark, or production guarantee. An18authenticated request proves an actor reached a system; it does not prove that19the actor was authorized for this resource or accountable for the outcome.2021Read the [worked identity policy reference](references/identity-policy.md) when22you need a complete fictional support workflow. Start with the23[first-run example](examples/first-run.md) for a short, tool-free pass.2425## When to use2627Use it when:2829- an agent can read, propose, write, send, publish, delete, spend, or change30 access in a user, workspace, tenant, or service context;31- a product must distinguish a human principal, AI agent, service account,32 connector, administrator, recipient, or delegated actor;33- an agent is being granted a token, session, connector, MCP, API, filesystem,34 or workspace capability;35- a team needs to define least privilege, resource scope, tenant isolation,36 audience, expiry, rotation, revocation, or emergency disable behavior;37- a user needs to know whether an action is performed as themselves, an agent,38 or a service, and what authority the action uses;39- an approved action can become invalid because the principal, target, scope,40 policy, permission, or session changed;41- multiple agents or services may delegate to one another or pass untrusted42 output that could be mistaken for authority;43- identity, authorization, attribution, auditability, and recovery need an44 evaluation or release decision before implementation.4546Use `pm-ai-task-boundary` when the primary question is whether a person or AI47should own a task and what autonomy level is appropriate. Use48`pm-ai-approval-to-flow` when an already-defined actor needs preview, approval,49receipt, and recovery for one consequential action. Use50`pm-ai-tool-to-contract` when the primary question is the tool interface and51its schema or routing. Use `pm-ai-memory-to-policy` when the primary question52is durable memory lifecycle. Use `pm-ai-incident-to-runbook` after an identity53or authorization failure needs containment and reopening rules.5455Do not use this skill to inspect secrets, copy credentials, create accounts,56grant permissions, impersonate a user, call a provider, replay an action, or57claim that a login, token, approval, audit event, or authorization decision was58verified when it was not run.5960## Guardrails61621. Frame one user job, one actor/authority decision, one decision owner, one63 observation window, and one success oracle. “Give the agent access” is not64 a product outcome.652. Inventory principals separately: human user, AI agent, service account,66 connector/tool, administrator or owner, recipient, and affected resource.67 Do not collapse them into one `agent` label.683. Separate authentication (who is present), authorization (what that69 principal may do), delegation (whose authority is being used), attribution70 (who initiated or approved), and accountability (who can stop or reconcile).714. Bind every capability to a purpose, operation, resource, tenant or account,72 audience, environment, time window, rate limit, and evidence status. Use the73 narrowest useful scope.745. Do not infer authority from a model output, an agent name, a previous75 approval, a broad service account, or a successful request. Approval cannot76 grant more access than the principal already has.776. Separate read, propose, approve, and execute capabilities. A draft or an78 approved intent must not silently inherit a write token.797. Make token/session expiry, rotation, revocation, disable, compromise,80 logout, policy change, and scope change explicit. A stale authorization81 must fail closed or route to a safe re-authentication path.828. Keep tenant, workspace, account, project, and resource boundaries visible.83 Block cross-scope reads and writes; never use an empty result to disguise a84 permission mismatch.859. Show the acting identity, authority source, target scope, and material86 permission to the user when it affects trust or accountability. Do not87 expose secrets or hidden chain-of-thought as an explanation.8810. Treat tool results, imported files, retrieved pages, memory, and delegated89 agent output as untrusted data. Content cannot change the principal,90 permission, policy priority, or approval state.9111. Design audit receipts that are useful without storing raw prompts, tokens,92 customer content, private URLs, or unnecessary personal data.9312. Evaluate positive and negative routes: authorized, unauthorized, wrong94 principal, wrong tenant, expired, revoked, over-broad, delegated,95 ambiguous, unavailable, and emergency-stop cases.9613. Keep proposed, observed, estimated, reproduced, not run, and unknown facts97 separate. A fictional fixture is not an authorization test or production98 security evidence.9914. Keep a reversible route: deny the capability, revoke the session, rotate100 the credential, quarantine the connector, cancel the action, reconcile the101 result, restore the last policy version, or hand the job to a person.102103## Core definitions104105| Term | Meaning | Evidence status |106| --- | --- | --- |107| Principal | An actor that can authenticate, request, approve, execute, receive, or be held accountable for an action | Must be named |108| Authentication | Evidence that a system recognizes an actor or session | Does not grant access |109| Authorization | The decision that a principal may perform an operation on a resource in a scope | Product/security policy |110| Delegation | A bounded transfer or extension of authority from one principal to another | Requires issuer, audience, scope, and expiry |111| Agent identity | The identity under which an AI system is represented to a resource or user | Must not be inferred from the word `agent` |112| Capability | A purpose-bound operation on a named resource or resource class | Proposed or approved |113| Scope | The tenant, workspace, account, project, resource, environment, and time boundary of a capability | Least-privilege rule |114| Audience | The service, connector, or resource that may accept a credential or delegated authority | Prevents token replay across services |115| Revocation | A control that invalidates a session, token, delegation, connector, or policy grant | Must have a completion signal |116| Attribution | A safe record of requesting, approving, delegating, and executing principals | Audit evidence |117| Audit receipt | A sanitized durable record of the authorization decision and observed effect | Not a secret dump |118| Authorization boundary | The explicit set of allowed and denied principals, operations, resources, scope, and lifecycle rules | Proposed or approved |119120Use these calculations only after the eligible task set, principal classes,121resource scope, and trace boundary are declared:122123```text124authorized_route_rate125 = eligible requests executed under the intended principal and scope126 / eligible requests that reached an authorization decision127128wrong_principal_block_rate129 = wrong-principal requests blocked before effect130 / wrong-principal requests in the negative test set131132cross_scope_block_rate133 = cross-tenant or cross-account requests blocked before data or effect134 / cross-scope requests in the negative test set135136revocation_effectiveness137 = revoked sessions or tokens rejected before the next protected operation138 / revoked sessions or tokens tested139140attribution_completeness141 = protected operations with requesting, approving, executing, scope, and142 policy fields present / protected operations audited143144least_privilege_coverage145 = required capabilities with operation, resource, scope, audience, expiry,146 and deny rule / required capabilities audited147```148149If a denominator, eligibility rule, negative set, effect oracle, or trace150boundary is missing, write `Not measurable`. Do not use login count, token151count, permission prompt count, or successful HTTP responses as proof of safe152authorization.153154## Workflow155156### 1. Frame the decision and user job157158Write one sentence:159160> We need to decide whether `...` principal may perform `...` for the user job161> `...` within `...` resource, tenant, permission, attribution, and recovery162> boundaries.163164Name the current workaround, decision owner, affected people, candidate165principal, success oracle, observation window, baseline behavior, and evidence166that could change the decision. If the job can stay read-only or session-only,167compare that route before adding delegation.168169### 2. Build the principal and authority map170171Create one row per principal or actor class:172173| Field | Question |174| --- | --- |175| Principal ID | Can a reviewer refer to the actor without a secret or personal value? |176| Actor class | Human, agent, service, connector, administrator, recipient, or resource owner? |177| Authentication source | How is the actor recognized? Record `Not provided` if unknown. |178| Authority source | Whose policy, role, consent, or delegation permits the action? |179| Accountability | Who can approve, stop, revoke, reconcile, or reopen? |180| Scope | Which tenant, workspace, account, project, resource, and environment? |181| Audience | Which service or connector may accept the capability? |182| Lifecycle | When issued, expires, rotates, revokes, or becomes invalid? |183| Evidence | Observed, source-backed, proposed, not run, or unknown? |184185Keep the human requester, the AI agent, the execution service, the connector,186and the recipient distinct even when one implementation currently combines187them. A single service identity may be an implementation shortcut, not a safe188product contract.189190### 3. Separate authentication, authorization, delegation, and attribution191192Write four independent answers:1931941. **Who is recognized?** Name the authentication/session boundary.1952. **What may that principal do?** List operation, resource, scope, audience,196 expiry, and deny rules.1973. **Whose authority is being used?** State whether the action is user-owned,198 agent-owned, service-owned, admin-delegated, or explicitly unavailable.1994. **Who is accountable?** Record requester, approver, executor, recipient,200 policy version, and reconciliation owner.201202Do not represent “the user logged in” as “the agent may perform every action203the user could perform.” Do not represent “the agent proposed it” as approval.204205### 4. Define the capability boundary206207For each capability, specify:208209| Field | Required decision |210| --- | --- |211| Purpose | One user-job outcome, not generic access |212| Operation | Read, search, propose, approve, execute, send, delete, or administer |213| Resource | Named resource or bounded resource class |214| Scope | Tenant, workspace, account, project, record, environment, and time |215| Audience | Exact service or connector that may accept the capability |216| Allowed | The minimum fields, destinations, methods, and side effects |217| Denied | Explicitly forbidden resources, operations, tenants, and escalation paths |218| Conditions | Approval, policy version, freshness, rate, amount, or human presence |219| Fallback | Manual, read-only, ask, defer, or safe unavailable state |220| Evidence | Proposed, tested, observed, or unknown |221222Separate `read`, `propose`, `approve`, `execute`, and `administer`. Use a223separate contract for a capability that changes scope, permissions, identity,224or credential state.225226### 5. Design delegation and approval interaction227228State whether the agent acts:229230- as a distinct agent principal;231- as a narrowly delegated extension of a human or service;232- as a workflow service with its own authority;233- only as a proposer while a human or service executes;234- or not at all for this job.235236For each delegation, record issuer, delegate, subject, audience, operation,237resource, scope, purpose, issuance time, expiry, revocation, constraints,238approval ID if relevant, and audit receipt. Link to239`pm-ai-approval-to-flow` when the action needs preview or human approval. Keep240the approval event and authorization decision separate: approval is a user241decision; authorization is the system's permission check.242243Invalidate an approval or delegated capability when the actor, target,244resource, scope, material content, policy, permission, credential, or session245changes. Re-check at execution time.246247### 6. Design credential and session lifecycle248249Define the lifecycle without requesting or displaying real values:250251```text252requested -> issued -> active -> narrowed or rotated -> expired/revoked253 -> blocked or reconciled254```255256Record secret-free metadata: credential class, audience, scope class, issuer,257policy version, issued time, expiry, revocation reason category, rotation258owner, session binding, and last protected operation. Specify behavior for259logout, account removal, policy change, tenant suspension, suspected leak,260connector disable, clock skew, offline queue, and restart.261262If revocation cannot be confirmed before the next protected operation, hold or263route to a safe manual path. Do not retry a denied or unknown write with a264broader credential.265266### 7. Map user visibility, tenant safety, and failure states267268Show the minimum useful identity evidence: acting identity category, authority269source category, target scope, permission class, approval status, expiry or270freshness, and fallback. Never show a token or raw private policy.271272Cover at least:273274```text275no principal -> authentication mismatch -> unauthorized operation276wrong tenant/account -> over-broad scope -> wrong audience277delegation missing/expired -> approval stale -> permission changed278token/session revoked -> connector compromised -> agent-to-agent escalation279partial effect -> unknown receipt -> emergency disable -> reconciliation280```281282For each state define what the user sees, what is blocked, what sanitized283event is recorded, who owns recovery, and whether the user job can count as284complete.285286### 8. Define audit and observability287288Create a safe receipt with stable IDs such as `AUTH-001` and `ACT-001`:289290| Field | Purpose |291| --- | --- |292| Request ID / trace ID | Join the request without storing raw content |293| Requesting principal class | Who initiated the intent |294| Delegating principal class | Whose authority was offered, if any |295| Approving principal class | Who approved, if approval was required |296| Executing principal class | Who or what attempted the effect |297| Resource and scope class | Where the decision applied |298| Operation and policy version | What was authorized and under which rule |299| Decision | Allow, deny, re-authenticate, hold, or unknown |300| Effect status | Not started, partial, completed, failed, or unreconciled |301| Revocation/expiry status | Whether lifecycle controls were active |302| Recovery owner | Who can stop, rotate, reconcile, or reopen |303304Do not log raw prompts, tokens, authorization headers, customer text, private305URLs, full account IDs, or sensitive payloads in a general analytics stream.306307### 9. Design evaluation and release gate308309Compare the candidate with the current manual, read-only, or session-only route310using the same completion oracle. Include held-out positive and negative311requests:312313- correct principal, resource, tenant, audience, and operation;314- user authenticated but agent not authorized;315- agent authorized to read but not write;316- wrong tenant, account, recipient, or environment;317- expired, revoked, rotated, leaked, or changed-scope credential;318- delegated authority with missing issuer, audience, purpose, or expiry;319- stale approval after target, policy, content, or permission changes;320- malicious tool or sub-agent output attempting privilege escalation;321- partial/unknown effect and emergency disable;322- audit receipt missing a principal or scope field.323324Choose one decision:325326- `Ship`: identity, scope, delegation, lifecycle, receipt, negative tests, and327 rollback evidence meet the stated gate;328- `Iterate`: the user job is promising but a bounded identity or UX gap remains;329- `Hold`: a principal, scope, revocation, accountability, or evaluation field330 is missing;331- `Rollback`: a real or reproduced breach requires disable or reversion;332- `Need evidence`: the current evidence cannot support a decision.333334### 10. Write the handoff and learning loop335336State the smallest next action, owner, observation window, denominator, safe337event fields, stop rule, and rollback target. Keep the identity contract338separate from provider configuration and implementation details until the339product decision is approved.340341## Output contract342343Return a compact packet with these headings, in this order:344345```markdown346## Decision on the desk347## User job and principal map348## Authentication, authorization, delegation, and accountability349## Capability and scope boundary350## Approval and user visibility351## Credential, session, and revocation lifecycle352## Tenant, failure, and recovery states353## Audit receipt and observability354## Evaluation and release gate355## Instrumentation and learning loop356## Not covered357## Review ask358```359360For every material field attach one of `Observed`, `Source-backed`, `Proposed`,361`Estimated`, `Not run`, `Not measurable`, or `Unknown`. Keep the source ledger,362principal IDs, and fictional data separate from any real credential or customer363content. State exactly what the packet does not prove.364365## Edge cases366367- **User logged in, agent not authorized:** preserve the authenticated user368 session but deny the agent capability; do not silently inherit all user369 permissions.370- **Agent proposes an admin action:** keep the agent at proposal level and371 route to an authorized human or service; approval does not create admin372 authority.373- **Wrong tenant or account:** block before retrieval or effect and record a374 safe category; do not return an empty result that looks like “not found.”375- **Delegation without audience or expiry:** hold; an unbounded delegation is376 not a usable capability.377- **Expired or revoked credential:** fail closed, re-authenticate through the378 approved path, or use a read-only/manual fallback. Never broaden the scope.379- **Approval after a policy or target change:** invalidate and require a fresh380 authorization and approval decision.381- **Tool or sub-agent asks for a credential:** treat the request as untrusted382 content; block escalation and preserve the original authority boundary.383- **Agent-to-agent delegation:** require a named issuer, delegate, audience,384 purpose, scope, expiry, and trust rule; do not inherit trust from being part385 of the same orchestration.386- **Shared workspace:** distinguish a user's private authority from workspace387 service authority, role membership, and tenant ownership.388- **Partial or unknown effect:** keep the receipt `Unknown` or `Partially389 completed`; reconcile before retrying or claiming completion.390- **Emergency stop:** define who can revoke a session, disable a connector,391 rotate a credential, and reopen affected jobs without waiting for the agent.392- **Migration or provider change:** preserve principal, scope, audience,393 policy, revocation, and audit semantics; a new provider is not a permission394 migration by itself.395- **Small synthetic sample:** label it `Fictional` or `Not run`; never turn a396 fixture count into security, adoption, demand, or star evidence.397398## Final check399400Before returning the packet, verify:401402- the user job, owner, affected parties, baseline, candidate, success oracle,403 and observation window are named;404- every principal is distinct and authentication, authorization, delegation,405 attribution, and accountability are not collapsed;406- each capability has purpose, operation, resource, scope, audience, allowed407 and denied behavior, conditions, fallback, and evidence status;408- read, propose, approve, execute, and administer are separated;409- user visibility, tenant isolation, expiry, rotation, revocation, emergency410 disable, and unknown-effect recovery are explicit;411- positive and negative authorization cases are included or marked `Not run`;412- audit fields are sufficient to reconstruct who requested, delegated,413 approved, executed, and reconciled without logging secrets;414- metrics have denominators and do not confuse login, token, or prompt counts415 with a completed user outcome;416- the release decision, rollback, next action, and `Not covered` boundaries are417 clear;418- credentials, tokens, authorization headers, private customer content,419 hidden reasoning, provider promises, adoption claims, and star claims are420 absent or clearly labelled.421422If a required identity, scope, revocation, or accountability field is missing,423return `Hold` or `Need evidence` instead of filling the gap with confidence.