Beta. consent-kit is at 0.x: expect breaking changes between releases, and treat everything it generates as a draft. Report a problem or share feedback.
Project files
The formats of the three files that sit next to privacy.registry.yaml: the lock file, the review file and the documents file. Commit all three.
| File | Written by | Purpose |
|---|---|---|
privacy.lock.json |
consent-kit release only |
The last released registry and the history of every release. |
privacy.review.json |
you | A person’s sign-off on the pending changes. |
privacy.documents.json |
you | Free-form text and phrase overrides for the generated documents. |
All three are looked for in the directory of the registry file. All are optional: a project without a lock file has not released yet. A file that is not valid JSON, or does not have the shape described here, stops every command with exit code 2.
privacy.lock.json
Section titled “privacy.lock.json”The baseline every change is measured against. check and diff compare the registry with registry in this file; build reads history for the receipt manifest.
{ "lockVersion": 2, "revision": 2, "policyHash": "72ab647de338d015f31ab5fa449d7ae21c584f278cf085a6a123aca5924bbd32", "releasedAt": "2026-11-28T11:56:01.913Z", "history": [ { "revision": 1, "policyHash": "e7e18e016f448601a3370d1886bf37058b00c93bd2587917610aa51e3065b060", "releasedAt": "2026-11-28T11:55:29.895Z", "consentPurposes": { "analytics": 1, "contributor_credit": 1 }, "otherPurposes": ["correction_reply", "essential", "security"], "sendsReceipts": true }, { "revision": 2, "policyHash": "72ab647de338d015f31ab5fa449d7ae21c584f278cf085a6a123aca5924bbd32", "releasedAt": "2026-11-28T11:56:01.913Z", "consentPurposes": { "analytics": 2, "contributor_credit": 1 }, "otherPurposes": ["correction_reply", "essential", "security"], "sendsReceipts": true } ], "registry": { "…": "the released registry, in canonical form" }}| Field | Meaning |
|---|---|
lockVersion |
2. A lock with lockVersion 1 (no history) is still read, as a history of its one release; the next release writes it in the new shape. Any other value is refused. |
revision |
CookieConsent’s global re-consent counter as of this release. |
policyHash |
The policy hash of the released registry. |
releasedAt |
ISO 8601 time of the release. |
history |
Every release, oldest first. The last entry is this release. A release appends one entry and never rewrites an earlier one, so a diff of the lock shows each release as one new entry. |
history[].consentPurposes |
Consent purpose id to its version at that release. |
history[].otherPurposes |
Ids of the purposes on another lawful basis at that release. |
history[].sendsReceipts |
Whether that release declared receipts.endpoint. Releases that sent no receipts are left out of the receipt manifest. |
registry |
The released registry in canonical form, with presets expanded. |
Rules:
- Do not edit the file by hand.
checkwarns withlock/hash_mismatchwhenregistryno longer matchespolicyHash. - The stored registry is not validated again. A later, stricter validator must not make an old release unreadable.
- The history feeds only the receipt manifest.
checkanddiffcompare against the last released registry. - Because the lock stores the expanded registry, upgrading a preset shows up as ordinary changes to ordinary artefacts.
privacy.review.json
Section titled “privacy.review.json”What a person decided about the pending changes. Both keys are optional.
{ "acknowledged": [ "processor.metadata_changed@processors.plausible.privacyUrl", "csp.loosened@csp.allow.style-src.'unsafe-inline'" ], "overrides": { "purpose.description_formatting_changed@purposes.analytics.description.en": "material" }}| Key | Type | Meaning |
|---|---|---|
acknowledged |
string[] | Change keys a person has reviewed. An entry confirms a needs_confirmation change and unblocks a needs_review change. A key that matches no change is a warning (acknowledgement/unknown_change). |
overrides |
map of change key to classification | Raises the classification of a change to needs_confirmation, material or needs_review. An override can only escalate: one that would lower a classification, names a change that does not exist, or is not a classification is ignored and reported as a warning (override/downgrade, override/unknown_change, override/invalid_classification). |
Change keys are printed by consent-kit check and consent-kit diff. See change classifications.
consent-kit release empties both lists, because everything in them referred to changes that are now released. Other top-level keys in the file are kept, so you can keep notes there.
The file is the sign-off: who added a key, and when, is what your version control records. consent-kit does not check who edited it.
privacy.documents.json
Section titled “privacy.documents.json”Read by consent-kit docs only. Every key is optional; an unknown key is an error.
{ "slots": { "intro": { "en": "This policy covers vacation-planner.example.", "de": "Diese Erklärung gilt für vacation-planner.example." } }, "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": "76a6b6f8157575f96a9cec26bd567cef892dc859546d38fbc19628c117cf71a7" } } }, "common.none": { "de": "keine Angabe" } }, "cookieTableLinks": { "en": "/cookies", "de": "/de/cookies" }, "generatedAt": "2026-11-28"}| Key | Type | Meaning |
|---|---|---|
slots |
map of slot id to { "<locale>": "text" } or false |
Hand-written text around the generated sections of the privacy policy. Two slots exist: intro, printed before the first section, and outro, printed after the last. false leaves a slot out on purpose. Any other slot id is an error; ids that earlier versions used (dpo, supervisory_authority, security_measures and others) are now registry fields, and the error says which. |
phrases |
map of phrase id to { "<locale>": … } |
Your own wording for a phrase of the library. The value per locale is a string, or { "text": …, "review": { "reviewer", "date", "contentHash" } } to record your own legal review of exactly that text. The locale key is a registry locale (de-AT) or its base language (de); the registry locale wins. |
cookieTableLinks |
map of locale to URL | Where the published cookie table lives, for the link in the privacy policy. Default: the generated file’s name, cookies.<locale>.md. |
subjectRequestFormLinks |
map of locale to URL | Where the request form is published, for the link in the privacy policy. Only with subjectRequests. Default: the endpoint. consent-kit build also reads phrases from this file, for the form, its pages, the emails and the checklists. |
generatedAt |
string | Printed verbatim as the document date (“As of: …”). The generator never reads the clock, so documents only change when their inputs do. |
A phrase override must keep to the placeholders of the phrase it replaces. One that uses a placeholder the phrase does not have, has an empty text or names an unknown phrase id is rejected: the library text is used, and docs fails.
Every override in effect is listed by consent-kit docs, reviewed or not. An override counts as reviewed only while review.contentHash equals the SHA-256 of its text; editing the text makes it a draft again. See record a legal review.