$npx -y skills add inkeep/open-knowledge --skill knowledge-baseHow to work in a Knowledge Base project (the knowledge-base starter pack). Read when the project has the three-layer source-grounded layout — external-sources/ → research/ → articles/ — wired to the workflow MCP tool's ingest / research / consolidate kinds. Carries the
| 1 | # Knowledge Base pack — how to work here |
| 2 | |
| 3 | This project uses the **source-grounded knowledge-base** layout. The whole point is a closed evidence loop: nothing canonical exists without a traceable chain back to a preserved source. This skill holds the workflow so the templates and `log.md` can stay clean — when you create a doc from a template you get structure, and the *how* lives here. |
| 4 | |
| 5 | > This skill is pack guidance. The platform `open-knowledge` skill (read/write/preview/grounding rules) still governs every markdown operation — this layers the KB workflow on top. |
| 6 | |
| 7 | ## Link at creation |
| 8 | |
| 9 | The user watches your build live — the editor follows the file you're writing, and the knowledge graph assembles on screen as pages get linked. No view management on your part; just author well: every page carries its links from the moment it's written (at minimum the hub/index page and its most related siblings — an unlinked page is invisible in the graph), and related pages share a `cluster:` frontmatter value (e.g. `cluster: architecture`) so the graph's cluster coloring makes the map read at a glance. |
| 10 | |
| 11 | ## The three layers |
| 12 | |
| 13 | ``` |
| 14 | external-sources/ raw sources, saved verbatim (produced by `ingest`) |
| 15 | ↓ cite |
| 16 | research/ provisional analysis (produced by `research`) |
| 17 | ↓ promote |
| 18 | articles/ canonical, decided knowledge (produced by `consolidate`) |
| 19 | ``` |
| 20 | |
| 21 | The loop is **ingest → research → consolidate** — each a `workflow({ kind })` guide you invoke (`workflow({ kind: 'ingest' })`, etc.). Every downstream claim traces upstream to a preserved source. Cite local paths in `external-sources/`, never bare web URLs — the KB must survive link rot. |
| 22 | |
| 23 | ## Per-folder rules |
| 24 | |
| 25 | **`external-sources/`** — Raw sources saved verbatim, not just cited: the actual fetched text of URLs, extracted text of PDFs, copies of referenced files. Each file's frontmatter carries the original URL, access date, and any author/publisher metadata. Produced by `ingest` (applies whether the user shared the URL or you fetched it yourself to ground a claim). Immutable after capture — update only to refresh a stale fetch. **No analysis here**; that belongs in `research/`. |
| 26 | |
| 27 | **`research/`** — Provisional analysis synthesizing external sources. Produced by `research`. Every factual claim cites a specific doc in `external-sources/` (or an inline URL if ingest was skipped); no unsourced assertions. Keep the `sources:` frontmatter list aligned with the docs actually linked in the body. Promote to `articles/` via `consolidate` once the team decides the findings are stable. |
| 28 | |
| 29 | **`articles/`** — Canonical knowledge, committed after a team decision. Produced by `consolidate`. Carries a `supersedes:` chain tying back to the `research/` docs it replaces (which in turn cite `external-sources/`) so the full evidence chain is traceable without leaving the repo. Source-of-truth for the domain; update only when a new decision supersedes it. |
| 30 | |
| 31 | ## Status flow |
| 32 | |
| 33 | | Layer | `status` | Set when | |
| 34 | |---|---|---| |
| 35 | | `research/` | `provisional` | created | |
| 36 | | `articles/` | `canonical` | promoted by `consolidate` after a decision | |
| 37 | |
| 38 | When a new article supersedes an older one, add the older article's path to the new one's `supersedes:` list. |
| 39 | |
| 40 | ## Log discipline (MUST) |
| 41 | |
| 42 | There is a `log.md` at the project root. **Append one dated entry after any turn that creates, edits, or restructures content** — one entry per turn, not per file. Silent edits break the audit trail. |
| 43 | |
| 44 | Log: `ingest` runs (new sources), `research` / `consolidate` runs (provisional or canonical articles), direct `write` / `edit` / `move` / `delete` outside the three loop tools, `discover` runs, folder restructures, and `.ok/config.yml` changes. |
| 45 | |
| 46 | **Reference docs as markdown links, not bare paths** — `[path/to/doc](./path/to/doc.md)`, so the entry shows up in `links({ kind: "backlinks" })` for those docs. A bare path string does not register in the graph. |
| 47 | |
| 48 | Entry shape: |
| 49 | |
| 50 | ```markdown |
| 51 | ## YYYY-MM-DD: <short title> |
| 52 | |
| 53 | - <what was done> |
| 54 | - Files touched: [doc-a](./path/doc-a.md), [doc-b](./path/doc-b.md) |
| 55 | - Sources ingested: [source-slug](./external-sources/source-slug.md) |
| 56 | - Open follo |