Domain Schema Format
A domain is a typed schema that defines an industry's structured data. Each domain contains tags — named record types with typed fields, validation rules, and trust signals. Domain Schemas are 100% agonstic JSON payloads. They represent the ultimate source of truth for structured data validation.
You do NOT need to use YounndAI Object Notation (YON) to benefit from domains. YON is simply one consumer type. Any parser, application, or AI agent that consumes JSON can fetch a schema from the registry and instantly enforce strong types, validation, and domain-awareness across their workflow.
Three Payloads
Each domain serves three distinct payloads. This separation is intentional: parsers need lean schemas for validation, while humans and AI agents benefit from rich metadata.

Schema
Validation & Trust
The default response. Contains typed records with fields, validation rules, and trust signals. Lean and cacheable — exactly what parsers need.
GET /api/domains/yon.healthMetadata
Rich Context
Human and AI-readable context beyond validation: taglines, use cases, field labels with units, related standards, cross-domain links, and conformance metrics.
GET /api/domains/yon.health?include=metadataRegistry
Ownership & Lifecycle
Namespace and domain ownership, operational states, and lifecycle data. Namespace and domain carry independent states — owner transfers don't affect schemas.
GET /api/domains/yon.health?include=registryAgnostic JSON Usage
Domain schemas are universal and framework-agnostic. The @younndai/domains (or yai-domains) package provides plug-and-play parsing to apply these schemas over any JSON payload.
Discover schemas
Browse the registry or search by industry. Each domain has a unique path like yon.health or stripe.payments.
Fetch the schema
GET /api/domains/{path} returns the lean schema payload: tags, fields, types, and validation rules.
Validate structured data
Use the tags and fields to validate incoming data. Each field has a type, required flag, and optional pattern/range/enum constraints.
Enrich with metadata
Add ?include=metadata to get rich context: use cases, field labels, units, related standards, and cross-domain relationships.
How YounndAI Object Notation Uses Domains
The YounndAI Object Notation (YON) specification uses domains as its schema registry. Here's how the parser and generator interact with domains.
The JSON Consumer vs YON Parser
Design Prompt: Agnostic pipeline diagram. Top path: Any generic JSON client calling GET /api/... to receive pure JSON. Bottom path: The YON Parser pulling the same domain schema to validate tags. Thematic message: The schema is universal.
Schema Hierarchy & Structure
Design Prompt: A technical Bento-style tree graph showing the relationship: Domain -> contains Records -> contains Fields. Emphasize the structured nature of the data.
Parser fetches the schema
When a YON document declares @DOC domain=yon.health, the parser fetches the schema payload to discover valid tags and their typed fields. Official yon.* schemas ship bundled with the parser — no network call needed.
Tags define the vocabulary
Each tag in the schema (VITALS, DX, PRESCRIPTION) becomes a valid record type. The parser validates that documents only use tags defined in their domain, with correctly typed fields.
AI agents request metadata
When an AI agent needs deeper context — what does the 'bp' field mean? What unit? What's a typical value? — it requests ?include=metadata. The metadata payload provides human-readable labels, units, examples, related standards, and use cases.
Generator structures output
The YON generator uses domain schemas to produce correctly structured output. It knows which tags exist, what fields each tag requires, and what types and constraints to enforce.
Schema Reference
Top-level fields returned in the schema payload.
JSON Schema reference URL
Human-readable description of the domain
Fully qualified domain path
Semantic version
Lifecycle state
Trust tier
Identity + quality trust gate
Conformance confidence
SHA-256 hash of the schema payload
Default YON parsing mode (e.g. 'strict', 'loose')
Default YON profile (e.g. 'core', 'chat')
Default YON output format (e.g. 'min', 'pretty')
Highest-severity notice code, or null
Record type definitions with typed fields
Each entry in the records array
Tag name without @
Human-readable description
Typed field definitions
Each entry in a record's fields array
Field name
Official YON AST Data type
Is field mandatory?
Human-readable description
Regex for string validation
Numeric bounds [min, max]
Allowed values list
Trust Signals
Every schema carries four trust signals for AI agents: tier (who published) + verified (identity confirmed) + score (quality gate) + notice (operational health).
✦ YON OfficialMaintained by YounndAI — score: 1.0✓ YON VerifiedVerified institution, Gold+ conformance✓ YON VerifiedIdentity verified, Gold+ conformance○ CommunitySelf-published, no reviewRegistry API
The YounndAI Domains Registry serves domain schemas via REST API at domains.younndai.com.
GET /api/domainsList of all domains5 minGET /api/domains?tier=officialFilter by tier5 minGET /api/domains/search?q=healthFull-text search domains1 minGET /api/domains/statsGlobal registry statistics5 minGET /api/domains?namespace=stripeFilter by namespace5 minGET /api/namespacesList all namespace claims5 minGET /api/namespaces/stripeNamespace details & owner5 minGET /api/domains/yon.healthSchema payload (lean)1 hourGET /api/domains/yon.health?include=metadataSchema + metadata1 hourGET /api/domains/yon.health?include=registrySchema + registry1 hourGET /api/domains/yon.health?include=allAll payloads1 hourGET /api/domains/yon.health?version=2.1Schema at specific versionImmutableGET /api/domains/yon.health/versionsAll versions with status5 minGET /api/noticesGlobal registry notices5 minGET /api/announcementsSystem announcements1 hourGET /api/healthAPI service health checkNoneParser Cache Strategy
Parsers resolve domains through a three-tier cache hierarchy.
The 3-Tier Cache Strategy
Design Prompt: A cascading execution flow. Tier 1 (Bundled) hits immediately in 0ms. Tier 2 (Cached) hits memory. Tier 3 (Live Network) fetches from API. Emphasize speed and reliability.
Bundled
Official yon.* schemas ship with the parser
Network: Never
Cached
Previously fetched schemas stored locally with TTL
Network: On miss
Live
Fetched from registry API on demand
Network: Yes
Cache Rules
- 24-hour TTL for
latestresolution, infinite for pinned versions - Use
ETag/If-None-Matchfor efficient revalidation (304 Not Modified) - Graceful degradation: if registry unreachable, continue with WARN
- Offline mode: parsers function fully offline using only bundled schemas
Ready to explore?
Browse published domain schemas in the registry, or check out the pricing model for publishing your own.
