---
type: task
title: Validate OKF Frontmatter
description: Runnable task that checks every /okf Markdown file for a complete, well-formed OKF frontmatter block and non-dangling cross-links.
resource: https://searchaudit.io/okf/README.md
tags: [task, validation, ci, frontmatter]
timestamp: 2026-07-26T00:00:00Z
---

# Task: Validate OKF Frontmatter

Runs the validator over `public/okf/**/*.md` and fails if any node is missing a mandatory key,
has an unknown `type`, malformed `tags`/`timestamp`, or a `[[wikilink]]` that points to no file.

## Run it

```bash
pnpm okf:validate
# or
node scripts/okf-validate.mjs
```

## Schema enforced

- Frontmatter delimited by `---` on the first line.
- Mandatory keys: `type`, `title`, `description`, `resource`, `tags`, `timestamp`.
- `type` ∈ { `entity`, `concept`, `guide`, `task`, `index` }.
- `tags` is a non-empty inline array; `timestamp` is ISO-8601; `resource` is an absolute URL.
- Every `[[slug]]` resolves to an existing `.md` node (or `README`).

## When to run

Before committing any new/edited OKF node, and in CI. Convention: [[open-knowledge-format]].
Index: [[README]].
