@stjbrown/agent-knowledge 0.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +44 -0
  3. package/README.md +212 -0
  4. package/dist/chunk-3XSOMUQQ.js +131 -0
  5. package/dist/chunk-3XSOMUQQ.js.map +1 -0
  6. package/dist/chunk-J4MELCGD.js +114 -0
  7. package/dist/chunk-J4MELCGD.js.map +1 -0
  8. package/dist/chunk-YIAVFL7A.js +1732 -0
  9. package/dist/chunk-YIAVFL7A.js.map +1 -0
  10. package/dist/headless.js +11 -0
  11. package/dist/headless.js.map +1 -0
  12. package/dist/index.js +16 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/main.js +373 -0
  15. package/dist/main.js.map +1 -0
  16. package/dist/tui-VZVO7UHV.js +521 -0
  17. package/dist/tui-VZVO7UHV.js.map +1 -0
  18. package/package.json +72 -0
  19. package/skills/kb/SKILL.md +54 -0
  20. package/skills/kb/example-bundle/concepts/customers.md +15 -0
  21. package/skills/kb/example-bundle/concepts/orders.md +19 -0
  22. package/skills/kb/example-bundle/index.md +20 -0
  23. package/skills/kb/example-bundle/log.md +6 -0
  24. package/skills/kb/example-bundle/spec/conventions.md +36 -0
  25. package/skills/kb/example-bundle/spec/types.md +23 -0
  26. package/skills/kb/references/SPEC.md +451 -0
  27. package/skills/kb/references/glossary.md +61 -0
  28. package/skills/kb/references/trust-model.md +79 -0
  29. package/skills/kb/templates/concept.md +22 -0
  30. package/skills/kb/templates/index.md +17 -0
  31. package/skills/kb/templates/log.md +13 -0
  32. package/skills/kb-ingest/SKILL.md +128 -0
  33. package/skills/kb-init/SKILL.md +79 -0
  34. package/skills/kb-lint/SKILL.md +77 -0
  35. package/skills/kb-lint/scripts/conformance.mjs +7537 -0
  36. package/skills/kb-query/SKILL.md +81 -0
  37. package/skills/kb-visualize/SKILL.md +72 -0
  38. package/skills/kb-visualize/scripts/graph.mjs +7520 -0
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: kb
3
+ description: >-
4
+ Portable OKF knowledge bundle for coding-agent memory and LLM wikis. Use when the user wants to
5
+ start a wiki, ingest a source, query project knowledge with citations, lint for drift, or
6
+ visualize connections; whenever a repo has a knowledge/ bundle that should inform the task; and
7
+ when another kb-* skill needs the shared spec, glossary, templates, or trust model.
8
+ version: 0.1.0
9
+ tags: [knowledge, okf, bundle, hub]
10
+ ---
11
+
12
+ # kb — bundles
13
+
14
+ **Hub** for the `kb-*` family: vocabulary, shared reference, routing. Knowledge **compounds** —
15
+ compiled once, kept current, not re-derived per query. Does not modify a bundle — routes to the
16
+ skill that does.
17
+
18
+ ## Key terms
19
+
20
+ [references/glossary.md](references/glossary.md) defines the vocabulary. Minimum before routing:
21
+ **Bundle**, **Ingest**, **Progressive disclosure**, **Trust model** (see
22
+ [trust-model.md](references/trust-model.md)).
23
+
24
+ ## The one hard rule
25
+
26
+ A bundle is **conformant** iff every non-reserved `.md` file has parseable YAML frontmatter with a
27
+ non-empty `type`. Everything else is soft guidance — consumers MUST tolerate missing optional fields,
28
+ unknown types, and broken links. Never reject a bundle over them. Full rules:
29
+ [references/SPEC.md](references/SPEC.md) §9.
30
+
31
+ ## Route to the right skill
32
+
33
+ | The user wants to… | Use |
34
+ |---|---|
35
+ | Start a new bundle | [`kb-init`](../kb-init/SKILL.md) |
36
+ | Capture, ingest, file, or process a source (note, transcript, PDF, image, URL) | [`kb-ingest`](../kb-ingest/SKILL.md) |
37
+ | Ask what the bundle knows; look something up; explore connections | [`kb-query`](../kb-query/SKILL.md) |
38
+ | Health-check the bundle (**drift**, orphans, contradictions, conformance) | [`kb-lint`](../kb-lint/SKILL.md) |
39
+ | See the bundle as a graph | [`kb-visualize`](../kb-visualize/SKILL.md) |
40
+
41
+ If a `knowledge/` bundle exists and would inform the current task, consult it via
42
+ [`kb-query`](../kb-query/SKILL.md) before answering from scratch — even when the user didn't ask an
43
+ explicit knowledge question.
44
+
45
+ ## Shared reference (single source of truth)
46
+
47
+ Every `kb-*` skill reads these rather than restating them, so the family stays consistent:
48
+
49
+ - [references/SPEC.md](references/SPEC.md) — OKF v0.1, vendored verbatim.
50
+ - [references/glossary.md](references/glossary.md) — leading words and definitions.
51
+ - [references/trust-model.md](references/trust-model.md) — the maintenance rules.
52
+ - [templates/](templates/) — `concept.md`, `index.md`, `log.md` starters.
53
+ - [example-bundle/](example-bundle/) — a tiny conformant bundle: a worked example, and the seed
54
+ `kb-init` copies from.
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: customer
3
+ title: Customers
4
+ description: The people and organizations that place orders.
5
+ tags: [sales]
6
+ timestamp: 2026-01-01T00:00:00Z
7
+ ---
8
+
9
+ Customers are the accounts that place [orders](orders.md). Each customer has a stable `customer_id`
10
+ used as the join key from the orders concept.
11
+
12
+ # Examples
13
+
14
+ - `cust_001` — Acme Corp, enterprise account.
15
+ - `cust_002` — Jane Diaz, individual.
@@ -0,0 +1,19 @@
1
+ ---
2
+ type: order
3
+ title: Orders
4
+ description: Purchases placed by customers.
5
+ tags: [sales, revenue]
6
+ timestamp: 2026-01-01T00:00:00Z
7
+ ---
8
+
9
+ Orders are purchases placed by [customers](customers.md), joined on `customer_id`. Revenue is the
10
+ sum of order totals across successful orders.
11
+
12
+ # Schema
13
+
14
+ | Field | Type | Description |
15
+ |---|---|---|
16
+ | `order_id` | string | Unique order identifier. |
17
+ | `customer_id` | string | The [customer](customers.md) who placed the order. |
18
+ | `total_usd` | number | Order total in US dollars. |
19
+ | `status` | string | `success`, `pending`, or `refunded`. |
@@ -0,0 +1,20 @@
1
+ ---
2
+ okf_version: "0.1"
3
+ ---
4
+
5
+ # Example Knowledge Bundle
6
+
7
+ A tiny, fully conformant OKF bundle — a worked example of the format and the seed `kb-init` copies
8
+ when scaffolding a new bundle. Replace this content with your domain.
9
+
10
+ ## Spec
11
+
12
+ How this bundle is organized (its schema layer — read this first when maintaining it).
13
+
14
+ * [Concept Types](spec/types.md) - the `type` vocabulary this bundle uses.
15
+ * [Conventions](spec/conventions.md) - folder taxonomy and ingest/maintenance conventions.
16
+
17
+ ## Concepts
18
+
19
+ * [Customers](concepts/customers.md) - the people who place orders.
20
+ * [Orders](concepts/orders.md) - what customers buy.
@@ -0,0 +1,6 @@
1
+ # Log
2
+
3
+ ## 2026-01-01
4
+
5
+ **Creation** — Seeded the example bundle: [types](spec/types.md), [conventions](spec/conventions.md),
6
+ and the [customers](concepts/customers.md) and [orders](concepts/orders.md) concepts.
@@ -0,0 +1,36 @@
1
+ ---
2
+ type: Spec Section
3
+ title: Conventions
4
+ description: Folder taxonomy and ingest/maintenance conventions for this bundle.
5
+ tags: [schema, meta]
6
+ timestamp: 2026-01-01T00:00:00Z
7
+ ---
8
+
9
+ # Conventions
10
+
11
+ How this bundle is structured and maintained. The `kb-*` skills read this to fit themselves to the
12
+ domain.
13
+
14
+ ## Folder taxonomy
15
+
16
+ - `concepts/` — the domain entities (`customer`, `order`).
17
+ - `spec/` — this schema layer ([types](types.md) + conventions).
18
+ - `references/` — mirrored external sources as `type: Reference` concepts (none yet).
19
+
20
+ ## Naming
21
+
22
+ Lowercase, underscores for multi-word filenames. A concept's filename is its identity; keep it
23
+ stable (supersede rather than rename when meaning changes).
24
+
25
+ ## Ingest routing
26
+
27
+ When ingesting a source, extract entities and route them: people → `concepts/` as `customer`;
28
+ purchases → `concepts/` as `order`; the source document itself → `references/` as `Reference`, cited
29
+ by whatever it supports.
30
+
31
+ ## Maintenance
32
+
33
+ Follow the trust model (see the `kb` skill's `references/trust-model.md`): append-only on meaning,
34
+ supersede with provenance, `conflicts_with` over silent overwrite, events additive, every change
35
+ logged. Keep each directory's `index.md` current; regenerate any `_overview` after its children
36
+ change.
@@ -0,0 +1,23 @@
1
+ ---
2
+ type: Spec Section
3
+ title: Concept Types
4
+ description: The type vocabulary this bundle uses.
5
+ tags: [schema, meta]
6
+ timestamp: 2026-01-01T00:00:00Z
7
+ ---
8
+
9
+ # Concept Types
10
+
11
+ The `type` values used by concepts in this bundle. OKF requires only that `type` be non-empty; this
12
+ list is *this bundle's* convention, so the `kb-*` skills route consistently. Extend it as the domain
13
+ grows.
14
+
15
+ | type | Meaning | Lives in |
16
+ |---|---|---|
17
+ | `Spec Section` | A rule about how this bundle is organized (like this file). | `spec/` |
18
+ | `customer` | A person or org that places orders. | `concepts/` |
19
+ | `order` | A purchase made by a customer. | `concepts/` |
20
+ | `Reference` | A mirror of external source material (points at it via `resource`). | `references/` |
21
+
22
+ Replace these with your own domain's entities (e.g. `person`, `deal`, `metric`, `character`,
23
+ `chapter`).
@@ -0,0 +1,451 @@
1
+ # Open Knowledge Format (OKF)
2
+
3
+ **Version 0.1 — Draft**
4
+
5
+ OKF is an open, human- and agent-friendly format for representing
6
+ *knowledge* — the metadata, context, and curated insight that surrounds
7
+ data and systems. It is designed to be authored by people, generated by
8
+ agents, exchanged across organizations, and consumed by both.
9
+
10
+ The format is intentionally minimal: a directory of markdown files with
11
+ YAML frontmatter. There is no schema registry, no central authority, and
12
+ no required tooling. If you can `cat` a file, you can read OKF; if you
13
+ can `git clone` a repo, you can ship it.
14
+
15
+ ---
16
+
17
+ ## 1. Motivation
18
+
19
+ The space of knowledge representation for AI agents is evolving quickly,
20
+ and many incompatible conventions are emerging. OKF takes the position
21
+ that knowledge is best represented in commonly accessible, established
22
+ formats that are:
23
+
24
+ - **Readable** by humans without tooling.
25
+ - **Parseable** by agents without bespoke SDKs.
26
+ - **Diffable** in version control.
27
+ - **Portable** across tools, organizations, and time.
28
+
29
+ The format is minimally opinionated. It standardizes only the small set
30
+ of structural conventions needed to make a knowledge corpus
31
+ *self-describing* — anything beyond that is left to the producer.
32
+
33
+ ### Goals
34
+
35
+ 1. Define a universal format that **enrichment agents** can write into.
36
+ 2. Inform how **consumption agents** should read and traverse it.
37
+ 3. Facilitate **exchange** of knowledge across systems and organizations.
38
+ 4. Standardize the small number of **required** fields that must be
39
+ present for content to be meaningfully consumed.
40
+
41
+ ### Non-goals
42
+
43
+ - Defining a fixed taxonomy of concept types.
44
+ - Prescribing storage, serving, or query infrastructure.
45
+ - Replacing domain-specific schemas (Avro, Protobuf, OpenAPI, etc.) —
46
+ OKF *references* them; it does not subsume them.
47
+
48
+ ---
49
+
50
+ ## 2. Terminology
51
+
52
+ - **Knowledge Bundle** — A self-contained, hierarchical collection of
53
+ knowledge documents. The unit of distribution.
54
+ - **Concept** — A single unit of knowledge within a bundle. Represented
55
+ as one markdown document. May describe a tangible asset (a table, an
56
+ API), an abstract idea (a metric, a business process), or anything in
57
+ between.
58
+ - **Concept ID** — The path of the concept's file within the bundle,
59
+ with the `.md` suffix removed. For example, `tables/users.md` has
60
+ concept ID `tables/users`.
61
+ - **Frontmatter** — YAML metadata block delimited by `---` at the top of
62
+ a markdown file.
63
+ - **Body** — Everything in the file after the frontmatter.
64
+ - **Link** — A standard markdown link from one concept to another, used
65
+ to express relationships beyond the implicit parent/child hierarchy.
66
+ - **Citation** — A link from a concept to an external source that
67
+ supports a claim in the body.
68
+
69
+ ---
70
+
71
+ ## 3. Bundle Structure
72
+
73
+ A bundle is a directory tree of markdown files. The directory structure
74
+ is independent of the domain — producers organize concepts however makes
75
+ sense for the knowledge being captured.
76
+
77
+ ```
78
+ path/to/bundle/
79
+ ├── index.md # Optional. Directory listing for progressive disclosure.
80
+ ├── log.md # Optional. Chronological history of updates.
81
+ ├── <concept>.md # A concept at the bundle root.
82
+ └── <subdirectory>/ # Subdirectories organize concepts into groups.
83
+ ├── index.md
84
+ ├── <concept>.md
85
+ └── <subdirectory>/
86
+ └── …
87
+ ```
88
+
89
+ A bundle MAY be distributed as:
90
+
91
+ - A git repository (recommended — provides history, attribution, diffs).
92
+ - A tarball or zip archive of the directory.
93
+ - A subdirectory within a larger repository.
94
+
95
+ ### 3.1 Reserved filenames
96
+
97
+ The following filenames have defined meaning at any level of the
98
+ hierarchy and MUST NOT be used for concept documents:
99
+
100
+ | Filename | Purpose |
101
+ |--------------|--------------------------------------------------------|
102
+ | `index.md` | Directory listing. See §6. |
103
+ | `log.md` | Update history. See §7. |
104
+
105
+ All other `.md` files are concept documents.
106
+
107
+ Tags themselves remain a first-class concept — see the `tags`
108
+ frontmatter field in §4.1. OKF does not specify a separate file format
109
+ for aggregating documents by tag; producers that want a tag-browsing
110
+ view can synthesize one at consumption time by scanning frontmatter.
111
+
112
+ ---
113
+
114
+ ## 4. Concept Documents
115
+
116
+ Every concept is a UTF-8 markdown file. It has two parts:
117
+
118
+ 1. A **YAML frontmatter block**, delimited by `---` on its own line at
119
+ the start of the file and a closing `---` on its own line.
120
+ 2. A **markdown body**, containing free-form content.
121
+
122
+ ### 4.1 Frontmatter
123
+
124
+ ```yaml
125
+ ---
126
+ type: <Type name> # REQUIRED
127
+ title: <Optional display name>
128
+ description: <Optional one-line summary>
129
+ resource: <Optional canonical URI for the underlying asset>
130
+ tags: [<tag>, <tag>, …] # Optional
131
+ timestamp: <ISO 8601 datetime> # Optional last-modified time
132
+ # … other producer-defined key/value pairs
133
+ ---
134
+ ```
135
+
136
+ **Required:**
137
+
138
+ - `type` — A short string identifying the kind of concept. Consumers
139
+ use this for routing, filtering, and presentation. Example values:
140
+ `BigQuery Table`, `BigQuery Dataset`, `API Endpoint`, `Metric`,
141
+ `Playbook`, `Reference`.
142
+
143
+ Type values are **not** registered centrally. Producers SHOULD pick
144
+ values that are descriptive and self-explanatory; consumers MUST
145
+ tolerate unknown types gracefully (typically by treating them as
146
+ generic concepts).
147
+
148
+ **Recommended (in priority order):**
149
+
150
+ - `title` — Human-readable display name. If omitted, consumers MAY
151
+ derive a title from the filename.
152
+ - `description` — A single sentence summarizing the concept. Used by
153
+ `index.md` generators, search snippets, and previews.
154
+ - `resource` — A URI that uniquely identifies the underlying asset the
155
+ concept describes. Absent for concepts that describe abstract ideas
156
+ rather than physical resources.
157
+ - `tags` — A YAML list of short strings for cross-cutting categorization.
158
+ - `timestamp` — ISO 8601 datetime of last meaningful change.
159
+
160
+ **Extensions:** Producers MAY include any additional keys. Consumers
161
+ SHOULD preserve unknown keys when round-tripping and SHOULD NOT reject
162
+ documents with unrecognized fields.
163
+
164
+ ### 4.2 Body
165
+
166
+ The body is standard markdown. Producers SHOULD favor structural
167
+ markdown — headings, lists, tables, fenced code blocks — over freeform
168
+ prose, since structure aids both human reading and agent retrieval.
169
+
170
+ There are no required body sections. The following section headings have
171
+ **conventional** meaning and SHOULD be used when applicable:
172
+
173
+ | Heading | Purpose |
174
+ |----------------|--------------------------------------------------------|
175
+ | `# Schema` | Structured description of an asset's columns/fields. |
176
+ | `# Examples` | Concrete usage examples, often as fenced code blocks. |
177
+ | `# Citations` | External sources backing claims in the body. See §8. |
178
+
179
+ ### 4.3 Example: a concept bound to a resource
180
+
181
+ ```markdown
182
+ ---
183
+ type: BigQuery Table
184
+ title: Customer Orders
185
+ description: One row per completed customer order across all channels.
186
+ resource: https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders
187
+ tags: [sales, orders, revenue]
188
+ timestamp: 2026-05-28T14:30:00Z
189
+ ---
190
+
191
+ # Schema
192
+
193
+ | Column | Type | Description |
194
+ |---------------|-----------|------------------------------------------|
195
+ | `order_id` | STRING | Globally unique order identifier. |
196
+ | `customer_id` | STRING | Foreign key into [customers](/tables/customers.md). |
197
+ | `total_usd` | NUMERIC | Order total in US dollars. |
198
+ | `placed_at` | TIMESTAMP | When the customer submitted the order. |
199
+
200
+ # Joins
201
+
202
+ Joined with [customers](/tables/customers.md) on `customer_id`.
203
+
204
+ # Citations
205
+
206
+ [1] [BigQuery table schema](https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders)
207
+ ```
208
+
209
+ ### 4.4 Example: a concept not bound to a resource
210
+
211
+ ```markdown
212
+ ---
213
+ type: Playbook
214
+ title: Incident response — data freshness alert
215
+ description: Steps to triage a freshness alert on the orders pipeline.
216
+ tags: [oncall, incident]
217
+ timestamp: 2026-04-12T09:00:00Z
218
+ ---
219
+
220
+ # Trigger
221
+
222
+ A freshness alert fires when `orders` lags more than 30 minutes behind
223
+ its expected SLA. See the [orders table](/tables/orders.md).
224
+
225
+ # Steps
226
+
227
+ 1. Check the [ingestion job dashboard](https://example.com/dash).
228
+ 2. …
229
+ ```
230
+
231
+ ---
232
+
233
+ ## 5. Cross-linking
234
+
235
+ Concepts MAY link to other concepts using standard markdown links. Two
236
+ forms are supported:
237
+
238
+ ### 5.1 Absolute (bundle-relative) links
239
+
240
+ Begin with `/`, interpreted relative to the bundle root.
241
+
242
+ ```markdown
243
+ See the [customers table](/tables/customers.md) for the join key.
244
+ ```
245
+
246
+ This is the **recommended** form because it is stable when documents are
247
+ moved within their subdirectory.
248
+
249
+ ### 5.2 Relative links
250
+
251
+ Standard markdown relative paths.
252
+
253
+ ```markdown
254
+ See the [neighboring concept](./other.md).
255
+ ```
256
+
257
+ ### 5.3 Link semantics
258
+
259
+ A link from concept A to concept B asserts a *relationship*. The
260
+ specific kind of relationship (parent/child, references, joins-with,
261
+ depends-on, etc.) is conveyed by the surrounding prose, not by the link
262
+ itself. Consumers that build a graph view typically treat all links as
263
+ directed edges of an untyped relationship.
264
+
265
+ Consumers MUST tolerate broken links — a link whose target does not
266
+ exist in the bundle is not malformed; it may simply represent
267
+ not-yet-written knowledge.
268
+
269
+ ---
270
+
271
+ ## 6. Index Files
272
+
273
+ An `index.md` file MAY appear in any directory, including the bundle
274
+ root. It enumerates the directory's contents to support **progressive
275
+ disclosure** — letting a human or agent see what is available before
276
+ opening individual documents.
277
+
278
+ Index files contain no frontmatter. The body uses one or more sections,
279
+ each grouping concepts under a heading:
280
+
281
+ ```markdown
282
+ # Section / Group Heading
283
+
284
+ * [Title 1](relative-url-1) - short description of item 1
285
+ * [Title 2](relative-url-2) - short description of item 2
286
+
287
+ # Another Section
288
+
289
+ * [Subdirectory](subdir/) - short description of the subdirectory
290
+ ```
291
+
292
+ Entries SHOULD include the description from the linked concept's
293
+ frontmatter. Producers MAY generate `index.md` automatically; consumers
294
+ MAY synthesize one on the fly when none is present.
295
+
296
+ ---
297
+
298
+ ## 7. Log Files (optional)
299
+
300
+ A `log.md` file MAY appear at any level of the hierarchy to record the
301
+ history of changes to that scope. The format is a flat list of
302
+ date-grouped entries, newest first:
303
+
304
+ ```markdown
305
+ # Directory Update Log
306
+
307
+ ## 2026-05-22
308
+ * **Update**: Added new BigQuery table reference for [Customer Metrics](/tables/customer-metrics.md).
309
+ * **Creation**: Established the [Dataplex Playbook](/playbooks/dataplex.md).
310
+
311
+ ## 2026-05-15
312
+ * **Initialization**: Created foundational directory structure.
313
+ * **Update**: Added progressive-disclosure guidelines to the root [index](/index.md).
314
+ ```
315
+
316
+ Date headings MUST use ISO 8601 `YYYY-MM-DD` form. Log entries are
317
+ prose; the leading bold word (`**Update**`, `**Creation**`,
318
+ `**Deprecation**`, etc.) is a convention, not a requirement.
319
+
320
+ ---
321
+
322
+ ## 8. Citations
323
+
324
+ When a concept's body makes claims sourced from external material,
325
+ those sources SHOULD be listed under a `# Citations` heading at the
326
+ bottom of the document, numbered:
327
+
328
+ ```markdown
329
+ # Citations
330
+
331
+ [1] [BigQuery public dataset announcement](https://cloud.google.com/blog/products/data-analytics/...)
332
+ [2] [Internal data quality runbook](https://wiki.acme.internal/data/quality)
333
+ ```
334
+
335
+ Citation links MAY be absolute URLs, bundle-relative paths, or paths
336
+ into a `references/` subdirectory that mirrors external material as
337
+ first-class OKF concepts.
338
+
339
+ ---
340
+
341
+ ## 9. Conformance
342
+
343
+ A bundle is **conformant** with OKF v0.1 if:
344
+
345
+ 1. Every non-reserved `.md` file in the tree contains a parseable YAML
346
+ frontmatter block.
347
+ 2. Every frontmatter block contains a non-empty `type` field.
348
+ 3. Every reserved filename (`index.md`, `log.md`) follows the structure
349
+ described in §6 and §7 respectively when present.
350
+
351
+ Consumers SHOULD treat all other constraints as soft guidance. In
352
+ particular, consumers MUST NOT reject a bundle because of:
353
+
354
+ - Missing optional frontmatter fields.
355
+ - Unknown `type` values.
356
+ - Unknown additional frontmatter keys.
357
+ - Broken cross-links.
358
+ - Missing `index.md` files.
359
+
360
+ This permissive consumption model is intentional: OKF is meant to
361
+ remain useful as bundles grow, get refactored, and are partially
362
+ generated by agents.
363
+
364
+ ---
365
+
366
+ ## 10. Relationship to other formats
367
+
368
+ OKF is intentionally close to several established patterns:
369
+
370
+ - **LLM "wiki" repositories** that use markdown + frontmatter as
371
+ agent-readable knowledge bases.
372
+ - **Personal knowledge tools** like Obsidian and Notion, which use
373
+ hierarchical markdown with cross-links.
374
+ - **"Metadata as code"** approaches that store catalog metadata
375
+ alongside source code rather than in a separate registry.
376
+
377
+ OKF differs primarily in being **specified** — pinning down the small
378
+ set of rules needed for interoperability without dictating tooling.
379
+
380
+ ---
381
+
382
+ ## 11. Versioning
383
+
384
+ This document specifies OKF version **0.1**. Future revisions will be
385
+ versioned in the form `<major>.<minor>`:
386
+
387
+ - A **minor** version bump introduces backward-compatible additions
388
+ (new optional fields, new conventional section headings).
389
+ - A **major** version bump may make breaking changes (renaming required
390
+ fields, changing reserved filenames).
391
+
392
+ Bundles MAY declare the OKF version they target by including
393
+ `okf_version: "0.1"` in a bundle-root `index.md` frontmatter block (the
394
+ only place frontmatter is permitted in an `index.md`). Consumers that
395
+ do not understand the declared version SHOULD attempt best-effort
396
+ consumption rather than refusing the bundle.
397
+
398
+ ---
399
+
400
+ ## Appendix A — Minimal example bundle
401
+
402
+ ```
403
+ my_bundle/
404
+ ├── index.md
405
+ ├── datasets/
406
+ │ ├── index.md
407
+ │ └── sales.md
408
+ └── tables/
409
+ ├── index.md
410
+ ├── orders.md
411
+ └── customers.md
412
+ ```
413
+
414
+ `datasets/sales.md`:
415
+
416
+ ```markdown
417
+ ---
418
+ type: BigQuery Dataset
419
+ title: Sales
420
+ description: All sales-related tables for the retail business.
421
+ resource: https://console.cloud.google.com/bigquery?p=acme&d=sales
422
+ tags: [sales]
423
+ timestamp: 2026-05-28T00:00:00Z
424
+ ---
425
+
426
+ The sales dataset contains transactional tables, including
427
+ [orders](/tables/orders.md) and [customers](/tables/customers.md).
428
+ ```
429
+
430
+ `tables/orders.md`:
431
+
432
+ ```markdown
433
+ ---
434
+ type: BigQuery Table
435
+ title: Orders
436
+ description: One row per completed customer order.
437
+ resource: https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders
438
+ tags: [sales, orders]
439
+ timestamp: 2026-05-28T00:00:00Z
440
+ ---
441
+
442
+ # Schema
443
+
444
+ | Column | Type | Description |
445
+ |---------------|-----------|------------------------------|
446
+ | `order_id` | STRING | Unique order identifier. |
447
+ | `customer_id` | STRING | FK to [customers](/tables/customers.md). |
448
+ | `total_usd` | NUMERIC | Order total in USD. |
449
+
450
+ Part of the [sales dataset](/datasets/sales.md).
451
+ ```
@@ -0,0 +1,61 @@
1
+ # Glossary
2
+
3
+ The vocabulary of the `kb-*` skills and OKF. Terms are **leading words** — reused verbatim across
4
+ skills, prompts, and a bundle's own concept names so the shared language makes both execution and
5
+ invocation reliable.
6
+
7
+ ## Structure
8
+
9
+ - **Bundle (knowledge bundle)** — a directory tree of markdown concepts, the unit of production and
10
+ exchange. OKF's own term for the `knowledge/` package. May be shipped as a git repo, an archive,
11
+ or a subdirectory of a larger repo. A project MAY contain several bundles under one `knowledge/`
12
+ folder, each self-contained, with a top-level `knowledge/index.md` cataloging them.
13
+ - **Concept** — one markdown file: one idea, entity, asset, or claim. Has a YAML frontmatter block
14
+ and a markdown body.
15
+ - **Concept ID** — a concept's path within the bundle with `.md` removed (`people/jane.md` →
16
+ `people/jane`). How concepts are referenced.
17
+ - **Reserved files** — `index.md` (directory listing) and `log.md` (change history). Not concepts;
18
+ carry no frontmatter (except the root `index.md`, which may declare `okf_version`).
19
+ - **Schema layer** — the bundle's domain rules: its `type` vocabulary, folder taxonomy, naming, and
20
+ ingest routing conventions. Lives in `spec/` (as OKF concepts) so generic `kb-*` skills read it and
21
+ fit any domain. What [kb-init](../../kb-init/SKILL.md) writes; what makes a bundle portable.
22
+
23
+ ## Frontmatter
24
+
25
+ - **type** *(required)* — a short, producer-chosen string naming the kind of concept (e.g. `person`,
26
+ `deal`, `metric`, `Reference`). The only required field.
27
+ - **Recommended** — `title`, `description`, `resource` (a canonical URI, for concepts bound to a real
28
+ asset), `tags`, `timestamp` (ISO 8601).
29
+ - **Extension keys** — any additional keys are allowed and preserved. The trust model uses
30
+ `status`, `supersedes`, `superseded_by`, `conflicts_with`.
31
+
32
+ ## Content types
33
+
34
+ - **Reference** — a concept (`type: Reference`) that mirrors external **source** material and points
35
+ at it via `resource`, keeping the source *in* the bundle. Distinct from synthesis: a Reference is
36
+ a faithful pointer + extract, not our opinion.
37
+ - **Synthesis** — a concept that is *our* analysis, comparison, or roll-up. It cites references; it
38
+ is not one.
39
+ - **Overview** — a synthesized roll-up of a section, regenerated from its child concepts.
40
+
41
+ ## Navigation
42
+
43
+ - **Progressive disclosure** — read `index.md` first, follow section indexes, then follow
44
+ cross-links only into relevant concepts. Scales to hundreds of concepts with no embeddings; add a
45
+ search tool only when a bundle outgrows it.
46
+ - **Cross-link** — a standard markdown link from one concept to another; a directed, untyped edge
47
+ whose meaning is carried by the surrounding prose. Prefer **relative** links (they render
48
+ everywhere, including GitHub, when the bundle is nested).
49
+ - **Compounding** — the property that makes the effort worthwhile: every ingested source and every
50
+ filed-back answer makes the bundle richer, rather than being re-derived per query.
51
+
52
+ ## Maintenance (trust model)
53
+
54
+ - **Ingest** — read a raw source, extract its signal, and integrate it across the bundle.
55
+ - **Supersede** — replace a claim by writing a *new* concept and marking the old one
56
+ `status: superseded` with `superseded_by`, keeping it on disk for history. Never rewrite a claim
57
+ in place.
58
+ - **Conflict** — when new information merely disagrees, link the two with `conflicts_with` and keep
59
+ both active; do not silently pick a winner.
60
+ - **Drift** — the decay a compounding bundle accumulates (stale claims, orphans, contradictions,
61
+ missing links). What [kb-lint](../../kb-lint/SKILL.md) fights.