Skip to main content

Database Location

~/.vibelearn/vibelearn.db
SQLite3. All VibeLearn-specific tables use the vl_ prefix. Core session tables retain the original sdk_sessions and observations names.

Core Tables (Session Tracking)

sdk_sessions

Tracks every session.
ColumnTypeDescription
content_session_idTEXT UNIQUEThe IDE’s session ID (from hook input)
memory_session_idTEXTSDK agent’s internal session ID (enables resume)
projectTEXTProject name (workspace basename)
created_atTEXTISO timestamp

observations

Every tool use captured during sessions.
ColumnTypeDescription
session_idTEXT= memory_session_id from sdk_sessions
typeTEXTfile_edit, bash_command, mcp_tool, etc.
file_pathTEXTFile affected (if applicable)
contentTEXTTool output or file content (truncated at 10KB)
files_modifiedJSONArray of file paths modified in this turn
created_atINTEGERUnix timestamp

VibeLearn Tables (vl_ prefix)

vl_concepts

Concepts extracted from sessions by ConceptExtractor.
ColumnTypeDescription
idINTEGER PKAuto-increment
content_session_idTEXTLinks to sdk_sessions
nameTEXTConcept name (e.g., “React Server Actions”)
categoryTEXTCategory (e.g., “React”, “Database”, “Auth”)
descriptionTEXTBrief explanation
difficultyTEXTbeginner, intermediate, advanced
encounter_countINTEGERTimes seen across sessions

vl_questions

Quiz questions generated per concept by QuizGenerator.
ColumnTypeDescription
idINTEGER PKAuto-increment
concept_idINTEGERFK to vl_concepts
content_session_idTEXTSource session
typeTEXTmultiple_choice, fill_in_blank, explain_code
questionTEXTQuestion text
answerTEXTCorrect answer
distractorsJSONWrong options (for multiple choice)
code_snippetTEXTCode context (if applicable)

vl_quiz_attempts

Records every quiz answer.
ColumnTypeDescription
idINTEGER PKAuto-increment
question_idINTEGERFK to vl_questions
is_correctINTEGER0 or 1
response_time_msINTEGERHow long to answer
hmac_signatureTEXTAnti-tamper signature
created_atINTEGERUnix timestamp
Attempts are HMAC-signed with the user’s API key: HMAC(apiKey, questionId + isCorrect + createdAt). The server validates signatures before updating mastery.

vl_developer_profile

Mastery tracking per concept name.
ColumnTypeDescription
concept_nameTEXT UNIQUEConcept identifier
mastery_scoreREAL0.0–1.0. Server-computed from quiz attempts
encounter_countINTEGERTimes encountered across sessions
last_seen_atINTEGERUnix timestamp
Note: mastery_score is server-authoritative. Local value is a cache — overwritten on sync.

vl_stack_profiles

Tech stack detected per session by StackDetector.
ColumnTypeDescription
content_session_idTEXT UNIQUESource session
languageTEXTe.g., typescript, python
frameworkTEXTe.g., nextjs, fastapi
ormTEXTe.g., prisma, sqlalchemy
testingTEXTe.g., jest, pytest
detected_atINTEGERUnix timestamp

vibelearn_session_summaries

Human-readable narrative per session, produced by ConceptExtractor.
ColumnTypeDescription
content_session_idTEXT UNIQUESource session
what_was_builtTEXTNarrative description
synced_atINTEGERWhen synced to vibelearn.dev (NULL if pending)
created_atINTEGERUnix timestamp

vl_sync_queue

Offline sync queue. Populated when upstream sync fails.
ColumnTypeDescription
idINTEGER PKAuto-increment
payload_typeTEXTe.g., session_analysis
payload_jsonTEXTSerialized payload
statusTEXTpending, synced, failed
attemptsINTEGERRetry count
last_attempted_atINTEGERUnix timestamp
Max attempts: 5. After that, status becomes failed.

vl_daily_streaks

Local streak cache. Server is authoritative — this table is never trusted for official streak data.

Migrations

Migrations run automatically on worker startup via DatabaseManager. Each migration has an integer ID. Migration 008 added all vl_ tables.
// src/services/sqlite/migrations.ts
// Add a new migration at the end of the array
{ id: 9, sql: `ALTER TABLE vl_concepts ADD COLUMN my_new_column TEXT` }