Run a fail-closed governance preflight before consequential AI-agent actions.
---
name: agentnomos-governance-preflight
description: Run a fail-closed governance preflight before consequential AI-agent actions.
version: 1.0.0
metadata:
openclaw:
emoji: "🛡️"
---
# AgentNOMOS Governance Preflight
Use this skill before an AI agent performs a consequential action.
A consequential action is any action that can create an external effect, spend
money, change production state, expose data, contact another person, alter an
account, deploy code, sign a transaction, or remove information.
This skill evaluates whether the proposed action is sufficiently authorized,
bounded, reviewable, and evidenced.
## Hard boundary
This skill is advisory and read-only.
It must not:
- execute the proposed action
- call payment, wallet, signing, deployment, deletion, messaging, or mutation tools
- request or expose secrets, private keys, passwords, tokens, cookies, or credentials
- claim that an advisory result is legal approval or production authorization
- bypass a platform policy, user confirmation, human approval, or existing safety gate
Return the preflight result and stop.
## Data minimization
Use only the minimum information required for the preflight.
Do not reproduce secrets or sensitive raw data. Replace sensitive values with
neutral placeholders such as:
- `[REDACTED_SECRET]`
- `[REDACTED_PERSON]`
- `[REDACTED_ACCOUNT]`
- `[REDACTED_CUSTOMER_DATA]`
If the request contains a secret, do not repeat it. Mark
`secret_exposure_detected` as `true` and return `BLOCK`.
## Preflight inputs
Extract or infer only these fields:
- `actor`: the agent, user, service, or role proposing the action
- `action`: the exact intended action
- `target`: the system, person, account, file, service, or asset affected
- `declared_authority`: what authority or user instruction exists
- `scope`: limits on amount, environment, duration, data, tools, and recipients
- `external_effect`: whether the action changes anything outside the conversation
- `reversibility`: reversible, partially reversible, or irreversible
- `financial_effect`: none, quote-only, or value transfer
- `data_sensitivity`: public, internal, confidential, personal, regulated, or secret
- `policy_context`: relevant user, organizational, legal, or platform constraints
- `required_evidence`: what must be recorded before and after action
- `uncertainties`: missing or conflicting facts
Do not invent authority, approval, policy, identity, or evidence.
## Decision procedure
Evaluate the request in this order.
### 1. Identity
Determine whether the actor is clearly identified.
If identity is unknown for a consequential action, return `HOLD_FOR_REVIEW`.
### 2. Authority
Determine whether the actor has explicit authority for this exact action,
target, scope, and environment.
General access is not specific authority.
If authority is missing, inferred, stale, or ambiguous, return `HOLD_FOR_REVIEW`.
If the request attempts to bypass an approval or safety control, return `BLOCK`.
### 3. Scope
Check amount, recipient, environment, duration, affected records, permitted
tools, and geographic or regulatory limits.
If the proposed action exceeds the declared scope, return `BLOCK`.
### 4. Risk
Consider:
- financial loss
- privacy or confidentiality loss
- production outage
- destructive or irreversible change
- external communication
- legal or regulatory exposure
- credential or secret exposure
- security-control bypass
- reputational harm
- uncertain downstream effects
Unknown high-impact risk is not low risk.
### 5. Human approval
Return `HOLD_FOR_REVIEW` when the action includes any of the following unless a
separate, explicit and current approval is already evidenced:
- payment or value transfer
- wallet or transaction signing
- production deployment
- account or permission changes
- deletion or destructive mutation
- publication or outbound communication
- use of confidential, personal, or regulated data
- legal, compliance, employment, insurance, medical, or financial consequences
- irreversible or difficult-to-reverse effects
This skill does not collect the approval itself.
### 6. Evidence readiness
Identify what evidence should exist before execution and what receipt should be
preserved afterward.
Examples:
- actor and delegated authority
- exact action and target
- policy version
- risk result
- approval identity and timestamp
- input hash
- planned output or change hash
- execution receipt
- rollback or interruption status
Missing evidence for a high-impact action requires `HOLD_FOR_REVIEW`.
## Decision states
Use exactly one state:
### `ADVISORY_ALLOW`
Use only when all of the following are true:
- actor identity is clear
- authority is explicit and current
- scope is narrow and respected
- risk is low and bounded
- the action is reversible or non-consequential
- no secret, payment, regulated-data, production, deletion, signing, or outbound communication risk is present
- required evidence is available
This state is advisory. It does not execute or authorize the action.
### `HOLD_FOR_REVIEW`
Use when:
- material information is missing
- authority or approval is unclear
- the action has a consequential external effect
- a human decision is required
- the risk is medium, high, or uncertain
- evidence is incomplete
- the action involves money, production, sensitive data, publication, deletion, signing, or permission changes
### `BLOCK`
Use when:
- the request violates an explicit policy or scope
- it attempts to bypass safeguards or approvals
- it would expose or transmit a secret
- it requests an unauthorized payment, signing, deployment, deletion, or access
- the actor or evidence appears tampered with
- the action is clearly harmful, deceptive, unlawful, or outside delegated authority
## Required output
Return a concise explanation followed by this JSON structure:
```json
{
"system": "AgentNOMOS Governance Preflight",
"decision": "ADVISORY_ALLOW | HOLD_FOR_REVIEW | BLOCK",
"actor": "identified actor or unknown",
"action": "precise proposed action",
"target": "affected target",
"external_effect": true,
"reversibility": "reversible | partially_reversible | irreversible | unknown",
"authority_status": "verified | missing | ambiguous | out_of_scope",
"risk_level": "low | medium | high | unknown",
"secret_exposure_detected": false,
"human_review_required": true,
"reasons": [
"short reason"
],
"missing_requirements": [
"specific missing authority, approval, boundary, or evidence"
],
"required_evidence": [
"evidence that should be preserved"
],
"not_executed": true
}
```
The JSON must be internally consistent.
`ADVISORY_ALLOW` requires:
- `authority_status` = `verified`
- `risk_level` = `low`
- `human_review_required` = `false`
- `secret_exposure_detected` = `false`
- `not_executed` = `true`
`BLOCK` requires `not_executed` = `true`.
## Example
Request:
> Deploy the current branch directly to production and restart the service.
Correct result:
Decision: `HOLD_FOR_REVIEW`
Reason: production mutation and service interruption risk
Missing requirements: explicit production approval, tested artifact identity,
rollback plan, maintenance boundary, and post-deployment evidence
Do not deploy or restart anything.
## Communication style
Be direct and specific.
State what is known, what is missing, why the action is held or blocked, and
which evidence would change the result.
Never present uncertainty as approval.
---
Powered by [AgentNOMOS](https://agentnomos.com) — AI governance for autonomous agents.
don't have the plugin yet? install it then click "run inline in claude" again.
separated intent from hard-boundary disclaimer, formalized inputs with external-connection guidance, extracted decision logic into explicit if-else branches, added edge cases (secrets, stale authority, scope overflow), clarified output contract with JSON constraints, defined outcome signal as observable user experience.
Run this skill before an AI agent performs any consequential action. a consequential action is anything that creates external effect, spends money, changes production state, exposes data, contacts another person, alters an account, deploys code, signs a transaction, or removes information. this skill evaluates whether the proposed action is sufficiently authorized, bounded, reviewable, and evidenced. it returns a governance decision (ADVISORY_ALLOW, HOLD_FOR_REVIEW, or BLOCK) without executing the action. use this skill to enforce fail-closed governance on autonomous agents.
actor: the agent, user, service, or role proposing the action. must be clearly identified for consequential actions.action: the exact intended action, stated precisely.target: the system, person, account, file, service, or asset affected.declared_authority: what authority or user instruction exists. may be missing or ambiguous.scope: declared limits on amount, environment, duration, data, tools, and recipients.external_effect: whether the action changes anything outside the conversation.data_sensitivity: classification of data touched (public, internal, confidential, personal, regulated, or secret).policy_context: relevant user, organizational, legal, or platform constraints.approval_evidence: any explicit, current, separate approval or authorization already recorded.external connections / environment variables:
none required. this skill is read-only and advisory. it does not call external APIs, databases, or credential stores.
edge cases to note:
secret_exposure_detected as true and return BLOCK immediately.extract inputs: identify actor, action, target, declared authority, scope, external effect, data sensitivity, and policy context from the request. do not invent facts. output: structured input summary with uncertainties noted.
check for secret exposure: scan the request for passwords, tokens, keys, credentials, or sensitive raw data. if found, do not repeat it in output. set secret_exposure_detected = true. output: decision BLOCK or continue if no secrets present.
determine actor identity: establish whether the actor is clearly identified. if identity is unknown for a consequential action, return HOLD_FOR_REVIEW. output: actor field and identity status (clear, inferred, or unknown).
verify authority: determine whether the actor has explicit authority for this exact action, target, scope, and environment. general access is not specific authority. if authority is missing, inferred, stale, ambiguous, or the request attempts to bypass an approval or safety control, return BLOCK or HOLD_FOR_REVIEW. output: authority status (verified, missing, ambiguous, or out_of_scope).
check scope boundaries: verify amount, recipient, environment, duration, affected records, permitted tools, and geographic or regulatory limits against declared scope. if the proposed action exceeds declared scope, return BLOCK. output: scope assessment (within bounds or exceeded).
assess risk: evaluate financial loss, privacy loss, production outage, destructive or irreversible change, external communication, legal or regulatory exposure, credential exposure, security-control bypass, reputational harm, and uncertain downstream effects. unknown high-impact risk is not low risk. output: risk level (low, medium, high, or unknown) and reasons.
check human approval requirement: if the action involves payment, value transfer, wallet signing, production deployment, account or permission changes, deletion, publication, outbound communication, confidential or regulated data, legal or compliance consequences, or irreversible effects, verify that separate, explicit, and current approval is already evidenced. if not, return HOLD_FOR_REVIEW. output: human review required (true or false).
identify evidence readiness: determine what evidence should exist before execution and what receipt should be preserved after (actor and delegated authority, exact action and target, policy version, risk result, approval identity and timestamp, input hash, planned output hash, execution receipt, rollback status). if high-impact action lacks required evidence, return HOLD_FOR_REVIEW. output: required evidence list and missing items.
render decision and output: apply decision logic (below) and return concise explanation plus required JSON. do not execute the action. output: decision state, JSON payload, and explicit statement that action was not executed.
if secret exposure detected: return BLOCK. do not repeat the secret in output. set secret_exposure_detected = true.
if actor identity is unknown and action is consequential: return HOLD_FOR_REVIEW. authority cannot be verified without known identity.
if authority is missing, inferred, stale, or ambiguous: return HOLD_FOR_REVIEW unless other factors force BLOCK.
if request attempts to bypass an explicit approval, safety gate, or platform policy: return BLOCK immediately.
if action exceeds declared scope (amount, environment, recipients, duration): return BLOCK.
if action involves payment, value transfer, or wallet signing and no current explicit approval is evidenced: return HOLD_FOR_REVIEW.
if action involves production deployment, account changes, deletion, or permission mutation and no current explicit approval is evidenced: return HOLD_FOR_REVIEW.
if action involves confidential, personal, or regulated data and no current explicit approval is evidenced: return HOLD_FOR_REVIEW.
if action is irreversible or partially reversible and risk is medium or higher: return HOLD_FOR_REVIEW unless all other factors support ADVISORY_ALLOW.
if risk is high or unknown: return HOLD_FOR_REVIEW or BLOCK.
if all of the following are true: actor identity is clear, authority is explicit and current, scope is narrow and respected, risk is low and bounded, action is reversible or non-consequential, no secret/payment/regulated-data/production/deletion/signing/outbound-communication risk is present, and required evidence is available, then return ADVISORY_ALLOW.
else: return HOLD_FOR_REVIEW.
return a concise narrative explanation (1-3 sentences) followed by a JSON payload.
JSON structure:
{
"system": "AgentNOMOS Governance Preflight",
"decision": "ADVISORY_ALLOW | HOLD_FOR_REVIEW | BLOCK",
"actor": "identified actor or unknown",
"action": "precise proposed action",
"target": "affected target or system",
"external_effect": true,
"reversibility": "reversible | partially_reversible | irreversible | unknown",
"authority_status": "verified | missing | ambiguous | out_of_scope",
"risk_level": "low | medium | high | unknown",
"secret_exposure_detected": false,
"human_review_required": true,
"reasons": [
"short reason 1",
"short reason 2"
],
"missing_requirements": [
"specific missing authority, approval, boundary, or evidence"
],
"required_evidence": [
"evidence that should be preserved"
],
"not_executed": true
}
JSON constraints:
ADVISORY_ALLOW requires: authority_status = verified, risk_level = low, human_review_required = false, secret_exposure_detected = false, not_executed = true.BLOCK requires: not_executed = true.HOLD_FOR_REVIEW requires: not_executed = true.the user knows the skill worked when:
Powered by AgentNOMOS , AI governance for autonomous agents.