> ## 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 Database Tables

> The LO module implements an EOS-inspired Leadership Operating System including accountability charts, strategic vision, quarterly rocks, scorecards, meeting ca…

**Prefix:** `lo_`\
**Table Count:** 29\
**Last Updated:** 2026-01-10

***

## Overview

The LO module implements an EOS-inspired Leadership Operating System including accountability charts, strategic vision, quarterly rocks, scorecards, meeting cadence, issue tracking (IDS), todos, one-on-ones, and team assessments.

***

## Table Categories

### 1. Accountability Chart (3 tables)

| Table                     | Columns | Description             |
| ------------------------- | ------- | ----------------------- |
| `lo_accountability_chart` | 16      | Chart structure         |
| `lo_role_definitions`     | 18      | Role definitions        |
| `lo_seat_assignments`     | 12      | Person-to-seat mappings |

**Accountability Structure:**

```
lo_accountability_chart
    ├── Visionary (seat)
    ├── Integrator (seat)
    └── Department Heads
            └── Team Leads
                    └── Individual Contributors

lo_role_definitions (defines each seat):
    - GWC (Get it, Want it, Capacity)
    - Key responsibilities
    - Core metrics

lo_seat_assignments (who sits in each seat):
    - employee_id
    - seat_id
    - is_primary
```

**GWC Assessment:**

* **G**et it - Understands the role
* **W**ant it - Desires the role
* **C**apacity - Has ability to do it

### 2. Strategic Vision (2 tables)

| Table                 | Columns | Description                      |
| --------------------- | ------- | -------------------------------- |
| `lo_vision_documents` | 22      | V/TO (Vision/Traction Organizer) |
| `lo_strategic_goals`  | 18      | 10-year, 3-year, 1-year goals    |

**V/TO Components:**

```typescript theme={null}
interface VisionDocument {
  // Core Values
  core_values: string[];
  
  // Core Focus
  purpose: string;        // Why we exist
  niche: string;          // What we do best
  
  // 10-Year Target
  ten_year_target: string;
  
  // Marketing Strategy
  target_market: string;
  three_uniques: string[];
  proven_process: string;
  guarantee: string;
  
  // 3-Year Picture
  three_year_revenue: number;
  three_year_profit: number;
  three_year_measurables: string[];
  
  // 1-Year Plan
  one_year_revenue: number;
  one_year_profit: number;
  one_year_goals: Goal[];
}
```

### 3. Rocks (Quarterly Priorities) (3 tables)

| Table                 | Columns | Description        |
| --------------------- | ------- | ------------------ |
| `lo_quarterly_rocks`  | 22      | Rock definitions   |
| `lo_rock_assignments` | 10      | Rock ownership     |
| `lo_rock_milestones`  | 14      | Milestone tracking |

**Rock Status:**

* `on_track` - Green (progressing well)
* `off_track` - Red (behind schedule)
* `at_risk` - Yellow (needs attention)
* `complete` - Done
* `dropped` - Removed from quarter

**Rock Structure:**

```typescript theme={null}
interface Rock {
  id: string;
  title: string;
  description: string;
  quarter: string;          // 'Q1-2026'
  fiscal_year_id: string;
  owner_id: string;         // Primary owner
  status: RockStatus;
  completion_percent: number;
  due_date: string;
  completed_date?: string;
  milestones: Milestone[];
}
```

### 4. Scorecard (3 tables)

| Table                  | Columns | Description           |
| ---------------------- | ------- | --------------------- |
| `lo_scorecards`        | 16      | Scorecard definitions |
| `lo_scorecard_metrics` | 20      | Metric definitions    |
| `lo_scorecard_values`  | 12      | Weekly/monthly values |

**Metric Types:**

* `number` - Raw number (e.g., leads generated)
* `currency` - Dollar amount
* `percentage` - Percentage value
* `yes_no` - Binary (hit/miss)

**Goal Direction:**

* `higher_is_better` - Green when above goal
* `lower_is_better` - Green when below goal
* `on_target` - Green when within range

**Scorecard Example:**

```typescript theme={null}
interface ScorecardMetric {
  id: string;
  name: string;
  owner_id: string;
  goal: number;
  goal_direction: GoalDirection;
  frequency: 'weekly' | 'monthly';
  display_order: number;
}
```

### 5. Meeting Management (3 tables)

| Table                     | Columns | Description                |
| ------------------------- | ------- | -------------------------- |
| `lo_meetings`             | 24      | Meeting records            |
| `lo_meeting_attendees`    | 10      | Attendance tracking        |
| `lo_meeting_action_items` | 14      | Action items from meetings |

**Meeting Types:**

* `level_10` - Weekly L10 meeting
* `quarterly` - Quarterly planning
* `annual` - Annual planning
* `department` - Department meetings
* `one_on_one` - 1:1 meetings

**L10 Meeting Agenda:**

```
1. Segue (5 min) - Good news
2. Scorecard Review (5 min)
3. Rock Review (5 min)
4. Customer/Employee Headlines (5 min)
5. To-Do List (5 min)
6. IDS (60 min) - Identify, Discuss, Solve
7. Conclude (5 min)
```

### 6. Issue Tracking - IDS (2 tables)

| Table                  | Columns | Description      |
| ---------------------- | ------- | ---------------- |
| `lo_issues`            | 24      | Issue records    |
| `lo_issue_discussions` | 14      | Discussion notes |

**Issue Priority:**

* `1` - Highest priority (discuss first)
* `2` - High priority
* `3` - Medium priority

**Issue Status:**

* `open` - Active issue
* `in_discussion` - Currently being discussed
* `solved` - Solution identified
* `to_do` - Converted to to-do
* `moved` - Moved to future meeting

**IDS Process:**

1. **I**dentify - What's the real issue?
2. **D**iscuss - Open discussion (no tangents)
3. **S**olve - Determine action/to-do

### 7. To-Do Management (2 tables)

| Table              | Columns | Description      |
| ------------------ | ------- | ---------------- |
| `lo_todos`         | 20      | To-do items      |
| `lo_todo_comments` | 10      | Comments/updates |

**To-Do Rules:**

* Due within 7 days
* Owned by one person
* Clear, measurable outcome
* Status: `open` → `complete` | `dropped`

### 8. One-on-Ones (2 tables)

| Table            | Columns | Description         |
| ---------------- | ------- | ------------------- |
| `lo_one_on_ones` | 18      | 1:1 meeting records |
| `lo_feedback`    | 16      | Feedback records    |

**1:1 Structure:**

```typescript theme={null}
interface OneOnOne {
  id: string;
  manager_id: string;
  employee_id: string;
  scheduled_date: string;
  actual_date?: string;
  duration_minutes: number;
  topics_discussed: string[];
  action_items: string[];
  employee_notes?: string;  // Private to employee
  manager_notes?: string;   // Private to manager
  shared_notes?: string;    // Visible to both
}
```

### 9. Assessments (5 tables)

| Table                      | Columns | Description            |
| -------------------------- | ------- | ---------------------- |
| `lo_assessments`           | 20      | Assessment definitions |
| `lo_assessment_recipients` | 10      | Who takes assessment   |
| `lo_assessment_responses`  | 14      | Response records       |
| `lo_assessment_schedules`  | 12      | Recurring assessments  |
| `lo_gwc_assessments`       | 16      | GWC evaluations        |

**Assessment Types:**

* `people_analyzer` - Team fit assessment
* `organizational_checkup` - Org health
* `core_values` - Values alignment
* `quarterly_review` - Performance review

### 10. Knowledge Base (3 tables)

| Table                           | Columns | Description        |
| ------------------------------- | ------- | ------------------ |
| `lo_knowledge_articles`         | 22      | Knowledge articles |
| `lo_knowledge_article_versions` | 14      | Version history    |
| `lo_knowledge_categories`       | 12      | Category structure |

### 11. Module Settings (1 table)

| Table                | Columns | Description      |
| -------------------- | ------- | ---------------- |
| `lo_module_settings` | 29      | LO configuration |

**Key Settings:**

| Setting                        | Type    | Default  |
| ------------------------------ | ------- | -------- |
| `rock_quarter_start_month`     | integer | 1        |
| `l10_meeting_duration_minutes` | integer | 90       |
| `scorecard_default_frequency`  | text    | 'weekly' |
| `todo_default_days`            | integer | 7        |
| `enable_people_analyzer`       | boolean | true     |

***

## Common Query Patterns

### Get Accountability Chart

```typescript theme={null}
const { data } = await supabase
  .from('lo_accountability_chart')
  .select(`
    *,
    role:lo_role_definitions(*),
    assignments:lo_seat_assignments(
      employee:hr_employees(first_name, last_name, photo_url)
    )
  `)
  .eq('organization_id', orgId)
  .is('parent_id', null)  // Start from top
  .order('display_order');
```

### Get Current Quarter Rocks

```typescript theme={null}
const { data } = await supabase
  .from('lo_quarterly_rocks')
  .select(`
    *,
    owner:pf_profiles(first_name, last_name),
    milestones:lo_rock_milestones(*)
  `)
  .eq('organization_id', orgId)
  .eq('quarter', currentQuarter)
  .order('status');
```

### Get Scorecard Data

```typescript theme={null}
const { data } = await supabase
  .from('lo_scorecard_metrics')
  .select(`
    *,
    owner:pf_profiles(first_name, last_name),
    values:lo_scorecard_values(
      value,
      period_date
    )
  `)
  .eq('scorecard_id', scorecardId)
  .order('display_order');
```

### Get Open Issues by Priority

```typescript theme={null}
const { data } = await supabase
  .from('lo_issues')
  .select(`
    *,
    created_by:pf_profiles(first_name, last_name),
    discussions:lo_issue_discussions(*)
  `)
  .eq('organization_id', orgId)
  .eq('status', 'open')
  .order('priority')
  .order('created_at');
```

### Get Upcoming L10 Meetings

```typescript theme={null}
const { data } = await supabase
  .from('lo_meetings')
  .select(`
    *,
    attendees:lo_meeting_attendees(
      attendee:pf_profiles(first_name, last_name)
    ),
    action_items:lo_meeting_action_items(*)
  `)
  .eq('organization_id', orgId)
  .eq('meeting_type', 'level_10')
  .gte('scheduled_date', new Date().toISOString())
  .order('scheduled_date');
```

***

## RLS Policies

LO uses role-based RLS:

* Leadership team sees all LO data
* Managers see their teams
* Employees see their own rocks/todos

**Helper Functions:**

* `lo_user_is_leadership_team()` - Leadership access
* `lo_user_can_view_rock()` - Rock visibility
* `lo_user_can_manage_scorecard()` - Scorecard management

***

## Cross-Module Integration

**LO → HR Integration:**

```
lo_seat_assignments → hr_employees
lo_gwc_assessments → hr_employees (performance data)
lo_one_on_ones → hr_employees (manager/employee)
```

**LO → PF Integration:**

```
lo_meetings → pf_tasks (action items become tasks)
lo_issues → pf_notifications (issue assignments)
```

***

## EOS Terminology Reference

| EOS Term             | LO Implementation                                 |
| -------------------- | ------------------------------------------------- |
| V/TO                 | `lo_vision_documents`                             |
| Accountability Chart | `lo_accountability_chart` + `lo_role_definitions` |
| Rocks                | `lo_quarterly_rocks`                              |
| Scorecard            | `lo_scorecards` + `lo_scorecard_metrics`          |
| L10 Meeting          | `lo_meetings` (type: 'level\_10')                 |
| Issues List          | `lo_issues`                                       |
| To-Do List           | `lo_todos`                                        |
| People Analyzer      | `lo_assessments` + `lo_gwc_assessments`           |

***

## See Also

* [LO Module Specs](https://github.com/Encore-OS/encoreos/tree/development/specs/lo)
* EOS Implementation Guide
* [Database Schema Overview](/architecture/DATABASE_SCHEMA)
