From 6328477bc459eca0243b685553dbd75b925fdc8a Mon Sep 17 00:00:00 2001 From: soryu Date: Mon, 26 Jan 2026 17:03:45 +0000 Subject: Add dynamic contract type templates with user customization (#33) - Add 'execute' contract type as a built-in template in backend - Fix API response field name mismatch (types -> contractTypes) - Remove duplicate ContractTypeTemplate definition in api.ts - Merge built-in types from API with user templates from localStorage - User templates created in the Templates page now appear in contract creation Co-authored-by: Claude Opus 4.5 --- makima/src/llm/templates.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'makima/src/llm') diff --git a/makima/src/llm/templates.rs b/makima/src/llm/templates.rs index 7a5bd38..8d3c04d 100644 --- a/makima/src/llm/templates.rs +++ b/makima/src/llm/templates.rs @@ -35,6 +35,7 @@ pub fn all_contract_types() -> Vec { vec![ simple_contract_type(), specification_contract_type(), + execute_contract_type(), ] } @@ -69,6 +70,18 @@ fn specification_contract_type() -> ContractTypeTemplate { } } +/// Execute-only contract type for immediate task execution +fn execute_contract_type() -> ContractTypeTemplate { + ContractTypeTemplate { + id: "execute".to_string(), + name: "Execute".to_string(), + description: "A minimal workflow with only an execute phase for immediate task execution without planning documents.".to_string(), + phases: vec!["execute".to_string()], + default_phase: "execute".to_string(), + is_builtin: true, + } +} + // ============================================================================= // File Templates // ============================================================================= -- cgit v1.2.3