[
  {
    "kind": "item",
    "slug": "deal",
    "name": "Deal",
    "description": "Sales opportunity with stage, value, and close date",
    "icon": "briefcase",
    "color": "#3B82F6",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Deals",
          "fields": {
            "stage": {
              "sortable": true,
              "display_type": "badge"
            },
            "value": {
              "sortable": true,
              "display_type": "currency"
            },
            "close_date": {
              "sortable": true,
              "display_type": "date"
            },
            "probability": {
              "sortable": true,
              "display_type": "percentage"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Deal",
          "sections": [
            {
              "title": "Deal Info",
              "fields": [
                "stage",
                "value",
                "close_date",
                "probability",
                "source"
              ]
            },
            {
              "title": "Ownership",
              "fields": [
                "owner_person_id",
                "account_id"
              ]
            }
          ]
        }
      },
      "fields": {
        "stage": {
          "label": "Stage",
          "required": true,
          "data_type": "select",
          "options": [
            {
              "label": "Prospecting",
              "value": "prospecting"
            },
            {
              "label": "Qualification",
              "value": "qualification"
            },
            {
              "label": "Proposal",
              "value": "proposal"
            },
            {
              "label": "Negotiation",
              "value": "negotiation"
            },
            {
              "label": "Closed Won",
              "value": "closed_won"
            },
            {
              "label": "Closed Lost",
              "value": "closed_lost"
            }
          ]
        },
        "value": {
          "label": "Deal Value (USD)",
          "data_type": "number"
        },
        "close_date": {
          "label": "Expected Close Date",
          "data_type": "date"
        },
        "owner_person_id": {
          "label": "Deal Owner",
          "data_type": "text"
        },
        "account_id": {
          "label": "Company",
          "data_type": "text"
        },
        "probability": {
          "label": "Probability %",
          "data_type": "number"
        },
        "source": {
          "label": "Lead Source",
          "data_type": "select",
          "options": [
            {
              "label": "Inbound",
              "value": "inbound"
            },
            {
              "label": "Outbound",
              "value": "outbound"
            },
            {
              "label": "Referral",
              "value": "referral"
            },
            {
              "label": "Event",
              "value": "event"
            },
            {
              "label": "Paid",
              "value": "paid"
            },
            {
              "label": "Organic",
              "value": "organic"
            }
          ]
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "site_visit",
    "name": "Site Visit",
    "description": "Website visit tracking event",
    "icon": "eye",
    "color": "#8B5CF6",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Site Visits",
          "fields": {
            "url": {
              "sortable": true,
              "display_type": "text"
            },
            "duration_seconds": {
              "sortable": true,
              "display_type": "number"
            },
            "source": {
              "sortable": true,
              "display_type": "badge"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Site Visit",
          "sections": [
            {
              "title": "Visit",
              "fields": [
                "url",
                "duration_seconds",
                "source"
              ]
            },
            {
              "title": "Attribution",
              "fields": [
                "utm_campaign",
                "utm_medium",
                "utm_source",
                "referrer"
              ]
            }
          ]
        }
      },
      "fields": {
        "url": {
          "label": "Page URL",
          "required": true,
          "data_type": "text"
        },
        "duration_seconds": {
          "label": "Duration (seconds)",
          "data_type": "number"
        },
        "source": {
          "label": "Traffic Source",
          "data_type": "text"
        },
        "utm_campaign": {
          "label": "UTM Campaign",
          "data_type": "text"
        },
        "utm_medium": {
          "label": "UTM Medium",
          "data_type": "text"
        },
        "utm_source": {
          "label": "UTM Source",
          "data_type": "text"
        },
        "referrer": {
          "label": "Referrer URL",
          "data_type": "text"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "marketing_touch",
    "name": "Marketing Touch",
    "description": "Marketing touchpoint: channel, campaign, content, conversion",
    "icon": "megaphone",
    "color": "#F59E0B",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Marketing Touches",
          "fields": {
            "channel": {
              "sortable": true,
              "display_type": "badge"
            },
            "campaign": {
              "sortable": true,
              "display_type": "text"
            },
            "converted": {
              "sortable": true,
              "display_type": "boolean"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Marketing Touch",
          "sections": [
            {
              "title": "Touch",
              "fields": [
                "channel",
                "campaign",
                "content",
                "converted"
              ]
            },
            {
              "title": "Attribution",
              "fields": [
                "deal_id"
              ]
            }
          ]
        }
      },
      "fields": {
        "channel": {
          "label": "Channel",
          "required": true,
          "data_type": "select",
          "options": [
            {
              "label": "Email",
              "value": "email"
            },
            {
              "label": "Social",
              "value": "social"
            },
            {
              "label": "Paid Search",
              "value": "paid_search"
            },
            {
              "label": "Organic Search",
              "value": "organic_search"
            },
            {
              "label": "Direct",
              "value": "direct"
            },
            {
              "label": "Event",
              "value": "event"
            },
            {
              "label": "Referral",
              "value": "referral"
            }
          ]
        },
        "campaign": {
          "label": "Campaign Name",
          "data_type": "text"
        },
        "content": {
          "label": "Content/Asset",
          "data_type": "text"
        },
        "converted": {
          "label": "Converted",
          "data_type": "boolean"
        },
        "deal_id": {
          "label": "Related Deal",
          "data_type": "text"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "csm_health",
    "name": "CSM Health Record",
    "description": "Customer success health check: temperature, churn risk, adoption, NPS",
    "icon": "heart-pulse",
    "color": "#10B981",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Health Records",
          "fields": {
            "account_id": {
              "sortable": true,
              "display_type": "text"
            },
            "temperature": {
              "sortable": true,
              "display_type": "badge"
            },
            "churn_risk_score": {
              "sortable": true,
              "display_type": "number"
            },
            "nps_score": {
              "sortable": true,
              "display_type": "number"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Health Record",
          "sections": [
            {
              "title": "Health",
              "fields": [
                "temperature",
                "churn_risk_score",
                "adoption_score",
                "nps_score"
              ]
            },
            {
              "title": "Account",
              "fields": [
                "account_id",
                "notes"
              ]
            }
          ]
        }
      },
      "fields": {
        "temperature": {
          "label": "Health Temperature",
          "required": true,
          "data_type": "select",
          "options": [
            {
              "label": "Green",
              "value": "green"
            },
            {
              "label": "Yellow",
              "value": "yellow"
            },
            {
              "label": "Red",
              "value": "red"
            }
          ]
        },
        "churn_risk_score": {
          "label": "Churn Risk Score (0-100)",
          "data_type": "number"
        },
        "adoption_score": {
          "label": "Adoption Score (0-100)",
          "data_type": "number"
        },
        "nps_score": {
          "label": "NPS Score (-100 to 100)",
          "data_type": "number"
        },
        "account_id": {
          "label": "Customer Account",
          "required": true,
          "data_type": "text"
        },
        "notes": {
          "label": "CSM Notes",
          "data_type": "textarea"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "funnel_signal",
    "name": "Funnel Signal",
    "description": "Individual prospect/customer activity with engagement scoring",
    "icon": "activity",
    "color": "#3B82F6",
    "ownership": "system",
    "is_active": true,
    "design_schema": {
      "scope": "system",
      "fields": {
        "anonymous_id": {
          "label": "Anonymous ID",
          "data_type": "text"
        },
        "person_id": {
          "label": "Person ID",
          "data_type": "text"
        },
        "account_id": {
          "label": "Account ID",
          "data_type": "text"
        },
        "session_id": {
          "label": "Session ID",
          "data_type": "text"
        },
        "stage": {
          "label": "Stage",
          "data_type": "select",
          "options": [
            {
              "label": "Anonymous",
              "value": "anonymous"
            },
            {
              "label": "Identified",
              "value": "identified"
            },
            {
              "label": "Installed",
              "value": "installed"
            }
          ]
        },
        "source": {
          "label": "Source",
          "data_type": "select",
          "options": [
            {
              "label": "Marketing",
              "value": "mar"
            },
            {
              "label": "Internal",
              "value": "int"
            },
            {
              "label": "User",
              "value": "use"
            },
            {
              "label": "Manual",
              "value": "manual"
            }
          ]
        },
        "action_type": {
          "label": "Action Type",
          "data_type": "text"
        },
        "action_value": {
          "label": "Action Value",
          "data_type": "number"
        },
        "engagement_score": {
          "label": "Engagement Score",
          "data_type": "number"
        },
        "temperature": {
          "label": "Temperature",
          "data_type": "select",
          "options": [
            {
              "label": "Cold",
              "value": "cold"
            },
            {
              "label": "Warm",
              "value": "warm"
            },
            {
              "label": "Hot",
              "value": "hot"
            }
          ]
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "anonymous_session",
    "name": "Anonymous Session",
    "description": "Pre-identification visitor session with locked first-touch attribution",
    "icon": "user",
    "color": "#8B5CF6",
    "ownership": "system",
    "is_active": true,
    "design_schema": {
      "scope": "system",
      "fields": {
        "anonymous_id": {
          "label": "Anonymous ID",
          "data_type": "text"
        },
        "referrer_domain": {
          "label": "Referrer Domain",
          "data_type": "text"
        },
        "referrer_url": {
          "label": "Referrer URL",
          "data_type": "text"
        },
        "landing_page": {
          "label": "Landing Page",
          "data_type": "text"
        },
        "utm_source": {
          "label": "UTM Source",
          "data_type": "text"
        },
        "utm_medium": {
          "label": "UTM Medium",
          "data_type": "text"
        },
        "utm_campaign": {
          "label": "UTM Campaign",
          "data_type": "text"
        },
        "session_depth": {
          "label": "Session Depth",
          "data_type": "number"
        },
        "rating": {
          "label": "Rating",
          "data_type": "number"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "opportunity_queue",
    "name": "Opportunity Queue Entry",
    "description": "Manual review queue for high-engagement prospects",
    "icon": "star",
    "color": "#F59E0B",
    "ownership": "system",
    "is_active": true,
    "design_schema": {
      "scope": "system",
      "fields": {
        "account_id": {
          "label": "Account ID",
          "data_type": "text"
        },
        "person_id": {
          "label": "Person ID",
          "data_type": "text"
        },
        "source_signal_id": {
          "label": "Source Signal",
          "data_type": "text"
        },
        "opportunity_type": {
          "label": "Opportunity Type",
          "data_type": "select",
          "options": [
            {
              "label": "Advanced Portal",
              "value": "advanced_portal"
            },
            {
              "label": "Implementation",
              "value": "implementation"
            },
            {
              "label": "Support Plan",
              "value": "support_plan"
            },
            {
              "label": "Managed Services",
              "value": "managed_services"
            },
            {
              "label": "Expansion",
              "value": "expansion"
            },
            {
              "label": "Advocate",
              "value": "advocate"
            }
          ]
        },
        "confidence": {
          "label": "Confidence",
          "data_type": "select",
          "options": [
            {
              "label": "Low",
              "value": "low"
            },
            {
              "label": "Medium",
              "value": "medium"
            },
            {
              "label": "High",
              "value": "high"
            }
          ]
        },
        "status": {
          "label": "Status",
          "data_type": "select",
          "options": [
            {
              "label": "Pending",
              "value": "pending"
            },
            {
              "label": "Accepted",
              "value": "accepted"
            },
            {
              "label": "Rejected",
              "value": "rejected"
            },
            {
              "label": "Converted",
              "value": "converted"
            }
          ]
        },
        "reviewer_notes": {
          "label": "Reviewer Notes",
          "data_type": "textarea"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "funnel_aggregation",
    "name": "Funnel Aggregation",
    "description": "Pre-computed funnel metrics for dashboard performance",
    "icon": "bar-chart-2",
    "color": "#10B981",
    "ownership": "system",
    "is_active": true,
    "design_schema": {
      "scope": "system",
      "fields": {
        "aggregation_scope": {
          "label": "Scope",
          "data_type": "select",
          "options": [
            {
              "label": "System",
              "value": "system"
            },
            {
              "label": "Account",
              "value": "account"
            }
          ]
        },
        "period_start": {
          "label": "Period Start",
          "data_type": "datetime"
        },
        "period_end": {
          "label": "Period End",
          "data_type": "datetime"
        },
        "metrics": {
          "label": "Metrics",
          "data_type": "json"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "support_queue",
    "name": "Support Queue Entry",
    "description": "Human-assignable support ticket from AI escalation",
    "icon": "inbox",
    "color": "#F59E0B",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Queue Entries",
          "fields": {
            "ticket_id": {
              "sortable": true,
              "display_type": "text"
            },
            "priority_score": {
              "sortable": true,
              "display_type": "number"
            },
            "escalation_reason": {
              "sortable": true,
              "display_type": "badge"
            },
            "assigned_to": {
              "sortable": true,
              "display_type": "text"
            },
            "sla_deadline": {
              "sortable": true,
              "display_type": "timestamp"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Queue Entry",
          "sections": [
            {
              "title": "Ticket",
              "fields": [
                "ticket_id",
                "escalation_reason",
                "priority_score"
              ]
            },
            {
              "title": "Assignment",
              "fields": [
                "assigned_to",
                "sla_deadline"
              ]
            }
          ]
        }
      },
      "fields": {
        "ticket_id": {
          "label": "Source Ticket",
          "data_type": "text"
        },
        "priority_score": {
          "label": "Priority Score",
          "data_type": "number"
        },
        "escalation_reason": {
          "label": "Escalation Reason",
          "data_type": "select",
          "options": [
            {
              "label": "Low Confidence",
              "value": "low_confidence"
            },
            {
              "label": "Thumbs Down",
              "value": "thumbs_down"
            },
            {
              "label": "Customer Request",
              "value": "customer_request"
            }
          ]
        },
        "assigned_to": {
          "label": "Assignee",
          "data_type": "text"
        },
        "sla_deadline": {
          "label": "SLA Deadline",
          "data_type": "datetime"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "support_ticket",
    "name": "Support Ticket",
    "description": "Customer support request with AI-first escalation chain",
    "icon": "ticket",
    "color": "#EF4444",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "platform",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Support Tickets",
          "fields": {
            "title": {
              "sortable": true,
              "display_type": "text"
            },
            "status": {
              "sortable": true,
              "display_type": "badge"
            },
            "priority": {
              "sortable": true,
              "display_type": "badge"
            },
            "tier": {
              "sortable": true,
              "display_type": "badge"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Support Ticket",
          "sections": [
            {
              "title": "Request",
              "fields": [
                "title",
                "description",
                "status",
                "priority"
              ]
            },
            {
              "title": "Assignment",
              "fields": [
                "assigned_agent_id",
                "tier",
                "integrity_status"
              ]
            }
          ]
        }
      },
      "fields": {
        "title": {
          "label": "Title",
          "required": true,
          "data_type": "text"
        },
        "description": {
          "label": "Description",
          "required": true,
          "data_type": "textarea"
        },
        "status": {
          "label": "Status",
          "required": true,
          "data_type": "select",
          "options": [
            {
              "label": "Open",
              "value": "open"
            },
            {
              "label": "AI Responding",
              "value": "ai_responding"
            },
            {
              "label": "Community Escalated",
              "value": "community_escalated"
            },
            {
              "label": "Human Assigned",
              "value": "human_assigned"
            },
            {
              "label": "Resolved",
              "value": "resolved"
            },
            {
              "label": "Closed",
              "value": "closed"
            }
          ]
        },
        "priority": {
          "label": "Priority",
          "required": true,
          "data_type": "select",
          "options": [
            {
              "label": "Low",
              "value": "low"
            },
            {
              "label": "Medium",
              "value": "medium"
            },
            {
              "label": "High",
              "value": "high"
            },
            {
              "label": "Urgent",
              "value": "urgent"
            }
          ]
        },
        "tier": {
          "label": "Support Tier",
          "data_type": "select",
          "options": [
            {
              "label": "Core",
              "value": "core"
            },
            {
              "label": "Custom",
              "value": "custom"
            },
            {
              "label": "Enterprise",
              "value": "enterprise"
            }
          ]
        },
        "assigned_agent_id": {
          "label": "Assigned Agent",
          "data_type": "text"
        },
        "integrity_status": {
          "label": "Integrity Status",
          "data_type": "select",
          "options": [
            {
              "label": "Clean",
              "value": "clean"
            },
            {
              "label": "Modified",
              "value": "modified"
            },
            {
              "label": "Unknown",
              "value": "unknown"
            }
          ]
        },
        "aim_resolved_by_ai": {
          "label": "Resolved by AI",
          "data_type": "boolean",
          "default": false
        },
        "aim_retrieval_confidence": {
          "label": "AI Retrieval Confidence",
          "data_type": "number"
        },
        "bug_confirmed": {
          "label": "Bug Confirmed",
          "data_type": "boolean",
          "default": false
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "community_post",
    "name": "Community Post",
    "description": "Community discussion post with voting and accepted answers",
    "icon": "message-circle",
    "color": "#6366F1",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "platform",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Community Posts",
          "fields": {
            "title": {
              "sortable": true,
              "display_type": "text"
            },
            "channel": {
              "sortable": true,
              "display_type": "badge"
            },
            "moderation_status": {
              "sortable": true,
              "display_type": "badge"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Community Post",
          "sections": [
            {
              "title": "Content",
              "fields": [
                "title",
                "content",
                "channel",
                "context"
              ]
            },
            {
              "title": "Moderation",
              "fields": [
                "moderation_status",
                "helpful_count",
                "not_helpful_count",
                "accepted_answer_id"
              ]
            }
          ]
        }
      },
      "fields": {
        "title": {
          "label": "Title",
          "required": true,
          "data_type": "text"
        },
        "content": {
          "label": "Content",
          "required": true,
          "data_type": "textarea"
        },
        "context": {
          "label": "Context",
          "required": true,
          "data_type": "select",
          "options": [
            {
              "label": "Support",
              "value": "support"
            },
            {
              "label": "Community",
              "value": "community"
            }
          ]
        },
        "channel": {
          "label": "Channel",
          "required": true,
          "data_type": "select",
          "options": [
            {
              "label": "General",
              "value": "general"
            },
            {
              "label": "Announcements",
              "value": "announcements"
            },
            {
              "label": "Help",
              "value": "help"
            },
            {
              "label": "Show and Tell",
              "value": "show-and-tell"
            }
          ]
        },
        "moderation_status": {
          "label": "Moderation Status",
          "data_type": "select",
          "options": [
            {
              "label": "Pending",
              "value": "pending"
            },
            {
              "label": "Approved",
              "value": "approved"
            },
            {
              "label": "Flagged",
              "value": "flagged"
            }
          ]
        },
        "helpful_count": {
          "label": "Helpful Votes",
          "data_type": "number",
          "default": 0
        },
        "not_helpful_count": {
          "label": "Not Helpful Votes",
          "data_type": "number",
          "default": 0
        },
        "accepted_answer_id": {
          "label": "Accepted Answer",
          "data_type": "text"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "kb_article",
    "name": "Knowledge Base Article",
    "description": "Help documentation and knowledge base article",
    "icon": "book-open",
    "color": "#0EA5E9",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "platform",
      "views": {
        "default_list": {
          "type": "list",
          "label": "KB Articles",
          "fields": {
            "title": {
              "sortable": true,
              "display_type": "text"
            },
            "slug": {
              "sortable": true,
              "display_type": "text"
            },
            "tags": {
              "sortable": false,
              "display_type": "tags"
            },
            "helpful_count": {
              "sortable": true,
              "display_type": "number"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "KB Article",
          "sections": [
            {
              "title": "Content",
              "fields": [
                "title",
                "slug",
                "tags",
                "content_markdown"
              ]
            },
            {
              "title": "Feedback",
              "fields": [
                "helpful_count",
                "not_helpful_count"
              ]
            }
          ]
        }
      },
      "fields": {
        "title": {
          "label": "Title",
          "required": true,
          "data_type": "text"
        },
        "slug": {
          "label": "URL Slug",
          "required": true,
          "data_type": "text"
        },
        "tags": {
          "label": "Tags",
          "data_type": "json"
        },
        "content_markdown": {
          "label": "Article Content (Markdown)",
          "data_type": "textarea"
        },
        "helpful_count": {
          "label": "Helpful Count",
          "data_type": "number",
          "default": 0
        },
        "not_helpful_count": {
          "label": "Not Helpful Count",
          "data_type": "number",
          "default": 0
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null,
      "vector_types": {
        "postmortem": ["semantic","structure","summary","intent","cause","procedure","context","error_signal"],
        "how_to": ["semantic","structure","summary","intent","procedure","outcome"],
        "use_case": ["semantic","structure","summary","intent","context","procedure","outcome"],
        "article": ["semantic","structure","summary"],
        "code_chunk": ["semantic","structure"],
        "db_schema": ["semantic","structure","cause","context"],
        "default": ["semantic","structure","summary"]
      },
      "embedding_fields": {
        "structure": ["kb_type","category","tags","audience","security_level","product_area"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "task",
    "name": "Task",
    "description": "Action item with priority, due date, and assignment",
    "icon": "check-circle",
    "color": "#10B981",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Tasks",
          "fields": {
            "title": {
              "sortable": true,
              "display_type": "text"
            },
            "task_type": {
              "sortable": true,
              "display_type": "badge"
            },
            "priority": {
              "sortable": true,
              "display_type": "badge"
            },
            "due_date": {
              "sortable": true,
              "display_type": "date"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Task",
          "sections": [
            {
              "title": "Details",
              "fields": [
                "title",
                "task_type",
                "priority",
                "description"
              ]
            },
            {
              "title": "Assignment",
              "fields": [
                "due_date",
                "account_id",
                "person_id"
              ]
            }
          ]
        }
      },
      "fields": {
        "title": {
          "label": "Title",
          "required": true,
          "data_type": "text"
        },
        "task_type": {
          "label": "Task Type",
          "required": true,
          "data_type": "select",
          "options": [
            {
              "label": "Follow-up",
              "value": "follow_up"
            },
            {
              "label": "Review",
              "value": "review"
            },
            {
              "label": "Research",
              "value": "research"
            },
            {
              "label": "Demo",
              "value": "demo"
            },
            {
              "label": "Meeting",
              "value": "meeting"
            }
          ]
        },
        "priority": {
          "label": "Priority",
          "required": true,
          "data_type": "select",
          "default": "medium",
          "options": [
            {
              "label": "Low",
              "value": "low"
            },
            {
              "label": "Medium",
              "value": "medium"
            },
            {
              "label": "High",
              "value": "high"
            },
            {
              "label": "Critical",
              "value": "critical"
            }
          ]
        },
        "description": {
          "label": "Description",
          "data_type": "textarea"
        },
        "due_date": {
          "label": "Due Date",
          "data_type": "datetime"
        },
        "account_id": {
          "label": "Account",
          "data_type": "text"
        },
        "person_id": {
          "label": "Assigned To",
          "data_type": "text"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "activity_log",
    "name": "Activity Log",
    "description": "System and user activity tracking record",
    "icon": "activity",
    "color": "#6B7280",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Activity Logs",
          "fields": {
            "action": {
              "sortable": true,
              "display_type": "badge"
            },
            "signal_type": {
              "sortable": true,
              "display_type": "text"
            },
            "created_at": {
              "sortable": true,
              "display_type": "datetime"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Activity Log",
          "sections": [
            {
              "title": "Action",
              "fields": [
                "action",
                "signal_type"
              ]
            },
            {
              "title": "Impact",
              "fields": [
                "score_delta",
                "new_score",
                "new_stage"
              ]
            }
          ]
        }
      },
      "fields": {
        "action": {
          "label": "Action",
          "required": true,
          "data_type": "text"
        },
        "signal_type": {
          "label": "Signal Type",
          "data_type": "text"
        },
        "score_delta": {
          "label": "Score Change",
          "data_type": "number"
        },
        "new_score": {
          "label": "New Score",
          "data_type": "number"
        },
        "new_stage": {
          "label": "New Stage",
          "data_type": "text"
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "course_lesson",
    "name": "Course Lesson",
    "description": "Learning content unit \u2014 part of a course sequence",
    "icon": "graduation-cap",
    "color": "#F97316",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "platform",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Course Lessons",
          "fields": {
            "title": {
              "sortable": true,
              "display_type": "text"
            },
            "sequence": {
              "sortable": true,
              "display_type": "number"
            },
            "estimated_duration": {
              "sortable": true,
              "display_type": "number"
            }
          },
          "display": "table"
        },
        "default_detail": {
          "type": "detail",
          "label": "Course Lesson",
          "sections": [
            {
              "title": "Content",
              "fields": [
                "title",
                "content",
                "video_url",
                "estimated_duration"
              ]
            },
            {
              "title": "Settings",
              "fields": [
                "sequence",
                "progress_required",
                "prerequisites"
              ]
            }
          ]
        }
      },
      "fields": {
        "title": {
          "label": "Title",
          "required": true,
          "data_type": "text"
        },
        "content": {
          "label": "Content",
          "data_type": "textarea"
        },
        "video_url": {
          "label": "Video URL",
          "data_type": "text"
        },
        "sequence": {
          "label": "Sequence Order",
          "required": true,
          "data_type": "number",
          "default": 0
        },
        "estimated_duration": {
          "label": "Estimated Duration (minutes)",
          "data_type": "number"
        },
        "progress_required": {
          "label": "Progress Required to Continue",
          "data_type": "boolean",
          "default": false
        },
        "prerequisites": {
          "label": "Prerequisite Lesson IDs",
          "data_type": "json",
          "default": []
        }
      },
      "record_permissions": {
        "system_admin": [
          "create",
          "read",
          "update",
          "delete"
        ],
        "support_admin": [
          "create",
          "read",
          "update"
        ],
        "support": [
          "create",
          "read",
          "update"
        ],
        "member_admin": [
          "create",
          "read",
          "update"
        ],
        "member": [
          "create",
          "read",
          "update"
        ]
      },
      "functionality": null,
      "vector_types": ["semantic","structure","summary","intent","cause","procedure","outcome"],
      "embedding_fields": {
        "structure": ["course_title","course_id","sequence","estimated_duration","prerequisites"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "ai_feedback_record",
    "name": "AI Feedback Record",
    "description": "Training data record capturing every AI↔human support interaction for loop improvement",
    "icon": "brain",
    "color": "#8B5CF6",
    "ownership": "system",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "fields": {
        "thread_id": { "label": "Thread ID", "data_type": "text" },
        "ai_message_id": { "label": "AI Message ID", "data_type": "text" },
        "human_message_id": { "label": "Human Message ID", "data_type": "text" },
        "retrieved_sources": { "label": "Retrieved Sources", "data_type": "json" },
        "ai_confidence": { "label": "AI Confidence", "data_type": "number" },
        "retrieval_confidence": { "label": "Retrieval Confidence", "data_type": "number" },
        "human_edits_made": { "label": "Human Edits Made", "data_type": "boolean", "default": false },
        "customer_feedback": {
          "label": "Customer Feedback",
          "data_type": "select",
          "options": [
            { "label": "Helpful", "value": "helpful" },
            { "label": "Not Helpful", "value": "not_helpful" }
          ]
        },
        "kb_candidate": { "label": "KB Candidate", "data_type": "boolean" },
        "kb_article_id": { "label": "KB Article ID", "data_type": "text" },
        "reuse_count": { "label": "Reuse Count", "data_type": "number", "default": 0 }
      },
      "record_permissions": {
        "system_admin": ["create","read","update","delete"],
        "support_admin": ["create","read","update"],
        "support": ["read"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "eval_test_case",
    "name": "Eval Test Case",
    "description": "Evaluation test case for measuring AI support loop correctness",
    "icon": "flask-conical",
    "color": "#F59E0B",
    "ownership": "system",
    "is_active": true,
    "design_schema": {
      "scope": "platform",
      "fields": {
        "question": { "label": "Test Question", "required": true, "data_type": "text" },
        "expected_tier": {
          "label": "Expected Confidence Tier",
          "data_type": "select",
          "options": [
            { "label": "High", "value": "high" },
            { "label": "Medium", "value": "medium" },
            { "label": "Low", "value": "low" }
          ]
        },
        "expected_escalate": { "label": "Should Escalate", "data_type": "boolean", "default": false },
        "expected_source_ids": { "label": "Expected Source IDs", "data_type": "json", "default": [] },
        "excluded_source_ids": { "label": "Must NOT Retrieve", "data_type": "json", "default": [] },
        "test_type": {
          "label": "Test Type",
          "data_type": "select",
          "options": [
            { "label": "Easy", "value": "easy" },
            { "label": "Medium", "value": "medium" },
            { "label": "Hard", "value": "hard" },
            { "label": "Security Boundary", "value": "security" },
            { "label": "Hallucination Trap", "value": "hallucination" },
            { "label": "Stale Content", "value": "stale" },
            { "label": "Account Gating", "value": "account_gating" }
          ]
        }
      },
      "record_permissions": {
        "system_admin": ["create","read","update","delete"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "bug_ticket",
    "name": "Bug Ticket",
    "description": "Structured bug report derived from a support case — ready for developer assignment or future Jira integration",
    "icon": "bug",
    "color": "#EF4444",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "views": {
        "default_list": {
          "type": "list",
          "label": "Bug Tickets",
          "fields": {
            "title": { "sortable": true, "display_type": "text" },
            "status": { "sortable": true, "display_type": "badge" },
            "severity": { "sortable": true, "display_type": "badge" }
          },
          "display": "table"
        }
      },
      "fields": {
        "title": { "label": "Title", "required": true, "data_type": "text" },
        "description": { "label": "Description", "data_type": "textarea" },
        "severity": {
          "label": "Severity",
          "required": true,
          "data_type": "select",
          "options": [
            { "label": "Critical", "value": "critical" },
            { "label": "High", "value": "high" },
            { "label": "Medium", "value": "medium" },
            { "label": "Low", "value": "low" }
          ]
        },
        "status": {
          "label": "Status",
          "required": true,
          "data_type": "select",
          "options": [
            { "label": "Open", "value": "open" },
            { "label": "In Review", "value": "in_review" },
            { "label": "Confirmed", "value": "confirmed" },
            { "label": "In Progress", "value": "in_progress" },
            { "label": "Resolved", "value": "resolved" },
            { "label": "Won't Fix", "value": "wont_fix" }
          ]
        },
        "reproduction_steps": { "label": "Reproduction Steps", "data_type": "textarea" },
        "affected_components": { "label": "Affected UI Components", "data_type": "json", "default": [] },
        "affected_functions": { "label": "Affected Functions", "data_type": "json", "default": [] },
        "affected_files": { "label": "Affected Files", "data_type": "json", "default": [] },
        "affected_tables": { "label": "Affected DB Tables", "data_type": "json", "default": [] },
        "affected_fields": { "label": "Affected DB Fields", "data_type": "json", "default": [] },
        "error_signals": { "label": "Error Signals / Logs", "data_type": "json", "default": [] },
        "proposed_fix_area": { "label": "Proposed Fix Area", "data_type": "text" },
        "ai_confidence": { "label": "AI Attribution Confidence", "data_type": "number" },
        "support_ticket_id": { "label": "Source Support Ticket ID", "data_type": "text" },
        "kb_article_id": { "label": "Related KB Article ID", "data_type": "text" },
        "assignee_id": { "label": "Assignee Person ID", "data_type": "text" },
        "external_ticket_id": { "label": "External Ticket ID (e.g. Jira)", "data_type": "text" },
        "external_ticket_url": { "label": "External Ticket URL", "data_type": "text" }
      },
      "record_permissions": {
        "system_admin": ["create","read","update","delete"],
        "support_admin": ["create","read","update"],
        "support": ["read"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "cil_project",
    "name": "CIL Project",
    "description": "A codebase registered in the Code Intelligence Layer for graph ingestion and analysis",
    "icon": "folder-git-2",
    "color": "#6366F1",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "vector_types": ["semantic"],
      "fields": {
        "repo_path": { "label": "Repository Path", "data_type": "text" },
        "language_mix": { "label": "Languages", "data_type": "text" },
        "file_count": { "label": "File Count", "data_type": "number" },
        "chunk_count": { "label": "Chunk Count", "data_type": "number" },
        "ingestion_status": { "label": "Ingestion Status", "data_type": "select", "options": [
          { "label": "Not Started", "value": "not_started" },
          { "label": "In Progress", "value": "in_progress" },
          { "label": "Complete", "value": "complete" }
        ]},
        "total_ingestion_cost_usd": { "label": "Total Ingestion Cost (USD)", "data_type": "number" },
        "last_ingested_at": { "label": "Last Ingested At", "data_type": "text" },
        "kb_type": { "label": "KB Type", "data_type": "text" }
      },
      "record_permissions": {
        "system_admin": ["create", "read", "update", "delete"],
        "support_admin": ["create", "read", "update"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "cil_file",
    "name": "CIL File",
    "description": "A source file within a CIL project — tracks ingestion pass, hash, and dead code status",
    "icon": "file-code-2",
    "color": "#8B5CF6",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "fields": {
        "file_path": { "label": "File Path", "data_type": "text" },
        "language": { "label": "Language", "data_type": "text" },
        "project_id": { "label": "Project ID", "data_type": "text" },
        "stored_hash": { "label": "Stored Hash", "data_type": "text" },
        "ingestion_pass": { "label": "Ingestion Pass", "data_type": "number" },
        "chunk_count": { "label": "Chunk Count", "data_type": "number" },
        "has_existing_markers": { "label": "Had Existing Markers", "data_type": "boolean" },
        "is_dead_code": { "label": "Dead Code", "data_type": "boolean" },
        "git_last_commit": { "label": "Git Last Commit", "data_type": "text" },
        "existing_marker_agreement_count": { "label": "Marker Agreement Count", "data_type": "number" },
        "existing_marker_disagreement_count": { "label": "Marker Disagreement Count", "data_type": "number" },
        "line_count": { "label": "Line Count", "data_type": "number" },
        "existing_marker_names": { "label": "Existing Marker Names", "data_type": "text" },
        "existing_marker_count": { "label": "Existing Marker Count", "data_type": "number" },
        "kb_type": { "label": "KB Type", "data_type": "text" }
      },
      "record_permissions": {
        "system_admin": ["create", "read", "update", "delete"],
        "support_admin": ["create", "read", "update"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "cil_chunk",
    "name": "CIL Chunk",
    "description": "A semantically meaningful chunk within a CIL file — carries inline contract, hash, and graph edges",
    "icon": "code-2",
    "color": "#10B981",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "vector_types": ["semantic", "structural", "contract"],
      "embedding_fields": {
        "structural": ["chunk_type", "file_path", "stability", "is_dead_code", "boundary_confidence", "doc_confidence", "review_status"]
      },
      "fields": {
        "chunk_name": { "label": "Chunk Name", "data_type": "text" },
        "file_id": { "label": "File ID", "data_type": "text" },
        "project_id": { "label": "Project ID", "data_type": "text" },
        "file_path": { "label": "File Path", "data_type": "text" },
        "line_start": { "label": "Line Start", "data_type": "number" },
        "line_end": { "label": "Line End", "data_type": "number" },
        "chunk_type": { "label": "Chunk Type", "data_type": "select", "options": [
          { "label": "Function", "value": "function" },
          { "label": "Class", "value": "class" },
          { "label": "Interface", "value": "interface" },
          { "label": "Type", "value": "type" },
          { "label": "Component", "value": "component" },
          { "label": "Hook", "value": "hook" },
          { "label": "Route", "value": "route" },
          { "label": "Config", "value": "config" }
        ]},
        "stored_hash": { "label": "Stored Hash", "data_type": "text" },
        "boundary_confidence": { "label": "Boundary Confidence", "data_type": "select", "options": [
          { "label": "High", "value": "high" },
          { "label": "Low", "value": "low" },
          { "label": "Human Verified", "value": "human_verified" }
        ]},
        "boundary_source": { "label": "Boundary Source", "data_type": "select", "options": [
          { "label": "AST Auto", "value": "ast_auto" },
          { "label": "AST Approved", "value": "ast_approved" },
          { "label": "Human Override", "value": "human_override" }
        ]},
        "review_status": { "label": "Review Status", "data_type": "select", "options": [
          { "label": "Pending Review", "value": "pending_review" },
          { "label": "Approved", "value": "approved" },
          { "label": "Rejected", "value": "rejected" }
        ]},
        "doc_confidence": { "label": "Doc Confidence", "data_type": "select", "options": [
          { "label": "AI Generated", "value": "ai_generated" },
          { "label": "Human Verified", "value": "human_verified" },
          { "label": "Unverified Legacy", "value": "unverified_legacy" }
        ]},
        "is_dead_code": { "label": "Dead Code", "data_type": "boolean" },
        "macro": { "label": "Macro (Purpose)", "data_type": "text" },
        "micro": { "label": "Micro (Detail)", "data_type": "text" },
        "input_spec": { "label": "Input Spec", "data_type": "text" },
        "output_spec": { "label": "Output Spec", "data_type": "text" },
        "side_effects": { "label": "Side Effects", "data_type": "text" },
        "calls": { "label": "Calls", "data_type": "text" },
        "called_by": { "label": "Called By", "data_type": "text" },
        "stability": { "label": "Stability", "data_type": "select", "options": [
          { "label": "Stable", "value": "stable" },
          { "label": "Internal", "value": "internal" },
          { "label": "Experimental", "value": "experimental" }
        ]},
        "test_unit_path": { "label": "Unit Test Path", "data_type": "text" },
        "test_e2e_path": { "label": "E2E Test Path", "data_type": "text" },
        "token_count": { "label": "Token Count", "data_type": "number" },
        "existing_marker_agreement": { "label": "Existing Marker Agreement", "data_type": "select", "options": [
          { "label": "None (no prior marker)", "value": "none" },
          { "label": "Agreed", "value": "agreed" },
          { "label": "Disagreed", "value": "disagreed" }
        ]},
        "code_content": { "label": "Code Content", "data_type": "text" },
        "hash_updated_at": { "label": "Hash Updated At", "data_type": "text" },
        "kb_type": { "label": "KB Type", "data_type": "text" }
      },
      "record_permissions": {
        "system_admin": ["create", "read", "update", "delete"],
        "support_admin": ["create", "read", "update"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "cil_chunk_proposal",
    "name": "CIL Chunk Proposal",
    "description": "Staged low-confidence chunk boundary proposal awaiting human or Devin review before being written to source file",
    "icon": "git-pull-request",
    "color": "#F59E0B",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "fields": {
        "file_id": { "label": "File ID", "data_type": "text" },
        "project_id": { "label": "Project ID", "data_type": "text" },
        "file_path": { "label": "File Path", "data_type": "text" },
        "proposed_name": { "label": "Proposed Chunk Name", "data_type": "text" },
        "line_start": { "label": "Line Start", "data_type": "number" },
        "line_end": { "label": "Line End", "data_type": "number" },
        "chunk_type": { "label": "Chunk Type", "data_type": "text" },
        "confidence_score": { "label": "Confidence Score", "data_type": "number" },
        "confidence_reasons": { "label": "Confidence Reasons", "data_type": "text" },
        "existing_marker_match": { "label": "Matches Existing Marker", "data_type": "boolean" },
        "existing_marker_name": { "label": "Existing Marker Name", "data_type": "text" },
        "review_status": { "label": "Review Status", "data_type": "select", "options": [
          { "label": "Pending Review", "value": "pending_review" },
          { "label": "Approved", "value": "approved" },
          { "label": "Rejected", "value": "rejected" },
          { "label": "Merged", "value": "merged" }
        ]},
        "reviewed_by": { "label": "Reviewed By", "data_type": "text" },
        "reviewed_at": { "label": "Reviewed At", "data_type": "text" },
        "adjusted_line_start": { "label": "Adjusted Line Start", "data_type": "number" },
        "adjusted_line_end": { "label": "Adjusted Line End", "data_type": "number" },
        "token_count": { "label": "Token Count", "data_type": "number" },
        "code_preview": { "label": "Code Preview", "data_type": "text" }
      },
      "record_permissions": {
        "system_admin": ["create", "read", "update", "delete"],
        "support_admin": ["create", "read", "update"]
      }
    },
    "validation_schema": {}
  },
  {
    "kind": "item",
    "slug": "cil_config",
    "name": "CIL Config",
    "description": "Config field contract — what a setting means, what each value drives downstream, and how to query the current value",
    "icon": "settings-2",
    "color": "#EF4444",
    "ownership": "tenant",
    "is_active": true,
    "design_schema": {
      "scope": "account",
      "vector_types": ["semantic"],
      "fields": {
        "config_table": { "label": "Config Table", "data_type": "text" },
        "record_slug": { "label": "Record Slug", "data_type": "text" },
        "field_name": { "label": "Field Name", "data_type": "text" },
        "field_type": { "label": "Field Type", "data_type": "text" },
        "allowed_range": { "label": "Allowed Range", "data_type": "text" },
        "default_value": { "label": "Default Value", "data_type": "text" },
        "description": { "label": "Description", "data_type": "text" },
        "settings": { "label": "Settings (JSON)", "data_type": "text" },
        "current_value_query": { "label": "Current Value Query", "data_type": "text" },
        "current_value_query_type": { "label": "Query Type", "data_type": "select", "options": [
          { "label": "SQL", "value": "sql" },
          { "label": "JSON Path", "value": "json_path" },
          { "label": "Env Var", "value": "env" }
        ]},
        "code_edge_chunk_ids": { "label": "Code Edge Chunk IDs", "data_type": "text" },
        "project_id": { "label": "Project ID", "data_type": "text" }
      },
      "record_permissions": {
        "system_admin": ["create", "read", "update", "delete"],
        "support_admin": ["create", "read", "update"]
      }
    },
    "validation_schema": {}
  }
]