// @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT
// Regenerate: pnpm scaffold:sync

// Pure reference file -- NOT imported anywhere.
// Copy individual examples into core/config/organization-model.ts or resource definitions as needed.

import { defineOrganizationModel, defineResources } from '@elevasis/core/organization-model'

// ---------------------------------------------------------------------------
// Identity and branding override
// ---------------------------------------------------------------------------
export const brandingOverrideExample = defineOrganizationModel({
  identity: {
    organizationName: 'Northstar Studio',
    productName: 'Northstar Ops',
    shortName: 'Northstar'
  },
  branding: {
    logos: {
      light: '/brand/northstar-logo-light.svg',
      dark: '/brand/northstar-logo-dark.svg'
    },
    voice: 'Clear, practical, and calm.',
    tagline: 'Operational clarity for growing teams.',
    values: ['Clarity', 'Reliability', 'Momentum'],
    themePresetId: 'northstar'
  }
})

// ---------------------------------------------------------------------------
// Topbar actions
// ---------------------------------------------------------------------------
export const topbarActionsExample = defineOrganizationModel({
  navigation: {
    topbar: {
      request: {
        id: 'request',
        label: 'Request a feature or report an issue',
        tooltip: 'Request a feature or report an issue',
        icon: 'message-plus',
        order: 10,
        enabled: true
      }
    }
  }
})

// ---------------------------------------------------------------------------
// System hierarchy, system-local config, ontology scopes, and sidebar navigation
// ---------------------------------------------------------------------------
export const systemNavigationExample = defineOrganizationModel({
  ontology: {
    valueTypes: {
      'global:value-type/text': {
        id: 'global:value-type/text',
        label: 'Text'
      }
    }
  },
  systems: {
    sales: {
      id: 'sales',
      label: 'Sales',
      order: 20,
      lifecycle: 'active',
      systems: {
        crm: {
          id: 'sales.crm',
          label: 'CRM',
          order: 10,
          lifecycle: 'active',
          parentSystemId: 'sales',
          config: {
            defaultPipelineId: 'sales.crm:catalog/pipeline',
            kanban: {
              groupBy: 'stage',
              showProbability: true
            }
          },
          ontology: {
            objectTypes: {
              'sales.crm:object/deal': {
                id: 'sales.crm:object/deal',
                label: 'Deal',
                ownerSystemId: 'sales.crm'
              }
            },
            actionTypes: {
              'sales.crm:action/deal.update-stage': {
                id: 'sales.crm:action/deal.update-stage',
                label: 'Update Deal Stage',
                ownerSystemId: 'sales.crm',
                actsOn: ['sales.crm:object/deal']
              }
            },
            catalogTypes: {
              'sales.crm:catalog/pipeline': {
                id: 'sales.crm:catalog/pipeline',
                label: 'Sales Pipeline',
                ownerSystemId: 'sales.crm',
                kind: 'pipeline',
                appliesTo: 'sales.crm:object/deal',
                entries: {
                  qualified: { label: 'Qualified', color: 'blue', order: 10, semanticClass: 'open' },
                  negotiating: { label: 'Negotiating', color: 'yellow', order: 20, semanticClass: 'active' },
                  won: { label: 'Won', color: 'green', order: 30, semanticClass: 'closed_won' }
                }
              }
            }
          }
        },
        leadGen: {
          id: 'sales.lead-gen',
          label: 'Lead Gen',
          order: 20,
          lifecycle: 'active',
          parentSystemId: 'sales'
        }
      }
    }
  },
  navigation: {
    sidebar: {
      primary: {
        dashboard: {
          type: 'surface',
          order: 10,
          label: 'Dashboard',
          path: '/',
          surfaceType: 'dashboard',
          targets: { systems: [] }
        },
        sales: {
          type: 'group',
          order: 20,
          label: 'Sales',
          children: {
            crm: {
              type: 'surface',
              order: 10,
              label: 'CRM',
              path: '/crm',
              surfaceType: 'page',
              targets: { systems: ['sales.crm'] }
            },
            leadGen: {
              type: 'surface',
              order: 20,
              label: 'Lead Gen',
              path: '/lead-gen',
              surfaceType: 'list',
              targets: { systems: ['sales.lead-gen'] }
            }
          }
        }
      },
      bottom: {}
    }
  }
})

// ---------------------------------------------------------------------------
// System-local settings
// ---------------------------------------------------------------------------
export const systemConfigExample = defineOrganizationModel({
  systems: {
    projects: {
      id: 'projects',
      label: 'Projects',
      order: 40,
      lifecycle: 'active',
      config: {
        defaultPriority: 'normal',
        reviewCadenceDays: 7,
        requiresOwner: true
      }
    }
  }
})

// ---------------------------------------------------------------------------
// Identity domain
// ---------------------------------------------------------------------------
export const identityExample = defineOrganizationModel({
  identity: {
    mission: 'Automate the operational work that slows SMBs down.',
    vision: 'Every small business has the operational leverage of a larger company.',
    legalName: 'Acme Automation, LLC',
    entityType: 'LLC',
    jurisdiction: 'United States - Delaware',
    industryCategory: 'Software / SaaS',
    geographicFocus: 'North America',
    timeZone: 'America/New_York',
    clientBrief: 'Acme Automation serves SMBs growing past founder-led operations.',
    businessHours: {
      monday: { open: '09:00', close: '18:00' },
      tuesday: { open: '09:00', close: '18:00' },
      wednesday: { open: '09:00', close: '18:00' },
      thursday: { open: '09:00', close: '18:00' },
      friday: { open: '09:00', close: '17:00' }
    }
  }
})

// ---------------------------------------------------------------------------
// Customers and offerings
// ---------------------------------------------------------------------------
export const customersAndOfferingsExample = defineOrganizationModel({
  customers: {
    segments: [
      {
        id: 'segment-smb-agencies',
        name: 'SMB Marketing Agencies',
        description: 'Growth-oriented digital agencies with 5-50 staff.',
        jobsToBeDone: 'Run more client campaigns without growing headcount.',
        pains: ['Manual data entry', 'Slow lead qualification'],
        gains: ['Automated pipelines', 'Structured human review'],
        firmographics: {
          industry: 'Marketing / Digital Agency',
          companySize: '5-50',
          region: 'North America'
        },
        valueProp: 'Automate agency operations so the team focuses on strategy and clients.'
      }
    ]
  },
  offerings: {
    products: [
      {
        id: 'product-starter',
        name: 'Starter Automation Pack',
        description: 'Workflow bundle for lead enrichment, CRM follow-up, and project delivery automation.',
        pricingModel: 'subscription',
        price: 299,
        currency: 'USD',
        targetSegmentIds: ['segment-smb-agencies']
      }
    ]
  }
})

// ---------------------------------------------------------------------------
// Resource descriptor example
// ---------------------------------------------------------------------------
export const workflowResourceDescriptorsExample = defineResources({
  leadEnrichment: {
    id: 'lead-enrichment-workflow',
    title: 'Lead Enrichment',
    description: 'Enriches lead records and writes qualified opportunities into CRM.',
    kind: 'workflow',
    systemPath: 'sales.lead-gen',
    ownerRoleId: 'role-ops-lead',
    status: 'active' as const,
    ontology: {
      actions: ['sales.lead-gen:action/lead.enrich'],
      primaryAction: 'sales.lead-gen:action/lead.enrich',
      reads: ['sales.lead-gen:object/lead'],
      writes: ['sales.crm:object/deal'],
      usesCatalogs: ['sales.crm:catalog/pipeline'],
      emits: ['sales.lead-gen:event/lead-enriched']
    },
    codeRefs: [
      {
        path: 'operations/src/lead-enrichment/index.ts',
        role: 'entrypoint',
        symbol: 'leadEnrichmentWorkflow'
      }
    ]
  }
})

export const workflowResourceRuntimeMetadataExample = {
  resource: workflowResourceDescriptorsExample.leadEnrichment,
  resourceId: workflowResourceDescriptorsExample.leadEnrichment.id,
  name: 'Lead Enrichment',
  type: workflowResourceDescriptorsExample.leadEnrichment.kind,
  version: '1.0.0',
  status: 'prod' as const,
  category: 'production' as const
}

export const compatibilityGraphLinksExample = {
  links: [
    { nodeId: 'system:sales.lead-gen', kind: 'operates-on' as const },
    { nodeId: 'integration:instantly', kind: 'uses' as const }
  ]
}

export const topologyRelationshipsExample = defineOrganizationModel({
  topology: {
    relationships: [
      {
        source: { kind: 'trigger', id: 'daily-lead-enrichment' },
        target: { kind: 'resource', id: workflowResourceDescriptorsExample.leadEnrichment.id },
        kind: 'triggers'
      },
      {
        source: { kind: 'resource', id: workflowResourceDescriptorsExample.leadEnrichment.id },
        target: { kind: 'externalResource', id: 'apollo' },
        kind: 'uses'
      },
      {
        source: { kind: 'resource', id: workflowResourceDescriptorsExample.leadEnrichment.id },
        target: { kind: 'role', id: 'role-ops-lead' },
        kind: 'approval'
      }
    ]
  }
})

// ---------------------------------------------------------------------------
// Roles and goals
// ---------------------------------------------------------------------------
export const rolesAndGoalsExample = defineOrganizationModel({
  roles: {
    roles: [
      {
        id: 'role-ceo',
        title: 'CEO',
        responsibilities: ['Set company direction', 'Approve strategic initiatives'],
        heldBy: 'Alex Johnson'
      },
      {
        id: 'role-head-of-ops',
        title: 'Head of Operations',
        responsibilities: ['Manage workflow deployments', 'Review human-in-the-loop queue'],
        reportsToId: 'role-ceo',
        heldBy: 'Jordan Lee'
      }
    ]
  },
  goals: {
    objectives: [
      {
        id: 'goal-grow-arr-q2-2026',
        description: 'Grow monthly recurring revenue by end of Q2 2026.',
        periodStart: '2026-04-01',
        periodEnd: '2026-06-30',
        keyResults: [
          {
            id: 'kr-mrr-10k',
            description: 'Reach $10K MRR',
            targetMetric: 'Monthly recurring revenue',
            currentValue: 2800,
            targetValue: 10000
          }
        ]
      }
    ]
  }
})

// ---------------------------------------------------------------------------
// Knowledge nodes
// ---------------------------------------------------------------------------
export const knowledgeExample = defineOrganizationModel({
  knowledge: {
    nodes: [
      {
        id: 'knowledge.example-outreach-playbook',
        kind: 'playbook',
        title: 'Example Outreach Playbook',
        summary: 'Step-by-step runbook for launching a cold outreach campaign.',
        body: '## Overview\n\nThis playbook walks through prospect sourcing, message templates, scheduling, and reply triage.\n\n## Steps\n\n1. Source prospects from the lead-gen list.\n2. Personalize the cold email template.\n3. Schedule the sending campaign.\n4. Triage replies in the CRM.',
        links: [{ nodeId: 'system:sales.crm' }, { nodeId: 'system:sales.lead-gen' }],
        ownerIds: [],
        updatedAt: '2026-05-01'
      },
      {
        id: 'knowledge.example-icp-strategy',
        kind: 'strategy',
        title: 'Example ICP Strategy',
        summary: 'Describes the ideal customer profile and qualification thresholds.',
        body: '## ICP Profile\n\n- **Industry:** SMB marketing agencies\n- **Size:** 5-50 employees\n- **Region:** North America\n\nProspects scoring \\<60 are excluded from outreach.',
        links: [{ nodeId: 'system:sales' }],
        ownerIds: [],
        updatedAt: '2026-05-01'
      },
      {
        id: 'knowledge.example-org-model-reference',
        kind: 'reference',
        title: 'Example Organization Model Reference',
        summary: 'Glossary of OM domains and how they relate to systems and resources.',
        body: '## Domains\n\nThe organization model separates semantic contracts in ontology, system-local settings in config, executable governance in resources, and explanatory material in knowledge. Secrets and runtime state stay outside the Organization Model.',
        links: [],
        ownerIds: [],
        updatedAt: '2026-05-01'
      }
    ]
  }
})
