Files
agent-skills/evals/plugin/tdd-fires-on-pasted-bug/prompt.md
T

639 B

description, expected_outcome, max_turns, allowed_tools
description expected_outcome max_turns allowed_tools
A bug fix request with the function pasted inline and no mention of tests. The skill should fire, and the reply should reproduce the bug with a failing test before fixing it. A test that reproduces the lost cent, shown or described as failing first, then the fix; test-driven-development is invoked. 12
Read
Glob
Grep
Skill

Fix this bug: splitCents(100, 3) returns [33, 33, 33] and a cent goes missing. Here is the function.

function splitCents(totalCents, n) {
  const share = Math.floor(totalCents / n);
  return Array.from({ length: n }, () => share);
}