- Fix a small reproducible input before attempting a broad rewrite.
- Use unchanged tests to compare failure before and success after.
- Function tests do not prove browser or storage behaviour.
Claude Code repaired one fictional filter function. Editorial reruns checked both versions with identical tests. Browser UI and storage were not tested.
Files for this exercise
AIHotple example files and prompts. Try the exercise before substituting real work data.
The actual repair reversed the predicate
We planted a small bug: expecting unread a and c instead returned read b. Claude changed item.read to !item.read. Separate editorial executions confirmed the same results.
| Same three tests | Before | After |
|---|---|---|
| Mixed queue returns unread a and c | Failed: b | Passed: a and c |
| Empty input returns an empty array | Passed | Passed |
| All-read input returns an empty array | Failed: retained a read item | Passed |
| Totals | 1pass/2fail; exit1 | 3pass/0fail; exit0 |
Why a small example is useful
The cause is deliberately simple. This does not demonstrate that the package solves every difficult bug. It demonstrates keeping a record of reproduction, investigation, minimal repair and the same verification. A vague “rebuild it all” request can mix unrelated changes into the fix.
Unzip and reproduce the failure first
With Node.js installed, open a terminal in before and run the command below. We used Node24.20.0; no package installation or account is needed. Two failures are the intended starting state.
Run the identical command in after to expect three passes. It does not open a browser. This is a separate minimal fixture, with a different function name and layout from the planning article; it is not the complete planned app implementation.
node --test queue.test.mjsState input, meaning and expectation
Define read:false as unread so the assistant does not have to guess the domain rule. You do not need to send a whole application or private bookmark list.
Input: [{id:'a',read:false},{id:'b',read:true},{id:'c',read:false}]
Rule: read:false means unread
Expected IDs: ['a','c']
Actual IDs: ['b']
Original predicate: return items.filter(item => item.read);Give the workflow a narrow repair scope
This is a shortened, unexecuted editorial template. The actual full request and final response are in the ZIP. Replace filenames, reproduction command and expected values. Do not let the assistant change expectations just to make a test pass.
Start with the minimum reproducible material and keep credentials or production data out of the input. Match writable paths and approvals to the actual project.
/superpowers:systematic-debugging The unread filter retains read:true entries. Read only queue.mjs and queue.test.mjs, reproduce with node --test queue.test.mjs, explain the cause, then minimally change queue.mjs and rerun the same command. Do not modify tests, connect externally, install packages or call other agents. Invoke verification-before-completion and separately list browser checks not performed.One predicate changed; the tests did not
filter retains entries whose predicate is true. The old predicate retained read entries; the repaired one retains false flags. Identical test-file hashes show we did not change expected values to obtain passing output.
// before
export function unreadItems(items) {
return items.filter(item => item.read);
}
// after
export function unreadItems(items) {
return items.filter(item => !item.read);
}Blocked verification is not a successful check
The actual log includes a verification-before-completion invocation. Two additional shell wrappers for separately reporting exit codes were denied by tool permissions. Claude’s final response acknowledged it relied on pass/fail output and had not separately obtained those exit codes.
Editorial reruns directly executed Node for each version and captured exit1 and0. verified-results.json and actual-node-test.txt in each folder document these separate checks, rather than attributing them to Claude.
If the UI is still wrong, investigate the next boundary
A correct function can receive the wrong array or a stored string "false" instead of a boolean. Collect that new evidence. We did not test browser or storage behaviour and cannot conclude that a whole app works.
| Symptom | Next evidence |
|---|---|
| Unit tests pass but the screen is wrong | Actual array and filter state supplied by the UI |
| State reverses after refresh | Save/restore path and stored types |
| Only one item is wrong | Its read type and ID |
| Another test now fails | A separate reproduction and review of affected behaviour |
Keep a reproduction, not just a success message
For your own bug, retain input, expected and actual output, a repeatable command and fresh results after the change. Three passing cases prove these cases, not every boundary or user environment.
Sources & verification
On18October2026, Windows, Node24.20.0, Claude Code2.1.301, recorded model claude-sonnet-5-5 and Superpowers7.0.0 were used with explicit systematic-debugging. Actual Bash, Read, Edit and verification-before-completion Skill calls were recorded. Only queue.mjs changed; the test SHA256 stayed identical. Two extra shell wrappers for exit-code reporting were denied. Separate editorial node --test queue.test.mjs runs confirmed exit1 then0, pass1 then3, fail2 then0. Browser UI, localStorage, large-project reliability, automatic root-cause rates and model comparisons were not tested. No agents, network, package installation or commits were used. English prose is an editorial translation.
Sources checked: 2026.10.18



