Import TODOs
Discover TODO/FIXME comments in the codebase and convert selected ones into task files — no CLI required.
Instructions
The user may optionally provide flags in $ARGUMENTS (e.g. --dir ./src, --marker TODO).
Discover TODOs: Use
Grepto search for TODO/FIXME/HACK/XXX/NOTE/BUG/OPTIMIZE comments:- Default pattern:
(TODO|FIXME|HACK|XXX|BUG|OPTIMIZE)\b - If
--markeris specified, search for only that marker - If
--diris specified, search in that directory; otherwise search the project root - Exclude common non-source directories:
node_modules,vendor,.git,dist,build - Collect: file path, line number, marker type, and comment text
- Default pattern:
Handle empty results: If no TODOs are found, inform the user:
"No TODO/FIXME comments found in the codebase. Try widening your search with
--diror removing--markerfilters."- Stop here
Check for duplicates:
- Read
.taskmd.yamlfor custom taskdir(default:tasks) - Use
Globfor<task-dir>/**/*.mdand read frontmatter titles - For each TODO, check if its text closely matches an existing task title (case-insensitive substring match)
- Flag potential duplicates
- Read
Present the list: Display the TODOs as a numbered list:
Found N TODO comments: # | Marker | File | Text -----|--------|-------------------------------|---------------------------------- 1 | TODO | src/auth.go:42 | implement rate limiting 2 | FIXME | src/handler.go:15 | handle timeout errors 3 | TODO | src/db.go:88 | add connection pooling *4 | TODO | src/cache.go:12 | optimize cache (possible duplicate: task 045)Mark potential duplicates with
*and note the matching task.Ask the user: Ask which TODOs to convert into tasks. Accept:
- Specific numbers:
1, 3, 5 - Ranges:
1-5 - A combination:
1-3, 7, 9-11 allto convert everythingnoneor empty to cancel
- Specific numbers:
Handle cancellation: If the user selects none or cancels:
"No TODOs selected. Exiting."
Convert selected TODOs: For each selected TODO, invoke the
/add-taskskill using theSkilltool:- Use the TODO text as the task description
- Include the source file and line number as context
- Use the marker type as a hint for the task type (e.g. FIXME/BUG → type
bug, TODO → typefeature) - Format the skill argument as:
<marker>: <text> (from <file>:<line>)
Example Skill invocation:
Skill: add-task Args: "TODO: implement rate limiting (from src/auth.go:42)"Report results: After all tasks are created, summarize:
Created N task(s) from TODOs: - Task <ID>: <title> (from <file>:<line>) - Task <ID>: <title> (from <file>:<line>)
See SPEC_REFERENCE.md (in the plugin root) for frontmatter schema and valid field values.