> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Leadership Operating System Entity Relationship Diagram

> > Version: 0.1.0 > Module: Leadership Operating System > Prefix: lo_ > Tables: 29 > Last Updated: 2026-01-11

> **Version:** 0.1.0\
> **Module:** Leadership Operating System\
> **Prefix:** `lo_`\
> **Tables:** 29\
> **Last Updated:** 2026-01-11

## Changelog

* **2026-01-11** — v0.1.0 — Initial ERD import

## Overview

The Leadership Operating System module implements the EOS (Entrepreneurial Operating System) methodology including vision/traction, L10 meetings, quarterly rocks, scorecards, and accountability tracking.

## Vision & Traction ERD

```mermaid theme={null}
erDiagram
    lo_vision_documents ||--o{ lo_vision_sections : contains
    lo_vision_documents }o--|| pf_organizations : "for org"
    lo_core_values ||--o{ lo_core_value_examples : illustrates
    
    lo_vision_documents {
        uuid id PK
        uuid organization_id FK
        string document_type
        integer version
        jsonb content
        uuid created_by FK
        timestamp created_at
        boolean is_current
    }
    
    lo_vision_sections {
        uuid id PK
        uuid document_id FK
        string section_type
        string title
        text content
        integer display_order
    }
    
    lo_core_values {
        uuid id PK
        uuid organization_id FK
        string value_name
        text description
        integer display_order
        boolean is_active
    }
    
    lo_core_value_examples {
        uuid id PK
        uuid core_value_id FK
        text example_text
        uuid submitted_by FK
        timestamp submitted_at
    }
```

## Meetings ERD

```mermaid theme={null}
erDiagram
    lo_meetings ||--o{ lo_meeting_attendees : "attended by"
    lo_meetings ||--o{ lo_meeting_issues : discusses
    lo_meetings ||--o{ lo_meeting_todos : creates
    lo_meetings }o--|| lo_meeting_types : "of type"
    
    lo_meetings {
        uuid id PK
        uuid organization_id FK
        uuid meeting_type_id FK
        string title
        timestamp scheduled_start
        timestamp scheduled_end
        timestamp actual_start
        timestamp actual_end
        enum status
        uuid facilitator_id FK
        text notes
        integer rating
        jsonb custom_fields
    }
    
    lo_meeting_types {
        uuid id PK
        uuid organization_id FK
        string name
        string code
        text description
        integer default_duration_minutes
        jsonb agenda_template
        boolean is_recurring
    }
    
    lo_meeting_attendees {
        uuid id PK
        uuid meeting_id FK
        uuid user_id FK
        enum attendance_status
        boolean is_required
        text notes
    }
    
    lo_meeting_issues {
        uuid id PK
        uuid meeting_id FK
        uuid issue_id FK
        integer discussion_order
        integer time_spent_minutes
        enum outcome
        text notes
    }
    
    lo_meeting_todos {
        uuid id PK
        uuid meeting_id FK
        uuid issue_id FK
        uuid assigned_to FK
        text description
        date due_date
        enum status
        timestamp completed_at
    }
```

## Rocks (Quarterly Goals) ERD

```mermaid theme={null}
erDiagram
    lo_quarterly_rocks ||--o{ lo_rock_milestones : "has milestones"
    lo_quarterly_rocks ||--o{ lo_rock_updates : "has updates"
    lo_quarterly_rocks }o--|| pf_profiles : "owned by"
    lo_quarterly_rocks }o--|| lo_quarters : "for quarter"
    
    lo_quarters {
        uuid id PK
        uuid organization_id FK
        string name
        date start_date
        date end_date
        boolean is_current
    }
    
    lo_quarterly_rocks {
        uuid id PK
        uuid organization_id FK
        uuid quarter_id FK
        uuid owner_id FK
        string title
        text description
        enum status
        enum priority
        integer completion_percent
        date due_date
        jsonb custom_fields
    }
    
    lo_rock_milestones {
        uuid id PK
        uuid rock_id FK
        string title
        date target_date
        enum status
        timestamp completed_at
        integer milestone_order
    }
    
    lo_rock_updates {
        uuid id PK
        uuid rock_id FK
        uuid created_by FK
        timestamp created_at
        enum status
        integer completion_percent
        text update_text
        boolean is_on_track
    }
```

## Issues (IDS) ERD

```mermaid theme={null}
erDiagram
    lo_issues ||--o{ lo_issue_comments : "has comments"
    lo_issues ||--o{ lo_meeting_issues : "discussed in"
    lo_issues }o--|| lo_issue_categories : categorized
    
    lo_issues {
        uuid id PK
        uuid organization_id FK
        uuid category_id FK
        string title
        text description
        uuid raised_by FK
        uuid owner_id FK
        enum priority
        enum status
        date target_resolution_date
        timestamp resolved_at
        text resolution_notes
        jsonb custom_fields
    }
    
    lo_issue_categories {
        uuid id PK
        uuid organization_id FK
        string name
        string code
        text description
        integer display_order
    }
    
    lo_issue_comments {
        uuid id PK
        uuid issue_id FK
        uuid author_id FK
        text comment_text
        timestamp created_at
        uuid parent_comment_id FK
    }
```

## Scorecards & KPIs ERD

```mermaid theme={null}
erDiagram
    lo_scorecards ||--o{ lo_scorecard_metrics : contains
    lo_scorecard_metrics ||--o{ lo_metric_values : tracks
    lo_scorecard_metrics }o--|| pf_profiles : "owned by"
    
    lo_scorecards {
        uuid id PK
        uuid organization_id FK
        string name
        text description
        enum cadence
        boolean is_active
        jsonb settings
    }
    
    lo_scorecard_metrics {
        uuid id PK
        uuid scorecard_id FK
        uuid owner_id FK
        string name
        text description
        string unit
        enum direction
        decimal goal_value
        decimal warning_threshold
        decimal critical_threshold
        integer display_order
    }
    
    lo_metric_values {
        uuid id PK
        uuid metric_id FK
        date period_date
        decimal actual_value
        decimal goal_value
        enum status
        uuid entered_by FK
        timestamp entered_at
        text notes
    }
```

## Accountability Chart ERD

```mermaid theme={null}
erDiagram
    lo_seats ||--o{ lo_seat_responsibilities : defines
    lo_seats ||--o{ lo_seat_assignments : "filled by"
    lo_seats }o--|| lo_seats : "reports to"
    
    lo_seats {
        uuid id PK
        uuid organization_id FK
        string seat_name
        text description
        uuid parent_seat_id FK
        integer display_order
        boolean is_active
        jsonb gw_c_traits
    }
    
    lo_seat_responsibilities {
        uuid id PK
        uuid seat_id FK
        string responsibility
        integer display_order
        boolean is_key
    }
    
    lo_seat_assignments {
        uuid id PK
        uuid seat_id FK
        uuid user_id FK
        date start_date
        date end_date
        boolean is_primary
        enum status
    }
```

## Knowledge Articles ERD

```mermaid theme={null}
erDiagram
    lo_knowledge_articles ||--o{ lo_knowledge_article_versions : "has versions"
    lo_knowledge_articles }o--|| lo_knowledge_categories : categorized
    lo_knowledge_articles }o--|| pf_organizations : "belongs to"
    
    lo_knowledge_articles {
        uuid id PK
        uuid organization_id FK
        uuid category_id FK
        string slug
        string title
        text content
        text summary
        enum article_type
        enum status
        boolean is_featured
        text[] tags
        uuid created_by FK
        uuid updated_by FK
        timestamp created_at
        timestamp updated_at
        jsonb custom_fields
    }
    
    lo_knowledge_categories {
        uuid id PK
        uuid organization_id FK
        string name
        string description
        uuid parent_id FK
        integer display_order
        boolean is_active
    }
    
    lo_knowledge_article_versions {
        uuid id PK
        uuid article_id FK
        integer version_number
        string title
        text content
        text summary
        uuid created_by FK
        timestamp created_at
    }
```

**Caption:** Knowledge base articles with versioning and categorization for organizational learning and documentation.

## RLS Policy Coverage

| Table                            | SELECT | INSERT | UPDATE | DELETE | WITH CHECK | Status        |
| -------------------------------- | ------ | ------ | ------ | ------ | ---------- | ------------- |
| lo\_vision\_documents            | ✅      | ✅      | ✅      | ✅      | ✅          | Complete      |
| lo\_meetings                     | ✅      | ✅      | ✅      | ✅      | ✅          | Complete      |
| lo\_quarterly\_rocks             | ✅      | ✅      | ✅      | ✅      | ✅          | Complete      |
| lo\_issues                       | ✅      | ✅      | ✅      | ✅      | ✅          | Complete      |
| lo\_scorecards                   | ✅      | ✅      | ✅      | ✅      | ✅          | Complete      |
| lo\_scorecard\_metrics           | ✅      | ✅      | ✅      | ✅      | ✅          | Complete      |
| lo\_metric\_values               | ✅      | ✅      | ✅      | ✅      | ✅          | Complete      |
| lo\_seats                        | ✅      | ✅      | ✅      | ✅      | ✅          | Complete      |
| lo\_knowledge\_article\_versions | ✅      | ✅      | -      | -      | -          | Version table |

## Key Tables

### lo\_vision\_documents

V/TO (Vision/Traction Organizer) documents with versioning.

### lo\_meetings

L10 and other meeting records with agenda items and outcomes.

### lo\_quarterly\_rocks

90-day goals with milestone tracking and progress updates.

### lo\_issues

Issue/problem tracking using IDS (Identify, Discuss, Solve) methodology.

### lo\_scorecards

KPI dashboards with measurable targets and trend tracking.

## Helper Functions

| Function                                        | Purpose                      |
| ----------------------------------------------- | ---------------------------- |
| `lo_has_org_access(org_id, user_id)`            | Check LO module access       |
| `lo_get_current_quarter(org_id)`                | Get current quarter record   |
| `lo_get_rocks_status(quarter_id)`               | Get rocks completion summary |
| `lo_calculate_metric_trend(metric_id, periods)` | Calculate trend direction    |

## Cross-Module Dependencies

* **PF:** Organizations, profiles, user roles
* **FW:** Meeting workflows, rock approval workflows
* **HR:** Seat assignments link to employee records
