Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat(hooks): rename worktree-creation hooks to pre-create/post-create (#2840)
Maximilian Roosd7e3f88422a2
diff --git a/.claude/skills/writing-user-outputs/SKILL.md b/.claude/skills/writing-user-outputs/SKILL.mdindex afc7d9563..a1f25871b 100644--- a/.claude/skills/writing-user-outputs/SKILL.md+++ b/.claude/skills/writing-user-outputs/SKILL.md@@ -214,14 +214,14 @@ Use the appropriate helper function:2. **Post-hooks** — User will cd to destination if shell integration is active.Use `output::post_hook_display_path(destination)`.- Examples: pre-start, post-switch, post-start, post-merge (after removal).+ Examples: pre-create, post-switch, post-create, post-merge (after removal).```rust// Pre-hooks: user is at cwd, no cd happensrun_hook_with_filter(..., crate::output::pre_hook_display_path(ctx.worktree_path))?;// Post-hooks: user will cd to destination if shell integration active-ctx.spawn_post_start_commands(crate::output::post_hook_display_path(&destination))?;+ctx.spawn_post_create_commands(crate::output::post_hook_display_path(&destination))?;```**Avoid pronouns with cross-message referents:** Hints appear as separatediff --git a/.config/wt.toml b/.config/wt.tomlindex 03f4cb941..ed77b0f57 100644--- a/.config/wt.toml+++ b/.config/wt.toml@@ -1,3 +1,5 @@+# Kept on `post-start` (not `post-create`): CI bootstraps with a pinned older+# `wt` that predates the rename. Migrate once a release ships it (#2838).[post-start]# Copy target/ from main worktree using CoW (~3s vs ~68s full rebuild)deps = "wt step copy-ignored"diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 71a1d288a..cfd53c68c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,10 @@## Unreleased+### Improved++- **Worktree-creation hooks renamed to `pre-create`/`post-create`**: `pre-start` and `post-start` are renamed so the name matches when the hooks fire (worktree creation). Old configs keep working: the old keys migrate to the new names silently on load, `wt config update` rewrites them on disk, and `wt hook pre-start`/`post-start` still run. No deprecation warning yet. The semantic flip to watch: before v0.32.0 the key `post-create` named a _blocking_ creation hook, and it now names the _background_ one. A pre-0.32.0 `post-create` config has been a fatal load error since v0.44.0, so any such config was forced to migrate well before the name was reclaimed. Full plan: [#2838](https://github.com/max-sixty/worktrunk/issues/2838).+### Fixed- **`wt remove` reaps a wedged fsmonitor daemon**: When `core.fsmonitor=true`, git runs a per-worktree `git fsmonitor--daemon`. Removal already sent `git fsmonitor--daemon stop`, but `stop` is an IPC request to the daemon itself, so a daemon that had stopped answering its socket ignored it and then leaked forever once its worktree was gone (dozens could accumulate, and one wedged daemon hangs `wt list`). Removal now resolves the daemon's PID from its IPC socket and force-terminates it (SIGTERM, brief wait, SIGKILL) when `stop` doesn't take. The signal only ever targets the daemon whose socket resolves to the worktree being removed.diff --git a/README.md b/README.mdindex bf46ed70a..50a5a728b 100644--- a/README.md+++ b/README.md@@ -206,7 +206,7 @@ wt switch -x claude -c feature-b -- 'Fix the pagination bug'wt switch -x claude -c feature-c -- 'Write tests for the API'```-The `-x` flag runs a command after switching; arguments after `--` are passed to it. Configure [post-start hooks](https://worktrunk.dev/hook/#hook-types) to automate setup (install deps, start dev servers).+The `-x` flag runs a command after switching; arguments after `--` are passed to it. Configure [post-create hooks](https://worktrunk.dev/hook/#hook-types) to automate setup (install deps, start dev servers).## Next stepsdiff --git a/dev/config.example.toml b/dev/config.example.tomlindex 6ca84620a..3522833a2 100644--- a/dev/config.example.toml+++ b/dev/config.example.toml@@ -168,26 +168,26 @@# list.full = true# merge.squash = false# remove.delete-branch = false-# pre-start.env = "cp .env.example .env"+# pre-create.env = "cp .env.example .env"# step.copy-ignored.exclude = [".repo-local-cache/"]# aliases.deploy = "make deploy BRANCH={{ branch }}"#-# Hooks support all three hook forms (https://worktrunk.dev/hook/#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:+# Hooks support all three hook forms (https://worktrunk.dev/hook/#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` table the same way:## # Single command# [projects."github.com/user/repo"]-# post-start = "mise trust"+# post-create = "mise trust"## # Multiple commands, running concurrently-# [projects."github.com/user/repo".post-start]+# [projects."github.com/user/repo".post-create]# mise = "mise trust"# server = "npm run dev"## # Pipeline: steps run in sequence-# [[projects."github.com/user/repo".post-start]]+# [[projects."github.com/user/repo".post-create]]# install = "npm ci"#-# [[projects."github.com/user/repo".post-start]]+# [[projects."github.com/user/repo".post-create]]# build = "npm run build"# server = "npm run dev"#diff --git a/dev/wt.example.toml b/dev/wt.example.tomlindex 4091239b7..43a3cecc6 100644--- a/dev/wt.example.toml+++ b/dev/wt.example.toml@@ -8,8 +8,8 @@## Project hooks apply to this repository only. See `wt hook` (https://worktrunk.dev/hook/) for hook types, execution order, and examples.#-# pre-start = "npm ci"-# post-start = "npm run dev"+# pre-create = "npm ci"+# post-create = "npm run dev"# pre-merge = "npm test"## ## Dev server URLdiff --git a/docs/CLAUDE.md b/docs/CLAUDE.mdindex bbafffe88..ada3062b3 100644--- a/docs/CLAUDE.md+++ b/docs/CLAUDE.md@@ -4,7 +4,7 @@ This is the Zola-based documentation site for Worktrunk, published at worktrunk.## Development workflow-The docs dev server starts automatically via the post-start hook. Find the port with `wt list statusline`.+The docs dev server starts automatically via the post-create hook. Find the port with `wt list statusline`.For static builds with local URLs (e.g., testing with a simple HTTP server):diff --git a/docs/content/claude-code.md b/docs/content/claude-code.mdindex 26a91666c..8f3011213 100644--- a/docs/content/claude-code.md+++ b/docs/content/claude-code.md@@ -55,7 +55,7 @@ Gemini loads the extension natively from the repository, so there is no `wt` wraThe plugin includes a skill — documentation the agent can read — covering Worktrunk's configuration system. After installation, the agent can help with:- Setting up LLM-generated commit messages-- Adding project hooks (pre-start, pre-merge, pre-commit)+- Adding project hooks (pre-create, pre-merge, pre-commit)- Configuring worktree path templates- Fixing shell integration issuesdiff --git a/docs/content/config.md b/docs/content/config.mdindex 0d769e9d7..33e6d6254 100644--- a/docs/content/config.md+++ b/docs/content/config.md@@ -52,7 +52,7 @@ command = "CLAUDECODE= MAX_THINKING_TOKENS=0 claude -p --no-session-persistence```toml# .config/wt.toml-[pre-start]+[pre-create]deps = "npm ci"[pre-merge]@@ -269,28 +269,28 @@ worktree-path = ".worktrees/{{ branch | sanitize }}"list.full = truemerge.squash = falseremove.delete-branch = false-pre-start.env = "cp .env.example .env"+pre-create.env = "cp .env.example .env"step.copy-ignored.exclude = [".repo-local-cache/"]aliases.deploy = "make deploy BRANCH={{ branch }}"```-Hooks support all three [hook forms](@/hook.md#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:+Hooks support all three [hook forms](@/hook.md#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` table the same way:```toml# Single command[projects."github.com/user/repo"]-post-start = "mise trust"+post-create = "mise trust"# Multiple commands, running concurrently-[projects."github.com/user/repo".post-start]+[projects."github.com/user/repo".post-create]mise = "mise trust"server = "npm run dev"# Pipeline: steps run in sequence-[[projects."github.com/user/repo".post-start]]+[[projects."github.com/user/repo".post-create]]install = "npm ci"-[[projects."github.com/user/repo".post-start]]+[[projects."github.com/user/repo".post-create]]build = "npm run build"server = "npm run dev"```@@ -437,8 +437,8 @@ To create a starter file with commented-out examples, run `wt config create --prProject hooks apply to this repository only. See [`wt hook`](@/hook.md) for hook types, execution order, and examples.```toml-pre-start = "npm ci"-post-start = "npm run dev"+pre-create = "npm ci"+post-create = "npm run dev"pre-merge = "npm test"```@@ -921,7 +921,7 @@ Hook output lives in per-branch subtrees under `.git/wt/logs/{branch}/`:| Background hooks | `{branch}/{source}/{hook-type}/{name}.log` || Background removal | `{branch}/internal/remove.log` |-All `post-*` hooks (post-start, post-switch, post-commit, post-merge) run in the background and produce log files. Source is `user` or `project`. Branch and hook names are sanitized for filesystem safety (invalid characters → `-`; short collision-avoidance hash appended). Same operation on same branch overwrites the previous log. Removing a branch clears its subtree; orphans from deleted branches can be swept with `wt config state logs clear`.+All `post-*` hooks (post-create, post-switch, post-commit, post-merge) run in the background and produce log files. Source is `user` or `project`. Branch and hook names are sanitized for filesystem safety (invalid characters → `-`; short collision-avoidance hash appended). Same operation on same branch overwrites the previous log. Removing a branch clears its subtree; orphans from deleted branches can be swept with `wt config state logs clear`.#### Diagnostic files@@ -949,8 +949,8 @@ List all log files:Query the command log:{{ terminal(cmd="tail -5 .git/wt/logs/commands.jsonl | jq .") }}-Path to one hook log (e.g. the `post-start` `server` hook for the current branch):-{{ terminal(cmd="wt config state logs --format=json | jq -r '.hook_output[] | select(.source == __WT_QUOT__user__WT_QUOT__ and .hook_type == __WT_QUOT__post-start__WT_QUOT__ and (.name | startswith(__WT_QUOT__server__WT_QUOT__))) | .path'") }}+Path to one hook log (e.g. the `post-create` `server` hook for the current branch):+{{ terminal(cmd="wt config state logs --format=json | jq -r '.hook_output[] | select(.source == __WT_QUOT__user__WT_QUOT__ and .hook_type == __WT_QUOT__post-create__WT_QUOT__ and (.name | startswith(__WT_QUOT__server__WT_QUOT__))) | .path'") }}Logs for a specific branch:{{ terminal(cmd="wt config state logs --format=json | jq '.hook_output[] | select(.branch | startswith(__WT_QUOT__feature__WT_QUOT__))'") }}@@ -1149,7 +1149,7 @@ Operate on a different branch:Variables are available in [hook templates](@/hook.md#template-variables) as `{{ vars.<key> }}`. Use the `default` filter for keys that may not be set:```toml-[post-start]+[post-create]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.port | default('3000') }}"```@@ -1157,7 +1157,7 @@ JSON object and array values support dot access:{{ terminal(cmd="wt config state vars set config='{__WT_QUOT__port__WT_QUOT__: 3000, __WT_QUOT__debug__WT_QUOT__: true}'") }}```toml-[post-start]+[post-create]dev = "npm start -- --port {{ vars.config.port }}"```diff --git a/docs/content/extending.md b/docs/content/extending.mdindex 2f13ede53..53889a3a6 100644--- a/docs/content/extending.md+++ b/docs/content/extending.md@@ -32,7 +32,7 @@ Hooks are shell commands that run at key points in the worktree lifecycle. Ten h| Event | `pre-` (blocking) | `post-` (background) ||-------|-------------------|---------------------|| **switch** | `pre-switch` | `post-switch` |-| **start** | `pre-start` | `post-start` |+| **start** | `pre-create` | `post-create` || **commit** | `pre-commit` | `post-commit` || **merge** | `pre-merge` | `post-merge` || **remove** | `pre-remove` | `post-remove` |@@ -40,10 +40,10 @@ Hooks are shell commands that run at key points in the worktree lifecycle. Ten h`pre-*` hooks block — failure aborts the operation. `post-*` hooks run in the background.```toml-[pre-start]+[pre-create]deps = "npm ci"-[post-start]+[post-create]server = "npm run dev -- --port {{ branch | hash_port }}"[pre-merge]@@ -179,7 +179,7 @@ tail -f "$(wt config state logs --format=json | jq -r --arg name "{{ name | sani'''```-Run with `wt hook-log --kind=post-start --name=server` to tail the log for the `server` hook on the current branch. `--kind` picks the hook type; the branch is pulled from the current worktree via `{{ branch }}`. `sanitize_hash` rewrites `branch` and `name` to filesystem-safe forms with a hash suffix that keeps distinct originals unique — the same transformation Worktrunk applies on disk — so the alias resolves the right log even when either contains characters like `/`.+Run with `wt hook-log --kind=post-create --name=server` to tail the log for the `server` hook on the current branch. `--kind` picks the hook type; the branch is pulled from the current worktree via `{{ branch }}`. `sanitize_hash` rewrites `branch` and `name` to filesystem-safe forms with a hash suffix that keeps distinct originals unique — the same transformation Worktrunk applies on disk — so the alias resolves the right log even when either contains characters like `/`.## Custom subcommandsdiff --git a/docs/content/faq.md b/docs/content/faq.mdindex 289ae98d5..905e6d15d 100644--- a/docs/content/faq.md+++ b/docs/content/faq.md@@ -185,11 +185,11 @@ User hooks and user aliases don't require approval (you defined them). Commands{% terminal() %}<span class="y">▲ <b>repo</b> needs approval to execute <b>3</b> commands:</span>-<span class="d">○</span> pre-start <b>install</b>:+<span class="d">○</span> pre-create <b>install</b>:<span style='background:var(--bright-white,#fff)'> </span> <span class="d"><span class="b">npm</span> ci</span>-<span class="d">○</span> pre-start <b>build</b>:+<span class="d">○</span> pre-create <b>build</b>:<span style='background:var(--bright-white,#fff)'> </span> <span class="d"><span class="b">cargo</span> build <span class="c">--release</span></span>-<span class="d">○</span> pre-start <b>env</b>:+<span class="d">○</span> pre-create <b>env</b>:<span style='background:var(--bright-white,#fff)'> </span> <span class="d"><span class="b">echo</span> <span class="g">'PORT={{ branch | hash_port }}'</span> <span class="c">></span> .env.local</span><span class="c">❯</span> Allow and remember? <b>[y/N]</b>diff --git a/docs/content/hook.md b/docs/content/hook.mdindex 76858f787..990643d2f 100644--- a/docs/content/hook.md+++ b/docs/content/hook.md@@ -18,21 +18,23 @@ Hooks are shell commands that run at key points in the worktree lifecycle — au| Event | `pre-` — blocking | `post-` — background ||-------|-------------------|---------------------|| **switch** | `pre-switch` | `post-switch` |-| **start** | `pre-start` | `post-start` |+| **create** | `pre-create` | `post-create` || **commit** | `pre-commit` | `post-commit` || **merge** | `pre-merge` | `post-merge` || **remove** | `pre-remove` | `post-remove` |`pre-*` hooks block — failure aborts the operation. `post-*` hooks run in the background with output logged (use [`wt config state logs`](@/config.md#wt-config-state-logs) to find and manage log files). Use `-v` to see expanded command details for background hooks.-The most common starting point is `post-start` — it runs background tasks (dev servers, file copying, builds) without blocking worktree creation. Prefer `post-start` over `pre-start` unless a later step needs the work completed first.+The most common creation hook is `post-create` — it runs background tasks (dev servers, file copying, builds) without blocking worktree creation. Prefer `post-create` over `pre-create` unless a later step needs the work completed first.++`pre-start`/`post-start` are accepted as deprecated aliases for the renamed `pre-create`/`post-create` hooks, in config and on the command line. The [hook rename plan](https://github.com/max-sixty/worktrunk/issues/2838) tracks the deprecation.| Hook | Purpose ||------|---------|| `pre-switch` | Runs before branch resolution or worktree creation. `{{ branch }}` is the destination as typed (before resolution) || `post-switch` | Triggers on all switch results: creating, switching to existing, or staying on current |-| `pre-start` | Runs once when a new worktree is created, blocking `post-start`/`--execute` until complete: dependency install, env file generation |-| `post-start` | Runs once when a new worktree is created, in the background: dev servers, long builds, file watchers, copying caches |+| `pre-create` | Runs once when a new worktree is created, blocking `post-create`/`--execute` until complete: dependency install, env file generation |+| `post-create` | Runs once when a new worktree is created, in the background: dev servers, long builds, file watchers, copying caches || `pre-commit` | Formatters, linters, type checking — runs during `wt merge` before the squash commit || `post-commit` | CI triggers, notifications, background linting || `pre-merge` | Tests, security scans, build verification — runs after rebase, before merge to target |@@ -49,11 +51,11 @@ Project commands require approval on first run:{% terminal() %}<span class="y">▲ <b>repo</b> needs approval to execute <b>3</b> commands:</span>-<span class="d">○</span> pre-start <b>install</b>:+<span class="d">○</span> pre-create <b>install</b>:<span style='background:var(--bright-white,#fff)'> </span> <span class="d"><span class="b">npm</span> ci</span>-<span class="d">○</span> pre-start <b>build</b>:+<span class="d">○</span> pre-create <b>build</b>:<span style='background:var(--bright-white,#fff)'> </span> <span class="d"><span class="b">cargo</span> build <span class="c">--release</span></span>-<span class="d">○</span> pre-start <b>env</b>:+<span class="d">○</span> pre-create <b>env</b>:<span style='background:var(--bright-white,#fff)'> </span> <span class="d"><span class="b">echo</span> <span class="g">'PORT={{ branch | hash_port }}'</span> <span class="c">></span> .env.local</span><span class="c">❯</span> Allow and remember? <b>[y/N]</b>@@ -78,13 +80,13 @@ Hooks take one of three forms, determined by their TOML shape.A string is a single command:```toml-pre-start = "npm install"+pre-create = "npm install"```A table is multiple commands that run concurrently:```toml-[post-start]+[post-create]server = "npm run dev"watch = "npm run watch"```@@ -92,10 +94,10 @@ watch = "npm run watch"A pipeline is a sequence of `[[hook]]` blocks run in order. Each block is one step; multiple keys within a block run concurrently. A failing step aborts the rest of the pipeline:```toml-[[post-start]]+[[post-create]]install = "npm ci"-[[post-start]]+[[post-create]]build = "npm run build"server = "npm run dev"```@@ -143,7 +145,7 @@ Hooks can use template variables that expand at runtime:| | `{{ remote }}` | Primary remote name || | `{{ remote_url }}` | Remote URL || exec | `{{ cwd }}` | Directory where the hook command runs |-| | `{{ hook_type }}` | Hook type being run (e.g. `pre-start`, `pre-merge`) |+| | `{{ hook_type }}` | Hook type being run (e.g. `pre-create`, `pre-merge`) || | `{{ hook_name }}` | Hook command name (if named) || | `{{ args }}` | Tokens forwarded from the CLI — see [Running Hooks Manually](#running-hooks-manually) || user | `{{ vars.<key> }}` | Per-branch variables from [`wt config state vars`](@/config.md#wt-config-state-vars) |@@ -157,12 +159,12 @@ Bare variables (`branch`, `worktree_path`, `commit`) refer to the branch the ope| merge | feature being merged | = bare vars | merge target || remove | branch being removed | = bare vars | where you end up |-Pre and post hooks share the same perspective — `{{ branch | hash_port }}` produces the same port in `post-start` and `post-remove`. `cwd` is the worktree root where the hook command runs. It differs from `worktree_path` in three cases: pre-switch, where the hook runs in the source but `worktree_path` is the destination; post-remove, where the active worktree is gone so the hook runs in primary; and post-merge with removal, same — the active worktree is gone, so the hook runs in target.+Pre and post hooks share the same perspective — `{{ branch | hash_port }}` produces the same port in `post-create` and `post-remove`. `cwd` is the worktree root where the hook command runs. It differs from `worktree_path` in three cases: pre-switch, where the hook runs in the source but `worktree_path` is the destination; post-remove, where the active worktree is gone so the hook runs in primary; and post-merge with removal, same — the active worktree is gone, so the hook runs in target.-Some variables are conditional: `upstream` requires remote tracking; `base` only appears in switch/create hooks; `target_worktree_path` requires the target to have a worktree; `pr_number`/`pr_url` are populated for `post-switch`, `pre-start`, and `post-start` hooks when creating via `pr:N` or `mr:N`; `vars` keys may not exist. Undefined variables error — use conditionals or defaults for optional behavior:+Some variables are conditional: `upstream` requires remote tracking; `base` only appears in switch/create hooks; `target_worktree_path` requires the target to have a worktree; `pr_number`/`pr_url` are populated for `post-switch`, `pre-create`, and `post-create` hooks when creating via `pr:N` or `mr:N`; `vars` keys may not exist. Undefined variables error — use conditionals or defaults for optional behavior:```toml-[pre-start]+[pre-create]# Rebase onto upstream if tracking a remote branch (e.g., wt switch --create feature origin/feature)sync = "{% if upstream %}git fetch && git rebase {{ upstream }}{% endif %}"```@@ -172,7 +174,7 @@ Run any hook-firing command with `-v` to see the resolved variables for the actuVariables use dot access and the `default` filter for missing keys. JSON object/array values are parsed automatically, so `{{ vars.config.port }}` works when the value is `{"port": 3000}`:```toml-[post-start]+[post-create]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.config.port | default('3000') }}"```@@ -221,7 +223,7 @@ worktree-path = "{{ repo_path }}/../{{ repo_path | dirname | basename }}.{{ branThe `hash_port` filter is useful for running dev servers on unique ports per worktree:```toml-[post-start]+[post-create]dev = "npm run dev -- --host {{ branch }}.localhost --port {{ branch | hash_port }}"```@@ -245,7 +247,7 @@ Templates also support functions for dynamic lookups:The `worktree_path_of_branch` function returns the filesystem path of a worktree given a branch name, or an empty string if no worktree exists for that branch. This is useful for referencing files in other worktrees:```toml-[pre-start]+[pre-create]# Copy config from main worktreesetup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_path }}"```@@ -255,8 +257,8 @@ setup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_pathHooks receive all template variables as JSON on stdin, enabling complex logic that templates can't express:```toml-[pre-start]-setup = "python3 scripts/pre-start-setup.py"+[pre-create]+setup = "python3 scripts/pre-create-setup.py"``````python@@ -271,7 +273,7 @@ if ctx['branch'].startswith('feature/') and 'backend' in ctx['repo']:One specific command worth calling out: [`wt step copy-ignored`](@/step.md#wt-step-copy-ignored). Git worktrees share the repository but not untracked files, and this copies gitignored files between worktrees:```toml-[post-start]+[post-create]copy = "wt step copy-ignored"```@@ -279,7 +281,7 @@ copy = "wt step copy-ignored"`wt hook <type>` runs hooks on demand — useful for testing during development, running in CI pipelines, or re-running after a failure.-{{ terminal(cmd="wt hook pre-merge # Run all pre-merge hooks|||wt hook pre-merge test # Run hooks named __WT_QUOT__test__WT_QUOT__ from both sources|||wt hook pre-merge test build # Run hooks named __WT_QUOT__test__WT_QUOT__ and __WT_QUOT__build__WT_QUOT__|||wt hook pre-merge user: # Run all user hooks|||wt hook pre-merge project: # Run all project hooks|||wt hook pre-merge user:test # Run only user's __WT_QUOT__test__WT_QUOT__ hook|||wt hook pre-merge --yes # Skip approval prompts (for CI)|||wt hook pre-start --branch=feature/test # Override a template variable|||wt hook pre-merge -- --extra args # Forward tokens into __WT_OPEN__ args __WT_CLOSE__") }}+{{ terminal(cmd="wt hook pre-merge # Run all pre-merge hooks|||wt hook pre-merge test # Run hooks named __WT_QUOT__test__WT_QUOT__ from both sources|||wt hook pre-merge test build # Run hooks named __WT_QUOT__test__WT_QUOT__ and __WT_QUOT__build__WT_QUOT__|||wt hook pre-merge user: # Run all user hooks|||wt hook pre-merge project: # Run all project hooks|||wt hook pre-merge user:test # Run only user's __WT_QUOT__test__WT_QUOT__ hook|||wt hook pre-merge --yes # Skip approval prompts (for CI)|||wt hook pre-create --branch=feature/test # Override a template variable|||wt hook pre-merge -- --extra args # Forward tokens into __WT_OPEN__ args __WT_CLOSE__") }}The `user:` and `project:` prefixes filter by source. Use `user:` or `project:` alone to run all hooks from that source, or `user:name` / `project:name` to run a specific hook.@@ -302,8 +304,8 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finFinished dev [unoptimized + debuginfo] target(s) in 1.23s{% end %}-{% terminal(cmd="wt hook post-start") %}-◎ Running post-start: project @ ~/acme+{% terminal(cmd="wt hook post-create") %}+◎ Running post-create: project @ ~/acme{% end %}## Passing values@@ -316,16 +318,16 @@ The long form `--var KEY=VALUE` is deprecated but still supported. It force-bind# Recipes-- [Eliminate cold starts](@/tips-patterns.md#eliminate-cold-starts): `wt step copy-ignored` in `post-start` shares build caches and dependencies; use a `[[post-start]]` pipeline when a later hook depends on the copy-- [Dev server per worktree](@/tips-patterns.md#dev-server-per-worktree): `wt step tether` in `post-start` runs the dev server and kills its whole process group when the worktree is removed, with optional subdomain routing-- [Database per worktree](@/tips-patterns.md#database-per-worktree): a `post-start` pipeline stores container name, port, and connection string as [per-branch vars](@/config.md#wt-config-state-vars) that later hooks reference+- [Eliminate cold starts](@/tips-patterns.md#eliminate-cold-starts): `wt step copy-ignored` in `post-create` shares build caches and dependencies; use a `[[post-create]]` pipeline when a later hook depends on the copy+- [Dev server per worktree](@/tips-patterns.md#dev-server-per-worktree): `wt step tether` in `post-create` runs the dev server and kills its whole process group when the worktree is removed, with optional subdomain routing+- [Database per worktree](@/tips-patterns.md#database-per-worktree): a `post-create` pipeline stores container name, port, and connection string as [per-branch vars](@/config.md#wt-config-state-vars) that later hooks reference- [Progressive validation](@/tips-patterns.md#progressive-validation): quick lint/typecheck in `pre-commit`, expensive tests and builds in `pre-merge`- [Target-specific hooks](@/tips-patterns.md#target-specific-hooks): branch on `{{ target }}` in `post-merge` for per-environment deploys## See also- [`wt merge`](@/merge.md) — Runs hooks automatically during merge-- [`wt switch`](@/switch.md) — Runs pre-start/post-start hooks on `--create`+- [`wt switch`](@/switch.md) — Runs pre-create/post-create hooks on `--create`- [`wt config approvals`](@/config.md#wt-config-approvals) — Manage approvals- [`wt config state logs`](@/config.md#wt-config-state-logs) — Access background hook logs@@ -340,8 +342,8 @@ Usage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span<b><span class=c>show</span></b> Show configured hooks<b><span class=c>pre-switch</span></b> Run pre-switch hooks<b><span class=c>post-switch</span></b> Run post-switch hooks- <b><span class=c>pre-start</span></b> Run pre-start hooks- <b><span class=c>post-start</span></b> Run post-start hooks+ <b><span class=c>pre-create</span></b> Run pre-create hooks+ <b><span class=c>post-create</span></b> Run post-create hooks<b><span class=c>pre-commit</span></b> Run pre-commit hooks<b><span class=c>post-commit</span></b> Run post-commit hooks<b><span class=c>pre-merge</span></b> Run pre-merge hooksdiff --git a/docs/content/step.md b/docs/content/step.mdindex e7567dee0..1e657a8a7 100644--- a/docs/content/step.md+++ b/docs/content/step.md@@ -348,7 +348,7 @@ Add to the project config:```toml# .config/wt.toml-[post-start]+[post-create]copy = "wt step copy-ignored"```@@ -400,7 +400,7 @@ Reflink copies share disk blocks until modified — no data is actually copied.Uses per-file reflink (like `cp -Rc`) — copy time scales with file count.-Use the `post-start` hook so the copy runs in the background. Use `pre-start` instead if subsequent hooks or `--execute` command need the copied files immediately.+Use the `post-create` hook so the copy runs in the background. Use `pre-create` instead if subsequent hooks or `--execute` command need the copied files immediately.### Background-hook priority (experimental)@@ -419,7 +419,7 @@ The `target/` directory is huge (often 1-10GB). Copying with reflink cuts first`node_modules/` is large but mostly static. If the project has no native dependencies, symlinks are even faster:```toml-[pre-start]+[pre-create]deps = "ln -sf {{ primary_worktree_path }}/node_modules ."```@@ -906,7 +906,7 @@ Run a command; kill its whole process tree when its worktree is removed. Teardow### Why-A `post-start` hook to start a long-lived process and a `pre-remove` hook to+A `post-create` hook to start a long-lived process and a `pre-remove` hook tostop it is usually enough. But `pre-remove` only runs when worktrunk removesthe worktree, so a `git worktree remove`, an `rm -rf`, or a crashed hook skipsit. Across enough worktree churn some process is bound to outlive its worktree,@@ -931,7 +931,7 @@ Run a dev server, torn down automatically when the worktree goes away:```toml# .config/wt.toml-[post-start]+[post-create]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"```diff --git a/docs/content/switch.md b/docs/content/switch.mdindex 40bcfc06b..6b5531c02 100644--- a/docs/content/switch.md+++ b/docs/content/switch.md@@ -35,8 +35,8 @@ If the branch already has a worktree, `wt switch` changes directories to it. Oth1. Runs [pre-switch hooks](@/hook.md#hook-types), blocking until complete2. Creates worktree at configured path3. Switches to new directory-4. Runs [pre-start hooks](@/hook.md#hook-types), blocking until complete-5. Spawns [post-start](@/hook.md#hook-types) and [post-switch hooks](@/hook.md#hook-types) in the background+4. Runs [pre-create hooks](@/hook.md#hook-types), blocking until complete+5. Spawns [post-create](@/hook.md#hook-types) and [post-switch hooks](@/hook.md#hook-types) in the background{{ terminal(cmd="wt switch feature # Existing branch → creates worktree|||wt switch --create feature # New branch and worktree|||wt switch --create fix --base release # New branch from release|||wt switch --create temp --no-hooks # Skip hooks") }}diff --git a/docs/content/tips-patterns.md b/docs/content/tips-patterns.mdindex b62694563..b3d2a9099 100644--- a/docs/content/tips-patterns.md+++ b/docs/content/tips-patterns.md@@ -47,7 +47,7 @@ Each worktree runs its own dev server on a deterministic port. The `hash_port` f```toml# .config/wt.toml-[post-start]+[post-create]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"[list]@@ -80,7 +80,7 @@ Ports are deterministic: `fix-auth` always gets port 16460, regardless of whichEach worktree can have its own isolated database. A pipeline sets up names and ports as [vars](@/config.md#wt-config-state-vars), then later steps and hooks reference them:```toml-[[post-start]]+[[post-create]]set-vars = """wt config state vars set \container='{{ repo }}-{{ branch | sanitize }}-postgres' \@@ -88,7 +88,7 @@ wt config state vars set \db_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'"""-[[post-start]]+[[post-create]]db = """docker run -d --rm \--name {{ vars.container }} \@@ -115,21 +115,21 @@ The connection string is accessible anywhere — not just in hooks:Use [`wt step copy-ignored`](@/step.md#wt-step-copy-ignored) to copy gitignored files (caches, dependencies, `.env`) between worktrees:```toml-[post-start]+[post-create]copy = "wt step copy-ignored"```-When another hook depends on the copy — for example, copying `node_modules/` before `pnpm install` so the install reuses cached packages — sequence them with a `[[post-start]]` pipeline:+When another hook depends on the copy — for example, copying `node_modules/` before `pnpm install` so the install reuses cached packages — sequence them with a `[[post-create]]` pipeline:```toml-[[post-start]]+[[post-create]]copy = "wt step copy-ignored"-[[post-start]]+[[post-create]]install = "pnpm install"```-Use `pre-start` instead when an `--execute` command needs the copied files immediately.+Use `pre-create` instead when an `--execute` command needs the copied files immediately.All gitignored files are copied by default. To limit what gets copied, create `.worktreeinclude` with patterns — files must be both gitignored and listed. See [`wt step copy-ignored`](@/step.md#wt-step-copy-ignored) for details.@@ -208,7 +208,7 @@ Worktrunk maintains useful state. Default branch [detection](@/config.md#wt-confReference Taskfile/Justfile/Makefile in hooks:```toml-[pre-start]+[pre-create]"setup" = "task install"[pre-merge]@@ -284,7 +284,7 @@ Each worktree gets its own tmux session with a multi-pane layout.```toml# .config/wt.toml-[pre-start]+[pre-create]tmux = """S={{ branch | sanitize }}W={{ worktree_path }}@@ -336,7 +336,7 @@ b=$(wt switch)[ -n "$b" ] && wt switch "$b""""-[pre-start]+[pre-create]cmux = "cmux new-workspace --name {{ repo | sanitize }}/{{ branch | sanitize }} --cwd {{ worktree_path }} --focus true"[pre-switch]@@ -389,7 +389,7 @@ Clean URLs like `http://feature-auth.myproject.localhost` without port numbers.```toml# .config/wt.toml-[post-start]+[post-create]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"proxy = """curl -sf --max-time 0.5 http://localhost:2019/config/ || caddy start@@ -410,7 +410,7 @@ url = "http://{{ branch | sanitize }}.{{ repo }}.localhost:8080"**How it works:**-1. `wt switch --create feature-auth` runs the `post-start` hook, starting the dev server on a deterministic port (`{{ branch | hash_port }}` → 16460)+1. `wt switch --create feature-auth` runs the `post-create` hook, starting the dev server on a deterministic port (`{{ branch | hash_port }}` → 16460)2. The hook starts Caddy if needed and registers a route using the same port: `feature-auth.myproject` → `localhost:16460`3. `*.localhost` resolves to `127.0.0.1` via the OS4. Visiting `http://feature-auth.myproject.localhost:8080`: Caddy matches the subdomain and proxies to the dev server@@ -419,9 +419,9 @@ url = "http://{{ branch | sanitize }}.{{ repo }}.localhost:8080"Follow background hook output in real-time:-{{ terminal(cmd="tail -f __WT_QUOT__$(wt config state logs get --hook=user:post-start:server)__WT_QUOT__") }}+{{ terminal(cmd="tail -f __WT_QUOT__$(wt config state logs get --hook=user:post-create:server)__WT_QUOT__") }}-The `--hook` format is `source:hook-type:name` — e.g., `project:post-start:build` for project-defined hooks. Use `wt config state logs get` to list all available logs.+The `--hook` format is `source:hook-type:name` — e.g., `project:post-create:build` for project-defined hooks. Use `wt config state logs get` to list all available logs.Create an alias for frequent use:diff --git a/docs/content/worktrunk.md b/docs/content/worktrunk.mdindex 3ddd4134c..afe332496 100644--- a/docs/content/worktrunk.md+++ b/docs/content/worktrunk.md@@ -198,7 +198,7 @@ For parallel agents, create multiple worktrees and launch an agent in each:{{ terminal(cmd="wt switch -x claude -c feature-a -- 'Add user authentication'|||wt switch -x claude -c feature-b -- 'Fix the pagination bug'|||wt switch -x claude -c feature-c -- 'Write tests for the API'") }}-The `-x` flag runs a command after switching; arguments after `--` are passed to it. Configure [post-start hooks](@/hook.md#hook-types) to automate setup (install deps, start dev servers).+The `-x` flag runs a command after switching; arguments after `--` are passed to it. Configure [post-create hooks](@/hook.md#hook-types) to automate setup (install deps, start dev servers).## Next stepsdiff --git a/docs/demos/build b/docs/demos/buildindex efec63387..49563ecdd 100755--- a/docs/demos/build+++ b/docs/demos/build@@ -126,7 +126,7 @@ def prepare_with_hooks(env: DemoEnv, include_deps: bool = False):dev_cmd = "npm run dev -- --port {{ branch | hash_port }}"cleanup_cmd = "flyctl scale count 0"- post_start = ["[post-start]"]+ post_start = ["[post-create]"]approved = []if include_deps:post_start.append('deps = "npm install"')@@ -157,7 +157,7 @@ def prepare_merge_demo(def prepare_switch(env: DemoEnv):"""Switch demo with Claude Code UI."""dev_cmd = "npm run dev -- --port {{ branch | hash_port }}"- hooks_config = f"""[post-start]+ hooks_config = f"""[post-create]copy = "wt step copy-ignored"dev = "{dev_cmd}""""@@ -184,7 +184,7 @@ dev = "{dev_cmd}"def prepare_devserver(env: DemoEnv):"""Setup for wt-devserver demo - shows URL column in wt list."""dev_cmd = "npm run dev -- --port {{ branch | hash_port }}"- hooks_config = f'''[post-start]+ hooks_config = f'''[post-create]dev = "{dev_cmd}"[list]@@ -211,7 +211,7 @@ fidef prepare_zellij_omnibus(env: DemoEnv):"""Setup for wt-zellij-omnibus demo - comprehensive showcase."""- hooks_config = """[post-start]+ hooks_config = """[post-create]dev = "npm run dev -- --port {{ branch | hash_port }}"[pre-merge]diff --git a/docs/demos/snapshots/wt-core.snap b/docs/demos/snapshots/wt-core.snapindex 6b8410665..6df1b3e19 100644--- a/docs/demos/snapshots/wt-core.snap+++ b/docs/demos/snapshots/wt-core.snap@@ -13,7 +13,7 @@ $ wt switch alpha[0m$ wt switch --create api✓ Created branch api from main and worktree @ <DEMO_DIR>/.demo-wt-core/w/acme.api-◎ Running post-start: project:dev+◎ Running post-create: project:dev[0m$ wt list --full[1mBranch[0m [1mStatus[0m [1mHEAD±[0m [1mmain↕[0m [1mmain…±[0m [1mRemote⇅[0m [1mCI[0m [1mCommit[0m [1mAge[0mdiff --git a/docs/demos/tapes/wt-core.tape b/docs/demos/tapes/wt-core.tapeindex b21bd876c..b4271a12b 100644--- a/docs/demos/tapes/wt-core.tape+++ b/docs/demos/tapes/wt-core.tape@@ -20,7 +20,7 @@ Type "wt switch alpha"EnterSleep 1s-# 3. Create new worktree with post-start+# 3. Create new worktree with post-createType "wt switch --create api"EnterSleep 2.5sdiff --git a/docs/demos/tapes/wt-devserver.tape b/docs/demos/tapes/wt-devserver.tapeindex 11e4abd6d..35b73abe5 100644--- a/docs/demos/tapes/wt-devserver.tape+++ b/docs/demos/tapes/wt-devserver.tape@@ -10,7 +10,7 @@ Sleep 1sShowSleep 500ms-# Show the config: post-start hooks + URL template+# Show the config: post-create hooks + URL templateType "cat .config/wt.toml"EnterSleep 2sdiff --git a/docs/demos/tapes/wt-hooks.tape b/docs/demos/tapes/wt-hooks.tapeindex 8caa88bda..51990e270 100644--- a/docs/demos/tapes/wt-hooks.tape+++ b/docs/demos/tapes/wt-hooks.tape@@ -10,12 +10,12 @@ Sleep 1sShowSleep 500ms-# Show the hooks config (3 hooks: post-start deps+dev, pre-remove cleanup)+# Show the hooks config (3 hooks: post-create deps+dev, pre-remove cleanup)Type "cat .config/wt.toml"EnterSleep 3s-# Create a new worktree - shows post-start hook running+# Create a new worktree - shows post-create hook runningType "wt switch --create feature"EnterSleep 3sdiff --git a/docs/demos/tapes/wt-switch.tape b/docs/demos/tapes/wt-switch.tapeindex 07108aa60..fb1eb9ca8 100644--- a/docs/demos/tapes/wt-switch.tape+++ b/docs/demos/tapes/wt-switch.tape@@ -21,7 +21,7 @@ Type "wt switch alpha"EnterSleep 1.5s-# Create new worktree (runs post-start hooks)+# Create new worktree (runs post-create hooks)Type "wt switch --create api"EnterSleep 1.5sdiff --git a/docs/demos/tapes/wt-zellij-omnibus.tape b/docs/demos/tapes/wt-zellij-omnibus.tapeindex 76951c324..986b0ac30 100644--- a/docs/demos/tapes/wt-zellij-omnibus.tape+++ b/docs/demos/tapes/wt-zellij-omnibus.tape@@ -22,7 +22,7 @@ Output "{{OUTPUT_GIF}}"# - wt list / wt list --full (URLs, CI status, diff stats)# - wt switch (interactive picker)# - wsl abbreviation (wt switch --execute=claude --create)-# - wt switch --create (with post-start hooks)+# - wt switch --create (with post-create hooks)# - wt step commit (LLM commit message, standalone)# - wt merge (on uncommitted work - commits, rebases, merges, cleans up)# - wt remove (cleanup)@@ -101,7 +101,7 @@ Sleep 200msType "tn"Sleep 2s-# wt switch --create - shows post-start hooks running+# wt switch --create - shows post-create hooks runningType "wt switch --create feature"EnterSleep 4.5sdiff --git a/docs/static/.well-known/agent-skills/index.json b/docs/static/.well-known/agent-skills/index.jsonindex cb0358473..3185c3578 100644--- a/docs/static/.well-known/agent-skills/index.json+++ b/docs/static/.well-known/agent-skills/index.json@@ -4,9 +4,9 @@{"name": "worktrunk","type": "skill-md",- "description": "Guidance for Worktrunk (the `wt` CLI) — git worktree management, hooks, and config. Load when editing .config/wt.toml or ~/.config/worktrunk/config.toml; adding, modifying, or debugging hooks (post-merge, post-start, pre-commit, pre-merge, post-switch, etc.); configuring commit message generation or command aliases; or troubleshooting wt behavior. Also answers general worktrunk/wt questions.",+ "description": "Guidance for Worktrunk (the `wt` CLI) — git worktree management, hooks, and config. Load when editing .config/wt.toml or ~/.config/worktrunk/config.toml; adding, modifying, or debugging hooks (post-merge, post-create, pre-commit, pre-merge, post-switch, etc.); configuring commit message generation or command aliases; or troubleshooting wt behavior. Also answers general worktrunk/wt questions.","url": "./worktrunk/SKILL.md",- "digest": "sha256:50f164a054e60d7f9bac2fc57f700693118ece6ae29482a11b50cd69733fda90"+ "digest": "sha256:b929448a3425ceb32eae20b433e512e8498f54cf04a1f571c8c1ae79b17412db"}]}diff --git a/flake.nix b/flake.nixindex 4c7d7c380..3ec28ed28 100644--- a/flake.nix+++ b/flake.nix@@ -184,7 +184,7 @@inherit cargoArtifacts;src = pkgs.lib.cleanSource ./.;# Tests shell out to a few host tools — `git` for the harness,- # `python3` for argv-quoting and post-start fixtures, `ps`+ # `python3` for argv-quoting and post-create fixtures, `ps`# (procps) for the pgid invariant test. Without these on PATH# the sandbox surfaces them as `No such file or directory`.nativeBuildInputs = commonArgs.nativeBuildInputs ++ [diff --git a/plugins/worktrunk/README.md b/plugins/worktrunk/README.mdindex 98937bbeb..ff8ad9ebb 100644--- a/plugins/worktrunk/README.md+++ b/plugins/worktrunk/README.md@@ -4,7 +4,7 @@ Git worktree management CLI integration with activity tracking.## Features-1. **Configuration skill** — Guides LLM-powered commit message setup, project hooks (pre-start, pre-merge), and worktree path customization+1. **Configuration skill** — Guides LLM-powered commit message setup, project hooks (pre-create, pre-merge), and worktree path customization2. **Activity tracking** — Shows which branches have active Claude sessions via indicators in `wt list`3. **`/wt-switch-create` command** — Creates a worktrunk worktree and moves the current Claude session into it@@ -20,7 +20,7 @@ These markers appear in `wt list` output, making it easy to see which worktreesThe configuration skill guides through configuring an AI tool (Claude Code, Codex, llm, or aichat) and adding `[commit.generation]` to the user config so `wt merge` can auto-generate commit messages.-**Add pre-start hooks to run npm install automatically**+**Add pre-create hooks to run npm install automatically**The skill configures `.config/wt.toml` with project hooks. Pre-start hooks run when creating worktrees, pre-merge hooks validate before merging.diff --git a/skills/worktrunk/SKILL.md b/skills/worktrunk/SKILL.mdindex 55fc0f66c..4be55ab7c 100644--- a/skills/worktrunk/SKILL.md+++ b/skills/worktrunk/SKILL.md@@ -1,6 +1,6 @@---name: worktrunk-description: Guidance for Worktrunk (the `wt` CLI) — git worktree management, hooks, and config. Load when editing .config/wt.toml or ~/.config/worktrunk/config.toml; adding, modifying, or debugging hooks (post-merge, post-start, pre-commit, pre-merge, post-switch, etc.); configuring commit message generation or command aliases; or troubleshooting wt behavior. Also answers general worktrunk/wt questions.+description: Guidance for Worktrunk (the `wt` CLI) — git worktree management, hooks, and config. Load when editing .config/wt.toml or ~/.config/worktrunk/config.toml; adding, modifying, or debugging hooks (post-merge, post-create, pre-commit, pre-merge, post-switch, etc.); configuring commit message generation or command aliases; or troubleshooting wt behavior. Also answers general worktrunk/wt questions.license: MIT OR Apache-2.0compatibility: Requires the `wt` CLI (https://worktrunk.dev)---@@ -37,7 +37,7 @@ Worktrunk uses two separate config files with different scopes and behaviors:### Project Config (`.config/wt.toml`)- **Scope**: Team-wide automation shared by all developers- **Location**: `<repo>/.config/wt.toml` (checked into git)-- **Contains**: Hooks for worktree lifecycle (pre-start, pre-merge, etc.)+- **Contains**: Hooks for worktree lifecycle (pre-create, pre-merge, etc.)- **Permission model**: Proactive (create directly, changes are reversible via git)- **See**: `reference/hook.md` for detailed guidance@@ -105,9 +105,9 @@ Common request for workflow automation. Follow discovery process:- For Python: Check pyproject.toml3. **Design appropriate hooks** (7 hook types available)- - Dependencies (fast, must complete) → `pre-start`+ - Dependencies (fast, must complete) → `pre-create`- Tests/linting (must pass) → `pre-commit` or `pre-merge`- - Long builds, dev servers → `post-start`+ - Long builds, dev servers → `post-create`- Terminal/IDE updates → `post-switch`- Deployment → `post-merge`- Cleanup tasks → `pre-remove`@@ -121,7 +121,7 @@ Common request for workflow automation. Follow discovery process:5. **Create `.config/wt.toml`**```toml# Install dependencies when creating worktrees- pre-start = "npm install"+ pre-create = "npm install"# Validate code quality before committing[pre-commit]@@ -148,8 +148,8 @@ When users want to add automation to an existing project:1. **Read existing config**: `cat .config/wt.toml`2. **Determine hook type** - When should this run?- - Creating worktree (blocking) → `pre-start`- - Creating worktree (background) → `post-start`+ - Creating worktree (blocking) → `pre-create`+ - Creating worktree (background) → `post-create`- Every switch → `post-switch`- Before committing → `pre-commit`- Before merging → `pre-merge`@@ -161,10 +161,10 @@ When users want to add automation to an existing project:Single command to named table:```toml# Before- pre-start = "npm install"+ pre-create = "npm install"# After (adding db:migrate)- [pre-start]+ [pre-create]install = "npm install"migrate = "npm run db:migrate"```@@ -241,7 +241,7 @@ Load **reference files** for detailed configuration, hook specifications, and trFind specific sections with grep:```bashgrep -A 20 "## Setup" reference/llm-commits.md-grep -A 30 "### pre-start" reference/hook.md+grep -A 30 "### pre-create" reference/hook.mdgrep -A 20 "## Warning Messages" reference/shell-integration.md```@@ -312,6 +312,6 @@ You are working in `/abs/path/to/worktrunk.<branch>` on branch `<branch>`.All edits must stay in that worktree.```-`--no-cd` skips the shell-integration cd script the parent can't consume; `--no-hooks` is appropriate when each sub-Agent will run its own build/test step (e.g. `cargo run -- hook pre-merge --yes`) and you don't need post-start setup repeated per worktree.+`--no-cd` skips the shell-integration cd script the parent can't consume; `--no-hooks` is appropriate when each sub-Agent will run its own build/test step (e.g. `cargo run -- hook pre-merge --yes`) and you don't need post-create setup repeated per worktree.-**Do not** use `Agent { isolation: "worktree" }` for this. Claude Code passes its internal agent ID as `name` to the `WorktreeCreate` hook, so `wt` creates the worktree as `worktrunk.agent-<id>` on a throwaway branch. If the sub-Agent then creates a feature branch on top, you end up with non-canonical paths, orphan branches, and post-start hooks fired against the wrong branch. Pre-creating with `wt switch --create` keeps path, branch, and hook target aligned.+**Do not** use `Agent { isolation: "worktree" }` for this. Claude Code passes its internal agent ID as `name` to the `WorktreeCreate` hook, so `wt` creates the worktree as `worktrunk.agent-<id>` on a throwaway branch. If the sub-Agent then creates a feature branch on top, you end up with non-canonical paths, orphan branches, and post-create hooks fired against the wrong branch. Pre-creating with `wt switch --create` keeps path, branch, and hook target aligned.diff --git a/skills/worktrunk/reference/claude-code.md b/skills/worktrunk/reference/claude-code.mdindex a8fe8cb15..1b0f68177 100644--- a/skills/worktrunk/reference/claude-code.md+++ b/skills/worktrunk/reference/claude-code.md@@ -61,7 +61,7 @@ Gemini loads the extension natively from the repository, so there is no `wt` wraThe plugin includes a skill — documentation the agent can read — covering Worktrunk's configuration system. After installation, the agent can help with:- Setting up LLM-generated commit messages-- Adding project hooks (pre-start, pre-merge, pre-commit)+- Adding project hooks (pre-create, pre-merge, pre-commit)- Configuring worktree path templates- Fixing shell integration issuesdiff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.mdindex 74eaf8cda..af52e7096 100644--- a/skills/worktrunk/reference/config.md+++ b/skills/worktrunk/reference/config.md@@ -51,7 +51,7 @@ command = "CLAUDECODE= MAX_THINKING_TOKENS=0 claude -p --no-session-persistence```toml# .config/wt.toml-[pre-start]+[pre-create]deps = "npm ci"[pre-merge]@@ -268,28 +268,28 @@ worktree-path = ".worktrees/{{ branch | sanitize }}"list.full = truemerge.squash = falseremove.delete-branch = false-pre-start.env = "cp .env.example .env"+pre-create.env = "cp .env.example .env"step.copy-ignored.exclude = [".repo-local-cache/"]aliases.deploy = "make deploy BRANCH={{ branch }}"```-Hooks support all three [hook forms](https://worktrunk.dev/hook/#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:+Hooks support all three [hook forms](https://worktrunk.dev/hook/#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` table the same way:```toml# Single command[projects."github.com/user/repo"]-post-start = "mise trust"+post-create = "mise trust"# Multiple commands, running concurrently-[projects."github.com/user/repo".post-start]+[projects."github.com/user/repo".post-create]mise = "mise trust"server = "npm run dev"# Pipeline: steps run in sequence-[[projects."github.com/user/repo".post-start]]+[[projects."github.com/user/repo".post-create]]install = "npm ci"-[[projects."github.com/user/repo".post-start]]+[[projects."github.com/user/repo".post-create]]build = "npm run build"server = "npm run dev"```@@ -434,8 +434,8 @@ To create a starter file with commented-out examples, run `wt config create --prProject hooks apply to this repository only. See [`wt hook`](https://worktrunk.dev/hook/) for hook types, execution order, and examples.```toml-pre-start = "npm ci"-post-start = "npm run dev"+pre-create = "npm ci"+post-create = "npm run dev"pre-merge = "npm test"```@@ -951,7 +951,7 @@ Hook output lives in per-branch subtrees under `.git/wt/logs/{branch}/`:| Background hooks | `{branch}/{source}/{hook-type}/{name}.log` || Background removal | `{branch}/internal/remove.log` |-All `post-*` hooks (post-start, post-switch, post-commit, post-merge) run in the background and produce log files. Source is `user` or `project`. Branch and hook names are sanitized for filesystem safety (invalid characters → `-`; short collision-avoidance hash appended). Same operation on same branch overwrites the previous log. Removing a branch clears its subtree; orphans from deleted branches can be swept with `wt config state logs clear`.+All `post-*` hooks (post-create, post-switch, post-commit, post-merge) run in the background and produce log files. Source is `user` or `project`. Branch and hook names are sanitized for filesystem safety (invalid characters → `-`; short collision-avoidance hash appended). Same operation on same branch overwrites the previous log. Removing a branch clears its subtree; orphans from deleted branches can be swept with `wt config state logs clear`.#### Diagnostic files@@ -983,9 +983,9 @@ Query the command log:$ tail -5 .git/wt/logs/commands.jsonl | jq .```-Path to one hook log (e.g. the `post-start` `server` hook for the current branch):+Path to one hook log (e.g. the `post-create` `server` hook for the current branch):```bash-$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-start" and (.name | startswith("server"))) | .path'+$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-create" and (.name | startswith("server"))) | .path'```Logs for a specific branch:@@ -1201,7 +1201,7 @@ $ wt config state vars set env=production --branch=mainVariables are available in [hook templates](https://worktrunk.dev/hook/#template-variables) as `{{ vars.<key> }}`. Use the `default` filter for keys that may not be set:```toml-[post-start]+[post-create]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.port | default('3000') }}"```@@ -1211,7 +1211,7 @@ JSON object and array values support dot access:$ wt config state vars set config='{"port": 3000, "debug": true}'``````toml-[post-start]+[post-create]dev = "npm start -- --port {{ vars.config.port }}"```diff --git a/skills/worktrunk/reference/extending.md b/skills/worktrunk/reference/extending.mdindex 73ed7618f..1fce4afc6 100644--- a/skills/worktrunk/reference/extending.md+++ b/skills/worktrunk/reference/extending.md@@ -25,7 +25,7 @@ Hooks are shell commands that run at key points in the worktree lifecycle. Ten h| Event | `pre-` (blocking) | `post-` (background) ||-------|-------------------|---------------------|| **switch** | `pre-switch` | `post-switch` |-| **start** | `pre-start` | `post-start` |+| **start** | `pre-create` | `post-create` || **commit** | `pre-commit` | `post-commit` || **merge** | `pre-merge` | `post-merge` || **remove** | `pre-remove` | `post-remove` |@@ -33,10 +33,10 @@ Hooks are shell commands that run at key points in the worktree lifecycle. Ten h`pre-*` hooks block — failure aborts the operation. `post-*` hooks run in the background.```toml-[pre-start]+[pre-create]deps = "npm ci"-[post-start]+[post-create]server = "npm run dev -- --port {{ branch | hash_port }}"[pre-merge]@@ -183,7 +183,7 @@ tail -f "$(wt config state logs --format=json | jq -r --arg name "{{ name | sani'''```-Run with `wt hook-log --kind=post-start --name=server` to tail the log for the `server` hook on the current branch. `--kind` picks the hook type; the branch is pulled from the current worktree via `{{ branch }}`. `sanitize_hash` rewrites `branch` and `name` to filesystem-safe forms with a hash suffix that keeps distinct originals unique — the same transformation Worktrunk applies on disk — so the alias resolves the right log even when either contains characters like `/`.+Run with `wt hook-log --kind=post-create --name=server` to tail the log for the `server` hook on the current branch. `--kind` picks the hook type; the branch is pulled from the current worktree via `{{ branch }}`. `sanitize_hash` rewrites `branch` and `name` to filesystem-safe forms with a hash suffix that keeps distinct originals unique — the same transformation Worktrunk applies on disk — so the alias resolves the right log even when either contains characters like `/`.## Custom subcommandsdiff --git a/skills/worktrunk/reference/faq.md b/skills/worktrunk/reference/faq.mdindex 228856d52..7037ddcc8 100644--- a/skills/worktrunk/reference/faq.md+++ b/skills/worktrunk/reference/faq.md@@ -179,11 +179,11 @@ User hooks and user aliases don't require approval (you defined them). Commands▲ repo needs approval to execute 3 commands:-○ pre-start install:+○ pre-create install:npm ci-○ pre-start build:+○ pre-create build:cargo build --release-○ pre-start env:+○ pre-create env:echo 'PORT={{ branch | hash_port }}' > .env.local❯ Allow and remember? [y/N]diff --git a/skills/worktrunk/reference/hook.md b/skills/worktrunk/reference/hook.mdindex 9e11c902a..b2fa2aec7 100644--- a/skills/worktrunk/reference/hook.md+++ b/skills/worktrunk/reference/hook.md@@ -9,21 +9,23 @@ Hooks are shell commands that run at key points in the worktree lifecycle — au| Event | `pre-` — blocking | `post-` — background ||-------|-------------------|---------------------|| **switch** | `pre-switch` | `post-switch` |-| **start** | `pre-start` | `post-start` |+| **create** | `pre-create` | `post-create` || **commit** | `pre-commit` | `post-commit` || **merge** | `pre-merge` | `post-merge` || **remove** | `pre-remove` | `post-remove` |`pre-*` hooks block — failure aborts the operation. `post-*` hooks run in the background with output logged (use [`wt config state logs`](https://worktrunk.dev/config/#wt-config-state-logs) to find and manage log files). Use `-v` to see expanded command details for background hooks.-The most common starting point is `post-start` — it runs background tasks (dev servers, file copying, builds) without blocking worktree creation. Prefer `post-start` over `pre-start` unless a later step needs the work completed first.+The most common creation hook is `post-create` — it runs background tasks (dev servers, file copying, builds) without blocking worktree creation. Prefer `post-create` over `pre-create` unless a later step needs the work completed first.++`pre-start`/`post-start` are accepted as deprecated aliases for the renamed `pre-create`/`post-create` hooks, in config and on the command line. The [hook rename plan](https://github.com/max-sixty/worktrunk/issues/2838) tracks the deprecation.| Hook | Purpose ||------|---------|| `pre-switch` | Runs before branch resolution or worktree creation. `{{ branch }}` is the destination as typed (before resolution) || `post-switch` | Triggers on all switch results: creating, switching to existing, or staying on current |-| `pre-start` | Runs once when a new worktree is created, blocking `post-start`/`--execute` until complete: dependency install, env file generation |-| `post-start` | Runs once when a new worktree is created, in the background: dev servers, long builds, file watchers, copying caches |+| `pre-create` | Runs once when a new worktree is created, blocking `post-create`/`--execute` until complete: dependency install, env file generation |+| `post-create` | Runs once when a new worktree is created, in the background: dev servers, long builds, file watchers, copying caches || `pre-commit` | Formatters, linters, type checking — runs during `wt merge` before the squash commit || `post-commit` | CI triggers, notifications, background linting || `pre-merge` | Tests, security scans, build verification — runs after rebase, before merge to target |@@ -40,11 +42,11 @@ Project commands require approval on first run:```▲ repo needs approval to execute 3 commands:-○ pre-start install:+○ pre-create install:npm ci-○ pre-start build:+○ pre-create build:cargo build --release-○ pre-start env:+○ pre-create env:echo 'PORT={{ branch | hash_port }}' > .env.local❯ Allow and remember? [y/N]@@ -69,13 +71,13 @@ Hooks take one of three forms, determined by their TOML shape.A string is a single command:```toml-pre-start = "npm install"+pre-create = "npm install"```A table is multiple commands that run concurrently:```toml-[post-start]+[post-create]server = "npm run dev"watch = "npm run watch"```@@ -83,10 +85,10 @@ watch = "npm run watch"A pipeline is a sequence of `[[hook]]` blocks run in order. Each block is one step; multiple keys within a block run concurrently. A failing step aborts the rest of the pipeline:```toml-[[post-start]]+[[post-create]]install = "npm ci"-[[post-start]]+[[post-create]]build = "npm run build"server = "npm run dev"```@@ -134,7 +136,7 @@ Hooks can use template variables that expand at runtime:| | `{{ remote }}` | Primary remote name || | `{{ remote_url }}` | Remote URL || exec | `{{ cwd }}` | Directory where the hook command runs |-| | `{{ hook_type }}` | Hook type being run (e.g. `pre-start`, `pre-merge`) |+| | `{{ hook_type }}` | Hook type being run (e.g. `pre-create`, `pre-merge`) || | `{{ hook_name }}` | Hook command name (if named) || | `{{ args }}` | Tokens forwarded from the CLI — see [Running Hooks Manually](#running-hooks-manually) || user | `{{ vars.<key> }}` | Per-branch variables from [`wt config state vars`](https://worktrunk.dev/config/#wt-config-state-vars) |@@ -148,12 +150,12 @@ Bare variables (`branch`, `worktree_path`, `commit`) refer to the branch the ope| merge | feature being merged | = bare vars | merge target || remove | branch being removed | = bare vars | where you end up |-Pre and post hooks share the same perspective — `{{ branch | hash_port }}` produces the same port in `post-start` and `post-remove`. `cwd` is the worktree root where the hook command runs. It differs from `worktree_path` in three cases: pre-switch, where the hook runs in the source but `worktree_path` is the destination; post-remove, where the active worktree is gone so the hook runs in primary; and post-merge with removal, same — the active worktree is gone, so the hook runs in target.+Pre and post hooks share the same perspective — `{{ branch | hash_port }}` produces the same port in `post-create` and `post-remove`. `cwd` is the worktree root where the hook command runs. It differs from `worktree_path` in three cases: pre-switch, where the hook runs in the source but `worktree_path` is the destination; post-remove, where the active worktree is gone so the hook runs in primary; and post-merge with removal, same — the active worktree is gone, so the hook runs in target.-Some variables are conditional: `upstream` requires remote tracking; `base` only appears in switch/create hooks; `target_worktree_path` requires the target to have a worktree; `pr_number`/`pr_url` are populated for `post-switch`, `pre-start`, and `post-start` hooks when creating via `pr:N` or `mr:N`; `vars` keys may not exist. Undefined variables error — use conditionals or defaults for optional behavior:+Some variables are conditional: `upstream` requires remote tracking; `base` only appears in switch/create hooks; `target_worktree_path` requires the target to have a worktree; `pr_number`/`pr_url` are populated for `post-switch`, `pre-create`, and `post-create` hooks when creating via `pr:N` or `mr:N`; `vars` keys may not exist. Undefined variables error — use conditionals or defaults for optional behavior:```toml-[pre-start]+[pre-create]# Rebase onto upstream if tracking a remote branch (e.g., wt switch --create feature origin/feature)sync = "{% if upstream %}git fetch && git rebase {{ upstream }}{% endif %}"```@@ -163,7 +165,7 @@ Run any hook-firing command with `-v` to see the resolved variables for the actuVariables use dot access and the `default` filter for missing keys. JSON object/array values are parsed automatically, so `{{ vars.config.port }}` works when the value is `{"port": 3000}`:```toml-[post-start]+[post-create]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.config.port | default('3000') }}"```@@ -212,7 +214,7 @@ worktree-path = "{{ repo_path }}/../{{ repo_path | dirname | basename }}.{{ branThe `hash_port` filter is useful for running dev servers on unique ports per worktree:```toml-[post-start]+[post-create]dev = "npm run dev -- --host {{ branch }}.localhost --port {{ branch | hash_port }}"```@@ -236,7 +238,7 @@ Templates also support functions for dynamic lookups:The `worktree_path_of_branch` function returns the filesystem path of a worktree given a branch name, or an empty string if no worktree exists for that branch. This is useful for referencing files in other worktrees:```toml-[pre-start]+[pre-create]# Copy config from main worktreesetup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_path }}"```@@ -246,8 +248,8 @@ setup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_pathHooks receive all template variables as JSON on stdin, enabling complex logic that templates can't express:```toml-[pre-start]-setup = "python3 scripts/pre-start-setup.py"+[pre-create]+setup = "python3 scripts/pre-create-setup.py"``````python@@ -262,7 +264,7 @@ if ctx['branch'].startswith('feature/') and 'backend' in ctx['repo']:One specific command worth calling out: [`wt step copy-ignored`](https://worktrunk.dev/step/#wt-step-copy-ignored). Git worktrees share the repository but not untracked files, and this copies gitignored files between worktrees:```toml-[post-start]+[post-create]copy = "wt step copy-ignored"```@@ -278,7 +280,7 @@ $ wt hook pre-merge user: # Run all user hooks$ wt hook pre-merge project: # Run all project hooks$ wt hook pre-merge user:test # Run only user's "test" hook$ wt hook pre-merge --yes # Skip approval prompts (for CI)-$ wt hook pre-start --branch=feature/test # Override a template variable+$ wt hook pre-create --branch=feature/test # Override a template variable$ wt hook pre-merge -- --extra args # Forward tokens into {{ args }}```@@ -305,8 +307,8 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin``````bash-$ wt hook post-start-◎ Running post-start: project @ ~/acme+$ wt hook post-create+◎ Running post-create: project @ ~/acme```## Passing values@@ -319,9 +321,9 @@ The long form `--var KEY=VALUE` is deprecated but still supported. It force-bind# Recipes-- [Eliminate cold starts](https://worktrunk.dev/tips-patterns/#eliminate-cold-starts): `wt step copy-ignored` in `post-start` shares build caches and dependencies; use a `[[post-start]]` pipeline when a later hook depends on the copy-- [Dev server per worktree](https://worktrunk.dev/tips-patterns/#dev-server-per-worktree): `wt step tether` in `post-start` runs the dev server and kills its whole process group when the worktree is removed, with optional subdomain routing-- [Database per worktree](https://worktrunk.dev/tips-patterns/#database-per-worktree): a `post-start` pipeline stores container name, port, and connection string as [per-branch vars](https://worktrunk.dev/config/#wt-config-state-vars) that later hooks reference+- [Eliminate cold starts](https://worktrunk.dev/tips-patterns/#eliminate-cold-starts): `wt step copy-ignored` in `post-create` shares build caches and dependencies; use a `[[post-create]]` pipeline when a later hook depends on the copy+- [Dev server per worktree](https://worktrunk.dev/tips-patterns/#dev-server-per-worktree): `wt step tether` in `post-create` runs the dev server and kills its whole process group when the worktree is removed, with optional subdomain routing+- [Database per worktree](https://worktrunk.dev/tips-patterns/#database-per-worktree): a `post-create` pipeline stores container name, port, and connection string as [per-branch vars](https://worktrunk.dev/config/#wt-config-state-vars) that later hooks reference- [Progressive validation](https://worktrunk.dev/tips-patterns/#progressive-validation): quick lint/typecheck in `pre-commit`, expensive tests and builds in `pre-merge`- [Target-specific hooks](https://worktrunk.dev/tips-patterns/#target-specific-hooks): branch on `{{ target }}` in `post-merge` for per-environment deploys@@ -336,8 +338,8 @@ Commands:show Show configured hookspre-switch Run pre-switch hookspost-switch Run post-switch hooks- pre-start Run pre-start hooks- post-start Run post-start hooks+ pre-create Run pre-create hooks+ post-create Run post-create hookspre-commit Run pre-commit hookspost-commit Run post-commit hookspre-merge Run pre-merge hooksdiff --git a/skills/worktrunk/reference/step.md b/skills/worktrunk/reference/step.mdindex d945e5a83..9b87035f7 100644--- a/skills/worktrunk/reference/step.md+++ b/skills/worktrunk/reference/step.md@@ -357,7 +357,7 @@ Add to the project config:```toml# .config/wt.toml-[post-start]+[post-create]copy = "wt step copy-ignored"```@@ -409,7 +409,7 @@ Reflink copies share disk blocks until modified — no data is actually copied.Uses per-file reflink (like `cp -Rc`) — copy time scales with file count.-Use the `post-start` hook so the copy runs in the background. Use `pre-start` instead if subsequent hooks or `--execute` command need the copied files immediately.+Use the `post-create` hook so the copy runs in the background. Use `pre-create` instead if subsequent hooks or `--execute` command need the copied files immediately.### Background-hook priority (experimental)@@ -428,7 +428,7 @@ The `target/` directory is huge (often 1-10GB). Copying with reflink cuts first`node_modules/` is large but mostly static. If the project has no native dependencies, symlinks are even faster:```toml-[pre-start]+[pre-create]deps = "ln -sf {{ primary_worktree_path }}/node_modules ."```@@ -949,7 +949,7 @@ Run a command; kill its whole process tree when its worktree is removed. Teardow### Why-A `post-start` hook to start a long-lived process and a `pre-remove` hook to+A `post-create` hook to start a long-lived process and a `pre-remove` hook tostop it is usually enough. But `pre-remove` only runs when worktrunk removesthe worktree, so a `git worktree remove`, an `rm -rf`, or a crashed hook skipsit. Across enough worktree churn some process is bound to outlive its worktree,@@ -978,7 +978,7 @@ Run a dev server, torn down automatically when the worktree goes away:```toml# .config/wt.toml-[post-start]+[post-create]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"```diff --git a/skills/worktrunk/reference/switch.md b/skills/worktrunk/reference/switch.mdindex 822da432b..9e1194020 100644--- a/skills/worktrunk/reference/switch.md+++ b/skills/worktrunk/reference/switch.md@@ -25,8 +25,8 @@ If the branch already has a worktree, `wt switch` changes directories to it. Oth1. Runs [pre-switch hooks](https://worktrunk.dev/hook/#hook-types), blocking until complete2. Creates worktree at configured path3. Switches to new directory-4. Runs [pre-start hooks](https://worktrunk.dev/hook/#hook-types), blocking until complete-5. Spawns [post-start](https://worktrunk.dev/hook/#hook-types) and [post-switch hooks](https://worktrunk.dev/hook/#hook-types) in the background+4. Runs [pre-create hooks](https://worktrunk.dev/hook/#hook-types), blocking until complete+5. Spawns [post-create](https://worktrunk.dev/hook/#hook-types) and [post-switch hooks](https://worktrunk.dev/hook/#hook-types) in the background```bash$ wt switch feature # Existing branch → creates worktreediff --git a/skills/worktrunk/reference/tips-patterns.md b/skills/worktrunk/reference/tips-patterns.mdindex 573e5c93c..7ead9615e 100644--- a/skills/worktrunk/reference/tips-patterns.md+++ b/skills/worktrunk/reference/tips-patterns.md@@ -44,7 +44,7 @@ Each worktree runs its own dev server on a deterministic port. The `hash_port` f```toml# .config/wt.toml-[post-start]+[post-create]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"[list]@@ -73,7 +73,7 @@ Ports are deterministic: `fix-auth` always gets port 16460, regardless of whichEach worktree can have its own isolated database. A pipeline sets up names and ports as [vars](https://worktrunk.dev/config/#wt-config-state-vars), then later steps and hooks reference them:```toml-[[post-start]]+[[post-create]]set-vars = """wt config state vars set \container='{{ repo }}-{{ branch | sanitize }}-postgres' \@@ -81,7 +81,7 @@ wt config state vars set \db_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'"""-[[post-start]]+[[post-create]]db = """docker run -d --rm \--name {{ vars.container }} \@@ -110,21 +110,21 @@ DATABASE_URL=$(wt config state vars get db_url) npm startUse [`wt step copy-ignored`](https://worktrunk.dev/step/#wt-step-copy-ignored) to copy gitignored files (caches, dependencies, `.env`) between worktrees:```toml-[post-start]+[post-create]copy = "wt step copy-ignored"```-When another hook depends on the copy — for example, copying `node_modules/` before `pnpm install` so the install reuses cached packages — sequence them with a `[[post-start]]` pipeline:+When another hook depends on the copy — for example, copying `node_modules/` before `pnpm install` so the install reuses cached packages — sequence them with a `[[post-create]]` pipeline:```toml-[[post-start]]+[[post-create]]copy = "wt step copy-ignored"-[[post-start]]+[[post-create]]install = "pnpm install"```-Use `pre-start` instead when an `--execute` command needs the copied files immediately.+Use `pre-create` instead when an `--execute` command needs the copied files immediately.All gitignored files are copied by default. To limit what gets copied, create `.worktreeinclude` with patterns — files must be both gitignored and listed. See [`wt step copy-ignored`](https://worktrunk.dev/step/#wt-step-copy-ignored) for details.@@ -213,7 +213,7 @@ git rebase $(wt config state default-branch)Reference Taskfile/Justfile/Makefile in hooks:```toml-[pre-start]+[pre-create]"setup" = "task install"[pre-merge]@@ -301,7 +301,7 @@ Each worktree gets its own tmux session with a multi-pane layout.```toml# .config/wt.toml-[pre-start]+[pre-create]tmux = """S={{ branch | sanitize }}W={{ worktree_path }}@@ -353,7 +353,7 @@ b=$(wt switch)[ -n "$b" ] && wt switch "$b""""-[pre-start]+[pre-create]cmux = "cmux new-workspace --name {{ repo | sanitize }}/{{ branch | sanitize }} --cwd {{ worktree_path }} --focus true"[pre-switch]@@ -406,7 +406,7 @@ Clean URLs like `http://feature-auth.myproject.localhost` without port numbers.```toml# .config/wt.toml-[post-start]+[post-create]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"proxy = """curl -sf --max-time 0.5 http://localhost:2019/config/ || caddy start@@ -427,7 +427,7 @@ url = "http://{{ branch | sanitize }}.{{ repo }}.localhost:8080"**How it works:**-1. `wt switch --create feature-auth` runs the `post-start` hook, starting the dev server on a deterministic port (`{{ branch | hash_port }}` → 16460)+1. `wt switch --create feature-auth` runs the `post-create` hook, starting the dev server on a deterministic port (`{{ branch | hash_port }}` → 16460)2. The hook starts Caddy if needed and registers a route using the same port: `feature-auth.myproject` → `localhost:16460`3. `*.localhost` resolves to `127.0.0.1` via the OS4. Visiting `http://feature-auth.myproject.localhost:8080`: Caddy matches the subdomain and proxies to the dev server@@ -437,10 +437,10 @@ url = "http://{{ branch | sanitize }}.{{ repo }}.localhost:8080"Follow background hook output in real-time:```bash-tail -f "$(wt config state logs get --hook=user:post-start:server)"+tail -f "$(wt config state logs get --hook=user:post-create:server)"```-The `--hook` format is `source:hook-type:name` — e.g., `project:post-start:build` for project-defined hooks. Use `wt config state logs get` to list all available logs.+The `--hook` format is `source:hook-type:name` — e.g., `project:post-create:build` for project-defined hooks. Use `wt config state logs get` to list all available logs.Create an alias for frequent use:diff --git a/skills/worktrunk/reference/troubleshooting.md b/skills/worktrunk/reference/troubleshooting.mdindex 62d8f7e7d..325961c71 100644--- a/skills/worktrunk/reference/troubleshooting.md+++ b/skills/worktrunk/reference/troubleshooting.md@@ -67,11 +67,11 @@ Move long-running commands to background:```toml# Before — blocks for minutes-pre-start = "npm run build"+pre-create = "npm run build"# After — fast setup, build in background-pre-start = "npm install"-post-start = "npm run build"+pre-create = "npm install"+post-create = "npm run build"```## Listdiff --git a/skills/worktrunk/reference/worktrunk.md b/skills/worktrunk/reference/worktrunk.mdindex 2496b0800..fa5bc0c72 100644--- a/skills/worktrunk/reference/worktrunk.md+++ b/skills/worktrunk/reference/worktrunk.md@@ -182,7 +182,7 @@ wt switch -x claude -c feature-b -- 'Fix the pagination bug'wt switch -x claude -c feature-c -- 'Write tests for the API'```-The `-x` flag runs a command after switching; arguments after `--` are passed to it. Configure [post-start hooks](https://worktrunk.dev/hook/#hook-types) to automate setup (install deps, start dev servers).+The `-x` flag runs a command after switching; arguments after `--` are passed to it. Configure [post-create hooks](https://worktrunk.dev/hook/#hook-types) to automate setup (install deps, start dev servers).## Next stepsdiff --git a/src/cli/config.rs b/src/cli/config.rsindex 47aa7203c..05c2760e7 100644--- a/src/cli/config.rs+++ b/src/cli/config.rs@@ -777,7 +777,7 @@ Hook output lives in per-branch subtrees under `.git/wt/logs/{branch}/`:| Background hooks | `{branch}/{source}/{hook-type}/{name}.log` || Background removal | `{branch}/internal/remove.log` |-All `post-*` hooks (post-start, post-switch, post-commit, post-merge) run in the background and produce log files. Source is `user` or `project`. Branch and hook names are sanitized for filesystem safety (invalid characters → `-`; short collision-avoidance hash appended). Same operation on same branch overwrites the previous log. Removing a branch clears its subtree; orphans from deleted branches can be swept with `wt config state logs clear`.+All `post-*` hooks (post-create, post-switch, post-commit, post-merge) run in the background and produce log files. Source is `user` or `project`. Branch and hook names are sanitized for filesystem safety (invalid characters → `-`; short collision-avoidance hash appended). Same operation on same branch overwrites the previous log. Removing a branch clears its subtree; orphans from deleted branches can be swept with `wt config state logs clear`.### Diagnostic files@@ -809,9 +809,9 @@ Query the command log:$ tail -5 .git/wt/logs/commands.jsonl | jq .```-Path to one hook log (e.g. the `post-start` `server` hook for the current branch):+Path to one hook log (e.g. the `post-create` `server` hook for the current branch):```console-$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-start" and (.name | startswith("server"))) | .path'+$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-create" and (.name | startswith("server"))) | .path'```Logs for a specific branch:@@ -995,7 +995,7 @@ $ wt config state vars set env=production --branch=mainVariables are available in [hook templates](@/hook.md#template-variables) as `{{ vars.<key> }}`. Use the `default` filter for keys that may not be set:```toml-[post-start]+[post-create]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.port | default('3000') }}"```@@ -1005,7 +1005,7 @@ JSON object and array values support dot access:$ wt config state vars set config='{"port": 3000, "debug": true}'``````toml-[post-start]+[post-create]dev = "npm start -- --port {{ vars.config.port }}"```@@ -1224,14 +1224,14 @@ List all log files:$ wt config state logs```-Get the absolute path of one post-start hook log for the current branch (use `jq` to filter):+Get the absolute path of one post-create hook log for the current branch (use `jq` to filter):```console-$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-start" and (.name | startswith("server"))) | .path'+$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-create" and (.name | startswith("server"))) | .path'```Stream that log with `tail -f`:```console-$ tail -f "$(wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-start" and (.name | startswith("server"))) | .path' | head -1)"+$ tail -f "$(wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-create" and (.name | startswith("server"))) | .path' | head -1)"```Logs for a background worktree removal (internal op):diff --git a/src/cli/hook.rs b/src/cli/hook.rsindex 7a4d52fbd..e41f0e55d 100644--- a/src/cli/hook.rs+++ b/src/cli/hook.rs@@ -46,16 +46,17 @@ use worktrunk::HookType;use super::config::ApprovalsCommand;/// Canonical list of hook type names accepted after `wt hook`. Shared by-/// [`parse_hook_type`], `completion::inject_hook_subcommands`, and the-/// `wt hook show` value parser so drift is caught by tests rather than at-/// runtime. `post-create` is the deprecated alias for `pre-start`; it's-/// accepted by [`parse_hook_type`] but not listed here — completion lists-/// the canonical names only.+/// [`parse_hook_type`], `completion::inject_hook_subcommands`, and (via+/// `hook_show_possible_values`) the `wt hook show` value parser, so drift+/// is caught by tests rather than at runtime. `pre-start`/`post-start` are+/// deprecated aliases for `pre-create`/`post-create`: not listed here, so+/// help and completion advertise only the canonical names, but accepted by+/// [`parse_hook_type`] and by `wt hook show` as hidden aliases.pub const HOOK_TYPE_NAMES: &[&str] = &["pre-switch","post-switch",- "pre-start",- "post-start",+ "pre-create",+ "post-create","pre-commit","post-commit","pre-merge",@@ -64,6 +65,22 @@ pub const HOOK_TYPE_NAMES: &[&str] = &["post-remove",];+/// `PossibleValue` set for the `wt hook show` type argument: the canonical+/// names from [`HOOK_TYPE_NAMES`], with `pre-start`/`post-start` attached as+/// hidden aliases. `wt hook show post-start` keeps working through the rename+/// without the deprecated names showing up in help or completion.+fn hook_show_possible_values() -> Vec<clap::builder::PossibleValue> {+ use clap::builder::PossibleValue;+ HOOK_TYPE_NAMES+ .iter()+ .map(|&name| match name {+ "pre-create" => PossibleValue::new(name).alias("pre-start"),+ "post-create" => PossibleValue::new(name).alias("post-start"),+ _ => PossibleValue::new(name),+ })+ .collect()+}+// Ordering: `show` first (read-only introspection), then the external// subcommand catch-all, then hidden commands. Hook types aren't listed// as clap variants — `Run` catches them.@@ -75,7 +92,7 @@ pub enum HookCommand {/// Lists user and project hooks. Project hooks show approval status (❓ = needs approval).Show {/// Hook type to show (default: all)- #[arg(value_parser = PossibleValuesParser::new(HOOK_TYPE_NAMES))]+ #[arg(value_parser = PossibleValuesParser::new(hook_show_possible_values()))]hook_type: Option<String>,/// Show expanded commands with current variables@@ -135,17 +152,15 @@ pub struct HookOptions {/// Map a hook type name to its [`HookType`] variant. Emits a did-you-mean/// hint on typos (same `did_you_mean` helper used for unknown subcommands).///-/// `post-create` is the deprecated alias for `pre-start` — accepted here so-/// scripted invocations keep working. The deprecation warning for the config-/// section `[post-create]` is emitted by the config loader; the warning for-/// the CLI invocation `wt hook post-create` is emitted by the dispatcher in-/// `main.rs` before `HookOptions::parse` runs.+/// `pre-start`/`post-start` are deprecated aliases for `pre-create`/`post-create`,+/// accepted here so scripted invocations keep working through the rename. They+/// map silently — no warning until the deprecation cycle's next phase.pub fn parse_hook_type(name: &str) -> anyhow::Result<HookType> {match name {"pre-switch" => Ok(HookType::PreSwitch),"post-switch" => Ok(HookType::PostSwitch),- "pre-start" | "post-create" => Ok(HookType::PreStart),- "post-start" => Ok(HookType::PostStart),+ "pre-create" | "pre-start" => Ok(HookType::PreCreate),+ "post-create" | "post-start" => Ok(HookType::PostCreate),"pre-commit" => Ok(HookType::PreCommit),"post-commit" => Ok(HookType::PostCommit),"pre-merge" => Ok(HookType::PreMerge),@@ -319,8 +334,8 @@ mod tests {#[test]fn test_parse_flags() {- let opts = parse(&["post-start", "--yes", "--dry-run", "--foreground"]).unwrap();- assert_eq!(opts.hook_type, HookType::PostStart);+ let opts = parse(&["post-create", "--yes", "--dry-run", "--foreground"]).unwrap();+ assert_eq!(opts.hook_type, HookType::PostCreate);assert!(opts.yes);assert!(opts.dry_run);assert_eq!(opts.foreground, Some(true));@@ -347,10 +362,10 @@ mod tests {assert_eq!(opts.shorthand_vars, vec!["branch=feature/x"]);// Value with `=` inside (URL, etc.) preserves everything after the// first `=` as the value.- let opts = parse(&["pre-start", "--url=http://host?a=1"]).unwrap();+ let opts = parse(&["pre-create", "--url=http://host?a=1"]).unwrap();assert_eq!(opts.shorthand_vars, vec!["url=http://host?a=1"]);// Empty value.- let opts = parse(&["pre-start", "--branch="]).unwrap();+ let opts = parse(&["pre-create", "--branch="]).unwrap();assert_eq!(opts.shorthand_vars, vec!["branch="]);}@@ -444,9 +459,12 @@ mod tests {#[test]fn test_parse_hook_type_aliases() {- // `post-create` is the deprecated alias for `pre-start`.- let opts = parse(&["post-create"]).unwrap();- assert_eq!(opts.hook_type, HookType::PreStart);+ // `pre-start`/`post-start` are deprecated aliases for+ // `pre-create`/`post-create`.+ let opts = parse(&["pre-start"]).unwrap();+ assert_eq!(opts.hook_type, HookType::PreCreate);+ let opts = parse(&["post-start"]).unwrap();+ assert_eq!(opts.hook_type, HookType::PostCreate);}#[test]diff --git a/src/cli/mod.rs b/src/cli/mod.rsindex 8f1c1dfbe..60c93cce6 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -9,7 +9,7 @@ pub(crate) use config::{ConfigPluginsOpencodeCommand, ConfigShellCommand, DefaultBranchAction, HintsAction, LogsAction,MarkerAction, PreviousBranchAction, StateCommand, StateWrite, VarsAction,};-pub(crate) use hook::{HOOK_TYPE_NAMES, HookCommand, HookOptions};+pub(crate) use hook::{HOOK_TYPE_NAMES, HookCommand, HookOptions, parse_hook_type};pub(crate) use list::ListSubcommand;pub(crate) use step::StepCommand;@@ -552,8 +552,8 @@ If the branch already has a worktree, `wt switch` changes directories to it. Oth1. Runs [pre-switch hooks](@/hook.md#hook-types), blocking until complete2. Creates worktree at configured path3. Switches to new directory-4. Runs [pre-start hooks](@/hook.md#hook-types), blocking until complete-5. Spawns [post-start](@/hook.md#hook-types) and [post-switch hooks](@/hook.md#hook-types) in the background+4. Runs [pre-create hooks](@/hook.md#hook-types), blocking until complete+5. Spawns [post-create](@/hook.md#hook-types) and [post-switch hooks](@/hook.md#hook-types) in the background```console$ wt switch feature # Existing branch → creates worktree@@ -1209,21 +1209,23 @@ $ wt step push| Event | `pre-` — blocking | `post-` — background ||-------|-------------------|---------------------|| **switch** | `pre-switch` | `post-switch` |-| **start** | `pre-start` | `post-start` |+| **create** | `pre-create` | `post-create` || **commit** | `pre-commit` | `post-commit` || **merge** | `pre-merge` | `post-merge` || **remove** | `pre-remove` | `post-remove` |`pre-*` hooks block — failure aborts the operation. `post-*` hooks run in the background with output logged (use [`wt config state logs`](@/config.md#wt-config-state-logs) to find and manage log files). Use `-v` to see expanded command details for background hooks.-The most common starting point is `post-start` — it runs background tasks (dev servers, file copying, builds) without blocking worktree creation. Prefer `post-start` over `pre-start` unless a later step needs the work completed first.+The most common creation hook is `post-create` — it runs background tasks (dev servers, file copying, builds) without blocking worktree creation. Prefer `post-create` over `pre-create` unless a later step needs the work completed first.++`pre-start`/`post-start` are accepted as deprecated aliases for the renamed `pre-create`/`post-create` hooks, in config and on the command line. The [hook rename plan](https://github.com/max-sixty/worktrunk/issues/2838) tracks the deprecation.| Hook | Purpose ||------|---------|| `pre-switch` | Runs before branch resolution or worktree creation. `{{ branch }}` is the destination as typed (before resolution) || `post-switch` | Triggers on all switch results: creating, switching to existing, or staying on current |-| `pre-start` | Runs once when a new worktree is created, blocking `post-start`/`--execute` until complete: dependency install, env file generation |-| `post-start` | Runs once when a new worktree is created, in the background: dev servers, long builds, file watchers, copying caches |+| `pre-create` | Runs once when a new worktree is created, blocking `post-create`/`--execute` until complete: dependency install, env file generation |+| `post-create` | Runs once when a new worktree is created, in the background: dev servers, long builds, file watchers, copying caches || `pre-commit` | Formatters, linters, type checking — runs during `wt merge` before the squash commit || `post-commit` | CI triggers, notifications, background linting || `pre-merge` | Tests, security scans, build verification — runs after rebase, before merge to target |@@ -1240,11 +1242,11 @@ Project commands require approval on first run:```▲ repo needs approval to execute 3 commands:-○ pre-start install:+○ pre-create install:npm ci-○ pre-start build:+○ pre-create build:cargo build --release-○ pre-start env:+○ pre-create env:echo 'PORT={{ branch | hash_port }}' > .env.local❯ Allow and remember? [y/N]@@ -1269,13 +1271,13 @@ Hooks take one of three forms, determined by their TOML shape.A string is a single command:```toml-pre-start = "npm install"+pre-create = "npm install"```A table is multiple commands that run concurrently:```toml-[post-start]+[post-create]server = "npm run dev"watch = "npm run watch"```@@ -1283,10 +1285,10 @@ watch = "npm run watch"A pipeline is a sequence of `[[hook]]` blocks run in order. Each block is one step; multiple keys within a block run concurrently. A failing step aborts the rest of the pipeline:```toml-[[post-start]]+[[post-create]]install = "npm ci"-[[post-start]]+[[post-create]]build = "npm run build"server = "npm run dev"```@@ -1334,7 +1336,7 @@ Hooks can use template variables that expand at runtime:| | `{{ remote }}` | Primary remote name || | `{{ remote_url }}` | Remote URL || exec | `{{ cwd }}` | Directory where the hook command runs |-| | `{{ hook_type }}` | Hook type being run (e.g. `pre-start`, `pre-merge`) |+| | `{{ hook_type }}` | Hook type being run (e.g. `pre-create`, `pre-merge`) || | `{{ hook_name }}` | Hook command name (if named) || | `{{ args }}` | Tokens forwarded from the CLI — see [Running Hooks Manually](#running-hooks-manually) || user | `{{ vars.<key> }}` | Per-branch variables from [`wt config state vars`](@/config.md#wt-config-state-vars) |@@ -1348,12 +1350,12 @@ Bare variables (`branch`, `worktree_path`, `commit`) refer to the branch the ope| merge | feature being merged | = bare vars | merge target || remove | branch being removed | = bare vars | where you end up |-Pre and post hooks share the same perspective — `{{ branch | hash_port }}` produces the same port in `post-start` and `post-remove`. `cwd` is the worktree root where the hook command runs. It differs from `worktree_path` in three cases: pre-switch, where the hook runs in the source but `worktree_path` is the destination; post-remove, where the active worktree is gone so the hook runs in primary; and post-merge with removal, same — the active worktree is gone, so the hook runs in target.+Pre and post hooks share the same perspective — `{{ branch | hash_port }}` produces the same port in `post-create` and `post-remove`. `cwd` is the worktree root where the hook command runs. It differs from `worktree_path` in three cases: pre-switch, where the hook runs in the source but `worktree_path` is the destination; post-remove, where the active worktree is gone so the hook runs in primary; and post-merge with removal, same — the active worktree is gone, so the hook runs in target.-Some variables are conditional: `upstream` requires remote tracking; `base` only appears in switch/create hooks; `target_worktree_path` requires the target to have a worktree; `pr_number`/`pr_url` are populated for `post-switch`, `pre-start`, and `post-start` hooks when creating via `pr:N` or `mr:N`; `vars` keys may not exist. Undefined variables error — use conditionals or defaults for optional behavior:+Some variables are conditional: `upstream` requires remote tracking; `base` only appears in switch/create hooks; `target_worktree_path` requires the target to have a worktree; `pr_number`/`pr_url` are populated for `post-switch`, `pre-create`, and `post-create` hooks when creating via `pr:N` or `mr:N`; `vars` keys may not exist. Undefined variables error — use conditionals or defaults for optional behavior:```toml-[pre-start]+[pre-create]# Rebase onto upstream if tracking a remote branch (e.g., wt switch --create feature origin/feature)sync = "{% if upstream %}git fetch && git rebase {{ upstream }}{% endif %}"```@@ -1363,7 +1365,7 @@ Run any hook-firing command with `-v` to see the resolved variables for the actuVariables use dot access and the `default` filter for missing keys. JSON object/array values are parsed automatically, so `{{ vars.config.port }}` works when the value is `{"port": 3000}`:```toml-[post-start]+[post-create]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.config.port | default('3000') }}"```@@ -1412,7 +1414,7 @@ worktree-path = "{{ repo_path }}/../{{ repo_path | dirname | basename }}.{{ branThe `hash_port` filter is useful for running dev servers on unique ports per worktree:```toml-[post-start]+[post-create]dev = "npm run dev -- --host {{ branch }}.localhost --port {{ branch | hash_port }}"```@@ -1436,7 +1438,7 @@ Templates also support functions for dynamic lookups:The `worktree_path_of_branch` function returns the filesystem path of a worktree given a branch name, or an empty string if no worktree exists for that branch. This is useful for referencing files in other worktrees:```toml-[pre-start]+[pre-create]# Copy config from main worktreesetup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_path }}"```@@ -1446,8 +1448,8 @@ setup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_pathHooks receive all template variables as JSON on stdin, enabling complex logic that templates can't express:```toml-[pre-start]-setup = "python3 scripts/pre-start-setup.py"+[pre-create]+setup = "python3 scripts/pre-create-setup.py"``````python@@ -1462,7 +1464,7 @@ if ctx['branch'].startswith('feature/') and 'backend' in ctx['repo']:One specific command worth calling out: [`wt step copy-ignored`](@/step.md#wt-step-copy-ignored). Git worktrees share the repository but not untracked files, and this copies gitignored files between worktrees:```toml-[post-start]+[post-create]copy = "wt step copy-ignored"```@@ -1478,7 +1480,7 @@ $ wt hook pre-merge user: # Run all user hooks$ wt hook pre-merge project: # Run all project hooks$ wt hook pre-merge user:test # Run only user's "test" hook$ wt hook pre-merge --yes # Skip approval prompts (for CI)-$ wt hook pre-start --branch=feature/test # Override a template variable+$ wt hook pre-create --branch=feature/test # Override a template variable$ wt hook pre-merge -- --extra args # Forward tokens into {{ args }}```@@ -1506,8 +1508,8 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin``````console-$ wt hook post-start-◎ Running post-start: project @ ~/acme+$ wt hook post-create+◎ Running post-create: project @ ~/acme```## Passing values@@ -1520,16 +1522,16 @@ The long form `--var KEY=VALUE` is deprecated but still supported. It force-bind# Recipes-- [Eliminate cold starts](@/tips-patterns.md#eliminate-cold-starts): `wt step copy-ignored` in `post-start` shares build caches and dependencies; use a `[[post-start]]` pipeline when a later hook depends on the copy-- [Dev server per worktree](@/tips-patterns.md#dev-server-per-worktree): `wt step tether` in `post-start` runs the dev server and kills its whole process group when the worktree is removed, with optional subdomain routing-- [Database per worktree](@/tips-patterns.md#database-per-worktree): a `post-start` pipeline stores container name, port, and connection string as [per-branch vars](@/config.md#wt-config-state-vars) that later hooks reference+- [Eliminate cold starts](@/tips-patterns.md#eliminate-cold-starts): `wt step copy-ignored` in `post-create` shares build caches and dependencies; use a `[[post-create]]` pipeline when a later hook depends on the copy+- [Dev server per worktree](@/tips-patterns.md#dev-server-per-worktree): `wt step tether` in `post-create` runs the dev server and kills its whole process group when the worktree is removed, with optional subdomain routing+- [Database per worktree](@/tips-patterns.md#database-per-worktree): a `post-create` pipeline stores container name, port, and connection string as [per-branch vars](@/config.md#wt-config-state-vars) that later hooks reference- [Progressive validation](@/tips-patterns.md#progressive-validation): quick lint/typecheck in `pre-commit`, expensive tests and builds in `pre-merge`- [Target-specific hooks](@/tips-patterns.md#target-specific-hooks): branch on `{{ target }}` in `post-merge` for per-environment deploys## See also- [`wt merge`](@/merge.md) — Runs hooks automatically during merge-- [`wt switch`](@/switch.md) — Runs pre-start/post-start hooks on `--create`+- [`wt switch`](@/switch.md) — Runs pre-create/post-create hooks on `--create`- [`wt config approvals`](@/config.md#wt-config-approvals) — Manage approvals- [`wt config state logs`](@/config.md#wt-config-state-logs) — Access background hook logs"#@@ -1591,7 +1593,7 @@ command = "CLAUDECODE= MAX_THINKING_TOKENS=0 claude -p --no-session-persistence```toml# .config/wt.toml-[pre-start]+[pre-create]deps = "npm ci"[pre-merge]@@ -1808,28 +1810,28 @@ worktree-path = ".worktrees/{{ branch | sanitize }}"list.full = truemerge.squash = falseremove.delete-branch = false-pre-start.env = "cp .env.example .env"+pre-create.env = "cp .env.example .env"step.copy-ignored.exclude = [".repo-local-cache/"]aliases.deploy = "make deploy BRANCH={{ branch }}"```-Hooks support all three [hook forms](@/hook.md#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:+Hooks support all three [hook forms](@/hook.md#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` table the same way:```toml# Single command[projects."github.com/user/repo"]-post-start = "mise trust"+post-create = "mise trust"# Multiple commands, running concurrently-[projects."github.com/user/repo".post-start]+[projects."github.com/user/repo".post-create]mise = "mise trust"server = "npm run dev"# Pipeline: steps run in sequence-[[projects."github.com/user/repo".post-start]]+[[projects."github.com/user/repo".post-create]]install = "npm ci"-[[projects."github.com/user/repo".post-start]]+[[projects."github.com/user/repo".post-create]]build = "npm run build"server = "npm run dev"```@@ -1974,8 +1976,8 @@ To create a starter file with commented-out examples, run `wt config create --prProject hooks apply to this repository only. See [`wt hook`](@/hook.md) for hook types, execution order, and examples.```toml-pre-start = "npm ci"-post-start = "npm run dev"+pre-create = "npm ci"+post-create = "npm run dev"pre-merge = "npm test"```diff --git a/src/cli/step.rs b/src/cli/step.rsindex ff64926ac..cf2983185 100644--- a/src/cli/step.rs+++ b/src/cli/step.rs@@ -277,7 +277,7 @@ Add to the project config:```toml# .config/wt.toml-[post-start]+[post-create]copy = "wt step copy-ignored"```@@ -329,7 +329,7 @@ Reflink copies share disk blocks until modified — no data is actually copied.Uses per-file reflink (like `cp -Rc`) — copy time scales with file count.-Use the `post-start` hook so the copy runs in the background. Use `pre-start` instead if subsequent hooks or `--execute` command need the copied files immediately.+Use the `post-create` hook so the copy runs in the background. Use `pre-create` instead if subsequent hooks or `--execute` command need the copied files immediately.## Background-hook priority (experimental)@@ -348,7 +348,7 @@ The `target/` directory is huge (often 1-10GB). Copying with reflink cuts first`node_modules/` is large but mostly static. If the project has no native dependencies, symlinks are even faster:```toml-[pre-start]+[pre-create]deps = "ln -sf {{ primary_worktree_path }}/node_modules ."```@@ -689,7 +689,7 @@ Note: This command is experimental and may change in future versions./// Teardown is automatic and needs no `pre-remove` hook; the group gets `SIGTERM` then `SIGKILL`.#[command(after_long_help = r#"## Why-A `post-start` hook to start a long-lived process and a `pre-remove` hook to+A `post-create` hook to start a long-lived process and a `pre-remove` hook tostop it is usually enough. But `pre-remove` only runs when worktrunk removesthe worktree, so a `git worktree remove`, an `rm -rf`, or a crashed hook skipsit. Across enough worktree churn some process is bound to outlive its worktree,@@ -718,7 +718,7 @@ Run a dev server, torn down automatically when the worktree goes away:```toml# .config/wt.toml-[post-start]+[post-create]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"```diff --git a/src/command_log.rs b/src/command_log.rsindex 8a25e4406..04ea714ca 100644--- a/src/command_log.rs+++ b/src/command_log.rs@@ -193,7 +193,7 @@ mod tests {let entry = serde_json::json!({"ts": "2026-02-17T10:00:00Z","wt": "wt switch",- "label": "post-start user:server",+ "label": "post-create user:server","cmd": "npm run dev","exit": null,"dur_ms": null,diff --git a/src/commands/command_approval.rs b/src/commands/command_approval.rsindex a705a8b50..004445e73 100644--- a/src/commands/command_approval.rs+++ b/src/commands/command_approval.rs@@ -193,7 +193,7 @@ pub fn approve_alias_commands(////// ```ignore/// let ctx = CommandContext::new(&repo, &config, &branch, &worktree_path, yes);-/// let approved = approve_hooks(&ctx, &[HookType::PreStart, HookType::PostStart])?;+/// let approved = approve_hooks(&ctx, &[HookType::PreCreate, HookType::PostCreate])?;/// ```pub fn approve_hooks(ctx: &super::command_executor::CommandContext<'_>,diff --git a/src/commands/command_executor.rs b/src/commands/command_executor.rsindex af32a4ee1..35c1af8b8 100644--- a/src/commands/command_executor.rs+++ b/src/commands/command_executor.rs@@ -906,7 +906,7 @@ mod tests {}.into();let cmd = make_cmd(Some("lint"));- let wrapper = hook_error_wrapper(HookType::PostStart);+ let wrapper = hook_error_wrapper(HookType::PostCreate);let result = handle_command_error(err, &cmd, &wrapper, FailureStrategy::Warn);assert!(result.is_ok());}@@ -920,7 +920,7 @@ mod tests {}.into();let cmd = make_cmd(Some("cleanup"));- let wrapper = hook_error_wrapper(HookType::PostStart);+ let wrapper = hook_error_wrapper(HookType::PostCreate);let result = handle_command_error(err, &cmd, &wrapper, FailureStrategy::Warn);let err = result.unwrap_err();let wt_err = err.downcast_ref::<WorktrunkError>().unwrap();@@ -935,7 +935,7 @@ mod tests {// Covers the `cmd.name = None` branch of the Warn arm.let err = anyhow::anyhow!("unexpected failure");let cmd = make_cmd(None);- let wrapper = hook_error_wrapper(HookType::PostStart);+ let wrapper = hook_error_wrapper(HookType::PostCreate);let result = handle_command_error(err, &cmd, &wrapper, FailureStrategy::Warn);assert!(result.is_ok());}diff --git a/src/commands/config/state.rs b/src/commands/config/state.rsindex 9738ace58..7aaa52808 100644--- a/src/commands/config/state.rs+++ b/src/commands/config/state.rs@@ -364,7 +364,7 @@ struct HookStructure {branch: String,/// `"user"`, `"project"`, or `"internal"`.source: String,- /// Hook type (`post-start`, `post-switch`, …) for user/project hooks;+ /// Hook type (`post-create`, `post-switch`, …) for user/project hooks;/// `None` for internal operations.hook_type: Option<String>,/// Sanitized hook name for user/project hooks; internal op namediff --git a/src/commands/hook_announcement.rs b/src/commands/hook_announcement.rsindex e9b60fb1d..1f8917c0e 100644--- a/src/commands/hook_announcement.rs+++ b/src/commands/hook_announcement.rs@@ -12,7 +12,7 @@//! ```//!//! `;` is overloaded across the two outermost tiers. The reader disambiguates-//! by lookahead — `;` followed by a `<hook-type>:` (e.g. `post-start:`) is a+//! by lookahead — `;` followed by a `<hook-type>:` (e.g. `post-create:`) is a//! cross-type boundary; otherwise it's a cross-source boundary within the//! current hook-type clause. In practice the two often coexist on one line.//!@@ -289,7 +289,7 @@ mod tests {#[test]fn test_format_pipeline_summary_concurrent_then_concurrent() {// The canonical pipeline: two concurrent groups in sequence.- // post-start = [+ // post-create = [// { install = "npm install", setup = "setup-db" },// { build = "npm run build", lint = "npm run lint" },// ]diff --git a/src/commands/hook_commands.rs b/src/commands/hook_commands.rsindex 72e8d3e38..df87f80f1 100644--- a/src/commands/hook_commands.rs+++ b/src/commands/hook_commands.rs@@ -131,7 +131,7 @@ fn build_manual_hook_template_vars(.with_target(branch).with_target_worktree_path(worktree_path),// Switch hooks: base = current (we're "switching from" here)- HookType::PreSwitch | HookType::PreStart | HookType::PostStart | HookType::PostSwitch => {+ HookType::PreSwitch | HookType::PreCreate | HookType::PostCreate | HookType::PostSwitch => {TemplateVars::new().with_base(branch, worktree_path).with_target(branch)@@ -209,10 +209,10 @@ pub struct HookCliArgs<'a> {/// regardless of whether any template references the key.////// The `foreground` parameter controls execution mode for hooks that normally run-/// in background (post-start, post-switch):+/// in background (post-create, post-switch):/// - `None` = use default behavior for this hook type/// - `Some(true)` = run in foreground (for debugging)-/// - `Some(false)` = run in background (default for post-start/post-switch)+/// - `Some(false)` = run in background (default for post-create/post-switch)pub fn run_hook(hook_type: HookType,yes: bool,@@ -381,20 +381,12 @@ pub fn handle_hook_show(let approvals = Approvals::load().context("Failed to load approvals")?;let project_id = repo.project_identifier().ok();- // Parse hook type filter if provided- let filter: Option<HookType> = hook_type_filter.map(|s| match s {- "pre-switch" => HookType::PreSwitch,- "pre-start" | "post-create" => HookType::PreStart,- "post-start" => HookType::PostStart,- "post-switch" => HookType::PostSwitch,- "pre-commit" => HookType::PreCommit,- "post-commit" => HookType::PostCommit,- "pre-merge" => HookType::PreMerge,- "post-merge" => HookType::PostMerge,- "pre-remove" => HookType::PreRemove,- "post-remove" => HookType::PostRemove,- _ => unreachable!("clap validates hook type"),- });+ // Parse hook type filter if provided. clap's value parser already+ // validated the string (canonical name or deprecated `-start` alias);+ // `parse_hook_type` maps both to the canonical `HookType`.+ let filter: Option<HookType> = hook_type_filter+ .map(crate::cli::parse_hook_type)+ .transpose()?;// Build context for template expansion (only used if --expanded)// Need to keep CommandEnv alive for the lifetime of ctx@@ -608,7 +600,7 @@ fn render_project_hooks(return Ok(());};- // Collect all project hooks (get() handles post-create → pre-start merge)+ // Collect all project hookslet hooks: Vec<_> = HookType::iter().filter_map(|ht| config.hooks.get(ht).map(|cfg| (ht, cfg))).collect();diff --git a/src/commands/hook_plan.rs b/src/commands/hook_plan.rsindex 659b29c4f..084eca3a1 100644--- a/src/commands/hook_plan.rs+++ b/src/commands/hook_plan.rs@@ -12,7 +12,7 @@//! authorization (project templates ∈ [`Approvals`]) and rendering//! (template → shell string, needs live git) are three separate concerns.//! Operation-driven hooks (`pre-merge`, `post-merge`, `pre-remove`,-//! `post-remove`, `post-switch`, `pre-start`, `post-start`) are gated *before*+//! `post-remove`, `post-switch`, `pre-create`, `post-create`) are gated *before*//! a state mutation (auto-rebase rewrites the feature `.config/wt.toml`; a//! merge moves the target ref; a removal scrubs the worktree; `git worktree//! add` materializes a `--create` worktree) and executed *after* it. When@@ -312,7 +312,7 @@ fn render_planned(/// Foreground execution of a covered hook from the approved plan.///-/// Replaces `execute_hook` for `pre-merge` / `pre-remove` / `pre-start`. The+/// Replaces `execute_hook` for `pre-merge` / `pre-remove` / `pre-create`. The/// signature carries no config — only the plan, the render context, and the/// failure strategy.///@@ -343,7 +343,7 @@ pub fn execute_planned_hook(}/// Register a covered background hook (`post-merge` / `post-remove` /-/// `post-switch` / `post-start`) from the approved plan onto `announcer`.+/// `post-switch` / `post-create`) from the approved plan onto `announcer`.////// The plan-backed counterpart of `HookAnnouncer::register`: steps are/// rendered from the frozen selection and added via the announcer's existingdiff --git a/src/commands/hooks.rs b/src/commands/hooks.rsindex 0702de687..bdc114799 100644--- a/src/commands/hooks.rs+++ b/src/commands/hooks.rs@@ -11,7 +11,7 @@//! execution.//!//! **Plan-backed (the TOCTOU-covered set):** `pre-merge`, `post-merge`,-//! `pre-remove`, `post-remove`, `post-switch`, `pre-start`, `post-start`. A+//! `pre-remove`, `post-remove`, `post-switch`, `pre-create`, `post-create`. A//! merge, rebase, removal, or `git worktree add` runs between the gate and//! these hooks, so a second config read could select a command the user never//! approved. Each command gate selects the commands once and freezes them into@@ -24,7 +24,7 @@//! |---|---|---|//! | `pre-merge`, `pre-remove`, `post-remove` | the feature/removed worktree | `merge::approve_merge_plan`, `main.rs`'s `approve_remove`, `step::prune::approve_prune_hooks` |//! | `post-merge`, `post-switch` (after a removal) | the merge/removal destination | the same gates |-//! | `pre-start`, `post-start`, `post-switch` (on switch) | the new/destination worktree (the `--create` base ref's committed config, read via `git show` by `switch_hook_project_config`) | `worktree::switch::approve_switch_hooks` |+//! | `pre-create`, `post-create`, `post-switch` (on switch) | the new/destination worktree (the `--create` base ref's committed config, read via `git show` by `switch_hook_project_config`) | `worktree::switch::approve_switch_hooks` |//!//! **Invocation-resolved (no gate→exec mutation):** `pre-commit`,//! `post-commit`, `pre-switch`, `wt hook <type>`, aliases. They resolve configdiff --git a/src/commands/mod.rs b/src/commands/mod.rsindex 1ddd48c96..03533eac3 100644--- a/src/commands/mod.rs+++ b/src/commands/mod.rs@@ -75,8 +75,8 @@ use worktrunk::styling::{eprintln, format_with_gutter};/// Format command execution label with optional command name.////// Examples:-/// - `format_command_label("post-start", Some("install"))` → `"Running post-start install"` (with bold)-/// - `format_command_label("post-start", None)` → `"Running post-start"`+/// - `format_command_label("post-create", Some("install"))` → `"Running post-create install"` (with bold)+/// - `format_command_label("post-create", None)` → `"Running post-create"`pub(crate) fn format_command_label(command_type: &str, name: Option<&str>) -> String {match name {Some(name) => cformat!("Running {command_type} <bold>{name}</>"),@@ -203,9 +203,9 @@ mod tests {#[test]fn test_format_command_label() {use insta::assert_snapshot;- assert_snapshot!(format_command_label("post-start", Some("install")), @"Running post-start [1minstall[22m");+ assert_snapshot!(format_command_label("post-create", Some("install")), @"Running post-create [1minstall[22m");assert_snapshot!(format_command_label("pre-merge", None), @"Running pre-merge");- assert_snapshot!(format_command_label("post-start", Some("build")), @"Running post-start [1mbuild[22m");+ assert_snapshot!(format_command_label("post-create", Some("build")), @"Running post-create [1mbuild[22m");assert_snapshot!(format_command_label("pre-commit", None), @"Running pre-commit");}}diff --git a/src/commands/pipeline_spec.rs b/src/commands/pipeline_spec.rsindex fd60b031c..63a914d98 100644--- a/src/commands/pipeline_spec.rs+++ b/src/commands/pipeline_spec.rs@@ -53,7 +53,7 @@ mod tests {let spec = PipelineSpec {worktree_path: "/tmp/test-worktree".into(),branch: "feature/auth".into(),- hook_type: HookType::PostStart,+ hook_type: HookType::PostCreate,source: HookSource::User,context: [("branch".into(), "feature/auth".into())].into_iter()diff --git a/src/commands/process.rs b/src/commands/process.rsindex e12d51799..1ce544233 100644--- a/src/commands/process.rs+++ b/src/commands/process.rs@@ -40,7 +40,7 @@ pub enum InternalOp {////// Hook commands produce logs at: `{branch}/{source}/{hook-type}/{name}.log`/// (`source` is `user` or `project`)-/// - Example: `feature/user/post-start/server.log`+/// - Example: `feature/user/post-create/server.log`////// Per-branch internal operations produce logs at: `{branch}/internal/{op}.log`/// - Example: `feature/internal/remove.log`@@ -984,23 +984,23 @@ mod tests {let log_dir = Path::new("/repo/.git/wt/logs");// Hook path: {log_dir}/{sanitized-branch}/{source}/{hook-type}/{sanitized-name}.log- let log = HookLog::hook(HookSource::User, HookType::PostStart, "server");+ let log = HookLog::hook(HookSource::User, HookType::PostCreate, "server");assert_snapshot!(log.path(log_dir, "main").to_slash_lossy(),- @"/repo/.git/wt/logs/main/user/post-start/server.log"+ @"/repo/.git/wt/logs/main/user/post-create/server.log");// Slash in branch name gets sanitized (feature/auth → feature-auth-{hash})assert_snapshot!(log.path(log_dir, "feature/auth").to_slash_lossy(),- @"/repo/.git/wt/logs/feature-auth-j34/user/post-start/server.log"+ @"/repo/.git/wt/logs/feature-auth-j34/user/post-create/server.log");// Project source- let log = HookLog::hook(HookSource::Project, HookType::PreStart, "build");+ let log = HookLog::hook(HookSource::Project, HookType::PreCreate, "build");assert_snapshot!(log.path(log_dir, "main").to_slash_lossy(),- @"/repo/.git/wt/logs/main/project/pre-start/build.log"+ @"/repo/.git/wt/logs/main/project/pre-create/build.log");// Per-branch internal operation path: {log_dir}/{sanitized-branch}/internal/{op}.logdiff --git a/src/commands/project_config.rs b/src/commands/project_config.rsindex 099e29d38..358b87d8a 100644--- a/src/commands/project_config.rs+++ b/src/commands/project_config.rs@@ -88,7 +88,7 @@ mod tests {fn make_project_config_with_hooks() -> ProjectConfig {// Use TOML deserialization to create ProjectConfiglet toml_content = r#"-post-create = "npm install"+pre-create = "npm install"pre-merge = "cargo test""#;toml::from_str(toml_content).unwrap()@@ -104,7 +104,7 @@ pre-merge = "cargo test"#[test]fn test_collect_commands_for_hooks_single_hook() {let config = make_project_config_with_hooks();- let commands = collect_commands_for_hooks(&config, &[HookType::PreStart]);+ let commands = collect_commands_for_hooks(&config, &[HookType::PreCreate]);assert_eq!(commands.len(), 1);assert_eq!(commands[0].command.template, "npm install");}@@ -113,7 +113,7 @@ pre-merge = "cargo test"fn test_collect_commands_for_hooks_multiple_hooks() {let config = make_project_config_with_hooks();let commands =- collect_commands_for_hooks(&config, &[HookType::PreStart, HookType::PreMerge]);+ collect_commands_for_hooks(&config, &[HookType::PreCreate, HookType::PreMerge]);assert_eq!(commands.len(), 2);assert_eq!(commands[0].command.template, "npm install");assert_eq!(commands[1].command.template, "cargo test");@@ -122,7 +122,7 @@ pre-merge = "cargo test"#[test]fn test_collect_commands_for_hooks_missing_hook() {let config = make_project_config_with_hooks();- let commands = collect_commands_for_hooks(&config, &[HookType::PostStart]);+ let commands = collect_commands_for_hooks(&config, &[HookType::PostCreate]);assert!(commands.is_empty());}@@ -131,7 +131,7 @@ pre-merge = "cargo test"let config = make_project_config_with_hooks();// Order should match the order of hooks providedlet commands =- collect_commands_for_hooks(&config, &[HookType::PreMerge, HookType::PreStart]);+ collect_commands_for_hooks(&config, &[HookType::PreMerge, HookType::PreCreate]);assert_eq!(commands.len(), 2);assert_eq!(commands[0].command.template, "cargo test");assert_eq!(commands[1].command.template, "npm install");@@ -151,12 +151,12 @@ pre-merge = "cargo test"#[test]fn test_collect_commands_for_hooks_named_commands() {let toml_content = r#"-[post-create]+[pre-create]install = "npm install"build = "npm run build""#;let config: ProjectConfig = toml::from_str(toml_content).unwrap();- let commands = collect_commands_for_hooks(&config, &[HookType::PreStart]);+ let commands = collect_commands_for_hooks(&config, &[HookType::PreCreate]);assert_eq!(commands.len(), 2);// Named commands preserve order from TOMLassert_eq!(commands[0].command.name, Some("install".to_string()));@@ -166,8 +166,11 @@ build = "npm run build"#[test]fn test_collect_commands_for_hooks_phase_is_set() {let config = make_project_config_with_hooks();- let commands = collect_commands_for_hooks(&config, &[HookType::PreStart]);+ let commands = collect_commands_for_hooks(&config, &[HookType::PreCreate]);assert_eq!(commands.len(), 1);- assert!(matches!(commands[0].phase, Phase::Hook(HookType::PreStart)));+ assert!(matches!(+ commands[0].phase,+ Phase::Hook(HookType::PreCreate)+ ));}}diff --git a/src/commands/step/tether.rs b/src/commands/step/tether.rsindex a9dfe994a..53c64445f 100644--- a/src/commands/step/tether.rs+++ b/src/commands/step/tether.rs@@ -39,7 +39,7 @@ const POLL_INTERVAL: Duration = Duration::from_millis(250);/// Run `command` supervised; tear its whole process tree down when the command/// exits or its worktree is removed.pub(crate) fn step_tether(command: &[String]) -> Result<()> {- // post-start hooks run with cwd at the worktree root; capture it now so+ // post-create hooks run with cwd at the worktree root; capture it now so// the reaper can notice the worktree being removed. `None` (cwd// unavailable) degrades to "tear down only on the command's own exit",// never a false teardown.diff --git a/src/commands/worktree/hooks.rs b/src/commands/worktree/hooks.rsindex eab5de865..3aaec3594 100644--- a/src/commands/worktree/hooks.rs+++ b/src/commands/worktree/hooks.rs@@ -1,6 +1,6 @@//! Hook execution for worktree operations.//!-//! CommandContext implementations for pre-start hooks, and PostRemoveContext+//! CommandContext implementations for pre-create hooks, and PostRemoveContext//! for building template variables for post-remove hooks.use std::path::Path;@@ -14,14 +14,14 @@ use crate::commands::command_executor::FailureStrategy;use crate::commands::hook_plan::{ApprovedHookPlan, execute_planned_hook};impl<'a> CommandContext<'a> {- /// Execute pre-start commands sequentially (blocking) from the frozen plan.+ /// Execute pre-create commands sequentially (blocking) from the frozen plan.////// Runs user hooks first, then project hooks. `anchor` is the new- /// worktree's path — the gate selected `pre-start` under it from the+ /// worktree's path — the gate selected `pre-create` under it from the/// base-ref config; the executor never re-reads the (now on-disk) config./// Shows path in hook announcements when shell integration isn't active/// (the user's shell won't cd to the new worktree).- pub fn execute_pre_start_commands(+ pub fn execute_pre_create_commands(&self,extra_vars: &[(&str, &str)],plan: &ApprovedHookPlan,@@ -31,7 +31,7 @@ impl<'a> CommandContext<'a> {plan,anchor,self,- HookType::PreStart,+ HookType::PreCreate,extra_vars,FailureStrategy::FailFast,crate::output::post_hook_display_path(self.worktree_path),diff --git a/src/commands/worktree/switch.rs b/src/commands/worktree/switch.rsindex b557b5d65..b677e1fea 100644--- a/src/commands/worktree/switch.rs+++ b/src/commands/worktree/switch.rs@@ -1112,9 +1112,9 @@ pub fn execute_switch(}).map(|p| worktrunk::path::to_posix_path(&p.to_string_lossy()));- // PR/MR identity travels into both the pre-start hook below and the+ // PR/MR identity travels into both the pre-create hook below and the// SwitchResult — TemplateVars::for_post_switch then forwards it to- // background post-switch / post-start hooks.+ // background post-switch / post-create hooks.let (pr_number, pr_url) = match &method {CreationMethod::ForkRef {number, ref_url, ..@@ -1122,7 +1122,7 @@ pub fn execute_switch(CreationMethod::Regular { .. } => (None, None),};- // Execute pre-start commands. The hook resolves its `.config/wt.toml`+ // Execute pre-create commands. The hook resolves its `.config/wt.toml`// from the new worktree (created just above) — see// `hook_repo_for_worktree`.if run_hooks {@@ -1143,7 +1143,7 @@ pub fn execute_switch(vars = vars.with_pr(Some(*number), Some(ref_url));}}- ctx.execute_pre_start_commands(&vars.as_extra_vars(), hook_plan, &worktree_path)?;+ ctx.execute_pre_create_commands(&vars.as_extra_vars(), hook_plan, &worktree_path)?;}// Record successful switch in history@@ -1317,13 +1317,13 @@ pub(crate) fn run_pre_switch_hooks(/// Hook types that apply after a switch operation.///-/// Creates trigger pre-start + post-start + post-switch hooks;+/// Creates trigger pre-create + post-create + post-switch hooks;/// existing worktrees trigger only post-switch.fn switch_post_hook_types(is_create: bool) -> &'static [HookType] {if is_create {&[- HookType::PreStart,- HookType::PostStart,+ HookType::PreCreate,+ HookType::PostCreate,HookType::PostSwitch,]} else {@@ -1361,7 +1361,7 @@ fn base_ref_for_create(// Multiple remotes: replicate `git worktree add <branch>`'s DWIM — when// `checkout.defaultRemote` names one of these remotes, that's the ref the// new worktree will check out, so the hook preview must match. Without- // this, a `pre-start` on `<defaultRemote>/<branch>` could run unapproved+ // this, a `pre-create` on `<defaultRemote>/<branch>` could run unapproved// because the preview defaulted to `HEAD`.if remotes.len() > 1&& let Ok(Some(default)) = repo.config_value("checkout.defaultRemote")@@ -1372,8 +1372,8 @@ fn base_ref_for_create("HEAD".to_string()}-/// The `.config/wt.toml` that `wt switch`'s post-switch hooks (`pre-start` /-/// `post-start` / `post-switch`) will resolve against, viewed from *before*+/// The `.config/wt.toml` that `wt switch`'s post-switch hooks (`pre-create` /+/// `post-create` / `post-switch`) will resolve against, viewed from *before*/// the worktree is created — so the approval prompt and the pre-flight/// template validation see the exact config `execute_switch` //// [`spawn_switch_background_hooks`] (via [`hook_repo_for_worktree`]) read at@@ -1437,7 +1437,7 @@ fn hook_repo_for_worktree(worktree_path: &Path) -> anyhow::Result<Repository> {////// Returns `(hooks_approved, plan)`. `hooks_approved` is `false` and the plan/// empty when `!verify` or the user declined; the covered switch hooks-/// (`pre-start` / `post-start` / `post-switch`) execute only from `plan`.+/// (`pre-create` / `post-create` / `post-switch`) execute only from `plan`.pub(crate) fn approve_switch_hooks(repo: &Repository,config: &UserConfig,@@ -1477,7 +1477,7 @@ pub(crate) fn approve_switch_hooks(}}-/// Spawn post-switch (and post-start for creates) background hooks.+/// Spawn post-switch (and post-create for creates) background hooks.pub(crate) fn spawn_switch_background_hooks(config: &UserConfig,result: &SwitchResult,@@ -1511,7 +1511,7 @@ pub(crate) fn spawn_switch_background_hooks(hook_plan,result.path(),&ctx,- HookType::PostStart,+ HookType::PostCreate,extra_vars,hooks_display_path,)?;@@ -1722,7 +1722,7 @@ pub fn run_switch(// Spawn background hooks after success message// - post-switch: runs on ALL switches (shows "@ path" when shell won't be there)- // - post-start: runs only when creating a NEW worktree+ // - post-create: runs only when creating a NEW worktree// Batch hooks into a single message when both types are presentif hooks_approved {spawn_switch_background_hooks(@@ -1736,7 +1736,7 @@ pub fn run_switch()?;}- // Execute user command after post-start hooks have been spawned+ // Execute user command after post-create hooks have been spawned// Note: execute_args requires execute via clap's `requires` attributeif let Some(cmd) = execute {// Build template context for expansion (includes base vars when creating)@@ -1827,7 +1827,7 @@ pub fn run_switch(/// Validates:/// - `--execute` command template (if present)/// - `--execute` trailing arg templates (if present)-/// - Hook templates (pre-start, post-start, post-switch) from user and project config+/// - Hook templates (pre-create, post-create, post-switch) from user and project configpub(crate) fn validate_switch_templates(repo: &Repository,config: &UserConfig,diff --git a/src/completion.rs b/src/completion.rsindex 4dae6c18b..589d4bfd5 100644--- a/src/completion.rs+++ b/src/completion.rs@@ -267,8 +267,8 @@ impl ValueCompleter for HookCommandCompleter {let hook_type = CONTEXT.with(|ctx| {ctx.borrow().as_ref().and_then(|ctx| {for hook in &[- "pre-start",- "post-start",+ "pre-create",+ "post-create","pre-commit","post-commit","pre-merge",@@ -279,9 +279,12 @@ impl ValueCompleter for HookCommandCompleter {return Some(*hook);}}- // Deprecated alias: post-create → pre-start- if ctx.contains("post-create") {- return Some("pre-start");+ // Deprecated aliases still complete, mapped to the canonical name.+ if ctx.contains("pre-start") {+ return Some("pre-create");+ }+ if ctx.contains("post-start") {+ return Some("post-create");}None})diff --git a/src/config/commands.rs b/src/config/commands.rsindex 2fe56d8f8..a9b7488c8 100644--- a/src/config/commands.rs+++ b/src/config/commands.rs@@ -35,7 +35,7 @@//! Naming is user-visible: it changes the step from anonymous `Single` to//! named `Single`, which affects log file paths//! (`.../set-vars.log` vs. a positional slot) and hook-selection filtering-//! (`wt hook post-start <name>`).+//! (`wt hook post-create <name>`).use std::collections::BTreeMap;@@ -94,9 +94,9 @@ pub enum HookStep {/// Configuration for commands — canonical representation.////// Internally stores a pipeline of `HookStep`s. Deserializes from three TOML forms:-/// - Single string: `post-start = "npm install"`-/// - Named table: `[post-start]` with `name = "command"` entries → one Concurrent step-/// - Pipeline: `post-start = ["cmd", { a = "cmd1", b = "cmd2" }]` → serial steps+/// - Single string: `post-create = "npm install"`+/// - Named table: `[post-create]` with `name = "command"` entries → one Concurrent step+/// - Pipeline: `post-create = ["cmd", { a = "cmd1", b = "cmd2" }]` → serial steps////// **Order preservation:** Named commands preserve TOML insertion order (IndexMap).#[derive(Debug, Clone, PartialEq)]diff --git a/src/config/deprecation.rs b/src/config/deprecation.rsindex d2a599aae..3302fbe7e 100644--- a/src/config/deprecation.rs+++ b/src/config/deprecation.rs@@ -94,7 +94,9 @@ pub struct DeprecatedSection {pub canonical_display: &'static str,}-/// Top-level section keys that are deprecated and handled by the deprecation system.+/// Top-level keys that are deprecated and handled by the deprecation system —+/// renamed sections (`[commit-generation]` → `[commit.generation]`) and renamed+/// flattened hook keys (`pre-start` → `pre-create`).////// When a deprecated key appears in the config type where its canonical replacement/// is valid, `warn_unknown_fields` skips it (the deprecation system provides better@@ -116,6 +118,16 @@ pub const DEPRECATED_SECTION_KEYS: &[DeprecatedSection] = &[canonical_top_key: "forge",canonical_display: "[forge]",},+ DeprecatedSection {+ key: "pre-start",+ canonical_top_key: "pre-create",+ canonical_display: "pre-create",+ },+ DeprecatedSection {+ key: "post-start",+ canonical_top_key: "post-create",+ canonical_display: "post-create",+ },];/// Normalize a template string by replacing deprecated variables with their canonical names.@@ -302,8 +314,10 @@ pub struct Deprecations {pub approved_commands: bool,/// Has `[select]` section (moved to `[switch.picker]`)pub select: bool,- /// Has `[hooks.post-create]` (renamed to `[hooks.pre-start]`)- pub post_create: bool,+ /// Has a `pre-start` hook key (renamed to `pre-create`)+ pub pre_start: bool,+ /// Has a `post-start` hook key (renamed to `post-create`)+ pub post_start: bool,/// Has `[ci]` section (moved to `[forge]`)pub ci_section: bool,/// Has `no-ff` in `[merge]` section (use `ff` instead)@@ -323,7 +337,8 @@ impl Deprecations {&& self.commit_gen.is_empty()&& !self.approved_commands&& !self.select- && !self.post_create+ && !self.pre_start+ && !self.post_start&& !self.ci_section&& !self.no_ff&& !self.no_cd@@ -357,7 +372,8 @@ fn detect_deprecations_from_doc(commit_gen: find_commit_generation_from_doc(doc),approved_commands: find_approved_commands_from_doc(doc),select: find_select_from_doc(doc),- post_create: find_post_create_from_doc(doc),+ pre_start: find_pre_start_from_doc(doc),+ post_start: find_post_start_from_doc(doc),ci_section: find_ci_section_from_doc(doc),no_ff: find_negated_bool_from_doc(doc, "merge", "no-ff", "ff"),no_cd: find_negated_bool_from_doc(doc, "switch", "no-cd", "cd"),@@ -650,20 +666,34 @@ fn has_select_without_picker(table: &toml_edit::Table) -> bool {false}-fn find_post_create_from_doc(doc: &toml_edit::DocumentMut) -> bool {- // Top-level (user config or project config): hooks are flattened here- if doc.get("pre-start").is_none() && doc.get("post-create").is_some_and(is_non_empty_item) {+/// Find a `pre-start` hook key (renamed to `pre-create`).+fn find_pre_start_from_doc(doc: &toml_edit::DocumentMut) -> bool {+ find_renamed_hook_key(doc, "pre-start", "pre-create")+}++/// Find a `post-start` hook key (renamed to `post-create`).+fn find_post_start_from_doc(doc: &toml_edit::DocumentMut) -> bool {+ find_renamed_hook_key(doc, "post-start", "post-create")+}++/// Detect a hook key renamed from `old_key` to `new_key`.+///+/// Flags the deprecation when `old_key` is present (and non-empty) and `new_key`+/// is not — that is the case the migrator rewrites. When both are present the+/// migrator leaves `old_key` alone, so it is not flagged either.+///+/// Hooks are flattened into the top level of user config, project config, and+/// each `[projects."id"]` subtree, so all three locations are checked.+fn find_renamed_hook_key(doc: &toml_edit::DocumentMut, old_key: &str, new_key: &str) -> bool {+ if doc.get(new_key).is_none() && doc.get(old_key).is_some_and(is_non_empty_item) {return true;}- // Per-project overrides (user config): hooks are flattened into `[projects."id"]`if let Some(projects) = doc.get("projects").and_then(|p| p.as_table()) {for (_key, project_value) in projects.iter() {if let Some(project_table) = project_value.as_table()- && project_table.get("pre-start").is_none()- && project_table- .get("post-create")- .is_some_and(is_non_empty_item)+ && project_table.get(new_key).is_none()+ && project_table.get(old_key).is_some_and(is_non_empty_item){return true;}@@ -682,10 +712,43 @@ fn is_non_empty_item(item: &toml_edit::Item) -> bool {}}-/// Error message emitted when a config contains the removed `post-create`-/// hook key. Matches the wording used by `check_and_migrate` when the load-/// path converts detection into a fatal error.-const POST_CREATE_REMOVED_MSG: &str = "`post-create` hook was renamed to `pre-start` in v0.32.0 and the silent rewrite has been removed. Rename `post-create` to `pre-start` in your config.";+/// Rename the `pre-start`/`post-start` hook keys to `pre-create`/`post-create`.+fn migrate_start_hooks_doc(doc: &mut toml_edit::DocumentMut) -> bool {+ let mut modified = rename_hook_key(doc, "pre-start", "pre-create");+ modified |= rename_hook_key(doc, "post-start", "post-create");+ modified+}++/// Rename `old_key` to `new_key` at the top level and under each `[projects."..."]`.+///+/// Skips any location where `new_key` already exists — the user has already+/// consolidated there, and clobbering their canonical value would lose config.+/// The rewrite preserves the value shape (string, `[table]`, or+/// `[[array-of-tables]]`) since it moves the `Item` unchanged.+fn rename_hook_key(doc: &mut toml_edit::DocumentMut, old_key: &str, new_key: &str) -> bool {+ let mut modified = false;++ if doc.get(new_key).is_none()+ && let Some(value) = doc.remove(old_key)+ {+ doc.insert(new_key, value);+ modified = true;+ }++ if let Some(projects) = doc.get_mut("projects").and_then(|p| p.as_table_mut()) {+ for (_key, project_value) in projects.iter_mut() {+ if let Some(project_table) = project_value.as_table_mut()+ && project_table.get(new_key).is_none()+ && let Some(value) = project_table.remove(old_key)+ {+ project_table.insert(new_key, value);+ modified = true;+ }+ }+ }++ modified+}/// Migrate `[select]` sections to `[switch.picker]`.///@@ -754,7 +817,7 @@ fn migrate_select_table(table: &mut toml_edit::Table, modified: &mut bool) {/// The 5 canonical pre-* hook keys.const PRE_HOOK_KEYS: &[&str] = &["pre-switch",- "pre-start",+ "pre-create","pre-commit","pre-merge","pre-remove",@@ -1020,6 +1083,9 @@ fn migrate_content_doc(doc: &mut toml_edit::DocumentMut) -> bool {let mut modified = false;modified |= migrate_commit_generation_doc(doc);modified |= migrate_select_doc(doc);+ // Rename `-start` hooks to `-create` before the table-form pass, which+ // keys off `PRE_HOOK_KEYS` (now `pre-create`, not `pre-start`).+ modified |= migrate_start_hooks_doc(doc);modified |= migrate_pre_hook_table_form_doc(doc);modified |= migrate_ci_doc(doc);modified |= migrate_negated_bool_doc(doc, "merge", "no-ff", "ff");@@ -1317,10 +1383,6 @@ pub fn check_and_migrate(Err(_) => (Deprecations::default(), content.to_string()),};- if deprecations.post_create {- return Err(anyhow::anyhow!("{label}: {POST_CREATE_REMOVED_MSG}"));- }-if deprecations.is_empty() {return Ok(CheckAndMigrateResult {info: None,@@ -1365,17 +1427,25 @@ pub fn check_and_migrate(// For non-config-show commands, emit per-kind warnings but skip the diff.// The diff is reserved for `wt config show`, where the user has opted into details.+ //+ // Some deprecations migrate silently (e.g. the `-start` → `-create` hook+ // rename): `format_deprecation_warnings` emits nothing for them. The hint is+ // gated on the warning text being non-empty so a silently-migrated config+ // produces no stray "run wt config show" line with nothing above it.if emit_inline_warnings && !warnings_suppressed() {- eprint!("{}", format_deprecation_warnings(&info));- if DEPRECATION_HINT_EMITTED.set(()).is_ok() {- eprintln!(- "{}",- hint_message(cformat!(- "To see details, run <underline>wt config show</>; to apply updates, run <underline>wt config update</>"- ))- );+ let warnings = format_deprecation_warnings(&info);+ if !warnings.is_empty() {+ eprint!("{warnings}");+ if DEPRECATION_HINT_EMITTED.set(()).is_ok() {+ eprintln!(+ "{}",+ hint_message(cformat!(+ "To see details, run <underline>wt config show</>; to apply updates, run <underline>wt config update</>"+ ))+ );+ }+ std::io::stderr().flush().ok();}- std::io::stderr().flush().ok();}Ok(CheckAndMigrateResult {@@ -1877,11 +1947,29 @@ mod tests {.is_some_and(|doc| find_select_from_doc(&doc))}- fn find_post_create_deprecation(content: &str) -> bool {+ fn find_pre_start_deprecation(content: &str) -> bool {content.parse::<toml_edit::DocumentMut>().ok()- .is_some_and(|doc| find_post_create_from_doc(&doc))+ .is_some_and(|doc| find_pre_start_from_doc(&doc))+ }++ fn find_post_start_deprecation(content: &str) -> bool {+ content+ .parse::<toml_edit::DocumentMut>()+ .ok()+ .is_some_and(|doc| find_post_start_from_doc(&doc))+ }++ fn migrate_start_hooks(content: &str) -> String {+ let Ok(mut doc) = content.parse::<toml_edit::DocumentMut>() else {+ return content.to_string();+ };+ if migrate_start_hooks_doc(&mut doc) {+ doc.to_string()+ } else {+ content.to_string()+ }}fn migrate_commit_generation_sections(content: &str) -> String {@@ -2030,8 +2118,8 @@ post-create = "cd {{ worktree_path }} && npm install"/// while detection still warned. The toml_edit-tree rewrite handles it.#[test]fn test_replace_deprecated_vars_with_escaped_quotes() {- // Source TOML: pre-start = "echo \"{{ repo_root }}\""- let content = r#"pre-start = "echo \"{{ repo_root }}\"""#;+ // Source TOML: pre-create = "echo \"{{ repo_root }}\""+ let content = r#"pre-create = "echo \"{{ repo_root }}\"""#;let result = replace_deprecated_vars(content);assert!(!result.contains("repo_root"),@@ -2046,7 +2134,7 @@ post-create = "cd {{ worktree_path }} && npm install"/// Same, exercised through the public `compute_migrated_content` entry.#[test]fn test_compute_migrated_content_escaped_quotes() {- let content = "pre-start = \"echo \\\"{{ repo_root }}\\\"\"\n";+ let content = "pre-create = \"echo \\\"{{ repo_root }}\\\"\"\n";let migrated = compute_migrated_content(content);assert!(!migrated.contains("repo_root"),@@ -2146,7 +2234,7 @@ timeout = 30/// `compute_migrated_content` byte-for-byte (the unmodified branch).#[test]fn test_compute_migrated_content_noop_returns_input_unchanged() {- let content = "pre-start = \"echo {{ repo_path }}\"\n";+ let content = "pre-create = \"echo {{ repo_path }}\"\n";assert_eq!(compute_migrated_content(content), content);}@@ -3101,7 +3189,8 @@ approved-commands = ["npm install"]commit_gen: CommitGenerationDeprecations::default(),approved_commands: true,select: false,- post_create: false,+ pre_start: false,+ post_start: false,ci_section: false,no_ff: false,no_cd: false,@@ -3476,7 +3565,8 @@ pager = "delta --paging=never"commit_gen: CommitGenerationDeprecations::default(),approved_commands: false,select: true,- post_create: false,+ pre_start: false,+ post_start: false,ci_section: false,no_ff: false,no_cd: false,@@ -3515,75 +3605,125 @@ pager = "delta --paging=never");}- // --- post-create → pre-start deprecation tests ---+ // --- pre-start/post-start → pre-create/post-create rename tests ---#[test]- fn test_find_post_create_deprecation_none() {- // No post-create, no deprecation+ fn test_find_start_hook_deprecation_none() {+ // Canonical `-create` keys: no deprecation.let content = r#"-pre-start = "npm install"+pre-create = "npm install"+post-create = "npm run dev""#;- assert!(!find_post_create_deprecation(content));+ assert!(!find_pre_start_deprecation(content));+ assert!(!find_post_start_deprecation(content));}#[test]- fn test_find_post_create_deprecation_top_level() {- // Project config format: bare key- let content = r#"-post-create = "npm install"-"#;- assert!(find_post_create_deprecation(content));+ fn test_find_start_hook_deprecation_top_level() {+ assert!(find_pre_start_deprecation("pre-start = \"npm install\"\n"));+ assert!(find_post_start_deprecation(+ "post-start = \"npm run dev\"\n"+ ));}#[test]- fn test_find_post_create_deprecation_project_level() {+ fn test_find_start_hook_deprecation_project_level() {// User config format: hooks flattened into [projects."..."]let content = r#"[projects."my-project"]-post-create = "npm install"+pre-start = "npm install""#;- assert!(find_post_create_deprecation(content));+ assert!(find_pre_start_deprecation(content));}#[test]- fn test_find_post_create_deprecation_named_commands() {- // Named command table format+ fn test_find_start_hook_deprecation_named_commands() {+ // Named command table formlet content = r#"-[post-create]+[pre-start]lint = "npm run lint"build = "npm run build""#;- assert!(find_post_create_deprecation(content));+ assert!(find_pre_start_deprecation(content));+ }++ #[test]+ fn test_find_start_hook_deprecation_empty_table_not_flagged() {+ // Empty [pre-start] table is a no-op — don't flag.+ assert!(!find_pre_start_deprecation("[pre-start]\n"));}#[test]- fn test_find_post_create_deprecation_empty_table_not_flagged() {- // Empty [post-create] table is a no-op — don't warn+ fn test_find_start_hook_deprecation_skips_when_create_exists_top_level() {+ // Both present at top level — the migrator leaves the old key alone.let content = r#"-[post-create]+pre-start = "old"+pre-create = "new"+"#;+ assert!(!find_pre_start_deprecation(content));+ }++ #[test]+ fn test_find_start_hook_deprecation_skips_when_create_exists_project() {+ let content = r#"+[projects."my-project"]+post-start = "old"+post-create = "new""#;- assert!(!find_post_create_deprecation(content));+ assert!(!find_post_start_deprecation(content));}#[test]- fn test_find_post_create_deprecation_skips_when_pre_start_exists_top_level() {- // Both present at top level — don't flag+ fn test_migrate_start_hooks_top_level() {let content = r#"-post-create = "old"-pre-start = "new"+pre-start = "npm install"++[post-start]+server = "npm run dev""#;- assert!(!find_post_create_deprecation(content));+ let result = migrate_start_hooks(content);+ assert!(result.contains("pre-create"), "got: {result}");+ assert!(result.contains("[post-create]"), "got: {result}");+ assert!(!result.contains("pre-start"), "got: {result}");+ assert!(!result.contains("post-start"), "got: {result}");}#[test]- fn test_find_post_create_deprecation_skips_when_pre_start_exists_project() {- // Both present in project hooks — don't flag+ fn test_migrate_start_hooks_project_level() {let content = r#"[projects."my-project"]-post-create = "old"-pre-start = "new"+pre-start = "npm install""#;- assert!(!find_post_create_deprecation(content));+ let result = migrate_start_hooks(content);+ assert!(result.contains("pre-create"), "got: {result}");+ assert!(!result.contains("pre-start"), "got: {result}");+ }++ #[test]+ fn test_migrate_start_hooks_skips_when_create_exists() {+ let content = r#"+pre-start = "old"+pre-create = "new"+"#;+ let result = migrate_start_hooks(content);+ assert_eq!(result, content, "must not clobber an existing pre-create");+ }++ #[test]+ fn test_migrate_start_hooks_invalid_toml() {+ let content = "this is { not valid toml";+ assert_eq!(migrate_start_hooks(content), content);+ }++ #[test]+ fn snapshot_migrate_start_to_create() {+ let content = r#"pre-start = "npm install"++[post-start]+server = "npm run dev"+"#;+ let migrated = compute_migrated_content(content);+ insta::assert_snapshot!(migration_diff(content, &migrated));}fn migrate_switch_picker_timeout(content: &str) -> String {@@ -3720,12 +3860,13 @@ pager = "delta"}#[test]- fn test_detect_deprecations_includes_post_create() {- let content = r#"-post-create = "npm install"-"#;- let deprecations = detect_deprecations(content);- assert!(deprecations.post_create);+ fn test_detect_deprecations_includes_start_hooks() {+ let deprecations = detect_deprecations("pre-start = \"npm install\"\n");+ assert!(deprecations.pre_start);+ assert!(!deprecations.is_empty());++ let deprecations = detect_deprecations("post-start = \"npm run dev\"\n");+ assert!(deprecations.post_start);assert!(!deprecations.is_empty());}@@ -3740,7 +3881,8 @@ post-create = "npm install"commit_gen: CommitGenerationDeprecations::default(),approved_commands: false,select: false,- post_create: false,+ pre_start: false,+ post_start: false,ci_section: false,no_ff: true,no_cd: true,@@ -3989,7 +4131,7 @@ ff = truea = "1"b = "2"-[pre-start]+[pre-create]a = "1"b = "2"@@ -4010,7 +4152,7 @@ b = "2"found,vec!["pre-switch",- "pre-start",+ "pre-create","pre-commit","pre-merge","pre-remove"@@ -4022,12 +4164,12 @@ b = "2"fn test_detect_pre_hook_table_form_per_project() {// Per-project overrides: hooks are flattened under [projects."id"]let content = r#"-[projects."github.com/user/repo".pre-start]+[projects."github.com/user/repo".pre-create]install = "npm ci"build = "npm run build""#;let found = find_pre_hook_table_form(content);- assert_eq!(found, vec!["projects.\"github.com/user/repo\".pre-start"]);+ assert_eq!(found, vec!["projects.\"github.com/user/repo\".pre-create"]);}#[test]@@ -4083,14 +4225,14 @@ third = "3"#[test]fn test_migrate_pre_hook_table_form_per_project() {let content = r#"-[projects."web".pre-start]+[projects."web".pre-create]install = "npm ci"build = "npm run build""#;let result = migrate_pre_hook_table_form(content);let doc: toml_edit::DocumentMut = result.parse().unwrap();let project = doc["projects"]["web"].as_table().unwrap();- let arr = project["pre-start"]+ let arr = project["pre-create"].as_array_of_tables().expect("should be array of tables");assert_eq!(arr.len(), 2);@@ -4123,9 +4265,11 @@ no-ff = truetest = "cargo test"lint = "cargo clippy"-[post-start]+[post-create]server = "npm run dev""#;+ // migrate_pre_hook_table_form only transforms pre-* pipeline hooks;+ // post-create is a post-* hook and must pass through untouched.let result = migrate_pre_hook_table_form(content);insta::assert_snapshot!(migration_diff(content, &result));}diff --git a/src/config/expansion.rs b/src/config/expansion.rsindex c4d96035e..40fa9d54d 100644--- a/src/config/expansion.rs+++ b/src/config/expansion.rs@@ -143,12 +143,12 @@ fn hook_extras(hook_type: HookType) -> &'static [&'static str] {"pr_number","pr_url",],- // Create/start: source worktree (`base`) and newly-created destination+ // Create: source worktree (`base`) and newly-created destination// (`target`). On create, the destination branch equals the bare `branch`// var — `target` is accepted for template portability with switch hooks.// `pr_number`/`pr_url` are populated when creating via `pr:N` / `mr:N`// (GitLab MRs reuse the same `pr_*` names).- PreStart | PostStart => &[+ PreCreate | PostCreate => &["base","base_worktree_path","target",@@ -819,7 +819,7 @@ pub fn validate_template_syntax(template: &str, name: &str) -> Result<(), miniji/// available in `scope` (see [`vars_available_in`]). Catches syntax errors and/// undefined variable references *before* irreversible operations like worktree/// creation — including context-mismatch typos like `{{ args }}` in a hook or-/// `{{ target }}` in a `pre-start` hook.+/// `{{ target }}` in a `pre-create` hook.////// This is deliberately more permissive than real expansion: conditional vars/// like `upstream` are provided even when they may be absent at runtime. A@@ -2597,7 +2597,7 @@ mod tests {#[test]fn test_validate_template_valid() {let test = test_repo();- let hook = ValidationScope::Hook(HookType::PostStart);+ let hook = ValidationScope::Hook(HookType::PostCreate);// Static textassert!(validate_template("echo hello", hook, &test.repo, "test").is_ok());@@ -2663,11 +2663,11 @@ mod tests {err.message);- // `base` is available in pre-start.+ // `base` is available in pre-create.assert!(validate_template("{{ base }}",- ValidationScope::Hook(HookType::PreStart),+ ValidationScope::Hook(HookType::PreCreate),&test.repo,"test")@@ -2700,18 +2700,18 @@ mod tests {);assert!(err.message.contains("targte"), "got: {}", err.message);- // `pr_number`/`pr_url` are available in pre-start (populated when+ // `pr_number`/`pr_url` are available in pre-create (populated when// creating via `pr:N` / `mr:N`).for var in ["pr_number", "pr_url"] {assert!(validate_template(&format!("{{{{ {var} }}}}"),- ValidationScope::Hook(HookType::PreStart),+ ValidationScope::Hook(HookType::PreCreate),&test.repo,"test").is_ok(),- "{var} should validate in pre-start scope"+ "{var} should validate in pre-create scope");}@@ -2733,7 +2733,7 @@ mod tests {assert!(validate_template("{{ args }}",- ValidationScope::Hook(HookType::PreStart),+ ValidationScope::Hook(HookType::PreCreate),&test.repo,"test",)@@ -2779,7 +2779,7 @@ mod tests {let err = validate_template("{{ nonexistent_var }}",- ValidationScope::Hook(HookType::PostStart),+ ValidationScope::Hook(HookType::PostCreate),&test.repo,"test",)diff --git a/src/config/hooks.rs b/src/config/hooks.rsindex 7e2380edf..e88539c48 100644--- a/src/config/hooks.rs+++ b/src/config/hooks.rs@@ -24,25 +24,21 @@ pub struct HooksConfig {)]pub post_switch: Option<CommandConfig>,- /// Commands to execute before worktree start (blocking)- #[serde(default, rename = "pre-start", skip_serializing_if = "Option::is_none")]- pub pre_start: Option<CommandConfig>,-- /// Deprecated: use `pre-start` instead.+ /// Commands to execute before worktree creation (blocking)#[serde(default,- rename = "post-create",+ rename = "pre-create",skip_serializing_if = "Option::is_none")]- pub post_create: Option<CommandConfig>,+ pub pre_create: Option<CommandConfig>,/// Commands to execute after worktree creation (background)#[serde(default,- rename = "post-start",+ rename = "post-create",skip_serializing_if = "Option::is_none")]- pub post_start: Option<CommandConfig>,+ pub post_create: Option<CommandConfig>,/// Commands to execute before committing during merge (blocking, fail-fast)#[serde(@@ -94,9 +90,8 @@ impl HooksConfig {match hook {HookType::PreSwitch => self.pre_switch.as_ref(),HookType::PostSwitch => self.post_switch.as_ref(),- // pre-start merges with deprecated post-create (pre-start takes precedence)- HookType::PreStart => self.pre_start.as_ref().or(self.post_create.as_ref()),- HookType::PostStart => self.post_start.as_ref(),+ HookType::PreCreate => self.pre_create.as_ref(),+ HookType::PostCreate => self.post_create.as_ref(),HookType::PreCommit => self.pre_commit.as_ref(),HookType::PostCommit => self.post_commit.as_ref(),HookType::PreMerge => self.pre_merge.as_ref(),@@ -126,21 +121,12 @@ impl Merge for HooksConfig {/// Merge two hook configs using append semantics.////// Both global and per-project hooks run (global first, then per-project).- /// Deprecated `post_create` from either source is folded into `pre_start`- /// so hooks aren't silently dropped when one config uses the old name and- /// another uses the new name.fn merge_with(&self, other: &Self) -> Self {- // Fold post_create into pre_start for each source before merging,- // so cross-config old/new name combinations work correctly.- let self_pre_start = merge_append_hooks(&self.pre_start, &self.post_create);- let other_pre_start = merge_append_hooks(&other.pre_start, &other.post_create);-Self {pre_switch: merge_append_hooks(&self.pre_switch, &other.pre_switch),post_switch: merge_append_hooks(&self.post_switch, &other.post_switch),- pre_start: merge_append_hooks(&self_pre_start, &other_pre_start),- post_create: None, // folded into pre_start above- post_start: merge_append_hooks(&self.post_start, &other.post_start),+ pre_create: merge_append_hooks(&self.pre_create, &other.pre_create),+ post_create: merge_append_hooks(&self.post_create, &other.post_create),pre_commit: merge_append_hooks(&self.pre_commit, &other.pre_commit),post_commit: merge_append_hooks(&self.post_commit, &other.post_commit),pre_merge: merge_append_hooks(&self.pre_merge, &other.pre_merge),diff --git a/src/config/mod.rs b/src/config/mod.rsindex 9e41477c5..d49d24869 100644--- a/src/config/mod.rs+++ b/src/config/mod.rs@@ -309,12 +309,12 @@ mod tests {#[test]fn test_command_config_named() {let toml = r#"- [post-start]+ [post-create]server = "npm run dev"watch = "npm run watch""#;let config: ProjectConfig = toml::from_str(toml).unwrap();- let cmd_config = config.hooks.post_start.unwrap();+ let cmd_config = config.hooks.post_create.unwrap();let commands: Vec<_> = cmd_config.commands().collect();assert_eq!(commands.len(), 2);// Preserves TOML insertion order@@ -361,14 +361,14 @@ mod tests {#[test]fn test_command_config_task_order() {- // Test exact ordering as used in post_start tests+ // Test exact ordering as used in post_create testslet toml = r#"-[post-start]+[post-create]task1 = "echo 'Task 1 running' > task1.txt"task2 = "echo 'Task 2 running' > task2.txt""#;let config: ProjectConfig = toml::from_str(toml).unwrap();- let cmd_config = config.hooks.post_start.unwrap();+ let cmd_config = config.hooks.post_create.unwrap();let commands: Vec<_> = cmd_config.commands().collect();assert_eq!(commands.len(), 2);@@ -385,19 +385,6 @@ task2 = "echo 'Task 2 running' > task2.txt");}- #[test]- fn test_project_config_both_commands() {- let toml = r#"- post-create = "npm install"-- [post-start]- server = "npm run dev"- "#;- let config: ProjectConfig = toml::from_str(toml).unwrap();- assert!(config.hooks.post_create.is_some());- assert!(config.hooks.post_start.is_some());- }-#[test]fn test_pre_merge_command_single() {let toml = r#"pre-merge = "cargo test""#;@@ -451,7 +438,7 @@ task2 = "echo 'Task 2 running' > task2.txt"#[test]fn test_command_config_roundtrip_named() {let original = r#"- [post-start]+ [post-create]server = "npm run dev"watch = "npm run watch""#;@@ -460,7 +447,7 @@ task2 = "echo 'Task 2 running' > task2.txt"let config2: ProjectConfig = toml::from_str(&serialized).unwrap();assert_eq!(config, config2);assert_snapshot!(serialized, @r#"- [post-start]+ [post-create]server = "npm run dev"watch = "npm run watch""#);diff --git a/src/config/project.rs b/src/config/project.rsindex 7cfded836..d905bea82 100644--- a/src/config/project.rs+++ b/src/config/project.rs@@ -272,7 +272,7 @@ impl ProjectConfig {// emit_inline_warnings=true: print per-kind warnings inline during config loadlet is_main_worktree = !repo.current_worktree().is_linked().unwrap_or(true);let repo_for_hints = if write_hints { Some(repo) } else { None };- super::deprecation::check_and_migrate(+ let migrated = super::deprecation::check_and_migrate(&config_path,&contents,is_main_worktree,@@ -280,9 +280,12 @@ impl ProjectConfig {repo_for_hints,true, // emit_inline_warnings)- .map_err(|e| ConfigError(e.to_string()))?;+ .map_err(|e| ConfigError(e.to_string()))?+ .migrated_content;// Warn about unknown fields (only in main worktree where it's actionable).+ // Runs on the raw contents so deprecated keys are detected as written;+ // `DEPRECATED_SECTION_KEYS` defers them to the deprecation messaging.if is_main_worktree {super::deprecation::warn_unknown_fields::<ProjectConfig>(&contents,@@ -291,7 +294,9 @@ impl ProjectConfig {);}- let config: ProjectConfig = toml::from_str(&contents).map_err(|e| {+ // Deserialize the structurally migrated content so deprecated keys+ // (e.g. `pre-start`/`post-start`) still load into their canonical fields.+ let config: ProjectConfig = toml::from_str(&migrated).map_err(|e| {ConfigError(format!("Project config at {} failed to parse:\n{e}",crate::path::format_path_for_display(&config_path),@@ -326,22 +331,28 @@ mod tests {#[test]fn test_deserialize_all_hooks() {let contents = r#"-post-create = "npm install"-post-start = "npm run watch"+pre-switch = "echo switching"post-switch = "rename-tab"+pre-create = "npm install"+post-create = "npm run watch"pre-commit = "cargo fmt --check"+post-commit = "echo committed"pre-merge = "cargo test"post-merge = "git push"pre-remove = "echo bye"+post-remove = "echo removed""#;let config: ProjectConfig = toml::from_str(contents).unwrap();- assert!(config.hooks.post_create.is_some());- assert!(config.hooks.post_start.is_some());+ assert!(config.hooks.pre_switch.is_some());assert!(config.hooks.post_switch.is_some());+ assert!(config.hooks.pre_create.is_some());+ assert!(config.hooks.post_create.is_some());assert!(config.hooks.pre_commit.is_some());+ assert!(config.hooks.post_commit.is_some());assert!(config.hooks.pre_merge.is_some());assert!(config.hooks.post_merge.is_some());assert!(config.hooks.pre_remove.is_some());+ assert!(config.hooks.post_remove.is_some());}// ============================================================================diff --git a/src/config/snapshots/worktrunk__config__deprecation__tests__snapshot_migrate_pre_hook_table_form.snap b/src/config/snapshots/worktrunk__config__deprecation__tests__snapshot_migrate_pre_hook_table_form.snapindex a3342f01e..4ec82e1ee 100644--- a/src/config/snapshots/worktrunk__config__deprecation__tests__snapshot_migrate_pre_hook_table_form.snap+++ b/src/config/snapshots/worktrunk__config__deprecation__tests__snapshot_migrate_pre_hook_table_form.snap@@ -9,5 +9,5 @@ expression: "migration_diff(content, &result)"+[[pre-merge]]lint = "cargo clippy"- [post-start]+ [post-create]server = "npm run dev"diff --git a/src/config/snapshots/worktrunk__config__deprecation__tests__snapshot_migrate_start_to_create.snap b/src/config/snapshots/worktrunk__config__deprecation__tests__snapshot_migrate_start_to_create.snapnew file mode 100644index 000000000..a02646256--- /dev/null+++ b/src/config/snapshots/worktrunk__config__deprecation__tests__snapshot_migrate_start_to_create.snap@@ -0,0 +1,10 @@+---+source: src/config/deprecation.rs+expression: "migration_diff(content, &migrated)"+---+-pre-start = "npm install"++pre-create = "npm install"++-[post-start]++[post-create]+ server = "npm run dev"diff --git a/src/config/user/tests.rs b/src/config/user/tests.rsindex 80a445533..b0c74f672 100644--- a/src/config/user/tests.rs+++ b/src/config/user/tests.rs@@ -86,9 +86,6 @@ exclude = [".conductor/"][post-create]run = "npm install"-[post-start]-run = "npm run build"-[post-switch]rename-tab = "echo 'switched'""#;@@ -1883,24 +1880,24 @@ fn parse_hooks(toml_str: &str) -> HooksConfig {#[test]fn test_hooks_merge_append_semantics() {- // Global has post-start, per-project has post-start+ // Global has post-create, per-project has post-create// Both should run (global first, then per-project)let mut config = UserConfig {- hooks: parse_hooks("post-start = \"echo global\""),+ hooks: parse_hooks("post-create = \"echo global\""),..Default::default()};config.projects.insert("github.com/user/repo".to_string(),UserProjectOverrides {- hooks: parse_hooks("post-start = \"echo project\""),+ hooks: parse_hooks("post-create = \"echo project\""),..Default::default()},);let effective = config.hooks(Some("github.com/user/repo"));- let post_start = effective.post_start.unwrap();- let commands: Vec<_> = post_start.commands().collect();+ let post_create = effective.post_create.unwrap();+ let commands: Vec<_> = post_create.commands().collect();assert_eq!(commands.len(), 2);assert_eq!(commands[0].template, "echo global");assert_eq!(commands[1].template, "echo project");@@ -1910,13 +1907,13 @@ fn test_hooks_merge_append_semantics() {fn test_hooks_no_project_override_uses_global() {// Global has hooks, project doesn't - global hooks usedlet config = UserConfig {- hooks: parse_hooks("post-start = \"echo global\""),+ hooks: parse_hooks("post-create = \"echo global\""),..Default::default()};let effective = config.hooks(Some("github.com/other/repo"));- let post_start = effective.post_start.unwrap();- let commands: Vec<_> = post_start.commands().collect();+ let post_create = effective.post_create.unwrap();+ let commands: Vec<_> = post_create.commands().collect();assert_eq!(commands.len(), 1);assert_eq!(commands[0].template, "echo global");}@@ -1929,24 +1926,24 @@ fn test_hooks_project_only_no_global() {config.projects.insert("github.com/user/repo".to_string(),UserProjectOverrides {- hooks: parse_hooks("post-start = \"echo project\""),+ hooks: parse_hooks("post-create = \"echo project\""),..Default::default()},);let effective = config.hooks(Some("github.com/user/repo"));- let post_start = effective.post_start.unwrap();- let commands: Vec<_> = post_start.commands().collect();+ let post_create = effective.post_create.unwrap();+ let commands: Vec<_> = post_create.commands().collect();assert_eq!(commands.len(), 1);assert_eq!(commands[0].template, "echo project");}#[test]fn test_hooks_different_hook_types_not_merged() {- // Global has post-start, per-project has pre-commit+ // Global has post-create, per-project has pre-commit// These should remain separate (different hook types)let mut config = UserConfig {- hooks: parse_hooks("post-start = \"echo global-start\""),+ hooks: parse_hooks("post-create = \"echo global-start\""),..Default::default()};@@ -1960,9 +1957,9 @@ fn test_hooks_different_hook_types_not_merged() {let effective = config.hooks(Some("github.com/user/repo"));- // post-start: only global- let post_start = effective.post_start.unwrap();- let start_commands: Vec<_> = post_start.commands().collect();+ // post-create: only global+ let post_create = effective.post_create.unwrap();+ let start_commands: Vec<_> = post_create.commands().collect();assert_eq!(start_commands.len(), 1);assert_eq!(start_commands[0].template, "echo global-start");@@ -1977,13 +1974,13 @@ fn test_hooks_different_hook_types_not_merged() {fn test_hooks_none_project_uses_global() {// When no project is provided, only global hooks are usedlet config = UserConfig {- hooks: parse_hooks("post-start = \"echo global\""),+ hooks: parse_hooks("post-create = \"echo global\""),..Default::default()};let effective = config.hooks(None);- let post_start = effective.post_start.unwrap();- let commands: Vec<_> = post_start.commands().collect();+ let post_create = effective.post_create.unwrap();+ let commands: Vec<_> = post_create.commands().collect();assert_eq!(commands.len(), 1);assert_eq!(commands[0].template, "echo global");}@@ -2067,12 +2064,12 @@ fn test_valid_user_config_keys_all_deserialize() {#[test]fn test_hooks_merge_mixed_formats_preserves_order() {// Global uses string format (unnamed command)- let global_hooks = parse_hooks(r#"post-start = "npm install""#);+ let global_hooks = parse_hooks(r#"post-create = "npm install""#);// Per-project uses table format (named commands)let project_hooks = parse_hooks(r#"-[post-start]+[post-create]setup = "echo setup""#,);@@ -2092,7 +2089,7 @@ setup = "echo setup"// Verify merge preserves order: global first, then projectlet effective = config.hooks(Some("github.com/user/repo"));- let commands: Vec<_> = effective.post_start.as_ref().unwrap().commands().collect();+ let commands: Vec<_> = effective.post_create.as_ref().unwrap().commands().collect();assert_eq!(commands.len(), 2);assert_eq!(commands[0].template, "npm install"); // Global firstassert_eq!(commands[1].template, "echo setup"); // Project second@@ -2104,14 +2101,14 @@ fn test_hooks_merge_same_names_both_run() {// Both define "test" command - both should executelet global_hooks = parse_hooks(r#"-[post-start]+[post-create]test = "cargo test""#,);let project_hooks = parse_hooks(r#"-[post-start]+[post-create]test = "npm test""#,);@@ -2131,7 +2128,7 @@ test = "npm test"// Both commands present, global firstlet effective = config.hooks(Some("github.com/user/repo"));- let commands: Vec<_> = effective.post_start.as_ref().unwrap().commands().collect();+ let commands: Vec<_> = effective.post_create.as_ref().unwrap().commands().collect();assert_eq!(commands.len(), 2);assert_eq!(commands[0].template, "cargo test");assert_eq!(commands[1].template, "npm test");@@ -2278,56 +2275,17 @@ fn test_hooks_merge_trait_appends_for_global_project_merge() {assert_eq!(commands[1].template, "project-lint"); // Project second}-#[test]-fn test_hooks_merge_folds_post_create_into_pre_start() {- // User config uses deprecated `post-create`, project uses `pre-start`.- // merge_with should combine them so the user's hook isn't silently dropped.- let user_hooks = parse_hooks("post-create = \"npm install\"");- let project_hooks = parse_hooks("pre-start = \"cargo test\"");-- let merged = user_hooks.merge_with(&project_hooks);- let pre_start = merged- .get(HookType::PreStart)- .expect("should have pre-start");- let commands: Vec<_> = pre_start.commands().collect();- assert_eq!(commands.len(), 2, "Both hooks should be present");- assert_eq!(commands[0].template, "npm install"); // User's post-create first- assert_eq!(commands[1].template, "cargo test"); // Project's pre-start second-}--#[test]-fn test_hooks_merge_same_source_both_pre_start_and_post_create() {- // Single config with both fields — merge_with folds post_create into pre_start.- // This is an unusual config (user wrote both), but if it goes through merge- // both commands should run rather than silently dropping one.- let both = parse_hooks("pre-start = \"npm install\"\npost-create = \"cargo build\"");- let empty = HooksConfig::default();-- let merged = both.merge_with(&empty);- let pre_start = merged- .get(HookType::PreStart)- .expect("should have pre-start");- let commands: Vec<_> = pre_start.commands().collect();- assert_eq!(- commands.len(),- 2,- "Both commands from same source should be present"- );- assert_eq!(commands[0].template, "npm install"); // pre-start first- assert_eq!(commands[1].template, "cargo build"); // post-create second-}-#[test]fn test_hooks_merge_post_create_both_sides() {- // Both configs use deprecated `post-create` — should still combine+ // `post-create` from global and per-project config combine (global first).let global = parse_hooks("post-create = \"npm install\"");let project = parse_hooks("post-create = \"cargo build\"");let merged = global.merge_with(&project);- let pre_start = merged- .get(HookType::PreStart)- .expect("should have pre-start");- let commands: Vec<_> = pre_start.commands().collect();+ let post_create = merged+ .get(HookType::PostCreate)+ .expect("should have post-create");+ let commands: Vec<_> = post_create.commands().collect();assert_eq!(commands.len(), 2);assert_eq!(commands[0].template, "npm install");assert_eq!(commands[1].template, "cargo build");@@ -3062,12 +3020,12 @@ fn test_save_to_existing_file_replaces_changed_inline_table() {// replaces it (even though this changes formatting from inline to standard).let dir = tempfile::tempdir().unwrap();let config_path = dir.path().join("config.toml");- std::fs::write(&config_path, "post-start = { build = \"cargo build\" }\n").unwrap();+ std::fs::write(&config_path, "post-create = { build = \"cargo build\" }\n").unwrap();// Load, modify the hook, then savelet mut config =UserConfig::load_from_str(&std::fs::read_to_string(&config_path).unwrap()).unwrap();- config.hooks = toml::from_str("post-start = { build = \"cargo test\" }").unwrap();+ config.hooks = toml::from_str("post-create = { build = \"cargo test\" }").unwrap();config.save_to(&config_path).unwrap();let saved = std::fs::read_to_string(&config_path).unwrap();@@ -3280,12 +3238,12 @@ future-per-project = "value"#[test]fn test_save_to_existing_file_preserves_inline_table_formatting() {- // When a user writes a hook as an inline table (e.g., `post-start = { ... }`),+ // When a user writes a hook as an inline table (e.g., `post-create = { ... }`),// the diff-based merge must not rewrite it to a standard table if the value// is semantically unchanged.let dir = tempfile::tempdir().unwrap();let config_path = dir.path().join("config.toml");- let original = "post-start = { build = \"cargo build\" }\n";+ let original = "post-create = { build = \"cargo build\" }\n";std::fs::write(&config_path, original).unwrap();// Load the config (which parses hooks via flatten), then save it back@@ -3293,13 +3251,13 @@ fn test_save_to_existing_file_preserves_inline_table_formatting() {config.save_to(&config_path).unwrap();let saved = std::fs::read_to_string(&config_path).unwrap();- // The inline table syntax should be preserved (not expanded to [post-start])+ // The inline table syntax should be preserved (not expanded to [post-create])assert!(- saved.contains("post-start = { build = \"cargo build\" }"),+ saved.contains("post-create = { build = \"cargo build\" }"),"inline table should be preserved: {saved}");assert!(- !saved.contains("[post-start]"),+ !saved.contains("[post-create]"),"should not be expanded to standard table: {saved}");}diff --git a/src/git/error.rs b/src/git/error.rsindex bce10aa89..38a6b34f6 100644--- a/src/git/error.rs+++ b/src/git/error.rs@@ -1900,12 +1900,12 @@ mod tests {assert_snapshot!(err.render(), @"[31m✗[39m [31mpre-merge command failed: [1mlint[22m: lint failed[39m");let err = WorktrunkError::HookCommandFailed {- hook_type: HookType::PreStart,+ hook_type: HookType::PreCreate,command_name: None,error: "setup failed".into(),exit_code: None,};- assert_snapshot!(err.render(), @"[31m✗[39m [31mpre-start command failed: setup failed[39m");+ assert_snapshot!(err.render(), @"[31m✗[39m [31mpre-create command failed: setup failed[39m");// Silent errors produce empty outputassert_eq!(format!("{}", WorktrunkError::CommandNotApproved), "");diff --git a/src/git/mod.rs b/src/git/mod.rsindex 907bc8868..40f2631f2 100644--- a/src/git/mod.rs+++ b/src/git/mod.rs@@ -469,8 +469,8 @@ pub fn branch_tracks_ref(pub enum HookType {PreSwitch,PostSwitch,- PreStart,- PostStart,+ PreCreate,+ PostCreate,PreCommit,PostCommit,PreMerge,@@ -489,12 +489,12 @@ impl HookType {pub fn is_pre(self) -> bool {match self {HookType::PreSwitch- | HookType::PreStart+ | HookType::PreCreate| HookType::PreCommit| HookType::PreMerge| HookType::PreRemove => true,HookType::PostSwitch- | HookType::PostStart+ | HookType::PostCreate| HookType::PostCommit| HookType::PostMerge| HookType::PostRemove => false,diff --git a/src/git/repository/config.rs b/src/git/repository/config.rsindex 365d0035e..236431314 100644--- a/src/git/repository/config.rs+++ b/src/git/repository/config.rs@@ -670,14 +670,14 @@ mod tests {assert!(repo.project_config_at_ref("no-such-ref").unwrap().is_none());// Commit one and read it back at that branch.- test.write_project_config(r#"post-start = "echo hi""#);+ test.write_project_config(r#"post-create = "echo hi""#);test.run_git(&["add", ".config/wt.toml"]);test.run_git(&["commit", "-m", "Add config"]);let cfg = repo.project_config_at_ref("HEAD").unwrap().expect("config committed at HEAD");- assert!(cfg.hooks.post_start.is_some());+ assert!(cfg.hooks.post_create.is_some());// A committed file that doesn't parse → Err. Callers must abort rather// than silently fall through to a different config.@@ -704,7 +704,7 @@ mod tests {let test = TestRepo::with_initial_commit();let repo = Repository::at(test.root_path()).unwrap();- test.write_project_config(r#"post-start = "echo hi""#);+ test.write_project_config(r#"post-create = "echo hi""#);test.run_git(&["add", ".config/wt.toml"]);test.run_git(&["commit", "-m", "Add config"]);@@ -717,7 +717,7 @@ mod tests {.project_config_at_ref("-foo").unwrap().expect("config readable at hyphen-prefixed ref");- assert!(cfg.hooks.post_start.is_some());+ assert!(cfg.hooks.post_create.is_some());}#[test]diff --git a/src/help.rs b/src/help.rsindex ad6b67e2e..5938e3dde 100644--- a/src/help.rs+++ b/src/help.rs@@ -572,11 +572,11 @@ fn post_process_for_html(text: &str) -> String {"```\n\▲ repo needs approval to execute 3 commands:\n\\n\- ○ pre-start install:\n\+ ○ pre-create install:\n\\x20\x20\x20npm ci\n\- ○ pre-start build:\n\+ ○ pre-create build:\n\\x20\x20\x20cargo build --release\n\- ○ pre-start env:\n\+ ○ pre-create env:\n\\x20\x20\x20echo 'PORT={{ branch | hash_port }}' > .env.local\n\\n\❯ Allow and remember? [y/N]\n\@@ -584,11 +584,11 @@ fn post_process_for_html(text: &str) -> String {"{% terminal() %}\n\<span class=\"y\">▲ <b>repo</b> needs approval to execute <b>3</b> commands:</span>\n\\n\- <span class=\"d\">○</span> pre-start <b>install</b>:\n\+ <span class=\"d\">○</span> pre-create <b>install</b>:\n\<span style='background:var(--bright-white,#fff)'> </span> <span class=\"d\"><span class=\"b\">npm</span> ci</span>\n\- <span class=\"d\">○</span> pre-start <b>build</b>:\n\+ <span class=\"d\">○</span> pre-create <b>build</b>:\n\<span style='background:var(--bright-white,#fff)'> </span> <span class=\"d\"><span class=\"b\">cargo</span> build <span class=\"c\">--release</span></span>\n\- <span class=\"d\">○</span> pre-start <b>env</b>:\n\+ <span class=\"d\">○</span> pre-create <b>env</b>:\n\<span style='background:var(--bright-white,#fff)'> </span> <span class=\"d\"><span class=\"b\">echo</span> <span class=\"g\">'PORT={{ branch | hash_port }}'</span> <span class=\"c\">></span> .env.local</span>\n\\n\<span class=\"c\">❯</span> Allow and remember? <b>[y/N]</b>\n\diff --git a/src/main.rs b/src/main.rsindex 76b165811..65c1bf7d9 100644--- a/src/main.rs+++ b/src/main.rs@@ -181,14 +181,6 @@ fn handle_hook_command(action: HookCommand, yes: bool) -> anyhow::Result<()> {// which parses against a clap tree augmented with hook-type// subcommand stubs and renders their help directly. Execution flow// only reaches here for non-help invocations.- if args.first().and_then(|s| s.to_str()) == Some("post-create") {- eprintln!(- "{}",- warning_message(- "wt hook post-create is deprecated; use wt hook pre-start instead"- )- );- }let opts = HookOptions::parse(&args)?;run_hook(opts.hook_type,diff --git a/src/output/global.rs b/src/output/global.rsindex 6d8ba4905..75e94010b 100644--- a/src/output/global.rs+++ b/src/output/global.rs@@ -612,7 +612,7 @@ pub fn pre_hook_display_path(hooks_run_at: &std::path::Path) -> Option<&std::pat////// ```ignore/// // Register hooks with display path:-/// announcer.register(&ctx, HookType::PostStart, &extra_vars, post_hook_display_path(&destination))?;+/// announcer.register(&ctx, HookType::PostCreate, &extra_vars, post_hook_display_path(&destination))?;/// ```pub fn post_hook_display_path(destination: &std::path::Path) -> Option<&std::path::Path> {post_hook_display_path_with(destination, is_shell_integration_active())diff --git a/src/styling/mod.rs b/src/styling/mod.rsindex 4002bc288..d9908c552 100644--- a/src/styling/mod.rs+++ b/src/styling/mod.rs@@ -691,7 +691,7 @@ cp -cR {{ repo_root }}/target/debug/.fingerprint {{ repo_root }}/target/debug/bu// We never emit [39m ourselves - all our resets use [0m (full reset).// So any [39m in the output is an artifact from wrap_ansi that we must strip.//- // This is the actual post-start command from user config that exposed the bug.+ // This is the actual post-create command from user config that exposed the bug.let command = r#"[ -d {{ repo_root }}/target/debug/deps ] && [ ! -e {{ worktree }}/target ] &&mkdir -p {{ worktree }}/target/debug/deps &&cp -c {{ repo_root }}/target/debug/deps/*.rlib {{ repo_root }}/target/debug/deps/*.rmeta {{ worktreediff --git a/tests/CLAUDE.md b/tests/CLAUDE.mdindex f8d889e89..4107ee48a 100644--- a/tests/CLAUDE.md+++ b/tests/CLAUDE.md@@ -302,7 +302,7 @@ assert_snapshot!("readme_example_name", combined_output);**README examples using standard snapshots (working, but require manual editing):**- `test_readme_example_simple()` - Quick start merge example- `test_readme_example_complex()` - LLM commit example-- `test_readme_example_hooks_pre_start()` - Pre-start hooks+- `test_readme_example_hooks_pre_create()` - Pre-create hooks- `test_readme_example_hooks_pre_merge()` - Pre-merge hooks**Current workflow:** These tests work correctly and generate accurate snapshots. However, the snapshots separate stdout and stderr into different sections, which means they cannot be directly copied into README.md. Instead, the README examples are manually edited versions that merge stdout/stderr in the correct temporal order and remove ANSI codes.diff --git a/tests/common/mod.rs b/tests/common/mod.rsindex 3adc17fa0..e3949967f 100644--- a/tests/common/mod.rs+++ b/tests/common/mod.rs@@ -977,10 +977,10 @@ fn setup_snapshot_settings_for_paths_with_home(add_standard_env_redactions(&mut settings);// Normalize timestamps in log filenames (format: YYYYMMDD-HHMMSS)- // Match: post-start-NAME-SHA-HHMMSS.log+ // Match: post-create-NAME-SHA-HHMMSS.logsettings.add_filter(- r"post-start-[^-]+-[0-9a-f]{7,40}-\d{6}\.log",- "post-start-[NAME]-[TIMESTAMP].log",+ r"post-create-[^-]+-[0-9a-f]{7,40}-\d{6}\.log",+ "post-create-[NAME]-[TIMESTAMP].log",);add_remove_stats_byte_filter(&mut settings);diff --git a/tests/integration_tests/approval_pty.rs b/tests/integration_tests/approval_pty.rsindex 0090f9b54..676a2072f 100644--- a/tests/integration_tests/approval_pty.rs+++ b/tests/integration_tests/approval_pty.rs@@ -80,7 +80,7 @@ fn test_approval_prompt_accept(repo: TestRepo) {// Remove origin so worktrunk uses directory name as project identifierrepo.run_git(&["remote", "remove", "origin"]);- repo.write_project_config(r#"pre-start = "echo 'test command'""#);+ repo.write_project_config(r#"pre-create = "echo 'test command'""#);repo.commit("Add config");// Configure shell integration so we get the "Restart shell" hint instead of the prompt@@ -104,7 +104,7 @@ fn test_approval_prompt_decline(repo: TestRepo) {// Remove origin so worktrunk uses directory name as project identifierrepo.run_git(&["remote", "remove", "origin"]);- repo.write_project_config(r#"pre-start = "echo 'test command'""#);+ repo.write_project_config(r#"pre-create = "echo 'test command'""#);repo.commit("Add config");// Configure shell integration so we get the "Restart shell" hint instead of the prompt@@ -129,7 +129,7 @@ fn test_approval_prompt_multiple_commands(repo: TestRepo) {repo.run_git(&["remote", "remove", "origin"]);repo.write_project_config(- r#"pre-start = [+ r#"pre-create = [{first = "echo 'First command'"},{second = "echo 'Second command'"},{third = "echo 'Third command'"},@@ -161,7 +161,7 @@ fn test_approval_prompt_permission_error(repo: TestRepo) {// Remove origin so worktrunk uses directory name as project identifierrepo.run_git(&["remote", "remove", "origin"]);- repo.write_project_config(r#"pre-start = "echo 'test command'""#);+ repo.write_project_config(r#"pre-create = "echo 'test command'""#);repo.commit("Add config");// Configure shell integration before making the approvals directory read-only@@ -235,7 +235,7 @@ fn test_approval_prompt_named_commands(repo: TestRepo) {repo.run_git(&["remote", "remove", "origin"]);repo.write_project_config(- r#"pre-start = [+ r#"pre-create = [{install = "echo 'Installing dependencies...'"},{build = "echo 'Building project...'"},{test = "echo 'Running tests...'"},@@ -278,7 +278,7 @@ fn test_approval_prompt_mixed_approved_unapproved_accept(repo: TestRepo) {repo.run_git(&["remote", "remove", "origin"]);repo.write_project_config(- r#"pre-start = [+ r#"pre-create = [{first = "echo 'First command'"},{second = "echo 'Second command'"},{third = "echo 'Third command'"},@@ -335,7 +335,7 @@ fn test_approval_prompt_mixed_approved_unapproved_decline(repo: TestRepo) {repo.run_git(&["remote", "remove", "origin"]);repo.write_project_config(- r#"pre-start = [+ r#"pre-create = [{first = "echo 'First command'"},{second = "echo 'Second command'"},{third = "echo 'Third command'"},@@ -377,9 +377,9 @@ approved-commands = ["echo 'Second command'"]"Should show 'Commands declined' message");// Commands appear in the prompt, but should not be executed- // Check for "Running pre-start" which indicates execution+ // Check for "Running pre-create" which indicates executionassert!(- !output.contains("Running pre-start"),+ !output.contains("Running pre-create"),"Should NOT execute any commands when declined");assert!(@@ -855,7 +855,7 @@ fn test_config_approvals_add_accept(repo: TestRepo) {// Include a project commit append so `add_approvals` also collects the// `commit-template-append` entry (covers that branch in add_approvals).repo.write_project_config(- r#"pre-start = "echo 'test command'"+ r#"pre-create = "echo 'test command'"[commit.generation]template-append = "Use conventional commits"@@ -883,7 +883,7 @@ template-append = "Use conventional commits"#[rstest]fn test_config_approvals_add_decline(repo: TestRepo) {repo.run_git(&["remote", "remove", "origin"]);- repo.write_project_config(r#"pre-start = "echo 'test command'""#);+ repo.write_project_config(r#"pre-create = "echo 'test command'""#);repo.commit("Add config");let env_vars = repo.test_env_vars();diff --git a/tests/integration_tests/approval_ui.rs b/tests/integration_tests/approval_ui.rsindex 39d3d4fa9..c157fb7bf 100644--- a/tests/integration_tests/approval_ui.rs+++ b/tests/integration_tests/approval_ui.rs@@ -40,7 +40,7 @@ fn snapshot_approval(test_name: &str, repo: &TestRepo, args: &[&str], approve: b#[rstest]fn test_approval_single_command(repo: TestRepo) {- repo.write_project_config(r#"pre-start = "echo 'Worktree path: {{ worktree_path }}'""#);+ repo.write_project_config(r#"pre-create = "echo 'Worktree path: {{ worktree_path }}'""#);repo.commit("Add config");@@ -55,7 +55,7 @@ fn test_approval_single_command(repo: TestRepo) {#[rstest]fn test_approval_multiple_commands(repo: TestRepo) {repo.write_project_config(- r#"[pre-start]+ r#"[pre-create]branch = "echo 'Branch: {{ branch }}'"worktree = "echo 'Worktree: {{ worktree_path }}'"repo = "echo 'Repo: {{ repo }}'"@@ -79,7 +79,7 @@ fn test_approval_mixed_approved_unapproved(repo: TestRepo) {repo.run_git(&["remote", "remove", "origin"]);repo.write_project_config(- r#"[pre-start]+ r#"[pre-create]first = "echo 'First command'"second = "echo 'Second command'"third = "echo 'Third command'"@@ -106,7 +106,7 @@ approved-commands = ["echo 'Second command'"]#[rstest]fn test_yes_flag_does_not_save_approvals(repo: TestRepo) {- repo.write_project_config(r#"pre-start = "echo 'test command' > output.txt""#);+ repo.write_project_config(r#"pre-create = "echo 'test command' > output.txt""#);repo.commit("Add config");@@ -136,7 +136,7 @@ fn test_already_approved_commands_skip_prompt(repo: TestRepo) {// Remove origin so worktrunk uses directory name as project identifierrepo.run_git(&["remote", "remove", "origin"]);- repo.write_project_config(r#"pre-start = "echo 'approved' > output.txt""#);+ repo.write_project_config(r#"pre-create = "echo 'approved' > output.txt""#);repo.commit("Add config");@@ -161,7 +161,7 @@ fn test_decline_approval_skips_only_unapproved(repo: TestRepo) {repo.run_git(&["remote", "remove", "origin"]);repo.write_project_config(- r#"[pre-start]+ r#"[pre-create]first = "echo 'First command'"second = "echo 'Second command'"third = "echo 'Third command'"@@ -193,7 +193,7 @@ approved-commands = ["echo 'Second command'"]#[rstest]fn test_approval_named_commands(repo: TestRepo) {repo.write_project_config(- r#"[pre-start]+ r#"[pre-create]install = "echo 'Installing dependencies...'"build = "echo 'Building project...'"test = "echo 'Running tests...'"@@ -282,7 +282,7 @@ fn test_run_hook_post_merge_requires_approval(repo: TestRepo) {/// The command should fail with a clear error telling users to use --yes.#[rstest]fn test_approval_fails_in_non_tty(repo: TestRepo) {- repo.write_project_config(r#"pre-start = "echo 'test command'""#);+ repo.write_project_config(r#"pre-create = "echo 'test command'""#);repo.commit("Add config");// Run WITHOUT piping stdin - this simulates non-TTY environment@@ -297,7 +297,7 @@ fn test_approval_fails_in_non_tty(repo: TestRepo) {/// Even in non-TTY environments, --yes should allow commands to execute.#[rstest]fn test_yes_bypasses_tty_check(repo: TestRepo) {- repo.write_project_config(r#"pre-start = "echo 'test command'""#);+ repo.write_project_config(r#"pre-create = "echo 'test command'""#);repo.commit("Add config");// Run with --yes to bypass approval entirely@@ -637,7 +637,7 @@ fn test_step_hook_run_all_commands(repo: TestRepo) {/// approval prompt, so a clean exit confirms `-y` was honored.#[rstest]fn test_global_yes_before_subcommand(repo: TestRepo) {- repo.write_project_config(r#"pre-start = "echo 'test command'""#);+ repo.write_project_config(r#"pre-create = "echo 'test command'""#);repo.commit("Add config");// Place `-y` before the subcommand name.diff --git a/tests/integration_tests/approvals.rs b/tests/integration_tests/approvals.rsindex 72576e50d..d77f260ab 100644--- a/tests/integration_tests/approvals.rs+++ b/tests/integration_tests/approvals.rs@@ -42,7 +42,7 @@ fn test_add_approvals_no_config(repo: TestRepo) {#[rstest]fn test_add_approvals_all_with_none_approved(repo: TestRepo) {- repo.write_project_config(r#"pre-start = "echo 'test'""#);+ repo.write_project_config(r#"pre-create = "echo 'test'""#);repo.commit("Add config");snapshot_add_approvals("add_approvals_all_none_approved", &repo, &["--all"]);@@ -105,7 +105,7 @@ fn test_clear_approvals_with_approvals(repo: TestRepo) {// matches what `Repository::project_identifier` computes at runtime.repo.run_git(&["remote", "remove", "origin"]);repo.commit("Initial commit");- repo.write_project_config(r#"pre-start = "echo 'test'""#);+ repo.write_project_config(r#"pre-create = "echo 'test'""#);repo.commit("Add config");// Manually approve the command using the same project id wt will compute.@@ -133,7 +133,7 @@ fn test_clear_approvals_global_with_approvals(repo: TestRepo) {// matches what `Repository::project_identifier` computes at runtime.repo.run_git(&["remote", "remove", "origin"]);repo.commit("Initial commit");- repo.write_project_config(r#"pre-start = "echo 'test'""#);+ repo.write_project_config(r#"pre-create = "echo 'test'""#);repo.commit("Add config");// Manually approve the command using the same project id wt will compute.@@ -160,7 +160,7 @@ fn test_clear_approvals_after_clear(repo: TestRepo) {// matches what `Repository::project_identifier` computes at runtime.repo.run_git(&["remote", "remove", "origin"]);repo.commit("Initial commit");- repo.write_project_config(r#"pre-start = "echo 'test'""#);+ repo.write_project_config(r#"pre-create = "echo 'test'""#);repo.commit("Add config");// Manually approve the command using the same project id wt will compute.@@ -228,8 +228,8 @@ fn test_clear_approvals_multiple_approvals(repo: TestRepo) {repo.run_git(&["remote", "remove", "origin"]);repo.write_project_config(r#"-pre-start = "echo 'first'"-post-start = "echo 'second'"+pre-create = "echo 'first'"+post-create = "echo 'second'"[pre-commit]lint = "echo 'third'""#,@@ -275,7 +275,7 @@ fn test_add_approvals_all_already_approved(repo: TestRepo) {// matches what `Repository::project_identifier` computes at runtime.repo.run_git(&["remote", "remove", "origin"]);repo.commit("Initial commit");- repo.write_project_config(r#"pre-start = "echo 'test'""#);+ repo.write_project_config(r#"pre-create = "echo 'test'""#);repo.commit("Add config");// Manually approve the command using the same project id wt will compute.@@ -326,7 +326,7 @@ fn test_add_approvals_bare_repo_config_in_primary_worktree() {std::fs::create_dir_all(&config_dir).unwrap();std::fs::write(config_dir.join("wt.toml"),- r#"pre-start = "echo 'hello'"+ r#"pre-create = "echo 'hello'""#,).unwrap();diff --git a/tests/integration_tests/bare_repository.rs b/tests/integration_tests/bare_repository.rsindex 4b5d30fd2..931b0abad 100644--- a/tests/integration_tests/bare_repository.rs+++ b/tests/integration_tests/bare_repository.rs@@ -756,7 +756,7 @@ fn test_bare_repo_project_config_found_from_bare_root() {let marker_str = marker_path.to_str().unwrap().replace('\\', "/");fs::write(config_dir.join("wt.toml"),- format!("post-start = \"echo hook-executed > '{}'\"\n", marker_str),+ format!("post-create = \"echo hook-executed > '{}'\"\n", marker_str),).unwrap();@@ -818,7 +818,7 @@ fn test_bare_repo_project_config_found_with_dash_c_flag() {let marker_str = marker_path.to_str().unwrap().replace('\\', "/");fs::write(config_dir.join("wt.toml"),- format!("post-start = \"echo hook-executed > '{}'\"\n", marker_str),+ format!("post-create = \"echo hook-executed > '{}'\"\n", marker_str),).unwrap();@@ -886,7 +886,7 @@ fn test_bare_repo_ignores_config_in_bare_root() {let marker_str = marker_path.to_str().unwrap().replace('\\', "/");fs::write(config_dir.join("wt.toml"),- format!("post-start = \"echo bad > '{}'\"\n", marker_str),+ format!("post-create = \"echo bad > '{}'\"\n", marker_str),).unwrap();diff --git a/tests/integration_tests/completion.rs b/tests/integration_tests/completion.rsindex d30f491a6..fe0347b7d 100644--- a/tests/integration_tests/completion.rs+++ b/tests/integration_tests/completion.rs@@ -801,8 +801,8 @@ fn test_complete_hook_subcommands(repo: TestRepo) {let subcommands = value_suggestions(&stdout);// Hook types and commandsassert!(subcommands.contains(&"show"), "Missing show");- assert!(subcommands.contains(&"pre-start"), "Missing pre-start");- assert!(subcommands.contains(&"post-start"), "Missing post-start");+ assert!(subcommands.contains(&"pre-create"), "Missing pre-create");+ assert!(subcommands.contains(&"post-create"), "Missing post-create");assert!(subcommands.contains(&"post-switch"), "Missing post-switch");assert!(subcommands.contains(&"pre-switch"), "Missing pre-switch");assert!(subcommands.contains(&"pre-commit"), "Missing pre-commit");@@ -822,7 +822,7 @@ fn test_complete_hook_subcommands(repo: TestRepo) {assert!(output.status.success());let stdout = String::from_utf8_lossy(&output.stdout);let subcommands = value_suggestions(&stdout);- assert!(subcommands.contains(&"post-start"));+ assert!(subcommands.contains(&"post-create"));assert!(subcommands.contains(&"post-switch"));assert!(subcommands.contains(&"post-commit"));assert!(subcommands.contains(&"post-merge"));diff --git a/tests/integration_tests/config_init.rs b/tests/integration_tests/config_init.rsindex 75cc620d3..15ff50d8d 100644--- a/tests/integration_tests/config_init.rs+++ b/tests/integration_tests/config_init.rs@@ -99,7 +99,7 @@ fn test_config_create_project_already_exists(repo: TestRepo) {fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"[[project.pre-start]]+ r#"[[project.pre-create]]run = "echo hello""#,)diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rsindex ff40ccd76..e8cdfb630 100644--- a/tests/integration_tests/config_show.rs+++ b/tests/integration_tests/config_show.rs@@ -34,9 +34,9 @@ approved-commands = ["npm install"]fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"pre-start = "npm install"+ r#"pre-create = "npm install"-[post-start]+[post-create]server = "npm run dev""#,)@@ -362,6 +362,57 @@ my-lint = "my-lint-tool");}+/// A current-worktree `.config/wt.toml` that still uses the deprecated+/// `pre-start`/`post-start` hook keys keeps working through `wt hook show`:+/// `ProjectConfig::load` migrates the keys to `pre-create`/`post-create`+/// before deserializing, the value parser accepts both the canonical type+/// argument and the deprecated alias, and Phase 1 of the rename (issue #2838)+/// migrates silently — no deprecation warning.+#[rstest]+fn test_hook_show_accepts_deprecated_start_hooks(repo: TestRepo) {+ // Single-token commands so the bash highlighter doesn't split them with+ // ANSI codes (same shape as the deep-merge `hook show` tests above).+ repo.write_project_config(+ r#"[pre-start]+deps = "pre-start-tool"++[post-start]+deps = "post-start-tool"+"#,+ );++ // The `-create` arg exercises the load-time migration (the `[*-start]` key+ // must deserialize into the `*_create` field); the `-start` arg additionally+ // exercises the value parser accepting the deprecated alias.+ let cases = [+ ("pre-create", "pre-start-tool"),+ ("pre-start", "pre-start-tool"),+ ("post-create", "post-start-tool"),+ ("post-start", "post-start-tool"),+ ];+ for (type_arg, expected) in cases {+ let mut cmd = repo.wt_command();+ cmd.args(["hook", "show", type_arg])+ .current_dir(repo.root_path());+ let output = cmd.output().unwrap();+ let stderr = String::from_utf8_lossy(&output.stderr);+ assert!(+ output.status.success(),+ "`wt hook show {type_arg}` should succeed, stderr: {stderr}"+ );+ let stdout = String::from_utf8_lossy(&output.stdout);+ assert!(+ stdout.contains(expected),+ "`wt hook show {type_arg}` should list the migrated hook, got:\n{stdout}"+ );+ // Phase 1 migrates silently — no deprecation warning, no config-show hint.+ assert!(+ !stderr.to_lowercase().contains("deprecated") && !stderr.contains("config show"),+ "`wt hook show {type_arg}` should migrate silently, stderr:\n{stderr}"+ );+ }+}+#[rstest]fn test_config_show_system_config_hint_under_user_config(repo: TestRepo, temp_home: TempDir) {// When no system config exists but user config does, config show should@@ -1736,7 +1787,7 @@ fn test_deprecated_template_variables_show_warning(repo: TestRepo, temp_home: Te// Use all deprecated variables: repo_root, worktree, main_worktree// Note: hooks are at top-level in user config, not in a [hooks] sectionr#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"+pre-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules""#,).unwrap();@@ -1782,7 +1833,7 @@ fn test_deprecated_template_variables_verbose_shows_content(repo: TestRepo, tempfs::write(config_path,r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"+pre-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules""#,).unwrap();@@ -1854,7 +1905,7 @@ fn test_fixing_deprecated_config_then_reintroducing_still_warns(fs::write(&project_config_path,- r#"pre-start = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-create = "ln -sf {{ main_worktree }}/node_modules""#,).unwrap();@@ -1867,7 +1918,7 @@ fn test_fixing_deprecated_config_then_reintroducing_still_warns(fs::write(&project_config_path,- r#"pre-start = "ln -sf {{ repo }}/node_modules"+ r#"pre-create = "ln -sf {{ repo }}/node_modules""#,).unwrap();@@ -1886,7 +1937,7 @@ fn test_fixing_deprecated_config_then_reintroducing_still_warns(fs::write(&project_config_path,- r#"pre-start = "cd {{ worktree }} && npm install"+ r#"pre-create = "cd {{ worktree }} && npm install""#,).unwrap();@@ -2823,7 +2874,7 @@ fn test_config_show_displays_deprecation_details(mut repo: TestRepo, temp_home:fs::write(&config_path,r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-start = "ln -sf {{ repo_root }}/node_modules"+pre-create = "ln -sf {{ repo_root }}/node_modules""#,).unwrap();@@ -2864,7 +2915,7 @@ fn test_config_show_from_linked_worktree_shows_main_worktree_hint(fs::create_dir_all(&project_config_dir).unwrap();fs::write(project_config_dir.join("wt.toml"),- r#"pre-start = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-create = "ln -sf {{ main_worktree }}/node_modules""#,).unwrap();@@ -3009,7 +3060,7 @@ approved-commands = ["npm install", "npm test"]#[rstest]fn test_config_update_applies_project_config_migration(repo: TestRepo) {repo.write_project_config(- r#"pre-start = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-create = "ln -sf {{ main_worktree }}/node_modules""#,);repo.commit("Add deprecated project config");@@ -3027,7 +3078,7 @@ fn test_config_update_applies_project_config_migration(repo: TestRepo) {);let updated = fs::read_to_string(&project_config_path).unwrap();- assert!(updated.contains("pre-start"));+ assert!(updated.contains("pre-create"));assert!(updated.contains("{{ repo }}"));assert!(!updated.contains("main_worktree"));}@@ -3038,7 +3089,7 @@ fn test_config_update_applies_project_config_migration(repo: TestRepo) {#[rstest]fn test_config_update_clean_project_config_is_noop(repo: TestRepo) {repo.write_project_config(- r#"pre-start = "echo ready"+ r#"pre-create = "echo ready""#,);repo.commit("Add clean project config");@@ -3062,7 +3113,7 @@ fn test_config_update_clean_project_config_is_noop(repo: TestRepo) {#[rstest]fn test_config_update_project_config_from_linked_worktree_shows_hint(repo: TestRepo) {repo.write_project_config(- r#"pre-start = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-create = "ln -sf {{ main_worktree }}/node_modules""#,);repo.commit("Add deprecated project config");@@ -3109,7 +3160,7 @@ fn test_config_update_print_emits_both_configs(repo: TestRepo) {).unwrap();repo.write_project_config(- r#"pre-start = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-create = "ln -sf {{ main_worktree }}/node_modules""#,);repo.commit("Add deprecated project config");@@ -3124,7 +3175,7 @@ fn test_config_update_print_emits_both_configs(repo: TestRepo) {assert!(stdout.contains("# User config"));assert!(stdout.contains("# Project config"));assert!(stdout.contains("{{ repo }}"));- assert!(stdout.contains("pre-start"));+ assert!(stdout.contains("pre-create"));}/// `wt config update --print` on a clean config exits silently with empty@@ -3218,7 +3269,7 @@ fn test_config_update_applies_template_var_migration(repo: TestRepo) {fs::write(config_path,r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"+pre-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules""#,).unwrap();@@ -3272,7 +3323,7 @@ fn test_config_show_displays_pre_hook_table_form_deprecation(test = "cargo test"lint = "cargo clippy"-[pre-start]+[pre-create]install = "npm ci"env = "cp .env.example .env""#,@@ -3322,6 +3373,31 @@ pager = "delta --paging=never"});}+/// `wt config show` reveals the silent `-start` → `-create` hook migration as a+/// diff. Phase 1 stays warning-free (see issue #2838), so the output carries no+/// "is deprecated" line — only the proposed diff and the apply hint.+#[rstest]+fn test_config_show_displays_start_hook_migration(mut repo: TestRepo, temp_home: TempDir) {+ repo.setup_mock_ci_tools_unauthenticated();++ let global_config_dir = temp_home.path().join(".config").join("worktrunk");+ fs::create_dir_all(&global_config_dir).unwrap();+ let config_path = global_config_dir.join("config.toml");+ fs::write(&config_path, "pre-start = \"npm install\"\n").unwrap();++ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);+ settings.bind(|| {+ let mut cmd = wt_command();+ repo.configure_wt_cmd(&mut cmd);+ repo.configure_mock_commands(&mut cmd);+ cmd.arg("config").arg("show").current_dir(repo.root_path());+ set_temp_home_env(&mut cmd, temp_home.path());+ set_xdg_config_path(&mut cmd, temp_home.path());++ assert_cmd_snapshot!(cmd);+ });+}+/// `wt config show` displays deprecation details for `[merge] no-ff` → `ff` (inverted).#[rstest]fn test_config_show_displays_no_ff_deprecation(mut repo: TestRepo, temp_home: TempDir) {@@ -4427,12 +4503,12 @@ fn test_project_config_path_env_var_override(repo: TestRepo, temp_home: TempDir)// override points elsewhere.let in_repo_config = repo.root_path().join(".config").join("wt.toml");fs::create_dir_all(in_repo_config.parent().unwrap()).unwrap();- fs::write(&in_repo_config, "pre-start = \"in-repo-hook\"\n").unwrap();+ fs::write(&in_repo_config, "pre-create = \"in-repo-hook\"\n").unwrap();// Write the override project config at an arbitrary path.let override_dir = tempfile::tempdir().unwrap();let override_path = override_dir.path().join("override.toml");- fs::write(&override_path, "pre-start = \"override-hook\"\n").unwrap();+ fs::write(&override_path, "pre-create = \"override-hook\"\n").unwrap();let mut cmd = wt_command();repo.configure_wt_cmd(&mut cmd);@@ -4451,7 +4527,7 @@ fn test_project_config_path_env_var_override(repo: TestRepo, temp_home: TempDir)let json: serde_json::Value =serde_json::from_str(&String::from_utf8_lossy(&output.stdout)).unwrap();assert_eq!(- json["project"]["config"]["pre-start"], "override-hook",+ json["project"]["config"]["pre-create"], "override-hook","expected override config to be loaded, got: {}",json["project"]);@@ -4484,124 +4560,3 @@ fn test_project_config_path_env_var_override(repo: TestRepo, temp_home: TempDir)json["project"]["config"]);}--/// `post-create` was renamed to `pre-start` in v0.32.0. Project configs that-/// still carry the removed key fail to load with a fatal error naming the-/// replacement. Verify via `wt switch --create`, which propagates project-/// config load failures as a non-zero exit.-#[rstest]-fn test_post_create_in_project_config_is_fatal(repo: TestRepo, temp_home: TempDir) {- let project_config_dir = repo.root_path().join(".config");- fs::create_dir_all(&project_config_dir).unwrap();- fs::write(- project_config_dir.join("wt.toml"),- "post-create = \"npm install\"\n",- )- .unwrap();-- let mut cmd = repo.wt_command();- cmd.args(["switch", "--create", "new-branch"])- .current_dir(repo.root_path());- set_temp_home_env(&mut cmd, temp_home.path());-- let output = cmd.output().unwrap();- assert!(- !output.status.success(),- "project config with post-create must fail to load, stdout: {}, stderr: {}",- String::from_utf8_lossy(&output.stdout),- String::from_utf8_lossy(&output.stderr),- );- let stderr = String::from_utf8_lossy(&output.stderr);- assert!(- stderr.contains("post-create"),- "error should name the offending key, got: {stderr}"- );- assert!(- stderr.contains("pre-start"),- "error should point at the replacement key, got: {stderr}"- );-}--/// User config is loaded on a best-effort basis: a fatal deprecation surfaces-/// as a `LoadError::Validation` warning, wt continues without it, and the user-/// still gets the fatal message telling them to rename the key.-#[rstest]-fn test_post_create_in_user_config_warns_and_skips(repo: TestRepo, temp_home: TempDir) {- let config_path = repo.test_config_path();- fs::write(config_path, "post-create = \"npm install\"\n").unwrap();-- let mut cmd = repo.wt_command();- cmd.arg("list").current_dir(repo.root_path());- set_temp_home_env(&mut cmd, temp_home.path());- cmd.env("WORKTRUNK_CONFIG_PATH", config_path);-- let output = cmd.output().unwrap();- assert!(- output.status.success(),- "wt list should still succeed when user config fails validation, stderr: {}",- String::from_utf8_lossy(&output.stderr),- );- let stderr = String::from_utf8_lossy(&output.stderr);- assert!(- stderr.contains("post-create") && stderr.contains("pre-start"),- "warning should describe the rename, got: {stderr}"- );-}--/// `wt config show` renders the fatal post-create error inline for both user-/// and project configs, continuing the show flow so the user can still see-/// their file and other sections.-#[rstest]-fn test_config_show_renders_post_create_error(mut repo: TestRepo, temp_home: TempDir) {- repo.setup_mock_ci_tools_unauthenticated();-- // User config at XDG path.- let global_config_dir = temp_home.path().join(".config").join("worktrunk");- fs::create_dir_all(&global_config_dir).unwrap();- fs::write(- global_config_dir.join("config.toml"),- "post-create = \"npm install\"\n",- )- .unwrap();-- // Project config in the repo.- let project_config_dir = repo.root_path().join(".config");- fs::create_dir_all(&project_config_dir).unwrap();- fs::write(- project_config_dir.join("wt.toml"),- "post-create = \"bundle install\"\n",- )- .unwrap();-- let mut cmd = wt_command();- repo.configure_wt_cmd(&mut cmd);- repo.configure_mock_commands(&mut cmd);- cmd.args(["config", "show"]).current_dir(repo.root_path());- set_temp_home_env(&mut cmd, temp_home.path());- set_xdg_config_path(&mut cmd, temp_home.path());-- let output = cmd.output().unwrap();- assert!(- output.status.success(),- "wt config show should succeed, stderr: {}",- String::from_utf8_lossy(&output.stderr)- );- let combined = format!(- "{}{}",- String::from_utf8_lossy(&output.stdout),- String::from_utf8_lossy(&output.stderr)- );- // Both sections should render the rename guidance.- assert!(- combined.matches("post-create").count() >= 2,- "expected post-create message in both user and project sections, got: {combined}"- );- assert!(- combined.contains("User config: `post-create`"),- "user section should name the removed key, got: {combined}"- );- assert!(- combined.contains("Project config: `post-create`"),- "project section should name the removed key, got: {combined}"- );-}diff --git a/tests/integration_tests/config_state.rs b/tests/integration_tests/config_state.rsindex efe703fd2..2c1a9e8df 100644--- a/tests/integration_tests/config_state.rs+++ b/tests/integration_tests/config_state.rs@@ -679,7 +679,7 @@ fn test_state_get_logs_with_files(repo: TestRepo) {std::fs::create_dir_all(&log_dir).unwrap();write_log_at(&log_dir,- &hook_log_rel_path("feature", "user", "post-start", "npm"),+ &hook_log_rel_path("feature", "user", "post-create", "npm"),"npm output here",);// >= 1024 bytes to exercise the `{}K` size-formatting branch in@@ -704,10 +704,10 @@ fn test_state_get_logs_with_files(repo: TestRepo) {commands.jsonl <SIZE> <AGE>[36mHOOK OUTPUT[39m @ <PATH>- File Size Age- ─────────────────────────────── ──── ──────- bugfix/internal/remove.log <SIZE> <AGE>- feature/user/post-start/npm.log <SIZE> <AGE>+ File Size Age+ ──────────────────────────────── ──── ──────+ bugfix/internal/remove.log <SIZE> <AGE>+ feature/user/post-create/npm.log <SIZE> <AGE>[36mDIAGNOSTIC[39m @ <PATH>[107m [0m (none)@@ -818,7 +818,7 @@ fn test_state_clear_logs_with_files(repo: TestRepo) {std::fs::create_dir_all(&log_dir).unwrap();write_log_at(&log_dir,- &hook_log_rel_path("feature", "user", "post-start", "npm"),+ &hook_log_rel_path("feature", "user", "post-create", "npm"),"npm output",);write_log_at(@@ -843,7 +843,7 @@ fn test_state_clear_logs_sweeps_legacy_flat_files(repo: TestRepo) {let git_dir = repo.root_path().join(".git");let log_dir = git_dir.join("wt/logs");std::fs::create_dir_all(&log_dir).unwrap();- std::fs::write(log_dir.join("feature-post-start-npm.log"), "old layout").unwrap();+ std::fs::write(log_dir.join("feature-post-create-npm.log"), "old layout").unwrap();std::fs::write(log_dir.join("bugfix-remove.log"), "old layout").unwrap();let output = wt_state_cmd(&repo, "logs", "clear", &[]).output().unwrap();@@ -1158,7 +1158,7 @@ fn test_state_get_comprehensive(repo: TestRepo) {std::fs::create_dir_all(&log_dir).unwrap();write_log_at(&log_dir,- &hook_log_rel_path("feature", "user", "post-start", "npm"),+ &hook_log_rel_path("feature", "user", "post-create", "npm"),"npm output",);write_log_at(@@ -1331,7 +1331,7 @@ fn test_state_get_json_with_logs(repo: TestRepo) {std::fs::create_dir_all(&log_dir).unwrap();write_log_at(&log_dir,- &hook_log_rel_path("feature", "user", "post-start", "npm"),+ &hook_log_rel_path("feature", "user", "post-create", "npm"),"npm output",);write_log_at(@@ -1387,11 +1387,11 @@ fn test_state_get_json_with_logs(repo: TestRepo) {},{"branch": "feature",- "file": "feature/user/post-start/npm.log",- "hook_type": "post-start",+ "file": "feature/user/post-create/npm.log",+ "hook_type": "post-create","modified_at": "<MTIME>","name": "npm",- "path": "_REPO_/.git/wt/logs/feature/user/post-start/npm.log",+ "path": "_REPO_/.git/wt/logs/feature/user/post-create/npm.log","size": "<SIZE>","source": "user"}@@ -2103,7 +2103,7 @@ fn test_logs_get_json_with_files(repo: TestRepo) {std::fs::write(log_dir.join("diagnostic.md"), "# report").unwrap();write_log_at(&log_dir,- &hook_log_rel_path("main", "user", "post-start", "server"),+ &hook_log_rel_path("main", "user", "post-create", "server"),"output",);diff --git a/tests/integration_tests/config_update_pty.rs b/tests/integration_tests/config_update_pty.rsindex 26a0680fb..ae98b8608 100644--- a/tests/integration_tests/config_update_pty.rs+++ b/tests/integration_tests/config_update_pty.rs@@ -37,7 +37,7 @@ fn test_config_update_prompt_accept(repo: TestRepo) {fs::write(config_path,r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-start = "ln -sf {{ repo_root }}/node_modules"+pre-create = "ln -sf {{ repo_root }}/node_modules""#,).unwrap();@@ -60,7 +60,7 @@ pre-start = "ln -sf {{ repo_root }}/node_modules"fn test_config_update_prompt_decline(repo: TestRepo) {let config_path = repo.test_config_path();let original_content = r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-start = "ln -sf {{ repo_root }}/node_modules"+pre-create = "ln -sf {{ repo_root }}/node_modules""#;fs::write(config_path, original_content).unwrap();diff --git a/tests/integration_tests/e2e_shell_post_start.rs b/tests/integration_tests/e2e_shell_post_create.rssimilarity index 91%rename from tests/integration_tests/e2e_shell_post_start.rsrename to tests/integration_tests/e2e_shell_post_create.rsindex cd30f2050..c7e4fc600 100644--- a/tests/integration_tests/e2e_shell_post_start.rs+++ b/tests/integration_tests/e2e_shell_post_create.rs@@ -13,17 +13,17 @@ use std::fs;// Test with bash and fish#[case("bash")]#[case("fish")]-fn test_shell_integration_post_start_background(#[case] shell: &str, repo: TestRepo) {+fn test_shell_integration_post_create_background(#[case] shell: &str, repo: TestRepo) {// Create project config with background commandlet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-start = "sleep 0.05 && echo 'Background task done' > bg_marker.txt""#,+ r#"post-create = "sleep 0.05 && echo 'Background task done' > bg_marker.txt""#,).unwrap();- repo.commit("Add post-start config");+ repo.commit("Add post-create config");// Pre-approve the commandrepo.write_test_approvals(@@ -98,20 +98,20 @@ approved-commands = ["sleep 0.05 && echo 'Background task done' > bg_marker.txt"}#[rstest]-fn test_bash_shell_integration_post_start_parallel(repo: TestRepo) {+fn test_bash_shell_integration_post_create_parallel(repo: TestRepo) {// Create project config with multiple background commandslet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"[post-start]+ r#"[post-create]task1 = "sleep 0.05 && echo 'Task 1' > task1.txt"task2 = "sleep 0.05 && echo 'Task 2' > task2.txt""#,).unwrap();- repo.commit("Add multiple post-start commands");+ repo.commit("Add multiple post-create commands");// Pre-approve commandsrepo.write_test_approvals(@@ -163,11 +163,11 @@ fn test_bash_shell_integration_post_create_blocks(repo: TestRepo) {fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"pre-start = "echo 'Setup done' > setup.txt""#,+ r#"pre-create = "echo 'Setup done' > setup.txt""#,).unwrap();- repo.commit("Add pre-start command");+ repo.commit("Add pre-create command");// Pre-approve commandrepo.write_test_approvals(@@ -203,12 +203,12 @@ approved-commands = ["echo 'Setup done' > setup.txt"]output);- // Verify that pre-start command completed before wt returned (blocking behavior)+ // Verify that pre-create command completed before wt returned (blocking behavior)// The file should exist immediately after wt exitslet setup_file = worktree_path.join("setup.txt");assert!(setup_file.exists(),- "Setup file should exist immediately after wt returns (pre-start is blocking)"+ "Setup file should exist immediately after wt returns (pre-create is blocking)");let content = fs::read_to_string(&setup_file).unwrap();@@ -221,13 +221,13 @@ approved-commands = ["echo 'Setup done' > setup.txt"]#[cfg(unix)]#[rstest]-fn test_fish_shell_integration_post_start_background(repo: TestRepo) {+fn test_fish_shell_integration_post_create_background(repo: TestRepo) {// Create project config with background commandlet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"[post-start]+ r#"[post-create]fish_bg = "sleep 0.05 && echo 'Fish background done' > fish_bg.txt""#,)diff --git a/tests/integration_tests/git_error_display.rs b/tests/integration_tests/git_error_display.rsindex 0418a435c..4b84235fd 100644--- a/tests/integration_tests/git_error_display.rs+++ b/tests/integration_tests/git_error_display.rs@@ -431,7 +431,7 @@ fn display_hook_command_failed_with_name() {#[test]fn display_hook_command_failed_without_name() {let err = WorktrunkError::HookCommandFailed {- hook_type: HookType::PreStart,+ hook_type: HookType::PreCreate,command_name: None,error: "command not found".into(),exit_code: Some(127),diff --git a/tests/integration_tests/help.rs b/tests/integration_tests/help.rsindex eef5e66a0..ec6d818d6 100644--- a/tests/integration_tests/help.rs+++ b/tests/integration_tests/help.rs@@ -280,7 +280,11 @@ fn test_help_description_unknown_command() {#[case("nested_subcommand_step_squash", "squash", "wt step squash")]#[case("nested_subcommand_step_commit", "commit", "wt step commit")]#[case("nested_subcommand_hook_pre_merge", "pre-merge", "wt hook pre-merge")]-#[case("nested_subcommand_hook_pre_start", "pre-start", "wt hook pre-start")]+#[case(+ "nested_subcommand_hook_pre_create",+ "pre-create",+ "wt hook pre-create"+)]fn test_nested_subcommand_suggestion(#[case] test_name: &str,#[case] subcommand: &str,diff --git a/tests/integration_tests/hook_show.rs b/tests/integration_tests/hook_show.rsindex 0f45806cb..c9bc603fc 100644--- a/tests/integration_tests/hook_show.rs+++ b/tests/integration_tests/hook_show.rs@@ -31,7 +31,7 @@ user-lint = "pre-commit run --all-files"{test = "cargo test"},]-[post-start]+[post-create]deps = "npm install""#,);@@ -88,7 +88,7 @@ fn setup_all_hook_types(repo: &TestRepo, temp_home: &TempDir) {{test = "cargo test"},]-[post-start]+[post-create]deps = "npm install"[post-merge]@@ -251,10 +251,10 @@ fn test_hook_show_merges_user_project_hooks(repo: TestRepo, temp_home: TempDir)format!(r#"worktree-path = "../{{{{ repo }}}}.{{{{ branch }}}}"-[post-start]+[post-create]global-hook = "echo global"-[projects.'{project_id_str}'.post-start]+[projects.'{project_id_str}'.post-create]project-hook = "echo per-project""#),@@ -391,7 +391,7 @@ broken = "echo {{ branch"}/// Test that undefined variable errors show both template and error with --expanded.-/// The `base` variable is only defined for pre-start hooks, so using it in pre-commit+/// The `base` variable is only defined for pre-create hooks, so using it in pre-commit/// will trigger an undefined variable error that shows both the error and raw template.#[rstest]fn test_hook_show_expanded_undefined_var(repo: TestRepo, temp_home: TempDir) {@@ -405,7 +405,7 @@ fn test_hook_show_expanded_undefined_var(repo: TestRepo, temp_home: TempDir) {).unwrap();- // Create project config with `base` variable (only defined for pre-start hooks)+ // Create project config with `base` variable (only defined for pre-create hooks)// In pre-commit context, this will be undefined and should show error + templaterepo.write_project_config(r#"[pre-commit]@@ -450,7 +450,7 @@ user-lint = "pre-commit run --all-files"{build = "cargo build"},]-[post-start]+[post-create]deps = "npm install""#,);@@ -474,7 +474,7 @@ deps = "npm install"assert_eq!(entries.len(),3,- "user pre-commit + project pre-merge + project post-start"+ "user pre-commit + project pre-merge + project post-create");// User entry@@ -511,7 +511,7 @@ fn test_hook_show_filtered_expanded_json(repo: TestRepo, temp_home: TempDir) {[pre-commit]user-lint = "echo {{ branch }}"-[post-start]+[post-create]user-greet = "echo hi""#,)@@ -520,7 +520,7 @@ user-greet = "echo hi"r#"[pre-commit]project-fmt = "echo fmt {{ branch }}"-[post-start]+[post-create]project-deps = "echo deps""#,);@@ -546,7 +546,7 @@ project-deps = "echo deps"let parsed: serde_json::Value = serde_json::from_str(&stdout).expect("valid JSON");let entries = parsed.as_array().expect("array");- // Filter dropped the post-start hooks from both user and project.+ // Filter dropped the post-create hooks from both user and project.let names: Vec<&str> = entries.iter().map(|e| e["name"].as_str().unwrap())diff --git a/tests/integration_tests/list.rs b/tests/integration_tests/list.rsindex 2a48a287a..972173c0a 100644--- a/tests/integration_tests/list.rs+++ b/tests/integration_tests/list.rs@@ -2266,7 +2266,7 @@ fn test_tips_dev_server_workflow(mut repo: TestRepo) {// Add project config with URL template for dev serversrepo.write_project_config(- r#"[post-start]+ r#"[post-create]server = "npm run dev -- --port {{ branch | hash_port }} &"[list]diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rsindex fd7bb1d9c..12d20b891 100644--- a/tests/integration_tests/merge.rs+++ b/tests/integration_tests/merge.rs@@ -1215,7 +1215,7 @@ command = "{llm_path_str}");}-// NOTE: test_readme_example_hooks_pre_start and test_readme_example_hooks_pre_merge+// NOTE: test_readme_example_hooks_pre_create and test_readme_example_hooks_pre_merge// were removed - they're covered by PTY-based tests in shell_wrapper.rs that capture// combined stdout/stderr for README examples.@@ -1279,7 +1279,7 @@ pub struct Hook {pub enum HookKind {PreMerge,PreRemove,- PostStart,+ PostCreate,}/// Registry of hooks keyed by name.diff --git a/tests/integration_tests/mod.rs b/tests/integration_tests/mod.rsindex 50cfb46f3..13ca94d28 100644--- a/tests/integration_tests/mod.rs+++ b/tests/integration_tests/mod.rs@@ -28,7 +28,7 @@ pub mod diagnostic;pub mod directives;pub mod doc_templates;pub mod e2e_shell;-pub mod e2e_shell_post_start;+pub mod e2e_shell_post_create;pub mod eval;pub mod for_each;pub mod git_error_display;@@ -41,7 +41,7 @@ pub mod list_config;pub mod list_progressive;pub mod merge;pub mod output_system_guard;-pub mod post_start_commands;+pub mod post_create_commands;pub mod push;pub mod readme_sync;pub mod remove;diff --git a/tests/integration_tests/post_start_commands.rs b/tests/integration_tests/post_create_commands.rssimilarity index 85%rename from tests/integration_tests/post_start_commands.rsrename to tests/integration_tests/post_create_commands.rsindex f7e0466d5..0e812384e 100644--- a/tests/integration_tests/post_start_commands.rs+++ b/tests/integration_tests/post_create_commands.rs@@ -45,7 +45,7 @@ fn test_post_create_no_config(repo: TestRepo) {#[rstest]fn test_post_create_single_command(repo: TestRepo) {// Create project config with a single command (string format)- repo.write_project_config(r#"pre-start = "echo 'Setup complete'""#);+ repo.write_project_config(r#"pre-create = "echo 'Setup complete'""#);repo.commit("Add config");@@ -64,11 +64,53 @@ approved-commands = ["echo 'Setup complete'"]);}+/// A config that still uses the deprecated `pre-start` hook key loads and runs:+/// the key is silently migrated to `pre-create`. Phase 1 of the rename emits no+/// warning (see https://github.com/max-sixty/worktrunk/issues/2838).+#[rstest]+fn test_deprecated_start_hook_key_runs_silently(repo: TestRepo) {+ repo.write_project_config(r#"pre-start = "echo ran > marker.txt""#);+ repo.commit("Add deprecated pre-start hook");+ repo.write_test_approvals(+ r#"[projects."../origin"]+approved-commands = ["echo ran > marker.txt"]+"#,+ );++ let temp_home = TempDir::new().unwrap();+ let mut cmd = repo.wt_command();+ cmd.args(["switch", "--create", "feature"])+ .current_dir(repo.root_path());+ set_temp_home_env(&mut cmd, temp_home.path());+ let output = cmd.output().unwrap();++ assert!(+ output.status.success(),+ "switch with a deprecated pre-start hook should succeed, stderr: {}",+ String::from_utf8_lossy(&output.stderr)+ );++ // The hook ran — the `pre-start` key was migrated to `pre-create`.+ let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");+ assert!(+ worktree_path.join("marker.txt").exists(),+ "deprecated pre-start hook should have run"+ );++ // Phase 1 migrates silently: no deprecation warning, and no stray+ // "run wt config show" hint (the check_and_migrate empty-warnings guard).+ let stderr = String::from_utf8_lossy(&output.stderr);+ assert!(+ !stderr.to_lowercase().contains("deprecated") && !stderr.contains("config show"),+ "no deprecation warning or hint expected in phase 1, got: {stderr}"+ );+}+#[rstest]fn test_post_create_named_commands(repo: TestRepo) {// Create project config with named commands (table format)repo.write_project_config(- r#"[pre-start]+ r#"[pre-create]install = "echo 'Installing deps'"setup = "echo 'Running setup'""#,@@ -97,7 +139,7 @@ approved-commands = [#[rstest]fn test_post_create_failing_command(repo: TestRepo) {// Create project config with a command that will fail- repo.write_project_config(r#"pre-start = "exit 1""#);+ repo.write_project_config(r#"pre-create = "exit 1""#);repo.commit("Add config with failing command");@@ -108,7 +150,7 @@ approved-commands = ["exit 1"]"#,);- // Failing pre-start hook (via deprecated pre-start name) aborts with FailFast+ // Failing pre-create hook (via deprecated pre-create name) aborts with FailFastsnapshot_switch("post_create_failing_command",&repo,@@ -120,7 +162,7 @@ approved-commands = ["exit 1"]fn test_post_create_template_expansion(repo: TestRepo) {// Create project config with template variablesrepo.write_project_config(- r#"[pre-start]+ r#"[pre-create]repo = "echo 'Repo: {{ repo }}' > info.txt"branch = "echo 'Branch: {{ branch }}' >> info.txt"hash_port = "echo 'Port: {{ branch | hash_port }}' >> info.txt"@@ -199,9 +241,9 @@ approved-commands = [#[rstest]fn test_post_create_verbose_template_expansion(repo: TestRepo) {- // Test that -v shows template expansion for pre-start hooks+ // Test that -v shows template expansion for pre-create hooksrepo.write_project_config(- r#"[pre-start]+ r#"[pre-create]setup = "echo 'Setting up {{ branch | sanitize }} in {{ worktree_path }}'""#,);@@ -239,7 +281,7 @@ approved-commands = [fn test_post_create_default_branch_template(repo: TestRepo) {// Create project config with default_branch template variablerepo.write_project_config(- r#"pre-start = "echo 'Default: {{ default_branch }}' > default.txt""#,+ r#"pre-create = "echo 'Default: {{ default_branch }}' > default.txt""#,);repo.commit("Add config with default_branch template");@@ -285,7 +327,7 @@ fn test_post_create_git_variables_template(#[from(repo_with_remote)] repo: TestR// Create project config with git-related template variablesrepo.write_project_config(- r#"[pre-start]+ r#"[pre-create]commit = "echo 'Commit: {{ commit }}' > git_vars.txt"short = "echo 'Short: {{ short_commit }}' >> git_vars.txt"remote = "echo 'Remote: {{ remote }}' >> git_vars.txt"@@ -360,7 +402,7 @@ fn test_post_create_upstream_template(#[from(repo_with_remote)] repo: TestRepo)// Note: {{ upstream }} errors when the new branch has no upstream tracking.// The new feature branch won't have an upstream until it's pushed with -u.// This test verifies the error case - see test_post_create_upstream_conditional for the fix.- repo.write_project_config(r#"pre-start = "echo 'Upstream: {{ upstream }}' > upstream.txt""#);+ repo.write_project_config(r#"pre-create = "echo 'Upstream: {{ upstream }}' > upstream.txt""#);repo.commit("Add config with upstream template");@@ -393,7 +435,7 @@ fn test_post_create_upstream_conditional(#[from(repo_with_remote)] repo: TestRep// Create project config with conditional upstream check// Using {% if not upstream %} allows safe handling of undefined variablesrepo.write_project_config(- r#"pre-start = "{% if not upstream %}echo 'no-upstream' > upstream.txt{% else %}echo '{{ upstream }}' > upstream.txt{% endif %}""#,+ r#"pre-create = "{% if not upstream %}echo 'no-upstream' > upstream.txt{% else %}echo '{{ upstream }}' > upstream.txt{% endif %}""#,);repo.commit("Add config with conditional upstream");@@ -433,7 +475,7 @@ approved-commands = ["{% if not upstream %}echo 'no-upstream' > upstream.txt{% efn test_post_create_base_variables(repo: TestRepo) {// Create project config with base template variablesrepo.write_project_config(- r#"[pre-start]+ r#"[pre-create]base = "echo 'Base: {{ base }}' > base_info.txt"base_path = "echo 'Base Path: {{ base_worktree_path }}' >> base_info.txt""#,@@ -500,12 +542,12 @@ approved-commands = [}#[rstest]-fn test_post_create_json_stdin(repo: TestRepo) {+fn test_pre_create_json_stdin(repo: TestRepo) {use crate::common::wt_command;// Create project config with a command that reads JSON from stdin// Use cat to capture stdin to a file- repo.write_project_config(r#"pre-start = "cat > context.json""#);+ repo.write_project_config(r#"pre-create = "cat > context.json""#);repo.commit("Add config");@@ -570,7 +612,7 @@ approved-commands = ["cat > context.json"]);assert_eq!(json["hook_type"].as_str(),- Some("pre-start"),+ Some("pre-create"),"JSON should contain hook_type");}@@ -608,7 +650,7 @@ with open('hook_output.txt', 'w') as f:// Create project config that runs the scriptrepo.write_project_config(- r#"[pre-start]+ r#"[pre-create]setup = "./scripts/setup.py""#,);@@ -663,7 +705,7 @@ approved-commands = ["./scripts/setup.py"]contents);assert!(- contents.contains("hook_type=pre-start"),+ contents.contains("hook_type=pre-create"),"Output should contain hook_type: {}",contents);@@ -675,11 +717,11 @@ approved-commands = ["./scripts/setup.py"]}#[rstest]-fn test_post_start_json_stdin(repo: TestRepo) {+fn test_post_create_json_stdin(repo: TestRepo) {use crate::common::wt_command;// Create project config with a background command that reads JSON from stdin- repo.write_project_config(r#"post-start = "cat > context.json""#);+ repo.write_project_config(r#"post-create = "cat > context.json""#);repo.commit("Add config");@@ -722,7 +764,7 @@ approved-commands = ["cat > context.json"]);assert_eq!(json["hook_type"].as_str(),- Some("post-start"),+ Some("post-create"),"Background hook should receive hook_type");}@@ -732,10 +774,10 @@ approved-commands = ["cat > context.json"]// ============================================================================#[rstest]-fn test_post_start_single_background_command(repo: TestRepo) {+fn test_post_create_single_background_command(repo: TestRepo) {// Create project config with a background commandrepo.write_project_config(- r#"post-start = "sleep 0.1 && echo 'Background task done' > background.txt""#,+ r#"post-create = "sleep 0.1 && echo 'Background task done' > background.txt""#,);repo.commit("Add background command");@@ -749,7 +791,7 @@ approved-commands = ["sleep 0.1 && echo 'Background task done' > background.txt"// Command should spawn in background (wt exits immediately)snapshot_switch(- "post_start_single_background",+ "post_create_single_background",&repo,&["--create", "feature"],);@@ -767,10 +809,10 @@ approved-commands = ["sleep 0.1 && echo 'Background task done' > background.txt"/// Test that -v shows verbose per-hook output for background hooks#[rstest]-fn test_post_start_verbose_shows_per_hook_output(repo: TestRepo) {+fn test_post_create_verbose_shows_per_hook_output(repo: TestRepo) {// Create project config with a background commandrepo.write_project_config(- r#"[post-start]+ r#"[post-create]setup = "echo 'verbose test' > verbose.txt""#,);@@ -786,17 +828,17 @@ approved-commands = ["echo 'verbose test' > verbose.txt"]// With -v, should show detailed per-hook output with command in guttersnapshot_switch(- "post_start_verbose_output",+ "post_create_verbose_output",&repo,&["-v", "--create", "feature"],);}#[rstest]-fn test_post_start_multiple_background_commands(repo: TestRepo) {+fn test_post_create_multiple_background_commands(repo: TestRepo) {// Create project config with multiple background commands (table format)repo.write_project_config(- r#"[post-start]+ r#"[post-create]task1 = "echo 'Task 1 running' > task1.txt"task2 = "echo 'Task 2 running' > task2.txt""#,@@ -816,7 +858,7 @@ approved-commands = [// Commands should spawn in parallelsnapshot_switch(- "post_start_multiple_background",+ "post_create_multiple_background",&repo,&["--create", "feature"],);@@ -828,12 +870,12 @@ approved-commands = [}#[rstest]-fn test_both_post_create_and_post_start(repo: TestRepo) {- // Create project config with both command types+fn test_both_pre_create_and_post_create(repo: TestRepo) {+ // Create project config with both a blocking and a background creation hookrepo.write_project_config(- r#"pre-start = "echo 'Setup done' > setup.txt"+ r#"pre-create = "echo 'Setup done' > setup.txt"-[post-start]+[post-create]server = "sleep 0.05 && echo 'Server running' > server.txt""#,);@@ -850,10 +892,10 @@ approved-commands = ["#,);- // Post-create should run first (blocking), then post-start (background)- snapshot_switch("both_create_and_start", &repo, &["--create", "feature"]);+ // pre-create runs first (blocking), then post-create (background)+ snapshot_switch("both_pre_and_post_create", &repo, &["--create", "feature"]);- // Setup file should exist immediately (pre-start is blocking)+ // Setup file should exist immediately (pre-create is blocking)let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");assert!(worktree_path.join("setup.txt").exists(),@@ -867,7 +909,7 @@ approved-commands = [#[rstest]fn test_invalid_toml(repo: TestRepo) {// Create invalid TOML- repo.write_project_config("pre-start = [invalid syntax\n");+ repo.write_project_config("pre-create = [invalid syntax\n");repo.commit("Add invalid config");@@ -880,9 +922,11 @@ fn test_invalid_toml(repo: TestRepo) {// ============================================================================#[rstest]-fn test_post_start_log_file_captures_output(repo: TestRepo) {+fn test_post_create_log_file_captures_output(repo: TestRepo) {// Create command that writes to both stdout and stderr- repo.write_project_config(r#"post-start = "echo 'stdout output' && echo 'stderr output' >&2""#);+ repo.write_project_config(+ r#"post-create = "echo 'stdout output' && echo 'stderr output' >&2""#,+ );repo.commit("Add command with stdout/stderr");@@ -894,7 +938,7 @@ approved-commands = ["echo 'stdout output' && echo 'stderr output' >&2"]);snapshot_switch(- "post_start_log_captures_output",+ "post_create_log_captures_output",&repo,&["--create", "feature"],);@@ -906,13 +950,13 @@ approved-commands = ["echo 'stdout output' && echo 'stderr output' >&2"]// 2 log files: runner log + per-command log (cmd-0, unnamed single command)wait_for_file_count(&log_dir, "log", 2);- // Find the command log file at `{branch}/project/post-start/cmd-0-*.log`.- let post_start_dir = log_dir+ // Find the command log file at `{branch}/project/post-create/cmd-0-*.log`.+ let post_create_dir = log_dir.join(worktrunk::path::sanitize_for_filename("feature")).join("project")- .join("post-start");- let cmd_log = fs::read_dir(&post_start_dir)- .unwrap_or_else(|e| panic!("reading {post_start_dir:?}: {e}"))+ .join("post-create");+ let cmd_log = fs::read_dir(&post_create_dir)+ .unwrap_or_else(|e| panic!("reading {post_create_dir:?}: {e}")).filter_map(|e| e.ok()).map(|e| e.path()).find(|p| {@@ -936,9 +980,9 @@ approved-commands = ["echo 'stdout output' && echo 'stderr output' >&2"]}#[rstest]-fn test_post_start_invalid_command_handling(repo: TestRepo) {+fn test_post_create_invalid_command_handling(repo: TestRepo) {// Create command with syntax error (missing quote)- repo.write_project_config(r#"post-start = "echo 'unclosed quote""#);+ repo.write_project_config(r#"post-create = "echo 'unclosed quote""#);repo.commit("Add invalid command");@@ -951,7 +995,7 @@ approved-commands = ["echo 'unclosed quote"]// wt should still complete successfully even if background command has errorssnapshot_switch(- "post_start_invalid_command",+ "post_create_invalid_command",&repo,&["--create", "feature"],);@@ -960,15 +1004,15 @@ approved-commands = ["echo 'unclosed quote"]let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");assert!(worktree_path.exists(),- "Worktree should be created even if post-start command fails"+ "Worktree should be created even if post-create command fails");}#[rstest]-fn test_post_start_multiple_commands_separate_logs(repo: TestRepo) {+fn test_post_create_multiple_commands_separate_logs(repo: TestRepo) {// Create multiple background commands with distinct outputrepo.write_project_config(- r#"[post-start]+ r#"[post-create]task1 = "echo 'TASK1_OUTPUT'"task2 = "echo 'TASK2_OUTPUT'"task3 = "echo 'TASK3_OUTPUT'"@@ -988,7 +1032,7 @@ approved-commands = ["#,);- snapshot_switch("post_start_separate_logs", &repo, &["--create", "feature"]);+ snapshot_switch("post_create_separate_logs", &repo, &["--create", "feature"]);// Each command gets its own log file (task1, task2, task3) plus one runner log.let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");@@ -997,13 +1041,13 @@ approved-commands = [wait_for_file_count(&log_dir, "log", 4);// Verify each task's output is in its own log file. Hook logs live at- // `{branch}/project/post-start/{task}.log` in the nested layout.- let post_start_dir = log_dir+ // `{branch}/project/post-create/{task}.log` in the nested layout.+ let post_create_dir = log_dir.join(worktrunk::path::sanitize_for_filename("feature")).join("project")- .join("post-start");- let log_files: Vec<_> = fs::read_dir(&post_start_dir)- .unwrap_or_else(|e| panic!("reading {post_start_dir:?}: {e}"))+ .join("post-create");+ let log_files: Vec<_> = fs::read_dir(&post_create_dir)+ .unwrap_or_else(|e| panic!("reading {post_create_dir:?}: {e}")).filter_map(|e| e.ok()).collect();for (task, expected) in [@@ -1014,7 +1058,7 @@ approved-commands = [let log_file = log_files.iter().find(|e| e.file_name().to_string_lossy().starts_with(task))- .unwrap_or_else(|| panic!("should have log file for {task} in {post_start_dir:?}"));+ .unwrap_or_else(|| panic!("should have log file for {task} in {post_create_dir:?}"));wait_for_file_content(&log_file.path());let contents = fs::read_to_string(log_file.path()).unwrap();@@ -1026,9 +1070,9 @@ approved-commands = [}#[rstest]-fn test_execute_flag_with_post_start_commands(repo: TestRepo) {- // Create post-start command- repo.write_project_config(r#"post-start = "echo 'Background task' > background.txt""#);+fn test_execute_flag_with_post_create_commands(repo: TestRepo) {+ // Create post-create command+ repo.write_project_config(r#"post-create = "echo 'Background task' > background.txt""#);repo.commit("Add background command");@@ -1039,9 +1083,9 @@ approved-commands = ["echo 'Background task' > background.txt"]"#,);- // Use --execute flag along with post-start command+ // Use --execute flag along with post-create commandsnapshot_switch(- "execute_with_post_start",+ "execute_with_post_create",&repo,&["--create",@@ -1064,10 +1108,10 @@ approved-commands = ["echo 'Background task' > background.txt"]}#[rstest]-fn test_post_start_complex_shell_commands(repo: TestRepo) {+fn test_post_create_complex_shell_commands(repo: TestRepo) {// Create command with pipes and redirectsrepo.write_project_config(- r#"post-start = "echo 'line1\nline2\nline3' | grep line2 > filtered.txt""#,+ r#"post-create = "echo 'line1\nline2\nline3' | grep line2 > filtered.txt""#,);repo.commit("Add complex shell command");@@ -1079,7 +1123,7 @@ approved-commands = ["echo 'line1\nline2\nline3' | grep line2 > filtered.txt"]"#,);- snapshot_switch("post_start_complex_shell", &repo, &["--create", "feature"]);+ snapshot_switch("post_create_complex_shell", &repo, &["--create", "feature"]);// Wait for background command to create the file AND flush contentlet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");@@ -1091,10 +1135,10 @@ approved-commands = ["echo 'line1\nline2\nline3' | grep line2 > filtered.txt"]}#[rstest]-fn test_post_start_multiline_commands_with_newlines(repo: TestRepo) {+fn test_post_create_multiline_commands_with_newlines(repo: TestRepo) {// Create command with actual newlines (using TOML triple-quoted string)repo.write_project_config(- r#"post-start = """+ r#"post-create = """echo 'first line' > multiline.txtecho 'second line' >> multiline.txtecho 'third line' >> multiline.txt@@ -1119,7 +1163,7 @@ approved-commands = ["""));snapshot_switch(- "post_start_multiline_with_newlines",+ "post_create_multiline_with_newlines",&repo,&["--create", "feature"],);@@ -1141,7 +1185,7 @@ approved-commands = ["""fn test_post_create_multiline_with_control_structures(repo: TestRepo) {// Test multiline command with if-else control structurerepo.write_project_config(- r#"pre-start = """+ r#"pre-create = """if [ ! -f test.txt ]; thenecho 'File does not exist' > result.txtelse@@ -1192,44 +1236,44 @@ approved-commands = ["""// ============================================================================///-/// This is a regression test for a bug where post-start commands were running on ALL+/// This is a regression test for a bug where post-create commands were running on ALL/// `wt switch` operations instead of only on `wt switch --create`.#[rstest]-fn test_post_start_skipped_on_existing_worktree(repo: TestRepo) {- // Create project config with post-start command- repo.write_project_config(r#"post-start = "echo 'POST-START-RAN' > post_start_marker.txt""#);+fn test_post_create_skipped_on_existing_worktree(repo: TestRepo) {+ // Create project config with post-create command+ repo.write_project_config(r#"post-create = "echo 'POST-START-RAN' > post_create_marker.txt""#);- repo.commit("Add post-start config");+ repo.commit("Add post-create config");// Pre-approve the commandrepo.write_test_approvals(r#"[projects."../origin"]-approved-commands = ["echo 'POST-START-RAN' > post_start_marker.txt"]+approved-commands = ["echo 'POST-START-RAN' > post_create_marker.txt"]"#,);- // First: Create worktree - post-start SHOULD run+ // First: Create worktree - post-create SHOULD runsnapshot_switch(- "post_start_create_with_command",+ "post_create_create_with_command",&repo,&["--create", "feature"],);- // Wait for background post-start command to complete+ // Wait for background post-create command to completelet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");- let marker_file = worktree_path.join("post_start_marker.txt");+ let marker_file = worktree_path.join("post_create_marker.txt");wait_for_file(marker_file.as_path());- // Remove the marker file to detect if post-start runs again+ // Remove the marker file to detect if post-create runs againfs::remove_file(&marker_file).unwrap();- // Second: Switch to EXISTING worktree - post-start should NOT run- snapshot_switch("post_start_skip_existing", &repo, &["feature"]);+ // Second: Switch to EXISTING worktree - post-create should NOT run+ snapshot_switch("post_create_skip_existing", &repo, &["feature"]);// Wait to ensure no background command starts (testing absence requires fixed wait)thread::sleep(SLEEP_FOR_ABSENCE_CHECK);- // Verify post-start did NOT run when switching to existing worktree+ // Verify post-create did NOT run when switching to existing worktreeassert!(!marker_file.exists(),"Post-start should NOT run when switching to existing worktree"@@ -1241,10 +1285,10 @@ approved-commands = ["echo 'POST-START-RAN' > post_start_marker.txt"]// ============================================================================#[rstest]-fn test_post_start_project_pipeline(repo: TestRepo) {+fn test_post_create_project_pipeline(repo: TestRepo) {// Project config with pipeline: serial setup, then concurrent tasksrepo.write_project_config(- r#"post-start = [+ r#"post-create = ["echo SETUP > setup_marker.txt",{ task1 = "cat setup_marker.txt > task1_saw_setup.txt", task2 = "echo TASK2 > task2.txt" }]@@ -1263,7 +1307,7 @@ approved-commands = [);snapshot_switch(- "post_start_project_pipeline",+ "post_create_project_pipeline",&repo,&["--create", "feature"],);@@ -1281,10 +1325,10 @@ approved-commands = [}#[rstest]-fn test_post_start_pipeline_with_template_vars(repo: TestRepo) {+fn test_post_create_pipeline_with_template_vars(repo: TestRepo) {// Pipeline with template variable expansionrepo.write_project_config(- r#"post-start = [+ r#"post-create = ["echo {{ branch }} > branch_marker.txt",{ check = "cat branch_marker.txt > branch_check.txt" }]@@ -1302,7 +1346,7 @@ approved-commands = [);snapshot_switch(- "post_start_pipeline_template_vars",+ "post_create_pipeline_template_vars",&repo,&["--create", "feature"],);@@ -1319,11 +1363,11 @@ approved-commands = [}#[rstest]-fn test_post_start_target_variable_expands_to_branch(repo: TestRepo) {- // `{{ target }}` in post-start should equal the bare `{{ branch }}` —+fn test_post_create_target_variable_expands_to_branch(repo: TestRepo) {+ // `{{ target }}` in post-create should equal the bare `{{ branch }}` —// symmetric with `pre-switch`, which already injects `target`.- repo.write_project_config(r#"post-start = "echo '{{ target }}' > target_marker.txt""#);- repo.commit("Add post-start with target var");+ repo.write_project_config(r#"post-create = "echo '{{ target }}' > target_marker.txt""#);+ repo.commit("Add post-create with target var");repo.write_test_approvals(r#"[projects."../origin"]@@ -1332,7 +1376,7 @@ approved-commands = ["echo '{{ target }}' > target_marker.txt"]);snapshot_switch(- "post_start_target_variable",+ "post_create_target_variable",&repo,&["--create", "feature"],);@@ -1388,11 +1432,11 @@ approved-commands = ["echo '{{ target }}' > target_marker.txt"]}#[rstest]-fn test_post_start_mixed_user_pipeline_project_flat(repo: TestRepo) {+fn test_post_create_mixed_user_pipeline_project_flat(repo: TestRepo) {// User has a pipeline, project has flat concurrent commands.// Both should execute.repo.write_test_config(- r#"post-start = [+ r#"post-create = ["echo USER_SETUP > user_pipeline_marker.txt",{ user_bg = "echo USER_BG > user_bg.txt" }]@@ -1400,7 +1444,7 @@ fn test_post_start_mixed_user_pipeline_project_flat(repo: TestRepo) {);repo.write_project_config(- r#"[post-start]+ r#"[post-create]proj = "echo PROJECT > project_marker.txt""#,);@@ -1413,7 +1457,7 @@ approved-commands = ["echo PROJECT > project_marker.txt"]);snapshot_switch(- "post_start_mixed_user_pipeline_project_flat",+ "post_create_mixed_user_pipeline_project_flat",&repo,&["--create", "feature"],);@@ -1438,14 +1482,14 @@ approved-commands = ["echo PROJECT > project_marker.txt"]/// failing-first-command variant additionally exercises the bail-on-failure/// path inside the serial branch — second never gets to run.#[rstest]-fn test_post_start_concurrent_serial_force(repo: TestRepo) {+fn test_post_create_concurrent_serial_force(repo: TestRepo) {repo.write_project_config(- r#"[post-start]+ r#"[post-create]first = "echo FIRST >> serial_order.txt"second = "echo SECOND >> serial_order.txt""#,);- repo.commit("Add concurrent post-start");+ repo.commit("Add concurrent post-create");repo.write_test_approvals(r#"[projects."../origin"]@@ -1474,17 +1518,17 @@ approved-commands = [}#[rstest]-fn test_post_start_concurrent_serial_bails_on_failure(repo: TestRepo) {+fn test_post_create_concurrent_serial_bails_on_failure(repo: TestRepo) {// First command writes a marker then fails; second writes a marker that// would always exist if it ran. Serial mode bails after the first failure,// so the second marker should be absent.repo.write_project_config(- r#"[post-start]+ r#"[post-create]first = "echo FIRST > first_marker.txt && false"second = "echo SECOND > second_marker.txt""#,);- repo.commit("Add failing post-start");+ repo.commit("Add failing post-create");repo.write_test_approvals(r#"[projects."../origin"]diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rsindex c518d03ef..55e331b2f 100644--- a/tests/integration_tests/shell_wrapper.rs+++ b/tests/integration_tests/shell_wrapper.rs@@ -1024,7 +1024,7 @@ mod unix_tests {);}- /// Test switch --create with pre-start (blocking) and post-start (background)+ /// Test switch --create with pre-create (blocking) and post-create (background)/// Note: bash and fish disabled due to flaky PTY buffering race conditions////// TODO: Fix timing/race condition in bash where "Building project..." output appears@@ -1035,19 +1035,19 @@ mod unix_tests {#[case("zsh")]// #[case("fish")] // TODO: Fish shell has non-deterministic PTY output orderingfn test_wrapper_switch_with_hooks(#[case] shell: &str, repo: TestRepo) {- // Create project config with both pre-start and post-start hooks+ // Create project config with both pre-create and post-create hookslet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),r#"# Blocking commands that run before worktree is ready-pre-start = [+pre-create = [{install = "echo 'Installing dependencies...'"},{build = "echo 'Building project...'"},]# Background commands that run in parallel-[post-start]+[post-create]server = "echo 'Starting dev server on port 3000'"watch = "echo 'Watching for file changes'""#,@@ -1269,18 +1269,18 @@ approved-commands = [// ========================================================================#[rstest]- fn test_switch_with_post_start_command_no_directive_leak(repo: TestRepo) {- // Configure a post-start command in the project config (this is where the bug manifests)- // The println! in handle_post_start_commands causes directive leaks+ fn test_switch_with_post_create_command_no_directive_leak(repo: TestRepo) {+ // Configure a post-create command in the project config (this is where the bug manifests)+ // The println! in handle_post_create_commands causes directive leakslet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-start = "echo 'test command executed'""#,+ r#"post-create = "echo 'test command executed'""#,).unwrap();- repo.commit("Add post-start command");+ repo.commit("Add post-create command");// Pre-approve the commandrepo.write_test_approvals(@@ -1411,16 +1411,16 @@ approved-commands = ["echo 'test command executed'"]#[rstest]fn test_wrapper_preserves_progress_messages(repo: TestRepo) {- // Configure a post-start background command that will trigger progress output+ // Configure a post-create background command that will trigger progress outputlet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-start = "echo 'background task'""#,+ r#"post-create = "echo 'background task'""#,).unwrap();- repo.commit("Add post-start command");+ repo.commit("Add post-create command");// Pre-approve the commandrepo.write_test_approvals(@@ -1456,16 +1456,16 @@ approved-commands = ["echo 'background task'"]#[rstest]fn test_fish_wrapper_preserves_progress_messages(repo: TestRepo) {- // Configure a post-start background command that will trigger progress output+ // Configure a post-create background command that will trigger progress outputlet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-start = "echo 'fish background task'""#,+ r#"post-create = "echo 'fish background task'""#,).unwrap();- repo.commit("Add post-start command");+ repo.commit("Add post-create command");// Pre-approve the commandrepo.write_test_approvals(@@ -1665,16 +1665,16 @@ approved-commands = ["echo 'fish background task'"]/// The NO_MONITOR option should suppress [1] 12345 and [1] + done messages#[rstest]fn test_zsh_no_job_control_notifications(repo: TestRepo) {- // Configure a post-start command that will trigger background job+ // Configure a post-create command that will trigger background joblet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-start = "echo 'background job'""#,+ r#"post-create = "echo 'background job'""#,).unwrap();- repo.commit("Add post-start command");+ repo.commit("Add post-create command");// Pre-approve the commandrepo.write_test_approvals(@@ -1713,16 +1713,16 @@ approved-commands = ["echo 'background job'"]/// - DONE notifications (`[1]+ Done`): `set +m` before backgrounding#[rstest]fn test_bash_job_control_suppression(repo: TestRepo) {- // Configure a post-start command that will trigger background job+ // Configure a post-create command that will trigger background joblet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-start = "echo 'bash background'""#,+ r#"post-create = "echo 'bash background'""#,).unwrap();- repo.commit("Add post-start command");+ repo.commit("Add post-create command");// Pre-approve the commandrepo.write_test_approvals(@@ -2276,16 +2276,16 @@ approved-commands = ["echo 'bash background'"]#[case("fish")]#[case("nu")]fn test_shell_completes_cleanly(#[case] shell: &str, repo: TestRepo) {- // Configure a post-start command to exercise the background job code path+ // Configure a post-create command to exercise the background job code pathlet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-start = "echo 'cleanup test'""#,+ r#"post-create = "echo 'cleanup test'""#,).unwrap();- repo.commit("Add post-start command");+ repo.commit("Add post-create command");// Pre-approve the commandrepo.write_test_approvals(@@ -2540,7 +2540,7 @@ command = "{}"shell_wrapper_settings().bind(|| assert_snapshot!(&output.combined));}- /// README example: Creating worktree with pre-start and post-start hooks+ /// README example: Creating worktree with pre-create and post-create hooks////// This test demonstrates:/// - Pre-start hooks (install dependencies)@@ -2548,10 +2548,10 @@ command = "{}"////// Uses shell wrapper to avoid "To enable automatic cd" hint.///- /// Source: tests/snapshots/shell_wrapper__tests__readme_example_hooks_pre_start.snap+ /// Source: tests/snapshots/shell_wrapper__tests__readme_example_hooks_pre_create.snap#[rstest]- fn test_readme_example_hooks_pre_start(repo: TestRepo) {- // Create project config with pre-start and post-start hooks+ fn test_readme_example_hooks_pre_create(repo: TestRepo) {+ // Create project config with pre-create and post-create hookslet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();@@ -2587,10 +2587,10 @@ fi}let config_content = r#"-[pre-start]+[pre-create]"install" = "uv sync"-[post-start]+[post-create]"dev" = "uv run dev""#;@@ -2620,7 +2620,7 @@ fishell_wrapper_settings().bind(|| assert_snapshot!(&output.combined));}- /// README example: approval prompt for pre-start commands+ /// README example: approval prompt for pre-create commands/// This test captures just the prompt (before responding) to show what users see.////// Note: This uses direct PTY execution (not shell wrapper) because interactive prompts@@ -2634,9 +2634,9 @@ fi// Remove origin so worktrunk uses directory name as project identifierrepo.run_git(&["remote", "remove", "origin"]);- // Create project config with named pre-start commands+ // Create project config with named pre-create commandsrepo.write_project_config(- r#"pre-start = [+ r#"pre-create = [{install = "echo 'Installing dependencies...'"},{build = "echo 'Building project...'"},{test = "echo 'Running tests...'"},diff --git a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_without_name.snap b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_without_name.snapindex cf18a1f79..0a0f27ba4 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_without_name.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__git_error_display__hook_command_failed_without_name.snap@@ -2,4 +2,4 @@source: tests/integration_tests/git_error_display.rsexpression: err.to_string()----[31m✗[39m [31mpre-start command failed: command not found[39m+[31m✗[39m [31mpre-create command failed: command not found[39mdiff --git a/tests/integration_tests/switch.rs b/tests/integration_tests/switch.rsindex 985a1c850..7bdf5ec52 100644--- a/tests/integration_tests/switch.rs+++ b/tests/integration_tests/switch.rs@@ -980,7 +980,7 @@ fn test_switch_no_config_commands_execute_still_runs(repo: TestRepo) {}#[rstest]-fn test_switch_no_config_commands_skips_post_start_commands(repo: TestRepo) {+fn test_switch_no_config_commands_skips_post_create_commands(repo: TestRepo) {use std::fs;// Create project config with a command that would create a file@@ -991,7 +991,7 @@ fn test_switch_no_config_commands_skips_post_start_commands(repo: TestRepo) {fs::write(config_dir.join("wt.toml"),- format!(r#"post-start = "{}""#, create_file_cmd),+ format!(r#"post-create = "{}""#, create_file_cmd),).unwrap();@@ -1013,14 +1013,14 @@ approved-commands = ["{}"]).unwrap();- // With --no-hooks, the post-start command should be skipped+ // With --no-hooks, the post-create command should be skippedsnapshot_switch(- "switch_no_hooks_skips_post_start",+ "switch_no_hooks_skips_post_create",&repo,- &["--create", "no-post-start", "--no-hooks"],+ &["--create", "no-post-create", "--no-hooks"],);- // post-start runs in the background; with --no-hooks it is never spawned,+ // post-create runs in the background; with --no-hooks it is never spawned,// but sleep briefly so a regression that incorrectly spawns it has time to// create the marker (per tests/CLAUDE.md "Testing absence").std::thread::sleep(std::time::Duration::from_millis(500));@@ -1029,10 +1029,10 @@ approved-commands = ["{}"].root_path().parent().unwrap()- .join(format!("{repo_name}.no-post-start"));+ .join(format!("{repo_name}.no-post-create"));assert!(!worktree.join("marker.txt").exists(),- "post-start hook should have been skipped, but marker.txt was created"+ "post-create hook should have been skipped, but marker.txt was created");}@@ -1062,7 +1062,7 @@ fn test_switch_no_config_commands_with_yes(repo: TestRepo) {fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-start = "echo 'marker' > marker.txt""#,+ r#"post-create = "echo 'marker' > marker.txt""#,).unwrap();@@ -1076,7 +1076,7 @@ fn test_switch_no_config_commands_with_yes(repo: TestRepo) {&["--create", "yes-no-hooks", "--yes", "--no-hooks"],);- // post-start runs in the background; with --no-hooks it is never spawned,+ // post-create runs in the background; with --no-hooks it is never spawned,// but sleep briefly so a regression that incorrectly spawns it has time to// create the marker (per tests/CLAUDE.md "Testing absence").std::thread::sleep(std::time::Duration::from_millis(500));@@ -1088,11 +1088,11 @@ fn test_switch_no_config_commands_with_yes(repo: TestRepo) {.join(format!("{repo_name}.yes-no-hooks"));assert!(!worktree.join("marker.txt").exists(),- "post-start hook should have been skipped, but marker.txt was created"+ "post-create hook should have been skipped, but marker.txt was created");}-/// `wt switch --create <new> --base <other>` resolves `pre-start` / `post-start`+/// `wt switch --create <new> --base <other>` resolves `pre-create` / `post-create`/// from the base branch's committed `.config/wt.toml` — the worktree these hooks/// run in is a checkout of that branch. The primary worktree (cwd) has no/// project config at all; only `other-base` does, so a regression that read the@@ -1106,8 +1106,8 @@ fn test_switch_create_reads_base_branch_config(mut repo: TestRepo) {other_wt.join(".config/wt.toml"),// `{{ repo_path }}` is the main worktree root regardless of which// worktree the hook runs in, so the markers land where the test reads.- r#"pre-start = "echo pre-start-from-base > {{ repo_path }}/pre-start-marker.txt"-post-start = "echo post-start-from-base > {{ repo_path }}/post-start-marker.txt"+ r#"pre-create = "echo pre-create-from-base > {{ repo_path }}/pre-create-marker.txt"+post-create = "echo post-create-from-base > {{ repo_path }}/post-create-marker.txt""#,).unwrap();@@ -1132,19 +1132,19 @@ post-start = "echo post-start-from-base > {{ repo_path }}/post-start-marker.txt"String::from_utf8_lossy(&output.stderr));- let pre_marker = repo.root_path().join("pre-start-marker.txt");+ let pre_marker = repo.root_path().join("pre-create-marker.txt");wait_for_file_content(&pre_marker);assert_eq!(fs::read_to_string(&pre_marker).unwrap().trim(),- "pre-start-from-base",- "pre-start should run with the base branch's config"+ "pre-create-from-base",+ "pre-create should run with the base branch's config");- let post_marker = repo.root_path().join("post-start-marker.txt");+ let post_marker = repo.root_path().join("post-create-marker.txt");wait_for_file_content(&post_marker);assert_eq!(fs::read_to_string(&post_marker).unwrap().trim(),- "post-start-from-base",- "post-start should run with the base branch's config"+ "post-create-from-base",+ "post-create should run with the base branch's config");}@@ -1217,7 +1217,7 @@ fn test_switch_create_honors_project_config_path_override(mut repo: TestRepo) {fs::create_dir_all(other_wt.join(".config")).unwrap();fs::write(other_wt.join(".config/wt.toml"),- r#"post-start = "echo IGNORED-COMMITTED-HOOK > {{ repo_path }}/wrong-marker.txt""#,+ r#"post-create = "echo IGNORED-COMMITTED-HOOK > {{ repo_path }}/wrong-marker.txt""#,).unwrap();repo.run_git_in(&other_wt, &["add", ".config/wt.toml"]);@@ -1227,7 +1227,7 @@ fn test_switch_create_honors_project_config_path_override(mut repo: TestRepo) {let override_path = repo.root_path().parent().unwrap().join("override-wt.toml");fs::write(&override_path,- r#"post-start = "echo OVERRIDE-HOOK > {{ repo_path }}/right-marker.txt""#,+ r#"post-create = "echo OVERRIDE-HOOK > {{ repo_path }}/right-marker.txt""#,).unwrap();@@ -1939,25 +1939,25 @@ fn test_switch_post_hook_no_path_with_shell_integration(repo: TestRepo) {);}-/// When both post-switch and post-start hooks are configured, they should be combined-/// into a single output line with format: "Running post-switch: {names}; post-start: {names} @ path"+/// When both post-switch and post-create hooks are configured, they should be combined+/// into a single output line with format: "Running post-switch: {names}; post-create: {names} @ path"#[rstest]-fn test_switch_combined_post_switch_and_post_start_hooks(repo: TestRepo) {- // Create project config with both post-switch and post-start hooks+fn test_switch_combined_post_switch_and_post_create_hooks(repo: TestRepo) {+ // Create project config with both post-switch and post-create hookslet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),r#"post-switch = "echo switched"-post-start = "echo started"+post-create = "echo started""#,).unwrap();repo.commit("Add config");- // Run switch --create (triggers both post-switch and post-start)- // Should show a single combined line: "Running post-switch: project; post-start: project @ path"+ // Run switch --create (triggers both post-switch and post-create)+ // Should show a single combined line: "Running post-switch: project; post-create: project @ path"snapshot_switch("switch_combined_hooks",&repo,@@ -2519,7 +2519,7 @@ fn test_switch_pr_fork(#[from(repo_with_remote)] repo: TestRepo) {});}-/// `pre-start`, `post-start`, and `post-switch` hooks on PR/MR-created worktrees+/// `pre-create`, `post-create`, and `post-switch` hooks on PR/MR-created worktrees/// see `pr_number` and `pr_url` in their template context. Both GitHub PRs and/// GitLab MRs canonicalize to the same `pr_*` names — hook authors don't need/// to branch on platform. Pre-switch fires before PR resolution and never sees@@ -2533,13 +2533,13 @@ fn test_switch_pr_hooks_see_pr_vars(#[from(repo_with_remote)] repo: TestRepo) {repo.run_git(&["checkout", "-b", "pr-source"]);fs::write(repo.root_path().join("pr-file.txt"), "PR content").unwrap();// Each hook writes its own marker in the primary worktree so we can verify- // post-switch + post-start (background) populate pr_number/pr_url too.+ // post-switch + post-create (background) populate pr_number/pr_url too.// {{ repo_path }} is always the main repo's working tree.fs::create_dir_all(repo.root_path().join(".config")).unwrap();fs::write(repo.root_path().join(".config/wt.toml"),- r#"pre-start = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_path }}/pre_start.txt"-post-start = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_path }}/post_start.txt"+ r#"pre-create = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_path }}/pre_create.txt"+post-create = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_path }}/post_create.txt"post-switch = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_path }}/post_switch.txt""#,)@@ -2609,7 +2609,7 @@ post-switch = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_pa);let expected = "pr_number=42 pr_url=https://github.com/owner/test-repo/pull/42";- for marker in ["pre_start.txt", "post_start.txt", "post_switch.txt"] {+ for marker in ["pre_create.txt", "post_create.txt", "post_switch.txt"] {let path = repo.root_path().join(marker);// post-* hooks run in the background; poll until the file appears.wait_for_file_content(&path);@@ -2623,7 +2623,7 @@ post-switch = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_pa}}-/// `wt switch pr:N` resolves `post-start` etc. from the PR's tree — the fetched+/// `wt switch pr:N` resolves `post-create` etc. from the PR's tree — the fetched/// head ref, potentially from a fork — and the approval prompt reads that same/// PR config, so what the prompt lists can't diverge from what runs. The local/// repo has no project config; only the PR commit does. Without `--yes` the@@ -2639,7 +2639,7 @@ fn test_switch_pr_reads_pr_ref_config(#[from(repo_with_remote)] repo: TestRepo)fs::create_dir_all(repo.root_path().join(".config")).unwrap();fs::write(repo.root_path().join(".config/wt.toml"),- r#"post-start = "echo PR-CONFIG-HOOK-RAN > {{ repo_path }}/pr-hook-marker.txt""#,+ r#"post-create = "echo PR-CONFIG-HOOK-RAN > {{ repo_path }}/pr-hook-marker.txt""#,).unwrap();repo.run_git(&["add", "pr-file.txt", ".config/wt.toml"]);@@ -2709,7 +2709,7 @@ fn test_switch_pr_reads_pr_ref_config(#[from(repo_with_remote)] repo: TestRepo)let stderr = String::from_utf8_lossy(&output.stderr);assert!(stderr.contains("PR-CONFIG-HOOK-RAN"),- "approval prompt should list the PR ref's post-start hook; stderr:\n{stderr}"+ "approval prompt should list the PR ref's post-create hook; stderr:\n{stderr}");assert!(!output.status.success(),@@ -2720,7 +2720,7 @@ fn test_switch_pr_reads_pr_ref_config(#[from(repo_with_remote)] repo: TestRepo)"a declined approval must not run the hook");- // (b) With `--yes`: the PR's `post-start` runs against the new worktree.+ // (b) With `--yes`: the PR's `post-create` runs against the new worktree.let mut cmd = repo.wt_command();cmd.args(["switch", "pr:42", "--yes"]);configure_mock_cli_env(&mut cmd, &mock_bin);@@ -2736,7 +2736,7 @@ fn test_switch_pr_reads_pr_ref_config(#[from(repo_with_remote)] repo: TestRepo)assert_eq!(fs::read_to_string(&marker).unwrap().trim(),"PR-CONFIG-HOOK-RAN",- "post-start should run with the PR ref's config"+ "post-create should run with the PR ref's config");}diff --git a/tests/integration_tests/switch_picker.rs b/tests/integration_tests/switch_picker.rsindex 58f2f31c0..77a2c4317 100644--- a/tests/integration_tests/switch_picker.rs+++ b/tests/integration_tests/switch_picker.rs@@ -1015,10 +1015,10 @@ fn test_switch_picker_create_with_empty_query_fails(mut repo: TestRepo) {/// Picker-create validates hook templates *before* `git worktree add`, mirroring/// the pre-flight that `wt switch --create` already performs.///-/// Without this, a broken `pre-start` template would let the worktree be+/// Without this, a broken `pre-create` template would let the worktree be/// created, then fail at expansion time — leaving a half-state that blocks/// re-running (the branch already exists). The test commits a syntax-broken-/// `pre-start` to the user config, fires picker-create, asserts that no branch+/// `pre-create` to the user config, fires picker-create, asserts that no branch/// or worktree was created, then fixes the template and confirms re-running/// succeeds — proving the pre-flight aborts cleanly rather than leaving a/// half-created worktree behind.@@ -1027,12 +1027,12 @@ fn test_switch_picker_create_validates_templates_before_worktree(mut repo: TestRrepo.remove_fixture_worktrees();repo.run_git(&["remote", "remove", "origin"]);- // Broken `pre-start` in user config: unbalanced `{{` is a minijinja parse+ // Broken `pre-create` in user config: unbalanced `{{` is a minijinja parse// error, so `validate_template` rejects it without needing approvals.// Project config would also trigger the validation path, but it routes// through the approval gate first and would prompt for a TTY response —// user-config hooks are trusted and exercise validation directly.- repo.write_test_config(r#"pre-start = "echo {{ unclosed""#);+ repo.write_test_config(r#"pre-create = "echo {{ unclosed""#);let env_vars = repo.test_env_vars();@@ -1050,7 +1050,7 @@ fn test_switch_picker_create_validates_templates_before_worktree(mut repo: TestRassert_ne!(result.exit_code,0,- "Expected non-zero exit when pre-start template is broken.\nScreen:\n{}",+ "Expected non-zero exit when pre-create template is broken.\nScreen:\n{}",result.screen());@@ -1082,7 +1082,7 @@ fn test_switch_picker_create_validates_templates_before_worktree(mut repo: TestR);// Fix the template and re-run — proves no half-state was left behind.- repo.write_test_config(r#"pre-start = "true""#);+ repo.write_test_config(r#"pre-create = "true""#);let result = exec_in_pty_with_input_expectations(wt_bin().to_str().unwrap(),diff --git a/tests/integration_tests/user_hooks.rs b/tests/integration_tests/user_hooks.rsindex 65a5d7d5c..72149dfa2 100644--- a/tests/integration_tests/user_hooks.rs+++ b/tests/integration_tests/user_hooks.rs@@ -36,40 +36,40 @@ fn snapshot_switch(test_name: &str, repo: &TestRepo, args: &[&str]) {}#[rstest]-fn test_user_post_create_hook_executes(repo: TestRepo) {- // Write user config with pre-start hook (no project config)+fn test_user_pre_create_hook_executes(repo: TestRepo) {+ // Write user config with pre-create hook (no project config)repo.write_test_config(- r#"[pre-start]-log = "echo 'USER_POST_CREATE_RAN' > user_hook_marker.txt"+ r#"[pre-create]+log = "echo 'USER_PRE_CREATE_RAN' > user_hook_marker.txt""#,);- snapshot_switch("user_post_create_executes", &repo, &["--create", "feature"]);+ snapshot_switch("user_pre_create_executes", &repo, &["--create", "feature"]);// Verify user hook actually ranlet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");let marker_file = worktree_path.join("user_hook_marker.txt");assert!(marker_file.exists(),- "User pre-start hook should have created marker file"+ "User pre-create hook should have created marker file");let contents = fs::read_to_string(&marker_file).unwrap();assert!(- contents.contains("USER_POST_CREATE_RAN"),+ contents.contains("USER_PRE_CREATE_RAN"),"Marker file should contain expected content");}#[rstest]fn test_user_hooks_run_before_project_hooks(repo: TestRepo) {- // Create project config with pre-start hook- repo.write_project_config(r#"pre-start = "echo 'PROJECT_HOOK' >> hook_order.txt""#);+ // Create project config with pre-create hook+ repo.write_project_config(r#"pre-create = "echo 'PROJECT_HOOK' >> hook_order.txt""#);repo.commit("Add project config");// Write user config with user hook AND pre-approve project commandrepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]log = "echo 'USER_HOOK' >> hook_order.txt""#,);@@ -99,7 +99,7 @@ fn test_user_hooks_no_approval_required(repo: TestRepo) {// Write user config with hook but NO pre-approved commands// (unlike project hooks, user hooks don't require approval)repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]setup = "echo 'NO_APPROVAL_NEEDED' > no_approval.txt""#,);@@ -117,13 +117,13 @@ setup = "echo 'NO_APPROVAL_NEEDED' > no_approval.txt"#[rstest]fn test_no_hooks_flag_skips_all_hooks(repo: TestRepo) {- // Create project config with pre-start hook- repo.write_project_config(r#"pre-start = "echo 'PROJECT_HOOK' > project_marker.txt""#);+ // Create project config with pre-create hook+ repo.write_project_config(r#"pre-create = "echo 'PROJECT_HOOK' > project_marker.txt""#);repo.commit("Add project config");// Write user config with both user hook and pre-approved project commandrepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]log = "echo 'USER_HOOK' > user_marker.txt""#,);@@ -161,21 +161,21 @@ approved-commands = ["echo 'PROJECT_HOOK' > project_marker.txt"]fn test_user_post_create_hook_failure(repo: TestRepo) {// Write user config with failing hookrepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]failing = "exit 1""#,);- // Failing pre-start hook (via deprecated pre-start name) aborts with FailFast.- // The worktree is already created before pre-start runs (it was renamed from- // pre-start), so the worktree exists but the command exits non-zero.+ // Failing pre-create hook (via deprecated pre-create name) aborts with FailFast.+ // The worktree is already created before pre-create runs (it was renamed from+ // pre-create), so the worktree exists but the command exits non-zero.snapshot_switch("user_post_create_failure", &repo, &["--create", "feature"]);- // Worktree exists (created before pre-start ran) but the command failed+ // Worktree exists (created before pre-create ran) but the command failedlet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");assert!(worktree_path.exists(),- "Worktree should exist — it was created before pre-start ran"+ "Worktree should exist — it was created before pre-create ran");}@@ -184,15 +184,15 @@ failing = "exit 1"// ============================================================================#[rstest]-fn test_user_post_start_hook_executes(repo: TestRepo) {- // Write user config with post-start hook (background)+fn test_user_post_create_hook_executes(repo: TestRepo) {+ // Write user config with post-create hook (background)repo.write_test_config(- r#"[post-start]-bg = "echo 'USER_POST_START_RAN' > user_bg_marker.txt"+ r#"[post-create]+bg = "echo 'USER_POST_CREATE_RAN' > user_bg_marker.txt""#,);- snapshot_switch("user_post_start_executes", &repo, &["--create", "feature"]);+ snapshot_switch("user_post_create_executes", &repo, &["--create", "feature"]);// Wait for background hook to complete and write contentlet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");@@ -201,8 +201,8 @@ bg = "echo 'USER_POST_START_RAN' > user_bg_marker.txt"let contents = fs::read_to_string(&marker_file).unwrap();assert!(- contents.contains("USER_POST_START_RAN"),- "User post-start hook should have run in background"+ contents.contains("USER_POST_CREATE_RAN"),+ "User post-create hook should have run in background");}@@ -214,11 +214,11 @@ fn test_background_hook_sees_worktrunk_foreground_env_var(repo: TestRepo) {// `pre-*` hooks run synchronously in the foreground `wt` process, so they// must NOT see the sentinel.repo.write_test_config(- r#"[post-start]-capture-bg = "echo \"bg=$WORKTRUNK_FOREGROUND\" > post_start_env.txt"+ r#"[post-create]+capture-bg = "echo \"bg=$WORKTRUNK_FOREGROUND\" > post_create_env.txt"-[pre-start]-capture-fg = "echo \"fg=$WORKTRUNK_FOREGROUND\" > pre_start_env.txt"+[pre-create]+capture-fg = "echo \"fg=$WORKTRUNK_FOREGROUND\" > pre_create_env.txt""#,);@@ -230,37 +230,37 @@ capture-fg = "echo \"fg=$WORKTRUNK_FOREGROUND\" > pre_start_env.txt"let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");- // pre-start wrote its marker synchronously; post-start runs in the+ // pre-create wrote its marker synchronously; post-create runs in the// background, so poll for the file.- let bg_marker = worktree_path.join("post_start_env.txt");+ let bg_marker = worktree_path.join("post_create_env.txt");wait_for_file_content(&bg_marker);let bg = fs::read_to_string(&bg_marker).unwrap();assert_eq!(bg.trim(),"bg=-1",- "post-start (background) hook should see WORKTRUNK_FOREGROUND=-1, got {bg:?}"+ "post-create (background) hook should see WORKTRUNK_FOREGROUND=-1, got {bg:?}");- let fg_marker = worktree_path.join("pre_start_env.txt");+ let fg_marker = worktree_path.join("pre_create_env.txt");let fg = fs::read_to_string(&fg_marker).unwrap();assert_eq!(fg.trim(),"fg=",- "pre-start (foreground) hook should NOT see WORKTRUNK_FOREGROUND set, got {fg:?}"+ "pre-create (foreground) hook should NOT see WORKTRUNK_FOREGROUND set, got {fg:?}");}#[rstest]-fn test_user_post_start_skipped_with_no_hooks(repo: TestRepo) {- // Write user config with post-start hook+fn test_user_post_create_skipped_with_no_hooks(repo: TestRepo) {+ // Write user config with post-create hookrepo.write_test_config(- r#"[post-start]+ r#"[post-create]bg = "echo 'USER_BG' > user_bg_marker.txt""#,);snapshot_switch(- "user_post_start_skipped_no_hooks",+ "user_post_create_skipped_no_hooks",&repo,&["--create", "feature", "--no-hooks"],);@@ -272,7 +272,7 @@ bg = "echo 'USER_BG' > user_bg_marker.txt"let marker_file = worktree_path.join("user_bg_marker.txt");assert!(!marker_file.exists(),- "User post-start hook should be skipped with --no-hooks"+ "User post-create hook should be skipped with --no-hooks");}@@ -1371,7 +1371,7 @@ failing = "exit 1"fn test_user_hook_template_variables(repo: TestRepo) {// Write user config with hook using template variablesrepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]vars = "echo 'repo={{ repo }} branch={{ branch }}' > template_vars.txt""#,);@@ -1465,14 +1465,14 @@ fn test_hook_template_variables_from_subdirectory(repo: TestRepo) {/// Test that both user and project unnamed hooks of the same type run and get unique log names./// This exercises the unnamed index tracking when multiple unnamed hooks share the same hook type.#[rstest]-fn test_user_and_project_unnamed_post_start(repo: TestRepo) {- // Create project config with unnamed post-start hook- repo.write_project_config(r#"post-start = "echo 'PROJECT_POST_START' > project_bg.txt""#);+fn test_user_and_project_unnamed_post_create(repo: TestRepo) {+ // Create project config with unnamed post-create hook+ repo.write_project_config(r#"post-create = "echo 'PROJECT_POST_START' > project_bg.txt""#);repo.commit("Add project config");// Write user config with unnamed hook AND pre-approve project commandrepo.write_test_config(- r#"post-start = "echo 'USER_POST_START' > user_bg.txt"+ r#"post-create = "echo 'USER_POST_START' > user_bg.txt""#,);repo.write_test_approvals(@@ -1482,7 +1482,7 @@ approved-commands = ["echo 'PROJECT_POST_START' > project_bg.txt"]);snapshot_switch(- "user_and_project_unnamed_post_start",+ "user_and_project_unnamed_post_create",&repo,&["--create", "feature"],);@@ -1496,23 +1496,23 @@ approved-commands = ["echo 'PROJECT_POST_START' > project_bg.txt"]// Both should have runassert!(worktree_path.join("user_bg.txt").exists(),- "User post-start should have run"+ "User post-create should have run");assert!(worktree_path.join("project_bg.txt").exists(),- "Project post-start should have run"+ "Project post-create should have run");}#[rstest]-fn test_user_and_project_post_start_both_run(repo: TestRepo) {- // Create project config with post-start hook- repo.write_project_config(r#"post-start = "echo 'PROJECT_POST_START' > project_bg.txt""#);+fn test_user_and_project_post_create_both_run(repo: TestRepo) {+ // Create project config with post-create hook+ repo.write_project_config(r#"post-create = "echo 'PROJECT_POST_START' > project_bg.txt""#);repo.commit("Add project config");// Write user config with user hook AND pre-approve project commandrepo.write_test_config(- r#"[post-start]+ r#"[post-create]bg = "echo 'USER_POST_START' > user_bg.txt""#,);@@ -1523,7 +1523,7 @@ approved-commands = ["echo 'PROJECT_POST_START' > project_bg.txt"]);snapshot_switch(- "user_and_project_post_start",+ "user_and_project_post_create",&repo,&["--create", "feature"],);@@ -1537,11 +1537,11 @@ approved-commands = ["echo 'PROJECT_POST_START' > project_bg.txt"]// Both should have runassert!(worktree_path.join("user_bg.txt").exists(),- "User post-start should have run"+ "User post-create should have run");assert!(worktree_path.join("project_bg.txt").exists(),- "Project post-start should have run"+ "Project post-create should have run");}@@ -1573,88 +1573,86 @@ fn test_standalone_hook_failure_omits_skip_hint(repo: TestRepo) {}#[rstest]-fn test_standalone_hook_post_create(repo: TestRepo) {- // Write project config with pre-start hook- repo.write_project_config(r#"pre-start = "echo 'STANDALONE_POST_CREATE' > hook_ran.txt""#);+fn test_standalone_hook_pre_create(repo: TestRepo) {+ // Write project config with pre-create hook+ repo.write_project_config(r#"pre-create = "echo 'STANDALONE_PRE_CREATE' > hook_ran.txt""#);let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "pre-start", "--yes"]);+ cmd.args(["hook", "pre-create", "--yes"]);let output = cmd.output().unwrap();- assert!(output.status.success(), "wt hook pre-start should succeed");+ assert!(output.status.success(), "wt hook pre-create should succeed");- // Hook runs in background — wait for it to write the marker filelet marker = repo.root_path().join("hook_ran.txt");crate::common::wait_for_file_content(&marker);let content = fs::read_to_string(&marker).unwrap();- assert!(content.contains("STANDALONE_POST_CREATE"));+ assert!(content.contains("STANDALONE_PRE_CREATE"));}#[rstest]-fn test_standalone_hook_post_create_alias_deprecated(repo: TestRepo) {- // `wt hook post-create` still maps to `pre-start` for scripted callers,- // but emits a deprecation warning per invocation.- repo.write_project_config(r#"pre-start = "echo 'POST_CREATE_ALIAS' > hook_ran.txt""#);+fn test_standalone_hook_start_alias_runs_silently(repo: TestRepo) {+ // `wt hook pre-start` is a deprecated alias for `wt hook pre-create`. It+ // still runs, and Phase 1 of the rename emits no warning (issue #2838).+ repo.write_project_config(r#"pre-create = "echo 'START_ALIAS' > hook_ran.txt""#);let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-create", "--yes"]);+ cmd.args(["hook", "pre-start", "--yes"]);let output = cmd.output().unwrap();assert!(output.status.success(),- "wt hook post-create should still succeed (alias for pre-start)"+ "wt hook pre-start should succeed (alias for pre-create)");let stderr = String::from_utf8_lossy(&output.stderr);assert!(- stderr.contains("wt hook post-create is deprecated"),- "expected deprecation warning in stderr, got: {stderr}"- );- assert!(- stderr.contains("wt hook pre-start"),- "expected migration hint in stderr, got: {stderr}"+ !stderr.to_lowercase().contains("deprecated"),+ "phase 1 emits no deprecation warning, got: {stderr}");// Verify the aliased hook actually ran.let marker = repo.root_path().join("hook_ran.txt");crate::common::wait_for_file_content(&marker);let content = fs::read_to_string(&marker).unwrap();- assert!(content.contains("POST_CREATE_ALIAS"));+ assert!(content.contains("START_ALIAS"));}#[rstest]-fn test_standalone_hook_pre_start_fails_on_failure(repo: TestRepo) {- // pre-start hooks use FailFast like all other pre-* hooks — consistent with+fn test_standalone_hook_pre_create_fails_on_failure(repo: TestRepo) {+ // pre-create hooks use FailFast like all other pre-* hooks — consistent with// the symmetric pre (blocking, fail-fast) / post (background, warn) pattern.- repo.write_project_config(r#"pre-start = "exit 1""#);+ repo.write_project_config(r#"pre-create = "exit 1""#);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes"])+ .args(["hook", "pre-create", "--yes"]).output().unwrap();assert!(!output.status.success(),- "wt hook pre-start should exit non-zero when the hook fails (fail-fast, like all pre-* hooks)"+ "wt hook pre-create should exit non-zero when the hook fails (fail-fast, like all pre-* hooks)");}#[rstest]-fn test_standalone_hook_post_start(repo: TestRepo) {- // Write project config with post-start hook- repo.write_project_config(r#"post-start = "echo 'STANDALONE_POST_START' > hook_ran.txt""#);+fn test_standalone_hook_post_create(repo: TestRepo) {+ // Write project config with post-create hook+ repo.write_project_config(r#"post-create = "echo 'STANDALONE_POST_START' > hook_ran.txt""#);let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes"]);+ cmd.args(["hook", "post-create", "--yes"]);let output = cmd.output().unwrap();- assert!(output.status.success(), "wt hook post-start should succeed");+ assert!(+ output.status.success(),+ "wt hook post-create should succeed"+ );// Hook spawns in background - wait for marker filelet marker = repo.root_path().join("hook_ran.txt");@@ -1664,21 +1662,21 @@ fn test_standalone_hook_post_start(repo: TestRepo) {}#[rstest]-fn test_standalone_hook_post_start_foreground(repo: TestRepo) {- // Write project config with post-start hook that echoes to both file and stdout+fn test_standalone_hook_post_create_foreground(repo: TestRepo) {+ // Write project config with post-create hook that echoes to both file and stdoutrepo.write_project_config(- r#"post-start = "echo 'FOREGROUND_POST_START' && echo 'marker' > hook_ran.txt""#,+ r#"post-create = "echo 'FOREGROUND_POST_START' && echo 'marker' > hook_ran.txt""#,);let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes", "--foreground"]);+ cmd.args(["hook", "post-create", "--yes", "--foreground"]);let output = cmd.output().unwrap();assert!(output.status.success(),- "wt hook post-start --foreground should succeed"+ "wt hook post-create --foreground should succeed");// With --foreground, marker file should exist immediately (no waiting)@@ -1831,7 +1829,7 @@ fn test_standalone_hook_no_hooks_configured(repo: TestRepo) {let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "pre-start", "--yes"]);+ cmd.args(["hook", "pre-create", "--yes"]);let output = cmd.output().unwrap();assert!(@@ -1842,7 +1840,7 @@ fn test_standalone_hook_no_hooks_configured(repo: TestRepo) {let stderr = String::from_utf8_lossy(&output.stderr);assert!(- stderr.contains("No pre-start hooks configured"),+ stderr.contains("No pre-create hooks configured"),"stderr should warn about missing hooks, got: {stderr}");}@@ -1871,12 +1869,12 @@ fn test_hook_dry_run_shows_expanded_command(repo: TestRepo) {/// --dry-run does not execute the hook command#[rstest]fn test_hook_dry_run_does_not_execute(repo: TestRepo) {- repo.write_project_config(r#"pre-start = "echo 'SHOULD_NOT_RUN' > hook_ran.txt""#);+ repo.write_project_config(r#"pre-create = "echo 'SHOULD_NOT_RUN' > hook_ran.txt""#);let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "pre-start", "--dry-run"]);+ cmd.args(["hook", "pre-create", "--dry-run"]);let output = cmd.output().unwrap();assert!(output.status.success(), "dry-run should succeed");@@ -1912,37 +1910,37 @@ fn test_hook_dry_run_named_hooks(repo: TestRepo) {}// ============================================================================-// Background Hook Execution Tests (post-start, post-switch)+// Background Hook Execution Tests (post-create, post-switch)// ============================================================================#[rstest]fn test_concurrent_hook_single_failure(repo: TestRepo) {// Write project config with a hook that writes output before failing- repo.write_project_config(r#"post-start = "echo HOOK_OUTPUT_MARKER; exit 1""#);+ repo.write_project_config(r#"post-create = "echo HOOK_OUTPUT_MARKER; exit 1""#);let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes"]);+ cmd.args(["hook", "post-create", "--yes"]);let output = cmd.output().unwrap();// Background spawning always succeeds (spawn succeeded, failure is logged)assert!(output.status.success(),- "wt hook post-start should succeed (spawns in background)"+ "wt hook post-create should succeed (spawns in background)");// Wait for log files: runner log + per-command log (cmd-0, unnamed single command)let log_dir = resolve_git_common_dir(repo.root_path()).join("wt/logs");wait_for_file_count(&log_dir, "log", 2);- // Hook logs live at `{branch}/project/post-start/{name}.log`.- let post_start_dir = log_dir+ // Hook logs live at `{branch}/project/post-create/{name}.log`.+ let post_create_dir = log_dir.join(worktrunk::path::sanitize_for_filename("main")).join("project")- .join("post-start");- let cmd_log = fs::read_dir(&post_start_dir)- .unwrap_or_else(|e| panic!("reading {post_start_dir:?}: {e}"))+ .join("post-create");+ let cmd_log = fs::read_dir(&post_create_dir)+ .unwrap_or_else(|e| panic!("reading {post_create_dir:?}: {e}")).filter_map(|e| e.ok()).find(|e| e.file_name().to_string_lossy().contains("cmd-0")).expect("Should have a cmd-0 log file");@@ -1964,7 +1962,7 @@ fn test_concurrent_hook_multiple_failures(repo: TestRepo) {// Map configs run as a concurrent group in one pipeline runner,// each command producing its own log file.repo.write_project_config(- r#"[post-start]+ r#"[post-create]first = "echo FIRST_OUTPUT"second = "echo SECOND_OUTPUT""#,@@ -1973,26 +1971,26 @@ second = "echo SECOND_OUTPUT"let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes"]);+ cmd.args(["hook", "post-create", "--yes"]);let output = cmd.output().unwrap();// Background spawning always succeeds (spawn succeeded)assert!(output.status.success(),- "wt hook post-start should succeed (spawns in background)"+ "wt hook post-create should succeed (spawns in background)");// Wait for per-command log files: runner log + first + secondlet log_dir = resolve_git_common_dir(repo.root_path()).join("wt/logs");wait_for_file_count(&log_dir, "log", 3);- // Hook logs live at `{branch}/project/post-start/{name}.log`.- let post_start_dir = log_dir+ // Hook logs live at `{branch}/project/post-create/{name}.log`.+ let post_create_dir = log_dir.join(worktrunk::path::sanitize_for_filename("main")).join("project")- .join("post-start");- let log_files: Vec<_> = fs::read_dir(&post_start_dir)- .unwrap_or_else(|e| panic!("reading {post_start_dir:?}: {e}"))+ .join("post-create");+ let log_files: Vec<_> = fs::read_dir(&post_create_dir)+ .unwrap_or_else(|e| panic!("reading {post_create_dir:?}: {e}")).filter_map(|e| e.ok()).collect();@@ -2014,25 +2012,25 @@ second = "echo SECOND_OUTPUT"#[rstest]fn test_concurrent_hook_user_and_project(repo: TestRepo) {- // Write user config with post-start hook (using table format for named hook)+ // Write user config with post-create hook (using table format for named hook)repo.write_test_config(- r#"[post-start]+ r#"[post-create]user = "echo 'USER_HOOK' > user_hook_ran.txt""#,);- // Write project config with post-start hook- repo.write_project_config(r#"post-start = "echo 'PROJECT_HOOK' > project_hook_ran.txt""#);+ // Write project config with post-create hook+ repo.write_project_config(r#"post-create = "echo 'PROJECT_HOOK' > project_hook_ran.txt""#);let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes"]);+ cmd.args(["hook", "post-create", "--yes"]);let output = cmd.output().unwrap();assert!(output.status.success(),- "wt hook post-start should succeed, stderr: {}",+ "wt hook post-create should succeed, stderr: {}",String::from_utf8_lossy(&output.stderr));@@ -2076,7 +2074,7 @@ fn test_concurrent_hook_post_switch(repo: TestRepo) {fn test_concurrent_hook_with_name_filter(repo: TestRepo) {// Write project config with multiple named hooksrepo.write_project_config(- r#"[post-start]+ r#"[post-create]first = "echo 'FIRST' > first.txt"second = "echo 'SECOND' > second.txt""#,@@ -2086,12 +2084,12 @@ second = "echo 'SECOND' > second.txt"let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes", "first"]);+ cmd.args(["hook", "post-create", "--yes", "first"]);let output = cmd.output().unwrap();assert!(output.status.success(),- "wt hook post-start --name first should succeed, stderr: {}",+ "wt hook post-create --name first should succeed, stderr: {}",String::from_utf8_lossy(&output.stderr));@@ -2110,7 +2108,7 @@ second = "echo 'SECOND' > second.txt"fn test_concurrent_hook_invalid_name_filter(repo: TestRepo) {// Write project config with named hooksrepo.write_project_config(- r#"[post-start]+ r#"[post-create]first = "echo 'FIRST'""#,);@@ -2119,12 +2117,12 @@ first = "echo 'FIRST'"let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes", "nonexistent"]);+ cmd.args(["hook", "post-create", "--yes", "nonexistent"]);let output = cmd.output().unwrap();assert!(!output.status.success(),- "wt hook post-start --name nonexistent should fail"+ "wt hook post-create --name nonexistent should fail");let stderr = String::from_utf8_lossy(&output.stderr);@@ -2187,7 +2185,7 @@ first = "echo FIRST"fn test_var_flag_overrides_template_variable(repo: TestRepo) {// Write user config with a hook that uses a template variablerepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ target }}' > target_output.txt""#,);@@ -2196,7 +2194,7 @@ test = "echo '{{ target }}' > target_output.txt".wt_command().args(["hook",- "pre-start",+ "pre-create","--yes","--var","target=CUSTOM_TARGET",@@ -2218,7 +2216,7 @@ test = "echo '{{ target }}' > target_output.txt"fn test_var_flag_multiple_variables(repo: TestRepo) {// Write user config with a hook that uses multiple template variablesrepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ target }} {{ remote }}' > multi_var_output.txt""#,);@@ -2227,7 +2225,7 @@ test = "echo '{{ target }} {{ remote }}' > multi_var_output.txt".wt_command().args(["hook",- "pre-start",+ "pre-create","--yes","--var","target=FIRST",@@ -2251,7 +2249,7 @@ test = "echo '{{ target }} {{ remote }}' > multi_var_output.txt"fn test_var_flag_overrides_builtin_variable(repo: TestRepo) {// Write user config with a hook that uses the builtin branch variablerepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ branch }}' > branch_output.txt""#,);@@ -2260,7 +2258,7 @@ test = "echo '{{ branch }}' > branch_output.txt".wt_command().args(["hook",- "pre-start",+ "pre-create","--yes","--var","branch=CUSTOM_BRANCH_NAME",@@ -2282,7 +2280,7 @@ test = "echo '{{ branch }}' > branch_output.txt"fn test_var_flag_invalid_format_fails() {// Test that invalid KEY=VALUE format is rejectedlet output = std::process::Command::new(env!("CARGO_BIN_EXE_wt"))- .args(["hook", "pre-start", "--var", "no_equals_sign"])+ .args(["hook", "pre-create", "--var", "no_equals_sign"]).output().expect("Failed to run wt");@@ -2300,14 +2298,14 @@ fn test_var_flag_custom_variable(repo: TestRepo) {// Custom variable names (not built-in template vars) are accepted and// injected into the template context, matching alias behavior.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ custom_var }}' > custom_var_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes", "--var", "custom_var=hello"])+ .args(["hook", "pre-create", "--yes", "--var", "custom_var=hello"]).output().expect("Failed to run wt hook");@@ -2329,7 +2327,7 @@ test = "echo '{{ custom_var }}' > custom_var_output.txt"fn test_var_flag_last_value_wins(repo: TestRepo) {// Test that when the same variable is specified multiple times, the last value winsrepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ target }}' > target_output.txt""#,);@@ -2338,7 +2336,7 @@ test = "echo '{{ target }}' > target_output.txt".wt_command().args(["hook",- "pre-start",+ "pre-create","--yes","--var","target=FIRST",@@ -2362,14 +2360,14 @@ test = "echo '{{ target }}' > target_output.txt"fn test_var_shorthand_overrides_template_variable(repo: TestRepo) {// `--KEY=VALUE` is equivalent to `--var KEY=VALUE` for template variables.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ branch }}' > shorthand_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes", "--branch=SHORTHAND_BRANCH"])+ .args(["hook", "pre-create", "--yes", "--branch=SHORTHAND_BRANCH"]).output().expect("Failed to run wt hook");@@ -2391,7 +2389,7 @@ test = "echo '{{ branch }}' > shorthand_output.txt"fn test_var_shorthand_mixed_with_long_form(repo: TestRepo) {// Shorthand and `--var` forms coexist in the same invocation.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ branch }} {{ target }}' > mixed_output.txt""#,);@@ -2400,7 +2398,7 @@ test = "echo '{{ branch }} {{ target }}' > mixed_output.txt".wt_command().args(["hook",- "pre-start",+ "pre-create","--yes","--branch=SHORT","--var",@@ -2425,14 +2423,14 @@ fn test_var_shorthand_custom_variable(repo: TestRepo) {// injected into the template context, matching alias behavior. Hyphens in// variable names are canonicalized to underscores.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ my_env }}' > custom_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes", "--my-env=staging"])+ .args(["hook", "pre-create", "--yes", "--my-env=staging"]).output().expect("Failed to run wt hook");@@ -2455,14 +2453,14 @@ fn test_shorthand_unreferenced_forwards_to_args(repo: TestRepo) {// `--KEY=VALUE` shorthand for an unreferenced KEY is smart-routed to// `{{ args }}` — the hook template captures the flag verbatim.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ args }}' > args_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes", "--unused-var=value"])+ .args(["hook", "pre-create", "--yes", "--unused-var=value"]).output().expect("Failed to run wt hook");@@ -2484,14 +2482,14 @@ fn test_shorthand_referenced_binds_not_args(repo: TestRepo) {// When KEY is referenced by any hook template, `--KEY=VALUE` binds// `{{ KEY }}` and is NOT forwarded to `{{ args }}`.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ my_env }}:{{ args }}' > combined_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes", "--my-env=staging"])+ .args(["hook", "pre-create", "--yes", "--my-env=staging"]).output().expect("Failed to run wt hook");@@ -2505,14 +2503,14 @@ test = "echo '{{ my_env }}:{{ args }}' > combined_output.txt"fn test_post_double_dash_forwards_to_args(repo: TestRepo) {// Tokens after `--` forward verbatim into `{{ args }}`.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ args }}' > dashdash_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes", "--", "--fast", "extra"])+ .args(["hook", "pre-create", "--yes", "--", "--fast", "extra"]).output().expect("Failed to run wt hook");@@ -2534,14 +2532,14 @@ fn test_var_deprecation_warning(repo: TestRepo) {// Explicit `--var` still force-binds but emits a deprecation warning// pointing at `--KEY=VALUE` shorthand.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ my_env }}' > deprecated_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes", "--var", "my_env=staging"])+ .args(["hook", "pre-create", "--yes", "--var", "my_env=staging"]).output().expect("Failed to run wt hook");@@ -2562,14 +2560,14 @@ fn test_args_indexing_and_length_in_hook_template(repo: TestRepo) {// `{{ args }}` is a ShellArgs sequence — indexing, length, and iteration// all work the same as in alias templates.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ args[0] | default('none') }}:{{ args | length }}' > args_seq.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-start", "--yes", "--", "first", "second"])+ .args(["hook", "pre-create", "--yes", "--", "first", "second"]).output().expect("Failed to run wt hook");@@ -2585,7 +2583,7 @@ fn test_mixed_var_shorthand_and_forwarded_args(repo: TestRepo) {// + post-`--` tokens forward — all coexist in one invocation without// cross-contamination.repo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ my_env }}|{{ override }}|{{ args }}' > mixed_output.txt""#,);@@ -2594,7 +2592,7 @@ test = "echo '{{ my_env }}|{{ override }}|{{ args }}' > mixed_output.txt".wt_command().args(["hook",- "pre-start",+ "pre-create","--yes","--my-env=prod","--var",@@ -2646,7 +2644,7 @@ fn test_var_shorthand_does_not_leak_into_hook_show() {fn test_var_flag_deprecated_alias_works(repo: TestRepo) {// Test that deprecated variable aliases (main_worktree, repo_root, worktree) can be overriddenrepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]test = "echo '{{ main_worktree }}' > alias_output.txt""#,);@@ -2655,7 +2653,7 @@ test = "echo '{{ main_worktree }}' > alias_output.txt".wt_command().args(["hook",- "pre-start",+ "pre-create","--yes","--var","main_worktree=/custom/path",@@ -2684,7 +2682,7 @@ fn test_user_hooks_preserve_toml_order(repo: TestRepo) {// Write user config with hooks in specific order (NOT alphabetical: vscode, claude, copy, submodule)// If order were alphabetical, it would be: claude, copy, submodule, vscoderepo.write_test_config(- r#"[pre-start]+ r#"[pre-create]vscode = "echo '1' >> hook_order.txt"claude = "echo '2' >> hook_order.txt"copy = "echo '3' >> hook_order.txt"@@ -3124,12 +3122,12 @@ check = "test -d {{ cwd }} && echo 'cwd_exists=true' > ../cwd_check.txt || echo// ============================================================================#[rstest]-fn test_user_post_start_pipeline_serial_ordering(repo: TestRepo) {+fn test_user_post_create_pipeline_serial_ordering(repo: TestRepo) {// Pipeline: serial step creates a marker, concurrent step reads it.// Serial steps run in order, so the marker exists when the// concurrent step runs.repo.write_test_config(- r#"post-start = [+ r#"post-create = ["echo SETUP_DONE > pipeline_marker.txt",{ bg = "cat pipeline_marker.txt > bg_saw_marker.txt" }]@@ -3137,7 +3135,7 @@ fn test_user_post_start_pipeline_serial_ordering(repo: TestRepo) {);snapshot_switch(- "user_post_start_pipeline_ordering",+ "user_post_create_pipeline_ordering",&repo,&["--create", "feature"],);@@ -3154,10 +3152,10 @@ fn test_user_post_start_pipeline_serial_ordering(repo: TestRepo) {}#[rstest]-fn test_user_post_start_pipeline_failure_skips_later_steps(repo: TestRepo) {+fn test_user_post_create_pipeline_failure_skips_later_steps(repo: TestRepo) {// First step fails → second step should not run (pipeline aborts on failure).repo.write_test_config(- r#"post-start = [+ r#"post-create = ["exit 1",{ bg = "echo SHOULD_NOT_RUN > should_not_exist.txt" }]@@ -3165,7 +3163,7 @@ fn test_user_post_start_pipeline_failure_skips_later_steps(repo: TestRepo) {);snapshot_switch(- "user_post_start_pipeline_failure",+ "user_post_create_pipeline_failure",&repo,&["--create", "feature"],);@@ -3182,12 +3180,12 @@ fn test_user_post_start_pipeline_failure_skips_later_steps(repo: TestRepo) {}#[rstest]-fn test_user_post_start_pipeline_lazy_vars_foreground(repo: TestRepo) {+fn test_user_post_create_pipeline_lazy_vars_foreground(repo: TestRepo) {// Pipeline step 1 sets a var, step 2 uses it via {{ vars.name }}.// Foreground mode exercises the in-process lazy re-expansion path// in run_hook_with_filter.repo.write_test_config(- r#"post-start = [+ r#"post-create = ["git config worktrunk.state.main.vars.name '{{ branch | sanitize }}-postgres'",{ db = "echo {{ vars.name }} > lazy_expanded.txt" }]@@ -3199,7 +3197,7 @@ fn test_user_post_start_pipeline_lazy_vars_foreground(repo: TestRepo) {let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes", "--foreground"]);+ cmd.args(["hook", "post-create", "--yes", "--foreground"]);let output = cmd.output().expect("Failed to run foreground hook");@@ -3225,13 +3223,13 @@ fn test_user_post_start_pipeline_lazy_vars_foreground(repo: TestRepo) {}#[rstest]-fn test_user_post_start_pipeline_lazy_vars_background(repo: TestRepo) {+fn test_user_post_create_pipeline_lazy_vars_background(repo: TestRepo) {// Pipeline step 1 sets a var via git config (not `wt config` — bare `wt`// isn't on PATH in the detached background process). Step 2 references// {{ vars.name }}, which is expanded just-in-time by the background// pipeline runner reading fresh vars from git config.repo.write_test_config(- r#"post-start = [+ r#"post-create = ["git config worktrunk.state.{{ branch }}.vars.name '{{ branch | sanitize }}-postgres'",{ db = "echo {{ vars.name }} > lazy_bg_expanded.txt" }]@@ -3239,7 +3237,7 @@ fn test_user_post_start_pipeline_lazy_vars_background(repo: TestRepo) {);snapshot_switch(- "user_post_start_pipeline_lazy_vars_bg",+ "user_post_create_pipeline_lazy_vars_bg",&repo,&["--create", "feature"],);@@ -3256,17 +3254,17 @@ fn test_user_post_start_pipeline_lazy_vars_background(repo: TestRepo) {}#[rstest]-fn test_user_post_start_pipeline_concurrent_all_run(repo: TestRepo) {+fn test_user_post_create_pipeline_concurrent_all_run(repo: TestRepo) {// Concurrent group: both commands should run and produce output.repo.write_test_config(- r#"post-start = [+ r#"post-create = [{ a = "echo AAA > concurrent_a.txt", b = "echo BBB > concurrent_b.txt" }]"#,);snapshot_switch(- "user_post_start_pipeline_concurrent_all",+ "user_post_create_pipeline_concurrent_all",&repo,&["--create", "feature"],);@@ -3290,12 +3288,12 @@ fn test_user_post_start_pipeline_concurrent_all_run(repo: TestRepo) {}#[rstest]-fn test_user_post_start_pipeline_concurrent_partial_failure(repo: TestRepo) {+fn test_user_post_create_pipeline_concurrent_partial_failure(repo: TestRepo) {// One command in a concurrent group fails. The other should still// complete (pipeline waits for all children), and later steps should// not run (group reported as failed).repo.write_test_config(- r#"post-start = [+ r#"post-create = [{ fail = "exit 1", ok = "echo SURVIVED > concurrent_survivor.txt" },"echo SHOULD_NOT_RUN > after_concurrent.txt"]@@ -3303,7 +3301,7 @@ fn test_user_post_start_pipeline_concurrent_partial_failure(repo: TestRepo) {);snapshot_switch(- "user_post_start_pipeline_concurrent_failure",+ "user_post_create_pipeline_concurrent_failure",&repo,&["--create", "feature"],);@@ -3329,13 +3327,13 @@ fn test_user_post_start_pipeline_concurrent_partial_failure(repo: TestRepo) {}#[rstest]-fn test_user_post_start_pipeline_shell_escaping(repo: TestRepo) {+fn test_user_post_create_pipeline_shell_escaping(repo: TestRepo) {// Template values containing shell metacharacters must be safely// escaped. Step 1 sets a var with spaces, quotes, and a dollar sign.// Step 2 expands it into a shell command — without shell_escape=true,// the value would be word-split or trigger expansion.repo.write_test_config(- r#"post-start = [+ r#"post-create = ["git config worktrunk.state.{{ branch }}.vars.tricky 'hello world $HOME \"quotes\"'",{ check = "echo {{ vars.tricky }} > escaped_output.txt" }]@@ -3346,7 +3344,7 @@ fn test_user_post_start_pipeline_shell_escaping(repo: TestRepo) {let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());cmd.env("WORKTRUNK_CONFIG_PATH", repo.test_config_path());- cmd.args(["hook", "post-start", "--yes", "--foreground"]);+ cmd.args(["hook", "post-create", "--yes", "--foreground"]);let output = cmd.output().expect("Failed to run foreground hook");assert!(@@ -3379,12 +3377,12 @@ fn test_user_post_start_pipeline_shell_escaping(repo: TestRepo) {// ============================================================================#[rstest]-fn test_user_post_start_pipeline_hook_name_per_step(repo: TestRepo) {+fn test_user_post_create_pipeline_hook_name_per_step(repo: TestRepo) {// Each step in a pipeline should see its own hook_name, not the first step's name.// Before the fix, step 2 would see step 1's hook_name because the shared pipeline// context included hook_name from the first command's context_json.repo.write_test_config(- r#"post-start = [+ r#"post-create = [{ step_one = "echo {{ hook_name }} > step_one_name.txt" },{ step_two = "echo {{ hook_name }} > step_two_name.txt" }]@@ -3392,7 +3390,7 @@ fn test_user_post_start_pipeline_hook_name_per_step(repo: TestRepo) {);snapshot_switch(- "user_post_start_pipeline_hook_name_per_step",+ "user_post_create_pipeline_hook_name_per_step",&repo,&["--create", "feature"],);@@ -3497,12 +3495,12 @@ fn test_user_post_remove_pipeline_serial_ordering(mut repo: TestRepo) {#[rstest]fn test_standalone_hook_name_filtered_lazy_template(repo: TestRepo) {// A pipeline step that uses {{ vars.X }} should expand correctly when- // name-filtered via `wt hook post-start db`. Before the fix, the flat+ // name-filtered via `wt hook post-create db`. Before the fix, the flat// spawn path passed the raw unexpanded template to the shell.//// vars.* are read from git config, so we pre-set the value.repo.write_test_config(- r#"post-start = [+ r#"post-create = [{ setup = "echo setup" },{ db = "echo {{ vars.name }} > lazy_filtered.txt" }]@@ -3517,7 +3515,7 @@ fn test_standalone_hook_name_filtered_lazy_template(repo: TestRepo) {// since name filtering bypasses the pipeline runner.let settings = setup_snapshot_settings(&repo);settings.bind(|| {- let mut cmd = make_snapshot_cmd(&repo, "hook", &["post-start", "db"], None);+ let mut cmd = make_snapshot_cmd(&repo, "hook", &["post-create", "db"], None);assert_cmd_snapshot!("standalone_hook_name_filtered_lazy_template", cmd);});@@ -3572,7 +3570,7 @@ fn test_foreground_hook_passes_directive_file(repo: TestRepo) {// installed" hint instead.repo.write_test_config(&format!(r#"-[pre-start]+[pre-create]setup = "'{wt_toml}' switch --create hook-created --no-hooks""#,));@@ -3581,8 +3579,8 @@ setup = "'{wt_toml}' switch --create hook-created --no-hooks"let mut cmd = repo.wt_command();configure_directive_files(&mut cmd, &cd_path, &exec_path);- // Run the pre-start hook manually in foreground- cmd.args(["hook", "pre-start", "setup"]);+ // Run the pre-create hook manually in foreground+ cmd.args(["hook", "pre-create", "setup"]);let output = cmd.output().unwrap();assert!(@@ -3730,12 +3728,12 @@ noop = "true"/// project configs contribute to the same hook — the table prints once, not/// once per source. Also exercises the `PreparedStep::Single` arm of/// `print_background_variable_tables`, which the all-named-commands case in-/// `test_post_start_verbose_shows_per_hook_output` doesn't hit.+/// `test_post_create_verbose_shows_per_hook_output` doesn't hit.#[rstest]fn test_hook_verbose_background_dedups_across_sources(repo: TestRepo) {- repo.write_test_config(r#"post-start = "echo user-hook""#);- repo.write_project_config(r#"post-start = "echo project-hook""#);- repo.commit("add post-start");+ repo.write_test_config(r#"post-create = "echo user-hook""#);+ repo.write_project_config(r#"post-create = "echo project-hook""#);+ repo.commit("add post-create");repo.write_test_approvals(r#"[projects."../origin"]approved-commands = ["echo project-hook"]diff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snapindex e1af7a28d..371caeb76 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap@@ -3,11 +3,11 @@ source: tests/integration_tests/approval_pty.rsexpression: "&output"---[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-start:+[2m○[22m pre-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[36m❯[39m [36mAllow and remember? [1m[y/N][22m[39m y-[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.test-approve[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.test-approve[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2mtest command[32m✓[39m [32mCreated branch [1mtest-approve[22m from [1mmain[22m and worktree @ [1m_REPO_.test-approve[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snapindex 8b92d8238..31abb5fc3 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap@@ -3,7 +3,7 @@ source: tests/integration_tests/approval_pty.rsexpression: "&output"---[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-start:+[2m○[22m pre-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[36m❯[39m [36mAllow and remember? [1m[y/N][22m[39m ndiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snapindex 2fecbf9f1..433ad1713 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap@@ -3,19 +3,19 @@ source: tests/integration_tests/approval_pty.rsexpression: "&output"---[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m2[22m commands:[39m-[2m○[22m pre-start [1mfirst[22m:+[2m○[22m pre-create [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-start [1mthird[22m:+[2m○[22m pre-create [1mthird[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[36m❯[39m [36mAllow and remember? [1m[y/N][22m[39m y-[36m◎[39m [36mRunning pre-start [1mproject:first[22m @ [1m_REPO_.test-mixed-accept[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:first[22m @ [1m_REPO_.test-mixed-accept[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2mFirst command-[36m◎[39m [36mRunning pre-start [1mproject:second[22m @ [1m_REPO_.test-mixed-accept[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:second[22m @ [1m_REPO_.test-mixed-accept[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2mSecond command-[36m◎[39m [36mRunning pre-start [1mproject:third[22m @ [1m_REPO_.test-mixed-accept[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:third[22m @ [1m_REPO_.test-mixed-accept[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2mThird command[32m✓[39m [32mCreated branch [1mtest-mixed-accept[22m from [1mmain[22m and worktree @ [1m_REPO_.test-mixed-accept[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snapindex acc3810cc..f0df94aaa 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap@@ -3,9 +3,9 @@ source: tests/integration_tests/approval_pty.rsexpression: "&output"---[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m2[22m commands:[39m-[2m○[22m pre-start [1mfirst[22m:+[2m○[22m pre-create [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-start [1mthird[22m:+[2m○[22m pre-create [1mthird[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[36m❯[39m [36mAllow and remember? [1m[y/N][22m[39m ndiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snapindex b1f00710b..8708212d8 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap@@ -3,21 +3,21 @@ source: tests/integration_tests/approval_pty.rsexpression: "&output"---[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m3[22m commands:[39m-[2m○[22m pre-start [1mfirst[22m:+[2m○[22m pre-create [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-start [1msecond[22m:+[2m○[22m pre-create [1msecond[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2m-[2m○[22m pre-start [1mthird[22m:+[2m○[22m pre-create [1mthird[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[36m❯[39m [36mAllow and remember? [1m[y/N][22m[39m y-[36m◎[39m [36mRunning pre-start [1mproject:first[22m @ [1m_REPO_.test-multi[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:first[22m @ [1m_REPO_.test-multi[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2mFirst command-[36m◎[39m [36mRunning pre-start [1mproject:second[22m @ [1m_REPO_.test-multi[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:second[22m @ [1m_REPO_.test-multi[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2mSecond command-[36m◎[39m [36mRunning pre-start [1mproject:third[22m @ [1m_REPO_.test-multi[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:third[22m @ [1m_REPO_.test-multi[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2mThird command[32m✓[39m [32mCreated branch [1mtest-multi[22m from [1mmain[22m and worktree @ [1m_REPO_.test-multi[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snapindex 70df98529..d15a15dbb 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap@@ -3,21 +3,21 @@ source: tests/integration_tests/approval_pty.rsexpression: "&output"---[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m3[22m commands:[39m-[2m○[22m pre-start [1minstall[22m:+[2m○[22m pre-create [1minstall[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2m-[2m○[22m pre-start [1mbuild[22m:+[2m○[22m pre-create [1mbuild[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2m-[2m○[22m pre-start [1mtest[22m:+[2m○[22m pre-create [1mtest[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2m[36m❯[39m [36mAllow and remember? [1m[y/N][22m[39m y-[36m◎[39m [36mRunning pre-start [1mproject:install[22m @ [1m_REPO_.test-named[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:install[22m @ [1m_REPO_.test-named[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2mInstalling dependencies...-[36m◎[39m [36mRunning pre-start [1mproject:build[22m @ [1m_REPO_.test-named[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:build[22m @ [1m_REPO_.test-named[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2mBuilding project...-[36m◎[39m [36mRunning pre-start [1mproject:test[22m @ [1m_REPO_.test-named[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:test[22m @ [1m_REPO_.test-named[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2mRunning tests...[32m✓[39m [32mCreated branch [1mtest-named[22m from [1mmain[22m and worktree @ [1m_REPO_.test-named[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snapindex 38062520e..1b28669e3 100644--- a/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap+++ b/tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap@@ -3,13 +3,13 @@ source: tests/integration_tests/approval_pty.rsexpression: "&output"---[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-start:+[2m○[22m pre-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[36m❯[39m [36mAllow and remember? [1m[y/N][22m[39m y[33m▲[39m [33mFailed to save command approval: Failed to open lock file: Permission denied (os error 13)[39m[2m↳[22m [2mApproval will be requested again next time.[22m-[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.test-permission[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.test-permission[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2mtest command[32m✓[39m [32mCreated branch [1mtest-permission[22m from [1mmain[22m and worktree @ [1m_REPO_.test-permission[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snapindex ff6e54d18..e09740dcf 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.test-approved[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.test-approved[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'approved'[0m[2m [0m[2m[36m>[0m[2m output.txt[0m[32m✓[39m [32mCreated branch [1mtest-approved[22m from [1mmain[22m and worktree @ [1m_REPO_.test-approved[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snapindex 6d5ad6aa0..187b82a25 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_fails_in_non_tty.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: false@@ -46,7 +58,7 @@ exit_code: 1----- stderr -----[33m▲[39m [33m[1morigin[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-start:+[2m○[22m pre-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[31m✗[39m [31mCannot prompt for approval in non-interactive environment[39m[2m↳[22m [2mTo skip prompts in CI/CD, add [4m--yes[24m; to pre-approve commands, run [4mwt config approvals add[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snapindex 3b4fb5eae..195234e6a 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_mixed_approved_unapproved.snap@@ -6,12 +6,12 @@ exit_code: 1----- stdout ---------- stderr ------[33m▲[39m [33mProject config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m2[22m commands:[39m-[2m○[22m pre-start [1mfirst[22m:+[2m○[22m pre-create [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-start [1mthird[22m:+[2m○[22m pre-create [1mthird[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[31m✗[39m [31mCannot prompt for approval in non-interactive environment[39m[2m↳[22m [2mTo skip prompts in CI/CD, add [4m--yes[24m; to pre-approve commands, run [4mwt config approvals add[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snapindex 7531b3d15..bdd14b62d 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_multiple_commands.snap@@ -6,16 +6,16 @@ exit_code: 1----- stdout ---------- stderr ------[33m▲[39m [33mProject config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m[33m▲[39m [33m[1morigin[22m needs approval to execute [1m4[22m commands:[39m-[2m○[22m pre-start [1mbranch[22m:+[2m○[22m pre-create [1mbranch[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Branch: {{ branch }}'[0m[2m-[2m○[22m pre-start [1mworktree[22m:+[2m○[22m pre-create [1mworktree[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Worktree: {{ worktree_path }}'[0m[2m-[2m○[22m pre-start [1mrepo[22m:+[2m○[22m pre-create [1mrepo[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Repo: {{ repo }}'[0m[2m-[2m○[22m pre-start [1mpwd[22m:+[2m○[22m pre-create [1mpwd[22m:[107m [0m [2m[0m[2m[34mcd[0m[2m [0m[2m[32m{{[0m[2m worktree_path [0m[2m[32m}}[0m[2m [0m[2m[36m&&[0m[2m [0m[2m[34mpwd[0m[2m[31m✗[39m [31mCannot prompt for approval in non-interactive environment[39m[2m↳[22m [2mTo skip prompts in CI/CD, add [4m--yes[24m; to pre-approve commands, run [4mwt config approvals add[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snapindex 2cd78fd1f..fbe312867 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_named_commands.snap@@ -6,14 +6,14 @@ exit_code: 1----- stdout ---------- stderr ------[33m▲[39m [33mProject config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m[33m▲[39m [33m[1morigin[22m needs approval to execute [1m3[22m commands:[39m-[2m○[22m pre-start [1minstall[22m:+[2m○[22m pre-create [1minstall[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2m-[2m○[22m pre-start [1mbuild[22m:+[2m○[22m pre-create [1mbuild[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2m-[2m○[22m pre-start [1mtest[22m:+[2m○[22m pre-create [1mtest[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running tests...'[0m[2m[31m✗[39m [31mCannot prompt for approval in non-interactive environment[39m[2m↳[22m [2mTo skip prompts in CI/CD, add [4m--yes[24m; to pre-approve commands, run [4mwt config approvals add[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snapindex 35034f56c..fe8a4037d 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__approval_single_command.snap@@ -7,7 +7,7 @@ exit_code: 1----- stderr -----[33m▲[39m [33m[1morigin[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-start:+[2m○[22m pre-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Worktree path: {{ worktree_path }}'[0m[2m[31m✗[39m [31mCannot prompt for approval in non-interactive environment[39m[2m↳[22m [2mTo skip prompts in CI/CD, add [4m--yes[24m; to pre-approve commands, run [4mwt config approvals add[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snapindex 3b4fb5eae..195234e6a 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__decline_approval_skips_only_unapproved.snap@@ -6,12 +6,12 @@ exit_code: 1----- stdout ---------- stderr ------[33m▲[39m [33mProject config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m[33m▲[39m [33m[1mrepo[22m needs approval to execute [1m2[22m commands:[39m-[2m○[22m pre-start [1mfirst[22m:+[2m○[22m pre-create [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-start [1mthird[22m:+[2m○[22m pre-create [1mthird[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Third command'[0m[2m[31m✗[39m [31mCannot prompt for approval in non-interactive environment[39m[2m↳[22m [2mTo skip prompts in CI/CD, add [4m--yes[24m; to pre-approve commands, run [4mwt config approvals add[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__yes_bypasses_tty_check.snap b/tests/snapshots/integration__integration_tests__approval_ui__yes_bypasses_tty_check.snapindex 36397b6bb..c14744e1e 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__yes_bypasses_tty_check.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__yes_bypasses_tty_check.snap@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -46,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.test-yes-tty[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.test-yes-tty[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m[0mtest command[32m✓[39m [32mCreated branch [1mtest-yes-tty[22m from [1mmain[22m and worktree @ [1m_REPO_.test-yes-tty[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_first_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_first_run.snapindex 7994e4b2f..da81989bc 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_first_run.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_first_run.snap@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -46,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.test-yes[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.test-yes[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m [0m[2m[36m>[0m[2m output.txt[0m[32m✓[39m [32mCreated branch [1mtest-yes[22m from [1mmain[22m and worktree @ [1m_REPO_.test-yes[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_second_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_second_run.snapindex ff5aa65a1..a77909609 100644--- a/tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_second_run.snap+++ b/tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_second_run.snap@@ -7,7 +7,7 @@ exit_code: 1----- stderr -----[33m▲[39m [33m[1morigin[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-start:+[2m○[22m pre-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test command'[0m[2m [0m[2m[36m>[0m[2m output.txt[31m✗[39m [31mCannot prompt for approval in non-interactive environment[39m[2m↳[22m [2mTo skip prompts in CI/CD, add [4m--yes[24m; to pre-approve commands, run [4mwt config approvals add[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snapindex 422dd1f91..9031e34c2 100644--- a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap+++ b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_none_approved.snap@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: false@@ -47,7 +59,7 @@ exit_code: 1----- stderr -----[33m▲[39m [33m[1morigin[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-start:+[2m○[22m pre-create:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'test'[0m[2m[31m✗[39m [31mCannot prompt for approval in non-interactive environment[39m[2m↳[22m [2mTo skip prompts in CI/CD, add [4m--yes[24m; to pre-approve commands, run [4mwt config approvals add[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__approvals__add_approvals_bare_repo_config_in_primary_worktree.snap b/tests/snapshots/integration__integration_tests__approvals__add_approvals_bare_repo_config_in_primary_worktree.snapindex 3334139c9..0cdc2eb3f 100644--- a/tests/snapshots/integration__integration_tests__approvals__add_approvals_bare_repo_config_in_primary_worktree.snap+++ b/tests/snapshots/integration__integration_tests__approvals__add_approvals_bare_repo_config_in_primary_worktree.snap@@ -12,12 +12,18 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"NO_COLOR: ""PSModulePath: ""RUST_LOG: warn@@ -26,13 +32,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"---success: falseexit_code: 1@@ -40,7 +52,7 @@ exit_code: 1----- stderr -----▲ repo needs approval to execute 1 command:-○ pre-start:+○ pre-create:echo 'hello'✗ Cannot prompt for approval in non-interactive environment↳ To skip prompts in CI/CD, add --yes; to pre-approve commands, run wt config approvals adddiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snapindex 53cab2de1..8b4d5a73b 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap@@ -60,14 +60,14 @@ exit_code: 0[2m↳[22m [2mTo apply: [4mwt config update[24m[22m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/config.toml/current b/config.toml/migrated[m-[107m [0m [1mindex dee4883..5eef8a6 100644[m+[107m [0m [1mindex da40ce6..12d38d2 100644[m[107m [0m [1m--- a/config.toml/current[m[107m [0m [1m+++ b/config.toml/migrated[m[107m [0m [36m@@ -1,2 +1,2 @@[m[107m [0m [31m-worktree-path = "../{{ main_worktree }}.{{ branch }}"[m-[107m [0m [31m-pre-start = "ln -sf {{ repo_root }}/node_modules"[m+[107m [0m [31m-pre-create = "ln -sf {{ repo_root }}/node_modules"[m[107m [0m [32m+[m[32mworktree-path = "../{{ repo }}.{{ branch }}"[m-[107m [0m [32m+[m[32mpre-start = "ln -sf {{ repo_path }}/node_modules"[m+[107m [0m [32m+[m[32mpre-create = "ln -sf {{ repo_path }}/node_modules"[m[2m↳[22m [2mOptional system config not found @ [2m/etc/xdg/worktrunk/config.toml[22m[22m[36mPROJECT CONFIG[39m @ _REPO_/.config/wt.tomldiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_pre_hook_table_form_deprecation.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_pre_hook_table_form_deprecation.snapindex 3034ed8e6..ffc037a6a 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_pre_hook_table_form_deprecation.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_pre_hook_table_form_deprecation.snap@@ -59,11 +59,11 @@ exit_code: 0[36mPROJECT CONFIG[39m @ _REPO_/.config/wt.toml[2m○[22m Identifier: [1m../origin[22m-[33m▲[39m [33mProject config: table form for [1mpre-start[22m, [1mpre-merge[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m, [1mpre-merge[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo apply: [4mwt config update[24m[22m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/wt.toml/current b/wt.toml/migrated[m-[107m [0m [1mindex 3a61835..dc2a222 100644[m+[107m [0m [1mindex a85327e..319e745 100644[m[107m [0m [1m--- a/wt.toml/current[m[107m [0m [1m+++ b/wt.toml/migrated[m[107m [0m [36m@@ -1,7 +1,11 @@[m@@ -74,11 +74,11 @@ exit_code: 0[107m [0m [32m+[m[32m[[pre-merge]][m[107m [0m lint = "cargo clippy"[m[107m [0m [m-[107m [0m [31m-[pre-start][m-[107m [0m [32m+[m[32m[[pre-start]][m+[107m [0m [31m-[pre-create][m+[107m [0m [32m+[m[32m[[pre-create]][m[107m [0m install = "npm ci"[m[107m [0m [32m+[m-[107m [0m [32m+[m[32m[[pre-start]][m+[107m [0m [32m+[m[32m[[pre-create]][m[107m [0m env = "cp .env.example .env"[m[36mSHELL INTEGRATION[39mdiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_start_hook_migration.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_start_hook_migration.snapnew file mode 100644index 000000000..176867c78--- /dev/null+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_start_hook_migration.snap@@ -0,0 +1,83 @@+---+source: tests/integration_tests/config_show.rs+info:+ program: wt+ args:+ - config+ - show+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----+[36mUSER CONFIG[39m @ ~/.config/worktrunk/config.toml+[2m↳[22m [2mTo apply: [4mwt config update[24m[22m+[2m○[22m Proposed diff:+[107m [0m [1mdiff --git a/config.toml/current b/config.toml/migrated[m+[107m [0m [1mindex 9969ecd..a536bc0 100644[m+[107m [0m [1m--- a/config.toml/current[m+[107m [0m [1m+++ b/config.toml/migrated[m+[107m [0m [36m@@ -1 +1 @@[m+[107m [0m [31m-pre-start = "npm install"[m+[107m [0m [32m+[m[32mpre-create = "npm install"[m+[2m↳[22m [2mOptional system config not found @ [2m/etc/xdg/worktrunk/config.toml[22m[22m++[36mPROJECT CONFIG[39m @ _REPO_/.config/wt.toml+[2m○[22m Identifier: [1m../origin[22m+[2m↳[22m [2mNot found[22m++[36mSHELL INTEGRATION[39m+[33m▲[39m [33mShell integration not configured[39m+[2m↳[22m [2mTo configure, run [4mwt config shell install[24m[22m+[107m [0m Invoked as: [1m[PROJECT_ROOT]/target/[BUILD_MODE]/wt[22m++[36mOTHER[39m+[2m○[22m wt: [1m[VERSION][22m+[2m○[22m git: [1m[VERSION][22m+[2m○[22m Hyperlinks: [1minactive[22m++----- stderr -----diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snapindex 6e5015965..ec94aa553 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snap@@ -60,9 +60,9 @@ exit_code: 0[36mPROJECT CONFIG[39m @ _REPO_/.config/wt.toml[2m○[22m Identifier: [1m../origin[22m-[107m [0m [2mpre-start = [0m[2m[32m"npm install"+[107m [0m [2mpre-create = [0m[2m[32m"npm install"[107m [0m-[107m [0m [2m[36m[post-start]+[107m [0m [2m[36m[post-create][107m [0m [2mserver = [0m[2m[32m"npm run dev"[36mSHELL INTEGRATION[39mdiff --git a/tests/snapshots/integration__integration_tests__config_show__config_update_applies_template_var_migration.snap b/tests/snapshots/integration__integration_tests__config_show__config_update_applies_template_var_migration.snapindex a17a3d3ab..fefaf8826 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_update_applies_template_var_migration.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_update_applies_template_var_migration.snap@@ -24,6 +24,7 @@ info:HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -38,9 +39,11 @@ info:WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"@@ -59,12 +62,12 @@ exit_code: 0[33m▲[39m [33mUser config: template variable [1mmain_worktree[22m is deprecated in favor of [1mrepo[22m[39m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/test-config.toml/current b/test-config.toml/migrated[m-[107m [0m [1mindex 7cc556b..b3535c5 100644[m+[107m [0m [1mindex 61ddfbb..0a92575 100644[m[107m [0m [1m--- a/test-config.toml/current[m[107m [0m [1m+++ b/test-config.toml/migrated[m[107m [0m [36m@@ -1,2 +1,2 @@[m[107m [0m [31m-worktree-path = "../{{ main_worktree }}.{{ branch }}"[m-[107m [0m [31m-pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"[m+[107m [0m [31m-pre-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"[m[107m [0m [32m+[m[32mworktree-path = "../{{ repo }}.{{ branch }}"[m-[107m [0m [32m+[m[32mpre-start = "ln -sf {{ repo_path }}/node_modules {{ worktree_path }}/node_modules"[m+[107m [0m [32m+[m[32mpre-create = "ln -sf {{ repo_path }}/node_modules {{ worktree_path }}/node_modules"[m[32m✓[39m [32mUpdated user config[39mdiff --git a/tests/snapshots/integration__integration_tests__config_state__logs_get_json_with_files.snap b/tests/snapshots/integration__integration_tests__config_state__logs_get_json_with_files.snapindex 801b6c615..b4be5ddd0 100644--- a/tests/snapshots/integration__integration_tests__config_state__logs_get_json_with_files.snap+++ b/tests/snapshots/integration__integration_tests__config_state__logs_get_json_with_files.snap@@ -22,11 +22,11 @@ expression: "String::from_utf8_lossy(&output.stdout)""hook_output": [{"branch": "main",- "file": "main/user/post-start/server.log",- "hook_type": "post-start",+ "file": "main/user/post-create/server.log",+ "hook_type": "post-create","modified_at": "<TIMESTAMP>","name": "server",- "path": "_REPO_/.git/wt/logs/main/user/post-start/server.log",+ "path": "_REPO_/.git/wt/logs/main/user/post-create/server.log","size": "<SIZE>","source": "user"}diff --git a/tests/snapshots/integration__integration_tests__config_state__state_get_comprehensive.snap b/tests/snapshots/integration__integration_tests__config_state__state_get_comprehensive.snapindex ba876b2cc..2b8cda83f 100644--- a/tests/snapshots/integration__integration_tests__config_state__state_get_comprehensive.snap+++ b/tests/snapshots/integration__integration_tests__config_state__state_get_comprehensive.snap@@ -40,10 +40,10 @@ expression: "String::from_utf8_lossy(&output.stdout)"[107m [0m (none)[36mHOOK OUTPUT[39m @ <PATH>- File Size Age- ─────────────────────────────── ──── ──────- bugfix/internal/remove.log 13B future- feature/user/post-start/npm.log 10B future+ File Size Age+ ──────────────────────────────── ──── ──────+ bugfix/internal/remove.log 13B future+ feature/user/post-create/npm.log 10B future[36mDIAGNOSTIC[39m @ <PATH>[107m [0m (none)diff --git a/tests/snapshots/integration__integration_tests__config_update_pty__config_update_prompt_accept.snap b/tests/snapshots/integration__integration_tests__config_update_pty__config_update_prompt_accept.snapindex 4c275aeb6..986807208 100644--- a/tests/snapshots/integration__integration_tests__config_update_pty__config_update_prompt_accept.snap+++ b/tests/snapshots/integration__integration_tests__config_update_pty__config_update_prompt_accept.snap@@ -6,14 +6,14 @@ expression: "&output"[33m▲[39m [33mUser config: template variable [1mmain_worktree[22m is deprecated in favor of [1mrepo[22m[39m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/test-config.toml/current b/test-config.toml/migrated[m-[107m [0m [1mindex dee4883..5eef8a6 100644[m+[107m [0m [1mindex da40ce6..12d38d2 100644[m[107m [0m [1m--- a/test-config.toml/current[m[107m [0m [1m+++ b/test-config.toml/migrated[m[107m [0m [36m@@ -1,2 +1,2 @@[m[107m [0m [31m-worktree-path = "../{{ main_worktree }}.{{ branch }}"[m-[107m [0m [31m-pre-start = "ln -sf {{ repo_root }}/node_modules"[m+[107m [0m [31m-pre-create = "ln -sf {{ repo_root }}/node_modules"[m[107m [0m [32m+[m[32mworktree-path = "../{{ repo }}.{{ branch }}"[m-[107m [0m [32m+[m[32mpre-start = "ln -sf {{ repo_path }}/node_modules"[m+[107m [0m [32m+[m[32mpre-create = "ln -sf {{ repo_path }}/node_modules"[m[36m❯[39m Apply updates? [1m[y/N/?][22m y[32m✓[39m [32mUpdated user config[39mdiff --git a/tests/snapshots/integration__integration_tests__config_update_pty__config_update_prompt_decline.snap b/tests/snapshots/integration__integration_tests__config_update_pty__config_update_prompt_decline.snapindex b8bb8e69e..c5ec3f0cb 100644--- a/tests/snapshots/integration__integration_tests__config_update_pty__config_update_prompt_decline.snap+++ b/tests/snapshots/integration__integration_tests__config_update_pty__config_update_prompt_decline.snap@@ -6,14 +6,14 @@ expression: "&output"[33m▲[39m [33mUser config: template variable [1mmain_worktree[22m is deprecated in favor of [1mrepo[22m[39m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/test-config.toml/current b/test-config.toml/migrated[m-[107m [0m [1mindex dee4883..5eef8a6 100644[m+[107m [0m [1mindex da40ce6..12d38d2 100644[m[107m [0m [1m--- a/test-config.toml/current[m[107m [0m [1m+++ b/test-config.toml/migrated[m[107m [0m [36m@@ -1,2 +1,2 @@[m[107m [0m [31m-worktree-path = "../{{ main_worktree }}.{{ branch }}"[m-[107m [0m [31m-pre-start = "ln -sf {{ repo_root }}/node_modules"[m+[107m [0m [31m-pre-create = "ln -sf {{ repo_root }}/node_modules"[m[107m [0m [32m+[m[32mworktree-path = "../{{ repo }}.{{ branch }}"[m-[107m [0m [32m+[m[32mpre-start = "ln -sf {{ repo_path }}/node_modules"[m+[107m [0m [32m+[m[32mpre-create = "ln -sf {{ repo_path }}/node_modules"[m[36m❯[39m Apply updates? [1m[y/N/?][22m n[2m○[22m Update cancelleddiff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snapindex 36b141194..dc79095b3 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap@@ -236,26 +236,26 @@ Creates [2m~/.config/worktrunk/config.toml[0m with the following content:[107m [0m [2m# list.full = true[0m[107m [0m [2m# merge.squash = false[0m[107m [0m [2m# remove.delete-branch = false[0m-[107m [0m [2m# pre-start.env = "cp .env.example .env"[0m+[107m [0m [2m# pre-create.env = "cp .env.example .env"[0m[107m [0m [2m# step.copy-ignored.exclude = [".repo-local-cache/"][0m[107m [0m [2m# aliases.deploy = "make deploy BRANCH={{ branch }}"[0m[107m [0m [2m#[0m-[107m [0m [2m# Hooks support all three hook forms (https://worktrunk.dev/hook/#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:[0m+[107m [0m [2m# Hooks support all three hook forms (https://worktrunk.dev/hook/#hook-forms). A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats `projects."github.com/user/repo".post-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` table the same way:[0m[107m [0m [2m#[0m[107m [0m [2m# # Single command[0m[107m [0m [2m# [projects."github.com/user/repo"][0m-[107m [0m [2m# post-start = "mise trust"[0m+[107m [0m [2m# post-create = "mise trust"[0m[107m [0m [2m#[0m[107m [0m [2m# # Multiple commands, running concurrently[0m-[107m [0m [2m# [projects."github.com/user/repo".post-start][0m+[107m [0m [2m# [projects."github.com/user/repo".post-create][0m[107m [0m [2m# mise = "mise trust"[0m[107m [0m [2m# server = "npm run dev"[0m[107m [0m [2m#[0m[107m [0m [2m# # Pipeline: steps run in sequence[0m-[107m [0m [2m# [[projects."github.com/user/repo".post-start]][0m+[107m [0m [2m# [[projects."github.com/user/repo".post-create]][0m[107m [0m [2m# install = "npm ci"[0m[107m [0m [2m#[0m-[107m [0m [2m# [[projects."github.com/user/repo".post-start]][0m+[107m [0m [2m# [[projects."github.com/user/repo".post-create]][0m[107m [0m [2m# build = "npm run build"[0m[107m [0m [2m# server = "npm run dev"[0m[107m [0m [2m#[0m@@ -395,8 +395,8 @@ With [2m--project[0m, creates [2m.config/wt.toml[0m in the current repositor[107m [0m [2m#[0m[107m [0m [2m# Project hooks apply to this repository only. See `wt hook` (https://worktrunk.dev/hook/) for hook types, execution order, and examples.[0m[107m [0m [2m#[0m-[107m [0m [2m# pre-start = "npm ci"[0m-[107m [0m [2m# post-start = "npm run dev"[0m+[107m [0m [2m# pre-create = "npm ci"[0m+[107m [0m [2m# post-create = "npm run dev"[0m[107m [0m [2m# pre-merge = "npm test"[0m[107m [0m [2m#[0m[107m [0m [2m# ## Dev server URL[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snapindex 0b4f210b1..7496c09ad 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap@@ -108,7 +108,7 @@ Organizations can also deploy a system-wide config file for shared defaults —[1mProject config[0m — shared team settings:[107m [0m [2m# .config/wt.toml[0m-[107m [0m [2m[36m[pre-start][0m+[107m [0m [2m[36m[pre-create][0m[107m [0m [2mdeps = [0m[2m[32m"npm ci"[0m[107m [0m[107m [0m [2m[36m[pre-merge][0m@@ -284,26 +284,26 @@ Scalar values (like [2mworktree-path[0m) replace the global value; everything[107m [0m [2mlist.full = [0m[2m[33mtrue[0m[107m [0m [2mmerge.squash = [0m[2m[33mfalse[0m[107m [0m [2mremove.delete-branch = [0m[2m[33mfalse[0m-[107m [0m [2mpre-start.env = [0m[2m[32m"cp .env.example .env"[0m+[107m [0m [2mpre-create.env = [0m[2m[32m"cp .env.example .env"[0m[107m [0m [2mstep.copy-ignored.exclude = [[0m[2m[32m".repo-local-cache/"[0m[2m][0m[107m [0m [2maliases.deploy = [0m[2m[32m"make deploy BRANCH={{ branch }}"[0m-Hooks support all three hook forms. A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats [2mprojects."github.com/user/repo".post-start.server = "..."[0m and a [2m[projects."github.com/user/repo".post-start][0m table the same way:+Hooks support all three hook forms. A table runs multiple commands concurrently; an array-of-tables pipeline runs steps in sequence. The dotted-key examples below are equivalent to the table forms — TOML treats [2mprojects."github.com/user/repo".post-create.server = "..."[0m and a [2m[projects."github.com/user/repo".post-create][0m table the same way:[107m [0m [2m# Single command[0m[107m [0m [2m[36m[projects."github.com/user/repo"][0m-[107m [0m [2mpost-start = [0m[2m[32m"mise trust"[0m+[107m [0m [2mpost-create = [0m[2m[32m"mise trust"[0m[107m [0m[107m [0m [2m# Multiple commands, running concurrently[0m-[107m [0m [2m[36m[projects."github.com/user/repo".post-start][0m+[107m [0m [2m[36m[projects."github.com/user/repo".post-create][0m[107m [0m [2mmise = [0m[2m[32m"mise trust"[0m[107m [0m [2mserver = [0m[2m[32m"npm run dev"[0m[107m [0m[107m [0m [2m# Pipeline: steps run in sequence[0m-[107m [0m [2m[36m[[projects."github.com/user/repo".post-start]][0m+[107m [0m [2m[36m[[projects."github.com/user/repo".post-create]][0m[107m [0m [2minstall = [0m[2m[32m"npm ci"[0m[107m [0m-[107m [0m [2m[36m[[projects."github.com/user/repo".post-start]][0m+[107m [0m [2m[36m[[projects."github.com/user/repo".post-create]][0m[107m [0m [2mbuild = [0m[2m[32m"npm run build"[0m[107m [0m [2mserver = [0m[2m[32m"npm run dev"[0m@@ -434,8 +434,8 @@ To create a starter file with commented-out examples, run [2mwt config create -Project hooks apply to this repository only. See [2mwt hook[0m for hook types, execution order, and examples.-[107m [0m [2mpre-start = [0m[2m[32m"npm ci"[0m-[107m [0m [2mpost-start = [0m[2m[32m"npm run dev"[0m+[107m [0m [2mpre-create = [0m[2m[32m"npm ci"[0m+[107m [0m [2mpost-create = [0m[2m[32m"npm run dev"[0m[107m [0m [2mpre-merge = [0m[2m[32m"npm test"[0m[1m[32mDev server URL[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snapindex 0e03b36aa..0b9b1b667 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap@@ -13,21 +13,28 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"NO_COLOR: ""PSModulePath: ""RUST_LOG: warnSHELL: ""TERM: alacritty- WORKTRUNK_APPROVALS_PATH: /nonexistent/wt/approvals.toml- WORKTRUNK_CONFIG_PATH: /nonexistent/wt/config.toml- WORKTRUNK_SYSTEM_CONFIG_PATH: /etc/xdg/worktrunk/config.toml+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"---success: trueexit_code: 0@@ -91,7 +98,7 @@ Hook output lives in per-branch subtrees under [2m.git/wt/logs/{branch}/[0m:Background hooks [2m{branch}/{source}/{hook-type}/{name}.log[0mBackground removal [2m{branch}/internal/remove.log[0m-All [2mpost-*[0m hooks (post-start, post-switch, post-commit, post-merge) run in the background and produce log files. Source is [2muser[0m or [2mproject[0m. Branch and hook names are sanitized for filesystem safety (invalid characters → [2m-[0m; short collision-avoidance hash appended). Same operation on same branch overwrites the previous log. Removing a branch clears its subtree; orphans from deleted branches can be swept with [2mwt config state logs clear[0m.+All [2mpost-*[0m hooks (post-create, post-switch, post-commit, post-merge) run in the background and produce log files. Source is [2muser[0m or [2mproject[0m. Branch and hook names are sanitized for filesystem safety (invalid characters → [2m-[0m; short collision-avoidance hash appended). Same operation on same branch overwrites the previous log. Removing a branch clears its subtree; orphans from deleted branches can be swept with [2mwt config state logs clear[0m.[32mDiagnostic files[0m@@ -119,8 +126,8 @@ List all log files:Query the command log:[107m [0m [2m[0m[2m[34mtail[0m[2m [0m[2m[36m-5[0m[2m .git/wt/logs/commands.jsonl [0m[2m[36m|[0m[2m [0m[2m[34mjq[0m[2m .[0m-Path to one hook log (e.g. the [2mpost-start[0m [2mserver[0m hook for the current branch):-[107m [0m [2m[0m[2m[34mwt[0m[2m config state logs [0m[2m[36m--format=json[0m[2m [0m[2m[36m|[0m[2m [0m[2m[34mjq[0m[2m [0m[2m[36m-r[0m[2m [0m[2m[32m'.hook_output[] | select(.source == "user" and .hook_type == "post-start" and (.name | startswith("server"))) | .path'[0m[2m[0m+Path to one hook log (e.g. the [2mpost-create[0m [2mserver[0m hook for the current branch):+[107m [0m [2m[0m[2m[34mwt[0m[2m config state logs [0m[2m[36m--format=json[0m[2m [0m[2m[36m|[0m[2m [0m[2m[34mjq[0m[2m [0m[2m[36m-r[0m[2m [0m[2m[32m'.hook_output[] | select(.source == "user" and .hook_type == "post-create" and (.name | startswith("server"))) | .path'[0m[2m[0mLogs for a specific branch:[107m [0m [2m[0m[2m[34mwt[0m[2m config state logs [0m[2m[36m--format=json[0m[2m [0m[2m[36m|[0m[2m [0m[2m[34mjq[0m[2m [0m[2m[32m'.hook_output[] | select(.branch | startswith("feature"))'[0m[2m[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snapindex c837d5ed1..75ead7c5e 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap@@ -11,19 +11,22 @@ info:GIT_EDITOR: ""LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"NO_COLOR: ""PSModulePath: ""RUST_LOG: warnSHELL: ""TERM: alacritty- WORKTRUNK_APPROVALS_PATH: /nonexistent/wt/approvals.toml- WORKTRUNK_CONFIG_PATH: /nonexistent/wt/config.toml- WORKTRUNK_SYSTEM_CONFIG_PATH: /etc/xdg/worktrunk/config.toml+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"@@ -143,8 +146,8 @@ If the branch already has a worktree, [2mwt switch[0m changes directories to i1. Runs pre-switch hooks, blocking until complete2. Creates worktree at configured path3. Switches to new directory-4. Runs pre-start hooks, blocking until complete-5. Spawns post-start and post-switch hooks in the background+4. Runs pre-create hooks, blocking until complete+5. Spawns post-create and post-switch hooks in the background[107m [0m [2m[0m[2m[34mwt[0m[2m switch feature # Existing branch → creates worktree[0m[2m[0m[107m [0m [2m[0m[2m[34mwt[0m[2m switch [0m[2m[36m--create[0m[2m feature # New branch and worktree[0m[2m[0mdiff --git a/tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_start.snap b/tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_create.snapsimilarity index 64%rename from tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_start.snaprename to tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_create.snapindex 5a7ce9f16..1783bdd19 100644--- a/tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_start.snap+++ b/tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_create.snap@@ -3,13 +3,14 @@ source: tests/integration_tests/help.rsinfo:program: wtargs:- - pre-start+ - pre-createenv:CLICOLOR_FORCE: "1"COLUMNS: "500"GIT_EDITOR: ""LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: /var/folders/v3/8k5q0_6j3_q6gl4h8czr66sh0000gn/T/wt-test-profraw/cov-%m_%p.profrawNO_COLOR: ""PSModulePath: ""RUST_LOG: warn@@ -18,23 +19,29 @@ info:WORKTRUNK_APPROVALS_PATH: /nonexistent/wt/approvals.tomlWORKTRUNK_CONFIG_PATH: /nonexistent/wt/config.tomlWORKTRUNK_SYSTEM_CONFIG_PATH: /etc/xdg/worktrunk/config.toml+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"---success: falseexit_code: 2----- stdout ---------- stderr ------[1m[31merror:[0m unrecognized subcommand '[1m[33mpre-start[0m'+[1m[31merror:[0m unrecognized subcommand '[1m[33mpre-create[0m'[1m[32mUsage:[0m [1m[36mwt[0m [36m[OPTIONS][0m [36m[COMMAND][0mFor more information, try '[1m[36m--help[0m'.- [33mtip:[39m perhaps [36m[1mwt hook pre-start[39m[22m?+ [33mtip:[39m perhaps [36m[1mwt hook pre-create[39m[22m?diff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_show_merges_user_project_hooks.snap b/tests/snapshots/integration__integration_tests__hook_show__hook_show_merges_user_project_hooks.snapindex 179ca8eea..9cbc556d4 100644--- a/tests/snapshots/integration__integration_tests__hook_show__hook_show_merges_user_project_hooks.snap+++ b/tests/snapshots/integration__integration_tests__hook_show__hook_show_merges_user_project_hooks.snap@@ -55,9 +55,9 @@ success: trueexit_code: 0----- stdout -----[36mUSER HOOKS[39m @ ~/.config/worktrunk/config.toml-[2m○[22m post-start [1mglobal-hook[22m:+[2m○[22m post-create [1mglobal-hook[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m global-[2m○[22m post-start [1mproject-hook[22m:+[2m○[22m post-create [1mproject-hook[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m per-project[36mPROJECT HOOKS[39m @ _REPO_/.config/wt.tomldiff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snap b/tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snapindex 65ff2c03c..b97333a57 100644--- a/tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snap+++ b/tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snap@@ -11,13 +11,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -30,13 +36,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -46,7 +58,7 @@ exit_code: 0[2m↳[22m [2m(none configured)[22m[36mPROJECT HOOKS[39m @ _REPO_/.config/wt.toml-[36m❯[39m post-start [1mdeps[22m: [2m(requires approval)[22m+[36m❯[39m post-create [1mdeps[22m: [2m(requires approval)[22m[107m [0m [2m[0m[2m[34mnpm[0m[2m install[36m❯[39m pre-merge [1mbuild[22m: [2m(requires approval)[22m[107m [0m [2m[0m[2m[34mcargo[0m[2m builddiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_create_commands__both_pre_and_post_create.snapsimilarity index 72%rename from tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__both_pre_and_post_create.snapindex 7e83e4f68..1fafa1754 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__both_pre_and_post_create.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,10 +57,10 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Setup done'[0m[2m [0m[2m[36m>[0m[2m setup.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mserver[22m (project) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: [1mserver[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__execute_with_post_create.snap b/tests/snapshots/integration__integration_tests__post_create_commands__execute_with_post_create.snapnew file mode 100644index 000000000..bc7ca8775--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__execute_with_post_create.snap@@ -0,0 +1,68 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ - "--execute"+ - "echo 'Execute flag' > execute.txt"+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mExecuting (--execute) @ [1m_REPO_.feature[22m:[39m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Execute flag'[0m[2m [0m[2m[36m>[0m[2m execute.txtdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snap b/tests/snapshots/integration__integration_tests__post_create_commands__invalid_toml.snapsimilarity index 69%rename from tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__invalid_toml.snapindex 772aee0aa..0488ee4d6 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__invalid_toml.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: false@@ -47,8 +59,8 @@ exit_code: 1----- stderr -----[31m✗[39m [31mFailed to load project config[39m[107m [0m Project config at _REPO_/.config/wt.toml failed to parse:-[107m [0m TOML parse error at line 1, column 28+[107m [0m TOML parse error at line 1, column 29[107m [0m |-[107m [0m 1 | pre-start = [invalid syntax-[107m [0m | ^+[107m [0m 1 | pre-create = [invalid syntax+[107m [0m | ^[107m [0m unclosed array, expected `]`diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_base_variables.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_base_variables.snapsimilarity index 66%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_base_variables.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_base_variables.snapindex b2db4a3f3..7659db927 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_base_variables.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_base_variables.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -14,13 +14,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -33,13 +39,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -47,11 +59,11 @@ exit_code: 0----- stdout ---------- stderr ------[33m▲[39m [33mProject config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-start [1mproject:base[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:base[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Base: main'[0m[2m [0m[2m[36m>[0m[2m base_info.txt-[0m[36m◎[39m [36mRunning pre-start [1mproject:base_path[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1mproject:base_path[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Base Path: _REPO_'[0m[2m [0m[2m[36m>>[0m[2m base_info.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_complex_shell.snapsimilarity index 74%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_complex_shell.snapindex fcc3cba00..4a6248e64 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_complex_shell.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -49,3 +61,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_create_with_command.snapsimilarity index 74%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_create_with_command.snapindex bd4f755d5..4a6248e64 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_create_with_command.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -49,4 +61,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_default_branch_template.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_default_branch_template.snapsimilarity index 75%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_default_branch_template.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_default_branch_template.snapindex 5162debc7..cb217a766 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_default_branch_template.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_default_branch_template.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -46,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Default: main'[0m[2m [0m[2m[36m>[0m[2m default.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_failing_command.snapsimilarity index 64%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_failing_command.snapindex dffcdf9b4..cb1a8d83c 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_failing_command.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: false@@ -45,7 +57,7 @@ exit_code: 1----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mexit[0m[2m 1-[0m[31m✗[39m [31mpre-start command failed: exit status: 1[39m-[2m↳[22m [2mTo skip pre-start hooks, re-run with [4m--no-hooks[24m[22m+[0m[31m✗[39m [31mpre-create command failed: exit status: 1[39m+[2m↳[22m [2mTo skip pre-create hooks, re-run with [4m--no-hooks[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_git_variables_template.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_git_variables_template.snapsimilarity index 60%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_git_variables_template.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_git_variables_template.snapindex 3d8c132ca..f97fc1935 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_git_variables_template.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_git_variables_template.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -46,15 +58,15 @@ exit_code: 0----- stdout ---------- stderr ------[33m▲[39m [33mProject config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-start [1mproject:commit[22m @ [1m_REPO_.feature[22m[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Commit: 72ad3f366b7d9a0fad6f311caa63139e2dc02f0e'[0m[2m [0m[2m[36m>[0m[2m git_vars.txt-[0m[36m◎[39m [36mRunning pre-start [1mproject:short[22m @ [1m_REPO_.feature[22m[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Short: 72ad3f3'[0m[2m [0m[2m[36m>>[0m[2m git_vars.txt-[0m[36m◎[39m [36mRunning pre-start [1mproject:remote[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:commit[22m @ [1m_REPO_.feature[22m[39m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Commit: 5df3ac9912c6b9de24c353a5fc6f04017a174f61'[0m[2m [0m[2m[36m>[0m[2m git_vars.txt+[0m[36m◎[39m [36mRunning pre-create [1mproject:short[22m @ [1m_REPO_.feature[22m[39m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Short: 5df3ac9'[0m[2m [0m[2m[36m>>[0m[2m git_vars.txt+[0m[36m◎[39m [36mRunning pre-create [1mproject:remote[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Remote: origin'[0m[2m [0m[2m[36m>>[0m[2m git_vars.txt-[0m[36m◎[39m [36mRunning pre-start [1mproject:worktree_name[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1mproject:worktree_name[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Worktree Name: repo.feature'[0m[2m [0m[2m[36m>>[0m[2m git_vars.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_invalid_command.snapnew file mode 100644index 000000000..4a6248e64--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_invalid_command.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_log_captures_output.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_log_captures_output.snapnew file mode 100644index 000000000..4a6248e64--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_log_captures_output.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_mixed_user_pipeline_project_flat.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_mixed_user_pipeline_project_flat.snapnew file mode 100644index 000000000..76dda7e31--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_mixed_user_pipeline_project_flat.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: …, [1muser_bg[22m (user); [1mproj[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_control_structure.snapsimilarity index 77%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_control_structure.snapindex 947e5ae9f..feed7d341 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_control_structure.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[35mif[0m[2m [ ! -f test.txt ]; [0m[2m[35mthen[0m[2m[107m [0m [2m [0m[2m[34mecho[0m[2m [0m[2m[32m'File does not exist'[0m[2m [0m[2m[36m>[0m[2m result.txt[107m [0m [2m[0m[2m[35melse[0m[2mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_with_newlines.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_with_newlines.snapnew file mode 100644index 000000000..8354018bf--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_with_newlines.snap@@ -0,0 +1,63 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiple_background.snapnew file mode 100644index 000000000..2be275ebe--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiple_background.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: [1mtask1[22m & [1mtask2[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_named_commands.snapsimilarity index 65%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_named_commands.snapindex f6f9b2d39..6ea21f10c 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_named_commands.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,12 +57,12 @@ exit_code: 0----- stdout ---------- stderr ------[33m▲[39m [33mProject config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-start [1mproject:install[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:install[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing deps'[0m[2m[0mInstalling deps-[36m◎[39m [36mRunning pre-start [1mproject:setup[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:setup[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Running setup'[0m[2m[0mRunning setup[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_no_config.snapsimilarity index 77%rename from tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_no_config.snapindex c4d806d08..df2ac08b8 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_no_config.snap@@ -1,26 +1,30 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:- switch- "--create"- feature- - "--execute"- - "echo 'Execute flag' > execute.txt"env:APPDATA: "[TEST_CONFIG_HOME]"CLICOLOR_FORCE: "1"COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -33,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -51,6 +61,3 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39m-[36m◎[39m [36mExecuting (--execute) @ [1m_REPO_.feature[22m:[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Execute flag'[0m[2m [0m[2m[36m>[0m[2m execute.txtdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_pipeline_template_vars.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_pipeline_template_vars.snapnew file mode 100644index 000000000..45960b19e--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_pipeline_template_vars.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: …, [1mcheck[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_project_pipeline.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_project_pipeline.snapnew file mode 100644index 000000000..3342dc060--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_project_pipeline.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: …, [1mtask1[22m & [1mtask2[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_separate_logs.snapnew file mode 100644index 000000000..aa5572e03--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_separate_logs.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: [1mtask1[22m & [1mtask2[22m & [1mtask3[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_background.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_background.snapnew file mode 100644index 000000000..4a6248e64--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_background.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_command.snapsimilarity index 75%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_command.snapindex b737efb34..87050eacd 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_command.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Setup complete'[0m[2m[0mSetup complete[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_skip_existing.snapsimilarity index 75%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_skip_existing.snapindex 50cf6e1f2..e97fc91e5 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_skip_existing.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -11,13 +11,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -30,13 +36,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: truediff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_target_variable.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_target_variable.snapnew file mode 100644index 000000000..4a6248e64--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_target_variable.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/post_create_commands.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_template_expansion.snapsimilarity index 63%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_template_expansion.snapindex 505faa4ae..09561d445 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_template_expansion.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,17 +57,17 @@ exit_code: 0----- stdout ---------- stderr ------[33m▲[39m [33mProject config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mProject config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-start [1mproject:repo[22m @ [1m_REPO_.feature-test[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:repo[22m @ [1m_REPO_.feature-test[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Repo: repo'[0m[2m [0m[2m[36m>[0m[2m info.txt-[0m[36m◎[39m [36mRunning pre-start [1mproject:branch[22m @ [1m_REPO_.feature-test[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1mproject:branch[22m @ [1m_REPO_.feature-test[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Branch: feature/test'[0m[2m [0m[2m[36m>>[0m[2m info.txt-[0m[36m◎[39m [36mRunning pre-start [1mproject:hash_port[22m @ [1m_REPO_.feature-test[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1mproject:hash_port[22m @ [1m_REPO_.feature-test[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Port: 18064'[0m[2m [0m[2m[36m>>[0m[2m info.txt-[0m[36m◎[39m [36mRunning pre-start [1mproject:worktree[22m @ [1m_REPO_.feature-test[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1mproject:worktree[22m @ [1m_REPO_.feature-test[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Worktree: _REPO_.feature-test'[0m[2m [0m[2m[36m>>[0m[2m info.txt-[0m[36m◎[39m [36mRunning pre-start [1mproject:root[22m @ [1m_REPO_.feature-test[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1mproject:root[22m @ [1m_REPO_.feature-test[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Root: _REPO_'[0m[2m [0m[2m[36m>>[0m[2m info.txt[0m[32m✓[39m [32mCreated branch [1mfeature/test[22m from [1mmain[22m and worktree @ [1m_REPO_.feature-test[22m[39m[33m▲[39m [33mCannot change directory — shell integration not installed[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_conditional.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_conditional.snapsimilarity index 75%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_conditional.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_conditional.snapindex d73a60e78..21299e0af 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_conditional.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_conditional.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -46,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'no-upstream'[0m[2m [0m[2m[36m>[0m[2m upstream.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_template.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_template.snapsimilarity index 76%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_template.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_template.snapindex 7f1b112d9..742073895 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_upstream_template.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_template.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: false@@ -46,6 +58,6 @@ exit_code: 1----- stdout ---------- stderr ------[31m✗[39m [31mFailed to expand project pre-start hook: undefined value @ line 1[39m+[31m✗[39m [31mFailed to expand project pre-create hook: undefined value @ line 1[39m[107m [0m echo 'Upstream: {{ upstream }}' > upstream.txt[2m↳[22m [2mAvailable variables: [4margs[24m, [4mbase[24m, [4mbase_worktree_path[24m, [4mbranch[24m, [4mcommit[24m, [4mcwd[24m, [4mdefault_branch[24m, [4mhook_type[24m, [4mmain_worktree[24m, [4mmain_worktree_path[24m, [4mprimary_worktree_path[24m, [4mremote[24m, [4mremote_url[24m, [4mrepo[24m, [4mrepo_path[24m, [4mrepo_root[24m, [4mshort_commit[24m, [4mtarget[24m, [4mtarget_worktree_path[24m, [4mworktree[24m, [4mworktree_name[24m, [4mworktree_path[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_output.snapsimilarity index 81%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_output.snapindex f5702c50b..f5a0160d1 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_output.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -62,8 +74,8 @@ exit_code: 0[107m [0m branch = feature[107m [0m worktree_path = _REPO_.feature[107m [0m worktree_name = repo.feature-[107m [0m commit = d545a78b148af245c616612b474fd2049705c00c-[107m [0m short_commit = d545a78+[107m [0m commit = cc56115a2d40689b4609d28787b6c4c0f8911148+[107m [0m short_commit = cc56115[107m [0m upstream = (unset)[107m [0m base = main[107m [0m base_worktree_path = _REPO_@@ -79,6 +91,6 @@ exit_code: 0[107m [0m remote = origin[107m [0m remote_url = ../origin.git[107m [0m cwd = _REPO_.feature-[107m [0m hook_type = post-start+[107m [0m hook_type = post-create[107m [0m hook_name = setup-[36m◎[39m [36mRunning post-start: [1msetup[22m (project) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: [1msetup[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_verbose_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_template_expansion.snapsimilarity index 81%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_create_verbose_template_expansion.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_template_expansion.snapindex 539dbd26b..593827fe9 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_verbose_template_expansion.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_template_expansion.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -58,8 +70,8 @@ exit_code: 0[107m [0m branch = verbose-hooks[107m [0m worktree_path = _REPO_.verbose-hooks[107m [0m worktree_name = repo.verbose-hooks-[107m [0m commit = 7900f355a9d429e8ac86370140fe4622e7d27e33-[107m [0m short_commit = 7900f35+[107m [0m commit = 10d3d6e5762be0da3395f897e4656e429b1e5e94+[107m [0m short_commit = 10d3d6e[107m [0m upstream = (unset)[107m [0m base = main[107m [0m base_worktree_path = _REPO_@@ -75,9 +87,9 @@ exit_code: 0[107m [0m remote = origin[107m [0m remote_url = ../origin.git[107m [0m cwd = _REPO_.verbose-hooks-[107m [0m hook_type = pre-start+[107m [0m hook_type = pre-create[107m [0m hook_name = setup-[36m◎[39m [36mRunning pre-start [1mproject:setup[22m @ [1m_REPO_.verbose-hooks[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:setup[22m @ [1m_REPO_.verbose-hooks[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Setting up verbose-hooks in _REPO_.verbose-hooks'[0m[2m[0mSetting up verbose-hooks in _REPO_.verbose-hooks[32m✓[39m [32mCreated branch [1mverbose-hooks[22m from [1mmain[22m and worktree @ [1m_REPO_.verbose-hooks[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_switch_target_variable_existing.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_switch_target_variable_existing.snapsimilarity index 76%rename from tests/snapshots/integration__integration_tests__post_start_commands__post_switch_target_variable_existing.snaprename to tests/snapshots/integration__integration_tests__post_create_commands__post_switch_target_variable_existing.snapindex 508d9b0a3..525b48081 100644--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_switch_target_variable_existing.snap+++ b/tests/snapshots/integration__integration_tests__post_create_commands__post_switch_target_variable_existing.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_start_commands.rs+source: tests/integration_tests/post_create_commands.rsinfo:program: wtargs:@@ -11,13 +11,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -30,13 +36,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: truediff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snapdeleted file mode 100644index bd4f755d5..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snapdeleted file mode 100644index bd4f755d5..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snapdeleted file mode 100644index bd4f755d5..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_mixed_user_pipeline_project_flat.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_mixed_user_pipeline_project_flat.snapdeleted file mode 100644index 0d1a48921..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_mixed_user_pipeline_project_flat.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: …, [1muser_bg[22m (user); [1mproj[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snapdeleted file mode 100644index e4d9d4880..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap+++ /dev/null@@ -1,51 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snapdeleted file mode 100644index d0915e66f..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mtask1[22m & [1mtask2[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snapdeleted file mode 100644index c137af786..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: …, [1mcheck[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_project_pipeline.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_project_pipeline.snapdeleted file mode 100644index 33a2dd88f..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_project_pipeline.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: …, [1mtask1[22m & [1mtask2[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snapdeleted file mode 100644index f78289e62..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mtask1[22m & [1mtask2[22m & [1mtask3[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snapdeleted file mode 100644index bd4f755d5..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_target_variable.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_target_variable.snapdeleted file mode 100644index bd4f755d5..000000000--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_target_variable.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/post_start_commands.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__fish_wrapper_preserves_progress_messages.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__fish_wrapper_preserves_progress_messages.snapindex 976bf773f..417755e50 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__fish_wrapper_preserves_progress_messages.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__fish_wrapper_preserves_progress_messages.snap@@ -5,4 +5,4 @@ expression: "&output.combined"[32m✓[39m [32mCreated branch [1mfish-bg[22m from [1mmain[22m and worktree @ [1m_REPO_.fish-bg[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[36m◎[39m [36mRunning post-start: project[39m+[36m◎[39m [36mRunning post-create: project[39mdiff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_approval_prompt.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_approval_prompt.snapindex 16af8bb7a..77340c40d 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_approval_prompt.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_approval_prompt.snap@@ -5,11 +5,11 @@ expression: prompt_onlyn▲ repo needs approval to execute 3 commands:-○ pre-start install:+○ pre-create install:echo 'Installing dependencies...'-○ pre-start build:+○ pre-create build:echo 'Building project...'-○ pre-start test:+○ pre-create test:echo 'Running tests...'❯ Allow and remember? [y/N]diff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_create.snapsimilarity index 74%rename from tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snaprename to tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_create.snapindex 60a26d8d4..98a26bc74 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_create.snap@@ -3,11 +3,11 @@ source: tests/integration_tests/shell_wrapper.rsexpression: "&output.combined"----[36m◎[39m [36mRunning pre-start [1mproject:install[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:install[22m[39m[107m [0m [2m[0m[2m[34muv[0m[2m syncResolved 24 packages in 145msInstalled 24 packages in 1.2s[32m✓[39m [32mCreated branch [1mfeature-x[22m from [1mmain[22m and worktree @ [1m_REPO_.feature-x[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[36m◎[39m [36mRunning post-start: [1mdev[22m (project)[39m+[36m◎[39m [36mRunning post-create: [1mdev[22m (project)[39mdiff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snapindex 3ceb1698a..d1f9527d3 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_hooks_zsh.snap@@ -3,12 +3,12 @@ source: tests/integration_tests/shell_wrapper.rsexpression: "&output.combined"----[36m◎[39m [36mRunning pre-start [1mproject:install[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:install[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2mInstalling dependencies...-[36m◎[39m [36mRunning pre-start [1mproject:build[22m[39m+[36m◎[39m [36mRunning pre-create [1mproject:build[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2mBuilding project...[32m✓[39m [32mCreated branch [1mfeature-hooks[22m from [1mmain[22m and worktree @ [1m_REPO_.feature-hooks[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[36m◎[39m [36mRunning post-start: [1mserver[22m & [1mwatch[22m (project)[39m+[36m◎[39m [36mRunning post-create: [1mserver[22m & [1mwatch[22m (project)[39mdiff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_create_command_no_directive_leak.snapsimilarity index 85%rename from tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snaprename to tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_create_command_no_directive_leak.snapindex f200e69c6..3007eb60a 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_create_command_no_directive_leak.snap@@ -5,4 +5,4 @@ expression: "&output.combined"[32m✓[39m [32mCreated branch [1mfeature-with-hooks[22m from [1mmain[22m and worktree @ [1m_REPO_.feature-with-hooks[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[36m◎[39m [36mRunning post-start: project[39m+[36m◎[39m [36mRunning post-create: project[39mdiff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__wrapper_preserves_progress_messages.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__wrapper_preserves_progress_messages.snapindex 25d9666f1..70890b221 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__wrapper_preserves_progress_messages.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__wrapper_preserves_progress_messages.snap@@ -5,4 +5,4 @@ expression: "&output.combined"[32m✓[39m [32mCreated branch [1mfeature-bg[22m from [1mmain[22m and worktree @ [1m_REPO_.feature-bg[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[36m◎[39m [36mRunning post-start: project[39m+[36m◎[39m [36mRunning post-create: project[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_combined_hooks.snap b/tests/snapshots/integration__integration_tests__switch__switch_combined_hooks.snapindex d0062e61f..f74cabb0f 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_combined_hooks.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_combined_hooks.snap@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -50,4 +62,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-switch: project; post-start: project @ [1m_REPO_.combined-hooks-test[22m[39m+[36m◎[39m [36mRunning post-switch: project; post-create: project @ [1m_REPO_.combined-hooks-test[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_create.snapsimilarity index 73%rename from tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snaprename to tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_create.snapindex dcba3a1f2..2c9767d4f 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_create.snap@@ -5,7 +5,7 @@ info:args:- switch- "--create"- - no-post-start+ - no-post-create- "--no-hooks"env:APPDATA: "[TEST_CONFIG_HOME]"@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -46,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCreated branch [1mno-post-start[22m from [1mmain[22m and worktree @ [1m_REPO_.no-post-start[22m[39m+[32m✓[39m [32mCreated branch [1mno-post-create[22m from [1mmain[22m and worktree @ [1m_REPO_.no-post-create[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__background_hook_env_var_visible.snap b/tests/snapshots/integration__integration_tests__user_hooks__background_hook_env_var_visible.snapindex a797fcec4..8e89fbe2f 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__background_hook_env_var_visible.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__background_hook_env_var_visible.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,10 +57,10 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start [1muser:capture-fg[22m @ [1m_REPO_.feature[22m[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m"fg=[0m[2m[36m$[0m[2mWORKTRUNK_FOREGROUND"[0m[2m [0m[2m[36m>[0m[2m pre_start_env.txt+[36m◎[39m [36mRunning pre-create [1muser:capture-fg[22m @ [1m_REPO_.feature[22m[39m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m"fg=[0m[2m[36m$[0m[2mWORKTRUNK_FOREGROUND"[0m[2m [0m[2m[36m>[0m[2m pre_create_env.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mcapture-bg[22m (user) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: [1mcapture-bg[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__hook_verbose_background_dedup.snap b/tests/snapshots/integration__integration_tests__user_hooks__hook_verbose_background_dedup.snapindex 2926afb1c..bc93aaff0 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__hook_verbose_background_dedup.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__hook_verbose_background_dedup.snap@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -54,11 +66,11 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[2m○[22m Expanding [1muser post-start hook[22m+[2m○[22m Expanding [1muser post-create hook[22m[107m [0m [2m[0m[2m[34mecho[0m[2m user-hook[107m [0m [2m→[22m[107m [0m [2m[0m[2m[34mecho[0m[2m user-hook-[2m○[22m Expanding [1mproject post-start hook[22m+[2m○[22m Expanding [1mproject post-create hook[22m[107m [0m [2m[0m[2m[34mecho[0m[2m project-hook[107m [0m [2m→[22m[107m [0m [2m[0m[2m[34mecho[0m[2m project-hook@@ -66,8 +78,8 @@ exit_code: 0[107m [0m branch = feature[107m [0m worktree_path = _REPO_.feature[107m [0m worktree_name = repo.feature-[107m [0m commit = 26c70caa73d841981f190bafd2a2a6e1d4eed34e-[107m [0m short_commit = 26c70ca+[107m [0m commit = 5fd290273dcb433c49ba3d0d37601e1d034a113d+[107m [0m short_commit = 5fd2902[107m [0m upstream = (unset)[107m [0m base = main[107m [0m base_worktree_path = _REPO_@@ -83,6 +95,6 @@ exit_code: 0[107m [0m remote = origin[107m [0m remote_url = ../origin.git[107m [0m cwd = _REPO_.feature-[107m [0m hook_type = post-start+[107m [0m hook_type = post-create[107m [0m hook_name = (unset)-[36m◎[39m [36mRunning post-start: user; project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: user; project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__standalone_hook_name_filtered_lazy_template.snap b/tests/snapshots/integration__integration_tests__user_hooks__standalone_hook_name_filtered_lazy_template.snapindex a19a05f85..6f55cfb1b 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__standalone_hook_name_filtered_lazy_template.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__standalone_hook_name_filtered_lazy_template.snap@@ -4,7 +4,7 @@ info:program: wtargs:- hook- - post-start+ - post-create- dbenv:APPDATA: "[TEST_CONFIG_HOME]"@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,4 +57,4 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning post-start: [1mdb[22m (user)[39m+[36m◎[39m [36mRunning post-create: [1mdb[22m (user)[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_create.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_create.snapnew file mode 100644index 000000000..14a3a28b5--- /dev/null+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_create.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/user_hooks.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: [1mbg[22m (user); project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_create.snapsimilarity index 76%rename from tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_create.snapindex 4c9089e42..f20fbd0c0 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_create.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -49,4 +61,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mbg[22m (user); project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: user; project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snapindex f82f9b754..a8ba290ab 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start [1muser:vars[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1muser:vars[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'repo=repo branch=feature'[0m[2m [0m[2m[36m>[0m[2m template_vars.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snapindex 4ff72b582..662135e4c 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,9 +57,9 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start [1muser:log[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1muser:log[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'USER_HOOK'[0m[2m [0m[2m[36m>>[0m[2m hook_order.txt-[0m[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'PROJECT_HOOK'[0m[2m [0m[2m[36m>>[0m[2m hook_order.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snapindex a700ccd20..d4534b858 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start [1muser:setup[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1muser:setup[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'NO_APPROVAL_NEEDED'[0m[2m [0m[2m[36m>[0m[2m no_approval.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_preserve_order.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_preserve_order.snapindex a296dfcf9..7665272e2 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_preserve_order.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_hooks_preserve_order.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,15 +57,15 @@ exit_code: 0----- stdout ---------- stderr ------[33m▲[39m [33mUser config: table form for [1mpre-start[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m+[33m▲[39m [33mUser config: table form for [1mpre-create[22m is deprecated in favor of the pipeline form. We're unifying pre-hooks, post-hooks, and aliases so that list form always runs serially and table form always runs in parallel — migrate now to keep the current serial behavior once the table form is repurposed.[39m[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-start [1muser:vscode[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1muser:vscode[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'1'[0m[2m [0m[2m[36m>>[0m[2m hook_order.txt-[0m[36m◎[39m [36mRunning pre-start [1muser:claude[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1muser:claude[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'2'[0m[2m [0m[2m[36m>>[0m[2m hook_order.txt-[0m[36m◎[39m [36mRunning pre-start [1muser:copy[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1muser:copy[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'3'[0m[2m [0m[2m[36m>>[0m[2m hook_order.txt-[0m[36m◎[39m [36mRunning pre-start [1muser:submodule[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-create [1muser:submodule[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'4'[0m[2m [0m[2m[36m>>[0m[2m hook_order.txt[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snapindex 1e0d8e01f..8dcfd620d 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -45,9 +57,8 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start [1muser:log[22m @ [1m_REPO_.feature[22m[39m-[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'USER_POST_CREATE_RAN'[0m[2m [0m[2m[36m>[0m[2m user_hook_marker.txt-[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: [1mbg[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snapindex f7f1f2104..902b8fadf 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: false@@ -45,7 +57,7 @@ exit_code: 1----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-start [1muser:failing[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-create [1muser:failing[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mexit[0m[2m 1-[0m[31m✗[39m [31mpre-start command failed: [1mfailing[22m: exit status: 1[39m-[2m↳[22m [2mTo skip pre-start hooks, re-run with [4m--no-hooks[24m[22m+[0m[31m✗[39m [31mpre-create command failed: [1mfailing[22m: exit status: 1[39m+[2m↳[22m [2mTo skip pre-create hooks, re-run with [4m--no-hooks[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_all.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_all.snapnew file mode 100644index 000000000..6e5246432--- /dev/null+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_all.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/user_hooks.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: [1ma[22m & [1mb[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_failure.snapnew file mode 100644index 000000000..534e4c800--- /dev/null+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_failure.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/user_hooks.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: [1mfail[22m & [1mok[22m, … (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_start.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_failure.snapsimilarity index 76%rename from tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_start.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_failure.snapindex 532bc6dd7..11209577a 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_start.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_failure.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -49,4 +61,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: user; project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: …, [1mbg[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_hook_name_per_step.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_hook_name_per_step.snapnew file mode 100644index 000000000..fda3ab5b7--- /dev/null+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_hook_name_per_step.snap@@ -0,0 +1,64 @@+---+source: tests/integration_tests/user_hooks.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m+[36m◎[39m [36mRunning post-create: [1mstep_one[22m, [1mstep_two[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_lazy_vars_bg.snapsimilarity index 76%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_lazy_vars_bg.snapindex f03e91ebc..01067ff60 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_lazy_vars_bg.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -49,4 +61,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mbg[22m (user) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: …, [1mdb[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_ordering.snapsimilarity index 76%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_ordering.snapindex c2fbfa0ba..11209577a 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_ordering.snap@@ -12,13 +12,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -31,13 +37,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: true@@ -49,4 +61,4 @@ exit_code: 0[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m[33m▲[39m [33mCannot change directory — shell integration not installed[39m[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1ma[22m & [1mb[22m (user) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-create: …, [1mbg[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_skipped_no_hooks.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_skipped_no_hooks.snapsimilarity index 80%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_start_skipped_no_hooks.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_create_skipped_no_hooks.snapindex bcfc4e961..bcbc62417 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_skipped_no_hooks.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_skipped_no_hooks.snap@@ -13,13 +13,19 @@ info:COLUMNS: "500"GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""HOME: "[TEST_HOME]"LANG: CLC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"NO_COLOR: ""OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"@@ -32,13 +38,19 @@ info:WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"WORKTRUNK_TEST_NUSHELL_ENV: "0"WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"---success: truediff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_failure.snapdeleted file mode 100644index cb617e51c..000000000--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_failure.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/user_hooks.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mfail[22m & [1mok[22m, … (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snapdeleted file mode 100644index 94f575e69..000000000--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/user_hooks.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: …, [1mbg[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_hook_name_per_step.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_hook_name_per_step.snapdeleted file mode 100644index a1979f6a4..000000000--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_hook_name_per_step.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/user_hooks.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: [1mstep_one[22m, [1mstep_two[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snapdeleted file mode 100644index 32509201f..000000000--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/user_hooks.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: …, [1mdb[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_ordering.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_ordering.snapdeleted file mode 100644index 94f575e69..000000000--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_ordering.snap+++ /dev/null@@ -1,52 +0,0 @@-----source: tests/integration_tests/user_hooks.rs-info:- program: wt- args:- - switch- - "--create"- - feature- env:- APPDATA: "[TEST_CONFIG_HOME]"- CLICOLOR_FORCE: "1"- COLUMNS: "500"- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"- GIT_CONFIG_SYSTEM: /dev/null- GIT_EDITOR: ""- GIT_TERMINAL_PROMPT: "0"- HOME: "[TEST_HOME]"- LANG: C- LC_ALL: C- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"- NO_COLOR: ""- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"- PATH: "[PATH]"- PSModulePath: ""- RUST_LOG: warn- SHELL: ""- TERM: alacritty- USERPROFILE: "[TEST_HOME]"- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"- WORKTRUNK_TEST_EPOCH: "1735776000"- WORKTRUNK_TEST_NUSHELL_ENV: "0"- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"- WORKTRUNK_TEST_POWERSHELL_ENV: "0"- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"-----success: true-exit_code: 0------ stdout ------------ stderr ------[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m-[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m-[33m▲[39m [33mCannot change directory — shell integration not installed[39m-[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m-[36m◎[39m [36mRunning post-start: …, [1mbg[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_create_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_create_executes.snapnew file mode 100644index 000000000..9ef513c56--- /dev/null+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_create_executes.snap@@ -0,0 +1,65 @@+---+source: tests/integration_tests/user_hooks.rs+info:+ program: wt+ args:+ - switch+ - "--create"+ - feature+ env:+ APPDATA: "[TEST_CONFIG_HOME]"+ CLICOLOR_FORCE: "1"+ COLUMNS: "500"+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"+ GIT_COMMON_DIR: ""+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"+ GIT_CONFIG_SYSTEM: /dev/null+ GIT_DIR: ""+ GIT_EDITOR: ""+ GIT_INDEX_FILE: ""+ GIT_OBJECT_DIRECTORY: ""+ GIT_TERMINAL_PROMPT: "0"+ GIT_WORK_TREE: ""+ HOME: "[TEST_HOME]"+ LANG: C+ LC_ALL: C+ LLVM_PROFILE_FILE: "[LLVM_PROFILE_FILE]"+ MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"+ NO_COLOR: ""+ OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"+ PATH: "[PATH]"+ PSModulePath: ""+ RUST_LOG: warn+ SHELL: ""+ TERM: alacritty+ USERPROFILE: "[TEST_HOME]"+ WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"+ WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"+ WORKTRUNK_TEST_BASH_INSTALLED: "0"+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"+ WORKTRUNK_TEST_CODEX_INSTALLED: "0"+ WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"+ WORKTRUNK_TEST_EPOCH: "1735776000"+ WORKTRUNK_TEST_FISH_INSTALLED: "0"+ WORKTRUNK_TEST_GEMINI_INSTALLED: "0"+ WORKTRUNK_TEST_NUSHELL_ENV: "0"+ WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"+ WORKTRUNK_TEST_POWERSHELL_ENV: "0"+ WORKTRUNK_TEST_POWERSHELL_INSTALLED: "0"+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"+ WORKTRUNK_TEST_ZSH_INSTALLED: "0"+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"+---+success: true+exit_code: 0+----- stdout -----++----- stderr -----+[36m◎[39m [36mRunning pre-create [1muser:log[22m @ [1m_REPO_.feature[22m[39m+[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'USER_PRE_CREATE_RAN'[0m[2m [0m[2m[36m>[0m[2m user_hook_marker.txt+[0m[32m✓[39m [32mCreated branch [1mfeature[22m from [1mmain[22m and worktree @ [1m_REPO_.feature[22m[39m+[2m↳[22m [2mTo customize worktree locations, run [4mwt config create[24m[22m+[33m▲[39m [33mCannot change directory — shell integration not installed[39m+[2m↳[22m [2mTo enable automatic cd, run [4mwt config shell install[24m[22m