Description
Create a package to capture and store generation events. This data drives the evolution system.
Depends on: Milestone 2 complete
Tasks
Acceptance Criteria
- Every generation attempt is captured (when enabled)
- Events include: command, inputs, kit, success/failure, errors, duration
- Data stored in
$XDG_CONFIG_HOME/lvt/telemetry.db (use os.UserConfigDir() in Go`
- User can disable with
LVT_TELEMETRY=false
Files to Create
internal/telemetry/
├── telemetry.go # Main API
├── events.go # Event types
├── store.go # Storage interface
├── sqlite.go # SQLite implementation
├── schema.sql # Database schema
└── telemetry_test.go
Schema
CREATE TABLE generation_events (
id TEXT PRIMARY KEY,
timestamp DATETIME NOT NULL,
command TEXT NOT NULL,
inputs TEXT NOT NULL, -- JSON
kit TEXT,
lvt_version TEXT,
success BOOLEAN NOT NULL,
validation_result TEXT, -- JSON
errors TEXT, -- JSON
duration_ms INTEGER,
files_generated TEXT -- JSON
);
-- Indexes for common queries
CREATE INDEX idx_events_timestamp ON generation_events(timestamp);
CREATE INDEX idx_events_success ON generation_events(success);
CREATE INDEX idx_events_command ON generation_events(command);
CREATE INDEX idx_events_kit ON generation_events(kit);
Description
Create a package to capture and store generation events. This data drives the evolution system.
Depends on: Milestone 2 complete
Tasks
internal/telemetry/packageGenerationEventstruct with all relevant fieldsAcceptance Criteria
$XDG_CONFIG_HOME/lvt/telemetry.db(useos.UserConfigDir()in Go`LVT_TELEMETRY=falseFiles to Create
Schema