feat: governance-guard — structural authority separation for agent actions#124
Closed
devongenerally-png wants to merge 1 commit intoopenclaw:mainfrom
Closed
feat: governance-guard — structural authority separation for agent actions#124devongenerally-png wants to merge 1 commit intoopenclaw:mainfrom
devongenerally-png wants to merge 1 commit intoopenclaw:mainfrom
Conversation
…t actions Adds a deterministic governance layer that separates action proposal, decision, and execution into distinct computational pathways. Every tool call passes through PROPOSE → DECIDE → PROMOTE where the decision phase is a pure function with no LLM involvement. Repo: https://github.com/MetaCortex-Dynamics/governance-guard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for the pull request! This repository is read-only and is automatically synced from https://clawhub.ai, so we can’t accept changes here. Please make updates on the website instead. |
Author
|
AI disclosure: This skill was designed with AI assistance (Claude) for architecture review, spec drafting, and test scaffolding. All code was reviewed, understood, and tested by the author. 96/96 tests passing, fully tested. The governance architecture and design decisions are the author's original work. ClawHub: This skill is also published on ClawHub as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
governance-guard adds a deterministic governance layer that separates action proposal, decision, and execution into distinct computational pathways. Every tool call passes through a three-phase pipeline — PROPOSE → DECIDE → PROMOTE — where the decision phase is a pure function with no LLM involvement.
Zero production dependencies. 96 tests. Fail-closed semantics.
Repo: https://github.com/MetaCortex-Dynamics/governance-guard
The problem this solves
OpenClaw agents currently propose actions, evaluate those actions, and execute them through the same computational pathway. When a single system is simultaneously the proposer, the judge, and the executor, there is no structural mechanism to prevent unauthorized behavior.
This is not hypothetical. Documented incidents include:
auth: noneBehavioral mitigations (system prompts, guardrails) run on the same LLM that generates the threat. The guardrail and the threat share a computational substrate. This skill addresses the architectural root cause.
How it works
PROPOSE — Intercepts tool calls. Serializes them into a structured
ActionIntentwith SHA-256 binding. Malformed intents are rejected at this boundary.DECIDE — Evaluates the intent against a user-defined YAML policy file. This is a pure, deterministic function. No LLM invocation. No interpretation. No context-dependent reasoning. Policy + intent → verdict (approve / deny / escalate). First matching rule wins. Default verdict: deny.
PROMOTE — Forwards approved actions to the skill executor. Requires matching
intent_hash, valid verdict, and freshness check (MAX_VERDICT_AGE). If any condition fails, the action is blocked.Witness chain — Every governance decision is recorded as a hash-chained JSONL entry. The chain is tamper-evident and independently verifiable:
What's in the skill
Dependencies
Production: None. Zero. The skill uses:
cryptofor SHA-256Dev only:
tsx,typescript,@types/nodeTest coverage
96/96 passing:
Security properties
MAX_VERDICT_AGEtimeout +intent_hashbindingWhat this does NOT guarantee
Transparency about limitations:
Example policy
Why this matters for OpenClaw
OpenClaw's skill ecosystem is growing fast (5,700+ skills on ClawHub). The
auth: nonedefault, the malicious skill incidents, and the MoltMatch episode are symptoms of a missing governance layer, not individual skill bugs. As the platform moves toward foundation governance, structural authority separation is a necessary primitive.This skill doesn't require changes to OpenClaw core. It operates as a pre-execution interceptor within the existing skill architecture. Users install it, choose a policy preset, and every tool call is governed from that point forward.
Author: Devon Generally / MetaCortex Dynamics
License: MIT
Node: ≥22
Tested: 96/96 pass