Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Decision

Note

Specification: accepted. Implemented in part in the source build. Remaining requirements and external validation are not complete.

Version: shiin.decision/v1-draft.1.

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals.

A decision is the engine’s answer to an action request.

Decision values

[DEC-001] A decision MUST be one of allow, deny, or pending.

[DEC-002] allow means the action may proceed.

[DEC-003] deny means the action must not proceed.

[DEC-004] pending means the action must wait for an approver.

Reason codes

[DEC-005] Every decision MUST carry a stable, machine-readable reason code.

[DEC-006] Reason codes MUST follow the form <decision>.<stage> or <decision>.<signal>, such as deny.policy or pending.opaque.

[DEC-007] The reason codes defined by this specification are:

CodeDecisionMeaning
allow.policyallowA policy rule allowed the action.
allow.grantallowA grant covered the action.
deny.identitydenyThe agent identity is not acceptable.
deny.capabilitydenyThe agent lacks a capability for this action class.
deny.policydenyA policy rule denied the action.
deny.intentdenyThe action does not fit the active task.
deny.riskdenyA risk signal denied the action.
deny.failuredenyA failure produced a fail-closed deny.
deny.builtindenyA built-in protected resource was touched.
deny.unattendeddenyA pending result could not be resolved because no approver is available.
deny.defaultdenyNo rule matched, so the default decision applied.
pending.identitypendingThe agent identity needs confirmation.
pending.capabilitypendingThe agent capability needs confirmation.
pending.intentpendingThe action needs confirmation against the task.
pending.riskpendingA risk signal escalated the action.
pending.opaquependingAn opaque effect needs approval.
pending.grantablependingThe action needs a grant or approval.

Agent-facing message

[DEC-008] Every decision MUST carry a message intended for the agent.

[DEC-009] The message MUST NOT reveal policy structure, error codes, paths, or other internal detail that could help an agent probe for a bypass.

Decision object

[DEC-010] A decision MUST be a JSON object with:

FieldTypeRequiredDescription
schemastringyesshiin.decision/v1-draft.1.
request_idstring (UUID)yesThe id of the action request.
decisionstringyesallow, deny, or pending.
reasonstringyesThe reason code.
messagestringyesThe agent-facing message.
tracearraynoThe trace of stage results, in explain mode.
approvalobject or nullnoAn approval request, when pending.

Examples

{
  "schema": "shiin.decision/v1-draft.1",
  "request_id": "0190f3a0-1c2d-4e3f-8a4b-5c6d7e8f9a0b",
  "decision": "deny",
  "reason": "deny.policy",
  "message": "Reading secret files is not allowed.",
  "trace": null,
  "approval": null
}
{
  "schema": "shiin.decision/v1-draft.1",
  "request_id": "not-a-uuid",
  "decision": "allow",
  "reason": "allow.policy",
  "message": "ok",
  "trace": null,
  "approval": null
}

Revision history

  • Accepted on 2026-10-12. Accepted: the reason-code registry is now enforced by cargo xtask docs-check, and the spike produced every code the corpus expects.
  • v1-draft.1 (2026-10-01): Initial draft.