From 6cbdc59e22065f51c5390bd0a1e8ff3a220f838b Mon Sep 17 00:00:00 2001 From: Josh Allishaw Date: Fri, 13 Mar 2026 15:11:41 -0400 Subject: [PATCH 1/4] Add flick skill and script for Ralph cleanup; add completion tip to ralph.sh --- flick.sh | 76 +++++++++++++++++++++++++++++++++++++++++++ ralph.sh | 4 +++ skills/flick/SKILL.md | 49 ++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100755 flick.sh create mode 100644 skills/flick/SKILL.md diff --git a/flick.sh b/flick.sh new file mode 100755 index 000000000..de74f8682 --- /dev/null +++ b/flick.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# flick.sh — Ralph cleanup utility +# Finds and deletes Ralph intermediary files (prd.json, progress.txt). +# Run this from your project directory after a successful Ralph run. +# +# Usage: bash /path/to/ralph/flick.sh [--nuke] +# --nuke Skip confirmation prompts and delete all files immediately + +nuke=false +project_dir="${PWD}" + +[[ "$1" == "--nuke" ]] && nuke=true + +search_dirs=( + "${project_dir}" + "${project_dir}/ralph" + "${project_dir}/.agents/ralph" + "${project_dir}/.claude/ralph" + "${HOME}/.agents/ralph" + "${HOME}/.claude/ralph" +) + +found_any=false + +for dir in "${search_dirs[@]}"; do + dir_files=() + for fname in prd.json progress.txt; do + [[ -f "${dir}/${fname}" ]] && dir_files+=("${dir}/${fname}") + done + + [[ ${#dir_files[@]} -eq 0 ]] && continue + found_any=true + + echo "" + echo "════════════════════════════════════════" + echo "Location: ${dir}" + + filenames=() + for f in "${dir_files[@]}"; do + filenames+=("$(basename "$f")") + done + echo "Files: $(IFS=', '; echo "${filenames[*]}")" + + prd="${dir}/prd.json" + if [[ -f "$prd" ]]; then + echo "" + echo "── prd.json (first 15 lines) ──────────" + head -15 "$prd" + fi + + echo "" + + if $nuke; then + for f in "${dir_files[@]}"; do + rm "$f" && echo " Deleted: $f" + done + else + read -p "Delete these files? (y/n) " reply + echo "" + if [[ "$reply" =~ ^[Yy]$ ]]; then + for f in "${dir_files[@]}"; do + rm "$f" && echo " Deleted: $f" + done + else + echo " Skipped." + fi + fi +done + +if ! $found_any; then + echo "No Ralph files found in any expected location." +else + echo "" + echo "════════════════════════════════════════" + echo "Done." +fi diff --git a/ralph.sh b/ralph.sh index baff052ac..372d76605 100755 --- a/ralph.sh +++ b/ralph.sh @@ -100,6 +100,10 @@ for i in $(seq 1 $MAX_ITERATIONS); do echo "" echo "Ralph completed all tasks!" echo "Completed at iteration $i of $MAX_ITERATIONS" + echo "" + echo "Tip: clean up Ralph's intermediary files when you're ready:" + echo " Via your AI coding tool : /flick" + echo " Via script (from project): path/to/ralph/flick.sh" exit 0 fi diff --git a/skills/flick/SKILL.md b/skills/flick/SKILL.md new file mode 100644 index 000000000..55c7540f8 --- /dev/null +++ b/skills/flick/SKILL.md @@ -0,0 +1,49 @@ +--- +name: flick +description: "Clean up Ralph intermediary files (prd.json, progress.txt) after a completed run. Triggers on: flick, flick booger, clean up ralph files, remove prd.json, delete progress.txt, ralph cleanup." +user-invocable: true +--- + +# Flick — Ralph Cleanup + +Finds and removes `prd.json` and `progress.txt` left behind by a Ralph run. + +--- + +## The Job + +Search for Ralph intermediary files in the following locations (relative to the current project directory, and at the user level): + +1. `{project_root}/` +2. `{project_root}/ralph/` +3. `{project_root}/.agents/ralph/` +4. `{project_root}/.claude/ralph/` +5. `~/.agents/ralph/` +6. `~/.claude/ralph/` + +Where `{project_root}` is the root of the current project (the working directory). + +--- + +## Steps + +1. **Find all instances** of `prd.json` and `progress.txt` across every location above. + +2. **If nothing is found**, tell the user: no Ralph files found. + +3. **For each location that has files:** + - Show the location path and which files were found there + - If a `prd.json` exists at that location, show its first 15 lines + - Ask the user: "Delete these files? (y/n)" + - If yes, delete them and confirm each deletion + - If no, skip and move to the next location + +4. **When all locations are processed**, give a brief summary of what was deleted vs skipped. + +--- + +## Notes + +- Be precise about paths when reporting — show the full path of each file found and deleted. +- Do not delete any files without confirmation. +- If the user passes `--nuke`, `--all`, or says "nuke it" / "delete everything" / "delete all", skip the per-location prompts and delete all found files immediately. From ff98eed66b419bed888c2bc7c0132168bd21f4c9 Mon Sep 17 00:00:00 2001 From: Josh Allishaw Date: Fri, 13 Mar 2026 15:16:38 -0400 Subject: [PATCH 2/4] Add --all as alias for --nuke in flick.sh --- flick.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flick.sh b/flick.sh index de74f8682..7a349a196 100755 --- a/flick.sh +++ b/flick.sh @@ -3,13 +3,14 @@ # Finds and deletes Ralph intermediary files (prd.json, progress.txt). # Run this from your project directory after a successful Ralph run. # -# Usage: bash /path/to/ralph/flick.sh [--nuke] +# Usage: bash /path/to/ralph/flick.sh [--nuke|--all] # --nuke Skip confirmation prompts and delete all files immediately +# --all Alias for --nuke nuke=false project_dir="${PWD}" -[[ "$1" == "--nuke" ]] && nuke=true +[[ "$1" == "--nuke" || "$1" == "--all" ]] && nuke=true search_dirs=( "${project_dir}" From 7254bcf3a3d367e741bcbf5ba19387ae452035d5 Mon Sep 17 00:00:00 2001 From: Josh Allishaw Date: Mon, 23 Mar 2026 22:20:01 -0400 Subject: [PATCH 3/4] Add tasks/ directory to flick cleanup search paths --- flick.sh | 1 + skills/flick/SKILL.md | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/flick.sh b/flick.sh index 7a349a196..d4b3ef738 100755 --- a/flick.sh +++ b/flick.sh @@ -14,6 +14,7 @@ project_dir="${PWD}" search_dirs=( "${project_dir}" + "${project_dir}/tasks" "${project_dir}/ralph" "${project_dir}/.agents/ralph" "${project_dir}/.claude/ralph" diff --git a/skills/flick/SKILL.md b/skills/flick/SKILL.md index 55c7540f8..7ce3e76a2 100644 --- a/skills/flick/SKILL.md +++ b/skills/flick/SKILL.md @@ -15,11 +15,12 @@ Finds and removes `prd.json` and `progress.txt` left behind by a Ralph run. Search for Ralph intermediary files in the following locations (relative to the current project directory, and at the user level): 1. `{project_root}/` -2. `{project_root}/ralph/` -3. `{project_root}/.agents/ralph/` -4. `{project_root}/.claude/ralph/` -5. `~/.agents/ralph/` -6. `~/.claude/ralph/` +2. `{project_root}/tasks/` +3. `{project_root}/ralph/` +4. `{project_root}/.agents/ralph/` +5. `{project_root}/.claude/ralph/` +6. `~/.agents/ralph/` +7. `~/.claude/ralph/` Where `{project_root}` is the root of the current project (the working directory). From ba5c8594aaa016c147f1ef1b17b97f85a5599ad3 Mon Sep 17 00:00:00 2001 From: Josh Allishaw Date: Thu, 9 Apr 2026 10:19:24 -0400 Subject: [PATCH 4/4] Add .agents/skills/ralph and .claude/skills/ralph to flick search paths --- flick.sh | 4 ++++ skills/flick/SKILL.md | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/flick.sh b/flick.sh index d4b3ef738..358166d09 100755 --- a/flick.sh +++ b/flick.sh @@ -17,9 +17,13 @@ search_dirs=( "${project_dir}/tasks" "${project_dir}/ralph" "${project_dir}/.agents/ralph" + "${project_dir}/.agents/skills/ralph" "${project_dir}/.claude/ralph" + "${project_dir}/.claude/skills/ralph" "${HOME}/.agents/ralph" + "${HOME}/.agents/skills/ralph" "${HOME}/.claude/ralph" + "${HOME}/.claude/skills/ralph" ) found_any=false diff --git a/skills/flick/SKILL.md b/skills/flick/SKILL.md index 7ce3e76a2..f8cbc799a 100644 --- a/skills/flick/SKILL.md +++ b/skills/flick/SKILL.md @@ -18,9 +18,13 @@ Search for Ralph intermediary files in the following locations (relative to the 2. `{project_root}/tasks/` 3. `{project_root}/ralph/` 4. `{project_root}/.agents/ralph/` -5. `{project_root}/.claude/ralph/` -6. `~/.agents/ralph/` -7. `~/.claude/ralph/` +5. `{project_root}/.agents/skills/ralph/` +6. `{project_root}/.claude/ralph/` +7. `{project_root}/.claude/skills/ralph/` +8. `~/.agents/ralph/` +9. `~/.agents/skills/ralph/` +10. `~/.claude/ralph/` +11. `~/.claude/skills/ralph/` Where `{project_root}` is the root of the current project (the working directory).