From 06fb883b2b7a49c7123722463d24b0b4e57c3277 Mon Sep 17 00:00:00 2001 From: soryu Date: Sat, 17 Jan 2026 06:05:21 +0000 Subject: Add phase_guard field to Contract model and database This adds a new boolean field to control whether the supervisor should wait for user confirmation before progressing to the next phase. When enabled, users can review and potentially amend phase outputs (like plans, requirements docs) before the contract continues. Changes: - Add migration for phase_guard column (defaults to false) - Add phase_guard to Contract, CreateContractRequest, and UpdateContractRequest structs - Update create_contract_for_owner and update_contract_for_owner repository functions to handle phase_guard - Update all CreateContractRequest instantiations with phase_guard field Co-Authored-By: Claude Opus 4.5 --- makima/migrations/20250119000000_add_phase_guard.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 makima/migrations/20250119000000_add_phase_guard.sql (limited to 'makima/migrations') diff --git a/makima/migrations/20250119000000_add_phase_guard.sql b/makima/migrations/20250119000000_add_phase_guard.sql new file mode 100644 index 0000000..dfa642a --- /dev/null +++ b/makima/migrations/20250119000000_add_phase_guard.sql @@ -0,0 +1,9 @@ +-- Add phase_guard column to contracts table +-- When enabled, the supervisor will wait for user confirmation before progressing to the next phase. +-- This allows users to review and potentially amend phase outputs (plans, requirements, etc.) +-- before the contract continues to the next phase. + +ALTER TABLE contracts +ADD COLUMN IF NOT EXISTS phase_guard BOOLEAN NOT NULL DEFAULT FALSE; + +COMMENT ON COLUMN contracts.phase_guard IS 'Whether to wait for user confirmation before progressing to the next phase'; -- cgit v1.2.3