← Back to PRs

#15122: feat(docs): add CLAWS.md capability contract standard

by igindin open 2026-02-13 02:08 View on GitHub →
docs stale size: S
## 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