aos-constitutional-governance
Create, sign (Ed25519), verify, and audit an AOS-style immutable constitution for OpenClaw. Use when implementing constitutional governance beneath SOUL.md, designing deny/confirm/allow policy evaluation, generating constitution.yaml + constitution.sig, validating GitTruth attestations, building tamper-evident tool-call logs, or preparing a reference implementation skill/plugin for OpenClaw.
Best use case
aos-constitutional-governance is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create, sign (Ed25519), verify, and audit an AOS-style immutable constitution for OpenClaw. Use when implementing constitutional governance beneath SOUL.md, designing deny/confirm/allow policy evaluation, generating constitution.yaml + constitution.sig, validating GitTruth attestations, building tamper-evident tool-call logs, or preparing a reference implementation skill/plugin for OpenClaw.
Teams using aos-constitutional-governance should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/aos-constitutional-governance/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How aos-constitutional-governance Compares
| Feature / Agent | aos-constitutional-governance | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create, sign (Ed25519), verify, and audit an AOS-style immutable constitution for OpenClaw. Use when implementing constitutional governance beneath SOUL.md, designing deny/confirm/allow policy evaluation, generating constitution.yaml + constitution.sig, validating GitTruth attestations, building tamper-evident tool-call logs, or preparing a reference implementation skill/plugin for OpenClaw.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# AOS Constitutional Governance (OpenClaw)
Implement AOS-style two-layer governance for tool-using assistants:
- **Immutable Constitution (locked)**: signed + GitTruth-attested policy enforced at runtime.
- **Mutable Identity (flexible)**: persona/workflow guidance (e.g., `SOUL.md`).
- **User Task Intent (ephemeral)**: per-request justification, confirmations, and overrides.
This Skill focuses on **Phase 1** deliverables (spec + signing + verification + audit artifacts) and provides the evaluation algorithm needed for Phase 2 (Gateway enforcement).
**Clarification:** This repository demonstrates a **reference integration** between agent frameworks and constitutional governance concepts. It does **not** grant patent rights or disclose enforcement mechanisms beyond illustrative examples.
## Files produced
- `constitution.yaml` — human-readable policy
- `constitution.c14n.json` — canonical JSON used for hashing/signing
- `constitution.sig.json` — detached Ed25519 signature metadata
- `constitution.attestation.json` — GitTruth attestation metadata (pointer)
## Canonicalization + signing
1. Convert `constitution.yaml` → canonical JSON (sorted keys, normalized scalars).
2. Compute `doc_hash = sha256(c14n_json_bytes)`.
3. Sign `doc_hash` with Ed25519 → `signature`.
4. Commit `constitution.yaml` + `constitution.sig.json` to git.
5. GitTruth attests the commit.
6. Gateway verifies (a) Ed25519 signature over `doc_hash`, and (b) GitTruth attestation for the commit.
Use scripts:
- `scripts/c14n.py` — canonicalize YAML→JSON
- `scripts/sign.py` — Ed25519 sign
- `scripts/verify.py` — verify Ed25519 + (optionally) GitTruth attestation
## Policy evaluation (deny / confirm / allow)
### Decision model
The policy engine returns one of:
- **DENY**: tool call is blocked (constitutional).
- **CONFIRM**: tool call is paused pending explicit user approval (scoped override token).
- **ALLOW**: tool call may execute.
If multiple rules match, select the **most restrictive** decision:
`DENY > CONFIRM > ALLOW`
and merge obligations (logging, disclosure, reflection) from all matched rules.
### Inputs to evaluation
- `tool`: string (e.g., `message.send`, `read`, `exec`)
- `args`: structured args (paths, urls, message text)
- `session`: { kind, label, channel }
- `intent`: user task intent object (may be empty)
- `risk`: derived risk classification (see below)
- `classifications`: derived tags (e.g., `impersonation`, `fraud`) from deterministic matchers
### Output
- `decision`: ALLOW|CONFIRM|DENY
- `reason_code`: stable string
- `obligations`: e.g., disclosure text to append, reflection fields, log requirements
- `override`: if CONFIRM, a scope hash to approve exactly this call
## Risk classification (deterministic)
Risk should be **rules-based and reproducible**, not LLM-judgment.
Use `scripts/risk.py` as a reference implementation.
Risk is computed as:
`risk = max(tool_base_risk(tool), arg_risk(tool,args), data_risk(args), egress_risk(args), user_scope_risk(session,intent))`
with levels: `low < medium < high < critical`.
## Next steps
Phase 2 (Gateway): move the evaluator into the tool router so it is non-bypassable.Related Skills
u0195-governance-community-feedback-harvester
Build and operate the "Governance Community Feedback Harvester" capability for Safety and Governance. Use only when production execution explicitly requires this exact capability and output contract.
ai-governance
AI governance and compliance guidance covering EU AI Act risk classification, NIST AI RMF, responsible AI principles, AI ethics review, and regulatory compliance for AI systems.
cgr-docs-governance
Use this skill when updating project documentation after backend/frontend operational changes, incidents, workflow behavior changes, or new runbooks.
azure-enterprise-governance
Enterprise-grade Azure governance, security, and compliance framework. Combines Microsoft Cloud Adoption Framework (CAF) naming standards with comprehensive security architecture (Zero Trust), compliance frameworks (NIST, SOC2, PCI-DSS, HIPAA), and best practices. Provides naming validation, security audits, RBAC design, and compliance checklists for production-ready Azure deployments.
governance
Engineering standards and code governance enforcement with parallel agent execution. Triggers during code reviews, commits, and standards discussions. 70-90% token savings via delegated execution.
frontend-governance
Enforces Contemplative design system and Anti-Slop protocols for all UI generation
awesome-copilot-root-agent-governance
Use when: the task directly matches agent governance responsibilities within plugin awesome-copilot-root. Do not use when: a more specific framework or task-focused skill is clearly a better match.
ai-development-governance
AI-augmented development controls, GitHub Copilot governance, LLM security, AI-generated code review per Hack23 Secure Development Policy
data-governance-enrichment
Enrich CRM data: tools, waterfall approach, automation, quality control. Use when designing or improving data enrichment in rev ops.
Openapi Governance
* **Depends on**: None * **Compatible with**: None * **Conflicts with**: None * **Related Skills**: None # Overview Comprehensive guide to OpenAPI governance, API design standards, automated linting,
agent-governance
Implement hooks for permission control and security in custom agents. Use when adding security controls, blocking dangerous operations, implementing audit trails, or designing permission governance.
bgo
Automated Blender build-go workflow. Automatically builds, removes old version, installs, enables, and launches Blender with your extension/add-on. Use when you want to quickly test changes, execute complete build-to-launch cycle, or run custom packaging scripts with automatic Blender launch.