Plan first
Talk the fix through with the agent before it changes any code.
Some fixes need a decision before any code changes: which of two approaches, whether a finding is worth fixing here, what to leave for later. Plan first opens the same sandbox in a talking mode. The agent reads the items and the code, runs commands if it needs to, and proposes a plan. It cannot edit files until you press Start fix.
#Start with a plan
Read the window from settings.REFUND_DAYS rather than a constant.
Updated: step 1 reads settings.REFUND_DAYS.
Start fix
- On the AI Fix tab, tick the items under What to fix.
- Tick Plan first beside the Run button. The button now reads Make a plan.
- Press Make a plan. The tab says The agent is making a plan., then The plan is ready. Talk to the agent, then press Start fix.
#Talk it through
Type in the message box: Ask about the plan, or say what to change in it. Each message is one turn. The agent can read and run commands in the sandbox to answer, but it does not change any file. Send as many messages as you need.
#Start the fix
Press Start fix. The same session switches to building and fixes the items, following the plan you agreed. Words in the message box go with it. From here it works as any fix: watch, stop, ask for more, then push or discard. See Fix a pull request with AI Fix.
#When to use it
- The items touch code you know well and you have a preferred approach.
- Several findings pull in different directions, and you want to choose which to fix.
- The fix could be large, and you want to see its shape first.
Plan first is for fixes you start. An automatic fix never plans. Talking turns and building turns are both recorded in your AI usage, as separate lines. See AI usage.
Plan: 1. In allows(), reject orders whose paid_at is older than the refund window. 2. Add tests for day 30 and day 31. 3. Leave the email retry for a separate change (F2 needs the queue).