okf 2.0.0 → 2.1.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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/.okf/capabilities/agent-skill.md +112 -0
  3. data/.okf/capabilities/bundles-manager.md +133 -0
  4. data/.okf/capabilities/graph-server.md +678 -0
  5. data/.okf/capabilities/index.md +26 -0
  6. data/.okf/capabilities/library-api.md +82 -0
  7. data/.okf/capabilities/linter.md +83 -0
  8. data/.okf/capabilities/read-views.md +228 -0
  9. data/.okf/capabilities/render.md +66 -0
  10. data/.okf/capabilities/search.md +295 -0
  11. data/.okf/capabilities/validator.md +60 -0
  12. data/.okf/cli.md +193 -0
  13. data/.okf/design/browser-tests.md +211 -0
  14. data/.okf/design/core-shell-split.md +73 -0
  15. data/.okf/design/index.md +17 -0
  16. data/.okf/design/integration-first.md +140 -0
  17. data/.okf/design/packaging.md +65 -0
  18. data/.okf/design/ruby-floor.md +53 -0
  19. data/.okf/design/runtime-dependencies.md +82 -0
  20. data/.okf/design/search-engines.md +154 -0
  21. data/.okf/design/server-trust-boundary.md +139 -0
  22. data/.okf/index.md +40 -0
  23. data/.okf/log.md +662 -0
  24. data/.okf/model/bundle.md +47 -0
  25. data/.okf/model/concept.md +75 -0
  26. data/.okf/model/graph.md +59 -0
  27. data/.okf/model/index.md +9 -0
  28. data/.okf/model/skeleton.md +76 -0
  29. data/.okf/overview.md +87 -0
  30. data/.okf/registry.md +265 -0
  31. data/.okf/structure/format-layer.md +59 -0
  32. data/.okf/structure/index.md +22 -0
  33. data/.okf/structure/search.md +53 -0
  34. data/.okf/structure/the-analysers.md +60 -0
  35. data/.okf/structure/the-cli.md +99 -0
  36. data/.okf/structure/the-disk-shell.md +67 -0
  37. data/.okf/structure/the-model.md +81 -0
  38. data/.okf/structure/the-server.md +74 -0
  39. data/.okf/structure/the-skill.md +52 -0
  40. data/.okf/testing/adding-a-verb.md +76 -0
  41. data/.okf/testing/index.md +12 -0
  42. data/.okf/testing/the-harness.md +45 -0
  43. data/CHANGELOG.md +83 -16
  44. data/README.md +205 -21
  45. data/lib/okf/cli.rb +20 -2
  46. data/lib/okf/skill/SKILL.md +15 -7
  47. data/lib/okf/skill/playbooks/maintain.md +3 -1
  48. data/lib/okf/skill/playbooks/produce.md +4 -2
  49. data/lib/okf/skill/reference/authoring.md +23 -26
  50. data/lib/okf/skill/reference/cli/checks.md +171 -0
  51. data/lib/okf/skill/reference/cli/graph.md +49 -0
  52. data/lib/okf/skill/reference/cli/map.md +98 -0
  53. data/lib/okf/skill/reference/cli/registry.md +70 -0
  54. data/lib/okf/skill/reference/cli/search.md +130 -0
  55. data/lib/okf/skill/reference/cli/serve.md +83 -0
  56. data/lib/okf/skill/reference/cli/views.md +59 -0
  57. data/lib/okf/skill/reference/cli.md +33 -603
  58. data/lib/okf/skill/reference/spec-map.md +32 -0
  59. data/lib/okf/version.rb +1 -1
  60. metadata +54 -5
@@ -0,0 +1,59 @@
1
+ # The server views as text — `catalog`, `files`, `tags`, `types`, `stats`
2
+
3
+ Kind: reference. Answers: which of the five reads a question wants, what each
4
+ row carries, and the JSON each emits.
5
+
6
+ The filters all five narrow with — `--type`, `--dir`, `--tag`, `--status`,
7
+ `--trust` — are in [cli.md](../cli.md) with the rest of the shared contract,
8
+ since `search` takes them too.
9
+
10
+ The browser server ([serve.md](serve.md)) has Catalog, Files, Tags and Stats
11
+ panels; these
12
+ verbs reproduce them on the CLI so an agent can read a bundle without a browser.
13
+ All are advisory reads (exit 0) sharing one data source (per-concept metadata plus
14
+ in/out link degree). Add `--json` to any for a machine substrate.
15
+
16
+ - **`catalog`** — every concept with its metadata (type, status, trust, tags,
17
+ provenance, in/out link degree, description), grouped by top-level dir (`dir`
18
+ on every row carries the full path, `top_dir` the first segment). The "what's
19
+ here, in detail" view. JSON: `{ bundle, count, concepts: [{ id, title, type,
20
+ description, tags, generated_at, generated_by, generated, trust, status,
21
+ stale_after, sources, backlog_ref, dir, top_dir, links_out, links_in }] }`.
22
+ Four of those deserve a sentence: `generated` is the raw boolean ("does the
23
+ document *declare* a generated mapping"), which is what tells hand-written
24
+ apart from v0.1-with-timestamp — `generated_at` alone conflates them, because
25
+ §13.1 lifts a legacy `timestamp` into it. `trust` is the derived §5.3 tier as
26
+ a hyphenated literal (`unverified` | `machine-confirmed` | `human-reviewed`) —
27
+ compare against exactly those. `status` is the *declared* value, `null` when
28
+ absent (the row never fabricates frontmatter; the `--status` filter is what
29
+ applies the §5.4 default). `sources` is a count. Temporal fields render
30
+ ISO 8601 (`stale_after` as `YYYY-MM-DD`). The `timestamp` column is retired —
31
+ `--fields timestamp` is a usage error naming the valid fields.
32
+ - **`files`** — the folder tree: each concept's filename + title, grouped by
33
+ directory. The "how it's organised" view. JSON: `{ bundle, count, files: [{ path,
34
+ id, dir, type, title, description }] }`.
35
+ - **`tags`** — every tag with the concepts that carry it, ordered by count
36
+ descending. The "what themes dominate" view. JSON: `{ bundle, count, tags: [{ tag,
37
+ count, concepts: [id, …] }] }`. `--by type|dir` regroups the list per concept
38
+ dimension with **within-group** counts (a tag spanning groups appears in each);
39
+ each row also carries the tag's **total** across the narrowed set, printed
40
+ `count/total` when they differ — so a tag's locality reads per row (a plain
41
+ count = wholly local; `2/7` = a cross-cutting spread). The substrate for tag
42
+ curation and for [refine](../../playbooks/refine.md)'s domain-vs-concern read;
43
+ the judgment recipes live in the [maintain playbook](../../playbooks/maintain.md)
44
+ and the [refine playbook](../../playbooks/refine.md). JSON: `{ bundle, count, by,
45
+ groups: [{ <dim>, count, tags: [{ tag, count, total, concepts }] }] }`.
46
+ - **`types`** — every type with the concepts that carry it, ordered by count
47
+ descending. The "what kinds of knowledge" view. JSON: `{ bundle, count, types:
48
+ [{ type, count, concepts: [id, …] }] }`.
49
+ - **`stats`** — bundle rollups: concept / dir / type / cross-link / distinct-tag
50
+ totals plus per-type and per-dir breakdowns. The "shape at a glance" view. JSON:
51
+ `{ bundle, concepts, dirs, top_dirs, concept_types, cross_links, distinct_tags,
52
+ by_type, by_dir, by_top_dir }` (`top_dirs`/`by_top_dir` are the first-segment
53
+ rollup). `dirs`/`by_dir` cover every directory `okf dirs`
54
+ lists — counts are direct, so a directory holding nothing itself is present at
55
+ `0` rather than missing, and `by_dir.keys` is a complete list of what `--dir`
56
+ can address.
57
+
58
+ Reach for `stats` first to size a bundle, `catalog`/`files` to enumerate it, `tags`
59
+ to find thematic clusters — all without standing up the server.