-- 026_agent_refinements.sql — Automations phase 2: stored refinements. -- -- The original prompt lives in AgentTask.prompt (025); refinements are the -- ordered list of added constraints ("also require a checked bag"). The UI -- composes prompt + refinements into the compile text; this column stores -- the list for display/removal. Chaining (spec.calls / spec.calledOnly) -- needs no column — it lives inside the validated spec jsonb. -- -- Additive and idempotent; schema.sql carries the identical column. ALTER TABLE "AgentTask" ADD COLUMN IF NOT EXISTS refinements jsonb NOT NULL DEFAULT '[]';