You're working on the Waffle agent {%- if agent %} `{{ agent }}`{%- endif %} in this repo. A previous session was analysed for inefficiency by Waffle's hub. Your job: read the analysis below and propose concrete code-level changes. # Context - session_id: {{ session_analysis.session_id }} {%- if agent %} - agent: {{ agent }} {%- endif %} - actual: {{ session_analysis.turns }} turns, ${{ '%.4f' % session_analysis.cost_actual_usd if session_analysis.cost_actual_usd is not none else '?' }} {%- if cf %} - counterfactual: {{ cf.get('turns', '?') }} turns, ${{ '%.4f' % cf.get('cost_usd') if cf.get('cost_usd') is not none else '?' }} (savings: ${{ '%.4f' % session_analysis.savings_potential_usd if session_analysis.savings_potential_usd is not none else '?' }}) {%- endif %} {%- if session_analysis.model %} - model used in the session: {{ session_analysis.model }} {%- endif %} # What happened {{ a.get('chronology') or '(no chronology returned)' }} {% if a.get('counterfactual_summary') -%} # What should have happened {{ a.get('counterfactual_summary') }} {% endif -%} # Improvement suggestions {% for s in suggestions -%} {{ loop.index }}. [{{ s.get('estimated_impact', '?') | upper }} · {{ s.get('category', '?') }}] {{ s.get('title') or '(untitled)' }} {{ s.get('description') or '' }} {% endfor -%} # Your task For each suggestion above: 1. Decide if it applies to this codebase (skip ones that don't, or that conflict with each other or with the agent's intent). 2. Locate the file(s) to change. 3. Propose a concrete diff — or apply it directly if you're confident. Start with the highest-impact ones. Push back on suggestions that disagree with the agent's actual purpose (e.g. "remove Bash" if the agent legitimately needs it). When you're done, print a short summary: what you applied, what you skipped, and why.