Archive completed debug work to ./.gtd/archive/
Core responsibilities:
Flow: Verify Complete ā Create Archive ā Move Files ā Clean Up
./.gtd/debug/current/ ā Current debug workDestination:
./.gtd/archive/debug-{timestamp}/ ā Archived debug workFiles to archive:
Only archive when debug work is complete (bug is fixed) or abandoned.
Keep all files for future reference and learning.
After archiving, current/ folder should be empty for next debug session.
Verify ./.gtd/debug/current/ exists and has files:
if [ ! -d "./.gtd/debug/current" ] || [ -z "$(ls -A ./.gtd/debug/current)" ]; then
echo "No debug work to archive"
exit 0
fi
Generate timestamp-based archive name:
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
ARCHIVE_DIR="./.gtd/archive/debug-${TIMESTAMP}"
mkdir -p "${ARCHIVE_DIR}"
Move all files from current to archive:
mv ./.gtd/debug/current/* "${ARCHIVE_DIR}/"
Commit the archive:
git add ./.gtd/archive/
git commit -m "chore: archive debug work to debug-${TIMESTAMP}"
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
GTD āŗ DEBUG WORK ARCHIVED ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Archived to: ./.gtd/archive/debug-{timestamp}/
Files archived: {count}
Current debug folder is now empty and ready for next investigation.
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā