Skip to content

Best practices

A tree is only as useful as its pages. An AI assistant answers from the page it finds, so each page should answer on its own, say how far to trust it, and lead to the pages it depends on. These practices come from OKF, from the rules OKForest checks, and from what makes answers better. (Why OKF says why it’s worth the care.)

  • Write a page for each thing people ask about: a metric, a policy, a table, a product, a decision. A page about one thing is found for the right question, read whole, and cited exactly; a long page about many is found for everything and answers none of it well.
  • Name its file for what it is, in lowercase with hyphens or underscores: metrics/revenue.md, policies/refunds.md (okforest/slug). The path is the concept’s ID, and links and assistants use it.
  • Group pages in folders by subject, each with an index.md that lists what’s in it, * [Title](path) - description (okf/index-entries). An assistant reads a tree a folder at a time, so the index is its table of contents. OKForest keeps it up to date when it adds, moves, or deletes a page.
---
type: Metric
title: Revenue
description: Recognized revenue for a period, per Acme's FY2026 revenue-recognition policy.
tags: [finance, revenue]
x-owner: finance
stale_after: "2026-12-31"
---
  • type, always, from the types your tree defines. Under OKF 0.3, markdown without one isn’t a concept at all. A tree can have as many types as it has kinds of page (the company template has 18); what matters is one name for each kind, used on every page of that kind. OKForest warns when a type is a near-duplicate of another, like Policy and Policies (okforest/similar-type).
  • A description of one sentence that says what the page is (okf/description). It’s what search results, index entries, and an assistant deciding what to read see first.
  • A title in the words people use. Search weighs a page’s title most, then its tags and description, then its body. Search by meaning finds a page whose words differ from the question’s, but the right words in the title still help.
  • tags from an agreed list, not whatever comes to mind: the same tag for the same idea on every page, so filtering by a tag finds them all. A type’s schema can hold the list (a type’s tags), and OKForest warns about near-duplicates (okforest/similar-tag).
  • Your own fields start with x- (x-owner), so a later OKF version can’t give them another meaning.
  • Define reusable types, with a schema. In .okforest/types/, a type’s schema declares the metadata its pages carry: a Metric might declare x-owner and x-unit, and require them (Types). Its template then starts each new page with those fields, so every page of a type is filled in the same way. Asked who owns a metric, an assistant finds the answer in the same field on every Metric. The fields are yours to define, beyond OKF’s own.
  • Answer first. Start with the definition, the rule, or the decision, in a sentence or two; detail, exceptions, and history follow. An assistant that reads only the start still gets it right.
  • Write for someone without the context. Spell out acronyms and the terms your team takes for granted, or link the page that defines them. Say what applies when and to whom.
  • Be specific. Numbers, dates, names, and conditions, not “usually” and “soon”. Say what’s out of scope, too: an assistant answers from what’s there.
  • Link the pages it depends on with ordinary markdown links, never [[wikilinks]] (okforest/wikilink). An assistant follows links to the context it needs, and OKForest’s graph shows what depends on what. Write them relative to the page’s folder (../policies/refunds.md) or from the tree’s root (/policies/refunds.md); OKF reads both. A relative link survives moving or renaming a folder that holds both pages, and one from the root survives moving the page that has it. If the tree is in a folder of its repository (okf/, as the templates have it), only relative links work when people browse it on GitHub, which reads / from the repository’s root.
  • Prefer diagrams as code, in ```d2 or ```mermaid blocks. Changing one is editing a line of text, which anyone, person or AI, can do in a change like any other, and its diff shows exactly what moved. People see the drawing, an assistant reads its source, and Checks catch a diagram that doesn’t parse. An image still has its place, such as a screenshot or a photo: give it alt text that says what it shows.
  • Tables and examples for what’s easier to show than say: a sample query, a worked calculation, a filled-in form.
  • Nothing left from a template ({{name}}, [INSERT OWNER]), which an assistant may repeat as fact (okforest/placeholder), and no secrets: name where a credential is kept, never the credential.
  • Name the sources a page rests on in sources, and tie claims to them with footnotes whose labels match their ids (okf/footnote-source).
  • Verify what’s been reviewed. Verify in the OKForest App records that you’ve checked a page as it stands; applying a change records it for whoever applied it. A page counts as verified only since it last changed (how a page’s trust changes), so an assistant knows which pages a person stands behind.
  • Keep generated.at current when you edit a page in Git, so a review of the old text doesn’t vouch for the new. OKForest does it for changes applied there.
  • Give a review date (stale_after) to anything that goes out of date: prices, org charts, this year’s policy. Past it, the page is stale: assistants are told, and Freshness lists it, until someone updates it and moves the date.
  • status: draft until it’s ready, then stable. Assistants say when an answer rests on a draft.
  • Deprecate rather than delete a page others rely on, naming what replaces it: under OKF 0.3 it gets superseded_by, which leads assistants to the replacement. Moving a page in OKForest can leave a deprecated page at the old path, for links from outside the tree.
  • Validate every change: npx okforest validate locally, and the GitHub Action on every pull request. In OKForest, Checks lists each tree’s findings for every commit.
  • Keep changes small, one purpose each, so a reviewer can follow them. In OKForest, every change, from a person or an assistant, waits for one of the tree’s editors.
  • Let AI help, with a person deciding. Your assistant can ask for or propose a change over MCP, OKForest’s AI can draft one, and the okforest skill teaches an assistant these practices. An editor reviews and applies each one.