Domain Knowledge Pack (DKP) Standard
DKP is an open standard for packaging curated domain knowledge so both Human and AI agents actually use it well.
Most knowledge fed to AI agents is unstructured — raw documents, loosely formatted notes, or ad-hoc context dumps. DKP changes that. It gives producers a clear, validated bundle format and gives processors (agents, RAG pipelines, LLM apps) something they can reliably load, search, and trust.
DKP builds on Open Knowledge Format (OKF) — every DKP bundle contains a fully conformant OKF bundle in its okf/ layer — and adds the structure that OKF deliberately leaves open: a type taxonomy, a machine-readable layer, quality gates, provenance tracking, and an optional skill and localization layer.
Who is DKP for?
Knowledge engineers and domain experts who want to package what they know — terminology, rules, constraints, decision logic — into a format that AI tools can use without hallucinating or making up facts.
Developers building AI agents, RAG pipelines, or LLM applications who want a reliable, validated input format instead of raw files. DKP bundles come with structured retrieval chunks, a knowledge graph, eval sets, and optional MCP tool integration out of the box.
Teams deploying AI at scale who need provenance, rights tracking, audience scoping, localization, and supply-chain integrity for the knowledge they put in front of a model.
What's in a DKP bundle?
A bundle is a directory (or .zip) with six layers:
| Layer | What it contains |
|---|---|
machine/ |
Structured JSON/JSONL assets: glossary, rules, constraints, decision trees, retrieval chunks, knowledge graph, eval set. Source of truth. |
okf/ |
OKF-native Markdown concept files generated from the machine layer. Compatible with any OKF-supporting agent framework. |
human/ |
A handbook, quickstart, cheatsheet, and FAQ written for human readers — no AI tooling required. |
evidence/ |
Source citations, rights log, and editorial review notes. |
skills/ |
Procedural SKILL.md-compatible skills bundled alongside the declarative knowledge. |
l10n/ |
Translated or locale-adapted content for non-base locales. |
A single manifest.json at the root declares the pack's identity, audience, compatibility, access control, retrieval hints, and optional MCP surface.
Quality built in
DKP defines an 8-gate quality standard with three conformance tiers:
- DKP-Conformant — structural gates (4 and 8) enforced automatically by
dkp validate: schema validity, graph integrity, OKF conformance. - DKP-Evaluated — a DKP-Conformant bundle that additionally includes a populated
eval_set.jsonland passes Gate 7, demonstrating measurable retrieval improvement above themin_eval_deltathreshold. - DKP-Reviewed — a DKP-Evaluated bundle that additionally satisfies the editorial gates (1–3, 5–6), attested by a dated, named sign-off in
evidence/review_notes.md.
An optional eval set (machine/eval_set.jsonl) lets you measure how much the pack actually improves model answers compared to a baseline — and dkp eval runs it.
MCP integration
A conformant processor can serve any bundle's resources and tools (inject, search, chunk, get, and optionally list_procedures/run_procedure) over MCP without custom integration work. The optional mcp field in the manifest provides advisory configuration — preferred transport, auth scheme, tool whitelist — that processors SHOULD respect.
CLI
The dkp CLI is the primary tool for authoring, inspecting, and deploying packs. Install it and run dkp --help for a full command listing.
Global flags
These flags apply to every command:
| Flag | Description |
|---|---|
--output <FORMAT> |
Output format: plain (default), table, json |
-q, --quiet |
Suppress informational output; print only results |
-v, --verbose |
Print debug info (schema paths, provider calls, etc.) |
--audience <ID> |
Filter content to assets tagged for a specific audience profile |
Authoring a pack from scratch
# Scaffold a new pack directory with all required files
# Or: scaffold and LLM-generate a complete pack in one command
Generating and iterating content
# Run (or re-run) LLM generation on an existing pack
# Run the eval set through the LLM
# Failure-aware chunk regeneration using eval results
# Generate evidence drafts for manual review gates
Inspecting a pack
# Print a summary: name, version, asset counts, compliance status
# List all packs under a root directory
# Retrieve a specific asset or all assets of a type
# Print a ready-to-inject LLM context block
# Inspect and validate the knowledge graph
# Inspect and validate cross_refs.json
Searching
# Full-text BM25 search across machine assets
# Retrieve the top-N most relevant retrieval chunks for a query
# Search the registry instead of a local pack
Validating and testing
# Run schema and compliance checks; exits non-zero on failure
# Run eval set against baseline and grounded prompts; print delta report
# Interactive grounded prompt REPL — see "Interactive interfaces" above for full usage
# Compare two pack versions and report what changed
Skills and localization
# Manage and validate the skills/ layer
# Manage and validate the l10n/ localization layer
Procedures
# List and validate executable procedures
# Scaffold a new procedure
# Invoke a procedure by ID
Interactive interfaces
# Open a full-screen terminal UI for browsing a pack
# Start a local web UI in your browser
# Interactive REPL: ask questions against a pack using any OpenAI-compatible model
dkp tui is a keyboard-driven browser for pack layers, asset details, search, and validation results. dkp webui serves the same content as a local web app with expandable trees and hyperlinked cross-references. Both require their respective features (tui, webui), which are included by default.
dkp prompt injects the pack into an LLM context and lets you query it interactively — the fastest way to verify a pack improves model answers during authoring. For automated scoring, use dkp eval.
Evidence and provenance
# Summary of sources and rights coverage
# Flag entries with missing or expired fields
# Add a source record interactively
# Formatted rights compliance report
Exporting
# Convert machine assets to another format
# OKF-specific operations (export, validate, stats, links)
Building and releasing
# Pre-release compliance checklist (runs all gates, checks human fields)
# Package the pack into a versioned archive with checksums.json
# Generate or regenerate machine/mcp_manifest.json
# Start the pack as an MCP server
Signing
# Generate an Ed25519 keypair for signing packs
# Sign a built archive with a private key
Registry
# Account management
# Per-pack management
# Install a pack from the registry
# Remove an installed pack
# Update installed packs to satisfy lock-file constraints
# Publish a built and signed pack
# Mark a published version as yanked
# Deprecate a version with a message shown on install (or clear it)
Read the specification
The full DKP Specification is in SPEC.md. It covers:
- Bundle structure (§5) and all layer schemas (§9–§14)
- The manifest and all its fields (§6)
- The 8-gate quality standard (§16)
- MCP surface declaration and tool schemas (§15)
- Normative JSON Schemas for every machine-layer asset (Appendix B)
- A complete worked example bundle (Appendix A)
License: Apache 2.0