> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diffraction.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Context and rules

> Give reviews project instructions, private product context, and versioned company requirements.

Diffraction can combine repository files, private workspace/repository Markdown,
and organization company rules. Each review captures the versions it used;
editing today's context does not rewrite a historical review.

## Repository instructions

The resolver automatically reads these files when present:

```text theme={"theme":{"light":"css-variables","dark":"css-variables"}}
.diffraction/instructions.md
.diffraction/setup.md
.diffraction/review.md
```

Reference additional Markdown under `.diffraction` with `review.instructionPaths`.
These documents can explain personas, synthetic setup, important flows, and
expected outcomes. They are planner context, not executable setup or permissions.
Use `app.setup` and `app.verify` for commands.

Repository instruction selection allows 12,000 characters per document and
24,000 combined. The settings page shows selected files and truncation. Structured
`review.flows` and important routes supplement prose.

## Private Markdown context

Use **Settings** for organization context and **Repos → repository → Context**
for repository context. Authorized administrators can edit or upload Markdown
and preview it as inert content. Current WorkOS permissions and workspace access
apply. The CLI also supports [context reads and writes](/docs/site/cli#context-and-rules).

Describe what the product does, user roles, key tasks, expected states, and test
data. Do not include passwords, tokens, or customer records. Private documents
allow 12,000 characters each, with a bounded combined selection for reviews.
The run records selection and truncation rather than implying all text was used.

Updates use version checks. If another editor saved first, reload the current
version before applying your change. Removing current context does not alter the
immutable context already captured by an earlier run.

## Company and brand rules

Pro administrators can set company review rules in **Settings**. These bounded
plain-text requirements are included in planning and evidence analysis with their
organization origin and policy version. They take precedence over conflicting
repository expectations.

Repository-specific brand rules, rule files, and reference images belong under
`review.brand` in configuration and also require Pro. State concrete expectations;
a model's personal visual preference is not a defect.

Rules and Markdown cannot grant network access, credentials, tools, or extra
budget. Company requirements do not automatically become merge blockers or
guarantee that a model will detect every violation. Inspect the captured policy
and context provenance in each review.
