# Rerail > Rerail checks the code a coding agent writes against the repository's rules while the agent works, and steers it to fix what breaks them. Rules are rerail.policy/v1 JSON documents. Every page of these docs has a Markdown twin at the same path with .md in place of .html. A code rule's JSON Schema is https://neralabs.github.io/rerail/rerail.policy.v1.schema.json; the full language is in the [DSL reference](https://neralabs.github.io/rerail/code-rule-dsl-reference.md). ## Using Rerail - [Installing Rerail](https://neralabs.github.io/rerail/installation.md): requirements, what set-up asks and changes, updating, starting, stopping, removal, and what Rerail runs on - [How set-up works](https://neralabs.github.io/rerail/how-setup-works.md): each set-up step and what it writes, the managed-installation layout, the database, updates and removal - [Troubleshooting](https://neralabs.github.io/rerail/troubleshooting.md): what you see when set-up or Rerail goes wrong, and what to do - [Reference](https://neralabs.github.io/rerail/reference.md): rules and their configuration, the database, updates, the daemon and its API, audits - [Distribution model](https://neralabs.github.io/rerail/distribution-model.md): how the package is distributed and updated - [Writing rules for your repository](https://neralabs.github.io/rerail/writing-rules.md): which rules are worth having; suggesting, writing, testing and tuning one with `/rerail-create` and `rerail rules evidence|test|add`; keeping a rule to one worktree with `.rerail/rules/` - [Rule scoping](https://neralabs.github.io/rerail/rule-scoping.md): global, project and repository rules - [Writing command-line rules](https://neralabs.github.io/rerail/tool-call-rules.md): rules over the commands an agent runs - [Writing path and text rules](https://neralabs.github.io/rerail/path-and-text-rules.md): code rules over file text and paths, which files they read, and rules that a file should not exist - [Architecture rule examples](https://neralabs.github.io/rerail/architecture-rule-examples.md): design rules that maintainers of Sentry, Home Assistant, Zulip, Immich, n8n, VS Code, rust-analyzer, Zed, uv, Nextcloud, Laravel apps and Synapse enforce in review, each as a tested rule, plus React wrapper rules and what a rule can and cannot see - [Rerail code-rule DSL reference](https://neralabs.github.io/rerail/code-rule-dsl-reference.md): every construct of the `rerail.policy/v1` code-rule DSL. Hand-written prose with generated regions; see `scripts/generate/README.md`. - [Rerail in-session surfaces](https://neralabs.github.io/rerail/in-session-surfaces.md): what Rerail shows inside a coding-agent session - [Privacy](https://neralabs.github.io/rerail/privacy.md): what Rerail sends over the network, what it stores locally, and how to delete it - [Internal testing](https://neralabs.github.io/rerail/internal-testing.md): unreleased features and where each surfaces - [Headless scan](https://neralabs.github.io/rerail/headless-scan.md): `rerail scan` of a checkout for CI, with no daemon or session, and its `rerail.scan/1` report (internal testing) - [Remote sink](https://neralabs.github.io/rerail/remote-sink.md): sending this machine's Rerail data to a remote you add, its protocol, and what stays on disk (internal testing) ## Rules, packs and languages - [Rule packs](https://neralabs.github.io/rerail/rule-packs.md): packs, matching and recommendation, the shipped packs, and a worktree's own rules - [Rule pack structure and validation contract](https://neralabs.github.io/rerail/pack-format.md): pack layout, pack data, provenance records and the validation contract - [Upstream snapshots and publishing data](https://neralabs.github.io/rerail/upstream.md): upstream snapshots and pack data, samples and their licences, new snapshots, the publish workflow, upstream releases and bumps, and CI - [Language packs](https://neralabs.github.io/rerail/language-packs.md): the language registry, statuses, and how to start a pack - [Adding rules to a pack](https://neralabs.github.io/rerail/adding-rules-to-a-pack.md): adding rules written for Rerail or ported from a tool, who does what, the steps for each kind, the Conformance comment, promotion and demotion, and maintainers' publish steps ## Release - [Releasing Rerail](https://neralabs.github.io/rerail/release.md): how core is built, versioned and published - [Runbook: publishing a new pack to npm](https://neralabs.github.io/rerail/publishing-a-new-pack.md): runbook for a pack's first npm publish and its trusted publisher ## Repository - [Governance](https://neralabs.github.io/rerail/GOVERNANCE.md): participation, maintainers and decision-making - [Repository structure](https://neralabs.github.io/rerail/repository-structure.md): layout rules and the structure gate (`npm run check:structure`) ## Design notes - [Content-addressed workspace store](https://neralabs.github.io/rerail/content-addressed-workspace-store.md): the machine-wide content store - [Tape transducer language](https://neralabs.github.io/rerail/transducer-design.md): the tape transducer language used by tests and benchmarks ## Optional - [All docs in one file](https://neralabs.github.io/rerail/llms-full.txt): every page's Markdown twin, concatenated - [Rerail's Blade parser: a port of Forte](https://neralabs.github.io/rerail/blade-parser.md) - [Environment matrix](https://neralabs.github.io/rerail/environment-matrix.md) - [Threat model](https://neralabs.github.io/rerail/threat-model.md)