AI/Tasks/HeuristicsUpgrades/Heuristics_Phase03_CostBenefitMatrix_Implementation.txt
|
PHASE 03 IMPLEMENTATION PROMPT - COST-BENEFIT MATRIX
Goal: Implement a bounded cost-benefit model that conservatively adjusts route confidence without weakening safety controls. Inputs: - AI/Tasks/HeuristicsUpgrades/Heuristics_Phase03_CostBenefitMatrix_Strict.txt - Outputs from Phases 01-02 Required code work: - Implement base cost definitions for relevant tools or tool classes. - Implement deterministic cost multipliers (latency/expense) and risk multipliers (safety sensitivity). - Implement confidence dampening so low evidence does not justify expensive actions. - Compose cost after evidence/pattern scoring and before final route selection. - Clamp final score and cost contribution to documented bounds. - Add a conservative cost-aware clarification branch for expensive ambiguous requests. Implementation constraints: - Cost signals must remain advisory to routing and cannot reduce safety requirements. - Keep units/scales explicit and stable. Minimum tests to add/update: - Cost monotonicity tests. - Risk multiplier boundary tests. - Dampening threshold tests. - Tests proving cost logic cannot bypass authorization/confirmation/sandboxing. Validation commands: - dotnet build src/TechToolbox.Agent/TechToolbox.Agent.csproj -c Release - dotnet test src/TechToolbox.Agent/Tests/TechToolbox.Agent.Tests.csproj -c Release --filter "Cost|Risk|Dampening|Clarification|Routing" Deliverable: Return implemented formula, bounds, and test proof for conservative routing under weak signals. |