Tools for this workflow
Cursor, Github Copilot, Claude
Start with this input
Function: total(items) returns the sum of item.price.
Bug: total([]) throws instead of returning 0.
Acceptance: total([]) == 0; total([{price:2},{price:3}]) == 5.
Constraint: do not add dependencies or change other files.Follow the process
- Create a branch or isolated project and remove credentials from the shared context.
- Run the empty-input test and record the failure before asking for a fix.
- Provide the smallest relevant function, error and acceptance tests to the coding assistant.
- Inspect the proposed diff. Reject unrelated edits, network calls or new dependencies.
- Run both cases and a real caller. Review the output, then commit only the relevant change.
Reference output and acceptance criteria
Expected acceptance results: empty input → 0 two prices 2 and 3 → 5 No dependency changes. This is the expected behavior, not a recorded output from an external coding assistant.
If it goes wrong
If the change only handles the empty case but breaks valid inputs, preserve the failing example and ask for a minimal correction. Never treat passing syntax checks as proof of correct behavior.
Time, cost and evidence
Planning estimate: allow 15–30 minutes for a short first run and manual review. This is not a measured provider runtime. Use an eligible free allowance or review the linked plan before continuing; no guaranteed dollar cost.
Workflow design and an editorial reference output. No authenticated provider run is claimed. Product screens, available models and quotas can change.