OKF Bundle Reader Guidance Skill
Procedural rules for reading and traversing any OKF bundle efficiently, no matter how its producer organized it. Following them reduces token consumption, speeds execution, and avoids recursive directory walks.
OKF is deliberately flexible: the directory layout, the concept type values, and whether concepts cross-link are all producer-defined. So these rules key off the spec's universal structures — frontmatter type, index.md, markdown links, and resource — and never off any one source's conventions (there is no required tables/ folder, no fixed type vocabulary, no guaranteed cross-links).
When to Use
Load this skill whenever you are tasked with reading, parsing, querying, or analyzing an existing OKF bundle.
Instructions for Agents
1. Index-first discovery (descend nested indexes)
- Rule: NEVER recursively read or load every markdown file at startup.
- Protocol:
- Read the bundle-root
index.mdfirst if present — it is the directory listing. - Follow its links to map the available concepts. The index may be flat (every concept — including container/directory concepts — listed at the root as peers) or hierarchical (subdirectories carry their own
index.mdor sub-index concept). Descend any nested indexes for progressive disclosure instead of walking the tree. - If there is no
index.md, discover concepts cheaply — a shallow listing or a*.mdglob — without reading bodies yet. - Sanity-check it is an OKF bundle: concept files have YAML frontmatter with a
type; the rootindex.mdmay declareokf_version.
- Read the bundle-root
2. Route directly to a concept (layout is producer-defined)
- Rule: Do not assume a fixed directory layout. There is no required
tables/(or any other) folder — producers organize concepts however suits the domain (SQL connectors group undertables/; filesystem/git bundles mirror the source tree; others differ). - Protocol:
- Resolve a concept's location from the
index.mdlinks — use each link target verbatim; do not guess, strip, or rewrite paths (filenames and separators are producer-defined). - When the layout mirrors a source path, the concept file is usually that path; otherwise trust the index links or the directory tree.
- Open only the one file you need — don't list or read its siblings.
- Resolve a concept's location from the
3. Frontmatter-first parsing
- Rule: To identify, filter, or catalog concepts, read only the top frontmatter — not the bodies.
- Protocol:
- Parse the YAML block between the first two
---. - Use
type(an arbitrary producer-defined kind — e.g.Table,File,Metric,Playbook,Attested Computation),title,description(the one-line summary — the most useful field for cataloging), andresource(canonical URI of the underlying asset). - OKF v0.2 Metadata Families:
- Generation & Timestamp: Read
generated.by(actor) andgenerated.at(ISO 8601 timestamp). Fall back to legacytimestampifgeneratedis absent. - Trust Tier: Derive trust from
verified:human-reviewedif anyverified[].bystarts withhuman:,machine-confirmedif verified by processes/agents only,unverifiedif absent. - Freshness & Staleness: Check
stale_after(YYYY-MM-DD). A concept is stale whentoday >= stale_after. - Lifecycle Status: Read
status(draft|stable|deprecated; default:stable). - Provenance: Read
sourcesarray (id,resource,title,author,usage_count,last_modified) andusage_window. Resolve inline footnote claim citations ([^source-id]). - Attested Computations: Concepts with
type: Attested Computationdeclareruntime,parameters,computation(or# Computationbody fence),executor, andattester.
- Generation & Timestamp: Read
- The bundle stores knowledge about an asset, not its contents — for filesystem/git bundles the body may be only metadata. To read the asset itself, dereference its
resourceURI: forfile://, drop the scheme and URL-decode to a local path; other schemes (bq://,postgres://,git://, …) identify the asset but need the matching connector or credentials to fetch.
- Parse the YAML block between the first two
4. Search by name or keyword with grep
- Rule: To find a field, key, column, or any keyword across the bundle, don't open files one by one.
- Protocol: Run
grep/ripgrepacross the bundle directory and open only the files that match. For frontmatter-only filters, grep anchored lines (e.g.^type:,^title:,^status:).
5. Follow links for relationships — when they exist
- Rule: Relationships are expressed as standard markdown links between concepts; don't infer them. Some bundles are richly cross-linked; others (e.g. filesystem/git) encode structure only as index/tree containment and have no body links — tolerate their absence rather than forcing a graph.
- Protocol: Scan a concept body for links to other concept files and follow them to build a relationship view. Treat a broken link as not-yet-written knowledge, not an error.
6. Source-side catalog: .okf-metadata.yaml
- Rule: When pointed at a source directory (not a bundle) that has been ingested, a
.okf-metadata.yamlat its root is a flatpath: descriptioncatalog — read it directly for an instant index, no bundle required. - Protocol: Inside a bundle you don't need it — the same descriptions already live in each concept's frontmatter
description(Rule 3). Reach for.okf-metadata.yamlonly when summarizing the source itself.
7. Navigating Attested Computations (type: Attested Computation)
- Rule: When answering questions that require calculating a metric or running a formula, check for an
Attested Computationlink instead of improvising custom queries. - Protocol:
- Follow links from narrative concepts (
Metric,Playbook) to targetAttested Computationdocuments. - Inspect contract frontmatter:
runtime(bigquery,postgres,dbt,python),parameterslist (name,type,required),executorresource, andattesterresource. - Supply required parameter values as declared — do not edit or rewrite the sanctioned query under
# Computation(or incomputation: <file>). - Pass execution receipts to the
attesterscript to confirm run fidelity and provenance before presenting final values.
- Follow links from narrative concepts (
8. Trust, Staleness, and Provenance Gating (OKF v0.2)
- Rule: Weight facts according to their trust tier, recency, and lifecycle status.
- Protocol:
- Trust Tier: Classify trust as
human-reviewed(highest; verified byhuman:<id>),machine-confirmed(verified byprocess:/ tools), orunverified(noverifiedentry). Surface trust status when presenting critical business figures. - Staleness: Compare today's date against
stale_after(YYYY-MM-DD). Iftoday >= stale_after, flag the fact as stale or suggest re-verification. - Lifecycle Status: Respect
status(draft|stable|deprecated). Ignoredeprecatedconcepts for active decision-making unless historical context is requested. - Per-Claim Attribution: When reading bodies with inline footnotes
[^source-id], resolve attribution by joiningsource-idagainstsources[].idin frontmatter. Inspectauthor,usage_count, andlast_modifiedcredibility signals to gauge source authority.
- Trust Tier: Classify trust as


