#15122: feat(docs): add CLAWS.md capability contract standard
docs
stale
size: S
Cluster:
Security Enhancements and Fixes
## Summary
- Add `docs/concepts/capability-contracts.md` — concept documentation for CLAWS.md
- Add root `CLAWS.md` — minimal starter template
## What is CLAWS.md?
CLAWS.md is a structured security policy layer for autonomous AI agents. While `AGENTS.md` defines agent identity and behavior, CLAWS.md defines the security boundary:
- **Risk tiers** (low/medium/high/forbid) with approval modes
- **Machine-readable YAML policy block** that agents and gateways can parse
- **Threat model** for prompt injection, supply-chain, config poisoning, cross-agent leaks
- **Anti-injection rules** — 4 non-negotiable security principles
- **Emergency safe mode** for anomalous behavior
## Motivation
As agents become more autonomous (shell access, network, communications), a structured capability contract prevents accidental harm. CLAWS.md is the "constitution" that sits above behavioral instructions.
## AI-Assisted
This PR was created with AI assistance (Claude). Content was reviewed by the submitter.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a root-level `CLAWS.md` starter template plus concept documentation at `docs/concepts/capability-contracts.md` describing the CLAWS capability-contract standard (risk tiers, machine-readable YAML policy block, threat model, and anti-injection rules) and how it relates to `AGENTS.md`.
Main issues to address before merge:
- The new concept doc uses relative `./*.md` links with `.md` extensions in `Further Reading`, which conflicts with this repo’s Mintlify linking rules for `docs/**/*.md` (root-relative paths without extensions).
- The `claws_policy.version` value is inconsistent between the root `CLAWS.md` template (`0.1`) and the docs example (`0.2`), which makes the canonical schema version unclear.
<h3>Confidence Score: 4/5</h3>
- Safe to merge once doc-linking and version consistency are fixed
- Changes are documentation-only, but the current doc links will render incorrectly under the repo’s Mintlify rules and the schema version mismatch will confuse readers/implementers.
- docs/concepts/capability-contracts.md and CLAWS.md
<sub>Last reviewed commit: 33abfcd</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#10514: Security: harden AGENTS.md with gateway, prompt injection, and supp...
by catpilothq · 2026-02-06
79.0%
#8509: docs: add docs CONTRIBUTING.md
by ethanpalm · 2026-02-04
78.3%
#15583: docs: Autonomous Governance Framework for bot ecosystem
by Insider77Circle · 2026-02-13
78.0%
#22070: docs: add minimal public safety checklist for template sharing
by MinwooKim1990 · 2026-02-20
77.5%
#10894: Docs: fix legacy branding, add config reference, expand cron troubl...
by biv0711 · 2026-02-07
76.7%
#8197: [AI-Assisted] feat: Add "Hardball" Security Framework (MFA-protecte...
by rodgui · 2026-02-03
76.2%
#13891: docs: Add Angel OS alignment and strategy context
by kendevco · 2026-02-11
76.1%
#20130: docs: add awesome-openclaw-agents to Community section
by mergisi · 2026-02-18
76.1%
#23725: Add Openclaw Code of Conduct
by tronpis · 2026-02-22
76.1%
#21829: Update update_clawdbot.md with development note
by yasir-shahhhhh · 2026-02-20
75.7%