# Documents and phrase review

> consent-kit docs writes a site's privacy documents from the registry.

`consent-kit docs` writes a site's privacy documents from the registry. This page explains how the text is assembled, why every sentence is a draft until a lawyer has reviewed its exact wording, and what the documents can and cannot be relied on for.

> [!WARNING]
> The generated documents are drafts, not legal advice. As shipped, no phrase in the library has a legal review on record. Every generated document says so in a banner at its top. Do not publish one without review.

## What is generated

| Document | For whom |
| --- | --- |
| Privacy policy | Visitors (Art. 13 GDPR) |
| Cookie table | Visitors |
| Record of processing activities | The controller and, on request, the supervisory authority (Art. 30 GDPR) |
| Processor list | The controller; visitors, where published |
| Field notices | Visitors, at each form field |
| Imprint (only with `imprint` in the registry) | Visitors: who provides the website (§ 5 DDG) |
| Changelog entry | Visitors: what changed since the last release |

Each is written in every registry locale the phrase library has a language for: English and German. The files are listed in [generated files](/docs/manual/reference/generated-files/#from-consent-kit-docs).

## Facts from the registry, sentences from the library

A generated document has two ingredients.

**Facts** come from the registry: who the controller is, which purposes exist on which basis, what data, how long, who receives it, which cookies. If the registry does not state a fact, the document does not state it either.

**Sentences** come from the phrase library: a fixed set of 284 phrases, each with an id, an English text and a German text. A phrase may have placeholders that are filled with facts:

```
retention.after_event    "{duration} after {event}"
```

There is no free-text generation and no language model. The same registry always produces the same document, byte for byte. A reviewer can read the whole library once and know every sentence that can ever appear.

This is also why the registry demands statements that look pedantic: whether a data protection officer is designated, whether automated decision-making takes place, whether providing a form field is required. The alternative would be a document with a hand-written insert, and a hand-written insert is exactly the copy that drifts.

Only two places accept free text: an `intro` before the first section of the privacy policy and an `outro` after the last, set in `privacy.documents.json`.

## Draft until reviewed

Every phrase has a status per language:

- **draft**: written by the consent-kit authors, who are not lawyers;
- **reviewed**: a lawyer's review of exactly this text is on record.

A review is recorded against the **content hash** of the text, the SHA-256 of its exact wording. It names the phrase, the language, the reviewer and the date.

```mermaid
flowchart LR
  T[phrase text] -->|SHA-256| H[content hash]
  R[review: reviewer, date, content hash] --> Q{hashes equal?}
  H --> Q
  Q -->|yes| OK[reviewed]
  Q -->|no| D[draft again]
```

The consequence is the point of the design: **editing a phrase invalidates its review automatically.** Nobody has to remember to reset a flag. A "reviewed" status can only ever refer to the words that are actually printed.

Reviews are per language. A review of the English text says nothing about the German one.

## What a document shows

While a document uses at least one unreviewed phrase, it starts with a visible banner:

> **Unreviewed draft: this document contains 67 generated text passage(s) that have not been legally reviewed. Do not publish it without review.**

`consent-kit docs` reports the same count, and `docs --json` lists every unreviewed phrase with the files that use it. `docs --require-reviewed` turns the report into a gate: it exits 1 and writes nothing while any phrase in use is unreviewed.

Every document also carries the policy hash and the revision, in a comment at its top and in its footer. The same hash is in the lock file and in every consent receipt. A published document can therefore be matched to the release it belongs to and to the decisions made under it.

## Two ways a review gets on record

**In the library.** A review recorded in consent-kit's own review list applies to everyone who uses that version of the library. This is a contribution to consent-kit: it changes a file in the package.

**In your project.** In `privacy.documents.json` you can replace any phrase with your own wording and attach your own lawyer's review of exactly that wording:

```json
{
  "phrases": {
    "basis.consent.explanation": {
      "en": {
        "text": "We process the following data only with your consent. You can withdraw it at any time; see the section on withdrawing consent.",
        "review": { "reviewer": "J. Doe, Example LLP", "date": "2026-11-28", "contentHash": "76a6b6f8…" }
      }
    }
  }
}
```

The same hash rule applies: the review counts only while `contentHash` matches the text.

Every override in effect is listed by `consent-kit docs` on every run, with the library text it replaces, reviewed or not. An override is never hidden. The steps for both routes are in [record a legal review](/docs/manual/guides/record-a-legal-review/).

## What a review covers, and what it does not

A recorded review says that a named person approved the wording of one sentence template, in one language, on one day.

It does not say that:

- the facts filled into the placeholders are true. They come from your registry;
- the document as a whole is complete for your situation. A reviewed sentence about retention does not make the stated retention period lawful;
- the wording fits your jurisdiction, sector or audience, unless that is what your reviewer checked;
- the review is still current. Law and guidance change; the hash only detects a change in the text.

consent-kit also does not verify who the reviewer is. A review record is a statement made by whoever committed it, kept in version control.

## Gaps

When the registry lacks something a document needed, the generator does not guess. It records a gap that names the registry field which would close it:

```
advisory    controller.address  The controller has no postal address in the registry; documents print the name and contact only. Add "address" under controller. (de, en)
advisory    purposes.essential.processors  The purpose "essential" has no recipient: no artefact binds a third-party processor to it and it lists none. Add "processors: []" to the purpose to state that there are none, or list the processors that receive its data (for example the email provider behind a form). (de, en)
```

An advisory gap means the document reads worse or may be incomplete: a data category printed as its raw id, a missing controller address. A required gap means the document is incomplete: a locale the library has no language for. Gaps never stop `docs`; they are there to be read.

## The changelog entry

While the registry has unreleased changes, `docs` also writes a changelog entry in visitor-facing words. It separates changes to what visitors were told from other changes, and says whether they will be asked again:

```markdown
# What changed in our privacy information

Because of these changes we will ask you for your consent again.

## Changes to what we told you

- “Visitor statistics”: the storage period changed from “365 days” to “730 days”.

## Other changes

- We changed a technical security setting of this website (its Content Security Policy).
- The details of the service provider Plausible Analytics changed. Purposes affected: Visitor statistics.
- Editorial correction without a change in meaning.
```

It is built from the same classified diff that `check` prints. It is only written while there is a diff, so generate it before `consent-kit release`.

## What the documents are for

Use them as a complete, consistent first draft that is always in step with what the site declares, and as the thing you hand to your lawyer. Their consistency with the banner and the site's behaviour is mechanical and strong. Their legal sufficiency is not established by consent-kit at all.

## Next

- [Record a legal review](/docs/manual/guides/record-a-legal-review/)
- [Documents reference](/docs/manual/reference/documents/)
- [FAQ and compliance notes](/docs/manual/faq/)
