feat(prompts): implement Phase 7 - Quality & Validation (FR-9, FR-10)
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>
This commit is contained in:
parent
bd1d05ba79
commit
704272644c
15 changed files with 2615 additions and 0 deletions
25
migrations/prompts/006_create_quality_tables.sql
Normal file
25
migrations/prompts/006_create_quality_tables.sql
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
-- 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue