{"slug":"okf-open-knowledge-format","title":"okf-open-knowledge-format","summary":"Create, validate, and enrich Open Knowledge Format (OKF) bundles — the open spec for representing organizational knowledge as markdown files with YAML frontmatter. Use when the user mentions 'OKF', 'Open Knowledge Format', 'knowledge bundle', 'OKF bundle', 'create a knowledge bas","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-01T17:44:17.075018Z","repo":{"url":"https://github.com/fabricioctelles/skills","stars":96,"forks":8,"license":"Apache-2.0","updatedAt":"2026-09-22T12:40:47Z"},"bodyHtml":"<hr>\n<h2>name: okf-open-knowledge-format\ndescription: &gt;\nCreate, validate, and enrich Open Knowledge Format (OKF) bundles — the open\nspec for representing organizational knowledge as markdown files with YAML\nfrontmatter. Use when the user mentions 'OKF', 'Open Knowledge Format',\n'knowledge bundle', 'OKF bundle', 'create a knowledge base for agents',\n'validate OKF', 'convert to OKF', 'enrich knowledge docs', 'agent-readable\nknowledge', 'LLM wiki', 'knowledge catalog', 'kcmd', or wants to structure\nknowledge as markdown files for AI agent consumption. Also use when the user\nhas a directory of markdown files and wants to make them interoperable or\nconformant with the OKF standard. Even for simple requests like 'make this\nfolder OKF conformant' — the skill has critical structural rules the agent\nneeds.\nmetadata:\nauthor: ft.ia.br\nversion: \"2.0\"\ndate: 2026-08-25\nrepository: <a href=\"https://github.com/fabricioctelles/skills\">https://github.com/fabricioctelles/skills</a>\nlicense: Apache-2.0\ncategory: library-and-api-reference\nupstream: <a href=\"https://github.com/GoogleCloudPlatform/open-knowledge-format\">https://github.com/GoogleCloudPlatform/open-knowledge-format</a></h2>\n<h1>Open Knowledge Format (OKF)</h1>\n<p>OKF is a vendor-neutral, open spec (v0.2, released by Google Cloud) for representing knowledge as a directory of markdown files with YAML frontmatter. No SDK required — if you can <code>cat</code> a file, you can read OKF.</p>\n<p>It formalizes the \"LLM Wiki\" pattern (<a href=\"https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f\">Karpathy's gist</a>) into an interoperable format: wikis written by different producers can be consumed by different agents without translation.</p>\n<p><strong>v0.2 adds:</strong> provenance tracking (<code>sources</code>), trust signals (<code>generated</code>, <code>verified</code>), lifecycle management (<code>status</code>, <code>stale_after</code>), and <strong>Attested Computations</strong> — a new concept type for sanctioned, verifiable calculations.</p>\n<p>For the full spec, see:</p>\n<ul>\n<li><a href=\"references/spec-v02.md\">references/spec-v02.md</a> — Current version (v0.2)</li>\n<li><a href=\"references/spec-v01.md\">references/spec-v01.md</a> — Legacy version (v0.1)</li>\n</ul>\n<h3>Design Principles</h3>\n<ol>\n<li><strong>Minimally opinionated</strong> — Only <code>type</code> is required. The spec defines interoperability surface, not content model.</li>\n<li><strong>Producer/consumer independence</strong> — Who writes and who reads are decoupled. Human-authored bundles feed agents; LLM-generated bundles are browsed by humans.</li>\n<li><strong>Format, not platform</strong> — No cloud, SDK, or vendor dependency. Value comes from how many parties speak it.</li>\n<li><strong>Trust is first-class</strong> — v0.2 makes provenance, verification, and freshness queryable from frontmatter.</li>\n</ol>\n<hr>\n<h2>Key Terminology</h2>\n<table>\n<thead>\n<tr>\n<th>Term</th>\n<th>Definition</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Bundle</strong></td>\n<td>A directory tree of <code>.md</code> files. The unit of distribution (git repo, tarball, or subdirectory).</td>\n</tr>\n<tr>\n<td><strong>Concept</strong></td>\n<td>One markdown file = one unit of knowledge (table, metric, playbook, API, etc.)</td>\n</tr>\n<tr>\n<td><strong>Concept ID</strong></td>\n<td>File path within the bundle, minus <code>.md</code> suffix. Example: <code>tables/users.md</code> → ID <code>tables/users</code></td>\n</tr>\n<tr>\n<td><strong>Frontmatter</strong></td>\n<td>YAML block between <code>---</code> delimiters at file top.</td>\n</tr>\n<tr>\n<td><strong>Body</strong></td>\n<td>Everything after the frontmatter. Standard markdown.</td>\n</tr>\n<tr>\n<td><strong>Link</strong></td>\n<td>Standard markdown link expressing a relationship between concepts.</td>\n</tr>\n<tr>\n<td><strong>Source</strong></td>\n<td>A material a concept derives from, recorded in the <code>sources</code> frontmatter field.</td>\n</tr>\n<tr>\n<td><strong>Provenance</strong></td>\n<td>The set of sources a concept derives from.</td>\n</tr>\n<tr>\n<td><strong>Actor</strong></td>\n<td>Identity string: <code>&lt;producer&gt;/&lt;version&gt;</code> for agents, <code>human:&lt;id&gt;</code> for people, <code>process:&lt;id&gt;</code> for automation.</td>\n</tr>\n<tr>\n<td><strong>Trust tier</strong></td>\n<td>Level derived from <code>verified</code>: unverified, machine-confirmed, or human-reviewed.</td>\n</tr>\n<tr>\n<td><strong>Attested Computation</strong></td>\n<td>A concept (<code>type: Attested Computation</code>) carrying a sanctioned way to compute a value.</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h2>Quick Reference — Frontmatter Fields</h2>\n<h3>Core Fields (all concepts)</h3>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Required?</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>type</code></td>\n<td><strong>YES</strong></td>\n<td>Kind of concept (free-form string, e.g. <code>BigQuery Table</code>, <code>Metric</code>, <code>Playbook</code>, <code>Attested Computation</code>)</td>\n</tr>\n<tr>\n<td><code>title</code></td>\n<td>Recommended</td>\n<td>Human-readable display name</td>\n</tr>\n<tr>\n<td><code>description</code></td>\n<td>Recommended</td>\n<td>One-sentence summary</td>\n</tr>\n<tr>\n<td><code>resource</code></td>\n<td>Recommended</td>\n<td>URI identifying the underlying asset (omit for abstract concepts)</td>\n</tr>\n<tr>\n<td><code>tags</code></td>\n<td>Optional</td>\n<td>YAML list for cross-cutting categorization</td>\n</tr>\n</tbody>\n</table>\n<h3>Trust &amp; Lifecycle Fields (v0.2)</h3>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>generated</code></td>\n<td><code>{ by: &lt;actor&gt;, at: &lt;ISO8601&gt; }</code> — Who/what created this content and when</td>\n</tr>\n<tr>\n<td><code>verified</code></td>\n<td>List of <code>{ by: &lt;actor&gt;, at: &lt;ISO8601&gt; }</code> — Who confirmed correctness</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td><code>draft</code> | <code>stable</code> | <code>deprecated</code> — Default: <code>stable</code></td>\n</tr>\n<tr>\n<td><code>stale_after</code></td>\n<td>ISO 8601 datetime — Content is stale on/after this instant</td>\n</tr>\n</tbody>\n</table>\n<h3>Provenance Fields (v0.2)</h3>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>sources</code></td>\n<td>List of source entries (see below)</td>\n</tr>\n<tr>\n<td><code>usage_window</code></td>\n<td><code>{ from, to }</code> — Time range for <code>usage_count</code> signals</td>\n</tr>\n</tbody>\n</table>\n<p>Each <code>sources</code> entry:</p>\n<ul>\n<li><code>resource</code> (REQUIRED): URL, bundle-relative path, or scope descriptor</li>\n<li><code>id</code>: Stable key for footnote attribution</li>\n<li><code>title</code>: Human-readable label</li>\n<li><code>author</code>: Actor who produced the source</li>\n<li><code>usage_count</code>: How often exercised (liveness signal)</li>\n<li><code>last_modified</code>: When the source last changed</li>\n</ul>\n<h3>Attested Computation Fields (v0.2)</h3>\n<p>For concepts with <code>type: Attested Computation</code>:</p>\n<table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>runtime</code></td>\n<td>REQUIRED. How to run it: <code>bigquery</code>, <code>postgres</code>, <code>dbt</code>, <code>python</code>, <code>Looker</code></td>\n</tr>\n<tr>\n<td><code>parameters</code></td>\n<td>List of <code>{ name, type, required }</code> — Typed holes the agent fills</td>\n</tr>\n<tr>\n<td><code>computation</code></td>\n<td>Path to computation file (if not inline in body)</td>\n</tr>\n<tr>\n<td><code>executor</code></td>\n<td><code>{ resource, receipt: [...] }</code> — How to run and what evidence to capture</td>\n</tr>\n<tr>\n<td><code>attester</code></td>\n<td><code>{ resource }</code> — Deterministic code that verifies the receipt</td>\n</tr>\n</tbody>\n</table>\n<h3>Reserved Filenames</h3>\n<table>\n<thead>\n<tr>\n<th>File</th>\n<th>Purpose</th>\n<th>Has frontmatter?</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>index.md</code></td>\n<td>Directory listing for progressive disclosure</td>\n<td>NO*</td>\n</tr>\n<tr>\n<td><code>log.md</code></td>\n<td>Change history, newest first</td>\n<td>NO</td>\n</tr>\n</tbody>\n</table>\n<p>*Exception: bundle-root <code>index.md</code> MAY have frontmatter with <code>okf_version: \"0.2\"</code>.</p>\n<h3>Conventional Body Headings</h3>\n<table>\n<thead>\n<tr>\n<th>Heading</th>\n<th>When to use</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code># Schema</code></td>\n<td>Data assets — describe columns/fields</td>\n</tr>\n<tr>\n<td><code># Examples</code></td>\n<td>Show concrete usage (code blocks, queries)</td>\n</tr>\n<tr>\n<td><code># Computation</code></td>\n<td>Attested Computation — the sanctioned code/query</td>\n</tr>\n</tbody>\n</table>\n<hr>\n<h2>Actor Convention</h2>\n<p>Fields that record identity (<code>generated.by</code>, <code>verified[].by</code>, <code>sources[].author</code>) use:</p>\n<ul>\n<li><code>&lt;producer&gt;/&lt;version&gt;</code> for agents: <code>reference_agent/gemini-2.5-pro</code></li>\n<li><code>human:&lt;id&gt;</code> for people: <code>human:ahormati</code></li>\n<li><code>process:&lt;id&gt;</code> for automation: <code>process:finance-nightly</code></li>\n</ul>\n<p>Trust tiers are derived from the <code>human:</code> prefix — human-verified &gt; machine-confirmed &gt; unverified.</p>\n<hr>\n<h2>Trust Tiers</h2>\n<p>Consumers derive trust from the <code>verified</code> field:</p>\n<table>\n<thead>\n<tr>\n<th>Condition</th>\n<th>Trust Tier</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>No <code>verified</code> key</td>\n<td><strong>Unverified</strong></td>\n</tr>\n<tr>\n<td><code>verified</code> by non-<code>human:</code> actors only</td>\n<td><strong>Machine-confirmed</strong></td>\n</tr>\n<tr>\n<td><code>verified</code> by a <code>human:&lt;id&gt;</code> actor</td>\n<td><strong>Human-reviewed</strong></td>\n</tr>\n</tbody>\n</table>\n<p>Trust tiers are advisory signals, not access control.</p>\n<hr>\n<h2>Create a Bundle</h2>\n<p>When the user wants to create an OKF bundle from scratch:</p>\n<h3>1. Determine scope and structure</h3>\n<p>Ask: What knowledge are we capturing? (tables, metrics, APIs, playbooks, etc.)\nOrganize into a directory tree that makes sense for the domain.</p>\n<h3>2. Create concept documents</h3>\n<p>Each concept = one <code>.md</code> file. Minimal conformant example:</p>\n<pre><code>---\ntype: Metric\n---\n\n# Monthly Recurring Revenue (MRR)\n\nSum of all active subscriptions normalized to a monthly amount.\n</code></pre>\n<p>Full v0.2 example with provenance and trust:</p>\n<pre><code>---\ntype: Metric\ntitle: Monthly Recurring Revenue\ndescription: Sum of all active subscription revenue normalized to monthly.\ntags: [revenue, saas, kpi]\nstatus: stable\ngenerated: { by: human:ftelles, at: 2026-08-25T10:00:00Z }\nverified: { by: human:finance-lead, at: 2026-08-25T14:00:00Z }\nstale_after: 2026-12-31T00:00:00Z\nsources:\n  - id: stripe-docs\n    resource: https://stripe.com/docs/billing/subscriptions\n    title: Stripe Subscription Billing\n    author: team:stripe-docs\n    last_modified: 2026-06-01T00:00:00Z\n---\n\n# Monthly Recurring Revenue (MRR)\n\n## Definition\n\nSum of all active subscriptions normalized to a monthly amount.[^stripe-docs]\nExcludes one-time fees and overages.\n\n## Formula\n\n`MRR = Σ(active_subscription_monthly_value)`\n\n## Related\n\n- [Churn Rate](./churn.md) uses MRR as denominator\n- [ARR](./arr.md) = MRR × 12\n\n[^stripe-docs]: Stripe Subscription Billing\n</code></pre>\n<p>For more examples across domains, see <a href=\"references/examples.md\">references/examples.md</a>.</p>\n<h3>3. Cross-link concepts</h3>\n<p>Use standard markdown links. Two forms:</p>\n<ul>\n<li><strong>Absolute</strong> (bundle-relative, starts with <code>/</code>): <code>[customers](/tables/customers.md)</code> — <strong>preferred</strong> (stable when files move)</li>\n<li><strong>Relative</strong>: <code>[churn](./churn.md)</code></li>\n</ul>\n<p>Links assert relationships. The kind of relationship is conveyed by surrounding prose, not by the link syntax. Broken links are explicitly permitted — they represent knowledge not yet written.</p>\n<h3>4. Add provenance with footnotes (v0.2)</h3>\n<p>When claims reference external sources, use <code>sources</code> in frontmatter and footnotes in body:</p>\n<pre><code>sources:\n  - id: ga4-schema\n    resource: https://developers.google.com/analytics/bigquery/export-schema\n    title: GA4 BigQuery Export schema\n</code></pre>\n<pre><code>The `events_` table is sharded daily as `events_YYYYMMDD`.[^ga4-schema]\n\n[^ga4-schema]: GA4 BigQuery Export schema\n</code></pre>\n<h3>5. Generate index.md</h3>\n<p>Place in any directory for progressive disclosure. No frontmatter. Format:</p>\n<pre><code># Metrics\n\n- [MRR](./mrr.md) - Monthly recurring revenue\n- [Churn](./churn.md) - Monthly churn rate\n- [NPS](./nps.md) - Net Promoter Score\n</code></pre>\n<p>Entries should include the description from the linked concept's frontmatter.</p>\n<h3>6. Generate log.md (optional)</h3>\n<p>Chronological change history, newest first, ISO 8601 date headings:</p>\n<pre><code># Update Log\n\n## 2026-08-25\n- **Creation**: Added MRR, Churn, and NPS metrics.\n- **Creation**: Established directory structure.\n\n## 2026-08-20\n- **Initialization**: Bundle created.\n</code></pre>\n<h3>7. Declare version (optional)</h3>\n<p>Bundle-root <code>index.md</code> may include frontmatter declaring the spec version:</p>\n<pre><code>---\nokf_version: \"0.2\"\n---\n\n# My Knowledge Bundle\n\n- [Tables](./tables/) - Database tables\n- [Metrics](./metrics/) - Business KPIs\n</code></pre>\n<h3>8. Distribution</h3>\n<p>A bundle can be distributed as:</p>\n<ul>\n<li>A <strong>git repository</strong> (recommended — history, attribution, diffs)</li>\n<li>A tarball or zip archive</li>\n<li>A subdirectory within a larger repository</li>\n</ul>\n<h3>9. Verify conformance</h3>\n<p>Three rules — all must pass:</p>\n<ol>\n<li>Every non-reserved <code>.md</code> file has parseable YAML frontmatter</li>\n<li>Every frontmatter has a non-empty <code>type</code> field</li>\n<li>Reserved files (<code>index.md</code>, <code>log.md</code>) follow their defined structure when present</li>\n</ol>\n<hr>\n<h2>Create an Attested Computation (v0.2)</h2>\n<p>Attested Computations are concepts that carry not just what a value <em>means</em> but a sanctioned way to <em>compute</em> it. Use them when you need verifiable, reproducible calculations.</p>\n<h3>When to use</h3>\n<ul>\n<li>Financial metrics where compliance requires audit trails</li>\n<li>KPIs that must be computed consistently across reports</li>\n<li>Any calculation where \"did the sanctioned thing run\" matters</li>\n</ul>\n<h3>Structure</h3>\n<pre><code>---\ntype: Attested Computation\ntitle: Revenue for fiscal year\ndescription: Recognized revenue for a fiscal year, per Finance's definition.\nstatus: stable\nruntime: bigquery\nparameters:\n  - { name: year, type: integer, required: true }\nexecutor:\n  resource: references/skills/run-on-bq.md\n  receipt: [job_id, executed_sql, result]\nattester:\n  resource: references/attesters/revenue.py\ngenerated: { by: reference_agent/gemini-2.5-pro, at: 2026-06-20T22:53:05Z }\nverified: { by: human:ahormati, at: 2026-06-25T09:00:00Z }\nstale_after: 2026-09-23T00:00:00Z\nsources:\n  - id: rev-policy\n    resource: https://wiki.acme/finance/revenue-recognition\n    title: Revenue recognition policy\n---\n\n# Computation\n\n    SELECT SUM(amount) AS revenue\n    FROM finance.recognized_revenue\n    WHERE fiscal_year = @year\n\nThe computation binds only the declared `parameters`, per the recognition\npolicy.[^rev-policy]\n\n[^rev-policy]: Revenue recognition policy\n</code></pre>\n<h3>Key rules</h3>\n<ol>\n<li><strong>Agent fills parameters only</strong> — The agent supplies <em>values</em> for declared <code>parameters</code>, never edits the computation itself</li>\n<li><strong>Computation can be inline or external</strong> — Use <code># Computation</code> heading for inline, or <code>computation:</code> field for external file</li>\n<li><strong>Executor produces receipt</strong> — Evidence the attester inspects</li>\n<li><strong>Attester is deterministic</strong> — No LLM, just code that verifies the receipt</li>\n</ol>\n<h3>Linking to computations</h3>\n<p>Other concepts link to Attested Computations:</p>\n<pre><code>---\ntype: Metric\ntitle: Revenue\n---\n\n# Definition\n\nRecognized revenue for a fiscal year, computed by \n[the revenue computation](../computations/revenue.md).\n</code></pre>\n<hr>\n<h2>Validate a Bundle</h2>\n<h3>Preferred: okflint (when available)</h3>\n<p><a href=\"https://github.com/mattdav/okflint\">okflint</a> is a dedicated Python linter for OKF bundles with 18 rules across 3 tiers (OKF core, profile, hygiene). If installed, always prefer it over the built-in bash script.</p>\n<p><strong>Agent behavior:</strong> Before validating, check if okflint is installed (<code>command -v okflint</code>). If NOT installed, ask the user:</p>\n<blockquote>\n<p>\"okflint (linter dedicado para OKF com 18 regras, profiles via manifesto e suporte a wikilinks) não está instalado. Quer que eu instale? Opções:</p>\n<ol>\n<li><code>uv tool install okflint</code> (recomendado, isolado)</li>\n<li><code>pip install okflint</code></li>\n<li>Seguir sem ele (validação básica com o script bash embutido)\"</li>\n</ol>\n</blockquote>\n<p>If the user agrees to install:</p>\n<pre><code># Option 1: uv (recommended — installs isolated, no venv needed)\nuv tool install okflint\n\n# Option 2: pip (installs in current environment)\npip install okflint\n\n# Verify installation\nokflint --version\n</code></pre>\n<p>After installation (or if already available):</p>\n<pre><code># Full validation with manifest (if okf-base.yaml exists)\nif [ -f okf-base.yaml ]; then\n  okflint validate --manifest okf-base.yaml ./bundle/\nelse\n  # Core OKF validation only (no manifest needed)\n  okflint validate ./bundle/\nfi\n</code></pre>\n<p><strong>okflint advantages over the built-in script:</strong></p>\n<ul>\n<li>Manifest-driven profiles (enforce custom required fields, status vocabularies, per-type constraints)</li>\n<li>Wikilink resolution against full Obsidian vault</li>\n<li>JSON output (<code>--json</code>) for CI pipeline parsing</li>\n<li>Detects broken markdown links and ambiguous wikilinks</li>\n<li>Exit codes: <code>0</code> = pass, <code>1</code> = conformance failure, <code>2</code> = bad manifest</li>\n</ul>\n<h3>Fallback: built-in bash script</h3>\n<p>When okflint is not installed, use <a href=\"scripts/validate.sh\">scripts/validate.sh</a> which checks the 3 core conformance rules plus v0.2 fields.</p>\n<p>When asked to validate, check the 3 conformance rules. Report:</p>\n<pre><code>✅ PASS: 12/12 concept files have valid frontmatter with type field\n✅ PASS: index.md follows list structure (no frontmatter)\n✅ PASS: log.md uses ISO 8601 date headings, newest first\n\n⚠  WARNING: 3 files missing 'description' field (recommended)\n⚠  WARNING: 2 broken cross-links (permitted but worth noting)\nℹ  INFO: 5 files with trust fields (generated/verified)\nℹ  INFO: 2 Attested Computation concepts found\n</code></pre>\n<p>For a script-based check, see <a href=\"scripts/validate.sh\">scripts/validate.sh</a>.</p>\n<h3>Errors (conformance failures)</h3>\n<ul>\n<li><code>E1</code>: File <code>{path}</code> has no YAML frontmatter</li>\n<li><code>E2</code>: File <code>{path}</code> has frontmatter but no <code>type</code> field (or empty)</li>\n<li><code>E3</code>: Reserved file <code>{path}</code> has unexpected structure</li>\n<li><code>E4</code>: Attested Computation missing required <code>runtime</code> field</li>\n</ul>\n<h3>Warnings (non-blocking, spec allows these)</h3>\n<ul>\n<li><code>W1</code>: Missing recommended field <code>title</code> or <code>description</code></li>\n<li><code>W2</code>: Broken cross-link <code>{link}</code> in <code>{file}</code></li>\n<li><code>W3</code>: No <code>generated</code> field (v0.2 recommended)</li>\n<li><code>W4</code>: No <code>index.md</code> in directory <code>{dir}</code></li>\n<li><code>W5</code>: <code>log.md</code> dates not in ISO 8601 format</li>\n<li><code>W6</code>: <code>sources</code> entry missing <code>resource</code> field</li>\n<li><code>W7</code>: <code>stale_after</code> date has passed — content is stale</li>\n</ul>\n<p>Consumers MUST NOT reject a bundle because of: missing optional fields, unknown type values, unknown frontmatter keys, broken links, or missing index files.</p>\n<hr>\n<h2>Enrich Concepts</h2>\n<p>When the user has existing OKF concepts that need enrichment:</p>\n<h3>Add schema section</h3>\n<p>For data assets, add <code># Schema</code> with a columns table:</p>\n<pre><code># Schema\n\n| Column | Type | Description |\n|--------|------|-------------|\n| `order_id` | STRING | Unique identifier |\n| `customer_id` | STRING | FK to [customers](/tables/customers.md) |\n</code></pre>\n<h3>Add examples section</h3>\n<p>For APIs, queries, or tools, add <code># Examples</code> with fenced code blocks showing usage.</p>\n<h3>Add provenance (v0.2)</h3>\n<p>Add <code>sources</code> to frontmatter and footnotes to body for per-claim attribution:</p>\n<pre><code>sources:\n  - id: official-docs\n    resource: https://example.com/docs\n    title: Official Documentation\n    author: team:product-docs\n    last_modified: 2026-07-15T00:00:00Z\n</code></pre>\n<h3>Add trust signals (v0.2)</h3>\n<pre><code>generated: { by: reference_agent/gemini-2.5-pro, at: 2026-08-25T10:00:00Z }\nverified: { by: human:domain-expert, at: 2026-08-25T14:00:00Z }\nstatus: stable\nstale_after: 2026-12-31T00:00:00Z\n</code></pre>\n<h3>Add cross-links</h3>\n<p>Weave links into natural prose. Don't create a standalone \"links\" section — express relationships in context where they're meaningful.</p>\n<h3>Fill recommended fields</h3>\n<p>If <code>title</code>, <code>description</code>, <code>tags</code> are missing, add them. Derive values from body content when possible.</p>\n<h3>Enrichment workflow reference</h3>\n<p>The official enrichment agent follows this pattern — apply the same logic manually:</p>\n<ol>\n<li>Start with metadata-only docs (just frontmatter + minimal body)</li>\n<li>Add schema/structure from source system</li>\n<li>Add <code>sources</code> from authoritative documentation</li>\n<li>Weave cross-links based on discovered relationships (FKs, shared tags, join paths)</li>\n<li>Generate <code>index.md</code> files for progressive disclosure</li>\n<li>Add <code>generated</code> and optionally <code>verified</code> for trust tracking</li>\n</ol>\n<hr>\n<h2>Migrate v0.1 to v0.2</h2>\n<h3>Breaking changes to address</h3>\n<ol>\n<li><p><strong><code>timestamp</code> → <code>generated.at</code></strong></p>\n<pre><code># v0.1\ntimestamp: 2026-05-28T22:53:05Z\n\n# v0.2\ngenerated: { by: human:author, at: 2026-05-28T22:53:05Z }\n</code></pre>\n</li>\n<li><p><strong><code># Citations</code> → <code>sources</code></strong></p>\n<pre><code># v0.1 body\n# Citations\n[1] https://example.com/docs\n\n# v0.2 frontmatter\nsources:\n  - id: docs\n    resource: https://example.com/docs\n    title: Example Documentation\n</code></pre>\n</li>\n</ol>\n<h3>Migration script pattern</h3>\n<pre><code># For each .md file:\n# 1. Extract timestamp, convert to generated\n# 2. Parse # Citations, convert to sources\n# 3. Add footnotes in body for citations\n\n# Consumers MAY fall back to legacy fields when v0.2 fields absent\n</code></pre>\n<h3>Backward compatibility</h3>\n<p>v0.2 consumers SHOULD:</p>\n<ul>\n<li>Fall back to <code>timestamp</code> when <code>generated</code> is absent</li>\n<li>Parse legacy <code># Citations</code> when <code>sources</code> is absent</li>\n</ul>\n<hr>\n<h2>Convert Sources to OKF</h2>\n<p>For detailed conversion guides, see <a href=\"references/conversion.md\">references/conversion.md</a>.</p>\n<h3>Quick rules</h3>\n<p><strong>Notion export:</strong> Properties → frontmatter. Remove UUID suffixes from filenames. Convert Notion links → relative markdown links.</p>\n<p><strong>Obsidian vault:</strong> Convert <code>[[wikilinks]]</code> → <code>[title](./file.md)</code>. Ensure <code>type</code> field exists. Move inline <code>#tags</code> to frontmatter.</p>\n<p><strong>CSV/spreadsheet:</strong> Each row = one concept. Map columns to frontmatter fields. First column = filename.</p>\n<hr>\n<h2>Guardrails</h2>\n<ol>\n<li><strong>NEVER invent data.</strong> If you don't know the correct <code>type</code>, ask. If you don't have schema info, leave it out. No fabricated URLs or column names.</li>\n<li><strong>Preserve unknown fields.</strong> OKF explicitly allows extension. Don't delete fields you don't recognize.</li>\n<li><strong>Don't impose taxonomy.</strong> Type values are free-form strings. Suggest descriptive values but never reject a bundle for having unexpected types.</li>\n<li><strong>Broken links are OK.</strong> The spec explicitly permits them — they represent not-yet-written knowledge.</li>\n<li><strong>Minimal by default.</strong> Generate only <code>type</code> (required) + recommended fields that are warranted. Don't pad with empty values.</li>\n<li><strong>Ask before assuming.</strong> If the domain is unclear, ask what types and structure make sense.</li>\n<li><strong>Respect trust hierarchy.</strong> Only mark as <code>verified</code> by <code>human:</code> if actually human-reviewed. Don't fabricate verification.</li>\n<li><strong>Computation integrity.</strong> Never edit the computation in an Attested Computation concept — only fill parameters.</li>\n</ol>\n<hr>\n<h2>Serve via Google Cloud Knowledge Catalog</h2>\n<p>Google Cloud's Knowledge Catalog <strong>natively ingests OKF bundles</strong> and serves them to agents. This is the enterprise path — optional but powerful.</p>\n<h3>kcmd CLI (Metadata as Code)</h3>\n<p><code>kcmd</code> is a bidirectional sync tool between OKF-like local metadata and Knowledge Catalog. Think \"git for metadata.\"</p>\n<pre><code># Initialize from BigQuery dataset\nkcmd init --bigquery-dataset &lt;project&gt;.&lt;dataset&gt;\n\n# Pull current state from catalog\nkcmd pull\n\n# Push local changes\nkcmd push --dry-run\nkcmd push\n</code></pre>\n<p>Also ships as an <strong>MCP server</strong> for agent integration:</p>\n<pre><code>{\n  \"mcpServers\": {\n    \"kc-mac\": {\n      \"command\": \"kcmd\",\n      \"args\": [\"mcp\", \"--path\", \"/path/to/root\"]\n    }\n  }\n}\n</code></pre>\n<p>MCP tools: <code>pull</code>, <code>push</code>, <code>list-entries</code>, <code>lookup-entry</code>, <code>modify-entry</code>.</p>\n<h3>Reference Enrichment Agent</h3>\n<p>The official enrichment agent (Python, ADK, Gemini) auto-generates OKF bundles from BigQuery metadata. Two-pass architecture:</p>\n<ol>\n<li><strong>BQ pass</strong> — one OKF doc per table/view from metadata</li>\n<li><strong>Web pass</strong> — LLM crawls seed URLs and for each page decides to:\n<ul>\n<li><strong>(a) Enrich</strong> existing concepts with citations/schemas</li>\n<li><strong>(b) Mint</strong> a new <code>references/&lt;slug&gt;</code> doc</li>\n<li><strong>(c) Skip</strong> irrelevant content</li>\n</ul>\n</li>\n</ol>\n<p>Controls: <code>--web-seed-file</code>, <code>--web-max-pages</code>, <code>--web-allowed-host</code>, <code>--no-web</code>.</p>\n<h3>Visualizer</h3>\n<p>The reference agent includes a <code>visualize</code> subcommand that renders any OKF bundle as a self-contained interactive HTML file:</p>\n<pre><code>python -m reference_agent visualize --bundle ./bundles/&lt;name&gt;\n</code></pre>\n<p>Features:</p>\n<ul>\n<li>Force-directed graph of concepts with colored nodes by type</li>\n<li>Detail panel with frontmatter and rendered markdown</li>\n<li>\"Cited by\" backlinks</li>\n<li>Search and type filtering</li>\n</ul>\n<p><strong>When to mention this to users:</strong> If they're enriching BigQuery datasets, point them to the <a href=\"https://github.com/GoogleCloudPlatform/open-knowledge-format\">reference agent</a>. If they want enterprise catalog integration, point to kcmd.</p>\n<hr>\n<h2>Output Format</h2>\n<p>When creating a bundle, present results as:</p>\n<ol>\n<li><strong>Directory tree</strong> showing the full structure</li>\n<li><strong>Each file's content</strong> in fenced code blocks</li>\n<li><strong>Conformance check</strong> confirming the bundle passes the 3 rules</li>\n<li><strong>Trust summary</strong> (v0.2) showing verified/unverified counts</li>\n</ol>\n<pre><code>saas-metrics/\n├── index.md\n├── log.md\n├── metrics/\n│   ├── index.md\n│   ├── mrr.md\n│   ├── churn.md\n│   └── nps.md\n└── computations/\n    └── mrr-calculation.md\n</code></pre>\n<p>Then show each file, then confirm:</p>\n<pre><code>Bundle is OKF v0.2 conformant ✅\n- 4 concept files\n- 1 Attested Computation\n- 3 human-verified, 1 unverified\n- 0 stale concepts\n</code></pre>\n","files":[{"path":"references/conversion.md","sizeBytes":4230,"isText":true},{"path":"references/examples.md","sizeBytes":15780,"isText":true},{"path":"references/spec-v01.md","sizeBytes":15046,"isText":true},{"path":"references/spec-v02.md","sizeBytes":37743,"isText":true},{"path":"scripts/validate.sh","sizeBytes":8539,"isText":true},{"path":"SKILL.md","sizeBytes":22916,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-14T07:23:14.736567Z","sha256":"7918655FDC2CCA91DFFE8B3EA6A4D9DF2B32BB4913D58A9E0B33D9B5AB7367C1","sizeBytes":38689},"review":null,"source":{"repositoryUrl":"https://github.com/fabricioctelles/skills","path":"skills/okf-open-knowledge-format","license":"Apache-2.0","commit":"3b8da2cc1d5d13da7142560433b46b7ec3fc6988","subtreeSha":"B9C39DA717FB745A98A2D840E661965CB22330C95B9F56B6CEE29FC1908DF1A7","lastSyncedAt":"2026-09-26T23:11:53.149345Z"},"reviewedAt":"2026-09-14T07:23:32.838126Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/fabricioctelles/skills/tree/main/skills/okf-open-knowledge-format"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install fabricioctelles-skills@llmmart"},{"target":"git","command":"git clone https://github.com/fabricioctelles/skills.git"}]}