`. The same rule.yaml schema applies to both registries; the registry's own CI [validates against `schema/rule.schema.json`](https://github.com/openagentlock/rules/blob/main/schema/rule.schema.json) on every PR.
-Every install ships `policies/default.yaml` with five gates in monitor mode:
+### Authoring new rules with an agent
+
+When the catalog doesn't have what you need, the [openagentlock/skills](https://github.com/openagentlock/skills) toolkit ships agent skills (Claude Code, Cursor, Codex) that turn natural-language intent into a `rule.yaml` and run `agentlock rules install` to land it. See the `block-pattern` skill for the canonical "block this command shape" flow.
+
+## The five built-in defaults
+
+When the daemon boots, it loads `policies/default.yaml`, which ships these five gates in monitor mode. They are intentionally narrow — most operators leave them on and add registry rules on top.
@@ -54,7 +109,9 @@ Reads of `.env`, `~/.ssh`, `~/.aws/credentials`, anywhere a secret-shaped path a
-## Authoring rules
+The community registry has tighter / opinionated variants of several of these — e.g. `rogue.git-force-push` (only deny force-push to main / develop / release), `exfil.curl-with-env` (catch the `$ENV_VAR` exfil shape specifically), `rogue.eval-untrusted` (deny dynamic-eval shells). Install whichever match your threat model.
+
+## Authoring rules from scratch
Two rules of thumb:
@@ -62,32 +119,6 @@ Two rules of thumb:
> **Use the dashboard.** The local web dashboard (`127.0.0.1:7879`) lets you right-click a logged tool call and "block this next time" — it generates a starter rule from the call's shape. Iterate from there.
-## Installing community rules
-
-The [openagentlock/rules](https://github.com/openagentlock/rules) registry ships ready-to-pin gates. Browse them at , then install via CLI:
-
-```bash
-# upstream is auto-registered on first sync
-agentlock rules sync
-agentlock rules search exfil
-
-# install one rule into the live policy
-agentlock rules install exfil.curl-with-env
-
-# remove later
-agentlock rules uninstall exfil.curl-with-env
-```
-
-The rule's `gate:` block is POSTed to `/v1/policy/gates/yaml` and lands in the live policy with a fresh hash; existing sessions stay pinned to the old hash until they reload, so installs never invalidate in-flight work.
-
-You can register additional registries (private internal rules, etc.):
-
-```bash
-agentlock rules add https://github.com/your-org/your-rules.git
-agentlock rules sources
-agentlock rules remove your-org-your-rules # local-only — does not touch installed gates
-```
-
## Authoring via the dashboard
Open . The dashboard is shaped like a firewall admin UI:
@@ -100,23 +131,26 @@ Changes are validated against the policy schema before being written, and a snap
## Policy schema
-The full schema lives in [`api/openapi.yaml`](https://github.com/openagentlock/OpenAgentLock/blob/main/control-plane/api/openapi.yaml) under `components.schemas.Policy`. Minimal example:
+The full schema lives in [`api/openapi.yaml`](https://github.com/openagentlock/OpenAgentLock/blob/main/control-plane/api/openapi.yaml) under `components.schemas.Policy`. Community-rule authors should match the registry shape documented in [`schema/rule.schema.json`](https://github.com/openagentlock/rules/blob/main/schema/rule.schema.json). Minimal example:
```yaml
+version: 1
mode: monitor
-
-evaluator:
- on_miss: allow
- on_hit: deny
-
+defaults:
+ bash: allow
gates:
- id: rogue.secret-read
- when:
- command_regex: '(\.env(\b|[._-])|/\.ssh(/|\b)|/\.aws(/|\b)|credentials)'
- on_hit: deny
- severity: high
+ match:
+ tool: Bash
+ any_command_regex:
+ - '(\.env(\b|[._-])|/\.ssh(/|\b)|/\.aws(/|\b)|credentials)'
+ evaluate:
+ - kind: always
+ action: deny
```
+The daemon's regex engine is Go RE2 — **no negative lookahead, no backreferences**. If you find yourself reaching for `(?!…)`, invert the match: write a positive regex for the dangerous shape rather than a negative regex around the safe one.
+
## Enforcement vs monitor
- **Monitor** — every gate matches but the verdict is downgraded to `allow` for the harness. Use this on day one.
diff --git a/mkdocs.yml b/mkdocs.yml
index f4bc5c3..23b1c51 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -106,7 +106,7 @@ nav:
- Guide:
- Getting started: guide/getting-started.md
- Installation: guide/installation.md
- - Policies and the five gates: guide/policies.md
+ - Policies and rules: guide/policies.md
- Signers: guide/signers.md
- The ledger: guide/ledger.md
- Local web dashboard: guide/dashboard.md