Edición publicada en febrero de 2026
Documento original en inglés
OKHAM Contract Map — Ownership & Boundaries
Target Audience: LLMs, implementers, and architects needing to understand contract boundaries and responsibilities.
Purpose
This document defines what each OKHAM contract owns and what it does NOT own. Use this as a mental model to avoid conflating contracts and to ensure clear separation of concerns.
Key Principle: Each contract has a single, well-defined responsibility. Overlapping concerns are explicitly resolved.
Contract Ownership Table
| Contract | Owns | Does NOT Own | Depends On |
|---|---|---|---|
| OTC | Type definitions, schemas, semantic metadata, type versioning | Event structure, policy rules, UI components, business flows | None (foundational) |
| OEC | Event structure, causality chains, event metadata, event versioning | Type definitions, policy enforcement, UI rendering, business orchestration | OTC (for event data types) |
| OPC | Policy rules, constraints, effects (allow/deny/condition), policy scope | Type definitions, event emission, UI components, business flows | OTC (for policy data types), OEC (for policy events) |
| OUCC | UI component structure, props, slots, component semantics, accessibility metadata | Type definitions, event handling, policy enforcement, visual styling | OTC (for prop types), OEC (for component events) |
| OBC | Business flow composition, orchestration, state transitions, flow semantics | Type definitions, event structure, policy rules, UI components | OTC, OEC, OPC, OUCC (orchestrates all) |
| OAC | Accessibility obligations, evidence model, compliance requirements | Type definitions, UI rendering, policy enforcement | OUCC (for component accessibility) |
| OCD | Contract document structure, specification format, versioning rules | Contract content, implementation details | None (meta-standard) |
| OCC | Capability metadata, discovery format, packaging structure | Capability implementation, runtime behavior | OTC, OEC, OPC, OUCC (describes capabilities) |
Detailed Contract Boundaries
OTC — Open Type Contract
Owns:
- Canonical type definitions with semantic meaning
- JSON Schema definitions for types
- Type versioning and compatibility rules
- Semantic metadata (purpose, constraints, relationships)
- Type namespacing and identification
Does NOT Own:
- How types are used in events (OEC)
- How types are validated by policies (OPC)
- How types are rendered in UI (OUCC)
- How types are orchestrated in flows (OBC)
- Runtime type checking or validation (implementation concern)
Depends On: None (foundational contract)
Example:
{
"id": "[email protected]",
"name": "User",
"version": "1.0.0",
"schema": {
"type": "object",
"properties": {
"id": { "type": "string" },
"email": { "type": "string", "format": "email" }
}
},
"semantics": {
"purpose": "Represents a user account"
}
}
OEC — Open Event Contract
Owns:
- Event structure and metadata
- Causality chains (parent/child event relationships)
- Event versioning and compatibility
- Event semantic classification (domain, integration, system)
- Event correlation and tracing
Does NOT Own:
- Type definitions for event data (OTC)
- Policy enforcement on events (OPC)
- UI rendering of events (OUCC)
- Business flow orchestration (OBC)
- Event transport or delivery (implementation concern)
Depends On: OTC (for event data types)
Example:
{
"id": "evt_123456",
"type": "[email protected]",
"timestamp": "2024-01-16T10:30:00Z",
"source": "user-service",
"data": {
"$type": "[email protected]",
"id": "user_789",
"email": "[email protected]"
},
"causation": [],
"correlation": "corr_abc123"
}
OPC — Open Policy Contract
Owns:
- Policy rules and constraints
- Policy effects (allow, deny, condition)
- Policy scope (what the policy applies to)
- Policy versioning and compatibility
- Policy evaluation semantics (not implementation)
Does NOT Own:
- Type definitions for policy data (OTC)
- Event emission or structure (OEC)
- UI component structure (OUCC)
- Business flow orchestration (OBC)
- Policy evaluation engine (implementation concern)
Depends On: OTC (for policy data types), OEC (for policy events)
Example:
{
"id": "[email protected]",
"name": "Admin Only Policy",
"version": "1.0.0",
"effect": "deny",
"rules": [
{
"condition": "user.role != 'admin'",
"action": "deny",
"message": "Only admins can perform this action"
}
],
"scope": {
"capabilities": ["com.example.DeleteUser"]
}
}
OUCC — Open UI Component Contract
Owns:
- UI component structure (props, slots)
- Component semantic metadata
- Component versioning and compatibility
- Accessibility metadata (roles, keyboard support)
- Component composition rules
Does NOT Own:
- Type definitions for props (OTC)
- Event handling logic (OEC)
- Policy enforcement (OPC)
- Business flow orchestration (OBC)
- Visual styling or theming (ODT)
- Component rendering (implementation concern)
Depends On: OTC (for prop types), OEC (for component events)
Example:
{
"id": "[email protected]",
"name": "Button",
"version": "1.0.0",
"props": {
"label": { "type": "string", "required": true },
"variant": { "type": "string", "enum": ["primary", "secondary"] }
},
"slots": {
"icon": { "optional": true }
},
"semantics": {
"purpose": "Interactive button for user actions",
"accessibility": {
"role": "button",
"keyboard": true
}
}
}
OBC — Open Business Contract
Owns:
- Business flow composition and orchestration
- State transitions and flow semantics
- Flow versioning and compatibility
- Flow dependencies and prerequisites
- Flow monitoring and observability metadata
Does NOT Own:
- Type definitions (OTC)
- Event structure (OEC)
- Policy rules (OPC)
- UI component structure (OUCC)
- Flow execution engine (implementation concern)
Depends On: OTC, OEC, OPC, OUCC (orchestrates all contracts)
Status: PLANNED (specification pending)
OAC — Open Accessibility Contract
Owns:
- Accessibility obligations and requirements
- Evidence model for compliance verification
- Accessibility versioning and compatibility
- Accessibility testing metadata
- Compliance reporting structure
Does NOT Own:
- UI component structure (OUCC)
- Type definitions (OTC)
- Policy enforcement (OPC)
- Accessibility testing tools (implementation concern)
Depends On: OUCC (for component accessibility)
Status: PLANNED (specification pending)
OCD — Open Contract Document
Owns:
- Contract document structure (README, SPECIFICATION, SCHEMA, EXAMPLES, GOVERNANCE)
- Specification format and conventions
- Versioning rules for contracts
- Normative vs non-normative sections
- RFC 2119 keyword usage
Does NOT Own:
- Contract content (each contract owns its own content)
- Implementation details
- Tooling or validation
Depends On: None (meta-standard)
Status: DRAFT
OCC — Open Capability Contract
Owns:
- Capability metadata and discovery format
- Capability packaging structure
- Capability versioning and compatibility
- Capability dependencies and requirements
- Capability registry format
Does NOT Own:
- Capability implementation (runtime concern)
- Type definitions (OTC)
- Event structure (OEC)
- Policy rules (OPC)
- UI components (OUCC)
Depends On: OTC, OEC, OPC, OUCC (describes capabilities using these contracts)
Status: STABLE
Decision Matrix: Which Contract Owns What?
Use this matrix to quickly determine which contract owns a specific concern.
| Concern | Contract | Reason |
|---|---|---|
| Type definition | OTC | Defines canonical types |
| Type schema | OTC | Defines structure |
| Type semantics | OTC | Defines meaning |
| Event structure | OEC | Defines event format |
| Event causality | OEC | Defines event relationships |
| Event data types | OTC | Types are foundational |
| Policy rules | OPC | Defines constraints |
| Policy scope | OPC | Defines what policies apply to |
| Policy data types | OTC | Types are foundational |
| UI component structure | OUCC | Defines component format |
| UI component props | OUCC | Defines component inputs |
| UI prop types | OTC | Types are foundational |
| UI accessibility | OUCC | Component-level accessibility |
| Accessibility obligations | OAC | System-level accessibility |
| Business flow | OBC | Orchestrates capabilities |
| Flow state transitions | OBC | Defines flow logic |
| Capability metadata | OCC | Describes capabilities |
| Capability implementation | None | Implementation concern |
| Contract document format | OCD | Meta-standard |
| Visual styling | ODT | Design tokens (non-normative) |
Common Confusion: OPC vs OBC
Question: What's the difference between OPC (policies) and OBC (business flows)?
Answer:
| Aspect | OPC (Policies) | OBC (Business Flows) |
|---|---|---|
| Purpose | Constrain behavior | Orchestrate behavior |
| Effect | Allow, deny, condition | Compose, sequence, branch |
| Scope | Individual actions | Multi-step processes |
| Example | "Only admins can delete users" | "User registration flow: validate → create → notify → confirm" |
| Evaluation | Synchronous (before action) | Asynchronous (during flow) |
| Outcome | Pass/fail | Success/failure/retry |
Rule of Thumb:
- If it constrains or validates, it's OPC
- If it orchestrates or composes, it's OBC
Common Confusion: OUCC vs ODT
Question: What's the difference between OUCC (UI components) and ODT (design tokens)?
Answer:
| Aspect | OUCC (UI Components) | ODT (Design Tokens) |
|---|---|---|
| Purpose | Define component structure | Define visual vocabulary |
| Scope | Component semantics | Visual styling |
| Example | "Button has label and variant props" | "Primary color is #0FA958" |
| Normative | Yes (core contract) | No (tooling standard) |
| Portability | Component semantics | Visual consistency |
Rule of Thumb:
- If it defines what a component is, it's OUCC
- If it defines how a component looks, it's ODT
Common Confusion: OTC vs OEC
Question: What's the difference between OTC (types) and OEC (events)?
Answer:
| Aspect | OTC (Types) | OEC (Events) |
|---|---|---|
| Purpose | Define data structure | Define immutable facts |
| Mutability | Mutable (data can change) | Immutable (events are facts) |
| Temporality | Timeless (types exist) | Temporal (events happen) |
| Example | "User has id and email" | "UserCreated happened at 10:30 AM" |
| Causality | No causality | Causality chains |
| Versioning | Type versioning | Event versioning |
Rule of Thumb:
- If it defines what something is, it's OTC
- If it defines what happened, it's OEC
Cross-Contract References
Contracts can reference each other. Follow these rules:
Allowed References
| From Contract | To Contract | Purpose |
|---|---|---|
| OEC | OTC | Event data uses types |
| OPC | OTC | Policy data uses types |
| OPC | OEC | Policies emit events |
| OUCC | OTC | Component props use types |
| OUCC | OEC | Components emit events |
| OBC | OTC, OEC, OPC, OUCC | Flows orchestrate all |
| OAC | OUCC | Accessibility for components |
| OCC | OTC, OEC, OPC, OUCC | Capability metadata |
Forbidden References
| From Contract | To Contract | Reason |
|---|---|---|
| OTC | OEC, OPC, OUCC, OBC | Types are foundational (no dependencies) |
| OEC | OPC, OUCC, OBC | Events don't enforce policies or render UI |
| OPC | OUCC, OBC | Policies don't define UI or flows |
| OUCC | OBC | Components don't orchestrate flows |
Mental Model: Layered Architecture
Think of OKHAM contracts as layers:
┌─────────────────────────────────────────┐
│ OBC (Business Flows) │ ← Orchestration Layer
├─────────────────────────────────────────┤
│ OPC (Policies) | OUCC (UI Components) │ ← Application Layer
├─────────────────────────────────────────┤
│ OEC (Events) │ ← Observation Layer
├─────────────────────────────────────────┤
│ OTC (Types) │ ← Foundation Layer
└─────────────────────────────────────────┘
Supporting Standards (Non-Normative):
- OCD (Contract Documents)
- OCC (Capability Metadata)
- ODT (Design Tokens)
- OSR (Snippet Registry)
- OVR/OLR (Validation & Linting)
Rules:
- Lower layers do NOT depend on upper layers
- Upper layers MAY depend on lower layers
- Contracts at the same layer do NOT depend on each other (except where explicitly allowed)
Validation Checklist
Use this checklist to ensure you're using the right contract:
"Should this be in OTC?"
- [ ] Does it define a data structure?
- [ ] Does it define semantic meaning of data?
- [ ] Is it reusable across events, policies, and components?
- [ ] Is it timeless (not tied to a specific event)?
If yes to all, it's OTC.
"Should this be in OEC?"
- [ ] Does it represent an immutable fact?
- [ ] Does it have a timestamp?
- [ ] Does it have causality (parent events)?
- [ ] Is it observable (can be consumed by other systems)?
If yes to all, it's OEC.
"Should this be in OPC?"
- [ ] Does it constrain or validate behavior?
- [ ] Does it have an effect (allow/deny/condition)?
- [ ] Does it have a scope (what it applies to)?
- [ ] Is it declarative (not imperative code)?
If yes to all, it's OPC.
"Should this be in OUCC?"
- [ ] Does it define a UI component?
- [ ] Does it have props (inputs)?
- [ ] Does it have slots (children)?
- [ ] Is it portable (can be rendered in different frameworks)?
If yes to all, it's OUCC.
"Should this be in OBC?"
- [ ] Does it orchestrate multiple capabilities?
- [ ] Does it define state transitions?
- [ ] Does it have multi-step logic?
- [ ] Is it a business process (not a technical process)?
If yes to all, it's OBC.
Anti-Patterns
❌ Anti-Pattern 1: Mixing Type and Event
Wrong:
{
"id": "[email protected]",
"timestamp": "2024-01-16T10:30:00Z",
"causation": []
}
Right:
// OTC Type
{
"id": "[email protected]",
"schema": { /* ... */ }
}
// OEC Event
{
"id": "evt_123",
"type": "[email protected]",
"timestamp": "2024-01-16T10:30:00Z",
"data": {
"$type": "[email protected]",
"id": "user_789"
}
}
❌ Anti-Pattern 2: Mixing Policy and Flow
Wrong:
{
"id": "[email protected]",
"effect": "allow",
"steps": ["validate", "create", "notify"]
}
Right:
// OPC Policy
{
"id": "[email protected]",
"effect": "allow",
"rules": [{ "condition": "user.age >= 18" }]
}
// OBC Flow
{
"id": "[email protected]",
"steps": ["validate", "create", "notify"]
}
❌ Anti-Pattern 3: Mixing Component and Styling
Wrong:
{
"id": "[email protected]",
"props": {
"backgroundColor": "#0FA958",
"fontSize": "16px"
}
}
Right:
// OUCC Component
{
"id": "[email protected]",
"props": {
"variant": { "type": "string", "enum": ["primary", "secondary"] }
}
}
// ODT Design Token
{
"colors": {
"primary": "#0FA958"
}
}
Summary
Key Takeaways:
- OTC defines types (foundational)
- OEC defines events (observation)
- OPC defines policies (constraints)
- OUCC defines UI components (presentation)
- OBC defines business flows (orchestration)
- OAC defines accessibility (compliance)
- OCD defines contract format (meta-standard)
- OCC defines capability metadata (discovery)
Golden Rule: If you're unsure which contract owns a concern, ask:
- "Does it preserve meaning?" → Core contract (OTC, OEC, OPC, OUCC, OBC, OAC)
- "Does it enable tooling?" → Supporting standard (OCD, OCC, ODT, OSR, OVR/OLR)
- "Does it define implementation?" → Not in OKHAM (implementation concern)
Additional Resources
- LLM-START-HERE.md — LLM guidance and anti-hallucination rules
- IMPLEMENTER-GUIDE.md — Implementation patterns and golden path
- CONFORMANCE.md — Compliance levels and checklists
- GLOSSARY.md — Authoritative term definitions
- Standards Documentation — All OKHAM standards
Remember: Each contract has a single, well-defined responsibility. Respect contract boundaries.