@inkeep/open-knowledge 0.9.0-beta.31 → 0.9.0-beta.33
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.
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +20 -22
- package/dist/cli.mjs +36 -36
- package/dist/constants-CbvHeCMM.mjs +2 -0
- package/dist/{dist-CA-yDHEq.mjs → dist-DnMeF_Yx.mjs} +23 -21
- package/dist/{dist-C4I-b8-m.mjs → dist-qvP8X1Cn.mjs} +1 -1
- package/dist/{gh-detect-BZ1nPNKy.mjs → gh-detect-DjaWa-fV.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{init-Dt8uSjge.mjs → init-B9QZkZWz.mjs} +6 -6
- package/dist/init-CokDu2De.mjs +1 -0
- package/dist/loader-BmBXaL6j.mjs +1 -0
- package/dist/loader-Q9XLUMGN.mjs +4 -0
- package/dist/{preview-Ddp3FH-6.mjs → preview-CMR5yKXH.mjs} +2 -2
- package/dist/preview-DFKhDNPF.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DjLptssw.js → ActivityModeContent-CpmvH1z9.js} +1 -1
- package/dist/public/assets/DocumentContext-Kqlx8YjN.js +61 -0
- package/dist/public/assets/{GraphPanel-D2ZWMZHw.js → GraphPanel-yD7w8P9H.js} +3 -3
- package/dist/public/assets/SettingsDialogBody-BuGhPBlG.js +7 -0
- package/dist/public/assets/{SourceEditor-ztotrWnx.js → SourceEditor-BKjAFaVa.js} +1 -1
- package/dist/public/assets/config-validation-events-CweQkDns.js +12 -0
- package/dist/public/assets/index-BV-BpS9G.js +1917 -0
- package/dist/public/assets/index-DzNA_erm.css +1 -0
- package/dist/public/assets/prop-types-Bi80b84t.js +500 -0
- package/dist/public/assets/{target-navigation-intent-DZxquxsX.js → target-navigation-intent-JrEW3Jod.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DWPni1ys.js → typing-burst-detector-CIMc3LFE.js} +1 -1
- package/dist/public/index.html +7 -7
- package/dist/{repair-launch-json-CpHkwEQe.mjs → repair-launch-json-BMyYnRp2.mjs} +2 -2
- package/dist/{repair-mcp-configs-DTo4wxei.mjs → repair-mcp-configs-CoO4C1K5.mjs} +2 -2
- package/dist/repair-skills-BVyYoufY.mjs +1 -0
- package/dist/{repair-skills-dYAzCUrj.mjs → repair-skills-BXs2xVWf.mjs} +2 -2
- package/dist/{server-lock-BpjJj3OD-D8yiVjLU.mjs → server-lock-BpjJj3OD-BpdqozwH.mjs} +92 -92
- package/dist/server-lock-CyhBidkz-IWbRJ4RD.mjs +1 -0
- package/dist/{src-DQzHDEzB.mjs → src-DGiW_9Ll.mjs} +2 -2
- package/dist/start-BOC1TWY0.mjs +1 -0
- package/dist/{start-k1rm0C8J.mjs → start-BOSVZEJO.mjs} +2 -2
- package/dist/{write-project-skill-CD2-O-zT.mjs → write-project-skill-DHCorqwq.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-mptAAyp9.mjs +0 -2
- package/dist/init-6FMYGQaY.mjs +0 -1
- package/dist/loader-ClwCZw8O.mjs +0 -1
- package/dist/loader-DWCsV2Sz.mjs +0 -4
- package/dist/preview-C59RI9mp.mjs +0 -1
- package/dist/public/assets/DocumentContext-BzUdezp1.js +0 -61
- package/dist/public/assets/SettingsDialogBody-Y7msJVE9.js +0 -7
- package/dist/public/assets/config-validation-events-lBcb_6bi.js +0 -12
- package/dist/public/assets/index-BzVbhruC.js +0 -1917
- package/dist/public/assets/index-BzZsJje8.css +0 -1
- package/dist/public/assets/prop-types-DhUmqQsM.js +0 -500
- package/dist/repair-skills-DthZy9gs.mjs +0 -1
- package/dist/server-lock-CyhBidkz-K4Rq177O.mjs +0 -1
- package/dist/start-DntS9VW0.mjs +0 -1
|
@@ -3,7 +3,7 @@ name: open-knowledge-discovery
|
|
|
3
3
|
description: "Read when the user asks what Open Knowledge is, wants to install it on a repository, wants to share an Open Knowledge project with collaborators, or asks how `ok init` / `ok install-skill` / OK Desktop set up a project. Do NOT load to perform Open Knowledge reads/writes — the runtime guidance for editing markdown inside an initialized OK project ships as a separate project-local skill at `.claude/skills/open-knowledge/` whenever `ok init` runs. If the user appears to be editing markdown inside a `.ok/` project and this is the only OK skill loaded, advise them to re-run `ok init` to install the project-local skill."
|
|
4
4
|
compatibility: "Any agent host — no MCP server required. Pure discovery + install guidance."
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.9.0-beta.
|
|
6
|
+
version: "0.9.0-beta.33"
|
|
7
7
|
author: "Inkeep"
|
|
8
8
|
repository: "https://github.com/inkeep/open-knowledge"
|
|
9
9
|
---
|
|
@@ -3,7 +3,7 @@ name: open-knowledge
|
|
|
3
3
|
description: "MUST invoke before reading or editing any `.md` / `.mdx` file, and before any `mcp__open-knowledge__*` tool call (`exec`, `search`, `write_document`, `edit_document`, and the rest). This skill is installed into the repository by `ok init`, so its presence alone means this is an Open Knowledge project — its runtime contract governs every markdown file here, with no need to probe for a `.ok/` directory. Authoritative agent-runtime contract; supersedes the overlapping MCP server `instructions` echo."
|
|
4
4
|
compatibility: "Claude Code, Claude Desktop, Claude Cowork, Claude.ai web. Requires Open Knowledge MCP server + code execution."
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.9.0-beta.
|
|
6
|
+
version: "0.9.0-beta.33"
|
|
7
7
|
author: "Inkeep"
|
|
8
8
|
repository: "https://github.com/inkeep/open-knowledge"
|
|
9
9
|
---
|
|
@@ -29,7 +29,7 @@ Everything below is depth. Read on demand.
|
|
|
29
29
|
The full MCP surface, grouped by risk-level. Every tool's `kind` / `action` set is single-risk-level (never a read and a write behind one discriminator).
|
|
30
30
|
|
|
31
31
|
- **Reads** — `exec` (primary; shell-style `cat`/`ls`/`grep`/`find` with frontmatter + backlink + history enrichment), `search` (ranked, BM25 + recency), `get_history` (versions for a doc), `links` (`kind: 'backlinks'|'forward'|'dead'|'orphans'|'hubs'|'suggest'`), `get_config` (resolved config), `get_components` (canonical component JSX schemas), `get_authoring_palette` (markdown-native authoring forms + themed `html preview` embed starters + theme tokens), `get_preview_url` (browser-reachable preview URL on demand), `share_link` (GitHub-substrate share URL for a doc; read-only against `.git/`, no commits/pushes — returns a clear error when the project has no GitHub remote, since agents do not publish projects).
|
|
32
|
-
- **Writes** — `write_document` (new or full-replace; supports `template:` instantiation), `edit_document` (body-only find/replace), `edit_frontmatter` (1-2 keys via RFC 7396 JSON Merge Patch — preferred), `delete_document`, `rename` (probes file vs folder; rewrites referrers), `version` (`action: 'save'|'rollback'`), `folder_config` (`action: 'set-rule'|'write-template'|'delete-template'
|
|
32
|
+
- **Writes** — `write_document` (new or full-replace; supports `template:` instantiation), `edit_document` (body-only find/replace), `edit_frontmatter` (1-2 keys via RFC 7396 JSON Merge Patch — preferred), `delete_document`, `rename` (probes file vs folder; rewrites referrers), `version` (`action: 'save'|'rollback'`), `folder_config` (`action: 'set-rule'|'write-template'|'delete-template'`). `set-rule` writes a folder's own frontmatter (open-shape, like a doc's); `write-template`/`delete-template` manage the folder's templates (what new docs start with).
|
|
33
33
|
- **GitHub-sync conflicts** — `list_conflicts` (enumerate), `get_conflict_content` (base/ours/theirs stages + lifecycle), `resolve_conflict` (write a chosen resolution + commit; destructive). Mutating writes against a doc in conflict return RFC 9457 `urn:ok:error:doc-in-conflict` (409); `exec("cat …")` returns `lifecycle: {status, reason} | null` so you can detect the state proactively. See *Conflict-aware writes*.
|
|
34
34
|
- **Workflow** — `ingest`, `research`, `consolidate`, `discover` (return procedural guides, not data).
|
|
35
35
|
|
|
@@ -56,7 +56,7 @@ Why: native tools skip frontmatter, backlinks, shadow-repo activity, and project
|
|
|
56
56
|
## Reads — examples
|
|
57
57
|
|
|
58
58
|
- Read a file: `exec("cat <path>.md")` — contents + full rich enrichment.
|
|
59
|
-
- List a directory: `exec("ls -A <dir>")` — per-child frontmatter, recursive markdown counts, most-recently-updated doc per subdir, folder
|
|
59
|
+
- List a directory: `exec("ls -A <dir>")` — per-child frontmatter, recursive markdown counts, most-recently-updated doc per subdir, the folder's own `title`/`description`/`tags` + `templates_available`. Prefer `-A` over plain `ls` to surface dot-prefixed entries (`.ok/`, `.okignore`) without the noisy `.`/`..` rows that `-a` adds.
|
|
60
60
|
- Literal search: `exec("grep -rn <term> <dir> | head -5")` — matches + enrichment on matched files.
|
|
61
61
|
- Ranked search: `search({ query })` — cmd-K parity (title boost + body BM25 + recency); use when picking the best doc, not when listing every occurrence.
|
|
62
62
|
|
|
@@ -238,32 +238,31 @@ tags: [relevant, tags]
|
|
|
238
238
|
---
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
Two folder mechanisms, both opt-in and nested: **folder frontmatter** in `<folder>/.ok/frontmatter.yml` (the folder's own properties — open-shape like a doc's, with `title` / `description` / `tags` as conventional keys the UI surfaces; describes the folder, self-only, does NOT flow into child docs) and **templates** in `<folder>/.ok/templates/` (the single mechanism for what new docs in a folder start with). **Most folders have NO `.ok/`** — sparse, lazy-create, auto-clean. A folder gets one only when it carries its own frontmatter or a template.
|
|
242
242
|
|
|
243
243
|
```
|
|
244
244
|
content-root/
|
|
245
245
|
├── .ok/ ← project root .ok/ (config.yml, cache)
|
|
246
246
|
├── meetings/
|
|
247
247
|
│ ├── .ok/
|
|
248
|
-
│ │ ├── frontmatter.yml ← folder
|
|
249
|
-
│ │ ├── schema.yml ← field declarations (each doc fills in its own value)
|
|
248
|
+
│ │ ├── frontmatter.yml ← this folder's own title/description/tags
|
|
250
249
|
│ │ └── templates/
|
|
251
|
-
│ │ └── prep-notes.md
|
|
250
|
+
│ │ └── prep-notes.md ← what new meeting docs start with
|
|
252
251
|
│ └── 2026-05-01.md
|
|
253
|
-
└── research/ ← no .ok/
|
|
252
|
+
└── research/ ← no .ok/
|
|
254
253
|
└── auth-providers.md
|
|
255
254
|
```
|
|
256
255
|
|
|
257
|
-
|
|
256
|
+
A doc's frontmatter is exactly its own on-disk YAML — folder frontmatter never overlays values onto it. Give new docs starting properties with a template, not with folder frontmatter.
|
|
258
257
|
|
|
259
258
|
### Read the folder before writing (MUST)
|
|
260
259
|
|
|
261
|
-
Before creating or editing docs in a folder, **always** call `exec("ls -A <folder>")` once. The response carries
|
|
260
|
+
Before creating or editing docs in a folder, **always** call `exec("ls -A <folder>")` once. The response carries the folder's own `title`/`description`/`tags` + `templates_available` (the template menu for `write_document({ template })`). Skipping this is how agents land docs that violate folder discipline.
|
|
262
261
|
|
|
263
262
|
Pre-write checklist:
|
|
264
263
|
|
|
265
|
-
0. **First-contact check.** If
|
|
266
|
-
1. **Read
|
|
264
|
+
0. **First-contact check.** If the folder has no frontmatter of its own AND `templates_available` is empty AND `exec("ls -A")` shows substantial content elsewhere, the project hasn't been onboarded — STOP and invoke `discover` (Workflow tools below). Skip on subsequent writes once confirmed.
|
|
265
|
+
1. **Read the folder's description** — its `title`/`description`/`tags` tell you what the folder is for. (These describe the folder; they are NOT defaults the doc inherits.)
|
|
267
266
|
2. **Read `templates_available`** — each entry has `name`, `title`, `description`, `scope` (`local` / `inherited`). If one matches, **prefer it** over free-form markdown (it's the folder's contract — templates carry frontmatter + body structure hand-authored docs routinely miss).
|
|
268
267
|
3. **Read recent siblings** — new docs should match the shape of existing ones (filename, frontmatter, body structure).
|
|
269
268
|
4. **Confirm content scope** — `content.dir` (`.ok/config.yml`) defines the root. `.gitignore` / `.okignore` (nested at any depth) define exclusions.
|
|
@@ -285,23 +284,22 @@ Templates make folder structure durable. Create them proactively:
|
|
|
285
284
|
|
|
286
285
|
Note new templates in chat ("saved as a template at `meetings/.ok/templates/prep-notes.md` for next time") so the user sees the discipline grew.
|
|
287
286
|
|
|
288
|
-
### When
|
|
287
|
+
### When recurring per-doc properties emerge (MUST when a pattern emerges)
|
|
289
288
|
|
|
290
|
-
If you're writing the same frontmatter (tags, title prefix) on multiple siblings,
|
|
289
|
+
If you're writing the same frontmatter (tags, status, a title prefix) on multiple siblings, bake those starting values into a **template** (`folder_config({ action: "write-template" })`) — that's the single mechanism for new-doc starting properties. Folder frontmatter does not cascade values into docs.
|
|
291
290
|
|
|
292
|
-
### Editing folder
|
|
291
|
+
### Editing a folder's own description
|
|
293
292
|
|
|
294
293
|
```ts
|
|
295
294
|
folder_config({
|
|
296
295
|
action: "set-rule",
|
|
297
296
|
rules: [
|
|
298
|
-
{ match: "meetings/**", frontmatter: { title: "Meetings", tags: ["meeting"] } },
|
|
299
|
-
{ match: "meetings/prep-notes/**", frontmatter: { tags: ["meeting", "prep"] } },
|
|
297
|
+
{ match: "meetings/**", frontmatter: { title: "Meetings", description: "Meeting notes", tags: ["meeting"] } },
|
|
300
298
|
],
|
|
301
299
|
})
|
|
302
300
|
```
|
|
303
301
|
|
|
304
|
-
Each `match` resolves to a SINGLE target folder. Multi-folder globs (`specs/*/evidence/**`) are rejected with `MULTI_FOLDER_GLOB` — split per folder. Remove a rule by passing empty `frontmatter: {}` — file deletes and `.ok/` auto-cleans if no other tenant remains.
|
|
302
|
+
`frontmatter` is open-shape — any key about the folder itself, exactly like a doc's frontmatter (`title` / `description` / `tags` are conventional keys the UI surfaces). It's self-only: it describes the folder and does NOT flow into child docs — put per-doc starting values in a template instead. Each `match` resolves to a SINGLE target folder. Multi-folder globs (`specs/*/evidence/**`) are rejected with `MULTI_FOLDER_GLOB` — split per folder. Remove a rule by passing empty `frontmatter: {}` — file deletes and `.ok/` auto-cleans if no other tenant remains.
|
|
305
303
|
|
|
306
304
|
### Creating templates
|
|
307
305
|
|
|
@@ -404,11 +402,11 @@ The skill carries the trigger ("KB content changed this turn — go look"). The
|
|
|
404
402
|
| Finish a turn that changed KB content | move on without checking for a log | check for a `log.md` and follow its contract per Log discipline |
|
|
405
403
|
| Add an image | empty alt `` or generic alt `` | meaningful alt + source caption below |
|
|
406
404
|
| Catalog folder contents | create `INDEX.md` hub file | `folder_config({ action: "set-rule", rules: [...] })` writes `<folder>/.ok/frontmatter.yml` |
|
|
407
|
-
| Write a doc in an unfamiliar folder | go straight to `write_document` with hand-authored markdown | `exec("ls -A <folder>")` first — read
|
|
405
|
+
| Write a doc in an unfamiliar folder | go straight to `write_document` with hand-authored markdown | `exec("ls -A <folder>")` first — read the folder description + `templates_available` before writing |
|
|
408
406
|
| Land in an existing repo without orienting | go straight to `write_document` when no folder frontmatter / templates exist | invoke `discover` once for the project — extracts conventions from siblings, sets folder frontmatter + templates, activates the link graph |
|
|
409
407
|
| Author a doc when a matching template exists | `write_document({ markdown: "..." })` from scratch | `write_document({ template, position: "replace" })` — templates carry the folder's frontmatter + body discipline |
|
|
410
408
|
| Change a doc's title / tags | `edit_document` to swap the YAML (rejected — HTTP 400 frontmatter-intersect) | `edit_frontmatter({ docName, patch })` for 1-2 keys; `write_document({ position: "replace", markdown })` for full rewrites |
|
|
411
|
-
| Repeat the same frontmatter on sibling docs | hand-set identical `tags` / `title` prefix on every new file | `folder_config({ action: "
|
|
409
|
+
| Repeat the same frontmatter on sibling docs | hand-set identical `tags` / `title` prefix on every new file | `folder_config({ action: "write-template" })` once — new docs start from the template |
|
|
412
410
|
| Re-derive the same body skeleton repeatedly | copy-paste the structure from a sibling each time | `folder_config({ action: "write-template" })` once, then pick from `templates_available` thereafter |
|
|
413
411
|
| Scaffold a new folder for a doc category | set folder rule for frontmatter and stop there | pair `folder_config({ action: "set-rule" })` with `folder_config({ action: "write-template" })` in the same turn |
|
|
414
412
|
| Delete a markdown doc | `Bash: rm` / `unlink` / native deletion on in-scope `.md` | `delete_document` — `version({ action: "save" })` first if rollback may be needed |
|
|
@@ -445,8 +443,8 @@ If `write_document` or `edit_document` returns a "Hocuspocus server is not runni
|
|
|
445
443
|
|
|
446
444
|
## Scope recap
|
|
447
445
|
|
|
448
|
-
Open Knowledge looks for documents under the resolved `content.dir` (discoverable at runtime via `get_config({ path: ['content', 'dir'] })`). `.gitignore` and `.okignore` (at the project root and at any folder depth) define exclusions.
|
|
446
|
+
Open Knowledge looks for documents under the resolved `content.dir` (discoverable at runtime via `get_config({ path: ['content', 'dir'] })`). `.gitignore` and `.okignore` (at the project root and at any folder depth) define exclusions. A folder's own metadata + templates live in nested `<folder>/.ok/frontmatter.yml` + `<folder>/.ok/templates/` — NOT in `.ok/config.yml`.
|
|
449
447
|
|
|
450
448
|
Default mental model (no jargon): **every `.md` and `.mdx` under `content.dir`** not excluded by `.gitignore` or `.okignore` is an Open Knowledge document — including under `specs/`, `reports/`, `docs/`, etc. Read `.okignore` (and any nested `.okignore` files) once per turn to know what's excluded.
|
|
451
449
|
|
|
452
|
-
**First session in this project?** If
|
|
450
|
+
**First session in this project?** If substantial folders have no frontmatter of their own and no `templates_available`, the project isn't onboarded — invoke `discover` (Workflow tools table) before writing.
|