skills: clean up workspaces with jj workspace remove
Assisted-by: Claude Opus 5.5 via Claude Code
change vznywvppwpmxounkrkzxnsyvmkqznpvl
commit 123ad4a6c11394828cd6e0305d88737bd66c09dc
author Alpha Chen <alpha@kejadlen.dev>
date
parent rsovsxln
diff --git a/ai/skills/jj-workspaces/SKILL.md b/ai/skills/jj-workspaces/SKILL.md
index c2fbd011..5d1ab9eb 100644
--- a/ai/skills/jj-workspaces/SKILL.md
+++ b/ai/skills/jj-workspaces/SKILL.md
@@ -70,17 +70,18 @@ cd work/<name>
 **If successful:** Merge back:
 ```bash
 jj rebase -s <name>@ -d @
-jj workspace forget <name>
-jj abandon 'empty() & description(exact:"") & @-'
-rm -rf work/<name>
+jj workspace remove <name>
 ```
 
-**If unsuccessful:** Forget and clean up:
+**If unsuccessful:** Remove it:
 ```bash
-jj workspace forget <name>
-rm -rf work/<name>
+jj workspace remove <name>
 ```
 
+`remove` snapshots the working copy, forgets the workspace, abandons
+its working-copy commit if empty and undescribed, and deletes the
+directory. Pass several names to clean up a batch at once.
+
 ### Parallel Experiments
 
 Create multiple workspaces to compare approaches:
@@ -147,8 +148,7 @@ jj status                  # Check conflicts, resolve if needed
 ### Phase 5: Cleanup
 
 ```bash
-jj workspace forget <name>
-rm -rf work/<name>
+jj workspace remove <name>
 ```
 
 ## Common Mistakes
@@ -161,8 +161,7 @@ rm -rf work/<name>
 | Skipping `jj workspace update-stale` | Run in main workspace after workspace operations |
 | Creating workspaces during dispatch | Create every workspace before dispatch |
 | Agent touching other workspaces | Agents work only in their assigned path |
-| Empty WC commits after rebase | After rebase + forget, run `jj abandon 'empty() & description(exact:"") & @-'` to drop the workspace's leftover empty WC |
-| Forgetting cleanup | Remove directories after forgetting workspace |
+| `forget` + `abandon` + `rm -rf` to clean up | `jj workspace remove` does all three; a following `jj abandon` of the empty WC fails because it's already gone |
 | jj not seeing file changes | Run `jj` or `jj status` periodically—jj only snapshots on command execution |
 | Files written in one workspace vanish | Concurrent rewrite left the change divergent. See the `jj` skill's Divergent Changes section—recover, don't rewrite |
 | "Overkill for one agent" | Use the same workflow for one agent as for many—consistency beats a special case |
diff --git a/ai/skills/resolve-conflicts/SKILL.md b/ai/skills/resolve-conflicts/SKILL.md
index 0ab2a4f2..466a4892 100644
--- a/ai/skills/resolve-conflicts/SKILL.md
+++ b/ai/skills/resolve-conflicts/SKILL.md
@@ -2,7 +2,7 @@
 name: resolve-conflicts
 description: Use when resolving jj conflicts after rebase, squash, or merge — handles conflict markers, mergiraf automation, and file-by-file manual resolution, in place with `jj resolve -r` or in an isolated workspace
 argument-hint: [change-id]
-allowed-tools: [Bash(mkdir -p work), Bash(jj workspace add --name=resolve-* -r * work/resolve-*), Bash(cd work/resolve-*), Bash(jj status), Bash(jj resolve *), Bash(jj diff *), Bash(jj log *), Bash(jj op log *), Bash(jj op show *), Bash(jj squash *), Bash(jj workspace forget resolve-*), Bash(jj workspace update-stale), Bash(rm -rf work/resolve-*)]
+allowed-tools: [Bash(mkdir -p work), Bash(jj workspace add --name=resolve-* -r * work/resolve-*), Bash(cd work/resolve-*), Bash(jj status), Bash(jj resolve *), Bash(jj diff *), Bash(jj log *), Bash(jj op log *), Bash(jj op show *), Bash(jj squash *), Bash(jj workspace remove resolve-*), Bash(jj workspace update-stale)]
 ---
 
 # Resolve Conflicts
@@ -301,17 +301,13 @@ Do not run `jj squash` automatically. Prompt the user:
 > `<change-id>`, or review the diff first with `jj diff`.
 
 Once the user confirms the squash, `<change-id>` is fixed up and the
-workspace's working-copy commit is left empty. Clean up per
-`jj-workspaces`' cleanup recipe:
-
-```
-jj workspace forget resolve-<change-id>
-rm -rf work/resolve-<change-id>
-```
-
-Then, from the main workspace, sync so it sees the resolved change:
+workspace's working-copy commit is left empty. From the main workspace —
+`remove` deletes `work/resolve-<change-id>`, so don't run it from inside —
+clean up per `jj-workspaces`' cleanup recipe, then sync so the main
+workspace sees the resolved change:
 
 ```
+jj workspace remove resolve-<change-id>
 jj workspace update-stale
 ```
 
diff --git a/ai/skills/speed-run/SKILL.md b/ai/skills/speed-run/SKILL.md
index 3819eb8c..597b0b35 100644
--- a/ai/skills/speed-run/SKILL.md
+++ b/ai/skills/speed-run/SKILL.md
@@ -71,7 +71,7 @@ diff. If the same defect survives two fix attempts, bring it to the user.
 
 ## Hand off
 
-When review accepts a track, forget its workspace per `jj-workspaces`, leaving
+When review accepts a track, remove its workspace per `jj-workspaces`, leaving
 the change in place. Tell the user the report ID, the change ID, and what it
 does, and name any other track that touches the same files so they know to
 expect a conflict. Don't merge, push, or deliver it.