Feature 09: AI harness and skills framework (#62)
CI / ci (pull_request) Successful in 1m34s
CI / ci (push) Successful in 1m36s

Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
This commit was merged in pull request #62.
This commit is contained in:
2026-10-05 11:18:53 -04:00
committed by approver_agent
parent 8adbd2d7c2
commit 72fa311de9
36 changed files with 5368 additions and 11 deletions
+28
View File
@@ -0,0 +1,28 @@
-- name: CreateAIRun :exec
INSERT INTO ai_runs (
id, skill, skill_version, provider, model, temperature, status,
latency_ms, tokens_in, tokens_out, error, request_redacted,
response_redacted, created_at, updated_at
) VALUES (
?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?,
?, ?, ?
);
-- name: ClearSuggestionBatchAIRunsBefore :execrows
-- Drops references to the runs created before the cutoff, so the purge
-- can delete them.
UPDATE suggestion_batches
SET ai_run_id = NULL
WHERE ai_run_id IN (SELECT ai_runs.id FROM ai_runs WHERE ai_runs.created_at < sqlc.arg(cutoff));
-- name: ClearWeekPlanAIRunsBefore :execrows
-- Drops references to the runs created before the cutoff, so the purge
-- can delete them.
UPDATE week_plans
SET ai_run_id = NULL
WHERE ai_run_id IN (SELECT ai_runs.id FROM ai_runs WHERE ai_runs.created_at < sqlc.arg(cutoff));
-- name: DeleteAIRunsBefore :execrows
DELETE FROM ai_runs
WHERE created_at < sqlc.arg(cutoff);