A simple refactor task that demonstrates the standard loop.
Project: a TypeScript library with a legacyAuth.ts file that uses an old token format. The new format is in auth.ts. Multiple callers need to be updated.
/goalpower Refactor src/legacyAuth.ts to use the new token format from src/auth.ts and update all callers. Make sure `bun test` still passes.
Round 1 (Implementer):
- Reads
legacyAuth.ts,auth.ts, and all callers. - Edits callers to use
auth.ts. - Writes
plan.mdlisting the 6 callers + acceptance criteria (bun testgreen, no references tolegacyAuth.parseToken). - Writes
unit_exercise.logwith rawbun testoutput.
Round 1 (Skeptic):
- Re-reads
legacyAuth.ts— finds 2 callers were missed. - Writes verdict-1-0.json with
refuted: true, confidence: high, findingbug at src/utils/handler.ts:42 — still calling legacyAuth.parseToken.
Round 1 (Aggregation): REFUTED — 1 high-confidence gap.
Round 2 (Implementer):
- Reads the gap. Edits
src/utils/handler.tsand one more file the Skeptic flagged. - Re-runs
bun test. Writes newunit_exercise.log.
Round 2 (Skeptic):
- Re-audits the prior gap from round 1 — FIXED.
- Audits the new edits — all callers updated, tests pass.
- Writes verdict-2-0.json with
refuted: false.
Round 2 (Aggregation): ACCEPTED.
Total: 2 rounds, ~6 minutes.