Skip to content

commandWorkflow

Triage Todos

Collects to-do comments and open issues, then sorts them into do now, later and drop with a short reason for each.

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

Writes 1 file to .claude/commands/

.claude/commands/triage-todos.md17 lines · 1.2 KBFile
---
description: Collects to-do comments and open issues, then sorts them into do now, later and drop with a short reason for each.
argument-hint: "[folder, or \"with issues\" to include gh issues]"
---

Triage the open TODOs in: $ARGUMENTS (whole repo if empty).

1. Search with `rg -n "T[O]DO|FIXME|HACK|XXX"` excluding vendor, build and lock files. Record file, line and text.
2. For each, check age and author with `git blame -L <line>,<line> <file>`. Check the surrounding code: has the condition it mentions already changed?
3. If the arguments say "with issues" and gh is available, run `gh issue list --state open --limit 100 --json number,title,labels` and match issues to comments by keywords.
4. Sort into:
   - **Do now**: touches security, data loss, wrong results, or blocks a release.
   - **Later**: real but low risk. Group by theme.
   - **Drop**: obsolete, already done, vague, or older than the code it describes.
5. Give each item one line of reasoning and the evidence (blame date, matching issue).

Show counts per group, the do-now list in full and the other groups as short tables. Ask whether to delete the Drop comments and whether to draft issues for Later. Change nothing before the answer.

What it does

Old to-do comments pile up until nobody trusts them. This command gathers them from the code, compares each with git history and any open issues, and decides which are still real.

You get three clear groups and a reason per item. Removing stale comments or filing tickets happens only after you pick.

Example

you › /triage-todos src/

agent › 87 markers. Do now (4): a note to remove debug bypass in auth/session.ts:63. Later (31), grouped as retries, naming, i18n. Drop (52): 40 reference removed code. Delete the 52 stale comments?

Questions

Does it delete comments on its own?
No. Deletion is offered per group and only runs after your reply.
Does it need GitHub access?
Only to cross-check issues. Without gh it triages from the code and history alone.
  • Debug Error

    CommandWorkflow

    Free
  • Estimate Task

    CommandWorkflow

    Free
  • Explain Code

    CommandWorkflow

    Free
  • Plan Feature

    CommandWorkflow

    Free