Competency Framework
Database Structure
How competencies are stored and referenced across the platform.
The competency_framework Table
| Column | Type | Description |
|---|---|---|
id | UUID | Primary key |
name | TEXT | Competency name (e.g., "Problem Solving") |
slug | TEXT | URL-safe identifier |
category | ENUM | behavioral, situational, technical, post-hire |
description | TEXT | What this competency measures |
anchors | JSONB | 5-level behavioral anchor definitions |
status | ENUM | active, draft, archived |
employer_id | UUID (nullable) | NULL = platform competency, set = employer-owned |
source | TEXT | 'manual' or 'ai_generated' |
created_at | TIMESTAMPTZ | Creation timestamp |
deleted_at | TIMESTAMPTZ (nullable) | Soft-delete timestamp |
How Competencies Flow Through the System
competency_framework table
↓ Selected by employer when creating a posting
postings.required_competencies (JSONB array)
→ [{competency_id, name, weight}, ...]
↓ Loaded at interview start
interviewer prompt (adaptive mode gets full anchors)
↓ Loaded at interview end
scorer prompt (always gets full anchors for scoring)
↓ Scores stored
scorecards.scores (per-competency 1-5 with evidence)Platform vs Employer Competencies
- Platform competencies (
employer_id = NULL): Visible to all employers. Only SUPER_ADMIN can edit. Currently 8 seeded behavioral competencies. - Employer competencies (
employer_id = <uuid>): Visible only to that employer. Created manually or via AI. Employer can edit/archive.
Both types work identically in the scoring pipeline — the scorer treats them the same.
Competency Profiles
The competency_profiles table stores pre-built bundles:
| Column | Type | Description |
|---|---|---|
id | UUID | Primary key |
name | TEXT | Profile name (e.g., "General Behavioral") |
competency_ids | UUID[] | Array of competency IDs in this profile |
employer_id | UUID (nullable) | NULL = platform profile, set = employer-owned |
status | ENUM | active, draft, archived |