Selective commit from a mixed working tree
A dirty working tree mixes an input-validation fix with unrelated logging, config, and debug-note edits. The task is a single commit on a new branch holding only the validation work, which spans three files, with everything else left uncommitted.
The crux
One file, src/handler.ts, has changes on both sides: two validation hunks belong in the commit while a logging hunk must stay behind. Picking the right hunks without sweeping in the rest is the whole task.
Instruction given to the agent
Commit just the input validation work on a new branch. Leave the logging/config cleanup and debug notes uncommitted.