Publisher Playbooks in v0.9.23

AI Policy Kit

Policy Kit (@peac/policy-kit) compiles one YAML policy to peac.txt, AIPREF headers, and other surfaces. Deterministic Control Abstraction Layer evaluation.

Why Policy Kit?

Define once, deploy everywhere. Stop maintaining multiple policy files.

Single Source of Truth

Define your access control policy once in YAML. Generate all output formats automatically.

Deterministic Evaluation

First-match-wins semantics ensure predictable, reproducible policy decisions every time.

Multi-Surface Output

Generate peac.txt, robots directives, AIPREF headers, and markdown docs from one policy.

Control Abstraction Layer

Seven standard purposes for agent interactions

The CAL defines a unified vocabulary for describing what agents intend to do with your content.

train

AI model training data collection

search

Traditional search operations

user_action

User-initiated actions and requests

inference

AI inference and generation

index

Search engine and AI indexing

New in v0.9.23

Publisher Playbooks

Pre-built policy profiles for common publisher scenarios. Start with a template and customize for your needs.

News Site

Optimized for news publishers with time-sensitive content

Purposes:
indexsearch
Attribution:Required with headline + publication date
Licensing:open

Blog / Personal

Simple setup for bloggers and personal sites

Purposes:
indexsearchinference
Attribution:Required with author name
Licensing:open

API Provider

For commercial APIs with rate limits and payments

Purposes:
inference
Attribution:Optional
Licensing:pay_per_crawl

Research Portal

Academic and research institutions with citation requirements

Purposes:
indexinference
Attribution:Required with DOI/citation
Licensing:subscription

Use a profile template

Initialize your policy with a pre-configured profile. Customize rules, attribution formats, and licensing modes to match your requirements.

Sensible defaults for your use case
Pre-configured attribution formats
Fully customizable after generation
Terminal
# Initialize with a profile
peac policy init --profile news-site

# Or choose interactively
peac policy init --interactive

# Generate from profile
peac policy generate --profile blog

Policy Definition

Define your access control rules using the Control Abstraction Layer semantics. Rules are evaluated in order with first-match-wins semantics.

1

Match conditions

Define which requests this rule applies to based on purpose and subject type.

2

Allow or deny

Specify whether matching requests should be allowed or denied.

3

Requirements

Set conditions like attribution, receipts, or rate limits for allowed requests.

# policy.yaml - Policy Kit v0.1
schema: peac-policy/0.1
domain: yourdomain.com

# Control Abstraction Layer rules
rules:
  - match:
      purpose: [search, index]
      subject_type: agent
    allow: true
    require:
      attribution: true
      receipts: true

  - match:
      purpose: train
      subject_type: any
    allow: false
    reason: "Training requires explicit agreement"

  - match:
      purpose: inference
      subject_type: human
    allow: true
    require:
      attribution: optional

# Default rule (first-match-wins)
default:
  allow: false
  require:
    negotiation: true

# Output configuration
outputs:
  peac_txt: true
  robots_snippet: true
  aipref_headers: true
  ai_policy_md: true
Command Line Interface

Powerful CLI tools

Policy Kit integrates with the PEAC CLI for validation, explanation, and artifact generation. Debug policy decisions before deployment.

peac policy init
peac policy validate
peac policy explain
peac policy generate
Terminal
# Initialize a new policy
peac policy init

# Validate policy syntax and rules
peac policy validate policy.yaml

# Explain how a request would be evaluated
peac policy explain policy.yaml --purpose index --subject agent

# Generate all output artifacts
peac policy generate policy.yaml --out public

Generated Outputs

A single policy.yaml generates multiple output artifacts for different consumers.

peac.txt

Machine-readable policy for PEAC-aware agents

robots-ai.txt

AI-specific directives extending robots.txt

aipref-headers.json

HTTP headers for CDN/server configuration

ai-policy.md

Human-readable policy documentation

# Generated outputs from policy.yaml:

public/
  .well-known/
    peac.txt          # PEAC policy file
  robots-ai.txt       # AI-specific robots directives
  aipref-headers.json # Headers for CDN/server config
  ai-policy.md        # Human-readable policy summary

Programmatic Evaluation

Use the Policy Kit library to evaluate policies at runtime. Deterministic first-match-wins semantics ensure consistent behavior.

Evaluation Result

allowedtrue
rule_index0
requirements{ attribution, receipts }
import { evaluate } from '@peac/policy-kit'

const result = await evaluate(policy, {
  purpose: 'index',
  subject_type: 'agent',
  subject_id: 'googlebot'
})

// Result:
// {
//   allowed: true,
//   rule_index: 0,
//   requirements: { attribution: true, receipts: true }
// }

Quick Start

Get Policy Kit running in under a minute.

1

Install the CLI

pnpm add -g @peac/cli
2

Initialize a policy

peac policy init
3

Generate artifacts

peac policy generate policy.yaml --out public

Requires Node.js 20 or newer

View full documentation

Ready to simplify your policy management?

Join early adopters using Policy Kit to manage agent access control.