Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

docs(hook): split cwd exception bullet to match 'three cases' count (#3367)

Worktrunk Bot67d217702928
diff --git a/docs/content/hook.md b/docs/content/hook.md
index 6acb38b40..c8a44ff2d 100644
--- a/docs/content/hook.md
+++ b/docs/content/hook.md
@@ -164,7 +164,8 @@ All hooks share the same perspective — `{{ branch | hash_port }}` produces the
`cwd` is the worktree root where the hook command runs. It equals `worktree_path` except in three cases:
- `pre-switch`: hook runs in the source worktree; `worktree_path` is the destination
-- `post-remove` and `post-merge` with removal: the active worktree is gone, so the hook runs in primary or target, respectively
+- `post-remove`: the active worktree is gone, so the hook runs in the primary worktree
+- `post-merge` with removal: the active worktree is gone, so the hook runs in the target worktree
Undefined variables error — use conditionals or defaults for optional behavior:
diff --git a/skills/worktrunk/reference/hook.md b/skills/worktrunk/reference/hook.md
index 7956c5dcb..049b7c850 100644
--- a/skills/worktrunk/reference/hook.md
+++ b/skills/worktrunk/reference/hook.md
@@ -155,7 +155,8 @@ All hooks share the same perspective — `{{ branch | hash_port }}` produces the
`cwd` is the worktree root where the hook command runs. It equals `worktree_path` except in three cases:
- `pre-switch`: hook runs in the source worktree; `worktree_path` is the destination
-- `post-remove` and `post-merge` with removal: the active worktree is gone, so the hook runs in primary or target, respectively
+- `post-remove`: the active worktree is gone, so the hook runs in the primary worktree
+- `post-merge` with removal: the active worktree is gone, so the hook runs in the target worktree
Undefined variables error — use conditionals or defaults for optional behavior:
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 4525a798a..2eaaf62de 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1535,7 +1535,8 @@ All hooks share the same perspective — `{{ branch | hash_port }}` produces the
`cwd` is the worktree root where the hook command runs. It equals `worktree_path` except in three cases:
- `pre-switch`: hook runs in the source worktree; `worktree_path` is the destination
-- `post-remove` and `post-merge` with removal: the active worktree is gone, so the hook runs in primary or target, respectively
+- `post-remove`: the active worktree is gone, so the hook runs in the primary worktree
+- `post-merge` with removal: the active worktree is gone, so the hook runs in the target worktree
Undefined variables error — use conditionals or defaults for optional behavior: