summaryrefslogtreecommitdiff
path: root/makima/migrations/20260510000000_drop_directive_goal.sql
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-05-08 16:33:36 +0100
committersoryu <soryu@soryu.co>2026-05-08 16:33:36 +0100
commit7af816032fbc54d5e0a8e94d4a000f307cd3b370 (patch)
tree50b6aad1aa47e56b61f0700e224028bb7578cb91 /makima/migrations/20260510000000_drop_directive_goal.sql
parente4f1622a0f0ac74707cc1c9810e0b99e948d1319 (diff)
downloadsoryu-drop-directive-goal.tar.gz
soryu-drop-directive-goal.zip
feat(directives): drop directives.goal — orchestration reads contract bodydrop-directive-goal
Hard cut. The unified contracts surface owns spec text now; the directive itself is just a folder. The orchestrator daemon reads the active contract's body when it spawns, replans, or runs completion. Schema (migration 20260510000000): - DROP TABLE directive_goal_history - ALTER TABLE directives DROP COLUMN goal - ALTER TABLE directives DROP COLUMN goal_updated_at New repo helper: - get_active_contract_body(directive_id) — picks the active|queued|draft contract (in that order), most-recent first. Backend cuts: - Directive / DirectiveSummary / CreateDirectiveRequest / UpdateDirectiveRequest lose goal & goalUpdatedAt. - CreateDirectiveRequest gains optional `contractBody` — when provided, create_directive_for_owner auto-creates a first contract with that body in the same transaction. - Removed: update_directive_goal, update_directive_goal_keep_orchestrator, save_directive_goal_history, get_directive_goal_history, DirectiveGoalHistory model, UpdateGoalRequest. - Removed handlers::directives::update_goal + the /directives/{id}/goal route. - orchestration::directive::build_planning_prompt / build_completion_prompt / build_order_pickup_prompt now take a `contract_body: &str` instead of `goal_history`. classify_goal_change + try_interrupt_planner_with_goal_edit + GoalChangeKind + GoalEditInterruptResult removed (they were only useful for the small-vs-large goal-edit interrupt cycle). CLI: - `makima directive update-goal` removed (UpdateGoalArgs deleted, Commands enum trimmed, ApiClient::directive_update_goal + UpdateGoalRequest deleted). Frontend: - Directive / DirectiveSummary / CreateDirectiveRequest types lose goal & goalUpdatedAt; CreateDirectiveRequest gains `contractBody`. - useDirective drops updateGoal helper. - api.ts updateDirectiveGoal removed. - Legacy DirectiveList + DirectiveDetail components deleted; the /directives route now always renders the document-mode page. The user-settings documentModeEnabled flag is no longer consulted at the route level. - NewContractModal passes body via contractBody. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'makima/migrations/20260510000000_drop_directive_goal.sql')
-rw-r--r--makima/migrations/20260510000000_drop_directive_goal.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/makima/migrations/20260510000000_drop_directive_goal.sql b/makima/migrations/20260510000000_drop_directive_goal.sql
new file mode 100644
index 0000000..0848239
--- /dev/null
+++ b/makima/migrations/20260510000000_drop_directive_goal.sql
@@ -0,0 +1,16 @@
+-- Drop directives.goal and directive_goal_history.
+--
+-- The unified contract surface makes contracts the source of truth for
+-- spec text. A directive is now a folder of contracts; the orchestrator
+-- daemon reads the currently-active contract's body when it spawns,
+-- replanned, or runs completion. directives.goal was the pre-contract
+-- spec field — superseded.
+--
+-- directive_goal_history tracked edits to the goal field. Contract
+-- bodies have their own version field on the contracts table; the
+-- amend/replan flow now queries that instead.
+
+DROP TABLE IF EXISTS directive_goal_history;
+
+ALTER TABLE directives DROP COLUMN IF EXISTS goal;
+ALTER TABLE directives DROP COLUMN IF EXISTS goal_updated_at;