mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-10-26 15:05:04 +00:00
639 B
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 |
|
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);
}