Skip to content

okf/type

errorOKF specification

Under OKF 0.2, every concept’s frontmatter has a non-empty string type (OKF §4.1, §11).

OKF requires one key in every concept’s frontmatter: type, a short string naming the kind of concept, such as Metric or Playbook. Consumers use it to route, filter, and present concepts (§4.1). Types aren’t registered anywhere: pick one that describes the concept, and use it consistently. Under OKF 0.2, every markdown file other than index.md and log.md is a concept, so one without a type is an error. Under OKF 0.3, a file without one isn’t a concept at all, and okf/not-a-concept says so instead.

This file breaks the rule:

churn.md
---
title: Monthly churn
description: The share of customers who cancel in a month.
---
Churn is the customers who cancel in a month, divided by the customers at its start.

okforest validate reports:

churn.md
1:1 error Missing `type`, the one required key. okf/type

Fixed:

churn.md
---
type: Metric
title: Monthly churn
description: The share of customers who cancel in a month.
---
Churn is the customers who cancel in a month, divided by the customers at its start.