Skip to content

POLICY.md

POLICY.md is a portable, Markdown-native way to tell an AI agent what it must not do, what it must ask before doing, and what is allowed.

It is the negative-capability counterpart to SKILL.md:

  • SKILL.md = "here is an ability you can use"
  • POLICY.md = "here is a boundary you must respect"

Why

Agents are being given tools that can write files, send messages, install packages, deploy infrastructure, and move money. SKILL.md teaches them positive skills; POLICY.md puts a portable control layer around those skills. It can be read by a human, understood by an LLM as system context, and enforced by a runtime engine.

A POLICY.md file

A POLICY.md is Markdown with YAML frontmatter:

markdown
---
name: project-guardrails
description: Hard boundaries for this repo
version: 1.0.0
scope: project
appliesTo: [all]
rules:
  - capability: file.write
    action: deny
    condition:
      field: { path: 'payload.path', op: 'includes', value: '.env' }
    reason: Never write .env or secret files

  - capability: package.install
    action: require_approval
    reason: New dependencies need approval

  - capability: npm.test
    action: allow
    reason: Tests can run without approval
---

## Forbidden
- Never commit `.env` files or any file containing secrets
- Never execute obfuscated shell commands

## Ask first
- Adding npm dependencies
- Modifying CI/CD pipelines

## Allowed
- Running `npm run typecheck` and `npm run test`
- Reading project documentation

Where to go next

Repository

SidianLabs/POLICY.md (Apache 2.0). Install the CLI from npm as @sidianlabs/policy.

Released under the Apache 2.0 License.