Clean up tasks from .dr-done/tasks/ directory.
Default behavior (no arguments): Clean up all *.done.md tasks.
With arguments: Evaluate the criteria and determine which files to clean up:
- •"stuck" - clean up
*.stuck.mdfiles - •"review" - clean up
*.review.mdfiles - •"pending" - clean up pending
*.mdfiles (not .done, .stuck, or .review) - •"all" - clean up all task files
- •Time-based (e.g., "older than 7 days", "older than 2 weeks") - parse the time criteria and clean up done tasks older than the specified time
Use the cleanup script:
- •Call
${CLAUDE_PLUGIN_ROOT}/scripts/cleanup.sh <file-pattern>to trash files - •The script prefers
trashcommand if available, otherwise falls back torm - •You can pass a glob pattern like
.dr-done/tasks/*.done.mdor individual files
Steps:
- •Evaluate what files to clean up based on arguments
- •Use Glob or Bash to find matching files if needed
- •Call cleanup.sh with the file pattern or specific files
- •Report how many files were cleaned up