| name | delete-feature |
| description | Remove a feature directory, its worktrees, and its .m2 |
| user_invocable | true |
Delete Feature
Usage: /delete-feature <number> (e.g., /delete-feature 3223)
Cleans up a feature directory completely: removes git worktrees and deletes the directory.
Steps
-
Validate: Check that ~/git/hibernate/<number>/ exists. Fail with a clear message if not.
-
List worktrees in the feature directory to identify which repos are present:
ls ~/git/hibernate/<number>/
-
Remove each worktree via git:
cd ~/git/hibernate/main/<repo>
git worktree remove ~/git/hibernate/<number>/<repo> --force
-
Archive journal — move daily journal files to the workspace archive:
mkdir -p ~/git/hibernate/journal/<number>/events
mv ~/git/hibernate/<number>/journal/*.md ~/git/hibernate/journal/<number>/events/
-
Generate summary — read all day files in chronological order and write ~/git/hibernate/journal/<number>/summary-<number>.md:
- A short narrative intro: what the feature was about, when work started and ended
- A condensed milestone list: key decisions, breakthroughs, final outcome
- Aim for under 20 bullets regardless of how long the feature lasted
- Formatting: headings and bullet lists only, no bold, no italics, no code blocks, no emoji
-
Commit the archived journal:
git add ~/git/hibernate/journal/<number>/
git commit -m "Archive journal for feature <number>"
-
Delete the feature directory and its .m2:
rm -rf ~/git/hibernate/<number>/
-
Prune worktree references in each parent repo:
cd ~/git/hibernate/main/quarkus && git worktree prune
cd ~/git/hibernate/main/hibernate-orm && git worktree prune
cd ~/git/hibernate/main/hibernate-reactive && git worktree prune
-
Confirm: Print that the feature has been deleted and list remaining feature directories.
Safety
- Ask for confirmation before deleting. Show the user what will be removed (worktrees, branches,
.m2 size).
- Ask whether to also delete the local branches (e.g.,
QUARKUS-3223) or keep them.