Compile any structured dataset into a static, fully agent-discoverable
knowledge site. Zero runtime inference — every node becomes a static HTML page
readable by any LLM agent, crawler, or person with a plain HTTP GET and no
JavaScript. Discoverability (llms.txt, sitemap.xml, robots.txt,
schema.org JSON-LD) is baked in.
"Intelligence is not the model. Intelligence is the accumulated decisions that shaped the model." This SDK is the compile-time end of that idea: your knowledge, compiled into an artifact, not served by a runtime LLM.
This SDK was extracted from three shipped production sites —
k8s-docs-compiler,
chatgpt-compile, and
skce-explorer — after learning, the hard
way, exactly what it takes to make a compiled corpus:
- Readable with JS disabled — server-render every route at build time; never
ship a
useEffect(fetch)shell. - Discoverable by agents —
llms.txt+sitemap.xml+robots.txt+WebSite/DataCatalog/TechArticleJSON-LD, all cross-linked. - Deployable without foot-guns — archive deploys, canonical project targeting, and CDN cache purging are handled for you.
Every one of those lessons is encoded in the CLI and template.
npm i -g @kliewerdaniel/discoverable-knowledge-sdk
kc init my-kb && cd my-kb
npm install
# replace public/dataset.json with your graph; edit site.config.json
kc validate . # deterministic sanity check — run FIRST
kc build . # static export -> out/
kc verify out # assert 0 "Loading" shells, discoverability files present
kc deploy . # Vercel: archive deploy + cache purge + live verifyTwo files drive everything:
public/dataset.json— your{ version, nodes, edges }graph. A node needsid+type; optionallytitle,summary,body,tags,provenance,derived_by,confidence. An edge is{ from_id, to_id, type, label?, confidence? }.site.config.json— maps nodetypes → URLsections, plus site metadata (name,description,baseUrl,project,author,keywords,related).
Change those two files and you can compile any domain — Kubernetes docs, a ChatGPT export, a research corpus, a product catalog, your notes.
See AGENTS.md for the full playbook a coding agent can follow
end-to-end.
| Command | What it does |
|---|---|
kc init <dir> |
Scaffold a new site (generic Next.js template + example data). |
kc validate [dir] |
Deterministic graph+config checks (dup ids, slug collisions, orphan types, dangling edges). Run first. |
kc build [dir] |
Validates, then next build → static export in out/. |
kc verify <url|dir> |
Asserts every route is JS-free readable (no Loading shells) + discoverability files exist. |
kc deploy [dir] |
Deploys out/ to Vercel with --archive=tgz --project <name>, purges CDN cache, verifies the live alias. |
The template is one generic, data-driven Next.js app (output: 'export').
At build time it reads dataset.json + site.config.json from disk (Node fs,
inside server components) and uses generateStaticParams to emit:
- one static page per node at
/<section>/<slug>/, - one server-rendered index per section at
/<section>/, - a home dashboard, an
/about, and a/search(full server-rendered index + optional client-side live filter island), sitemap.xmlenumerating everything,- and (via a prebuild hook)
llms.txt,robots.txt,index.json, and the root JSON-LD.
No per-site code generation. No runtime database. No runtime LLM.
- Node ≥ 18
- For deploys: the Vercel CLI, authenticated
(
vercel login).
MIT © Daniel Kliewer