# Sprint 129 Plan: Debug Constraints, Budgets, and Recovery Advice ## Context Sprint 128 added deterministic recipes and traces. Sprint 129 adds policy constraints, budget estimation, and recovery advice to make step-by-step debugging safer for small agents operating with strict limits. --- ## Goals 1. Add deterministic constraint and budget models 2. Add deterministic recovery and stop-reason models 3. Add MCP tools to retrieve constraints, budgets, recovery, and stop reasons 4. Keep outputs machine-readable and deterministic --- ## Steps ### Step 1529: Debug policy constraint model (10 tests) ### Step 1530: Debug action budget model (10 tests) ### Step 1531: Debug recovery advisor model (8 tests) ### Step 1532: Debug stop-reason classifier model (8 tests) ### Step 1533: `whetstone_get_debug_constraints` MCP tool (8 tests) ### Step 1534: `whetstone_estimate_debug_budget` MCP tool (8 tests) ### Step 1535: `whetstone_get_recovery_advice` MCP tool (8 tests) ### Step 1536: `whetstone_classify_debug_stop_reason` MCP tool (8 tests) ### Step 1537: Debug guidance packet model (8 tests) ### Step 1538: Sprint 129 integration summary + regression (8 tests) --- ## Architecture Gate - Constraint outputs must be deterministic by mode - Budget outputs must be deterministic for equal inputs - Recovery and stop-reason packets must be explicit and machine-readable - Max 600 lines per header