Skip to content

commandCode quality

Resolve Todos

Gathers to-do and fix-me comments, ranks them by risk and age, and fixes only the small, safe ones once you approve.

npx workspacetemplates add resolve-todos --tool claude-code

Writes 1 file to .claude/commands/

.claude/commands/resolve-todos.md15 lines · 1.1 KBFile
---
description: Gathers to-do and fix-me comments, ranks them by risk and age, and fixes only the small, safe ones once you approve.
argument-hint: "[folder, default whole repo]"
---

Resolve the to-do and fix-me comments in: $ARGUMENTS (whole repository if empty).

1. Run `git grep -n -E "T[O]DO|FIXME|HACK|XXX"`, skipping vendored and generated folders.
2. For each hit, run `git blame -L <line>,<line> <file>` to get its age and author, and read ten lines around it.
3. Classify every item: **quick** (under 15 minutes, one file, no behavior change to callers), **ticket** (needs design, a decision or several files), **stale** (the code it mentions no longer exists or the issue is already fixed).
4. Rank by risk: FIXME in error paths, security or data handling first, then age.

Print a table: file:line, age, class, one-line plan. Do not edit anything yet.

Ask which quick items to fix and which stale comments to delete. Fix only those, one small commit-ready change at a time, and run the tests after each. Remove the comment when its work is done. Never invent a ticket number.

What it does

Leftover note comments multiply until no one is sure which ones still count. This command gathers every marker in a folder, dates each with its last edit, and sorts them into fix now, ticket it, and delete because stale.

Only the small, low-risk items get fixed, and only after you pick them. Anything that needs a design decision stays in the report with a suggested owner.

Example

you › /resolve-todos src/billing

agent › 14 markers found. 5 quick, 6 ticket, 3 stale.
FIXME src/billing/tax.ts:88 (2 years, handles zero-rated items) ranks first.
Quick: tax.ts:88 add a null check, invoice.ts:41 rename a variable.
Which quick items should I fix, and delete the 3 stale ones?

Questions

Does it fix every note it finds?
No. Only items it rates quick and that you approve. Design questions stay listed with a plan.
How does it know a comment is stale?
It searches for the symbol or issue the note names. If the code is gone or already behaves as the note wanted, it proposes deleting the comment.
  • Add Error Handling

    CommandCode quality

    Free
  • Add Logging

    CommandCode quality

    Free
  • Add Types

    CommandCode quality

    Free
  • Extract Function

    CommandCode quality

    Free