diff options
Diffstat (limited to 'makima/src/llm/contract_tools.rs')
| -rw-r--r-- | makima/src/llm/contract_tools.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/makima/src/llm/contract_tools.rs b/makima/src/llm/contract_tools.rs index 855a2fe..44c1e20 100644 --- a/makima/src/llm/contract_tools.rs +++ b/makima/src/llm/contract_tools.rs @@ -287,6 +287,14 @@ pub static CONTRACT_TOOLS: once_cell::sync::Lazy<Vec<Tool>> = once_cell::sync::L "properties": {} }), }, + Tool { + name: "check_deliverables_met".to_string(), + description: "Check if all required deliverables are met for the current phase and whether the contract is ready to advance to the next phase. Returns detailed status including: deliverables_met (bool), ready_to_advance (bool), required_deliverables (list with status), missing items, and auto_progress_recommended (bool). Use this before calling advance_phase to ensure all requirements are satisfied. For simple contracts: Plan phase needs Plan document + Repository, Execute phase needs completed tasks + PR. For specification contracts: Each phase has specific required documents.".to_string(), + parameters: json!({ + "type": "object", + "properties": {} + }), + }, // ============================================================================= // Task Derivation Tools // ============================================================================= @@ -528,6 +536,7 @@ pub enum ContractToolRequest { // Phase guidance GetPhaseChecklist, + CheckDeliverablesMet, // Task derivation DeriveTasksFromFile { file_id: Uuid }, @@ -604,6 +613,7 @@ pub fn parse_contract_tool_call(call: &super::tools::ToolCall) -> ContractToolEx // Phase guidance "get_phase_checklist" => parse_get_phase_checklist(), + "check_deliverables_met" => parse_check_deliverables_met(), // Task derivation "derive_tasks_from_file" => parse_derive_tasks_from_file(call), @@ -1057,6 +1067,16 @@ fn parse_get_phase_checklist() -> ContractToolExecutionResult { } } +fn parse_check_deliverables_met() -> ContractToolExecutionResult { + ContractToolExecutionResult { + success: true, + message: "Checking if deliverables are met...".to_string(), + data: None, + request: Some(ContractToolRequest::CheckDeliverablesMet), + pending_questions: None, + } +} + // ============================================================================= // Task Derivation Tool Parsing // ============================================================================= |
