Skip to content

JSON Schema & Types

UKS is defined by a normative JSON Schema (draft/2020-12). All three reference implementations bundle the same schema, so validation results agree.

Top-level shape

Required: packet_id, schema_version (const "3.0"), conformance_level (L1/L2/L3), created_at (ISO 8601 datetime), topic (a { title, … } object), sources (≥ 1).

Optional: project, data_contracts, scrape_targets, extraction_rules, directives, actions, agent_instructions, knowledge_nodes, domain_data, provenance, export, _extensions.

The schema is strict: additionalProperties: false at the top level. Unknown top-level keys are rejected — put implementation-specific data under _extensions, which never fails validation.

Conformance is schema-enforced

Level isn't just a label; the schema validates it:

If conformance_level is……then these are required (≥ 1 each)
L2scrape_targets, extraction_rules
L3scrape_targets, extraction_rules, directives, actions, agent_instructions

So an L3 packet missing actions fails validation. See Conformance Levels.

Validate

bash
uks validate my-packet.uks.json     # CLI
ts
import { validate } from '@uks/sdk'; // TypeScript
python
from uks_sdk import validate          # Python

→ Related: Schema Layers A–E · Source Fields · Standards Comparison

Released under the MIT License.