OKF Builder Reference / Open Knowledge Format v0.1, explained for builders OKF v0.1
OKF OpenKnowledgeFormat

Examples

Copyable OKF examples

Copy small knowledge bundles that show OKF v0.1 mechanics: root indexes, logs, concept files, required type frontmatter, links, citations, and extension fields.

Minimal knowledge bundle

A bundle root with an optional versioned index, one concept file, and a chronological update log.

File tree

okf/
|-- index.md
|-- log.md
`-- metrics/monthly-recurring-revenue.md

index.md

markdown

---
okf_version: "0.1"
---

# Metrics

* [Monthly Recurring Revenue](metrics/monthly-recurring-revenue.md) - Recurring subscription revenue normalized to a monthly period.

# Tables

* [Subscriptions](tables/subscriptions.md) - Source table for active subscription revenue.

# Playbooks

* [Revenue Review](playbooks/revenue-review.md) - Weekly review process for subscription revenue changes.

metrics/monthly-recurring-revenue.md

markdown

---
type: Metric
title: Monthly Recurring Revenue
description: Recurring subscription revenue normalized to a monthly period.
resource: dashboard://revenue/mrr
tags: [revenue, saas, finance]
timestamp: 2026-06-13T00:00:00Z
---

# Calculation

MRR is the predictable recurring revenue generated by active subscriptions in the [subscriptions table](../tables/subscriptions.md).

Include active subscriptions with recurring billing. Exclude one-time setup fees, refunds, and usage-only charges unless normalized into a recurring plan.

# Examples

```sql
select sum(monthly_amount_usd) as mrr
from analytics.subscriptions
where status = 'active';
```

# Citations

[1] [Revenue dashboard](dashboard://revenue/mrr)

log.md

markdown

# Directory Update Log

## 2026-06-13
* **Creation**: Added the [MRR metric](metrics/monthly-recurring-revenue.md).
* **Update**: Linked MRR to the [subscriptions table](tables/subscriptions.md).

SaaS metrics bundle

Capture metrics, source tables, dashboards, and review playbooks as linked concepts.

File tree

okf/
|-- index.md
|-- log.md
|-- metrics/monthly-recurring-revenue.md
|-- tables/subscriptions.md
`-- playbooks/revenue-review.md

metrics/monthly-recurring-revenue.md

markdown

---
type: Metric
title: Monthly Recurring Revenue
description: Recurring subscription revenue normalized to a monthly period.
resource: dashboard://revenue/mrr
tags: [revenue, saas, finance]
timestamp: 2026-06-13T00:00:00Z
---

# Calculation

MRR is the predictable recurring revenue generated by active subscriptions in the [subscriptions table](../tables/subscriptions.md).

Include active subscriptions with recurring billing. Exclude one-time setup fees, refunds, and usage-only charges unless normalized into a recurring plan.

# Examples

```sql
select sum(monthly_amount_usd) as mrr
from analytics.subscriptions
where status = 'active';
```

# Citations

[1] [Revenue dashboard](dashboard://revenue/mrr)

tables/subscriptions.md

markdown

---
type: Warehouse Table
title: Subscriptions
description: One row per customer subscription and billing state.
resource: warehouse://analytics.subscriptions
tags: [warehouse, subscriptions, revenue]
timestamp: 2026-06-13T00:00:00Z
---

# Schema

| Column | Type | Description |
|--------|------|-------------|
| `subscription_id` | string | Unique subscription identifier. |
| `customer_id` | string | Customer that owns the subscription. |
| `status` | string | Current billing state. |
| `monthly_amount_usd` | decimal | Normalized monthly recurring amount. |

# Related concepts

Feeds the [Monthly Recurring Revenue](../metrics/monthly-recurring-revenue.md) metric and the [Revenue Review](../playbooks/revenue-review.md) playbook.

API documentation bundle

Describe endpoints, schemas, errors, authentication, and business rules without replacing OpenAPI.

File tree

okf/
|-- index.md
|-- endpoints/create-customer.md
|-- schemas/customer.md
`-- errors/rate-limit.md

endpoints/create-customer.md

markdown

---
type: API Endpoint
title: Create Customer
description: Creates a new customer record.
resource: https://api.example.com/customers
method: POST
path: /api/customers
tags: [api, customers]
timestamp: 2026-06-13T00:00:00Z
---

# Request

Accepts a customer payload shaped by the [Customer schema](../schemas/customer.md).

# Response

Returns the created customer object or a [rate limit error](../errors/rate-limit.md).

# Examples

```http
POST /api/customers
Content-Type: application/json
```

Laravel app bundle

Make routes, models, policies, jobs, and operational context easier for humans and agents to inspect.

File tree

okf/
|-- index.md
|-- models/user.md
|-- routes/api-users.md
`-- policies/user-policy.md

models/user.md

markdown

---
type: Laravel Model
title: User Model
description: Authenticated account model for customers and internal operators.
resource: repo://app/Models/User.php
tags: [laravel, model, authentication]
timestamp: 2026-06-13T00:00:00Z
---

# Responsibilities

The User model represents an authenticated account and owns customer-facing resources.

# Related concepts

Used by the [API users route](../routes/api-users.md) and protected by the [user policy](../policies/user-policy.md).

# Citations

[1] [Source file](repo://app/Models/User.php)

WordPress site bundle

Package custom post types, taxonomies, fields, and theme templates as portable Markdown knowledge.

File tree

okf/
|-- index.md
|-- post-types/product.md
|-- acf/product-fields.md
`-- templates/single-product.md

post-types/product.md

markdown

---
type: WordPress Post Type
title: Product
description: Custom post type used to manage product content.
resource: wp-admin/edit.php?post_type=product
tags: [wordpress, post-type, content]
timestamp: 2026-06-13T00:00:00Z
---

# Purpose

The Product post type stores product landing pages and related metadata.

# Related concepts

Rendered by the [single product template](../templates/single-product.md) and enriched by [product fields](../acf/product-fields.md).

Data warehouse bundle

Document datasets, tables, metrics, lineage, dashboards, and data quality notes near the systems they describe.

File tree

okf/
|-- index.md
|-- datasets/sales.md
|-- tables/orders.md
|-- tables/customers.md
`-- metrics/gross-revenue.md

tables/orders.md

markdown

---
type: BigQuery Table
title: Orders
description: One row per completed customer order.
resource: https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders
tags: [sales, orders, revenue]
timestamp: 2026-06-13T00:00:00Z
---

# Schema

| Column | Type | Description |
|--------|------|-------------|
| `order_id` | STRING | Unique order identifier. |
| `customer_id` | STRING | Foreign key to [customers](customers.md). |
| `total_usd` | NUMERIC | Order total in US dollars. |

# Citations

[1] [BigQuery table](https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders)

Company knowledge bundle

Represent policies, teams, systems, playbooks, and decisions as linked Markdown concepts.

File tree

okf/
|-- index.md
|-- teams/support.md
|-- policies/refunds.md
|-- systems/billing.md
`-- playbooks/incident-response.md

policies/refunds.md

markdown

---
type: Policy
title: Refund Policy
description: Rules support and billing teams use when evaluating customer refund requests.
resource: docs://policies/refunds
tags: [support, billing, policy]
timestamp: 2026-06-13T00:00:00Z
---

# Purpose

The refund policy defines when support can approve a refund, when billing review is required, and which cases must be escalated.

# Decision points

* Check whether the customer has an active subscription in the [billing system](../systems/billing.md).
* Escalate disputes, chargebacks, and unclear billing events through the [incident response playbook](../playbooks/incident-response.md).

# Citations

[1] [Refund policy source](docs://policies/refunds)

AI agent context bundle

Give agents durable context about systems, tools, playbooks, metrics, and operating constraints before they act.

File tree

okf/
|-- index.md
|-- systems/billing.md
|-- tools/stripe.md
|-- playbooks/support-triage.md
`-- constraints/agent-safety-rules.md

constraints/agent-safety-rules.md

markdown

---
type: Constraint
title: Agent Safety Rules
description: Operating boundaries an AI agent must follow before using tools or changing customer-facing systems.
resource: docs://agent-context/safety-rules
tags: [agent, safety, tools]
timestamp: 2026-06-13T00:00:00Z
---

# Rules

The agent must read relevant system, tool, metric, and playbook concepts before taking action.

Do not change billing data, refund customers, send external messages, or modify production settings unless a human explicitly approves the specific action.

# Related concepts

Read the [billing system](../systems/billing.md), [Stripe tool](../tools/stripe.md), and [support triage playbook](../playbooks/support-triage.md) before using operational tools.
Mathias Onea

Mathias Onea

Senior Engineer, Product Builder, and Founder

Systems, product software, and practical execution for teams that need clear decisions, durable implementation, and agent-ready knowledge structures.

Focus
Knowledge systems, Laravel platforms, automation, and technical SEO infrastructure.
Related work
Founder-led software work through Craftwell and independent open-source projects.
Profile
mathiasonea.com