Refactoring loops
Incremental refactors with a green-tests invariant: small steps, verified after each one.
No A or B loops in this category. Showing 4 graded C — they stop on their own, but run fewer checks than A or B.
C
/goalRefactoringhigh risk
Fix boolean naming across codebase
Scan, plan, and refactor all boolean naming violations across the codebase until 100% green without stopping.
/goal Autonomously scan, plan, refactor, and fix all boolean naming, double negatives, mixed polarity, single-letter boolean parameters (v bool, b bool), bare verb/noun identifiers (stop bool -> isStopped bool, stopOnFail -> isStopOnFail), awkward isExists identifiers (isExists -> isDefined), compound negative chains (!a || !b || c -> discrete checks), and complex condition violations across the codebase, modifying source files directly to enforce affirmative prefixes (is and has only (can, should, was, etc. are banned)), implicit evaluation (no == true), positive framing (no !isSuccess), and discrete condition decomposition until 100% green without stopping
C
/goalRefactoringmedium risk
Convert JavaScript to strict TypeScript
Convert all src/ JS files to TypeScript with strict annotations until npm test passes cleanly.
/goal "Convert all JavaScript files in src/ to TypeScript, add strict type annotations, and ensure npm test passes with zero errors"
C
/goalRefactoringmedium risk
Dead code elimination
Hunt down unreferenced exports, unused files, and unreachable branches, deleting them in small verified steps until the analyzer reports clean.
/goal `npx knip` reports no unused files or exports — remove one cluster of dead code at a time, run the full test suite and typecheck after each removal, and revert any deletion that breaks them; stop after 15 turns
C
/loopRefactoringmedium risk
Tidy code, one safe change at a time
Prove one small cleanup is safe, make the smallest useful change, and keep it only after existing checks pass.
Review [repository or code project] for dead code, meaning unreachable or unused code; stale files or comments; unused dependencies; duplication; broken links; inconsistent names; and confusing structure. Protect unrelated, active, uncommitted, generated, and uncertain work. Prove one low-risk cleanup, make the smallest coherent change, then rerun the build, tests, runtime checks, and diff review. Keep only verified improvements. Stop when none remain, progress stalls, verification is unavailable, or approval is required. Return changes, evidence, and deferred candidates.