Skip to content

Z610: REQUIRED_FRONTMATTER_MISSING

  • Severity: Error


    Penalty: 0.0 points | Category: general

  • Remediation & Opt-In


    Auto-Fixable: No | Opt-In: No


Description

A required YAML frontmatter key declared in [policies].required_frontmatter_keys is absent from this document.

The Policy-as-Code Engine (v0.28.0) allows project maintainers to enforce that every Markdown file declares a specific set of metadata keys in its YAML frontmatter block. This ensures consistent metadata across the documentation graph and enables downstream systems (search indexing, navigation generation, auditing pipelines) to rely on the presence of well-known keys.

Z610 is emitted once per missing key per file. If three required keys are absent, three separate Z610 findings are reported — one for each missing key — to make remediation clear and actionable.


How to Fix

Add the missing key to the YAML frontmatter block at the top of the file:

Before (non-compliant):

---
title: My Document
---

Content here.

After (compliant, assuming description and author are also required):

---
title: My Document
description: A short description of this document.
author: PythonWoods
---

Content here.

Configuration

Z610 is opt-in and inactive by default. It is only emitted when [policies].required_frontmatter_keys is declared with a non-empty list in .zenzic.toml.

[policies]
# Every Markdown file must declare these frontmatter keys.
required_frontmatter_keys = ["title", "description", "author"]

When the list is empty or the [policies] section is absent, no Z610 findings are emitted.


Suppression

If a specific file intentionally omits a required key (e.g. an auto-generated index page or a template), suppress the finding inline:

<!-- zenzic:ignore:Z610 -->
---
title: Auto-generated Index
---

Or use [governance].per_file_ignores in .zenzic.toml for structural suppressions:

[governance.per_file_ignores]
"docs/generated/**" = ["Z610"]

Reference

See the Finding Codes Index for finding code details.