Files
praxis/db/migrations/0004_assist.sql
T
Praxis CI ec397f2c65 docs(milestone): complete v0.5-live-assist — v0.1.13 tagged, milestone release, merged to main
v0.5 (Live Assist — on-the-job voice companion) milestone complete.
4 phases: P0 (pre-execution, v0.1.10) → P1 (assist core + guardrail,
v0.1.11) → P2 (integration + tech-debt + NFR, v0.1.12) → P3 (final
review + ship, v0.1.13 = milestone release).

16/16 REQs covered (3 ASSIST + 4 NFR + 9 IDEATE). 4 v0.6 backlog.
469 tests passed, 0 failed. 1 P0 fixed (guardrail processor safety).
8 P1+ flagged for v0.6. 8 v0.4 P1+ tech-debt addressed.
G-049 + G-067 grill MUSTs resolved. ESCALATION-01 (PIPEDA) OPEN for
human legal review before assist surface go-live.

---ci---
project: praxis
phase: 3
milestone: v0.5
status: complete
requirements:
  covered: [REQ-ASSIST-01, REQ-ASSIST-02, REQ-ASSIST-03, REQ-NFR-ASSIST-01, REQ-NFR-ASSIST-02, REQ-NFR-ASSIST-03, REQ-NFR-ASSIST-04, REQ-IDEATE-01, REQ-IDEATE-02, REQ-IDEATE-03, REQ-IDEATE-04, REQ-IDEATE-05, REQ-IDEATE-06, REQ-IDEATE-07, REQ-IDEATE-08, REQ-IDEATE-09]
  partial: []
---/ci---
2026-08-04 22:35:56 +00:00

15 lines
920 B
SQL

-- Migration 0004 — v0.5 Live Assist (D-062, REQ-NFR-ASSIST-04, D-060 layer 3, REQ-IDEATE-09).
-- Additive: existing practice sessions are unaffected (defaults preserve v0.1-v0.4 behavior).
-- session_type: 'practice' (default, existing) | 'assist' (new v0.5).
-- SQLite ALTER TABLE ADD COLUMN with a DEFAULT keeps existing rows as 'practice'.
ALTER TABLE sessions ADD COLUMN session_type TEXT NOT NULL DEFAULT 'practice';
-- guardrail_verdict_json: per-turn guardrail verdict (D-060 layer 3, REQ-IDEATE-09).
-- Nullable — only assist turns populate it; existing practice turns stay NULL.
ALTER TABLE turns ADD COLUMN guardrail_verdict_json TEXT;
-- Index for the mode-conflict check (REQ-IDEATE-03): find active sessions by type.
-- ended_at IS NULL means the session is still active (no end timestamp).
CREATE INDEX IF NOT EXISTS idx_sessions_active_by_type
ON sessions (learner_id, session_type, ended_at);