Add quality gate framework with schema validation (JSON Schema via jsonschema library), pattern validation (regex-based), multi-gate QualityValidator with SQLite persistence, HaltingPolicyEngine with budget/iteration/improvement checks, and RefinementLoop for iterative execute-validate-halt cycles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
827 B
SQL
25 lines
827 B
SQL
-- Phase 7: Quality & Validation tables
|
|
-- quality_gates: registered quality gate configurations
|
|
-- validation_results: recorded pass/fail results from gate checks
|
|
|
|
CREATE TABLE IF NOT EXISTS quality_gates (
|
|
id TEXT PRIMARY KEY,
|
|
name TEXT NOT NULL,
|
|
gate_type TEXT NOT NULL,
|
|
config JSON NOT NULL,
|
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE TABLE IF NOT EXISTS validation_results (
|
|
id TEXT PRIMARY KEY,
|
|
run_id TEXT NOT NULL,
|
|
gate_id TEXT NOT NULL,
|
|
artifact_id TEXT,
|
|
status TEXT NOT NULL,
|
|
score REAL,
|
|
diagnostics JSON,
|
|
validated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_validations_run ON validation_results(run_id);
|
|
CREATE INDEX IF NOT EXISTS idx_validations_artifact ON validation_results(artifact_id);
|