[
  {
    "name": "Article",
    "version": "1.0.0",
    "domain": "content.publication",
    "description": "Canonical editorial article with hybrid taxonomy + tag classification for CMS surfaces.",
    "tags": [
      "content",
      "article",
      "hybrid",
      "classifiable"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "ArticleHeadline",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "ArticleWorkflow",
        "parameters": {
          "states": [
            "draft",
            "in_review",
            "scheduled",
            "published",
            "archived"
          ],
          "initialState": "draft"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "ArticleTimestamps",
        "parameters": {
          "recordedEvents": [
            "created",
            "scheduled",
            "published",
            "updated",
            "archived"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "core/Classifiable",
        "alias": "ArticleClassification",
        "parameters": {
          "classification_mode": "hybrid",
          "hierarchy_storage_model": "materialized_path",
          "tag_policy": "moderated",
          "max_tags": 24,
          "require_primary_category": true
        }
      }
    ],
    "relationships": [
      {
        "target": "User",
        "via": "author_id",
        "cardinality": "many-to-one",
        "label": "Author"
      },
      {
        "target": "Media",
        "via": "hero_media_id",
        "cardinality": "many-to-one",
        "label": "Hero media"
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of valid next states from the current status, computed from the\ntransitionRules parameter. When transitionRules is null (open model), this contains\nall states except the current one. Used by StatusSelector to disable invalid options\nand by StatusBadge to indicate available paths.\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "classification_metadata": {
        "type": "ClassificationMetadata",
        "required": true,
        "description": "Operational metadata describing mode, storage model, governance rules, and audit timestamps.\n"
      },
      "categories": {
        "type": "CategoryNode[]",
        "required": false,
        "default": [],
        "description": "Ordered taxonomy nodes scoped to the object."
      },
      "primary_category_id": {
        "type": "string",
        "required": false,
        "description": "Identifier of the canonical taxonomy node."
      },
      "primary_category_path": {
        "type": "string",
        "required": false,
        "description": "Human-readable breadcrumb path (Electronics > Mobile > Android)."
      },
      "tags": {
        "type": "Tag[]",
        "required": false,
        "default": [],
        "description": "Canonical tag collection after synonym collapse."
      },
      "tag_count": {
        "type": "number",
        "required": false,
        "default": 0,
        "description": "Number of canonical tags assigned to the object."
      },
      "tag_preview": {
        "type": "string",
        "required": false,
        "description": "Denormalized comma-delimited preview for list renders."
      },
      "article_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the article document."
      },
      "slug": {
        "type": "string",
        "required": true,
        "description": "Canonical slug rendered in URLs and breadcrumb links.",
        "validation": {
          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
        }
      },
      "author_id": {
        "type": "uuid",
        "required": true,
        "description": "Reference to the authoring user."
      },
      "author_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the authoring user."
      },
      "content_type": {
        "type": "string",
        "required": true,
        "default": "knowledge_base",
        "description": "Editorial template driving layout and governance workflows.",
        "validation": {
          "enum": [
            "knowledge_base",
            "announcement",
            "release_notes",
            "how_to"
          ]
        }
      },
      "excerpt": {
        "type": "string",
        "required": false,
        "description": "Summary text used in list + SEO contexts.",
        "validation": {
          "maxLength": 240
        }
      },
      "body_markdown": {
        "type": "string",
        "required": true,
        "description": "Markdown content rendered in CMS detail views."
      },
      "hero_media_id": {
        "type": "string",
        "required": false,
        "description": "Optional Media object identifier referenced in hero slots."
      },
      "reading_time_minutes": {
        "type": "number",
        "required": false,
        "description": "Estimated reading time derived from body length.",
        "validation": {
          "minimum": 1,
          "maximum": 60
        }
      },
      "locale": {
        "type": "string",
        "required": false,
        "default": "en-US",
        "description": "Locale tag determining headline, copy, and SEO metadata."
      },
      "published_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when the article was published live."
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "Drives the set of enabled options in the state transition UI."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "classification_metadata": {
        "semantic_type": "classification.metadata",
        "token_mapping": "tokenMap(classification.metadata)",
        "ui_hints": {
          "component": "ClassificationDiagnostics"
        }
      },
      "categories": {
        "semantic_type": "classification.categories",
        "token_mapping": "tokenMap(classification.categories.*)",
        "ui_hints": {
          "component": "CategoryTree"
        }
      },
      "tags": {
        "semantic_type": "classification.tags",
        "token_mapping": "tokenMap(classification.tags.*)",
        "ui_hints": {
          "component": "TagTokenCloud",
          "policyParameter": "tag_policy"
        }
      },
      "primary_category_id": {
        "semantic_type": "classification.primary",
        "token_mapping": "tokenMap(classification.primary)",
        "ui_hints": {
          "component": "CategoryBreadcrumb"
        }
      },
      "article_id": {
        "semantic_type": "content.article.id",
        "token_mapping": "tokenMap(content.article.id)"
      },
      "slug": {
        "semantic_type": "content.article.slug",
        "token_mapping": "tokenMap(content.article.slug)"
      },
      "author_id": {
        "semantic_type": "content.article.author",
        "token_mapping": "tokenMap(identity.user.id)",
        "ui_hints": {
          "displayLabelField": "author_name"
        }
      },
      "content_type": {
        "semantic_type": "content.article.type",
        "token_mapping": "tokenMap(content.article.type)"
      },
      "reading_time_minutes": {
        "semantic_type": "content.article.read_time",
        "token_mapping": "tokenMap(metric.duration.short)"
      },
      "locale": {
        "semantic_type": "content.article.locale",
        "token_mapping": "tokenMap(content.locale.badge)"
      },
      "published_at": {
        "semantic_type": "content.article.published_at",
        "token_mapping": "tokenMap(timestamp.published_at)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "ClassificationBadge",
          "position": "after",
          "props": {
            "mode": "{classification_mode}",
            "primaryCategoryField": "primary_category_id",
            "tagPreviewField": "tag_preview"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "ClassificationPanel",
          "position": "sidebar",
          "priority": 40,
          "props": {
            "categoriesField": "categories",
            "tagsField": "tags",
            "metadataField": "classification_metadata",
            "modeParameter": "classification_mode"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "ClassificationEditor",
          "position": "main",
          "props": {
            "modeParameter": "classification_mode",
            "tagPolicyParameter": "tag_policy",
            "maxTagsParameter": "max_tags"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "classification": {
        "category": {
          "badge": {
            "bg": "var(--sys-surface-raised)",
            "border": "var(--sys-border-strong)"
          }
        },
        "tag": {
          "chip": {
            "bg": "var(--sys-surface-muted)",
            "text": "var(--sys-text-strong)"
          }
        }
      },
      "content.article.id": "var(--sys-text-strong)",
      "content.article.slug": "var(--sys-text-muted)",
      "content.article.type": "var(--sys-badge-neutral-fg)",
      "content.article.read_time": "var(--sys-text-subtle)",
      "content.locale.badge": "var(--sys-badge-accent-fg)",
      "timestamp.published_at": "var(--sys-text-muted)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/objects/content/Article.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Invoice",
    "version": "1.0.0",
    "domain": "saas.billing",
    "description": "Canonical SaaS invoice object normalizing payment terms, status, and refund posture.",
    "tags": [
      "billing",
      "invoice",
      "finance"
    ],
    "maturity": "beta",
    "traits": [
      {
        "name": "SaaSBillingPayable",
        "alias": "InvoiceTerms",
        "parameters": null
      },
      {
        "name": "SaaSBillingRefundable",
        "alias": "CreditWindow",
        "parameters": null
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "AuditTrail",
        "parameters": {
          "recordedEvents": [
            "created",
            "posted",
            "payment_initiated",
            "payment_cleared",
            "payment_failed",
            "voided",
            "written_off"
          ],
          "timezone": "UTC",
          "allowNullUpdatedAt": true
        }
      },
      {
        "name": "viz/MarkBar",
        "alias": null,
        "parameters": {
          "title": "Invoice line item amounts",
          "description": "Line-item amounts in the invoice's currency; line items with the same description are summed.",
          "chart": {
            "chartType": "bar",
            "source": "record-array",
            "dataField": "line_items",
            "encodings": {
              "x": {
                "field": "description",
                "title": "Line item"
              },
              "y": {
                "field": "amount_minor",
                "aggregate": "sum",
                "title": "Amount"
              }
            },
            "minorUnits": 100,
            "currencyField": "currency",
            "sampleRows": [
              {
                "description": "Scale plan",
                "quantity": 1,
                "amount_minor": 284000,
                "unit_amount_minor": 284000
              }
            ]
          }
        }
      }
    ],
    "relationships": [
      {
        "target": "Subscription",
        "via": "subscription_id",
        "cardinality": "many-to-one",
        "label": "Subscription"
      }
    ],
    "schema": {
      "invoice_number": {
        "type": "string",
        "required": true,
        "description": "Human readable invoice identifier presented to customers."
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical invoice status after provider mapping.",
        "validation": {
          "enumFromParameter": "statusEnum"
        }
      },
      "provider_status": {
        "type": "string",
        "required": false,
        "description": "Original provider reported status or badge."
      },
      "issued_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp when the invoice was finalized or posted."
      },
      "due_at": {
        "type": "datetime",
        "required": false,
        "description": "Payment due timestamp derived from payment terms."
      },
      "paid_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when full payment cleared."
      },
      "total_minor": {
        "type": "integer",
        "required": true,
        "description": "Total amount due expressed in minor currency units."
      },
      "balance_minor": {
        "type": "integer",
        "required": false,
        "description": "Remaining amount outstanding in minor units.",
        "default": 0
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO 4217 currency for the invoice."
      },
      "payment_terms": {
        "type": "string",
        "required": false,
        "description": "Payment term label describing when payment is expected.",
        "validation": {
          "enumFromParameter": "paymentTerms"
        }
      },
      "collection_state": {
        "type": "string",
        "required": false,
        "description": "Dunning phase or retry program detail presented to success teams."
      },
      "last_reminder_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp of most recent payment reminder issued to customer."
      },
      "aging_bucket_days": {
        "type": "integer",
        "required": false,
        "description": "Number of days outstanding grouped for aging reports."
      },
      "attempt_count": {
        "type": "integer",
        "required": false,
        "description": "Number of automatic payment attempts made on this invoice (Stripe smart-retries attempt_count). Increments on each retry in the dunning window. Source: docs.stripe.com/billing/revenue-recovery/smart-retries.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "next_payment_attempt": {
        "type": "datetime",
        "required": false,
        "description": "When the next automatic payment retry is scheduled (Stripe smart-retries next_payment_attempt). Defines the open end of the retry window — modeled on the Refundable.refundable_until datetime-window precedent. Absent/null when no further attempts are scheduled (retries exhausted → invoice goes uncollectible, mirroring the subscription `unpaid` state). Source: docs.stripe.com/billing/revenue-recovery/smart-retries."
      },
      "memo": {
        "type": "string",
        "required": false,
        "description": "Internal finance note or customer visible memo."
      },
      "refundable_until": {
        "type": "datetime",
        "required": false,
        "description": "Date when refund eligibility window ends for this record."
      },
      "refund_policy_url": {
        "type": "string",
        "required": false,
        "description": "Link to customer facing refund or cancellation policy."
      },
      "total_refunded_minor": {
        "type": "integer",
        "required": false,
        "description": "Cumulative amount refunded in minor currency units.",
        "default": 0
      },
      "credit_memo_balance_minor": {
        "type": "integer",
        "required": false,
        "description": "Remaining credit memo balance that can be applied to invoices.",
        "default": 0
      },
      "credit_memo_type": {
        "type": "string",
        "required": false,
        "description": "Category of credit memo tied to business justification.",
        "validation": {
          "enumFromParameter": "creditMemoTypes"
        }
      },
      "last_refund_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when the most recent refund was issued."
      },
      "requires_manager_approval": {
        "type": "boolean",
        "required": false,
        "description": "Indicates if finance manager approval is required before issuing refund.",
        "default": false
      },
      "notes": {
        "type": "string",
        "required": false,
        "description": "Internal commentary about refund actions or policy exceptions."
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "invoice_id": {
        "type": "string",
        "required": true,
        "description": "Primary identifier for the invoice inside the billing domain."
      },
      "subscription_id": {
        "type": "string",
        "required": true,
        "description": "Subscription identifier this invoice is associated with."
      },
      "provider": {
        "type": "string",
        "required": true,
        "description": "Source system providing invoice data."
      },
      "provider_invoice_id": {
        "type": "string",
        "required": false,
        "description": "Native provider identifier retained for audit trails."
      },
      "billing_contact_name": {
        "type": "string",
        "required": false,
        "description": "Customer billing contact receiving the invoice."
      },
      "billing_contact_email": {
        "type": "email",
        "required": false,
        "description": "Email address for the billing contact."
      },
      "tax_minor": {
        "type": "integer",
        "required": false,
        "description": "Tax amount collected on the invoice in minor currency units."
      },
      "discount_minor": {
        "type": "integer",
        "required": false,
        "description": "Total discounts applied to the invoice in minor units."
      },
      "subtotal_minor": {
        "type": "integer",
        "required": false,
        "description": "Subtotal before discounts and tax in minor units."
      },
      "line_items": {
        "type": "InvoiceLineItem[]",
        "required": false,
        "description": "Normalized line items with quantity, amount_minor, and description fields.",
        "default": []
      },
      "attachments": {
        "type": "AssetReference[]",
        "required": false,
        "description": "Supporting documents or credit memos associated with the invoice.",
        "default": []
      },
      "portal_url": {
        "type": "string",
        "required": false,
        "description": "Link to the hosted invoice or customer billing portal."
      },
      "dunning_step": {
        "type": "string",
        "required": false,
        "description": "Current dunning playbook step label (ex: reminder_1, reminder_final, collections). The structured retry window (attempt_count + next_payment_attempt) is provided by the composed SaaSBillingPayable trait; this field is the human-readable step name."
      },
      "payment_source": {
        "type": "string",
        "required": false,
        "description": "Payment method used or expected (card, ach, wire)."
      }
    },
    "semantics": {
      "invoice_number": {
        "semantic_type": "billing.invoice.number",
        "token_mapping": "tokenMap(billing.invoice.number)"
      },
      "status": {
        "semantic_type": "billing.invoice.status",
        "token_mapping": "tokenMap(billing.invoice.status.*)"
      },
      "provider_status": {
        "semantic_type": "billing.invoice.provider_status",
        "token_mapping": "tokenMap(billing.invoice.provider_status)"
      },
      "issued_at": {
        "semantic_type": "billing.invoice.issued_at",
        "token_mapping": "tokenMap(billing.invoice.issued_at)"
      },
      "due_at": {
        "semantic_type": "billing.invoice.due_at",
        "token_mapping": "tokenMap(billing.invoice.due_at)"
      },
      "paid_at": {
        "semantic_type": "billing.invoice.paid_at",
        "token_mapping": "tokenMap(billing.invoice.paid_at)"
      },
      "total_minor": {
        "semantic_type": "billing.invoice.total_minor",
        "token_mapping": "tokenMap(billing.invoice.total_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "balance_minor": {
        "semantic_type": "billing.invoice.balance_minor",
        "token_mapping": "tokenMap(billing.invoice.balance_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "currency": {
        "semantic_type": "billing.invoice.currency",
        "token_mapping": "tokenMap(billing.invoice.currency)"
      },
      "payment_terms": {
        "semantic_type": "billing.invoice.payment_terms",
        "token_mapping": "tokenMap(billing.invoice.payment_terms)"
      },
      "collection_state": {
        "semantic_type": "billing.invoice.collection_state",
        "token_mapping": "tokenMap(billing.invoice.collection_state)"
      },
      "last_reminder_at": {
        "semantic_type": "billing.invoice.last_reminder_at",
        "token_mapping": "tokenMap(billing.invoice.last_reminder_at)"
      },
      "aging_bucket_days": {
        "semantic_type": "billing.invoice.aging_bucket_days",
        "token_mapping": "tokenMap(billing.invoice.aging_bucket_days)"
      },
      "attempt_count": {
        "semantic_type": "billing.invoice.attempt_count",
        "token_mapping": "tokenMap(billing.invoice.attempt_count)"
      },
      "next_payment_attempt": {
        "semantic_type": "billing.invoice.next_payment_attempt",
        "token_mapping": "tokenMap(billing.invoice.next_payment_attempt)"
      },
      "memo": {
        "semantic_type": "billing.invoice.memo",
        "token_mapping": "tokenMap(billing.invoice.memo)"
      },
      "refundable_until": {
        "semantic_type": "billing.refund.window_end",
        "token_mapping": "tokenMap(billing.refund.window_end)"
      },
      "refund_policy_url": {
        "semantic_type": "billing.refund.policy_link",
        "token_mapping": "tokenMap(billing.refund.policy_link)"
      },
      "total_refunded_minor": {
        "semantic_type": "billing.refund.total_minor",
        "token_mapping": "tokenMap(billing.refund.total_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "credit_memo_balance_minor": {
        "semantic_type": "billing.refund.credit_memo_balance_minor",
        "token_mapping": "tokenMap(billing.refund.credit_memo_balance_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "credit_memo_type": {
        "semantic_type": "billing.refund.credit_memo_type",
        "token_mapping": "tokenMap(billing.refund.credit_memo_type)"
      },
      "last_refund_at": {
        "semantic_type": "billing.refund.last_refund_at",
        "token_mapping": "tokenMap(billing.refund.last_refund_at)"
      },
      "requires_manager_approval": {
        "semantic_type": "billing.refund.requires_manager_approval",
        "token_mapping": "tokenMap(billing.refund.requires_manager_approval)"
      },
      "notes": {
        "semantic_type": "billing.refund.notes",
        "token_mapping": "tokenMap(billing.refund.notes)"
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "invoice_id": {
        "semantic_type": "billing.invoice.id",
        "token_mapping": "tokenMap(billing.invoice.id)"
      },
      "subscription_id": {
        "semantic_type": "billing.invoice.subscription_id",
        "token_mapping": "tokenMap(billing.invoice.subscription_id)"
      },
      "provider": {
        "semantic_type": "billing.invoice.provider",
        "token_mapping": "tokenMap(billing.invoice.provider)"
      },
      "provider_invoice_id": {
        "semantic_type": "billing.invoice.provider_id",
        "token_mapping": "tokenMap(billing.invoice.provider_id)"
      },
      "billing_contact_name": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(billing.invoice.billing_contact_name)"
      },
      "billing_contact_email": {
        "semantic_type": "billing.invoice.billing_contact_email",
        "token_mapping": "tokenMap(billing.invoice.billing_contact_email)"
      },
      "tax_minor": {
        "semantic_type": "billing.invoice.tax_minor",
        "token_mapping": "tokenMap(billing.invoice.tax_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "discount_minor": {
        "semantic_type": "billing.invoice.discount_minor",
        "token_mapping": "tokenMap(billing.invoice.discount_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "subtotal_minor": {
        "semantic_type": "billing.invoice.subtotal_minor",
        "token_mapping": "tokenMap(billing.invoice.subtotal_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "line_items": {
        "semantic_type": "billing.invoice.line_items",
        "token_mapping": "tokenMap(billing.invoice.line_items)"
      },
      "attachments": {
        "semantic_type": "billing.invoice.attachments",
        "token_mapping": "tokenMap(billing.invoice.attachments)"
      },
      "portal_url": {
        "semantic_type": "billing.invoice.portal_url",
        "token_mapping": "tokenMap(billing.invoice.portal_url)"
      },
      "dunning_step": {
        "semantic_type": "billing.invoice.dunning_step",
        "token_mapping": "tokenMap(billing.invoice.dunning_step)"
      },
      "payment_source": {
        "semantic_type": "billing.invoice.payment_source",
        "token_mapping": "tokenMap(billing.invoice.payment_source)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "BillingSummaryBadge",
          "position": "after",
          "props": {
            "amountField": "total_minor",
            "currencyField": "currency",
            "minorUnits": 100,
            "showInterval": false
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        }
      ],
      "card": [
        {
          "component": "BillingSummaryBadge",
          "position": "after",
          "props": {
            "amountField": "total_minor",
            "currencyField": "currency",
            "minorUnits": 100,
            "showInterval": false
          }
        }
      ],
      "detail": [
        {
          "component": "VizMarkPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "bar",
              "source": "record-array",
              "dataField": "line_items",
              "encodings": {
                "x": {
                  "field": "description",
                  "title": "Line item"
                },
                "y": {
                  "field": "amount_minor",
                  "aggregate": "sum",
                  "title": "Amount"
                }
              },
              "minorUnits": 100,
              "currencyField": "currency",
              "sampleRows": [
                {
                  "description": "Scale plan",
                  "quantity": 1,
                  "amount_minor": 284000,
                  "unit_amount_minor": 284000
                }
              ]
            },
            "title": "Invoice line item amounts",
            "description": "Line-item amounts in the invoice's currency; line items with the same description are summed."
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "dashboard": [
        {
          "component": "VizMarkPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "bar",
              "source": "record-array",
              "dataField": "line_items",
              "encodings": {
                "x": {
                  "field": "description",
                  "title": "Line item"
                },
                "y": {
                  "field": "amount_minor",
                  "aggregate": "sum",
                  "title": "Amount"
                }
              },
              "minorUnits": 100,
              "currencyField": "currency",
              "sampleRows": [
                {
                  "description": "Scale plan",
                  "quantity": 1,
                  "amount_minor": 284000,
                  "unit_amount_minor": 284000
                }
              ]
            },
            "title": "Invoice line item amounts",
            "description": "Line-item amounts in the invoice's currency; line items with the same description are summed."
          }
        }
      ]
    },
    "tokens": {
      "billing.invoice.number": "var(--cmp-text-strong)",
      "billing.invoice.total_minor": "var(--cmp-text-body-strong)",
      "billing.invoice.balance_minor": "var(--cmp-text-warning)",
      "billing.invoice.status.past_due": "var(--cmp-status-critical-text)",
      "billing.invoice.status.paid": "var(--cmp-status-success-text)",
      "billing.refund.total_minor": "var(--cmp-text-accent)",
      "billing.refund.credit_memo_balance_minor": "var(--cmp-text-info)",
      "billing.refund.requires_manager_approval": "var(--cmp-badge-text-warning)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "viz.mark.bar.fill.default": "var(--cmp-viz-mark-bar-fill)",
      "viz.mark.bar.stroke.default": "var(--cmp-viz-mark-bar-stroke)",
      "viz.mark.bar.spacing": "var(--cmp-viz-mark-spacing)",
      "billing.invoice.id": "var(--cmp-text-strong)",
      "billing.invoice.billing_contact_name": "var(--cmp-text-body-strong)",
      "billing.invoice.payment_source": "var(--cmp-text-subtle)",
      "billing.invoice.dunning_step": "var(--cmp-badge-text-warning)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/domains/saas-billing/objects/Invoice.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Media",
    "version": "1.0.0",
    "domain": "content.asset",
    "description": "Canonical digital asset metadata powering media library, DAM, and CMS integrations.",
    "tags": [
      "content",
      "media",
      "asset",
      "classifiable"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "MediaLabel",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": "MediaLifecycle",
        "parameters": {
          "states": [
            "ingested",
            "processing",
            "available",
            "deprecated"
          ],
          "initialState": "ingested"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "MediaTimestamps",
        "parameters": {
          "recordedEvents": [
            "ingested",
            "transcoded",
            "published",
            "archived"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "core/Classifiable",
        "alias": "MediaClassification",
        "parameters": {
          "classification_mode": "tag",
          "tag_policy": "open",
          "max_tags": 32
        }
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of valid next states from the current status, computed from the\ntransitionRules parameter. When transitionRules is null (open model), this contains\nall states except the current one. Used by StatusSelector to disable invalid options\nand by StatusBadge to indicate available paths.\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "classification_metadata": {
        "type": "ClassificationMetadata",
        "required": true,
        "description": "Operational metadata describing mode, storage model, governance rules, and audit timestamps.\n"
      },
      "categories": {
        "type": "CategoryNode[]",
        "required": false,
        "default": [],
        "description": "Ordered taxonomy nodes scoped to the object."
      },
      "primary_category_id": {
        "type": "string",
        "required": false,
        "description": "Identifier of the canonical taxonomy node."
      },
      "primary_category_path": {
        "type": "string",
        "required": false,
        "description": "Human-readable breadcrumb path (Electronics > Mobile > Android)."
      },
      "tags": {
        "type": "Tag[]",
        "required": false,
        "default": [],
        "description": "Canonical tag collection after synonym collapse."
      },
      "tag_count": {
        "type": "number",
        "required": false,
        "default": 0,
        "description": "Number of canonical tags assigned to the object."
      },
      "tag_preview": {
        "type": "string",
        "required": false,
        "description": "Denormalized comma-delimited preview for list renders."
      },
      "media_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the media asset across services."
      },
      "asset_type": {
        "type": "string",
        "required": true,
        "description": "Media form factor guiding viewer presentation.",
        "validation": {
          "enum": [
            "image",
            "video",
            "audio",
            "document"
          ]
        }
      },
      "mime_type": {
        "type": "string",
        "required": true,
        "description": "IANA MIME type recorded at ingestion."
      },
      "storage_bucket": {
        "type": "string",
        "required": true,
        "description": "Storage namespace (S3 bucket, GCS bucket) backing the asset."
      },
      "object_key": {
        "type": "string",
        "required": true,
        "description": "Provider-specific path or key referencing the binary object."
      },
      "source_url": {
        "type": "string",
        "required": false,
        "description": "Canonical CDN URL for public consumption."
      },
      "checksum": {
        "type": "string",
        "required": false,
        "description": "Hex-encoded checksum (SHA-256) for deduplication."
      },
      "file_size_bytes": {
        "type": "number",
        "required": true,
        "description": "Size of the binary payload in bytes.",
        "validation": {
          "minimum": 0
        }
      },
      "width_px": {
        "type": "number",
        "required": false,
        "description": "Pixel width for images/videos when available.",
        "validation": {
          "minimum": 1
        }
      },
      "height_px": {
        "type": "number",
        "required": false,
        "description": "Pixel height for images/videos when available.",
        "validation": {
          "minimum": 1
        }
      },
      "duration_seconds": {
        "type": "number",
        "required": false,
        "description": "Media playback duration for video/audio assets.",
        "validation": {
          "minimum": 0
        }
      },
      "transcoding_profiles": {
        "type": "string[]",
        "required": false,
        "description": "List of transcoding profiles generated for the asset.",
        "default": []
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "Drives the set of enabled options in the state transition UI."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "classification_metadata": {
        "semantic_type": "classification.metadata",
        "token_mapping": "tokenMap(classification.metadata)",
        "ui_hints": {
          "component": "ClassificationDiagnostics"
        }
      },
      "categories": {
        "semantic_type": "classification.categories",
        "token_mapping": "tokenMap(classification.categories.*)",
        "ui_hints": {
          "component": "CategoryTree"
        }
      },
      "tags": {
        "semantic_type": "classification.tags",
        "token_mapping": "tokenMap(classification.tags.*)",
        "ui_hints": {
          "component": "TagTokenCloud",
          "policyParameter": "tag_policy"
        }
      },
      "primary_category_id": {
        "semantic_type": "classification.primary",
        "token_mapping": "tokenMap(classification.primary)",
        "ui_hints": {
          "component": "CategoryBreadcrumb"
        }
      },
      "media_id": {
        "semantic_type": "media.asset.id",
        "token_mapping": "tokenMap(media.asset.id)"
      },
      "asset_type": {
        "semantic_type": "media.asset.type",
        "token_mapping": "tokenMap(media.asset.type)"
      },
      "mime_type": {
        "semantic_type": "media.asset.mime",
        "token_mapping": "tokenMap(media.asset.mime)"
      },
      "file_size_bytes": {
        "semantic_type": "media.asset.size",
        "token_mapping": "tokenMap(metric.storage.bytes)"
      },
      "duration_seconds": {
        "semantic_type": "media.asset.duration",
        "token_mapping": "tokenMap(metric.duration.media)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "ClassificationBadge",
          "position": "after",
          "props": {
            "mode": "{classification_mode}",
            "primaryCategoryField": "primary_category_id",
            "tagPreviewField": "tag_preview"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "ClassificationPanel",
          "position": "sidebar",
          "priority": 40,
          "props": {
            "categoriesField": "categories",
            "tagsField": "tags",
            "metadataField": "classification_metadata",
            "modeParameter": "classification_mode"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "ClassificationEditor",
          "position": "main",
          "props": {
            "modeParameter": "classification_mode",
            "tagPolicyParameter": "tag_policy",
            "maxTagsParameter": "max_tags"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "classification": {
        "category": {
          "badge": {
            "bg": "var(--sys-surface-raised)",
            "border": "var(--sys-border-strong)"
          }
        },
        "tag": {
          "chip": {
            "bg": "var(--sys-surface-muted)",
            "text": "var(--sys-text-strong)"
          }
        }
      },
      "media.asset.id": "var(--sys-text-strong)",
      "media.asset.type": "var(--sys-badge-neutral-fg)",
      "media.asset.mime": "var(--sys-text-muted)",
      "metric.storage.bytes": "var(--sys-text-subtle)",
      "metric.duration.media": "var(--sys-text-subtle)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/objects/content/Media.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Organization",
    "version": "1.2.0",
    "domain": "core.account",
    "description": "Canonical account record for tenant and workspace governance across the platform.",
    "tags": [
      "universal",
      "organization",
      "tenant"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "OrganizationLabel",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": null,
        "parameters": {
          "states": [
            "prospect",
            "onboarding",
            "active",
            "churned"
          ],
          "initialState": "prospect"
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": null,
        "parameters": {
          "ownerTypes": [
            "parent_organization",
            "reseller",
            "platform"
          ],
          "primaryOwnerType": "parent_organization",
          "allowTransfer": true
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": null,
        "parameters": {
          "recordedEvents": [
            "created",
            "plan_upgraded",
            "plan_downgraded",
            "ownership_transferred"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "behavioral/Taggable",
        "alias": null,
        "parameters": {
          "maxTags": 16,
          "allowCustomTags": false,
          "allowedTags": [
            "enterprise",
            "smb",
            "nonprofit",
            "startup",
            "strategic"
          ],
          "caseSensitive": false
        }
      },
      {
        "name": "core/Addressable",
        "alias": "OrganizationLocations",
        "parameters": {
          "roles": [
            "headquarters",
            "office",
            "warehouse",
            "branch"
          ],
          "defaultRole": "headquarters"
        }
      },
      {
        "name": "core/Preferenceable",
        "alias": "OrganizationPreferences",
        "parameters": {
          "namespaces": [
            "notifications",
            "display",
            "privacy"
          ],
          "schemaVersion": "2.0.0",
          "registryNamespace": "org-preferences"
        }
      },
      {
        "name": "core/Authable",
        "alias": "OrganizationAuthz",
        "parameters": {
          "hierarchyDepthLimit": 5
        }
      },
      {
        "name": "core/Communicable",
        "alias": "OrganizationCommunications",
        "parameters": null
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of valid next states from the current status, computed from the\ntransitionRules parameter. When transitionRules is null (open model), this contains\nall states except the current one. Used by StatusSelector to disable invalid options\nand by StatusBadge to indicate available paths.\n",
        "default": []
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "tags": {
        "type": "string[]",
        "required": false,
        "description": "Ordered list of tags assigned to the entity.",
        "default": [],
        "validation": {
          "maxItems": 64
        }
      },
      "tag_count": {
        "type": "number",
        "required": true,
        "description": "Computed number of tags assigned to the entity.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "tag_metadata": {
        "type": "object[]",
        "required": false,
        "description": "Per-tag governance metadata. Each entry corresponds to a tag in the tags array and\ntracks provenance and usage for taxonomy health monitoring.\n\nEntry structure:\n  - tag: string (the tag value, matches entry in tags array)\n  - created_at: ISO 8601 datetime\n  - created_by: string (user ID or \"system\" for allow-list tags)\n  - usage_count: number (how many entities use this tag, computed)\n  - moderation_status: \"approved\" | \"pending\" | \"rejected\" (when allowTagModeration is true)\n  - canonical_form: string (resolved synonym target, when synonymResolution is enabled)\n",
        "default": []
      },
      "address_roles": {
        "type": "string[]",
        "required": true,
        "description": "Ordered list of roles that currently have address entries.",
        "default": []
      },
      "default_address_role": {
        "type": "string",
        "required": false,
        "description": "Role surfaced in UI contexts when one address must be highlighted.",
        "validation": {
          "enumFromParameter": "roles"
        }
      },
      "addresses": {
        "type": "AddressableEntry[]",
        "required": false,
        "description": "Collection of { role, address, metadata } entries keyed by role.",
        "default": []
      },
      "preference_document": {
        "type": "PreferenceDocument",
        "required": true,
        "description": "Normalized preference payload captured by PreferenceStore (version, preferences map, metadata).",
        "default": {
          "version": "1.0.0",
          "preferences": {
            "theme": {
              "mode": "system"
            },
            "notifications": {
              "mention": {
                "email": true,
                "push": true
              }
            }
          },
          "metadata": {
            "schemaVersion": "1.0.0",
            "lastUpdated": "2025-11-18T00:00:00Z",
            "source": "system",
            "migrationApplied": []
          }
        }
      },
      "preference_metadata": {
        "type": "PreferenceMetadata",
        "required": true,
        "description": "Tracks schema version, lastUpdated timestamp, migration records, and source."
      },
      "preference_version": {
        "defaultFromParameter": "schemaVersion",
        "type": "string",
        "required": true,
        "description": "SemVer mirror of preference_document.version for indexing and analytics.",
        "validation": {
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        }
      },
      "preference_namespaces": {
        "defaultFromParameter": "namespaces",
        "type": "string[]",
        "required": true,
        "description": "Materialized namespace list resolved from parameters/registry for auditing.",
        "default": [
          "theme",
          "notifications",
          "display"
        ]
      },
      "preference_mutations": {
        "type": "number",
        "required": false,
        "description": "Monotonic counter incremented whenever preferences mutate (invalidates caches).",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "role_catalog": {
        "type": "AuthzRoleDocument[]",
        "required": true,
        "description": "Canonical RBAC roles (R21.2 Part 4.2 TABLE 1).",
        "examples": [
          [
            {
              "id": "11111111-1111-4111-8111-111111111111",
              "name": "Owner",
              "description": "Full tenant access + invoice approval (R21.2 Table 1)."
            },
            {
              "id": "22222222-2222-4222-8222-222222222222",
              "name": "Approver",
              "description": "Workflow approver for compliance-sensitive documents."
            },
            {
              "id": "33333333-3333-4333-8333-333333333333",
              "name": "Editor",
              "description": "Contributor allowed to create + update documents in scope."
            }
          ]
        ],
        "default": []
      },
      "permission_catalog": {
        "type": "AuthzPermissionDocument[]",
        "required": true,
        "description": "Atomic permissions following resource:action notation (TABLE 2).",
        "default": []
      },
      "role_permissions": {
        "type": "Record<string, string[]>",
        "required": true,
        "description": "Junction map for role→permission edges (TABLE 3).",
        "default": {}
      },
      "membership_records": {
        "type": "AuthzMembershipDocument[]",
        "required": true,
        "description": "SaaS membership triple (user_id, organization_id, role_id) with UNIQUE constraint (TABLE 4).",
        "default": []
      },
      "role_hierarchy_edges": {
        "type": "AuthzRoleHierarchyEdge[]",
        "required": false,
        "description": "Parent→child adjacency list for hierarchical RBAC (Part 3.1).",
        "default": []
      },
      "session_roles": {
        "type": "string[]",
        "required": false,
        "description": "Materialized roles granted within the current session/token exchange.",
        "default": []
      },
      "channel_catalog": {
        "type": "Channel[]",
        "required": true,
        "description": "Provider configuration for each channel (SMTP/Twilio/FCM/Webhook).",
        "examples": [
          [
            {
              "id": "44444444-dddd-4ddd-8ddd-dddddddddddd",
              "name": "Primary Email (SMTP)",
              "type": "email"
            },
            {
              "id": "55555555-eeee-4eee-8eee-eeeeeeeeeeee",
              "name": "Twilio SMS",
              "type": "sms"
            },
            {
              "id": "66666666-ffff-4fff-8fff-ffffffffffff",
              "name": "FCM Push",
              "type": "push"
            },
            {
              "id": "77777777-0000-4000-8000-000000000000",
              "name": "Realtime In-App",
              "type": "in_app"
            }
          ]
        ],
        "default": []
      },
      "template_catalog": {
        "type": "Template[]",
        "required": true,
        "description": "Localized template definitions with declared variables per R20.1 Part 2.3.",
        "examples": [
          [
            {
              "id": "88888888-1111-4111-8111-111111111111",
              "name": "Welcome Email",
              "channelType": "email",
              "subject": "Welcome to OODS Foundry, {{firstName}}!",
              "body": "Hi {{firstName}},\n\nThanks for joining {{workspaceName}}. Activate your account using {{activationLink}}.",
              "variables": [
                "firstName",
                "workspaceName",
                "activationLink"
              ],
              "locale": "en-US"
            },
            {
              "id": "99999999-2222-4222-8222-222222222222",
              "name": "Password Reset Email",
              "channelType": "email",
              "subject": "Reset your OODS Foundry password",
              "body": "Hello {{firstName}},\n\nWe received a request to reset your password. Use this code: {{resetCode}}.",
              "variables": [
                "firstName",
                "resetCode"
              ],
              "locale": "en-US"
            },
            {
              "id": "aaaaaaa1-3333-4333-8333-333333333333",
              "name": "In-App Notification",
              "channelType": "in_app",
              "subject": "New document shared with you",
              "body": "{{actorName}} shared \"{{documentName}}\" with you. Review it before {{dueDate}}.",
              "variables": [
                "actorName",
                "documentName",
                "dueDate"
              ],
              "locale": "en-US"
            }
          ]
        ],
        "default": []
      },
      "delivery_policies": {
        "type": "DeliveryPolicy[]",
        "required": true,
        "description": "Retry/throttle/quiet-hour policies (R20.1 Part 3 lifecycle).",
        "default": []
      },
      "messages": {
        "type": "Message[]",
        "required": false,
        "description": "Atomic message payloads queued for delivery (R20.6 Part 1.2 primitives).",
        "default": []
      },
      "conversations": {
        "type": "Conversation[]",
        "required": false,
        "description": "Multi-party threaded conversations with membership metadata (R20.6 Part 3.3).",
        "default": []
      },
      "message_statuses": {
        "type": "MessageStatusEntry[]",
        "required": false,
        "description": "Delivery state machine transitions (queued → sent → delivered → failed → retried → read).",
        "default": []
      },
      "organization_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the organization tenant."
      },
      "domain": {
        "type": "string",
        "required": true,
        "description": "Verified root domain associated with the organization.",
        "validation": {
          "format": "hostname"
        }
      },
      "plan_tier": {
        "type": "string",
        "required": true,
        "description": "Billing plan currently assigned to the organization.",
        "validation": {
          "enum": [
            "free",
            "growth",
            "enterprise"
          ]
        }
      },
      "billing_status": {
        "type": "string",
        "required": true,
        "default": "good_standing",
        "description": "Coarse account-level financial standing used by the billing subsystem. Intentionally coarser than the subscription lifecycle: this is a 4-state account vocabulary {good_standing, past_due, unpaid, suspended}, NOT the 8-state billing.subscription.status set. See docs/billing/lifecycle-states.md.",
        "validation": {
          "enum": [
            "good_standing",
            "past_due",
            "unpaid",
            "suspended"
          ]
        }
      },
      "industry": {
        "type": "string",
        "required": false,
        "description": "Optional NAICS-derived industry tag."
      },
      "employee_count": {
        "type": "number",
        "required": false,
        "description": "Reported number of active employees.",
        "validation": {
          "minimum": 0
        }
      },
      "billing_contact_email": {
        "type": "email",
        "required": false,
        "description": "Primary contact email for invoicing and finance escalations."
      },
      "data_residency": {
        "type": "string",
        "required": false,
        "description": "Preferred data residency region selected during onboarding.",
        "validation": {
          "enum": [
            "us",
            "eu",
            "apac",
            "latam"
          ]
        }
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the owning principal (parent organization, reseller or platform team)."
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "Drives the set of enabled options in the state transition UI."
        }
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "tags": {
        "semantic_type": "taxonomy.tag.collection",
        "token_mapping": "tokenMap(taxonomy.tag.*)",
        "ui_hints": {
          "component": "TagCollection",
          "allowCreateParameter": "allowCustomTags",
          "allowListParameter": "allowedTags",
          "caseSensitiveParameter": "caseSensitive"
        }
      },
      "tag_count": {
        "semantic_type": "metric.collection.count",
        "token_mapping": "tokenMap(taxonomy.tag.count)",
        "ui_hints": {
          "component": "MetricBadge",
          "format": "integer"
        }
      },
      "tag_metadata": {
        "semantic_type": "taxonomy.tag.governance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "TagGovernancePanel",
          "description": "Admin panel for reviewing tag health, moderation queue, and synonym resolution."
        }
      },
      "addresses": {
        "semantic_type": "location.address.collection",
        "token_mapping": "tokenMap(location.address.collection)",
        "ui_hints": {
          "component": "AddressCollection",
          "roleParameter": "roles",
          "defaultRoleField": "default_address_role"
        }
      },
      "default_address_role": {
        "semantic_type": "location.address.default_role",
        "token_mapping": "tokenMap(location.address.default_role)",
        "ui_hints": {
          "component": "AddressRoleBadge",
          "parameterSource": "defaultRole"
        }
      },
      "address_roles": {
        "semantic_type": "location.address.roles",
        "token_mapping": "tokenMap(location.address.roles)",
        "ui_hints": {
          "component": "AddressRolePills"
        }
      },
      "preference_document": {
        "semantic_type": "preferences.document",
        "token_mapping": "tokenMap(preferences.document)",
        "ui_hints": {
          "component": "PreferenceDiffPanel",
          "registryNamespaceParameter": "registryNamespace"
        }
      },
      "preference_metadata": {
        "semantic_type": "preferences.metadata",
        "token_mapping": "tokenMap(preferences.metadata)",
        "ui_hints": {
          "component": "PreferenceDiagnostics"
        }
      },
      "preference_version": {
        "semantic_type": "preferences.version",
        "token_mapping": "tokenMap(preferences.version)",
        "ui_hints": {
          "component": "PreferenceVersionBadge"
        }
      },
      "preference_namespaces": {
        "semantic_type": "preferences.namespaces",
        "token_mapping": "tokenMap(preferences.namespaces)",
        "ui_hints": {
          "component": "PreferenceNamespaceChips"
        }
      },
      "membership_records": {
        "semantic_type": "authorization.memberships",
        "token_mapping": "tokenMap(authorization.memberships)",
        "ui_hints": {
          "component": "MembershipMatrix",
          "uniqueConstraint": "user_id+organization_id+role_id"
        }
      },
      "role_catalog": {
        "semantic_type": "authorization.roles",
        "token_mapping": "tokenMap(authorization.roles)",
        "ui_hints": {
          "component": "RoleCatalogPanel"
        }
      },
      "permission_catalog": {
        "semantic_type": "authorization.permissions",
        "token_mapping": "tokenMap(authorization.permissions)",
        "ui_hints": {
          "component": "PermissionList"
        }
      },
      "channel_catalog": {
        "semantic_type": "communication.channels",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "ChannelGrid",
          "badges": "channel_catalog[].type"
        }
      },
      "template_catalog": {
        "semantic_type": "communication.templates",
        "token_mapping": "--sys-communication-muted",
        "ui_hints": {
          "component": "TemplateDrawer",
          "variableBadge": "template_catalog[].variables"
        }
      },
      "delivery_policies": {
        "semantic_type": "communication.delivery_policy",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "DeliveryPolicyCapsule"
        }
      },
      "messages": {
        "semantic_type": "communication.messages",
        "token_mapping": "--sys-communication-success",
        "ui_hints": {
          "component": "MessageTimeline"
        }
      },
      "conversations": {
        "semantic_type": "communication.conversations",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "ConversationViewer"
        }
      },
      "organization_id": {
        "semantic_type": "organization.id",
        "token_mapping": "tokenMap(organization.id.primary)"
      },
      "domain": {
        "semantic_type": "organization.domain",
        "token_mapping": "tokenMap(organization.domain.primary)"
      },
      "plan_tier": {
        "semantic_type": "organization.plan.tier",
        "token_mapping": "tokenMap(organization.plan.tier)"
      },
      "billing_status": {
        "semantic_type": "billing.account.status",
        "token_mapping": "tokenMap(billing.account.status)"
      },
      "employee_count": {
        "semantic_type": "organization.metrics.employee_count",
        "token_mapping": "tokenMap(metric.count.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "MessageStatusBadge",
          "position": "before",
          "priority": 90,
          "props": {
            "statusesField": "message_statuses"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "TagPills",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        },
        {
          "component": "AddressSummaryBadge",
          "position": "after",
          "props": {
            "field": "default_address_role"
          }
        },
        {
          "component": "PreferenceSummaryBadge",
          "position": "after",
          "props": {
            "namespacesField": "preference_namespaces",
            "versionField": "preference_version"
          }
        },
        {
          "component": "RoleBadgeList",
          "position": "after",
          "props": {
            "rolesField": "session_roles",
            "fallbackRoleParameter": "defaultRoleId"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "CommunicationDetailPanel",
          "position": "main",
          "priority": 80,
          "props": {
            "channelsField": "channel_catalog",
            "templatesField": "template_catalog",
            "policiesField": "delivery_policies",
            "conversationsField": "conversations"
          }
        },
        {
          "component": "MembershipPanel",
          "position": "main",
          "priority": 75,
          "props": {
            "membershipsField": "membership_records",
            "hierarchyField": "role_hierarchy_edges",
            "roleField": "role_catalog",
            "permissionField": "permission_catalog"
          }
        },
        {
          "component": "AddressCollectionPanel",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "addresses",
            "roleField": "address_roles",
            "defaultRoleField": "default_address_role",
            "roleParameter": "roles"
          }
        },
        {
          "component": "PreferencePanel",
          "position": "main",
          "priority": 55,
          "props": {
            "preferencesField": "preference_document",
            "metadataField": "preference_metadata",
            "namespaceField": "preference_namespaces"
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "TagSummary",
          "position": "top",
          "props": {
            "field": "tags",
            "countField": "tag_count"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "TagInput",
          "position": "top",
          "props": {
            "field": "tags",
            "maxTagsParameter": "maxTags",
            "allowCustomParameter": "allowCustomTags",
            "allowListParameter": "allowedTags",
            "minLengthParameter": "tagMinLength",
            "maxLengthParameter": "tagMaxLength",
            "synonymParameter": "synonymResolution"
          }
        },
        {
          "component": "AddressEditor",
          "position": "top",
          "props": {
            "field": "addresses",
            "roleParameter": "roles",
            "allowDynamicParameter": "allowDynamicRoles",
            "defaultRoleField": "default_address_role"
          }
        },
        {
          "component": "PreferenceEditor",
          "position": "main",
          "props": {
            "namespacesField": "preference_namespaces",
            "documentField": "preference_document",
            "registryNamespaceParameter": "registryNamespace"
          }
        },
        {
          "component": "RoleAssignmentForm",
          "position": "main",
          "props": {
            "availableRolesField": "role_catalog",
            "membershipField": "membership_records",
            "defaultRoleParameter": "defaultRoleId"
          }
        },
        {
          "component": "TemplatePicker",
          "position": "main",
          "props": {
            "templatesField": "template_catalog",
            "channelsField": "channel_catalog"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        },
        {
          "component": "TagPills",
          "position": "after",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "taxonomy.tag.chip.bg": "var(--surface-tag-bg)",
      "taxonomy.tag.chip.text": "var(--surface-tag-text)",
      "taxonomy.tag.chip.border": "var(--sys-border-default)",
      "taxonomy.tag.chip.hover.bg": "var(--sys-surface-hover)",
      "taxonomy.tag.chip.pending.bg": "var(--sys-status-warning-surface)",
      "taxonomy.tag.chip.pending.text": "var(--sys-status-warning-text)",
      "taxonomy.tag.summary.count": "var(--text-subtle)",
      "taxonomy.tag.input.border": "var(--sys-border-default)",
      "taxonomy.tag.input.focus.border": "var(--sys-border-focus)",
      "location.address.card.bg": "var(--sys-surface-raised)",
      "location.address.card.border": "var(--sys-border-subtle)",
      "location.address.role.text": "var(--sys-text-muted)",
      "preferences.panel.bg": "var(--sys-surface-raised)",
      "preferences.panel.border": "var(--sys-border-strong)",
      "preferences.namespace.badge.bg": "var(--sys-surface-muted)",
      "preferences.namespace.badge.text": "var(--sys-text-strong)",
      "auth.roles.badge.bg": "var(--sys-surface-neutral)",
      "auth.roles.badge.text": "var(--sys-text-strong)",
      "auth.membership.card.border": "var(--sys-border-strong)",
      "auth.membership.card.bg": "var(--sys-surface-raised)",
      "communication.card.bg": "var(--sys-surface-raised)",
      "communication.card.border": "var(--sys-communication-muted)",
      "communication.status.success": "var(--sys-communication-success)",
      "communication.status.error": "var(--sys-communication-error)",
      "organization.id.primary": "var(--text-strong)",
      "organization.domain.primary": "var(--text-strong)",
      "billing.account.status.good": "var(--status-success)",
      "billing.account.status.risk": "var(--status-warning)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/objects/core/Organization.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Plan",
    "version": "1.0.0",
    "domain": "saas.billing",
    "description": "Normalized plan definition capturing pricing, packaging, and entitlement metadata.",
    "tags": [
      "billing",
      "plan",
      "packaging"
    ],
    "maturity": "beta",
    "traits": [
      {
        "name": "SaaSBillingBillable",
        "alias": "Pricing",
        "parameters": null
      },
      {
        "name": "SaaSBillingMetered",
        "alias": "IncludedUsage",
        "parameters": {
          "unit": "seats",
          "rolloverStrategy": "none",
          "sampleWindowDays": 30
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": "PlanOwnership",
        "parameters": null
      }
    ],
    "relationships": [
      {
        "target": "Plan",
        "via": "upgrade_targets",
        "cardinality": "many-to-many",
        "label": "Upgrade destinations"
      },
      {
        "target": "Plan",
        "via": "downgrade_targets",
        "cardinality": "many-to-many",
        "label": "Downgrade destinations"
      }
    ],
    "schema": {
      "plan_code": {
        "type": "string",
        "required": true,
        "description": "Provider specific identifier for the plan or price."
      },
      "plan_name": {
        "type": "string",
        "required": true,
        "description": "Human readable plan label rendered in list and detail contexts."
      },
      "billing_interval": {
        "type": "string",
        "required": true,
        "description": "Billing cadence name selected from supportedIntervals.",
        "validation": {
          "enumFromParameter": "supportedIntervals"
        }
      },
      "interval_count": {
        "type": "integer",
        "required": false,
        "description": "Multiplier for interval (ex: 12 with monthly => yearly cadence).",
        "default": 1
      },
      "amount_minor": {
        "type": "integer",
        "required": true,
        "description": "Contract value expressed in minor currency units."
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO 4217 currency for the plan price.",
        "defaultFromParameter": "defaultCurrency"
      },
      "trial_period_days": {
        "type": "integer",
        "required": false,
        "description": "Length of introductory trial period in days."
      },
      "collection_method": {
        "type": "string",
        "required": false,
        "description": "How billing is collected (charge_automatically, send_invoice)."
      },
      "billing_anchor_day": {
        "type": "integer",
        "required": false,
        "description": "Day of month used to anchor renewals when prorating.",
        "validation": {
          "minimum": 1,
          "maximum": 31
        }
      },
      "pricing_model": {
        "type": "string",
        "required": false,
        "description": "Price strategy (flat, per_unit, tiered, package).",
        "default": "flat"
      },
      "meter_name": {
        "type": "string",
        "required": true,
        "description": "Friendly metered feature name shown in UI (ex: Analytics Seats)."
      },
      "included_quantity": {
        "type": "integer",
        "required": true,
        "description": "Quantity included in base plan before overages."
      },
      "consumed_quantity": {
        "type": "integer",
        "required": true,
        "description": "Actual quantity consumed in the active period."
      },
      "unit_label": {
        "type": "string",
        "required": true,
        "description": "Label for display, defaults to the unit parameter.",
        "defaultFromParameter": "unit"
      },
      "period_start": {
        "type": "date",
        "required": true,
        "description": "Date the usage accumulation window began."
      },
      "period_end": {
        "type": "date",
        "required": true,
        "description": "Date the usage accumulation window ends."
      },
      "rollover_strategy": {
        "type": "string",
        "required": false,
        "description": "Strategy for unused units (inherits rolloverStrategy parameter).",
        "defaultFromParameter": "rolloverStrategy"
      },
      "overage_rate_minor": {
        "type": "integer",
        "required": false,
        "description": "Cost per additional unit expressed in minor currency units."
      },
      "projected_overage_minor": {
        "type": "integer",
        "required": false,
        "description": "Forecasted overage spend derived from consumption trends."
      },
      "samples": {
        "type": "UsageSample[]",
        "required": false,
        "description": "Rolling usage measurements for charts or anomaly detection.",
        "default": []
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "plan_id": {
        "type": "string",
        "required": true,
        "description": "Stable identifier for the plan within the billing domain."
      },
      "product_family": {
        "type": "string",
        "required": true,
        "description": "High level product family grouping for analytics and reporting."
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Availability state of the plan (active, deprecated, private_beta).",
        "validation": {
          "enum": [
            "active",
            "deprecated",
            "private_beta",
            "legacy"
          ]
        }
      },
      "feature_matrix": {
        "type": "FeatureDescriptor[]",
        "required": false,
        "description": "Array of feature descriptors listing entitlement tiers.",
        "default": []
      },
      "add_on_ids": {
        "type": "string[]",
        "required": false,
        "description": "Identifiers for add-ons commonly sold with this plan.",
        "default": []
      },
      "upgrade_targets": {
        "type": "string[]",
        "required": false,
        "description": "Plans presented as upgrade destinations.",
        "default": []
      },
      "downgrade_targets": {
        "type": "string[]",
        "required": false,
        "description": "Plans that can be downgraded to from this plan.",
        "default": []
      },
      "notes": {
        "type": "string",
        "required": false,
        "description": "Internal commentary for packaging or finance teams."
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the team that owns the plan."
      }
    },
    "semantics": {
      "plan_code": {
        "semantic_type": "billing.plan.code",
        "token_mapping": "tokenMap(billing.plan.code)"
      },
      "plan_name": {
        "semantic_type": "billing.plan.name",
        "token_mapping": "tokenMap(billing.plan.name)"
      },
      "billing_interval": {
        "semantic_type": "billing.plan.interval",
        "token_mapping": "tokenMap(billing.plan.interval)"
      },
      "interval_count": {
        "semantic_type": "billing.plan.interval_count",
        "token_mapping": "tokenMap(billing.plan.interval_count)"
      },
      "amount_minor": {
        "semantic_type": "billing.plan.amount_minor",
        "token_mapping": "tokenMap(billing.plan.amount_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "currency": {
        "semantic_type": "billing.plan.currency",
        "token_mapping": "tokenMap(billing.plan.currency)"
      },
      "trial_period_days": {
        "semantic_type": "billing.plan.trial_period_days",
        "token_mapping": "tokenMap(billing.plan.trial_period_days)"
      },
      "collection_method": {
        "semantic_type": "billing.plan.collection_method",
        "token_mapping": "tokenMap(billing.plan.collection_method)"
      },
      "billing_anchor_day": {
        "semantic_type": "billing.plan.billing_anchor_day",
        "token_mapping": "tokenMap(billing.plan.billing_anchor_day)"
      },
      "pricing_model": {
        "semantic_type": "billing.plan.pricing_model",
        "token_mapping": "tokenMap(billing.plan.pricing_model)"
      },
      "meter_name": {
        "semantic_type": "billing.usage.meter_name",
        "token_mapping": "tokenMap(billing.usage.meter_name)"
      },
      "included_quantity": {
        "semantic_type": "billing.usage.included_quantity",
        "token_mapping": "tokenMap(billing.usage.included_quantity)",
        "ui_hints": {
          "format": "quantity"
        }
      },
      "consumed_quantity": {
        "semantic_type": "billing.usage.consumed_quantity",
        "token_mapping": "tokenMap(billing.usage.consumed_quantity)",
        "ui_hints": {
          "format": "quantity"
        }
      },
      "unit_label": {
        "semantic_type": "billing.usage.unit_label",
        "token_mapping": "tokenMap(billing.usage.unit_label)"
      },
      "period_start": {
        "semantic_type": "billing.usage.period_start",
        "token_mapping": "tokenMap(billing.usage.period_start)"
      },
      "period_end": {
        "semantic_type": "billing.usage.period_end",
        "token_mapping": "tokenMap(billing.usage.period_end)"
      },
      "rollover_strategy": {
        "semantic_type": "billing.usage.rollover_strategy",
        "token_mapping": "tokenMap(billing.usage.rollover_strategy)"
      },
      "overage_rate_minor": {
        "semantic_type": "billing.usage.overage_rate_minor",
        "token_mapping": "tokenMap(billing.usage.overage_rate_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "projected_overage_minor": {
        "semantic_type": "billing.usage.projected_overage_minor",
        "token_mapping": "tokenMap(billing.usage.projected_overage_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "samples": {
        "semantic_type": "billing.usage.samples",
        "token_mapping": "tokenMap(billing.usage.samples)"
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "plan_id": {
        "semantic_type": "billing.plan.id",
        "token_mapping": "tokenMap(billing.plan.id)"
      },
      "product_family": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(billing.plan.product_family)"
      },
      "status": {
        "semantic_type": "billing.plan.status",
        "token_mapping": "tokenMap(billing.plan.status)"
      },
      "feature_matrix": {
        "semantic_type": "billing.plan.feature_matrix",
        "token_mapping": "tokenMap(billing.plan.feature_matrix)"
      },
      "add_on_ids": {
        "semantic_type": "billing.plan.add_on_ids",
        "token_mapping": "tokenMap(billing.plan.add_on_ids)"
      },
      "upgrade_targets": {
        "semantic_type": "billing.plan.upgrade_targets",
        "token_mapping": "tokenMap(billing.plan.upgrade_targets)"
      },
      "downgrade_targets": {
        "semantic_type": "billing.plan.downgrade_targets",
        "token_mapping": "tokenMap(billing.plan.downgrade_targets)"
      },
      "notes": {
        "semantic_type": "billing.plan.notes",
        "token_mapping": "tokenMap(billing.plan.notes)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "BillingSummaryBadge",
          "position": "after",
          "props": {
            "amountField": "amount_minor",
            "currencyField": "currency",
            "intervalField": "billing_interval",
            "minorUnits": 100
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        }
      ],
      "card": [
        {
          "component": "BillingCardMeta",
          "position": "after",
          "props": {
            "amountField": "amount_minor",
            "currencyField": "currency",
            "intervalField": "billing_interval",
            "minorUnits": 100
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        }
      ],
      "detail": [
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        }
      ]
    },
    "tokens": {
      "billing.plan.name": "var(--cmp-text-strong)",
      "billing.plan.amount_minor": "var(--cmp-text-body-strong)",
      "billing.plan.currency": "var(--cmp-text-subtle)",
      "billing.plan.interval": "var(--cmp-text-subtle)",
      "billing.plan.collection_method": "var(--cmp-badge-text-info)",
      "billing.usage.meter_name": "var(--cmp-text-strong)",
      "billing.usage.consumed_quantity": "var(--cmp-text-accent)",
      "billing.usage.projected_overage_minor": "var(--cmp-text-warning)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "billing.plan.id": "var(--cmp-text-strong)",
      "billing.plan.status": "var(--cmp-badge-text-info)",
      "billing.plan.product_family": "var(--cmp-text-subtle)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/domains/saas-billing/objects/Plan.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Product",
    "version": "1.1.0",
    "domain": "core.catalog",
    "description": "Canonical catalog entry combining pricing, lifecycle, and merchandising metadata.",
    "tags": [
      "universal",
      "product",
      "commerce",
      "taxonomy"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "ProductLabel",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": null,
        "parameters": {
          "states": [
            "draft",
            "in_review",
            "active",
            "retired"
          ],
          "initialState": "draft"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": null,
        "parameters": {
          "recordedEvents": [
            "created",
            "spec_updated",
            "price_changed",
            "retired"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "financial/Priceable",
        "alias": null,
        "parameters": {
          "supportedCurrencies": [
            "USD",
            "EUR",
            "GBP",
            "AUD"
          ],
          "defaultCurrency": "USD",
          "pricingModels": [
            "one_time",
            "subscription",
            "usage_based"
          ],
          "billingIntervals": [
            "one_time",
            "month",
            "year"
          ],
          "taxBehavior": "exclusive"
        }
      },
      {
        "name": "core/Classifiable",
        "alias": "ProductClassification",
        "parameters": {
          "classification_mode": "taxonomy",
          "hierarchy_storage_model": "materialized_path",
          "tag_policy": "locked",
          "max_tags": 8,
          "require_primary_category": true
        }
      },
      {
        "name": "behavioral/Searchable",
        "alias": null,
        "parameters": {
          "placeholder": "Search products...",
          "debounceMs": 300
        }
      },
      {
        "name": "behavioral/Filterable",
        "alias": null,
        "parameters": {
          "filterMode": "immediate",
          "showFilterCount": true
        }
      },
      {
        "name": "behavioral/Pageable",
        "alias": null,
        "parameters": {
          "defaultPageSize": 25,
          "pageSizeOptions": [
            10,
            25,
            50,
            100
          ]
        }
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of valid next states from the current status, computed from the\ntransitionRules parameter. When transitionRules is null (open model), this contains\nall states except the current one. Used by StatusSelector to disable invalid options\nand by StatusBadge to indicate available paths.\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "unit_amount_cents": {
        "type": "number",
        "required": true,
        "description": "Base unit price expressed in the smallest currency denomination.",
        "validation": {
          "minimum": 0
        }
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO currency code for the unit amount.",
        "validation": {
          "enumFromParameter": "supportedCurrencies"
        }
      },
      "pricing_model": {
        "type": "string",
        "required": true,
        "description": "Monetization model applied to the entity.",
        "validation": {
          "enumFromParameter": "pricingModels"
        }
      },
      "billing_interval": {
        "type": "string",
        "required": false,
        "description": "Billing cadence when pricing_model indicates recurring revenue.",
        "validation": {
          "enumFromParameter": "billingIntervals"
        }
      },
      "tax_behavior": {
        "type": "string",
        "required": true,
        "description": "Defines whether taxes are included in the displayed price.",
        "validation": {
          "enum": [
            "exclusive",
            "inclusive"
          ]
        },
        "default": "exclusive"
      },
      "classification_metadata": {
        "type": "ClassificationMetadata",
        "required": true,
        "description": "Operational metadata describing mode, storage model, governance rules, and audit timestamps.\n"
      },
      "categories": {
        "type": "CategoryNode[]",
        "required": false,
        "default": [],
        "description": "Ordered taxonomy nodes scoped to the object."
      },
      "primary_category_id": {
        "type": "string",
        "required": false,
        "description": "Identifier of the canonical taxonomy node."
      },
      "primary_category_path": {
        "type": "string",
        "required": false,
        "description": "Human-readable breadcrumb path (Electronics > Mobile > Android)."
      },
      "tags": {
        "type": "Tag[]",
        "required": false,
        "default": [],
        "description": "Canonical tag collection after synonym collapse."
      },
      "tag_count": {
        "type": "number",
        "required": false,
        "default": 0,
        "description": "Number of canonical tags assigned to the object."
      },
      "tag_preview": {
        "type": "string",
        "required": false,
        "description": "Denormalized comma-delimited preview for list renders."
      },
      "searchQuery": {
        "type": "string",
        "required": false,
        "description": "The current search query string entered by the user.",
        "default": "",
        "validation": {
          "maxLength": 256
        }
      },
      "searchActive": {
        "type": "boolean",
        "required": false,
        "description": "Whether the search input is currently focused or has a non-empty query.",
        "default": false
      },
      "filters": {
        "type": "object[]",
        "required": false,
        "description": "Array of available filter descriptors. Each entry defines a filterable dimension:\n  - field: string (the schema field to filter on)\n  - label: string (display label)\n  - type: \"select\" | \"multi-select\" | \"range\" | \"boolean\" | \"date-range\"\n  - options: array of { value, label } for select/multi-select types\n",
        "default": []
      },
      "activeFilters": {
        "type": "object[]",
        "required": false,
        "description": "Array of currently applied filter values:\n  - field: string (matches a filter descriptor field)\n  - operator: \"eq\" | \"in\" | \"range\" | \"gt\" | \"lt\" | \"between\"\n  - value: unknown (the selected filter value or values)\n",
        "default": []
      },
      "filterCount": {
        "type": "number",
        "required": true,
        "description": "Computed count of currently active filters.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "page": {
        "type": "number",
        "required": true,
        "description": "Current page number (1-based).",
        "default": 1,
        "validation": {
          "minimum": 1
        }
      },
      "pageSize": {
        "type": "number",
        "required": true,
        "description": "Number of items displayed per page.",
        "default": 25,
        "validation": {
          "minimum": 1,
          "maximum": 500
        }
      },
      "totalItems": {
        "type": "number",
        "required": false,
        "description": "Total number of items across all pages. Used to compute total page count.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "totalPages": {
        "type": "number",
        "required": false,
        "description": "Computed total number of pages (ceil(totalItems / pageSize)).",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "product_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the product listing."
      },
      "sku": {
        "type": "string",
        "required": true,
        "description": "Merchandising SKU exposed to commerce systems."
      },
      "inventory_status": {
        "type": "string",
        "required": true,
        "default": "in_stock",
        "description": "Availability state synchronized with inventory service.",
        "validation": {
          "enum": [
            "in_stock",
            "low_stock",
            "backorder",
            "discontinued"
          ]
        }
      },
      "release_channel": {
        "type": "string",
        "required": true,
        "default": "general_availability",
        "description": "Channel describing how the product is released to customers.",
        "validation": {
          "enum": [
            "alpha",
            "beta",
            "limited",
            "general_availability"
          ]
        }
      },
      "requires_subscription": {
        "type": "boolean",
        "required": true,
        "default": false,
        "description": "Indicates whether access to the product requires an active subscription."
      },
      "support_level": {
        "type": "string",
        "required": false,
        "description": "SLA tier associated with the product.",
        "validation": {
          "enum": [
            "standard",
            "premium",
            "enterprise"
          ]
        }
      },
      "summary_blurb": {
        "type": "string",
        "required": false,
        "description": "Short merchandising description surfaced in marketing contexts.",
        "validation": {
          "maxLength": 160
        }
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "Drives the set of enabled options in the state transition UI."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "unit_amount_cents": {
        "semantic_type": "commerce.price.amount",
        "token_mapping": "tokenMap(commerce.price.primary)",
        "ui_hints": {
          "minorUnits": 100,
          "component": "CurrencyAmount",
          "currencyField": "currency"
        }
      },
      "currency": {
        "semantic_type": "commerce.price.currency",
        "token_mapping": "tokenMap(commerce.currency.primary)",
        "ui_hints": {
          "component": "CurrencyCode",
          "parameterSource": "supportedCurrencies"
        }
      },
      "pricing_model": {
        "semantic_type": "commerce.price.model",
        "token_mapping": "tokenMap(commerce.pricing.model)",
        "ui_hints": {
          "component": "PricingModelBadge",
          "parameterSource": "pricingModels"
        }
      },
      "billing_interval": {
        "semantic_type": "commerce.price.interval",
        "token_mapping": "tokenMap(commerce.pricing.interval)",
        "ui_hints": {
          "component": "BillingIntervalBadge",
          "parameterSource": "billingIntervals"
        }
      },
      "tax_behavior": {
        "semantic_type": "commerce.price.tax_behavior",
        "token_mapping": "tokenMap(commerce.pricing.tax)",
        "ui_hints": {
          "component": "TaxBehaviorTag"
        }
      },
      "classification_metadata": {
        "semantic_type": "classification.metadata",
        "token_mapping": "tokenMap(classification.metadata)",
        "ui_hints": {
          "component": "ClassificationDiagnostics"
        }
      },
      "categories": {
        "semantic_type": "classification.categories",
        "token_mapping": "tokenMap(classification.categories.*)",
        "ui_hints": {
          "component": "CategoryTree"
        }
      },
      "tags": {
        "semantic_type": "classification.tags",
        "token_mapping": "tokenMap(classification.tags.*)",
        "ui_hints": {
          "component": "TagTokenCloud",
          "policyParameter": "tag_policy"
        }
      },
      "primary_category_id": {
        "semantic_type": "classification.primary",
        "token_mapping": "tokenMap(classification.primary)",
        "ui_hints": {
          "component": "CategoryBreadcrumb"
        }
      },
      "searchQuery": {
        "semantic_type": "input.search.query",
        "token_mapping": "tokenMap(search.input.*)",
        "ui_hints": {
          "component": "SearchInput",
          "placeholderParameter": "placeholder",
          "debounceParameter": "debounceMs"
        }
      },
      "searchActive": {
        "semantic_type": "state.search.active",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "SearchInput",
          "description": "Drives visual active/inactive state of the search region."
        }
      },
      "filters": {
        "semantic_type": "input.filter.descriptors",
        "token_mapping": "tokenMap(filter.panel.*)",
        "ui_hints": {
          "component": "FilterPanel",
          "modeParameter": "filterMode"
        }
      },
      "activeFilters": {
        "semantic_type": "state.filter.active",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "FilterPanel",
          "description": "Drives active filter chip display and clear actions."
        }
      },
      "filterCount": {
        "semantic_type": "metric.filter.count",
        "token_mapping": "tokenMap(filter.badge.*)",
        "ui_hints": {
          "component": "MetricBadge",
          "format": "integer"
        }
      },
      "page": {
        "semantic_type": "state.pagination.page",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "PaginationBar",
          "description": "Current active page, drives page button highlight state."
        }
      },
      "pageSize": {
        "semantic_type": "state.pagination.pageSize",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "PaginationBar",
          "defaultParameter": "defaultPageSize"
        }
      },
      "totalItems": {
        "semantic_type": "metric.pagination.totalItems",
        "token_mapping": "tokenMap(pagination.info.*)",
        "ui_hints": {
          "component": "PaginationBar",
          "format": "integer"
        }
      },
      "totalPages": {
        "semantic_type": "metric.pagination.totalPages",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "PaginationBar",
          "description": "Computed from totalItems and pageSize."
        }
      },
      "product_id": {
        "semantic_type": "product.id",
        "token_mapping": "tokenMap(product.id.primary)"
      },
      "sku": {
        "semantic_type": "product.sku",
        "token_mapping": "tokenMap(product.sku.primary)"
      },
      "inventory_status": {
        "semantic_type": "product.inventory.status",
        "token_mapping": "tokenMap(inventory.status.*)"
      },
      "release_channel": {
        "semantic_type": "product.release.channel",
        "token_mapping": "tokenMap(product.release.channel)"
      },
      "requires_subscription": {
        "semantic_type": "product.access.requires_subscription",
        "token_mapping": "tokenMap(product.access.subscription)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "SearchInput",
          "position": "header",
          "priority": 10,
          "props": {
            "field": "searchQuery",
            "placeholderParameter": "placeholder",
            "debounceParameter": "debounceMs",
            "minQueryLengthParameter": "minQueryLength",
            "clearableParameter": "clearable"
          }
        },
        {
          "component": "PaginationBar",
          "position": "footer",
          "priority": 10,
          "props": {
            "pageField": "page",
            "pageSizeField": "pageSize",
            "totalItemsField": "totalItems",
            "totalPagesField": "totalPages",
            "pageSizeOptionsParameter": "pageSizeOptions",
            "showPageSizeSelectorParameter": "showPageSizeSelector",
            "showGotoPageParameter": "showGotoPage",
            "showItemRangeParameter": "showItemRange"
          }
        },
        {
          "component": "FilterPanel",
          "position": "sidebar",
          "priority": 8,
          "props": {
            "field": "filters",
            "activeField": "activeFilters",
            "modeParameter": "filterMode",
            "maxActiveParameter": "maxActiveFilters",
            "collapsibleParameter": "collapsible"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "PriceBadge",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency"
          }
        },
        {
          "component": "ClassificationBadge",
          "position": "after",
          "props": {
            "mode": "{classification_mode}",
            "primaryCategoryField": "primary_category_id",
            "tagPreviewField": "tag_preview"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "ClassificationPanel",
          "position": "sidebar",
          "priority": 40,
          "props": {
            "categoriesField": "categories",
            "tagsField": "tags",
            "metadataField": "classification_metadata",
            "modeParameter": "classification_mode"
          }
        },
        {
          "component": "SearchInput",
          "position": "header",
          "priority": 10,
          "props": {
            "field": "searchQuery",
            "placeholderParameter": "placeholder",
            "clearableParameter": "clearable"
          }
        },
        {
          "component": "FilterPanel",
          "position": "sidebar",
          "priority": 8,
          "props": {
            "field": "filters",
            "activeField": "activeFilters",
            "modeParameter": "filterMode",
            "collapsibleParameter": "collapsible"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "PriceSummary",
          "position": "top",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency",
            "modelField": "pricing_model",
            "intervalField": "billing_interval",
            "taxBehaviorField": "tax_behavior"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "ClassificationEditor",
          "position": "main",
          "props": {
            "modeParameter": "classification_mode",
            "tagPolicyParameter": "tag_policy",
            "maxTagsParameter": "max_tags"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "PriceBadge",
          "position": "after",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "commerce.price.text": "var(--text-strong)",
      "commerce.price.badge.bg": "var(--surface-accent)",
      "commerce.pricing.model.text": "var(--text-default)",
      "classification": {
        "category": {
          "badge": {
            "bg": "var(--sys-surface-raised)",
            "border": "var(--sys-border-strong)"
          }
        },
        "tag": {
          "chip": {
            "bg": "var(--sys-surface-muted)",
            "text": "var(--sys-text-strong)"
          }
        }
      },
      "search.input.bg": "var(--sys-surface-default)",
      "search.input.text": "var(--sys-text-primary)",
      "search.input.placeholder": "var(--sys-text-subtle)",
      "search.input.border": "var(--sys-border-default)",
      "search.input.focus.border": "var(--sys-border-focus)",
      "search.input.focus.ring": "var(--sys-focus-ring)",
      "search.input.icon": "var(--sys-icon-subtle)",
      "search.input.clear.hover": "var(--sys-surface-hover)",
      "filter.panel.bg": "var(--sys-surface-secondary)",
      "filter.panel.border": "var(--sys-border-default)",
      "filter.panel.header.text": "var(--sys-text-primary)",
      "filter.panel.section.divider": "var(--sys-border-subtle)",
      "filter.chip.bg": "var(--sys-surface-accent)",
      "filter.chip.text": "var(--sys-text-on-accent)",
      "filter.chip.remove.hover": "var(--sys-surface-hover)",
      "filter.badge.bg": "var(--sys-surface-accent)",
      "filter.badge.text": "var(--sys-text-on-accent)",
      "filter.apply.bg": "var(--sys-action-primary)",
      "filter.apply.text": "var(--sys-text-on-action)",
      "filter.clear.text": "var(--sys-text-subtle)",
      "pagination.bar.bg": "var(--sys-surface-secondary)",
      "pagination.bar.border": "var(--sys-border-default)",
      "pagination.button.bg": "var(--sys-surface-default)",
      "pagination.button.text": "var(--sys-text-primary)",
      "pagination.button.hover.bg": "var(--sys-surface-hover)",
      "pagination.button.active.bg": "var(--sys-surface-accent)",
      "pagination.button.active.text": "var(--sys-text-on-accent)",
      "pagination.button.disabled.text": "var(--sys-text-disabled)",
      "pagination.info.text": "var(--sys-text-subtle)",
      "pagination.selector.border": "var(--sys-border-default)",
      "product.sku.primary": "var(--text-strong)",
      "inventory.status.low_stock": "var(--status-warning)",
      "inventory.status.discontinued": "var(--status-danger)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/objects/core/Product.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Relationship",
    "version": "1.1.0",
    "domain": "core.graph",
    "description": "Canonical graph edge linking two entities with lifecycle, ownership, and tagging semantics.",
    "tags": [
      "universal",
      "relationship",
      "graph"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "content/Labelled",
        "alias": "RelationshipLabel",
        "parameters": null
      },
      {
        "name": "lifecycle/Stateful",
        "alias": null,
        "parameters": {
          "states": [
            "proposed",
            "active",
            "paused",
            "completed",
            "terminated"
          ],
          "initialState": "proposed"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": null,
        "parameters": {
          "recordedEvents": [
            "created",
            "activated",
            "paused",
            "terminated",
            "reactivated"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "structural/Ownerable",
        "alias": null,
        "parameters": {
          "ownerTypes": [
            "organization",
            "team",
            "platform"
          ],
          "primaryOwnerType": "organization",
          "allowTransfer": true
        }
      },
      {
        "name": "behavioral/Taggable",
        "alias": null,
        "parameters": {
          "maxTags": 10,
          "allowCustomTags": true,
          "allowedTags": [
            "primary",
            "secondary",
            "inferred",
            "manual",
            "pending_review"
          ],
          "caseSensitive": false
        }
      },
      {
        "name": "viz/MarkGraph",
        "alias": null,
        "parameters": {
          "title": "Connected relationships",
          "description": "This relationship and the others that share one of its endpoints.",
          "chart": {
            "chartType": "force_graph",
            "source": "edge-array",
            "dataField": "neighborhood",
            "edges": {
              "source": "source_id",
              "target": "target_id",
              "bidirectionalField": "is_bidirectional"
            },
            "sampleRows": [
              {
                "source_id": "example-team",
                "target_id": "example-project",
                "is_bidirectional": false
              },
              {
                "source_id": "example-project",
                "target_id": "example-document",
                "is_bidirectional": true
              }
            ]
          }
        }
      }
    ],
    "schema": {
      "label": {
        "type": "string",
        "required": true,
        "description": "Human-readable display name rendered in primary surfaces.",
        "validation": {
          "minLength": 1,
          "maxLengthFromParameter": "maxLabelLength",
          "pattern": "^\\S.*\\S$|^\\S$"
        }
      },
      "description": {
        "type": "string",
        "required": false,
        "requiredFromParameter": "requireDescription",
        "description": "Supporting description used in detail and card contexts.",
        "validation": {
          "maxLengthFromParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "type": "string",
        "required": false,
        "description": "Hint copy surfaced in form fields when the label is empty.",
        "validation": {
          "maxLength": 80
        }
      },
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of valid next states from the current status, computed from the\ntransitionRules parameter. When transitionRules is null (open model), this contains\nall states except the current one. Used by StatusSelector to disable invalid options\nand by StatusBadge to indicate available paths.\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "owner_id": {
        "type": "string",
        "required": true,
        "description": "Identifier of the owning principal scoped by owner_type."
      },
      "owner_type": {
        "type": "string",
        "required": true,
        "description": "Categorical owner type sourced from the ownerTypes parameter.",
        "validation": {
          "enumFromParameter": "ownerTypes"
        }
      },
      "ownership_role": {
        "type": "string",
        "required": false,
        "description": "Optional role name describing how the owner governs the entity.",
        "validation": {
          "maxLength": 80
        }
      },
      "ownership_transferred_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp recording when ownership was last transferred."
      },
      "tags": {
        "type": "string[]",
        "required": false,
        "description": "Ordered list of tags assigned to the entity.",
        "default": [],
        "validation": {
          "maxItems": 64
        }
      },
      "tag_count": {
        "type": "number",
        "required": true,
        "description": "Computed number of tags assigned to the entity.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "tag_metadata": {
        "type": "object[]",
        "required": false,
        "description": "Per-tag governance metadata. Each entry corresponds to a tag in the tags array and\ntracks provenance and usage for taxonomy health monitoring.\n\nEntry structure:\n  - tag: string (the tag value, matches entry in tags array)\n  - created_at: ISO 8601 datetime\n  - created_by: string (user ID or \"system\" for allow-list tags)\n  - usage_count: number (how many entities use this tag, computed)\n  - moderation_status: \"approved\" | \"pending\" | \"rejected\" (when allowTagModeration is true)\n  - canonical_form: string (resolved synonym target, when synonymResolution is enabled)\n",
        "default": []
      },
      "neighborhood": {
        "type": "array",
        "required": false,
        "description": "This relationship's edge and the edges that share one of its endpoints, each containing source_id and target_id strings and an is_bidirectional boolean."
      },
      "relationship_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier for the relationship edge."
      },
      "source_id": {
        "type": "uuid",
        "required": true,
        "description": "Identifier of the source node in the relationship."
      },
      "source_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the source node."
      },
      "target_id": {
        "type": "uuid",
        "required": true,
        "description": "Identifier of the target node in the relationship."
      },
      "target_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the target node."
      },
      "relationship_type": {
        "type": "string",
        "required": true,
        "description": "Semantic type describing the edge between the source and target.",
        "validation": {
          "enum": [
            "membership",
            "ownership",
            "follows",
            "depends_on",
            "references"
          ]
        }
      },
      "direction": {
        "type": "string",
        "required": true,
        "default": "bidirectional",
        "description": "Directionality applied when traversing the relationship.",
        "validation": {
          "enum": [
            "unidirectional",
            "bidirectional"
          ]
        }
      },
      "strength": {
        "type": "string",
        "required": false,
        "description": "Signal representing how strongly the entities are connected.",
        "validation": {
          "enum": [
            "low",
            "medium",
            "high"
          ]
        }
      },
      "origin_source": {
        "type": "string",
        "required": false,
        "description": "System that originated or inferred the relationship.",
        "validation": {
          "enum": [
            "manual",
            "ingestion",
            "analytics",
            "integration"
          ]
        }
      },
      "is_bidirectional": {
        "type": "boolean",
        "required": true,
        "default": true,
        "description": "Flag indicating whether the relationship is symmetric."
      },
      "owner_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the organization, team or platform that owns the relationship."
      }
    },
    "semantics": {
      "label": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(text.label.*)",
        "ui_hints": {
          "component": "TextHeading",
          "maxLengthParameter": "maxLabelLength",
          "headingLevel": 2
        }
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(text.body.*)",
        "ui_hints": {
          "component": "TextBody",
          "maxLengthParameter": "maxDescriptionLength"
        }
      },
      "placeholder": {
        "semantic_type": "text.placeholder",
        "token_mapping": "tokenMap(text.placeholder.*)",
        "ui_hints": {
          "component": "FormHint",
          "maxLength": 80
        }
      },
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "Drives the set of enabled options in the state transition UI."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "owner_id": {
        "semantic_type": "ownership.owner.id",
        "token_mapping": "tokenMap(ownership.owner.id)",
        "ui_hints": {
          "component": "OwnerReference",
          "ownerTypeField": "owner_type",
          "displayLabelField": "owner_name"
        }
      },
      "owner_type": {
        "semantic_type": "ownership.owner.type",
        "token_mapping": "tokenMap(ownership.owner.type)",
        "ui_hints": {
          "component": "OwnerTypeBadge",
          "parameterSource": "ownerTypes"
        }
      },
      "ownership_role": {
        "semantic_type": "ownership.owner.role",
        "token_mapping": "tokenMap(ownership.owner.role)",
        "ui_hints": {
          "component": "OwnerRolePill"
        }
      },
      "ownership_transferred_at": {
        "semantic_type": "ownership.owner.transferred_at",
        "token_mapping": "tokenMap(ownership.owner.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "tags": {
        "semantic_type": "taxonomy.tag.collection",
        "token_mapping": "tokenMap(taxonomy.tag.*)",
        "ui_hints": {
          "component": "TagCollection",
          "allowCreateParameter": "allowCustomTags",
          "allowListParameter": "allowedTags",
          "caseSensitiveParameter": "caseSensitive"
        }
      },
      "tag_count": {
        "semantic_type": "metric.collection.count",
        "token_mapping": "tokenMap(taxonomy.tag.count)",
        "ui_hints": {
          "component": "MetricBadge",
          "format": "integer"
        }
      },
      "tag_metadata": {
        "semantic_type": "taxonomy.tag.governance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "TagGovernancePanel",
          "description": "Admin panel for reviewing tag health, moderation queue, and synonym resolution."
        }
      },
      "relationship_id": {
        "semantic_type": "graph.relationship.id",
        "token_mapping": "tokenMap(graph.relationship.id)"
      },
      "source_id": {
        "semantic_type": "graph.relationship.source_id",
        "token_mapping": "tokenMap(graph.relationship.id)",
        "ui_hints": {
          "displayLabelField": "source_name"
        }
      },
      "target_id": {
        "semantic_type": "graph.relationship.target_id",
        "token_mapping": "tokenMap(graph.relationship.id)",
        "ui_hints": {
          "displayLabelField": "target_name"
        }
      },
      "relationship_type": {
        "semantic_type": "graph.relationship.type",
        "token_mapping": "tokenMap(graph.relationship.type)"
      },
      "direction": {
        "semantic_type": "graph.relationship.direction",
        "token_mapping": "tokenMap(graph.relationship.direction)"
      },
      "strength": {
        "semantic_type": "graph.relationship.strength",
        "token_mapping": "tokenMap(graph.relationship.strength)"
      },
      "origin_source": {
        "semantic_type": "graph.relationship.origin",
        "token_mapping": "tokenMap(graph.relationship.origin)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "LabelCell",
          "priority": 100,
          "props": {
            "field": "label",
            "descriptionField": "description",
            "truncate": true,
            "maxLengthParameter": "maxLabelLength"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "OwnerBadge",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type"
          }
        },
        {
          "component": "TagPills",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        }
      ],
      "detail": [
        {
          "component": "DetailHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "subtitleField": "description",
            "headingLevel": 1
          }
        },
        {
          "component": "VizGraphPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "force_graph",
              "source": "edge-array",
              "dataField": "neighborhood",
              "edges": {
                "source": "source_id",
                "target": "target_id",
                "bidirectionalField": "is_bidirectional"
              },
              "sampleRows": [
                {
                  "source_id": "example-team",
                  "target_id": "example-project",
                  "is_bidirectional": false
                },
                {
                  "source_id": "example-project",
                  "target_id": "example-document",
                  "is_bidirectional": true
                }
              ]
            },
            "title": "Connected relationships",
            "description": "This relationship and the others that share one of its endpoints."
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "OwnershipSummary",
          "position": "top",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role",
            "transferredAtField": "ownership_transferred_at",
            "allowTransferParameter": "allowTransfer"
          }
        },
        {
          "component": "TagSummary",
          "position": "top",
          "props": {
            "field": "tags",
            "countField": "tag_count"
          }
        }
      ],
      "form": [
        {
          "component": "FormLabelGroup",
          "position": "before",
          "priority": 100,
          "props": {
            "labelField": "label",
            "descriptionField": "description",
            "placeholderField": "placeholder",
            "maxLabelLengthParameter": "maxLabelLength",
            "maxDescriptionLengthParameter": "maxDescriptionLength",
            "requireDescriptionParameter": "requireDescription"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "TagInput",
          "position": "top",
          "props": {
            "field": "tags",
            "maxTagsParameter": "maxTags",
            "allowCustomParameter": "allowCustomTags",
            "allowListParameter": "allowedTags",
            "minLengthParameter": "tagMinLength",
            "maxLengthParameter": "tagMaxLength",
            "synonymParameter": "synonymResolution"
          }
        }
      ],
      "card": [
        {
          "component": "CardHeader",
          "position": "top",
          "priority": 100,
          "props": {
            "titleField": "label",
            "supportingField": "description"
          }
        },
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "OwnershipMeta",
          "position": "after",
          "props": {
            "ownerIdField": "owner_id",
            "ownerTypeField": "owner_type",
            "roleField": "ownership_role"
          }
        },
        {
          "component": "TagPills",
          "position": "after",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        }
      ],
      "timeline": [
        {
          "component": "TimelineEntryLabel",
          "props": {
            "field": "label",
            "compact": true
          }
        }
      ],
      "inline": [
        {
          "component": "InlineLabel",
          "props": {
            "field": "label",
            "maxLength": 40
          }
        }
      ]
    },
    "tokens": {
      "text.label.color": "var(--sys-text-strong)",
      "text.label.font-weight": "var(--sys-font-weight-semibold)",
      "text.label.font-size": "var(--sys-font-size-lg)",
      "text.label.line-height": "var(--sys-line-height-tight)",
      "text.body.color": "var(--sys-text-subtle)",
      "text.body.font-weight": "var(--sys-font-weight-regular)",
      "text.body.font-size": "var(--sys-font-size-sm)",
      "text.body.line-height": "var(--sys-line-height-relaxed)",
      "text.placeholder.color": "var(--sys-text-muted)",
      "text.placeholder.font-weight": "var(--sys-font-weight-regular)",
      "text.placeholder.font-size": "var(--sys-font-size-sm)",
      "text.placeholder.line-height": "var(--sys-line-height-normal)",
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "ownership.owner.badge.bg": "var(--surface-subtle)",
      "ownership.owner.badge.text": "var(--text-default)",
      "ownership.owner.role.text": "var(--text-muted)",
      "taxonomy.tag.chip.bg": "var(--surface-tag-bg)",
      "taxonomy.tag.chip.text": "var(--surface-tag-text)",
      "taxonomy.tag.chip.border": "var(--sys-border-default)",
      "taxonomy.tag.chip.hover.bg": "var(--sys-surface-hover)",
      "taxonomy.tag.chip.pending.bg": "var(--sys-status-warning-surface)",
      "taxonomy.tag.chip.pending.text": "var(--sys-status-warning-text)",
      "taxonomy.tag.summary.count": "var(--text-subtle)",
      "taxonomy.tag.input.border": "var(--sys-border-default)",
      "taxonomy.tag.input.focus.border": "var(--sys-border-focus)",
      "graph.relationship.type": "var(--graph-relationship-type)",
      "graph.relationship.direction": "var(--text-default)",
      "graph.relationship.strength.high": "var(--status-success)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/objects/core/Relationship.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Subscription",
    "version": "2.0.0",
    "domain": "core.billing",
    "description": "Canonical subscription record composing lifecycle, billing, and cancellation semantics.",
    "tags": [
      "billing",
      "lifecycle",
      "monetization"
    ],
    "maturity": "beta",
    "traits": [
      {
        "name": "lifecycle/Stateful",
        "alias": "SubscriptionLifecycle",
        "parameters": {
          "states": [
            "future",
            "trialing",
            "active",
            "paused",
            "pending_cancellation",
            "past_due",
            "unpaid",
            "terminated"
          ],
          "initialState": "future"
        }
      },
      {
        "name": "lifecycle/Cancellable",
        "alias": "SubscriptionCancellation",
        "parameters": {
          "allowCancellationAfterStart": true,
          "requireReason": false
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "BillingCycleTimeline",
        "parameters": {
          "recordedEvents": [
            "billing_cycle_started",
            "billing_cycle_completed",
            "payment_received",
            "cancellation_requested"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "financial/Billable",
        "alias": "SubscriptionBilling",
        "parameters": {
          "defaultCurrency": "usd",
          "billingIntervals": [
            "monthly",
            "yearly"
          ],
          "minorUnits": 100,
          "supportProration": true,
          "prorationBehavior": "always_invoice"
        }
      },
      {
        "name": "lifecycle/Archivable",
        "alias": "SubscriptionArchive",
        "parameters": {
          "gracePeriodDays": 30,
          "retainHistory": true,
          "restoreWindowDays": 30
        }
      },
      {
        "name": "viz/MarkBar",
        "alias": null,
        "parameters": {
          "title": "Payment amounts",
          "description": "Payments recorded for this subscription, in its currency.",
          "chart": {
            "chartType": "bar",
            "source": "payment-events",
            "dateFields": [
              "last_payment_at",
              "next_payment_due_at"
            ],
            "amountField": "amount",
            "minorUnits": 100,
            "currencyField": "currency"
          }
        }
      }
    ],
    "relationships": [
      {
        "target": "Plan",
        "via": "plan_code",
        "cardinality": "many-to-one",
        "label": "Plan code"
      }
    ],
    "schema": {
      "status": {
        "type": "string",
        "required": true,
        "description": "Current lifecycle status of the subscription.",
        "validation": {
          "enum": [
            "future",
            "trialing",
            "active",
            "paused",
            "pending_cancellation",
            "past_due",
            "unpaid",
            "terminated"
          ]
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of valid next states from the current status, computed from the\ntransitionRules parameter. When transitionRules is null (open model), this contains\nall states except the current one. Used by StatusSelector to disable invalid options\nand by StatusBadge to indicate available paths.\n",
        "default": []
      },
      "cancel_at_period_end": {
        "type": "boolean",
        "required": true,
        "description": "Whether the subscription will cancel at the natural billing period end."
      },
      "cancellation_reason": {
        "type": "string",
        "required": false,
        "description": "Free-form explanation captured during cancellation workflows."
      },
      "cancellation_reason_code": {
        "type": "string",
        "required": false,
        "description": "Structured reason code chosen from the allowedReasons parameter.",
        "validation": {
          "enumFromParameter": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when cancellation was initiated."
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "amount": {
        "type": "integer",
        "required": true,
        "description": "Recurring price expressed in minor units (e.g., cents)."
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO 4217 currency code used for billing."
      },
      "billing_interval": {
        "type": "string",
        "required": false,
        "description": "Recurrence cadence (monthly, yearly, quarterly, etc.)."
      },
      "payment_status": {
        "type": "string",
        "required": false,
        "description": "Outcome of the most recent collection attempt. Distinct from subscription\nlifecycle status — a subscription can be \"active\" with payment_status \"retrying\".\n",
        "validation": {
          "enum": [
            "pending",
            "succeeded",
            "failed",
            "retrying",
            "refunded"
          ]
        },
        "default": "pending"
      },
      "payment_method_type": {
        "type": "string",
        "required": false,
        "description": "Payment instrument category used for collection.",
        "validation": {
          "enum": [
            "card",
            "ach",
            "wire",
            "invoice",
            "other"
          ]
        }
      },
      "proration_amount": {
        "type": "integer",
        "required": false,
        "description": "Prorated credit or charge in minor currency units generated by a mid-cycle\nplan change. Positive values are charges; negative values are credits.\nOnly populated when the supportProration parameter is true.\n",
        "default": 0
      },
      "proration_date": {
        "type": "integer",
        "required": false,
        "description": "Unix timestamp (epoch SECONDS) at which proration is calculated. Pinned when an\nupcoming-invoice PREVIEW is requested and MUST be passed identically on commit so the\ncommitted charge equals the previewed amount. The preview is read-only and does NOT\nmutate the subscription. Stored as an integer (not a datetime) so the value round-trips\nbyte-identically between preview and commit — an ISO string normalization could shift it\nand desync the previewed vs charged amount. Only populated when supportProration is true.\nSource: docs.stripe.com/billing/subscriptions/prorations.\n",
        "validation": {
          "minimum": 0
        }
      },
      "last_payment_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp of the most recent successful payment."
      },
      "next_payment_due_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp when the next payment attempt should occur."
      },
      "current_period_start": {
        "type": "datetime",
        "required": true,
        "description": "Start timestamp of the current billing cycle."
      },
      "current_period_end": {
        "type": "datetime",
        "required": true,
        "description": "End timestamp of the current billing cycle."
      },
      "current_period_progress": {
        "type": "number",
        "required": false,
        "description": "Decimal progress (0-1) through the active billing cycle."
      },
      "is_archived": {
        "type": "boolean",
        "required": true,
        "description": "Flag indicating whether the entity is currently archived (soft-deleted).",
        "default": false
      },
      "archived_at": {
        "type": "datetime?",
        "required": false,
        "description": "Timestamp for when the entity entered the archived state."
      },
      "restored_at": {
        "type": "datetime?",
        "required": false,
        "description": "Timestamp for when the entity was most recently restored from an archived state."
      },
      "archive_reason": {
        "type": "string",
        "required": false,
        "description": "Human-readable narrative describing why the entity was archived.",
        "validation": {
          "maxLength": 500
        }
      },
      "archived_by": {
        "type": "string",
        "required": false,
        "description": "User ID or system identifier of the actor who archived this entity.\nSet to \"system\" for automated/policy-driven archival. Supports audit trail queries\nlike \"show all entities archived by user X\" or \"show all auto-archived entities\".\n"
      },
      "archive_metadata": {
        "type": "object",
        "required": false,
        "description": "Structured metadata about the archival action for compliance and audit purposes.\n\nProperties:\n  - method: \"manual\" | \"automated\" | \"policy\" — how the archive was triggered\n  - compliance_tags: string[] — regulatory labels (e.g., [\"GDPR\", \"SOX\", \"HIPAA\"])\n  - retention_policy_id: string — reference to the retention policy that triggered archival\n  - original_status: string — the Stateful status before archival\n  - related_entity_count: number — count of related entities also archived (cascade)\n"
      },
      "restoration_metadata": {
        "type": "object",
        "required": false,
        "description": "Metadata about the most recent restoration action.\n\nProperties:\n  - restored_by: string — user ID or \"system\"\n  - restored_fields: string[] — when partial restore, which fields were restored\n  - restoration_reason: string — why the entity was restored\n  - restored_from_snapshot: boolean — whether restored from a point-in-time snapshot\n"
      },
      "subscription_id": {
        "type": "string",
        "required": true,
        "description": "Primary identifier used across billing and lifecycle systems."
      },
      "plan_name": {
        "type": "string",
        "required": true,
        "description": "Human-readable plan label shown in headers."
      },
      "plan_code": {
        "type": "string",
        "required": false,
        "description": "Internal plan code or price identifier."
      },
      "plan_interval": {
        "type": "string",
        "required": false,
        "description": "Billing interval descriptor (monthly, yearly, etc.)."
      },
      "customer_name": {
        "type": "string",
        "required": false,
        "description": "Customer or account name associated with the subscription."
      },
      "customer_email": {
        "type": "email",
        "required": false,
        "description": "Billing contact email address."
      },
      "payment_history": {
        "type": "PaymentRecord[]",
        "required": false,
        "description": "Recorded payments, oldest first, each with its time and amount in minor units. Drawn by the payment chart."
      }
    },
    "semantics": {
      "status": {
        "semantic_type": "billing.subscription.status",
        "token_mapping": "tokenMap(billing.subscription.status.*)"
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "Drives the set of enabled options in the state transition UI."
        }
      },
      "cancel_at_period_end": {
        "semantic_type": "billing.subscription.cancel_at_period_end",
        "token_mapping": "tokenMap(billing.subscription.cancel_at_period_end)"
      },
      "cancellation_reason": {
        "semantic_type": "billing.subscription.cancellation_reason",
        "token_mapping": "tokenMap(billing.subscription.cancellation_reason)"
      },
      "cancellation_reason_code": {
        "semantic_type": "status.cancel.reason_code",
        "token_mapping": "tokenMap(status.cancel.code.*)",
        "ui_hints": {
          "component": "ReasonPicker",
          "parameterSource": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "semantic_type": "billing.subscription.cancellation_requested_at",
        "token_mapping": "tokenMap(billing.subscription.cancellation_requested_at)"
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "amount": {
        "semantic_type": "billing.plan.amount",
        "token_mapping": "tokenMap(billing.plan.amount)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnitsParameter": "minorUnits"
        }
      },
      "currency": {
        "semantic_type": "billing.plan.currency",
        "token_mapping": "tokenMap(billing.plan.currency)"
      },
      "billing_interval": {
        "semantic_type": "billing.subscription.interval",
        "token_mapping": "tokenMap(billing.subscription.interval)"
      },
      "payment_status": {
        "semantic_type": "billing.cycle.payment_status",
        "token_mapping": "tokenMap(billing.payment.status.*)",
        "ui_hints": {
          "component": "PaymentStatusBadge"
        }
      },
      "payment_method_type": {
        "semantic_type": "billing.cycle.payment_method",
        "token_mapping": "tokenMap(billing.payment.method.*)",
        "ui_hints": {
          "component": "PaymentMethodIcon"
        }
      },
      "proration_amount": {
        "semantic_type": "billing.cycle.proration",
        "token_mapping": "tokenMap(billing.proration.*)",
        "ui_hints": {
          "minorUnitsParameter": "minorUnits",
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "signIndicator": true
        }
      },
      "proration_date": {
        "semantic_type": "billing.cycle.proration_timestamp",
        "token_mapping": "tokenMap(billing.timestamp.proration)",
        "ui_hints": {
          "component": "Timestamp",
          "unixSeconds": true
        }
      },
      "last_payment_at": {
        "semantic_type": "billing.subscription.last_payment_at",
        "token_mapping": "tokenMap(billing.subscription.last_payment_at)"
      },
      "next_payment_due_at": {
        "semantic_type": "billing.subscription.next_payment_due_at",
        "token_mapping": "tokenMap(billing.subscription.next_payment_due_at)"
      },
      "current_period_start": {
        "semantic_type": "billing.subscription.current_period_start",
        "token_mapping": "tokenMap(billing.subscription.current_period_start)"
      },
      "current_period_end": {
        "semantic_type": "billing.subscription.current_period_end",
        "token_mapping": "tokenMap(billing.subscription.current_period_end)"
      },
      "current_period_progress": {
        "semantic_type": "billing.subscription.current_period_progress",
        "token_mapping": "tokenMap(billing.subscription.current_period_progress)"
      },
      "is_archived": {
        "semantic_type": "status.archive.state",
        "token_mapping": "tokenMap(status.archive.*)",
        "ui_hints": {
          "component": "ArchiveBadge",
          "showIcon": true
        }
      },
      "archived_at": {
        "semantic_type": "status.archive.timestamp",
        "token_mapping": "tokenMap(status.archive.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "restored_at": {
        "semantic_type": "status.archive.restore_timestamp",
        "token_mapping": "tokenMap(status.archive.restore)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "archive_reason": {
        "semantic_type": "status.archive.reason",
        "token_mapping": "tokenMap(status.archive.reason)",
        "ui_hints": {
          "component": "ArchiveReason",
          "maxLength": 500
        }
      },
      "archived_by": {
        "semantic_type": "status.archive.actor",
        "token_mapping": "tokenMap(status.archive.actor)",
        "ui_hints": {
          "component": "ActorLabel"
        }
      },
      "archive_metadata": {
        "semantic_type": "status.archive.compliance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "ArchiveCompliancePanel"
        }
      },
      "restoration_metadata": {
        "semantic_type": "status.archive.restoration",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "RestorationSummary"
        }
      },
      "subscription_id": {
        "semantic_type": "billing.subscription.id",
        "token_mapping": "tokenMap(billing.subscription.id)"
      },
      "plan_name": {
        "semantic_type": "billing.plan.name",
        "token_mapping": "tokenMap(billing.plan.name)"
      },
      "plan_code": {
        "semantic_type": "billing.plan.code",
        "token_mapping": "tokenMap(billing.plan.code)"
      },
      "plan_interval": {
        "semantic_type": "billing.plan.interval",
        "token_mapping": "tokenMap(billing.plan.interval)"
      },
      "customer_name": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(customer.account.name)"
      },
      "customer_email": {
        "semantic_type": "customer.account.email",
        "token_mapping": "tokenMap(customer.account.email)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "BillingSummaryBadge",
          "position": "after",
          "props": {
            "amountField": "amount",
            "currencyField": "currency",
            "intervalField": "billing_interval",
            "minorUnitsParameter": "minorUnits"
          }
        },
        {
          "component": "ArchivedRowOverlay",
          "props": {
            "archivedField": "is_archived",
            "style": "grayed",
            "showBadge": true,
            "separateTab": true,
            "tabLabel": "Archived"
          }
        }
      ],
      "detail": [
        {
          "component": "CycleProgressCard",
          "position": "main",
          "priority": 70,
          "props": {
            "progressField": "current_period_progress",
            "periodStartField": "current_period_start",
            "periodEndField": "current_period_end",
            "intervalField": "billing_interval"
          }
        },
        {
          "component": "PaymentTimeline",
          "position": "main",
          "priority": 60,
          "props": {
            "lastPaymentField": "last_payment_at",
            "nextPaymentField": "next_payment_due_at",
            "paymentStatusField": "payment_status",
            "paymentMethodField": "payment_method_type",
            "amountField": "amount",
            "currencyField": "currency"
          }
        },
        {
          "component": "VizMarkPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "bar",
              "source": "payment-events",
              "dateFields": [
                "last_payment_at",
                "next_payment_due_at"
              ],
              "amountField": "amount",
              "minorUnits": 100,
              "currencyField": "currency"
            },
            "title": "Payment amounts",
            "description": "Payments recorded for this subscription, in its currency."
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "CancellationSummary",
          "position": "top",
          "props": {
            "hideWhenDefault": true,
            "cancelAtPeriodEndField": "cancel_at_period_end",
            "reasonField": "cancellation_reason",
            "codeField": "cancellation_reason_code",
            "requestedAtField": "cancellation_requested_at"
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "ArchiveSummary",
          "position": "top",
          "props": {
            "hideWhenDefault": true,
            "archivedField": "is_archived",
            "archivedAtField": "archived_at",
            "restoredAtField": "restored_at",
            "reasonField": "archive_reason",
            "archivedByField": "archived_by",
            "metadataField": "archive_metadata",
            "retainHistoryParameter": "retainHistory",
            "restoreWindowParameter": "restoreWindowDays",
            "allowPartialRestoreParameter": "allowPartialRestore"
          }
        }
      ],
      "form": [
        {
          "component": "BillingIntervalSelector",
          "position": "main",
          "priority": 80,
          "props": {
            "intervalField": "billing_interval",
            "intervalsParameter": "billingIntervals"
          }
        },
        {
          "component": "BillingAmountInput",
          "position": "main",
          "priority": 75,
          "props": {
            "amountField": "amount",
            "currencyField": "currency",
            "minorUnitsParameter": "minorUnits"
          }
        },
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "CancellationForm",
          "position": "top",
          "props": {
            "reasonField": "cancellation_reason",
            "codeField": "cancellation_reason_code",
            "requireReasonParameter": "requireReason",
            "allowedReasonsParameter": "allowedReasons",
            "windowParameter": "cancellationWindowHours"
          }
        }
      ],
      "card": [
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "CancellationBadge",
          "position": "before",
          "props": {
            "field": "cancel_at_period_end",
            "hideWhenFalse": true
          }
        },
        {
          "component": "BillingCardMeta",
          "position": "after",
          "props": {
            "amountField": "amount",
            "currencyField": "currency",
            "intervalField": "billing_interval",
            "minorUnitsParameter": "minorUnits"
          }
        },
        {
          "component": "ArchivePill",
          "position": "before",
          "props": {
            "field": "is_archived",
            "archivedAtField": "archived_at",
            "hideWhenFalse": true
          }
        }
      ],
      "timeline": [
        {
          "component": "PaymentEventTimeline",
          "props": {
            "lastPaymentField": "last_payment_at",
            "nextPaymentField": "next_payment_due_at",
            "paymentStatusField": "payment_status",
            "amountField": "amount",
            "currencyField": "currency"
          }
        }
      ],
      "dashboard": [
        {
          "component": "VizMarkPreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "bar",
              "source": "payment-events",
              "dateFields": [
                "last_payment_at",
                "next_payment_due_at"
              ],
              "amountField": "amount",
              "minorUnits": 100,
              "currencyField": "currency"
            },
            "title": "Payment amounts",
            "description": "Payments recorded for this subscription, in its currency."
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "status.cancel.primary.bg": "var(--status-cancel-bg)",
      "status.cancel.primary.text": "var(--status-cancel-text)",
      "status.cancel.reason.text": "var(--text-default)",
      "status.cancel.timestamp.text": "var(--text-subtle)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "cmp.billing.amount.text": "var(--sys-text-strong)",
      "cmp.billing.amount.currency": "var(--sys-text-subtle)",
      "cmp.billing.amount.interval": "var(--sys-text-subtle)",
      "cmp.billing.cycle.progress.track": "var(--sys-surface-neutral)",
      "cmp.billing.cycle.progress.fill": "var(--sys-surface-accent)",
      "cmp.billing.cycle.progress.text": "var(--sys-text-default)",
      "cmp.billing.cycle.progress.height": "var(--space-1)",
      "cmp.billing.cycle.progress.radius": "var(--radius-full)",
      "cmp.billing.payment.succeeded.bg": "var(--sys-surface-success)",
      "cmp.billing.payment.succeeded.text": "var(--sys-text-success)",
      "cmp.billing.payment.failed.bg": "var(--sys-surface-critical)",
      "cmp.billing.payment.failed.text": "var(--sys-text-critical)",
      "cmp.billing.payment.retrying.bg": "var(--sys-surface-warning)",
      "cmp.billing.payment.retrying.text": "var(--sys-text-warning)",
      "cmp.billing.payment.pending.bg": "var(--sys-surface-info)",
      "cmp.billing.payment.pending.text": "var(--sys-text-info)",
      "cmp.billing.timeline.connector": "var(--sys-border-default)",
      "cmp.billing.timeline.dot": "var(--sys-surface-accent)",
      "cmp.billing.timeline.text": "var(--sys-text-default)",
      "status.archive.primary.bg": "var(--status-archive-bg)",
      "status.archive.primary.text": "var(--status-archive-text)",
      "status.archive.primary.border": "var(--sys-border-default)",
      "status.archive.timestamp.text": "var(--text-subtle)",
      "status.archive.reason.text": "var(--text-default)",
      "status.archive.reason.bg": "var(--sys-surface-neutral)",
      "status.archive.overlay.bg": "var(--sys-surface-disabled)",
      "status.archive.overlay.opacity": "0.6",
      "status.archive.actor.text": "var(--sys-text-secondary)",
      "status.archive.compliance.badge.bg": "var(--sys-status-info-surface)",
      "status.archive.compliance.badge.text": "var(--sys-status-info-text)",
      "viz.mark.bar.fill.default": "var(--cmp-viz-mark-bar-fill)",
      "viz.mark.bar.stroke.default": "var(--cmp-viz-mark-bar-stroke)",
      "viz.mark.bar.spacing": "var(--cmp-viz-mark-spacing)",
      "billing.subscription.status.future": "var(--semantic-info)",
      "billing.subscription.status.trialing": "var(--semantic-info)",
      "billing.subscription.status.active": "var(--semantic-success)",
      "billing.subscription.status.paused": "var(--semantic-warning)",
      "billing.subscription.status.pending_cancellation": "var(--semantic-info)",
      "billing.subscription.status.past_due": "var(--semantic-danger)",
      "billing.subscription.status.unpaid": "var(--semantic-danger)",
      "billing.subscription.status.terminated": "var(--semantic-neutral)",
      "billing.subscription.interval.monthly": "var(--text-subtle)",
      "billing.plan.amount": "var(--text-strong)"
    },
    "warnings": [
      "Subscription refines 11 fields its traits define, and its own definitions are used: lifecycle/Stateful (status); lifecycle/Cancellable (cancel_at_period_end, cancellation_reason, cancellation_requested_at); financial/Billable (amount, currency, billing_interval, current_period_start, current_period_end, current_period_progress, next_payment_due_at)."
    ],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/objects/core/Subscription.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Transaction",
    "version": "1.1.0",
    "domain": "core.commerce",
    "description": "Canonical transaction record tracking monetary movement, lifecycle, and audit metadata.",
    "tags": [
      "universal",
      "transaction",
      "commerce"
    ],
    "maturity": null,
    "traits": [
      {
        "name": "lifecycle/Stateful",
        "alias": null,
        "parameters": {
          "states": [
            "pending",
            "authorized",
            "settled",
            "failed",
            "refunded",
            "cancelled"
          ],
          "initialState": "pending"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": null,
        "parameters": {
          "recordedEvents": [
            "initiated",
            "authorized",
            "settled",
            "refunded",
            "failed"
          ],
          "timezone": "UTC"
        }
      },
      {
        "name": "financial/Priceable",
        "alias": null,
        "parameters": {
          "supportedCurrencies": [
            "USD",
            "EUR",
            "GBP",
            "JPY",
            "AUD"
          ],
          "defaultCurrency": "USD",
          "pricingModels": [
            "one_time",
            "usage_based"
          ],
          "billingIntervals": [
            "one_time"
          ],
          "taxBehavior": "exclusive"
        }
      },
      {
        "name": "lifecycle/Cancellable",
        "alias": null,
        "parameters": {
          "allowCancellationAfterStart": false,
          "cancellationWindowHours": 24,
          "requireReason": true,
          "allowedReasons": [
            "customer_request",
            "suspected_fraud",
            "duplicate_charge",
            "payment_method_error"
          ]
        }
      },
      {
        "name": "lifecycle/Archivable",
        "alias": null,
        "parameters": {
          "gracePeriodDays": 365,
          "retainHistory": true,
          "restoreWindowDays": 30
        }
      }
    ],
    "relationships": [
      {
        "target": "User",
        "via": "user_id",
        "cardinality": "many-to-one",
        "label": "User"
      },
      {
        "target": "Organization",
        "via": "organization_id",
        "cardinality": "many-to-one",
        "label": "Tenant organization"
      }
    ],
    "schema": {
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of valid next states from the current status, computed from the\ntransitionRules parameter. When transitionRules is null (open model), this contains\nall states except the current one. Used by StatusSelector to disable invalid options\nand by StatusBadge to indicate available paths.\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "unit_amount_cents": {
        "type": "number",
        "required": true,
        "description": "Base unit price expressed in the smallest currency denomination.",
        "validation": {
          "minimum": 0
        }
      },
      "currency": {
        "type": "string",
        "required": true,
        "description": "ISO currency code for the unit amount.",
        "validation": {
          "enumFromParameter": "supportedCurrencies"
        }
      },
      "pricing_model": {
        "type": "string",
        "required": true,
        "description": "Monetization model applied to the entity.",
        "validation": {
          "enumFromParameter": "pricingModels"
        }
      },
      "billing_interval": {
        "type": "string",
        "required": false,
        "description": "Billing cadence when pricing_model indicates recurring revenue.",
        "validation": {
          "enumFromParameter": "billingIntervals"
        },
        "unavailable": true
      },
      "tax_behavior": {
        "type": "string",
        "required": true,
        "description": "Defines whether taxes are included in the displayed price.",
        "validation": {
          "enum": [
            "exclusive",
            "inclusive"
          ]
        },
        "default": "exclusive"
      },
      "cancel_at_period_end": {
        "type": "boolean",
        "required": false,
        "description": "Whether cancellation occurs at the natural period end instead of immediately. When true the entity is in a REVERSIBLE pending-cancellation state: the schedule can be undone (set back to false) any time before period end, returning the entity to active. This is distinct from a terminal cancellation (a `terminated`/canceled subscription), which is irreversible and non-reactivatable. Mirrors Stripe's cancel_at_period_end flag (docs.stripe.com/billing/subscriptions/cancel).",
        "default": false,
        "unavailable": true
      },
      "cancellation_reason": {
        "type": "string",
        "required": false,
        "description": "Free-form detail describing why cancellation occurred.",
        "validation": {
          "maxLength": 160
        }
      },
      "cancellation_reason_code": {
        "type": "string",
        "required": false,
        "description": "Structured reason code chosen from the allowedReasons parameter.",
        "validation": {
          "enumFromParameter": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp capturing when the cancellation workflow was initiated."
      },
      "is_archived": {
        "type": "boolean",
        "required": true,
        "description": "Flag indicating whether the entity is currently archived (soft-deleted).",
        "default": false
      },
      "archived_at": {
        "type": "datetime?",
        "required": false,
        "description": "Timestamp for when the entity entered the archived state."
      },
      "restored_at": {
        "type": "datetime?",
        "required": false,
        "description": "Timestamp for when the entity was most recently restored from an archived state."
      },
      "archive_reason": {
        "type": "string",
        "required": false,
        "description": "Human-readable narrative describing why the entity was archived.",
        "validation": {
          "maxLength": 500
        }
      },
      "archived_by": {
        "type": "string",
        "required": false,
        "description": "User ID or system identifier of the actor who archived this entity.\nSet to \"system\" for automated/policy-driven archival. Supports audit trail queries\nlike \"show all entities archived by user X\" or \"show all auto-archived entities\".\n"
      },
      "archive_metadata": {
        "type": "object",
        "required": false,
        "description": "Structured metadata about the archival action for compliance and audit purposes.\n\nProperties:\n  - method: \"manual\" | \"automated\" | \"policy\" — how the archive was triggered\n  - compliance_tags: string[] — regulatory labels (e.g., [\"GDPR\", \"SOX\", \"HIPAA\"])\n  - retention_policy_id: string — reference to the retention policy that triggered archival\n  - original_status: string — the Stateful status before archival\n  - related_entity_count: number — count of related entities also archived (cascade)\n"
      },
      "restoration_metadata": {
        "type": "object",
        "required": false,
        "description": "Metadata about the most recent restoration action.\n\nProperties:\n  - restored_by: string — user ID or \"system\"\n  - restored_fields: string[] — when partial restore, which fields were restored\n  - restoration_reason: string — why the entity was restored\n  - restored_from_snapshot: boolean — whether restored from a point-in-time snapshot\n"
      },
      "transaction_id": {
        "type": "uuid",
        "required": true,
        "description": "Unique identifier for the transaction record."
      },
      "user_id": {
        "type": "uuid",
        "required": true,
        "description": "Identifier of the user associated with the transaction."
      },
      "user_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the user associated with the transaction."
      },
      "organization_id": {
        "type": "uuid",
        "required": false,
        "description": "Tenant organization responsible for the transaction."
      },
      "organization_name": {
        "type": "string",
        "required": false,
        "description": "Display name of the tenant organization responsible for the transaction."
      },
      "occurred_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp when the transaction occurred in the source system."
      },
      "payment_method": {
        "type": "string",
        "required": true,
        "description": "Funding source used to complete the transaction.",
        "validation": {
          "enum": [
            "card",
            "bank_transfer",
            "digital_wallet",
            "invoice"
          ]
        }
      },
      "channel": {
        "type": "string",
        "required": true,
        "default": "online",
        "description": "Sales channel through which the transaction was initiated.",
        "validation": {
          "enum": [
            "online",
            "in_app",
            "point_of_sale",
            "partner"
          ]
        }
      },
      "payment_reference": {
        "type": "string",
        "required": false,
        "description": "Provider reference code linking to the payment processor."
      },
      "description": {
        "type": "string",
        "required": false,
        "description": "What the payment was for, as it appears on the customer's statement.",
        "validation": {
          "maxLength": 160
        }
      },
      "risk_score": {
        "type": "number",
        "required": false,
        "description": "Fraud assessment score assigned during authorization.",
        "validation": {
          "minimum": 0,
          "maximum": 100
        }
      }
    },
    "semantics": {
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "Drives the set of enabled options in the state transition UI."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "unit_amount_cents": {
        "semantic_type": "commerce.price.amount",
        "token_mapping": "tokenMap(commerce.price.primary)",
        "ui_hints": {
          "minorUnits": 100,
          "component": "CurrencyAmount",
          "currencyField": "currency"
        }
      },
      "currency": {
        "semantic_type": "commerce.price.currency",
        "token_mapping": "tokenMap(commerce.currency.primary)",
        "ui_hints": {
          "component": "CurrencyCode",
          "parameterSource": "supportedCurrencies"
        }
      },
      "pricing_model": {
        "semantic_type": "commerce.price.model",
        "token_mapping": "tokenMap(commerce.pricing.model)",
        "ui_hints": {
          "component": "PricingModelBadge",
          "parameterSource": "pricingModels"
        }
      },
      "billing_interval": {
        "semantic_type": "commerce.price.interval",
        "token_mapping": "tokenMap(commerce.pricing.interval)",
        "ui_hints": {
          "component": "BillingIntervalBadge",
          "parameterSource": "billingIntervals"
        }
      },
      "tax_behavior": {
        "semantic_type": "commerce.price.tax_behavior",
        "token_mapping": "tokenMap(commerce.pricing.tax)",
        "ui_hints": {
          "component": "TaxBehaviorTag"
        }
      },
      "cancel_at_period_end": {
        "semantic_type": "status.cancel.deferred",
        "token_mapping": "tokenMap(status.cancel.*)",
        "ui_hints": {
          "component": "CancellationToggle",
          "emphasizeWhenTrue": true
        }
      },
      "cancellation_reason": {
        "semantic_type": "status.cancel.reason",
        "token_mapping": "tokenMap(status.cancel.reason)",
        "ui_hints": {
          "component": "CancellationReason",
          "multiline": true,
          "maxLength": 160
        }
      },
      "cancellation_reason_code": {
        "semantic_type": "status.cancel.reason_code",
        "token_mapping": "tokenMap(status.cancel.code.*)",
        "ui_hints": {
          "component": "ReasonPicker",
          "parameterSource": "allowedReasons"
        }
      },
      "cancellation_requested_at": {
        "semantic_type": "status.cancel.timestamp",
        "token_mapping": "tokenMap(status.cancel.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "is_archived": {
        "semantic_type": "status.archive.state",
        "token_mapping": "tokenMap(status.archive.*)",
        "ui_hints": {
          "component": "ArchiveBadge",
          "showIcon": true
        }
      },
      "archived_at": {
        "semantic_type": "status.archive.timestamp",
        "token_mapping": "tokenMap(status.archive.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "restored_at": {
        "semantic_type": "status.archive.restore_timestamp",
        "token_mapping": "tokenMap(status.archive.restore)",
        "ui_hints": {
          "component": "TimelineTimestamp"
        }
      },
      "archive_reason": {
        "semantic_type": "status.archive.reason",
        "token_mapping": "tokenMap(status.archive.reason)",
        "ui_hints": {
          "component": "ArchiveReason",
          "maxLength": 500
        }
      },
      "archived_by": {
        "semantic_type": "status.archive.actor",
        "token_mapping": "tokenMap(status.archive.actor)",
        "ui_hints": {
          "component": "ActorLabel"
        }
      },
      "archive_metadata": {
        "semantic_type": "status.archive.compliance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "ArchiveCompliancePanel"
        }
      },
      "restoration_metadata": {
        "semantic_type": "status.archive.restoration",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "RestorationSummary"
        }
      },
      "transaction_id": {
        "semantic_type": "commerce.transaction.id",
        "token_mapping": "tokenMap(commerce.transaction.id)"
      },
      "user_id": {
        "semantic_type": "identity.user.id",
        "token_mapping": "tokenMap(identity.id.primary)",
        "ui_hints": {
          "displayLabelField": "user_name"
        }
      },
      "user_name": {
        "semantic_type": "identity.user.name",
        "token_mapping": "tokenMap(identity.name.primary)"
      },
      "organization_id": {
        "semantic_type": "organization.id",
        "token_mapping": "tokenMap(organization.id.primary)",
        "ui_hints": {
          "displayLabelField": "organization_name"
        }
      },
      "organization_name": {
        "semantic_type": "organization.name",
        "token_mapping": "tokenMap(organization.name.primary)"
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(commerce.transaction.description)"
      },
      "occurred_at": {
        "semantic_type": "commerce.transaction.timestamp",
        "token_mapping": "tokenMap(commerce.transaction.timestamp)"
      },
      "payment_method": {
        "semantic_type": "commerce.payment.method",
        "token_mapping": "tokenMap(commerce.payment.method)"
      },
      "channel": {
        "semantic_type": "commerce.transaction.channel",
        "token_mapping": "tokenMap(commerce.transaction.channel)"
      },
      "payment_reference": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(commerce.transaction.id)",
        "ui_hints": {
          "displayFallbackField": "transaction_id"
        }
      },
      "risk_score": {
        "semantic_type": "risk.transaction.score",
        "token_mapping": "tokenMap(risk.score.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "PriceBadge",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency"
          }
        },
        {
          "component": "ArchivedRowOverlay",
          "props": {
            "archivedField": "is_archived",
            "style": "grayed",
            "showBadge": true,
            "separateTab": true,
            "tabLabel": "Archived"
          }
        }
      ],
      "detail": [
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "PriceSummary",
          "position": "top",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency",
            "modelField": "pricing_model",
            "taxBehaviorField": "tax_behavior"
          }
        },
        {
          "component": "CancellationEvent",
          "position": "top",
          "props": {
            "title": "Cancellation",
            "timestampField": "cancellation_requested_at",
            "labelField": "cancellation_reason",
            "codeField": "cancellation_reason_code"
          }
        },
        {
          "component": "ArchiveSummary",
          "position": "top",
          "props": {
            "hideWhenDefault": true,
            "archivedField": "is_archived",
            "archivedAtField": "archived_at",
            "restoredAtField": "restored_at",
            "reasonField": "archive_reason",
            "archivedByField": "archived_by",
            "metadataField": "archive_metadata",
            "retainHistoryParameter": "retainHistory",
            "restoreWindowParameter": "restoreWindowDays",
            "allowPartialRestoreParameter": "allowPartialRestore"
          }
        }
      ],
      "form": [
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "CancellationForm",
          "position": "top",
          "props": {
            "reasonField": "cancellation_reason",
            "codeField": "cancellation_reason_code",
            "requireReasonParameter": "requireReason",
            "allowedReasonsParameter": "allowedReasons",
            "windowParameter": "cancellationWindowHours"
          }
        }
      ],
      "card": [
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "PriceBadge",
          "position": "after",
          "props": {
            "amountField": "unit_amount_cents",
            "currencyField": "currency"
          }
        },
        {
          "component": "ArchivePill",
          "position": "before",
          "props": {
            "field": "is_archived",
            "archivedAtField": "archived_at",
            "hideWhenFalse": true
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "commerce.price.text": "var(--text-strong)",
      "commerce.price.badge.bg": "var(--surface-accent)",
      "commerce.pricing.model.text": "var(--text-default)",
      "status.cancel.primary.bg": "var(--status-cancel-bg)",
      "status.cancel.primary.text": "var(--status-cancel-text)",
      "status.cancel.reason.text": "var(--text-default)",
      "status.cancel.timestamp.text": "var(--text-subtle)",
      "status.archive.primary.bg": "var(--status-archive-bg)",
      "status.archive.primary.text": "var(--status-archive-text)",
      "status.archive.primary.border": "var(--sys-border-default)",
      "status.archive.timestamp.text": "var(--text-subtle)",
      "status.archive.reason.text": "var(--text-default)",
      "status.archive.reason.bg": "var(--sys-surface-neutral)",
      "status.archive.overlay.bg": "var(--sys-surface-disabled)",
      "status.archive.overlay.opacity": "0.6",
      "status.archive.actor.text": "var(--sys-text-secondary)",
      "status.archive.compliance.badge.bg": "var(--sys-status-info-surface)",
      "status.archive.compliance.badge.text": "var(--sys-status-info-text)",
      "commerce.transaction.id": "var(--text-strong)",
      "commerce.transaction.channel.partner": "var(--status-info)",
      "risk.score.primary": "var(--status-warning)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/objects/core/Transaction.object.yaml",
    "source": "shipped"
  },
  {
    "name": "Usage",
    "version": "1.0.0",
    "domain": "saas.billing",
    "description": "Metered usage snapshot for consumption based billing supporting trend analysis and overage forecasting.",
    "tags": [
      "billing",
      "usage",
      "analytics"
    ],
    "maturity": "beta",
    "traits": [
      {
        "name": "SaaSBillingMetered",
        "alias": "MeterReading",
        "parameters": {
          "unit": "api_calls",
          "rolloverStrategy": "expire",
          "sampleWindowDays": 7
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "UsageAudit",
        "parameters": {
          "recordedEvents": [
            "reading_captured",
            "anomaly_detected",
            "reset"
          ],
          "timezone": "UTC",
          "allowNullUpdatedAt": true
        }
      },
      {
        "name": "viz/MarkLine",
        "alias": null,
        "parameters": {
          "title": "Usage readings",
          "description": "Readings recorded for this meter, by the time each was taken.",
          "chart": {
            "chartType": "line",
            "source": "record-array",
            "dataField": "samples",
            "encodings": {
              "x": {
                "field": "timestamp",
                "scale": "temporal",
                "title": "Recorded at"
              },
              "y": {
                "field": "value",
                "titleField": "unit_label"
              }
            },
            "sampleRows": [
              {
                "timestamp": "2025-06-15T00:00:00Z",
                "value": 1200
              },
              {
                "timestamp": "2025-06-20T00:00:00Z",
                "value": 1800
              },
              {
                "timestamp": "2025-06-25T00:00:00Z",
                "value": 1500
              }
            ]
          }
        }
      }
    ],
    "relationships": [
      {
        "target": "Subscription",
        "via": "subscription_id",
        "cardinality": "many-to-one",
        "label": "Subscription"
      }
    ],
    "schema": {
      "meter_name": {
        "type": "string",
        "required": true,
        "description": "Friendly metered feature name shown in UI (ex: Analytics Seats)."
      },
      "included_quantity": {
        "type": "integer",
        "required": true,
        "description": "Quantity included in base plan before overages."
      },
      "consumed_quantity": {
        "type": "integer",
        "required": true,
        "description": "Actual quantity consumed in the active period."
      },
      "unit_label": {
        "type": "string",
        "required": true,
        "description": "Label for display, defaults to the unit parameter.",
        "defaultFromParameter": "unit"
      },
      "period_start": {
        "type": "date",
        "required": true,
        "description": "Date the usage accumulation window began."
      },
      "period_end": {
        "type": "date",
        "required": true,
        "description": "Date the usage accumulation window ends."
      },
      "rollover_strategy": {
        "type": "string",
        "required": false,
        "description": "Strategy for unused units (inherits rolloverStrategy parameter).",
        "defaultFromParameter": "rolloverStrategy"
      },
      "overage_rate_minor": {
        "type": "integer",
        "required": false,
        "description": "Cost per additional unit expressed in minor currency units."
      },
      "projected_overage_minor": {
        "type": "integer",
        "required": false,
        "description": "Forecasted overage spend derived from consumption trends."
      },
      "samples": {
        "type": "UsageSample[]",
        "required": false,
        "description": "Rolling usage measurements for charts or anomaly detection.",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "usage_id": {
        "type": "string",
        "required": true,
        "description": "Identifier for this usage record."
      },
      "subscription_id": {
        "type": "string",
        "required": true,
        "description": "Subscription the usage belongs to."
      },
      "customer_name": {
        "type": "string",
        "required": false,
        "description": "Customer account the usage is billed to."
      },
      "meter_id": {
        "type": "string",
        "required": true,
        "description": "Provider specific meter identifier."
      },
      "provider": {
        "type": "string",
        "required": true,
        "description": "Source provider for usage data."
      },
      "status": {
        "type": "string",
        "required": false,
        "description": "Health of the usage feed (ok, delayed, investigating).",
        "default": "ok",
        "validation": {
          "enum": [
            "ok",
            "delayed",
            "investigating"
          ]
        }
      },
      "trend_percent": {
        "type": "number",
        "required": false,
        "description": "Percent delta compared to previous window."
      },
      "currency": {
        "type": "string",
        "required": false,
        "description": "ISO 4217 currency the usage is billed in, the subscription's currency."
      },
      "variance_minor": {
        "type": "integer",
        "required": false,
        "description": "Currency impact of usage variance calculated with overage rate."
      },
      "last_reported_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp of the most recent provider usage payload."
      },
      "anomalies": {
        "type": "UsageAnomaly[]",
        "required": false,
        "description": "Detected anomalies with context for investigation.",
        "default": []
      }
    },
    "semantics": {
      "meter_name": {
        "semantic_type": "text.label",
        "token_mapping": "tokenMap(billing.usage.meter_name)"
      },
      "included_quantity": {
        "semantic_type": "billing.usage.included_quantity",
        "token_mapping": "tokenMap(billing.usage.included_quantity)",
        "ui_hints": {
          "format": "quantity"
        }
      },
      "consumed_quantity": {
        "semantic_type": "billing.usage.consumed_quantity",
        "token_mapping": "tokenMap(billing.usage.consumed_quantity)",
        "ui_hints": {
          "format": "quantity"
        }
      },
      "unit_label": {
        "semantic_type": "billing.usage.unit_label",
        "token_mapping": "tokenMap(billing.usage.unit_label)"
      },
      "period_start": {
        "semantic_type": "billing.usage.period_start",
        "token_mapping": "tokenMap(billing.usage.period_start)"
      },
      "period_end": {
        "semantic_type": "billing.usage.period_end",
        "token_mapping": "tokenMap(billing.usage.period_end)"
      },
      "rollover_strategy": {
        "semantic_type": "billing.usage.rollover_strategy",
        "token_mapping": "tokenMap(billing.usage.rollover_strategy)"
      },
      "overage_rate_minor": {
        "semantic_type": "billing.usage.overage_rate_minor",
        "token_mapping": "tokenMap(billing.usage.overage_rate_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "projected_overage_minor": {
        "semantic_type": "billing.usage.projected_overage_minor",
        "token_mapping": "tokenMap(billing.usage.projected_overage_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "samples": {
        "semantic_type": "billing.usage.samples",
        "token_mapping": "tokenMap(billing.usage.samples)"
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "usage_id": {
        "semantic_type": "billing.usage.id",
        "token_mapping": "tokenMap(billing.usage.id)"
      },
      "subscription_id": {
        "semantic_type": "billing.usage.subscription_id",
        "token_mapping": "tokenMap(billing.usage.subscription_id)"
      },
      "customer_name": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(billing.usage.customer_name)"
      },
      "meter_id": {
        "semantic_type": "billing.usage.meter_id",
        "token_mapping": "tokenMap(billing.usage.meter_id)"
      },
      "provider": {
        "semantic_type": "billing.usage.provider",
        "token_mapping": "tokenMap(billing.usage.provider)"
      },
      "status": {
        "semantic_type": "billing.usage.status",
        "token_mapping": "tokenMap(billing.usage.status)"
      },
      "trend_percent": {
        "semantic_type": "billing.usage.trend_percent",
        "token_mapping": "tokenMap(billing.usage.trend_percent)",
        "ui_hints": {
          "format": "percent"
        }
      },
      "currency": {
        "semantic_type": "billing.usage.currency",
        "token_mapping": "tokenMap(billing.usage.currency)"
      },
      "variance_minor": {
        "semantic_type": "billing.usage.variance_minor",
        "token_mapping": "tokenMap(billing.usage.variance_minor)",
        "ui_hints": {
          "component": "CurrencyAmount",
          "currencyField": "currency",
          "minorUnits": 100
        }
      },
      "last_reported_at": {
        "semantic_type": "billing.usage.last_reported_at",
        "token_mapping": "tokenMap(billing.usage.last_reported_at)"
      },
      "anomalies": {
        "semantic_type": "billing.usage.anomalies",
        "token_mapping": "tokenMap(billing.usage.anomalies)"
      }
    },
    "viewExtensions": {
      "detail": [
        {
          "component": "VizLinePreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "line",
              "source": "record-array",
              "dataField": "samples",
              "encodings": {
                "x": {
                  "field": "timestamp",
                  "scale": "temporal",
                  "title": "Recorded at"
                },
                "y": {
                  "field": "value",
                  "titleField": "unit_label"
                }
              },
              "sampleRows": [
                {
                  "timestamp": "2025-06-15T00:00:00Z",
                  "value": 1200
                },
                {
                  "timestamp": "2025-06-20T00:00:00Z",
                  "value": 1800
                },
                {
                  "timestamp": "2025-06-25T00:00:00Z",
                  "value": 1500
                }
              ]
            },
            "title": "Usage readings",
            "description": "Readings recorded for this meter, by the time each was taken."
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        }
      ],
      "list": [
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        }
      ],
      "dashboard": [
        {
          "component": "VizLinePreview",
          "position": "top",
          "priority": 55,
          "props": {
            "chart": {
              "chartType": "line",
              "source": "record-array",
              "dataField": "samples",
              "encodings": {
                "x": {
                  "field": "timestamp",
                  "scale": "temporal",
                  "title": "Recorded at"
                },
                "y": {
                  "field": "value",
                  "titleField": "unit_label"
                }
              },
              "sampleRows": [
                {
                  "timestamp": "2025-06-15T00:00:00Z",
                  "value": 1200
                },
                {
                  "timestamp": "2025-06-20T00:00:00Z",
                  "value": 1800
                },
                {
                  "timestamp": "2025-06-25T00:00:00Z",
                  "value": 1500
                }
              ]
            },
            "title": "Usage readings",
            "description": "Readings recorded for this meter, by the time each was taken."
          }
        }
      ]
    },
    "tokens": {
      "billing.usage.meter_name": "var(--cmp-text-strong)",
      "billing.usage.consumed_quantity": "var(--cmp-text-accent)",
      "billing.usage.projected_overage_minor": "var(--cmp-text-warning)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "viz.mark.line.stroke.default": "var(--cmp-viz-mark-line-stroke)",
      "viz.mark.line.stroke.highlight": "var(--cmp-viz-mark-line-highlight)",
      "viz.mark.line.marker.fill": "var(--cmp-viz-mark-point-fill)",
      "billing.usage.status.ok": "var(--cmp-badge-text-success)",
      "billing.usage.status.delayed": "var(--cmp-badge-text-warning)",
      "billing.usage.status.investigating": "var(--cmp-badge-text-critical)",
      "billing.usage.trend_percent": "var(--cmp-text-accent)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/domains/saas-billing/objects/Usage.object.yaml",
    "source": "shipped"
  },
  {
    "name": "User",
    "version": "1.4.0",
    "domain": "core.identity",
    "description": "Canonical identity record representing a platform user across lifecycle contexts.",
    "tags": [
      "universal",
      "identity",
      "core"
    ],
    "maturity": "stable",
    "traits": [
      {
        "name": "lifecycle/Stateful",
        "alias": "UserLifecycle",
        "parameters": {
          "states": [
            "invited",
            "active",
            "suspended",
            "deactivated"
          ],
          "initialState": "active"
        }
      },
      {
        "name": "lifecycle/Timestampable",
        "alias": "AuditTrail",
        "parameters": {
          "recordedEvents": [
            "created",
            "profile_updated",
            "status_changed",
            "role_updated"
          ],
          "timezone": "UTC",
          "allowNullUpdatedAt": false
        }
      },
      {
        "name": "behavioral/Taggable",
        "alias": "AffinityTags",
        "parameters": {
          "maxTags": 12,
          "allowCustomTags": false,
          "allowedTags": [
            "admin",
            "beta_tester",
            "vip",
            "suspended"
          ],
          "caseSensitive": false
        }
      },
      {
        "name": "core/Addressable",
        "alias": "UserAddresses",
        "parameters": {
          "roles": [
            "home",
            "billing",
            "shipping"
          ],
          "defaultRole": "home"
        }
      },
      {
        "name": "core/Preferenceable",
        "alias": "UserPreferences",
        "parameters": {
          "namespaces": [
            "theme",
            "notifications",
            "display",
            "privacy"
          ],
          "schemaVersion": "2.0.0",
          "registryNamespace": "user-preferences"
        }
      },
      {
        "name": "core/Authable",
        "alias": "UserAuthz",
        "parameters": {
          "hierarchyDepthLimit": 5
        }
      },
      {
        "name": "core/Communicable",
        "alias": "UserCommunications",
        "parameters": null
      }
    ],
    "schema": {
      "status": {
        "type": "string",
        "required": true,
        "description": "Canonical lifecycle state derived from the states parameter. This is the single source\nof truth for the entity's current lifecycle position. Consumed by Colorized to resolve\nvisual tokens, and by view extensions to render StatusBadge and StatusTimeline.\n",
        "validation": {
          "enumFromParameter": "states"
        }
      },
      "state_history": {
        "type": "StateTransition[]",
        "required": false,
        "description": "Chronological log of state transitions. Each entry records the before/after states,\ntimestamp, and (when governance is enabled) the actor, reason, and transition metadata.\nRendered by StatusTimeline in the detail and timeline views.\n\nEntry structure:\n  - from: string (previous state)\n  - to: string (new state)\n  - timestamp: ISO 8601 datetime\n  - actor_id: string (user/system who triggered the transition, optional)\n  - reason: string (human-readable justification, required when requireTransitionReason is true)\n  - transition_metadata: Record<string, unknown> (arbitrary context, optional)\n",
        "default": []
      },
      "allowed_transitions": {
        "type": "string[]",
        "required": false,
        "description": "Materialized list of valid next states from the current status, computed from the\ntransitionRules parameter. When transitionRules is null (open model), this contains\nall states except the current one. Used by StatusSelector to disable invalid options\nand by StatusBadge to indicate available paths.\n",
        "default": []
      },
      "created_at": {
        "type": "datetime",
        "required": true,
        "description": "Timestamp recording when the entity was first created."
      },
      "updated_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the most recent modification, when available."
      },
      "last_event": {
        "type": "string",
        "required": true,
        "description": "Lifecycle event associated with the most recent timestamp mutation.",
        "validation": {
          "enumFromParameter": "recordedEvents"
        }
      },
      "last_event_at": {
        "type": "datetime",
        "required": false,
        "description": "Timestamp for the lifecycle event captured in last_event."
      },
      "tags": {
        "type": "string[]",
        "required": false,
        "description": "Ordered list of tags assigned to the entity.",
        "default": [],
        "validation": {
          "maxItems": 64
        }
      },
      "tag_count": {
        "type": "number",
        "required": true,
        "description": "Computed number of tags assigned to the entity.",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "tag_metadata": {
        "type": "object[]",
        "required": false,
        "description": "Per-tag governance metadata. Each entry corresponds to a tag in the tags array and\ntracks provenance and usage for taxonomy health monitoring.\n\nEntry structure:\n  - tag: string (the tag value, matches entry in tags array)\n  - created_at: ISO 8601 datetime\n  - created_by: string (user ID or \"system\" for allow-list tags)\n  - usage_count: number (how many entities use this tag, computed)\n  - moderation_status: \"approved\" | \"pending\" | \"rejected\" (when allowTagModeration is true)\n  - canonical_form: string (resolved synonym target, when synonymResolution is enabled)\n",
        "default": []
      },
      "address_roles": {
        "type": "string[]",
        "required": true,
        "description": "Ordered list of roles that currently have address entries.",
        "default": []
      },
      "default_address_role": {
        "type": "string",
        "required": false,
        "description": "Role surfaced in UI contexts when one address must be highlighted.",
        "validation": {
          "enumFromParameter": "roles"
        }
      },
      "addresses": {
        "type": "AddressableEntry[]",
        "required": false,
        "description": "Collection of { role, address, metadata } entries keyed by role.",
        "default": []
      },
      "preference_document": {
        "type": "PreferenceDocument",
        "required": true,
        "description": "Normalized preference payload captured by PreferenceStore (version, preferences map, metadata).",
        "default": {
          "version": "1.0.0",
          "preferences": {
            "theme": {
              "mode": "system"
            },
            "notifications": {
              "mention": {
                "email": true,
                "push": true
              }
            }
          },
          "metadata": {
            "schemaVersion": "1.0.0",
            "lastUpdated": "2025-11-18T00:00:00Z",
            "source": "system",
            "migrationApplied": []
          }
        }
      },
      "preference_metadata": {
        "type": "PreferenceMetadata",
        "required": true,
        "description": "Tracks schema version, lastUpdated timestamp, migration records, and source."
      },
      "preference_version": {
        "defaultFromParameter": "schemaVersion",
        "type": "string",
        "required": true,
        "description": "SemVer mirror of preference_document.version for indexing and analytics.",
        "validation": {
          "pattern": "^\\d+\\.\\d+\\.\\d+$"
        }
      },
      "preference_namespaces": {
        "defaultFromParameter": "namespaces",
        "type": "string[]",
        "required": true,
        "description": "Materialized namespace list resolved from parameters/registry for auditing.",
        "default": [
          "theme",
          "notifications",
          "display"
        ]
      },
      "preference_mutations": {
        "type": "number",
        "required": false,
        "description": "Monotonic counter incremented whenever preferences mutate (invalidates caches).",
        "default": 0,
        "validation": {
          "minimum": 0
        }
      },
      "role_catalog": {
        "type": "AuthzRoleDocument[]",
        "required": true,
        "description": "Canonical RBAC roles (R21.2 Part 4.2 TABLE 1).",
        "examples": [
          [
            {
              "id": "11111111-1111-4111-8111-111111111111",
              "name": "Owner",
              "description": "Full tenant access + invoice approval (R21.2 Table 1)."
            },
            {
              "id": "22222222-2222-4222-8222-222222222222",
              "name": "Approver",
              "description": "Workflow approver for compliance-sensitive documents."
            },
            {
              "id": "33333333-3333-4333-8333-333333333333",
              "name": "Editor",
              "description": "Contributor allowed to create + update documents in scope."
            }
          ]
        ],
        "default": []
      },
      "permission_catalog": {
        "type": "AuthzPermissionDocument[]",
        "required": true,
        "description": "Atomic permissions following resource:action notation (TABLE 2).",
        "default": []
      },
      "role_permissions": {
        "type": "Record<string, string[]>",
        "required": true,
        "description": "Junction map for role→permission edges (TABLE 3).",
        "default": {}
      },
      "membership_records": {
        "type": "AuthzMembershipDocument[]",
        "required": true,
        "description": "SaaS membership triple (user_id, organization_id, role_id) with UNIQUE constraint (TABLE 4).",
        "default": []
      },
      "role_hierarchy_edges": {
        "type": "AuthzRoleHierarchyEdge[]",
        "required": false,
        "description": "Parent→child adjacency list for hierarchical RBAC (Part 3.1).",
        "default": []
      },
      "session_roles": {
        "type": "string[]",
        "required": false,
        "description": "Materialized roles granted within the current session/token exchange.",
        "default": []
      },
      "channel_catalog": {
        "type": "Channel[]",
        "required": true,
        "description": "Provider configuration for each channel (SMTP/Twilio/FCM/Webhook).",
        "examples": [
          [
            {
              "id": "44444444-dddd-4ddd-8ddd-dddddddddddd",
              "name": "Primary Email (SMTP)",
              "type": "email"
            },
            {
              "id": "55555555-eeee-4eee-8eee-eeeeeeeeeeee",
              "name": "Twilio SMS",
              "type": "sms"
            },
            {
              "id": "66666666-ffff-4fff-8fff-ffffffffffff",
              "name": "FCM Push",
              "type": "push"
            },
            {
              "id": "77777777-0000-4000-8000-000000000000",
              "name": "Realtime In-App",
              "type": "in_app"
            }
          ]
        ],
        "default": []
      },
      "template_catalog": {
        "type": "Template[]",
        "required": true,
        "description": "Localized template definitions with declared variables per R20.1 Part 2.3.",
        "examples": [
          [
            {
              "id": "88888888-1111-4111-8111-111111111111",
              "name": "Welcome Email",
              "channelType": "email",
              "subject": "Welcome to OODS Foundry, {{firstName}}!",
              "body": "Hi {{firstName}},\n\nThanks for joining {{workspaceName}}. Activate your account using {{activationLink}}.",
              "variables": [
                "firstName",
                "workspaceName",
                "activationLink"
              ],
              "locale": "en-US"
            },
            {
              "id": "99999999-2222-4222-8222-222222222222",
              "name": "Password Reset Email",
              "channelType": "email",
              "subject": "Reset your OODS Foundry password",
              "body": "Hello {{firstName}},\n\nWe received a request to reset your password. Use this code: {{resetCode}}.",
              "variables": [
                "firstName",
                "resetCode"
              ],
              "locale": "en-US"
            },
            {
              "id": "aaaaaaa1-3333-4333-8333-333333333333",
              "name": "In-App Notification",
              "channelType": "in_app",
              "subject": "New document shared with you",
              "body": "{{actorName}} shared \"{{documentName}}\" with you. Review it before {{dueDate}}.",
              "variables": [
                "actorName",
                "documentName",
                "dueDate"
              ],
              "locale": "en-US"
            }
          ]
        ],
        "default": []
      },
      "delivery_policies": {
        "type": "DeliveryPolicy[]",
        "required": true,
        "description": "Retry/throttle/quiet-hour policies (R20.1 Part 3 lifecycle).",
        "default": []
      },
      "messages": {
        "type": "Message[]",
        "required": false,
        "description": "Atomic message payloads queued for delivery (R20.6 Part 1.2 primitives).",
        "default": []
      },
      "conversations": {
        "type": "Conversation[]",
        "required": false,
        "description": "Multi-party threaded conversations with membership metadata (R20.6 Part 3.3).",
        "default": []
      },
      "message_statuses": {
        "type": "MessageStatusEntry[]",
        "required": false,
        "description": "Delivery state machine transitions (queued → sent → delivered → failed → retried → read).",
        "default": []
      },
      "user_id": {
        "type": "uuid",
        "required": true,
        "description": "Primary identifier used to correlate identity across services."
      },
      "name": {
        "type": "string",
        "required": true,
        "description": "Human-friendly name rendered in headers and list contexts.",
        "validation": {
          "minLength": 1,
          "maxLength": 120
        }
      },
      "preferred_name": {
        "type": "string",
        "required": false,
        "description": "Preferred display name surfaced in collaborative tooling."
      },
      "description": {
        "type": "string",
        "required": false,
        "description": "Supporting summary rendered in detail and card contexts.",
        "validation": {
          "maxLength": 160
        }
      },
      "primary_email": {
        "type": "email",
        "required": true,
        "description": "Canonical login email address for the user."
      },
      "role": {
        "type": "string",
        "required": true,
        "default": "end_user",
        "description": "Highest privilege role currently granted to the user.",
        "validation": {
          "enum": [
            "end_user",
            "admin",
            "owner",
            "billing"
          ]
        }
      },
      "timezone": {
        "type": "string",
        "required": false,
        "default": "UTC",
        "description": "Preferred timezone applied when rendering timestamps."
      }
    },
    "semantics": {
      "status": {
        "semantic_type": "status.state",
        "token_mapping": "tokenMap(status.state.*)",
        "ui_hints": {
          "component": "StatusBadge",
          "showIcon": true
        }
      },
      "state_history": {
        "semantic_type": "timeline.state_transition",
        "token_mapping": "tokenMap(timeline.status.*)",
        "ui_hints": {
          "component": "StatusTimeline",
          "collapseWhenEmpty": true
        }
      },
      "allowed_transitions": {
        "semantic_type": "status.navigation",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "StatusSelector",
          "description": "Drives the set of enabled options in the state transition UI."
        }
      },
      "created_at": {
        "semantic_type": "audit.created_at",
        "token_mapping": "tokenMap(audit.created)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "updated_at": {
        "semantic_type": "audit.updated_at",
        "token_mapping": "tokenMap(audit.updated)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone",
          "allowNullParameter": "allowNullUpdatedAt"
        }
      },
      "last_event": {
        "semantic_type": "audit.event.type",
        "token_mapping": "tokenMap(audit.event.*)",
        "ui_hints": {
          "component": "AuditBadge",
          "parameterSource": "recordedEvents"
        }
      },
      "last_event_at": {
        "semantic_type": "audit.event.timestamp",
        "token_mapping": "tokenMap(audit.event.timestamp)",
        "ui_hints": {
          "component": "TimelineTimestamp",
          "timezoneParameter": "timezone"
        }
      },
      "tags": {
        "semantic_type": "taxonomy.tag.collection",
        "token_mapping": "tokenMap(taxonomy.tag.*)",
        "ui_hints": {
          "component": "TagCollection",
          "allowCreateParameter": "allowCustomTags",
          "allowListParameter": "allowedTags",
          "caseSensitiveParameter": "caseSensitive"
        }
      },
      "tag_count": {
        "semantic_type": "metric.collection.count",
        "token_mapping": "tokenMap(taxonomy.tag.count)",
        "ui_hints": {
          "component": "MetricBadge",
          "format": "integer"
        }
      },
      "tag_metadata": {
        "semantic_type": "taxonomy.tag.governance",
        "token_mapping": "computed",
        "ui_hints": {
          "component": "TagGovernancePanel",
          "description": "Admin panel for reviewing tag health, moderation queue, and synonym resolution."
        }
      },
      "addresses": {
        "semantic_type": "location.address.collection",
        "token_mapping": "tokenMap(location.address.collection)",
        "ui_hints": {
          "component": "AddressCollection",
          "roleParameter": "roles",
          "defaultRoleField": "default_address_role"
        }
      },
      "default_address_role": {
        "semantic_type": "location.address.default_role",
        "token_mapping": "tokenMap(location.address.default_role)",
        "ui_hints": {
          "component": "AddressRoleBadge",
          "parameterSource": "defaultRole"
        }
      },
      "address_roles": {
        "semantic_type": "location.address.roles",
        "token_mapping": "tokenMap(location.address.roles)",
        "ui_hints": {
          "component": "AddressRolePills"
        }
      },
      "preference_document": {
        "semantic_type": "preferences.document",
        "token_mapping": "tokenMap(preferences.document)",
        "ui_hints": {
          "component": "PreferenceDiffPanel",
          "registryNamespaceParameter": "registryNamespace"
        }
      },
      "preference_metadata": {
        "semantic_type": "preferences.metadata",
        "token_mapping": "tokenMap(preferences.metadata)",
        "ui_hints": {
          "component": "PreferenceDiagnostics"
        }
      },
      "preference_version": {
        "semantic_type": "preferences.version",
        "token_mapping": "tokenMap(preferences.version)",
        "ui_hints": {
          "component": "PreferenceVersionBadge"
        }
      },
      "preference_namespaces": {
        "semantic_type": "preferences.namespaces",
        "token_mapping": "tokenMap(preferences.namespaces)",
        "ui_hints": {
          "component": "PreferenceNamespaceChips"
        }
      },
      "membership_records": {
        "semantic_type": "authorization.memberships",
        "token_mapping": "tokenMap(authorization.memberships)",
        "ui_hints": {
          "component": "MembershipMatrix",
          "uniqueConstraint": "user_id+organization_id+role_id"
        }
      },
      "role_catalog": {
        "semantic_type": "authorization.roles",
        "token_mapping": "tokenMap(authorization.roles)",
        "ui_hints": {
          "component": "RoleCatalogPanel"
        }
      },
      "permission_catalog": {
        "semantic_type": "authorization.permissions",
        "token_mapping": "tokenMap(authorization.permissions)",
        "ui_hints": {
          "component": "PermissionList"
        }
      },
      "channel_catalog": {
        "semantic_type": "communication.channels",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "ChannelGrid",
          "badges": "channel_catalog[].type"
        }
      },
      "template_catalog": {
        "semantic_type": "communication.templates",
        "token_mapping": "--sys-communication-muted",
        "ui_hints": {
          "component": "TemplateDrawer",
          "variableBadge": "template_catalog[].variables"
        }
      },
      "delivery_policies": {
        "semantic_type": "communication.delivery_policy",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "DeliveryPolicyCapsule"
        }
      },
      "messages": {
        "semantic_type": "communication.messages",
        "token_mapping": "--sys-communication-success",
        "ui_hints": {
          "component": "MessageTimeline"
        }
      },
      "conversations": {
        "semantic_type": "communication.conversations",
        "token_mapping": "--sys-communication-accent",
        "ui_hints": {
          "component": "ConversationViewer"
        }
      },
      "user_id": {
        "semantic_type": "identity.user.id",
        "token_mapping": "tokenMap(identity.id.primary)"
      },
      "name": {
        "semantic_type": "identity.user.name",
        "token_mapping": "tokenMap(identity.name.primary)"
      },
      "preferred_name": {
        "semantic_type": "identity.user.name_preferred",
        "token_mapping": "tokenMap(identity.name.preferred)"
      },
      "description": {
        "semantic_type": "text.summary",
        "token_mapping": "tokenMap(identity.description.summary)"
      },
      "primary_email": {
        "semantic_type": "identity.user.email",
        "token_mapping": "tokenMap(identity.email.primary)"
      },
      "role": {
        "semantic_type": "identity.user.role",
        "token_mapping": "tokenMap(identity.role.*)"
      },
      "timezone": {
        "semantic_type": "identity.user.timezone",
        "token_mapping": "tokenMap(identity.timezone.primary)"
      }
    },
    "viewExtensions": {
      "list": [
        {
          "component": "MessageStatusBadge",
          "position": "before",
          "priority": 90,
          "props": {
            "statusesField": "message_statuses"
          }
        },
        {
          "component": "StatusBadge",
          "props": {
            "field": "status",
            "tone": "lifecycle"
          }
        },
        {
          "component": "RelativeTimestamp",
          "props": {
            "field": "updated_at",
            "fallbackField": "created_at",
            "timezoneParameter": "timezone"
          }
        },
        {
          "component": "TagPills",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        },
        {
          "component": "AddressSummaryBadge",
          "position": "after",
          "props": {
            "field": "default_address_role"
          }
        },
        {
          "component": "PreferenceSummaryBadge",
          "position": "after",
          "props": {
            "namespacesField": "preference_namespaces",
            "versionField": "preference_version"
          }
        },
        {
          "component": "RoleBadgeList",
          "position": "after",
          "props": {
            "rolesField": "session_roles",
            "fallbackRoleParameter": "defaultRoleId"
          }
        }
      ],
      "detail": [
        {
          "component": "CommunicationDetailPanel",
          "position": "main",
          "priority": 80,
          "props": {
            "channelsField": "channel_catalog",
            "templatesField": "template_catalog",
            "policiesField": "delivery_policies",
            "conversationsField": "conversations"
          }
        },
        {
          "component": "MembershipPanel",
          "position": "main",
          "priority": 75,
          "props": {
            "membershipsField": "membership_records",
            "hierarchyField": "role_hierarchy_edges",
            "roleField": "role_catalog",
            "permissionField": "permission_catalog"
          }
        },
        {
          "component": "AddressCollectionPanel",
          "position": "main",
          "priority": 60,
          "props": {
            "field": "addresses",
            "roleField": "address_roles",
            "defaultRoleField": "default_address_role",
            "roleParameter": "roles"
          }
        },
        {
          "component": "PreferencePanel",
          "position": "main",
          "priority": 55,
          "props": {
            "preferencesField": "preference_document",
            "metadataField": "preference_metadata",
            "namespaceField": "preference_namespaces"
          }
        },
        {
          "component": "StatusTimeline",
          "position": "top",
          "priority": 40,
          "props": {
            "field": "status",
            "historyField": "state_history",
            "statesParameter": "states",
            "showActorId": true,
            "showReason": true
          }
        },
        {
          "component": "AuditTimeline",
          "position": "bottom",
          "props": {
            "createdField": "created_at",
            "updatedField": "updated_at",
            "eventField": "last_event",
            "eventTimestampField": "last_event_at",
            "eventOptionsParameter": "recordedEvents"
          }
        },
        {
          "component": "TagSummary",
          "position": "top",
          "props": {
            "field": "tags",
            "countField": "tag_count"
          }
        }
      ],
      "form": [
        {
          "component": "StatusSelector",
          "position": "top",
          "props": {
            "field": "status",
            "optionsParameter": "states",
            "initialParameter": "initialState",
            "allowedTransitionsField": "allowed_transitions",
            "requireReasonParameter": "requireTransitionReason"
          }
        },
        {
          "component": "TagInput",
          "position": "top",
          "props": {
            "field": "tags",
            "maxTagsParameter": "maxTags",
            "allowCustomParameter": "allowCustomTags",
            "allowListParameter": "allowedTags",
            "minLengthParameter": "tagMinLength",
            "maxLengthParameter": "tagMaxLength",
            "synonymParameter": "synonymResolution"
          }
        },
        {
          "component": "AddressEditor",
          "position": "top",
          "props": {
            "field": "addresses",
            "roleParameter": "roles",
            "allowDynamicParameter": "allowDynamicRoles",
            "defaultRoleField": "default_address_role"
          }
        },
        {
          "component": "PreferenceEditor",
          "position": "main",
          "props": {
            "namespacesField": "preference_namespaces",
            "documentField": "preference_document",
            "registryNamespaceParameter": "registryNamespace"
          }
        },
        {
          "component": "RoleAssignmentForm",
          "position": "main",
          "props": {
            "availableRolesField": "role_catalog",
            "membershipField": "membership_records",
            "defaultRoleParameter": "defaultRoleId"
          }
        },
        {
          "component": "TemplatePicker",
          "position": "main",
          "props": {
            "templatesField": "template_catalog",
            "channelsField": "channel_catalog"
          }
        }
      ],
      "card": [
        {
          "component": "StatusBadge",
          "position": "before",
          "props": {
            "field": "status",
            "variant": "subtle"
          }
        },
        {
          "component": "TagPills",
          "position": "after",
          "props": {
            "field": "tags",
            "maxVisible": 3,
            "overflowLabel": "+{{ tag_count }}"
          }
        }
      ]
    },
    "tokens": {
      "status.state.default.bg": "var(--status-neutral-bg)",
      "status.state.default.text": "var(--status-neutral-text)",
      "status.timeline.connector": "var(--border-subtle)",
      "status.timeline.node.bg": "var(--sys-surface-raised)",
      "status.timeline.node.border": "var(--sys-border-default)",
      "status.timeline.actor.text": "var(--sys-text-secondary)",
      "status.timeline.reason.text": "var(--sys-text-tertiary)",
      "status.timeline.reason.bg": "var(--sys-surface-neutral)",
      "audit.created.badge.text": "var(--text-subtle)",
      "audit.updated.badge.text": "var(--text-subtle)",
      "audit.event.badge.bg": "var(--surface-muted)",
      "taxonomy.tag.chip.bg": "var(--surface-tag-bg)",
      "taxonomy.tag.chip.text": "var(--surface-tag-text)",
      "taxonomy.tag.chip.border": "var(--sys-border-default)",
      "taxonomy.tag.chip.hover.bg": "var(--sys-surface-hover)",
      "taxonomy.tag.chip.pending.bg": "var(--sys-status-warning-surface)",
      "taxonomy.tag.chip.pending.text": "var(--sys-status-warning-text)",
      "taxonomy.tag.summary.count": "var(--text-subtle)",
      "taxonomy.tag.input.border": "var(--sys-border-default)",
      "taxonomy.tag.input.focus.border": "var(--sys-border-focus)",
      "location.address.card.bg": "var(--sys-surface-raised)",
      "location.address.card.border": "var(--sys-border-subtle)",
      "location.address.role.text": "var(--sys-text-muted)",
      "preferences.panel.bg": "var(--sys-surface-raised)",
      "preferences.panel.border": "var(--sys-border-strong)",
      "preferences.namespace.badge.bg": "var(--sys-surface-muted)",
      "preferences.namespace.badge.text": "var(--sys-text-strong)",
      "auth.roles.badge.bg": "var(--sys-surface-neutral)",
      "auth.roles.badge.text": "var(--sys-text-strong)",
      "auth.membership.card.border": "var(--sys-border-strong)",
      "auth.membership.card.bg": "var(--sys-surface-raised)",
      "communication.card.bg": "var(--sys-surface-raised)",
      "communication.card.border": "var(--sys-communication-muted)",
      "communication.status.success": "var(--sys-communication-success)",
      "communication.status.error": "var(--sys-communication-error)",
      "identity.id.primary": "var(--text-strong)",
      "identity.name.primary": "var(--text-strong)",
      "identity.email.primary": "var(--text-subtle)",
      "identity.role.admin": "var(--status-info)",
      "identity.timezone.primary": "var(--text-muted)",
      "identity.description.summary": "var(--text-subtle)"
    },
    "warnings": [],
    "filePath": "~/.oods-foundry/runtime/0.11.3-510074895fa1/objects/core/User.object.yaml",
    "source": "shipped"
  }
]
