---
title: Content contracts
description: Content contracts are rules a CMS checks on every write of an entry, answering what is wrong, where and how to fix it, before the entry can be published.
term: Content contracts
alternateNames:
  - Content validation rules
---

Content contracts are the rules a CMS checks on every write of an entry: the shape of its fields, its links, its images, its words. Each contract answers what is wrong, where, and how to fix it, and an entry that breaks one cannot be published.

## What a contract checks

- the schema of the frontmatter: which fields are required, their types, lengths and formats;
- links that lead to no entry, and images without alt text;
- words a site never uses, and fields that must be set before publishing;
- translations an entry is missing, and the length of a title for search engines.

## Why agents need them

An agent writes quickly and confidently, mistakes included. A contract turns a mistake into a message the agent reads in the same call, so it fixes the entry before a person ever sees it:

```text
! /frontmatter/description: Missing required field "description".
? Set the field "description" to a string of 1 to 160 characters.
```

## In Hollware

Each collection of [Hollware](/) declares its contracts, from a catalog or written in code, and every write returns its verdict. An error blocks publishing; a warning asks to be acknowledged. See [Contracts](/docs/contracts/).
