summaryrefslogtreecommitdiff
path: root/makima/migrations/20250119000000_add_phase_guard.sql
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-17 06:05:21 +0000
committersoryu <soryu@soryu.co>2026-01-17 16:38:44 +0000
commit06fb883b2b7a49c7123722463d24b0b4e57c3277 (patch)
tree9c0d07daeff90fa31cea320171a8678133fab801 /makima/migrations/20250119000000_add_phase_guard.sql
parent2f62df1cc89a23a5bd30e1a3f68a39bcfce9665c (diff)
downloadsoryu-06fb883b2b7a49c7123722463d24b0b4e57c3277.tar.gz
soryu-06fb883b2b7a49c7123722463d24b0b4e57c3277.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'makima/migrations/20250119000000_add_phase_guard.sql')
-rw-r--r--makima/migrations/20250119000000_add_phase_guard.sql9
1 files changed, 9 insertions, 0 deletions
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';