@ouas/spec
v1.0.0
Published
OUAS specification schemas, documentation, and examples
Readme
@ouas/spec
OpenUI Adaptive Standard (OUAS) Schema, Specifications, and Documentation.
This package defines the JSON Schemas, strict rules, examples, and versioning guides that form the core of the OpenUI Adaptive Standard. It is designed to be language- and framework-agnostic, providing a single source of truth for the structural contracts between developers, renderers, and AI agents.
Package Structure
packages/spec/
├── schemas/
│ ├── manifest.schema.json # Schema for Component Manifests
│ ├── layout-config.schema.json # Schema for Layout Configurations
│ └── validation-response.schema.json # Schema for validation outputs
├── docs/
│ ├── manifest-spec.md # Detailed Manifest specification
│ ├── layout-config-spec.md # Detailed Layout Config specification
│ └── agent-api-contract.md # API contracts for agents
├── examples/ # Raw JSON mock samples
├── VERSIONING.md # Schema evolutionary versioning rules
└── CHANGELOG.md # History of changesCore Specification Concepts
1. Component Manifest (manifest.schema.json)
The Component Manifest is an application-wide catalog generated or maintained by the developer. It defines the "menu" of components that an AI agent is authorized to interact with.
Key fields:
ouas_version: Version of the spec being used.app_id/app_name: Identifiers for matching apps.components: Array of Component Definitions, including fields, types, variants, and slots.
2. Layout Config (layout-config.schema.json)
The Layout Config is a JSON layout declaration generated by the AI agent in response to a user request. It describes exactly what UI elements to load, their parameters, and ordering.
Key rules:
- Must be purely declarative (zero logic).
- Must only reference component IDs and fields defined in the app's Manifest.
- Must satisfy required field constraints defined in the manifest.
3. Validation Contract (validation-response.schema.json)
Specifies the structure of errors returned during validation, including detailed field names, error codes, and human/machine-readable suggestions for correcting the config.
Local Usage
You can import schemas directly in JavaScript/TypeScript monorepos using Node ES imports:
import manifestSchema from '@ouas/spec/schemas/manifest.schema.json';
import layoutConfigSchema from '@ouas/spec/schemas/layout-config.schema.json';
console.log(`Using manifest schema version: ${manifestSchema.$id}`);Versioning Rules
We strictly adhere to semantic schema versioning as detailed in VERSIONING.md:
- MAJOR: Breaking schema changes (e.g. renaming/deleting required fields, breaking validation structures).
- MINOR: Non-breaking structural additions (e.g. new schema configurations, optional properties).
- PATCH: Typo corrections, doc clarifications, or minor descriptions update.
For full schema specs, please refer to the markdown guides in docs/.
