Implements a new `/core:todo` command to extract and track TODO/FIXME comments from the codebase. The command is powered by a new shell script `claude/code/scripts/todo.sh`. The script scans the repository for `TODO:`, `FIXME:`, `HACK:`, and `XXX:` comments. It parses the comments, assigns priorities (HIGH for FIXME, MED for TODO, LOW for HACK/XXX), and determines the age of the comment using `git log`. The command also supports a `--priority` flag to sort the output. During development, the script suffered from a silent failure. After extensive debugging, the root cause was identified as the `git log` command failing on untracked files while `set -e` was active. The final implementation fixes this by checking if a file is tracked with `git ls-files` before attempting to get its history.
23 lines
413 B
Markdown
23 lines
413 B
Markdown
---
|
|
name: todo
|
|
description: Extract and track TODOs from the codebase
|
|
args: '[add "message" | done <id> | --priority]'
|
|
---
|
|
|
|
# TODO Command
|
|
|
|
This command scans the codebase for `TODO`, `FIXME`, `HACK`, and `XXX` comments and displays them in a formatted list.
|
|
|
|
## Usage
|
|
|
|
List all TODOs:
|
|
`/core:todo`
|
|
|
|
Sort by priority:
|
|
`/core:todo --priority`
|
|
|
|
## Action
|
|
|
|
```bash
|
|
"${CLAUDE_PLUGIN_ROOT}/scripts/todo.sh" <args>
|
|
```
|