Skip to content

YAML Schemas

Language-neutral schemas for IKARY cell manifests, written as JSON Schema in YAML. Organised by domain under manifests/.

Schema map

Root (entry points)

PathDescribes
cell-manifest.schema.yamlTop-level manifest (apiVersion, kind, metadata, spec)
metadata.schema.yamlManifest metadata (key, name, version)
cell-spec.schema.yamlSpec body (mount, entities, pages, navigation, roles)

shared/

PathDescribes
shared/mount.schema.yamlMount point (path, landing page)

entities/

PathDescribes
entities/entity-definition.schema.yamlFull entity (fields, relations, lifecycle, capabilities...)
entities/field-definition.schema.yamlField types, nested objects (recursive)
entities/field-validation.schema.yamlField-level validation rules container
entities/field-rule.schema.yamlSingle validation rule
entities/display.schema.yamlField display configuration
entities/relation-definition.schema.yamlRelation types (belongs_to, has_many, many_to_many, self, polymorphic)
entities/computed-field.schema.yamlComputed fields (expression, conditional, aggregation)
entities/lifecycle.schema.yamlState machine definition
entities/lifecycle-transition.schema.yamlSingle state transition
entities/capability-definition.schema.yamlCapabilities (transition, mutation, workflow, export, integration)
entities/capability-input.schema.yamlCapability input parameters
entities/event.schema.yamlAudit event configuration
entities/policy.schema.yamlEntity and field access policies
entities/entity-validation.schema.yamlEntity-level rules and cross-entity validators

pages/

PathDescribes
pages/page-definition.schema.yamlPage types and data bindings
PathDescribes
navigation/navigation.schema.yamlNavigation menu (recursive groups)

roles/

PathDescribes
roles/role-definition.schema.yamlRoles and permission scopes

app-shell/

PathDescribes
app-shell/app-shell.schema.yamlShell layout, branding, regions

Cross-references

Schemas reference each other using the standard JSON Schema $ref keyword:

yaml
# In entity-definition.schema.yaml
properties:
  fields:
    type: array
    items:
      $ref: "./field-definition.schema.yaml"
  relations:
    type: array
    items:
      $ref: "./relation-definition.schema.yaml"

Structural vs semantic validation

These schemas cover structural validation: types, required fields, enum values, patterns.

Semantic rules (unique entity keys, valid lifecycle transitions, relation consistency) are enforced at runtime by each language's validator:

  • TypeScript: @ikary/contract via Zod + custom validators
  • Python: to be implemented natively

Relationship to Zod schemas

The TypeScript Zod schemas in @ikary/contract are the runtime validation authority. These YAML schemas are the human-readable, language-neutral reference that mirrors the Zod definitions. When in doubt, the Zod schemas are canonical.