-- Add local_only column to contracts
ALTER TABLE contracts ADD COLUMN local_only BOOLEAN NOT NULL DEFAULT false;

-- Index for filtering by local_only mode
CREATE INDEX idx_contracts_local_only ON contracts(local_only) WHERE local_only = true;

COMMENT ON COLUMN contracts.local_only IS 'When true, tasks do not auto-execute completion actions and work stays in worktrees';
