---
title: template-heading-missing
description: Reports a required Template heading that is absent from a completed typed document.
---

[← All Rules](/rules/)

## What it does

Reports a declared required heading that cannot be found at the depth and position defined by the Template. If an optional section is present, all headings declared inside that section are required.

## Why it matters

Required headings preserve the Document Type's expected information structure.

## Examples

For a Template that declares `Context` before `Decision`:

### Non-passing

```md title="docs/decisions/0001-choice.md"
# Choice

## Decision
```

### Passing

```md title="docs/decisions/0001-choice.md"
# Choice

## Context

## Decision
```

## When it applies

This Rule belongs to the configurable `document-types` group. Optional sections may be omitted in full; required sections may not.

## References

See [Presswork Configuration](/configuration/#documenttypes) for Templates and [`src/template.ts`](https://github.com/evilkiwi/presswork/blob/main/src/template.ts) for heading matching.
