Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
revert(hooks): keep docs on pre-start/post-start; code accepts both (#2857)
Worktrunk Botec62580c2929
diff --git a/.claude/skills/writing-user-outputs/SKILL.md b/.claude/skills/writing-user-outputs/SKILL.mdindex a1f25871b..623404b99 100644--- a/.claude/skills/writing-user-outputs/SKILL.md+++ b/.claude/skills/writing-user-outputs/SKILL.md@@ -214,7 +214,7 @@ 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-create, post-switch, post-create, post-merge (after removal).+ Examples: pre-start, post-switch, post-start, post-merge (after removal).```rust// Pre-hooks: user is at cwd, no cd happensdiff --git a/.config/wt.toml b/.config/wt.tomlindex ed77b0f57..03f4cb941 100644--- a/.config/wt.toml+++ b/.config/wt.toml@@ -1,5 +1,3 @@-# 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 c7c596fcc..cf5ab40e1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,7 +4,7 @@### 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).+- **`pre-create`/`post-create` accepted as aliases for the worktree-creation hooks**: `pre-create` and `post-create` now load as silent aliases for the canonical `pre-start`/`post-start` hooks, in config (top-level, `[hooks.*]`, and per-project sections, in string, table, and array-of-tables form) and on the `wt hook` command line. The fatal load error for pre-0.32.0 `post-create` configs is removed — `post-create` is now valid TOML and loads as the background creation hook (formerly named `post-start`). The semantic flip to watch: before v0.32.0 `post-create` named a _blocking_ creation hook; 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. Docs continue to recommend `pre-start`/`post-start` while users update; the canonical form may switch in a later release. Full plan: [#2838](https://github.com/max-sixty/worktrunk/issues/2838).### Fixeddiff --git a/CLAUDE.md b/CLAUDE.mdindex 9e70be71e..d733186a3 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -123,7 +123,7 @@ Why: wt installs a `signal_hook` SIGINT/SIGTERM handler so it can forward signal**Why:** the gate is the only thing between `git clone && wt switch` and a `post-switch` hook running `curl … | sh`. A "we already validated the operation, so run the hooks too" shortcut turns every command that touches project config into remote code execution.-**Implementation:** the operation-driven hooks (`pre-merge`, `post-merge`, `pre-remove`, `post-remove`, `post-switch`, `pre-create`, `post-create`) are gated *before* a state mutation and run *after* it, so a second config read could select an unapproved command. `src/commands/hook_plan.rs` closes this structurally: each gate (`wt remove` / `wt merge` / `wt step prune` / `wt switch`) selects the command set once into an immutable `ApprovedHookPlan` (`HookPlan::approve`); the executor consumes only that value via `execute_planned_hook` / `register_planned` and holds no `ProjectConfig` to re-derive from, so re-selection is a compile error, not a review check. An empty plan (`--no-hooks`, declined, or no project config) runs nothing. The adjacent hooks with no gate→exec mutation (`pre-commit`, `post-commit`, `pre-switch`, `wt hook <type>`, aliases) still resolve config at invocation via `execute_hook` / `HookAnnouncer::register`. See `src/commands/hook_plan.rs` and the `commands::hooks` module spec.+**Implementation:** the operation-driven hooks (`pre-merge`, `post-merge`, `pre-remove`, `post-remove`, `post-switch`, `pre-start`, `post-start`) are gated *before* a state mutation and run *after* it, so a second config read could select an unapproved command. `src/commands/hook_plan.rs` closes this structurally: each gate (`wt remove` / `wt merge` / `wt step prune` / `wt switch`) selects the command set once into an immutable `ApprovedHookPlan` (`HookPlan::approve`); the executor consumes only that value via `execute_planned_hook` / `register_planned` and holds no `ProjectConfig` to re-derive from, so re-selection is a compile error, not a review check. An empty plan (`--no-hooks`, declined, or no project config) runs nothing. The adjacent hooks with no gate→exec mutation (`pre-commit`, `post-commit`, `pre-switch`, `wt hook <type>`, aliases) still resolve config at invocation via `execute_hook` / `HookAnnouncer::register`. See `src/commands/hook_plan.rs` and the `commands::hooks` module spec.## Hook Output Logsdiff --git a/README.md b/README.mdindex 50a5a728b..bf46ed70a 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-create 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-start 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 3522833a2..6ca84620a 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-create.env = "cp .env.example .env"+# pre-start.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-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` 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-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:## # Single command# [projects."github.com/user/repo"]-# post-create = "mise trust"+# post-start = "mise trust"## # Multiple commands, running concurrently-# [projects."github.com/user/repo".post-create]+# [projects."github.com/user/repo".post-start]# mise = "mise trust"# server = "npm run dev"## # Pipeline: steps run in sequence-# [[projects."github.com/user/repo".post-create]]+# [[projects."github.com/user/repo".post-start]]# install = "npm ci"#-# [[projects."github.com/user/repo".post-create]]+# [[projects."github.com/user/repo".post-start]]# build = "npm run build"# server = "npm run dev"#diff --git a/dev/wt.example.toml b/dev/wt.example.tomlindex 43a3cecc6..4091239b7 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-create = "npm ci"-# post-create = "npm run dev"+# pre-start = "npm ci"+# post-start = "npm run dev"# pre-merge = "npm test"## ## Dev server URLdiff --git a/docs/CLAUDE.md b/docs/CLAUDE.mdindex ada3062b3..bbafffe88 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-create hook. Find the port with `wt list statusline`.+The docs dev server starts automatically via the post-start 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 8f3011213..26a91666c 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-create, pre-merge, pre-commit)+- Adding project hooks (pre-start, pre-merge, pre-commit)- Configuring worktree path templates- Fixing shell integration issuesdiff --git a/docs/content/config.md b/docs/content/config.mdindex 33e6d6254..0d769e9d7 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-create]+[pre-start]deps = "npm ci"[pre-merge]@@ -269,28 +269,28 @@ worktree-path = ".worktrees/{{ branch | sanitize }}"list.full = truemerge.squash = falseremove.delete-branch = false-pre-create.env = "cp .env.example .env"+pre-start.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-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` 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-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:```toml# Single command[projects."github.com/user/repo"]-post-create = "mise trust"+post-start = "mise trust"# Multiple commands, running concurrently-[projects."github.com/user/repo".post-create]+[projects."github.com/user/repo".post-start]mise = "mise trust"server = "npm run dev"# Pipeline: steps run in sequence-[[projects."github.com/user/repo".post-create]]+[[projects."github.com/user/repo".post-start]]install = "npm ci"-[[projects."github.com/user/repo".post-create]]+[[projects."github.com/user/repo".post-start]]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-create = "npm ci"-post-create = "npm run dev"+pre-start = "npm ci"+post-start = "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-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`.+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`.#### 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-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'") }}+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'") }}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-create]+[post-start]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-create]+[post-start]dev = "npm start -- --port {{ vars.config.port }}"```diff --git a/docs/content/extending.md b/docs/content/extending.mdindex 53889a3a6..2f13ede53 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-create` | `post-create` |+| **start** | `pre-start` | `post-start` || **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-create]+[pre-start]deps = "npm ci"-[post-create]+[post-start]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-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 `/`.+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 `/`.## Custom subcommandsdiff --git a/docs/content/faq.md b/docs/content/faq.mdindex 905e6d15d..289ae98d5 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-create <b>install</b>:+<span class="d">○</span> pre-start <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-create <b>build</b>:+<span class="d">○</span> pre-start <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-create <b>env</b>:+<span class="d">○</span> pre-start <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 990643d2f..0f23aef7c 100644--- a/docs/content/hook.md+++ b/docs/content/hook.md@@ -18,23 +18,21 @@ Hooks are shell commands that run at key points in the worktree lifecycle — au| Event | `pre-` — blocking | `post-` — background ||-------|-------------------|---------------------|| **switch** | `pre-switch` | `post-switch` |-| **create** | `pre-create` | `post-create` |+| **create** | `pre-start` | `post-start` || **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 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.+The most common creation hook 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.| 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-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-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-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 |@@ -51,11 +49,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-create <b>install</b>:+<span class="d">○</span> pre-start <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-create <b>build</b>:+<span class="d">○</span> pre-start <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-create <b>env</b>:+<span class="d">○</span> pre-start <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>@@ -80,13 +78,13 @@ Hooks take one of three forms, determined by their TOML shape.A string is a single command:```toml-pre-create = "npm install"+pre-start = "npm install"```A table is multiple commands that run concurrently:```toml-[post-create]+[post-start]server = "npm run dev"watch = "npm run watch"```@@ -94,10 +92,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-create]]+[[post-start]]install = "npm ci"-[[post-create]]+[[post-start]]build = "npm run build"server = "npm run dev"```@@ -145,7 +143,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-create`, `pre-merge`) |+| | `{{ hook_type }}` | Hook type being run (e.g. `pre-start`, `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) |@@ -159,12 +157,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-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.+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.-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:+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:```toml-[pre-create]+[pre-start]# 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 %}"```@@ -174,7 +172,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-create]+[post-start]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.config.port | default('3000') }}"```@@ -223,7 +221,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-create]+[post-start]dev = "npm run dev -- --host {{ branch }}.localhost --port {{ branch | hash_port }}"```@@ -247,7 +245,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-create]+[pre-start]# Copy config from main worktreesetup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_path }}"```@@ -257,8 +255,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-create]-setup = "python3 scripts/pre-create-setup.py"+[pre-start]+setup = "python3 scripts/pre-start-setup.py"``````python@@ -273,7 +271,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-create]+[post-start]copy = "wt step copy-ignored"```@@ -281,7 +279,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-create --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-start --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.@@ -304,8 +302,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-create") %}-◎ Running post-create: project @ ~/acme+{% terminal(cmd="wt hook post-start") %}+◎ Running post-start: project @ ~/acme{% end %}## Passing values@@ -318,16 +316,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-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+- [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- [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-create/post-create hooks on `--create`+- [`wt switch`](@/switch.md) — Runs pre-start/post-start 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@@ -342,8 +340,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-create</span></b> Run pre-create hooks- <b><span class=c>post-create</span></b> Run post-create 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-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 1e657a8a7..e7567dee0 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-create]+[post-start]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-create` hook so the copy runs in the background. Use `pre-create` instead if subsequent hooks or `--execute` command need the copied files immediately.+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.### 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-create]+[pre-start]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-create` hook to start a long-lived process and a `pre-remove` hook to+A `post-start` 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-create]+[post-start]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"```diff --git a/docs/content/switch.md b/docs/content/switch.mdindex ca0a3ce08..129987b78 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-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+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{{ 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 0949d058c..6ce19f077 100644--- a/docs/content/tips-patterns.md+++ b/docs/content/tips-patterns.md@@ -50,7 +50,7 @@ Each worktree runs its own dev server on a deterministic port. The `hash_port` f```toml# .config/wt.toml-[post-create]+[post-start]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"[list]@@ -83,7 +83,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-create]]+[[post-start]]set-vars = """wt config state vars set \container='{{ repo }}-{{ branch | sanitize }}-postgres' \@@ -91,7 +91,7 @@ wt config state vars set \db_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'"""-[[post-create]]+[[post-start]]db = """docker run -d --rm \--name {{ vars.container }} \@@ -118,21 +118,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-create]+[post-start]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-create]]` 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-start]]` pipeline:```toml-[[post-create]]+[[post-start]]copy = "wt step copy-ignored"-[[post-create]]+[[post-start]]install = "pnpm install"```-Use `pre-create` instead when an `--execute` command needs the copied files immediately.+Use `pre-start` 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.@@ -211,7 +211,7 @@ Worktrunk maintains useful state. Default branch [detection](@/config.md#wt-confReference Taskfile/Justfile/Makefile in hooks:```toml-[pre-create]+[pre-start]"setup" = "task install"[pre-merge]@@ -287,7 +287,7 @@ Each worktree gets its own tmux session with a multi-pane layout.```toml# .config/wt.toml-[pre-create]+[pre-start]tmux = """S={{ branch | sanitize }}W={{ worktree_path }}@@ -330,7 +330,7 @@ Each worktree gets its own [cmux](https://cmux.com) workspace. Switching worktre[switch]cd = false-[pre-create]+[pre-start]cmux = "cmux new-workspace --name {{ repo | sanitize }}/{{ branch | sanitize }} --cwd {{ worktree_path }} --focus true"[pre-switch]@@ -381,7 +381,7 @@ Clean URLs like `http://feature-auth.myproject.localhost` without port numbers.```toml# .config/wt.toml-[post-create]+[post-start]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"proxy = """curl -sf --max-time 0.5 http://localhost:2019/config/ || caddy start@@ -402,7 +402,7 @@ url = "http://{{ branch | sanitize }}.{{ repo }}.localhost:8080"**How it works:**-1. `wt switch --create feature-auth` runs the `post-create` hook, starting the dev server on a deterministic port (`{{ branch | hash_port }}` → 16460)+1. `wt switch --create feature-auth` runs the `post-start` 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@@ -411,9 +411,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-create:server)__WT_QUOT__") }}+{{ terminal(cmd="tail -f __WT_QUOT__$(wt config state logs get --hook=user:post-start:server)__WT_QUOT__") }}-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.+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.Create an alias for frequent use:diff --git a/docs/content/worktrunk.md b/docs/content/worktrunk.mdindex afe332496..3ddd4134c 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-create 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-start hooks](@/hook.md#hook-types) to automate setup (install deps, start dev servers).## Next stepsdiff --git a/docs/demos/snapshots/wt-core.snap b/docs/demos/snapshots/wt-core.snapindex 6df1b3e19..6b8410665 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-create: project:dev+◎ Running post-start: 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 b4271a12b..b21bd876c 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-create+# 3. Create new worktree with post-startType "wt switch --create api"EnterSleep 2.5sdiff --git a/docs/demos/tapes/wt-devserver.tape b/docs/demos/tapes/wt-devserver.tapeindex 35b73abe5..11e4abd6d 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-create hooks + URL template+# Show the config: post-start hooks + URL templateType "cat .config/wt.toml"EnterSleep 2sdiff --git a/docs/demos/tapes/wt-hooks.tape b/docs/demos/tapes/wt-hooks.tapeindex 51990e270..8caa88bda 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-create deps+dev, pre-remove cleanup)+# Show the hooks config (3 hooks: post-start deps+dev, pre-remove cleanup)Type "cat .config/wt.toml"EnterSleep 3s-# Create a new worktree - shows post-create hook running+# Create a new worktree - shows post-start hook runningType "wt switch --create feature"EnterSleep 3sdiff --git a/docs/demos/tapes/wt-switch.tape b/docs/demos/tapes/wt-switch.tapeindex fb1eb9ca8..07108aa60 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-create hooks)+# Create new worktree (runs post-start 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 986b0ac30..76951c324 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-create hooks)+# - wt switch --create (with post-start 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-create hooks running+# wt switch --create - shows post-start 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 3185c3578..1c8805189 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-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.",+ "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.","url": "./worktrunk/SKILL.md",- "digest": "sha256:b929448a3425ceb32eae20b433e512e8498f54cf04a1f571c8c1ae79b17412db"+ "digest": "sha256:1723b48a5a3a8a0a1b314dfadc96eed03aa5382ce7b572b62fd8a6248a543e82"}]}diff --git a/flake.nix b/flake.nixindex 3ec28ed28..4c7d7c380 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-create fixtures, `ps`+ # `python3` for argv-quoting and post-start 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 ff8ad9ebb..98937bbeb 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-create, pre-merge), and worktree path customization+1. **Configuration skill** — Guides LLM-powered commit message setup, project hooks (pre-start, 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-create hooks to run npm install automatically**+**Add pre-start 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 4be55ab7c..78a37ee7d 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-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.+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.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-create, pre-merge, etc.)+- **Contains**: Hooks for worktree lifecycle (pre-start, 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-create`+ - Dependencies (fast, must complete) → `pre-start`- Tests/linting (must pass) → `pre-commit` or `pre-merge`- - Long builds, dev servers → `post-create`+ - Long builds, dev servers → `post-start`- 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-create = "npm install"+ pre-start = "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-create`- - Creating worktree (background) → `post-create`+ - Creating worktree (blocking) → `pre-start`+ - Creating worktree (background) → `post-start`- 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-create = "npm install"+ pre-start = "npm install"# After (adding db:migrate)- [pre-create]+ [pre-start]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-create" reference/hook.md+grep -A 30 "### pre-start" reference/hook.mdgrep -A 20 "## Warning Messages" reference/shell-integration.md```@@ -299,7 +299,7 @@ zellij run -- wt switch --create fix-auth-bug -x 'opencode run' -- \### Parallel sub-Agents (single Claude Code session)-To spawn multiple sub-Agents that each work in their own worktree from one Claude Code session — no terminal multiplexer, no human in the other pane — pre-create each worktree from the parent and pass the path into the sub-Agent prompt:+To spawn multiple sub-Agents that each work in their own worktree from one Claude Code session — no terminal multiplexer, no human in the other pane — pre-start each worktree from the parent and pass the path into the sub-Agent prompt:```bashwt switch --create <branch> --no-cd --no-hooks@@ -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-create 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-start 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-create 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-start 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 1b0f68177..a8fe8cb15 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-create, pre-merge, pre-commit)+- Adding project hooks (pre-start, 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 af52e7096..74eaf8cda 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-create]+[pre-start]deps = "npm ci"[pre-merge]@@ -268,28 +268,28 @@ worktree-path = ".worktrees/{{ branch | sanitize }}"list.full = truemerge.squash = falseremove.delete-branch = false-pre-create.env = "cp .env.example .env"+pre-start.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-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` 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-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:```toml# Single command[projects."github.com/user/repo"]-post-create = "mise trust"+post-start = "mise trust"# Multiple commands, running concurrently-[projects."github.com/user/repo".post-create]+[projects."github.com/user/repo".post-start]mise = "mise trust"server = "npm run dev"# Pipeline: steps run in sequence-[[projects."github.com/user/repo".post-create]]+[[projects."github.com/user/repo".post-start]]install = "npm ci"-[[projects."github.com/user/repo".post-create]]+[[projects."github.com/user/repo".post-start]]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-create = "npm ci"-post-create = "npm run dev"+pre-start = "npm ci"+post-start = "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-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`.+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`.#### 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-create` `server` hook for the current branch):+Path to one hook log (e.g. the `post-start` `server` hook for the current branch):```bash-$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-create" and (.name | startswith("server"))) | .path'+$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-start" 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-create]+[post-start]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-create]+[post-start]dev = "npm start -- --port {{ vars.config.port }}"```diff --git a/skills/worktrunk/reference/extending.md b/skills/worktrunk/reference/extending.mdindex 1fce4afc6..73ed7618f 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-create` | `post-create` |+| **start** | `pre-start` | `post-start` || **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-create]+[pre-start]deps = "npm ci"-[post-create]+[post-start]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-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 `/`.+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 `/`.## Custom subcommandsdiff --git a/skills/worktrunk/reference/faq.md b/skills/worktrunk/reference/faq.mdindex 7037ddcc8..228856d52 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-create install:+○ pre-start install:npm ci-○ pre-create build:+○ pre-start build:cargo build --release-○ pre-create env:+○ pre-start 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 b2fa2aec7..cd73c98db 100644--- a/skills/worktrunk/reference/hook.md+++ b/skills/worktrunk/reference/hook.md@@ -9,23 +9,21 @@ Hooks are shell commands that run at key points in the worktree lifecycle — au| Event | `pre-` — blocking | `post-` — background ||-------|-------------------|---------------------|| **switch** | `pre-switch` | `post-switch` |-| **create** | `pre-create` | `post-create` |+| **create** | `pre-start` | `post-start` || **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 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.+The most common creation hook 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.| 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-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-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-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 |@@ -42,11 +40,11 @@ Project commands require approval on first run:```▲ repo needs approval to execute 3 commands:-○ pre-create install:+○ pre-start install:npm ci-○ pre-create build:+○ pre-start build:cargo build --release-○ pre-create env:+○ pre-start env:echo 'PORT={{ branch | hash_port }}' > .env.local❯ Allow and remember? [y/N]@@ -71,13 +69,13 @@ Hooks take one of three forms, determined by their TOML shape.A string is a single command:```toml-pre-create = "npm install"+pre-start = "npm install"```A table is multiple commands that run concurrently:```toml-[post-create]+[post-start]server = "npm run dev"watch = "npm run watch"```@@ -85,10 +83,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-create]]+[[post-start]]install = "npm ci"-[[post-create]]+[[post-start]]build = "npm run build"server = "npm run dev"```@@ -136,7 +134,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-create`, `pre-merge`) |+| | `{{ hook_type }}` | Hook type being run (e.g. `pre-start`, `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) |@@ -150,12 +148,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-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.+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.-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:+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:```toml-[pre-create]+[pre-start]# 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 %}"```@@ -165,7 +163,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-create]+[post-start]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.config.port | default('3000') }}"```@@ -214,7 +212,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-create]+[post-start]dev = "npm run dev -- --host {{ branch }}.localhost --port {{ branch | hash_port }}"```@@ -238,7 +236,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-create]+[pre-start]# Copy config from main worktreesetup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_path }}"```@@ -248,8 +246,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-create]-setup = "python3 scripts/pre-create-setup.py"+[pre-start]+setup = "python3 scripts/pre-start-setup.py"``````python@@ -264,7 +262,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-create]+[post-start]copy = "wt step copy-ignored"```@@ -280,7 +278,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-create --branch=feature/test # Override a template variable+$ wt hook pre-start --branch=feature/test # Override a template variable$ wt hook pre-merge -- --extra args # Forward tokens into {{ args }}```@@ -307,8 +305,8 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin``````bash-$ wt hook post-create-◎ Running post-create: project @ ~/acme+$ wt hook post-start+◎ Running post-start: project @ ~/acme```## Passing values@@ -321,9 +319,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-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+- [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- [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@@ -338,8 +336,8 @@ Commands:show Show configured hookspre-switch Run pre-switch hookspost-switch Run post-switch hooks- pre-create Run pre-create hooks- post-create Run post-create hooks+ pre-start Run pre-start hooks+ post-start Run post-start 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 9b87035f7..d945e5a83 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-create]+[post-start]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-create` hook so the copy runs in the background. Use `pre-create` instead if subsequent hooks or `--execute` command need the copied files immediately.+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.### 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-create]+[pre-start]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-create` hook to start a long-lived process and a `pre-remove` hook to+A `post-start` 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-create]+[post-start]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 e89196b6b..b8106691a 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-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+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```bash$ wt switch feature # Existing branch → creates worktreediff --git a/skills/worktrunk/reference/tips-patterns.md b/skills/worktrunk/reference/tips-patterns.mdindex 4f942a962..ed9433bb0 100644--- a/skills/worktrunk/reference/tips-patterns.md+++ b/skills/worktrunk/reference/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-create]+[post-start]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"[list]@@ -76,7 +76,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-create]]+[[post-start]]set-vars = """wt config state vars set \container='{{ repo }}-{{ branch | sanitize }}-postgres' \@@ -84,7 +84,7 @@ wt config state vars set \db_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'"""-[[post-create]]+[[post-start]]db = """docker run -d --rm \--name {{ vars.container }} \@@ -113,21 +113,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-create]+[post-start]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-create]]` 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-start]]` pipeline:```toml-[[post-create]]+[[post-start]]copy = "wt step copy-ignored"-[[post-create]]+[[post-start]]install = "pnpm install"```-Use `pre-create` instead when an `--execute` command needs the copied files immediately.+Use `pre-start` 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.@@ -216,7 +216,7 @@ git rebase $(wt config state default-branch)Reference Taskfile/Justfile/Makefile in hooks:```toml-[pre-create]+[pre-start]"setup" = "task install"[pre-merge]@@ -304,7 +304,7 @@ Each worktree gets its own tmux session with a multi-pane layout.```toml# .config/wt.toml-[pre-create]+[pre-start]tmux = """S={{ branch | sanitize }}W={{ worktree_path }}@@ -347,7 +347,7 @@ Each worktree gets its own [cmux](https://cmux.com) workspace. Switching worktre[switch]cd = false-[pre-create]+[pre-start]cmux = "cmux new-workspace --name {{ repo | sanitize }}/{{ branch | sanitize }} --cwd {{ worktree_path }} --focus true"[pre-switch]@@ -398,7 +398,7 @@ Clean URLs like `http://feature-auth.myproject.localhost` without port numbers.```toml# .config/wt.toml-[post-create]+[post-start]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"proxy = """curl -sf --max-time 0.5 http://localhost:2019/config/ || caddy start@@ -419,7 +419,7 @@ url = "http://{{ branch | sanitize }}.{{ repo }}.localhost:8080"**How it works:**-1. `wt switch --create feature-auth` runs the `post-create` hook, starting the dev server on a deterministic port (`{{ branch | hash_port }}` → 16460)+1. `wt switch --create feature-auth` runs the `post-start` 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@@ -429,10 +429,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-create:server)"+tail -f "$(wt config state logs get --hook=user:post-start:server)"```-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.+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.Create an alias for frequent use:diff --git a/skills/worktrunk/reference/troubleshooting.md b/skills/worktrunk/reference/troubleshooting.mdindex 325961c71..62d8f7e7d 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-create = "npm run build"+pre-start = "npm run build"# After — fast setup, build in background-pre-create = "npm install"-post-create = "npm run build"+pre-start = "npm install"+post-start = "npm run build"```## Listdiff --git a/skills/worktrunk/reference/worktrunk.md b/skills/worktrunk/reference/worktrunk.mdindex fa5bc0c72..2496b0800 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-create 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-start 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 05c2760e7..47aa7203c 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-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`.+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`.### 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-create` `server` hook for the current branch):+Path to one hook log (e.g. the `post-start` `server` hook for the current branch):```console-$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-create" and (.name | startswith("server"))) | .path'+$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-start" 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-create]+[post-start]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-create]+[post-start]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-create hook log for the current branch (use `jq` to filter):+Get the absolute path of one post-start 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-create" and (.name | startswith("server"))) | .path'+$ wt config state logs --format=json | jq -r '.hook_output[] | select(.source == "user" and .hook_type == "post-start" 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-create" 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-start" 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 e41f0e55d..500a4bb48 100644--- a/src/cli/hook.rs+++ b/src/cli/hook.rs@@ -48,15 +48,15 @@ use super::config::ApprovalsCommand;/// Canonical list of hook type names accepted after `wt hook`. Shared by/// [`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+/// is caught by tests rather than at runtime. `pre-create`/`post-create` are+/// silent aliases for `pre-start`/`post-start`: 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-create",- "post-create",+ "pre-start",+ "post-start","pre-commit","post-commit","pre-merge",@@ -66,16 +66,16 @@ pub const HOOK_TYPE_NAMES: &[&str] = &[];/// `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.+/// names from [`HOOK_TYPE_NAMES`], with `pre-create`/`post-create` attached as+/// hidden aliases. `wt hook show post-create` keeps working through the+/// transition without the alias 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"),+ "pre-start" => PossibleValue::new(name).alias("pre-create"),+ "post-start" => PossibleValue::new(name).alias("post-create"),_ => PossibleValue::new(name),}).collect()@@ -152,9 +152,9 @@ 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).///-/// `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.+/// `pre-create`/`post-create` are silent aliases for `pre-start`/`post-start`,+/// accepted here so scripted invocations using the future canonical names+/// keep working. They map silently — no warning.pub fn parse_hook_type(name: &str) -> anyhow::Result<HookType> {match name {"pre-switch" => Ok(HookType::PreSwitch),diff --git a/src/cli/mod.rs b/src/cli/mod.rsindex 20b4c82d5..e26a11422 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -549,8 +549,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-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+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```console$ wt switch feature # Existing branch → creates worktree@@ -1206,23 +1206,21 @@ $ wt step push| Event | `pre-` — blocking | `post-` — background ||-------|-------------------|---------------------|| **switch** | `pre-switch` | `post-switch` |-| **create** | `pre-create` | `post-create` |+| **create** | `pre-start` | `post-start` || **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 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.+The most common creation hook 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.| 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-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-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-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 |@@ -1239,11 +1237,11 @@ Project commands require approval on first run:```▲ repo needs approval to execute 3 commands:-○ pre-create install:+○ pre-start install:npm ci-○ pre-create build:+○ pre-start build:cargo build --release-○ pre-create env:+○ pre-start env:echo 'PORT={{ branch | hash_port }}' > .env.local❯ Allow and remember? [y/N]@@ -1268,13 +1266,13 @@ Hooks take one of three forms, determined by their TOML shape.A string is a single command:```toml-pre-create = "npm install"+pre-start = "npm install"```A table is multiple commands that run concurrently:```toml-[post-create]+[post-start]server = "npm run dev"watch = "npm run watch"```@@ -1282,10 +1280,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-create]]+[[post-start]]install = "npm ci"-[[post-create]]+[[post-start]]build = "npm run build"server = "npm run dev"```@@ -1333,7 +1331,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-create`, `pre-merge`) |+| | `{{ hook_type }}` | Hook type being run (e.g. `pre-start`, `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) |@@ -1347,12 +1345,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-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.+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.-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:+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:```toml-[pre-create]+[pre-start]# 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 %}"```@@ -1362,7 +1360,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-create]+[post-start]dev = "ENV={{ vars.env | default('development') }} npm start -- --port {{ vars.config.port | default('3000') }}"```@@ -1411,7 +1409,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-create]+[post-start]dev = "npm run dev -- --host {{ branch }}.localhost --port {{ branch | hash_port }}"```@@ -1435,7 +1433,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-create]+[pre-start]# Copy config from main worktreesetup = "cp {{ worktree_path_of_branch('main') }}/config.local {{ worktree_path }}"```@@ -1445,8 +1443,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-create]-setup = "python3 scripts/pre-create-setup.py"+[pre-start]+setup = "python3 scripts/pre-start-setup.py"``````python@@ -1461,7 +1459,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-create]+[post-start]copy = "wt step copy-ignored"```@@ -1477,7 +1475,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-create --branch=feature/test # Override a template variable+$ wt hook pre-start --branch=feature/test # Override a template variable$ wt hook pre-merge -- --extra args # Forward tokens into {{ args }}```@@ -1505,8 +1503,8 @@ test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fin``````console-$ wt hook post-create-◎ Running post-create: project @ ~/acme+$ wt hook post-start+◎ Running post-start: project @ ~/acme```## Passing values@@ -1519,16 +1517,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-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+- [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- [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-create/post-create hooks on `--create`+- [`wt switch`](@/switch.md) — Runs pre-start/post-start 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"#@@ -1590,7 +1588,7 @@ command = "CLAUDECODE= MAX_THINKING_TOKENS=0 claude -p --no-session-persistence```toml# .config/wt.toml-[pre-create]+[pre-start]deps = "npm ci"[pre-merge]@@ -1807,28 +1805,28 @@ worktree-path = ".worktrees/{{ branch | sanitize }}"list.full = truemerge.squash = falseremove.delete-branch = false-pre-create.env = "cp .env.example .env"+pre-start.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-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` 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-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` table the same way:```toml# Single command[projects."github.com/user/repo"]-post-create = "mise trust"+post-start = "mise trust"# Multiple commands, running concurrently-[projects."github.com/user/repo".post-create]+[projects."github.com/user/repo".post-start]mise = "mise trust"server = "npm run dev"# Pipeline: steps run in sequence-[[projects."github.com/user/repo".post-create]]+[[projects."github.com/user/repo".post-start]]install = "npm ci"-[[projects."github.com/user/repo".post-create]]+[[projects."github.com/user/repo".post-start]]build = "npm run build"server = "npm run dev"```@@ -1973,8 +1971,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-create = "npm ci"-post-create = "npm run dev"+pre-start = "npm ci"+post-start = "npm run dev"pre-merge = "npm test"```diff --git a/src/cli/step.rs b/src/cli/step.rsindex cf2983185..ff64926ac 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-create]+[post-start]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-create` hook so the copy runs in the background. Use `pre-create` instead if subsequent hooks or `--execute` command need the copied files immediately.+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.## 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-create]+[pre-start]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-create` hook to start a long-lived process and a `pre-remove` hook to+A `post-start` 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-create]+[post-start]server = "wt step tether -- npm run dev -- --port {{ branch | hash_port }}"```diff --git a/src/command_log.rs b/src/command_log.rsindex 04ea714ca..8a25e4406 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-create user:server",+ "label": "post-start user:server","cmd": "npm run dev","exit": null,"dur_ms": null,diff --git a/src/commands/config/state.rs b/src/commands/config/state.rsindex 51f816704..a6e2208e1 100644--- a/src/commands/config/state.rs+++ b/src/commands/config/state.rs@@ -371,7 +371,7 @@ struct HookStructure {branch: String,/// `"user"`, `"project"`, or `"internal"`.source: String,- /// Hook type (`post-create`, `post-switch`, …) for user/project hooks;+ /// Hook type (`post-start`, `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 1f8917c0e..e9b60fb1d 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-create:`) is a+//! by lookahead — `;` followed by a `<hook-type>:` (e.g. `post-start:`) 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-create = [+ // post-start = [// { 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 df87f80f1..1ed70bdd5 100644--- a/src/commands/hook_commands.rs+++ b/src/commands/hook_commands.rs@@ -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-create, post-switch):+/// in background (post-start, 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-create/post-switch)+/// - `Some(false)` = run in background (default for post-start/post-switch)pub fn run_hook(hook_type: HookType,yes: bool,diff --git a/src/commands/hook_plan.rs b/src/commands/hook_plan.rsindex 67080ec08..4abe48ce8 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-create`, `post-create`) are gated *before*+//! `post-remove`, `post-switch`, `pre-start`, `post-start`) 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-create`. The+/// Replaces `execute_hook` for `pre-merge` / `pre-remove` / `pre-start`. 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-create`) from the approved plan onto `announcer`.+/// `post-switch` / `post-start`) 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 bdc114799..0702de687 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-create`, `post-create`. A+//! `pre-remove`, `post-remove`, `post-switch`, `pre-start`, `post-start`. 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-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` |+//! | `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` |//!//! **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 03533eac3..1ddd48c96 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-create", Some("install"))` → `"Running post-create install"` (with bold)-/// - `format_command_label("post-create", None)` → `"Running post-create"`+/// - `format_command_label("post-start", Some("install"))` → `"Running post-start install"` (with bold)+/// - `format_command_label("post-start", None)` → `"Running post-start"`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-create", Some("install")), @"Running post-create [1minstall[22m");+ assert_snapshot!(format_command_label("post-start", Some("install")), @"Running post-start [1minstall[22m");assert_snapshot!(format_command_label("pre-merge", None), @"Running pre-merge");- assert_snapshot!(format_command_label("post-create", Some("build")), @"Running post-create [1mbuild[22m");+ assert_snapshot!(format_command_label("post-start", Some("build")), @"Running post-start [1mbuild[22m");assert_snapshot!(format_command_label("pre-commit", None), @"Running pre-commit");}}diff --git a/src/commands/process.rs b/src/commands/process.rsindex 3f4b19458..33a78b498 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-create/server.log`+/// - Example: `feature/user/post-start/server.log`////// Per-branch internal operations produce logs at: `{branch}/internal/{op}.log`/// - Example: `feature/internal/remove.log`@@ -986,20 +986,20 @@ mod tests {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-create/server.log"+ @"/repo/.git/wt/logs/main/user/post-start/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-create/server.log"+ @"/repo/.git/wt/logs/feature-auth-j34/user/post-start/server.log");// Project sourcelet 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-create/build.log"+ @"/repo/.git/wt/logs/main/project/pre-start/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 358b87d8a..a559556b8 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#"-pre-create = "npm install"+pre-start = "npm install"pre-merge = "cargo test""#;toml::from_str(toml_content).unwrap()@@ -151,7 +151,7 @@ pre-merge = "cargo test"#[test]fn test_collect_commands_for_hooks_named_commands() {let toml_content = r#"-[pre-create]+[pre-start]install = "npm install"build = "npm run build""#;diff --git a/src/commands/step/tether.rs b/src/commands/step/tether.rsindex 53c64445f..a9dfe994a 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-create hooks run with cwd at the worktree root; capture it now so+ // post-start 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 3aaec3594..9b9ac0954 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-create hooks, and PostRemoveContext+//! CommandContext implementations for pre-start hooks, and PostRemoveContext//! for building template variables for post-remove hooks.use std::path::Path;@@ -14,10 +14,10 @@ use crate::commands::command_executor::FailureStrategy;use crate::commands::hook_plan::{ApprovedHookPlan, execute_planned_hook};impl<'a> CommandContext<'a> {- /// Execute pre-create commands sequentially (blocking) from the frozen plan.+ /// Execute pre-start 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-create` under it from the+ /// worktree's path — the gate selected `pre-start` 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).diff --git a/src/commands/worktree/switch.rs b/src/commands/worktree/switch.rsindex 0586f3f06..934b99cf1 100644--- a/src/commands/worktree/switch.rs+++ b/src/commands/worktree/switch.rs@@ -1121,11 +1121,11 @@ pub fn execute_switch(// Compute base worktree path for hooks and result.//// `git worktree add` already mutated the worktree list, but `repo`- // cached it pre-create (populated by `plan_switch`). Reading+ // cached it pre-start (populated by `plan_switch`). Reading// `worktree_for_branch` through `repo` here would observe the stale- // pre-create inventory — see the caching contract in+ // pre-start inventory — see the caching contract in// `git/repository/mod.rs`. Probe through a fresh `Repository::at`- // so the lookup reflects the post-create state.+ // so the lookup reflects the post-start state.let base_worktree_path = base_branch.as_ref().and_then(|b| {@@ -1136,9 +1136,9 @@ pub fn execute_switch(}).map(|p| worktrunk::path::to_posix_path(&p.to_string_lossy()));- // PR/MR identity travels into both the pre-create hook below and the+ // PR/MR identity travels into both the pre-start hook below and the// SwitchResult — TemplateVars::for_post_switch then forwards it to- // background post-switch / post-create hooks.+ // background post-switch / post-start hooks.let (pr_number, pr_url) = match &method {CreationMethod::ForkRef {number, ref_url, ..@@ -1146,7 +1146,7 @@ pub fn execute_switch(CreationMethod::Regular { .. } => (None, None),};- // Execute pre-create commands. The hook resolves its `.config/wt.toml`+ // Execute pre-start commands. The hook resolves its `.config/wt.toml`// from the new worktree (created just above) — see// `hook_repo_for_worktree`.if run_hooks {@@ -1360,7 +1360,7 @@ pub(crate) fn run_pre_switch_hooks(/// Hook types that apply after a switch operation.///-/// Creates trigger pre-create + post-create + post-switch hooks;+/// Creates trigger pre-start + post-start + post-switch hooks;/// existing worktrees trigger only post-switch.fn switch_post_hook_types(is_create: bool) -> &'static [HookType] {if is_create {@@ -1404,7 +1404,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-create` on `<defaultRemote>/<branch>` could run unapproved+ // this, a `pre-start` 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")@@ -1415,8 +1415,8 @@ fn base_ref_for_create("HEAD".to_string()}-/// The `.config/wt.toml` that `wt switch`'s post-switch hooks (`pre-create` /-/// `post-create` / `post-switch`) will resolve against, viewed from *before*+/// The `.config/wt.toml` that `wt switch`'s post-switch hooks (`pre-start` /+/// `post-start` / `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@@ -1480,7 +1480,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-create` / `post-create` / `post-switch`) execute only from `plan`.+/// (`pre-start` / `post-start` / `post-switch`) execute only from `plan`.pub(crate) fn approve_switch_hooks(repo: &Repository,config: &UserConfig,@@ -1520,7 +1520,7 @@ pub(crate) fn approve_switch_hooks(}}-/// Spawn post-switch (and post-create for creates) background hooks.+/// Spawn post-switch (and post-start for creates) background hooks.pub(crate) fn spawn_switch_background_hooks(config: &UserConfig,result: &SwitchResult,@@ -1761,7 +1761,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-create: runs only when creating a NEW worktree+ // - post-start: runs only when creating a NEW worktree// Batch hooks into a single message when both types are presentif hooks_approved {spawn_switch_background_hooks(@@ -1775,7 +1775,7 @@ pub fn run_switch()?;}- // Execute user command after post-create hooks have been spawned+ // Execute user command after post-start 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)@@ -1866,7 +1866,7 @@ pub fn run_switch(/// Validates:/// - `--execute` command template (if present)/// - `--execute` trailing arg templates (if present)-/// - Hook templates (pre-create, post-create, post-switch) from user and project config+/// - Hook templates (pre-start, post-start, 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 589d4bfd5..84b6838f2 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-create",- "post-create",+ "pre-start",+ "post-start","pre-commit","post-commit","pre-merge",@@ -279,12 +279,12 @@ impl ValueCompleter for HookCommandCompleter {return Some(*hook);}}- // Deprecated aliases still complete, mapped to the canonical name.- if ctx.contains("pre-start") {- return Some("pre-create");+ // Silent aliases still complete, mapped to the canonical name.+ if ctx.contains("pre-create") {+ return Some("pre-start");}- if ctx.contains("post-start") {- return Some("post-create");+ if ctx.contains("post-create") {+ return Some("post-start");}None})diff --git a/src/config/commands.rs b/src/config/commands.rsindex a9b7488c8..2fe56d8f8 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-create <name>`).+//! (`wt hook post-start <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-create = "npm install"`-/// - Named table: `[post-create]` with `name = "command"` entries → one Concurrent step-/// - Pipeline: `post-create = ["cmd", { a = "cmd1", b = "cmd2" }]` → serial steps+/// - 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////// **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 9bcb6e20d..4ad33c7bc 100644--- a/src/config/deprecation.rs+++ b/src/config/deprecation.rs@@ -82,8 +82,7 @@ pub struct DeprecatedSection {}/// 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`).+/// renamed sections (`[commit-generation]` → `[commit.generation]`).////// 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@@ -105,16 +104,6 @@ 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.@@ -486,9 +475,9 @@ pub struct Deprecations {pub approved_commands: bool,/// Has `[select]` section (moved to `[switch.picker]`)pub select: bool,- /// Has a `pre-start` hook key (renamed to `pre-create`)+ /// Reserved for future hook-name deprecation tracking; always false.pub pre_start: bool,- /// Has a `post-start` hook key (renamed to `post-create`)+ /// Reserved for future hook-name deprecation tracking; always false.pub post_start: bool,/// Has `[ci]` section (moved to `[forge]`)pub ci_section: bool,@@ -544,8 +533,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),- pre_start: find_pre_start_from_doc(doc),- post_start: find_post_start_from_doc(doc),+ pre_start: false,+ post_start: false,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"),@@ -842,90 +831,6 @@ fn has_select_without_picker(table: &toml_edit::Table) -> bool {false}-/// 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;- }-- 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(new_key).is_none()- && project_table.get(old_key).is_some_and(is_non_empty_item)- {- return true;- }- }- }-- false-}--/// Check if a TOML item is non-empty (strings are always non-empty, tables must have entries).-fn is_non_empty_item(item: &toml_edit::Item) -> bool {- match item {- toml_edit::Item::Value(toml_edit::Value::InlineTable(t)) => !t.is_empty(),- toml_edit::Item::Table(t) => !t.is_empty(),- _ => true, // strings and other values are always "non-empty"- }-}--/// 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]`.////// Handles both top-level and project-level `[projects."...".select]` sections.@@ -983,7 +888,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-create",+ "pre-start","pre-commit","pre-merge","pre-remove",@@ -1276,9 +1181,12 @@ 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);+ // Silently rename `-create` hooks back to canonical `-start`. The+ // creation hook rename is paused (see #2838): both names load via+ // serde aliases, but in-memory migration to canonical keeps round-trip+ // analysis (`unknown_tree`) coherent for the table and array-of-tables+ // forms, where serde aliases on the field don't cover every shape.+ modified |= migrate_create_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");@@ -1287,6 +1195,46 @@ fn migrate_content_doc(doc: &mut toml_edit::DocumentMut) -> bool {modified}+/// Rename the `pre-create`/`post-create` hook keys to `pre-start`/`post-start`.+///+/// Silent — see [`migrate_content_doc`] and `format_deprecation_warnings`.+fn migrate_create_hooks_doc(doc: &mut toml_edit::DocumentMut) -> bool {+ let mut modified = rename_hook_key(doc, "pre-create", "pre-start");+ modified |= rename_hook_key(doc, "post-create", "post-start");+ 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+}+/// Check if a table has `timeout-ms` under `[switch.picker]`.////// `[switch.picker]` can be written either as a section (regular table) or@@ -2140,31 +2088,6 @@ mod tests {.is_some_and(|doc| find_select_from_doc(&doc))}- fn find_pre_start_deprecation(content: &str) -> bool {- content- .parse::<toml_edit::DocumentMut>()- .ok()- .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 {let Ok(mut doc) = content.parse::<toml_edit::DocumentMut>() else {return content.to_string();@@ -2210,7 +2133,7 @@ worktree-path = "../{{ repo }}.{{ branch | sanitize }}"#[test]fn test_find_deprecated_vars_repo_root() {let content = r#"-post-create = "ln -sf {{ repo_root }}/node_modules node_modules"+post-start = "ln -sf {{ repo_root }}/node_modules node_modules""#;let found = find_deprecated_vars(content);assert_eq!(found, vec![("repo_root", "repo_path")]);@@ -2219,7 +2142,7 @@ post-create = "ln -sf {{ repo_root }}/node_modules node_modules"#[test]fn test_find_deprecated_vars_worktree() {let content = r#"-post-create = "cd {{ worktree }} && npm install"+post-start = "cd {{ worktree }} && npm install""#;let found = find_deprecated_vars(content);assert_eq!(found, vec![("worktree", "worktree_path")]);@@ -2237,7 +2160,7 @@ worktree-path = "../{{ main_worktree }}.{{ branch | sanitize }}"#[test]fn test_find_deprecated_vars_main_worktree_path() {let content = r#"-post-create = "ln -sf {{ main_worktree_path }}/node_modules ."+post-start = "ln -sf {{ main_worktree_path }}/node_modules .""#;let found = find_deprecated_vars(content);assert_eq!(found, vec![("main_worktree_path", "primary_worktree_path")]);@@ -2247,7 +2170,7 @@ post-create = "ln -sf {{ main_worktree_path }}/node_modules ."fn test_find_deprecated_vars_multiple() {let content = r#"worktree-path = "../{{ main_worktree }}.{{ branch | sanitize }}"-post-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"+post-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules""#;let found = find_deprecated_vars(content);assert_eq!(@@ -2263,7 +2186,7 @@ post-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"#[test]fn test_find_deprecated_vars_with_filter() {let content = r#"-post-create = "ln -sf {{ repo_root | something }}/node_modules"+post-start = "ln -sf {{ repo_root | something }}/node_modules""#;let found = find_deprecated_vars(content);assert_eq!(found, vec![("repo_root", "repo_path")]);@@ -2272,7 +2195,7 @@ post-create = "ln -sf {{ repo_root | something }}/node_modules"#[test]fn test_find_deprecated_vars_deduplicates() {let content = r#"-post-create = "{{ repo_root }}/a {{ repo_root }}/b"+post-start = "{{ repo_root }}/a {{ repo_root }}/b""#;let found = find_deprecated_vars(content);assert_eq!(found, vec![("repo_root", "repo_path")]);@@ -2282,7 +2205,7 @@ post-create = "{{ repo_root }}/a {{ repo_root }}/b"fn test_find_deprecated_vars_does_not_match_suffix() {// Should NOT match "worktree_path" when looking for "worktree"let content = r#"-post-create = "cd {{ worktree_path }} && npm install"+post-start = "cd {{ worktree_path }} && npm install""#;let found = find_deprecated_vars(content);assert!(@@ -2311,8 +2234,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-create = "echo \"{{ repo_root }}\""- let content = r#"pre-create = "echo \"{{ repo_root }}\"""#;+ // Source TOML: pre-start = "echo \"{{ repo_root }}\""+ let content = r#"pre-start = "echo \"{{ repo_root }}\"""#;let result = replace_deprecated_vars(content);assert!(!result.contains("repo_root"),@@ -2327,7 +2250,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-create = \"echo \\\"{{ repo_root }}\\\"\"\n";+ let content = "pre-start = \"echo \\\"{{ repo_root }}\\\"\"\n";let migrated = compute_migrated_content(content);assert!(!migrated.contains("repo_root"),@@ -2354,14 +2277,14 @@ post-create = "cd {{ worktree_path }} && npm install"fn test_replace_deprecated_vars_multiple() {let content = r#"worktree-path = "../{{ main_worktree }}.{{ branch | sanitize }}"-post-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"+post-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules""#;let result = replace_deprecated_vars(content);assert_eq!(result,r#"worktree-path = "../{{ repo }}.{{ branch | sanitize }}"-post-create = "ln -sf {{ repo_path }}/node_modules {{ worktree_path }}/node_modules"+post-start = "ln -sf {{ repo_path }}/node_modules {{ worktree_path }}/node_modules""#);}@@ -2373,7 +2296,7 @@ post-create = "ln -sf {{ repo_path }}/node_modules {{ worktree_path }}/node_moduworktree-path = "../{{ repo }}.{{ branch }}"[hooks]-post-create = "echo hello"+post-start = "echo hello""#;let result = replace_deprecated_vars(content);assert_eq!(result, content); // No changes since no deprecated vars@@ -2427,7 +2350,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-create = \"echo {{ repo_path }}\"\n";+ let content = "pre-start = \"echo {{ repo_path }}\"\n";assert_eq!(compute_migrated_content(content), content);}@@ -3972,127 +3895,6 @@ pager = "delta --paging=never");}- // --- pre-start/post-start → pre-create/post-create rename tests ----- #[test]- fn test_find_start_hook_deprecation_none() {- // Canonical `-create` keys: no deprecation.- let content = r#"-pre-create = "npm install"-post-create = "npm run dev"-"#;- assert!(!find_pre_start_deprecation(content));- assert!(!find_post_start_deprecation(content));- }-- #[test]- 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_start_hook_deprecation_project_level() {- // User config format: hooks flattened into [projects."..."]- let content = r#"-[projects."my-project"]-pre-start = "npm install"-"#;- assert!(find_pre_start_deprecation(content));- }-- #[test]- fn test_find_start_hook_deprecation_named_commands() {- // Named command table form- let content = r#"-[pre-start]-lint = "npm run lint"-build = "npm run build"-"#;- 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_start_hook_deprecation_skips_when_create_exists_top_level() {- // Both present at top level — the migrator leaves the old key alone.- let content = r#"-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_start_deprecation(content));- }-- #[test]- fn test_migrate_start_hooks_top_level() {- let content = r#"-pre-start = "npm install"--[post-start]-server = "npm run dev"-"#;- 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_migrate_start_hooks_project_level() {- let content = r#"-[projects."my-project"]-pre-start = "npm install"-"#;- 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 {let Ok(mut doc) = content.parse::<toml_edit::DocumentMut>() else {return content.to_string();@@ -4226,17 +4028,6 @@ pager = "delta");}- #[test]- 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());- }-// ==================== negated bool format + migration tests ====================#[test]@@ -4502,7 +4293,7 @@ ff = truea = "1"b = "2"-[pre-create]+[pre-start]a = "1"b = "2"@@ -4523,7 +4314,7 @@ b = "2"found,vec!["pre-switch",- "pre-create",+ "pre-start","pre-commit","pre-merge","pre-remove"@@ -4535,12 +4326,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-create]+[projects."github.com/user/repo".pre-start]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-create"]);+ assert_eq!(found, vec!["projects.\"github.com/user/repo\".pre-start"]);}#[test]@@ -4610,14 +4401,14 @@ third = "3"#[test]fn test_migrate_pre_hook_table_form_per_project() {let content = r#"-[projects."web".pre-create]+[projects."web".pre-start]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-create"]+ let arr = project["pre-start"].as_array_of_tables().expect("should be array of tables");assert_eq!(arr.len(), 2);@@ -4650,11 +4441,11 @@ no-ff = truetest = "cargo test"lint = "cargo clippy"-[post-create]+[post-start]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.+ // post-start 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 40fa9d54d..33123c9e9 100644--- a/src/config/expansion.rs+++ b/src/config/expansion.rs@@ -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-create` hook.+/// `{{ target }}` in a `pre-start` hook.////// This is deliberately more permissive than real expansion: conditional vars/// like `upstream` are provided even when they may be absent at runtime. A@@ -2663,7 +2663,7 @@ mod tests {err.message);- // `base` is available in pre-create.+ // `base` is available in pre-start.assert!(validate_template("{{ base }}",@@ -2700,7 +2700,7 @@ mod tests {);assert!(err.message.contains("targte"), "got: {}", err.message);- // `pr_number`/`pr_url` are available in pre-create (populated when+ // `pr_number`/`pr_url` are available in pre-start (populated when// creating via `pr:N` / `mr:N`).for var in ["pr_number", "pr_url"] {assert!(@@ -2711,7 +2711,7 @@ mod tests {"test").is_ok(),- "{var} should validate in pre-create scope"+ "{var} should validate in pre-start scope");}diff --git a/src/config/hooks.rs b/src/config/hooks.rsindex e88539c48..44ed7a04e 100644--- a/src/config/hooks.rs+++ b/src/config/hooks.rs@@ -27,7 +27,8 @@ pub struct HooksConfig {/// Commands to execute before worktree creation (blocking)#[serde(default,- rename = "pre-create",+ rename = "pre-start",+ alias = "pre-create",skip_serializing_if = "Option::is_none")]pub pre_create: Option<CommandConfig>,@@ -35,7 +36,8 @@ pub struct HooksConfig {/// Commands to execute after worktree creation (background)#[serde(default,- rename = "post-create",+ rename = "post-start",+ alias = "post-create",skip_serializing_if = "Option::is_none")]pub post_create: Option<CommandConfig>,diff --git a/src/config/mod.rs b/src/config/mod.rsindex d49d24869..61b44d874 100644--- a/src/config/mod.rs+++ b/src/config/mod.rs@@ -298,7 +298,7 @@ mod tests {#[test]fn test_command_config_single() {- let toml = r#"post-create = "npm install""#;+ let toml = r#"post-start = "npm install""#;let config: ProjectConfig = toml::from_str(toml).unwrap();let cmd_config = config.hooks.post_create.unwrap();let commands: Vec<_> = cmd_config.commands().collect();@@ -309,7 +309,7 @@ mod tests {#[test]fn test_command_config_named() {let toml = r#"- [post-create]+ [post-start]server = "npm run dev"watch = "npm run watch""#;@@ -363,7 +363,7 @@ mod tests {fn test_command_config_task_order() {// Test exact ordering as used in post_create testslet toml = r#"-[post-create]+[post-start]task1 = "echo 'Task 1 running' > task1.txt"task2 = "echo 'Task 2 running' > task2.txt""#;@@ -427,18 +427,18 @@ task2 = "echo 'Task 2 running' > task2.txt"#[test]fn test_command_config_roundtrip_single() {- let original = r#"post-create = "npm install""#;+ let original = r#"post-start = "npm install""#;let config: ProjectConfig = toml::from_str(original).unwrap();let serialized = toml::to_string(&config).unwrap();let config2: ProjectConfig = toml::from_str(&serialized).unwrap();assert_eq!(config, config2);- assert_snapshot!(serialized, @r#"post-create = "npm install""#);+ assert_snapshot!(serialized, @r#"post-start = "npm install""#);}#[test]fn test_command_config_roundtrip_named() {let original = r#"- [post-create]+ [post-start]server = "npm run dev"watch = "npm run watch""#;@@ -447,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-create]+ [post-start]server = "npm run dev"watch = "npm run watch""#);@@ -677,7 +677,7 @@ squash-template-file = "~/file.txt"let toml_str = r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-[post-create]+[post-start]log = "echo '{{ repo }}' >> ~/.log"[pre-merge]@@ -686,11 +686,11 @@ lint = "cargo clippy""#;let config: UserConfig = toml::from_str(toml_str).unwrap();- // Check post-create+ // Check post-startlet post_create = config.hooks.post_create- .expect("post-create should be present");+ .expect("post-start should be present");let commands: Vec<_> = post_create.commands().collect();assert_eq!(commands.len(), 1);assert_eq!(commands[0].name.as_deref(), Some("log"));@@ -707,14 +707,14 @@ lint = "cargo clippy"fn test_user_hooks_config_single_command() {let toml_str = r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-post-create = "npm install"+post-start = "npm install""#;let config: UserConfig = toml::from_str(toml_str).unwrap();let post_create = config.hooks.post_create- .expect("post-create should be present");+ .expect("post-start should be present");let commands: Vec<_> = post_create.commands().collect();assert_eq!(commands.len(), 1);assert!(commands[0].name.is_none()); // single command has no name@@ -725,7 +725,7 @@ post-create = "npm install"fn test_user_hooks_not_reported_as_unknown() {let toml_str = r#"worktree-path = "../test"-post-create = "npm install"+post-start = "npm install"[pre-merge]test = "cargo test"diff --git a/src/config/project.rs b/src/config/project.rsindex d905bea82..1b1198f42 100644--- a/src/config/project.rs+++ b/src/config/project.rs@@ -311,17 +311,26 @@ impl ProjectConfig {////// This includes keys from ProjectConfig and HooksConfig (flattened)./// Public for use by the `WorktrunkConfig` trait implementation.+///+/// `pre-create`/`post-create` are appended as silent serde aliases for the+/// canonical `pre-start`/`post-start` hook keys (see `HooksConfig` in+/// `src/config/hooks.rs`). The schema only knows canonical names from+/// `#[serde(rename = ...)]`; adding the aliases here keeps the unknown-key+/// round-trip from flagging an accepted name as unknown.pub fn valid_project_config_keys() -> Vec<String> {use schemars::SchemaGenerator;let schema = SchemaGenerator::default().into_root_schema_for::<ProjectConfig>();- schema+ let mut keys: Vec<String> = schema.as_object().and_then(|obj| obj.get("properties")).and_then(|p| p.as_object()).map(|props| props.keys().cloned().collect())- .unwrap_or_default()+ .unwrap_or_default();+ keys.push("pre-create".to_string());+ keys.push("post-create".to_string());+ keys}#[cfg(test)]@@ -333,8 +342,8 @@ mod tests {let contents = r#"pre-switch = "echo switching"post-switch = "rename-tab"-pre-create = "npm install"-post-create = "npm run watch"+pre-start = "npm install"+post-start = "npm run watch"pre-commit = "cargo fmt --check"post-commit = "echo committed"pre-merge = "cargo test"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 4ec82e1ee..a3342f01e 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-create]+ [post-start]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.snapdeleted file mode 100644index a02646256..000000000--- a/src/config/snapshots/worktrunk__config__deprecation__tests__snapshot_migrate_start_to_create.snap+++ /dev/null@@ -1,10 +0,0 @@-----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/schema.rs b/src/config/user/schema.rsindex 096cd0d65..d4327c049 100644--- a/src/config/user/schema.rs+++ b/src/config/user/schema.rs@@ -12,15 +12,24 @@ use super::UserConfig;////// This includes keys from UserConfig and HooksConfig (flattened)./// Public for use by the `WorktrunkConfig` trait implementation.+///+/// `pre-create`/`post-create` are appended as silent serde aliases for the+/// canonical `pre-start`/`post-start` hook keys (see `HooksConfig` in+/// `src/config/hooks.rs`). The schema only knows canonical names from+/// `#[serde(rename = ...)]`; adding the aliases here keeps the unknown-key+/// round-trip from flagging an accepted name as unknown.pub fn valid_user_config_keys() -> Vec<String> {let schema = SchemaGenerator::default().into_root_schema_for::<UserConfig>();// Extract property names from the schema// The schema flattens nested structs, so all top-level keys appear in properties- schema+ let mut keys: Vec<String> = schema.as_object().and_then(|obj| obj.get("properties")).and_then(|p| p.as_object()).map(|props| props.keys().cloned().collect())- .unwrap_or_default()+ .unwrap_or_default();+ keys.push("pre-create".to_string());+ keys.push("post-create".to_string());+ keys}diff --git a/src/config/user/tests.rs b/src/config/user/tests.rsindex b0c74f672..a9088696e 100644--- a/src/config/user/tests.rs+++ b/src/config/user/tests.rs@@ -83,7 +83,7 @@ squash = true[step.copy-ignored]exclude = [".conductor/"]-[post-create]+[post-start]run = "npm install"[post-switch]@@ -1880,17 +1880,17 @@ fn parse_hooks(toml_str: &str) -> HooksConfig {#[test]fn test_hooks_merge_append_semantics() {- // Global has post-create, per-project has post-create+ // Global has post-start, per-project has post-start// Both should run (global first, then per-project)let mut config = UserConfig {- hooks: parse_hooks("post-create = \"echo global\""),+ hooks: parse_hooks("post-start = \"echo global\""),..Default::default()};config.projects.insert("github.com/user/repo".to_string(),UserProjectOverrides {- hooks: parse_hooks("post-create = \"echo project\""),+ hooks: parse_hooks("post-start = \"echo project\""),..Default::default()},);@@ -1907,7 +1907,7 @@ 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-create = \"echo global\""),+ hooks: parse_hooks("post-start = \"echo global\""),..Default::default()};@@ -1926,7 +1926,7 @@ fn test_hooks_project_only_no_global() {config.projects.insert("github.com/user/repo".to_string(),UserProjectOverrides {- hooks: parse_hooks("post-create = \"echo project\""),+ hooks: parse_hooks("post-start = \"echo project\""),..Default::default()},);@@ -1940,10 +1940,10 @@ fn test_hooks_project_only_no_global() {#[test]fn test_hooks_different_hook_types_not_merged() {- // Global has post-create, per-project has pre-commit+ // Global has post-start, per-project has pre-commit// These should remain separate (different hook types)let mut config = UserConfig {- hooks: parse_hooks("post-create = \"echo global-start\""),+ hooks: parse_hooks("post-start = \"echo global-start\""),..Default::default()};@@ -1957,7 +1957,7 @@ fn test_hooks_different_hook_types_not_merged() {let effective = config.hooks(Some("github.com/user/repo"));- // post-create: only global+ // post-start: only globallet post_create = effective.post_create.unwrap();let start_commands: Vec<_> = post_create.commands().collect();assert_eq!(start_commands.len(), 1);@@ -1974,7 +1974,7 @@ 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-create = \"echo global\""),+ hooks: parse_hooks("post-start = \"echo global\""),..Default::default()};@@ -1997,7 +1997,7 @@ fn test_valid_user_config_keys_includes_all_hook_types() {let valid_keys = valid_user_config_keys();for hook_type in HookType::iter() {- let key = hook_type.to_string(); // e.g., "post-create", "pre-merge"+ let key = hook_type.to_string(); // e.g., "post-start", "pre-merge"assert!(valid_keys.contains(&key),"HookType::{hook_type:?} ({key}) is missing from valid_user_config_keys()"@@ -2021,6 +2021,9 @@ fn test_valid_user_config_keys_all_deserialize() {for key in &valid_keys {match key.as_str() {"projects" => continue, // Skip - table type tested separately+ // Silent aliases for canonical `pre-start`/`post-start`; including+ // both would produce a duplicate-field error.+ "pre-create" | "post-create" => continue,"skip-shell-integration-prompt" | "skip-commit-generation-prompt" => {scalar_lines.push(format!("{key} = true"));}@@ -2064,12 +2067,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-create = "npm install""#);+ let global_hooks = parse_hooks(r#"post-start = "npm install""#);// Per-project uses table format (named commands)let project_hooks = parse_hooks(r#"-[post-create]+[post-start]setup = "echo setup""#,);@@ -2101,14 +2104,14 @@ fn test_hooks_merge_same_names_both_run() {// Both define "test" command - both should executelet global_hooks = parse_hooks(r#"-[post-create]+[post-start]test = "cargo test""#,);let project_hooks = parse_hooks(r#"-[post-create]+[post-start]test = "npm test""#,);@@ -2277,14 +2280,14 @@ fn test_hooks_merge_trait_appends_for_global_project_merge() {#[test]fn test_hooks_merge_post_create_both_sides() {- // `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\"");+ // `post-start` from global and per-project config combine (global first).+ let global = parse_hooks("post-start = \"npm install\"");+ let project = parse_hooks("post-start = \"cargo build\"");let merged = global.merge_with(&project);let post_create = merged.get(HookType::PostCreate)- .expect("should have post-create");+ .expect("should have post-start");let commands: Vec<_> = post_create.commands().collect();assert_eq!(commands.len(), 2);assert_eq!(commands[0].template, "npm install");@@ -3020,12 +3023,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-create = { build = \"cargo build\" }\n").unwrap();+ std::fs::write(&config_path, "post-start = { 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-create = { build = \"cargo test\" }").unwrap();+ config.hooks = toml::from_str("post-start = { build = \"cargo test\" }").unwrap();config.save_to(&config_path).unwrap();let saved = std::fs::read_to_string(&config_path).unwrap();@@ -3238,12 +3241,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-create = { ... }`),+ // When a user writes a hook as an inline table (e.g., `post-start = { ... }`),// 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-create = { build = \"cargo build\" }\n";+ let original = "post-start = { build = \"cargo build\" }\n";std::fs::write(&config_path, original).unwrap();// Load the config (which parses hooks via flatten), then save it back@@ -3251,13 +3254,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-create])+ // The inline table syntax should be preserved (not expanded to [post-start])assert!(- saved.contains("post-create = { build = \"cargo build\" }"),+ saved.contains("post-start = { build = \"cargo build\" }"),"inline table should be preserved: {saved}");assert!(- !saved.contains("[post-create]"),+ !saved.contains("[post-start]"),"should not be expanded to standard table: {saved}");}diff --git a/src/git/error.rs b/src/git/error.rsindex 38a6b34f6..9e2151f75 100644--- a/src/git/error.rs+++ b/src/git/error.rs@@ -1460,7 +1460,7 @@ impl ErrorExt for anyhow::Error {/// user's intent:/// - `wt merge` — user wants to merge, hooks run as part of that/// - `wt commit` — user wants to commit, pre-commit hooks run-/// - `wt switch --create` — user wants a worktree, post-create hooks run+/// - `wt switch --create` — user wants a worktree, post-start hooks run////// ## When NOT to use///@@ -1905,7 +1905,7 @@ mod tests {error: "setup failed".into(),exit_code: None,};- assert_snapshot!(err.render(), @"[31m✗[39m [31mpre-create command failed: setup failed[39m");+ assert_snapshot!(err.render(), @"[31m✗[39m [31mpre-start 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 40f2631f2..ab77aab8b 100644--- a/src/git/mod.rs+++ b/src/git/mod.rs@@ -469,7 +469,17 @@ pub fn branch_tracks_ref(pub enum HookType {PreSwitch,PostSwitch,+ // Canonical display is `pre-start`/`post-start`; `pre-create`/`post-create`+ // are accepted as silent aliases via `FromStr`. The Rust variant name uses+ // the future canonical (`-create`) so the eventual flip is a Display-only+ // change.+ #[strum(to_string = "pre-start", serialize = "pre-create")]+ #[serde(rename = "pre-start", alias = "pre-create")]+ #[cfg_attr(feature = "cli", value(name = "pre-start", alias = "pre-create"))]PreCreate,+ #[strum(to_string = "post-start", serialize = "post-create")]+ #[serde(rename = "post-start", alias = "post-create")]+ #[cfg_attr(feature = "cli", value(name = "post-start", alias = "post-create"))]PostCreate,PreCommit,PostCommit,diff --git a/src/git/repository/config.rs b/src/git/repository/config.rsindex 236431314..4679898ed 100644--- a/src/git/repository/config.rs+++ b/src/git/repository/config.rs@@ -670,7 +670,7 @@ 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-create = "echo hi""#);+ test.write_project_config(r#"post-start = "echo hi""#);test.run_git(&["add", ".config/wt.toml"]);test.run_git(&["commit", "-m", "Add config"]);let cfg = repo@@ -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-create = "echo hi""#);+ test.write_project_config(r#"post-start = "echo hi""#);test.run_git(&["add", ".config/wt.toml"]);test.run_git(&["commit", "-m", "Add config"]);diff --git a/src/help.rs b/src/help.rsindex 5938e3dde..ad6b67e2e 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-create install:\n\+ ○ pre-start install:\n\\x20\x20\x20npm ci\n\- ○ pre-create build:\n\+ ○ pre-start build:\n\\x20\x20\x20cargo build --release\n\- ○ pre-create env:\n\+ ○ pre-start 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-create <b>install</b>:\n\+ <span class=\"d\">○</span> pre-start <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-create <b>build</b>:\n\+ <span class=\"d\">○</span> pre-start <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-create <b>env</b>:\n\+ <span class=\"d\">○</span> pre-start <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/styling/mod.rs b/src/styling/mod.rsindex d9908c552..4002bc288 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-create command from user config that exposed the bug.+ // This is the actual post-start 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/src/testing/mod.rs b/src/testing/mod.rsindex 100889370..a0999f719 100644--- a/src/testing/mod.rs+++ b/src/testing/mod.rs@@ -851,7 +851,7 @@ impl TestRepo {/// - Remote (origin) bare repository/// - Three feature worktrees (feature-a, feature-b, feature-c) each with one commit///- /// Uses a pre-created fixture for fast initialization - copies the fixture+ /// Uses a pre-started fixture for fast initialization - copies the fixture/// from `tests/fixtures/standard/` instead of running git commands.////// Also sets up mock gh/glab commands that appear authenticated to preventdiff --git a/tests/common/mod.rs b/tests/common/mod.rsindex e3949967f..3adc17fa0 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-create-NAME-SHA-HHMMSS.log+ // Match: post-start-NAME-SHA-HHMMSS.logsettings.add_filter(- r"post-create-[^-]+-[0-9a-f]{7,40}-\d{6}\.log",- "post-create-[NAME]-[TIMESTAMP].log",+ r"post-start-[^-]+-[0-9a-f]{7,40}-\d{6}\.log",+ "post-start-[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 676a2072f..0090f9b54 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-create = "echo 'test command'""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'test command'""#);+ repo.write_project_config(r#"pre-start = "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-create = [+ r#"pre-start = [{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-create = "echo 'test command'""#);+ repo.write_project_config(r#"pre-start = "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-create = [+ r#"pre-start = [{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-create = [+ r#"pre-start = [{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-create = [+ r#"pre-start = [{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-create" which indicates execution+ // Check for "Running pre-start" which indicates executionassert!(- !output.contains("Running pre-create"),+ !output.contains("Running pre-start"),"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-create = "echo 'test command'"+ r#"pre-start = "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-create = "echo 'test command'""#);+ repo.write_project_config(r#"pre-start = "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 c157fb7bf..39d3d4fa9 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-create = "echo 'Worktree path: {{ worktree_path }}'""#);+ repo.write_project_config(r#"pre-start = "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-create]+ r#"[pre-start]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-create]+ r#"[pre-start]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-create = "echo 'test command' > output.txt""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'approved' > output.txt""#);+ repo.write_project_config(r#"pre-start = "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-create]+ r#"[pre-start]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-create]+ r#"[pre-start]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-create = "echo 'test command'""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'test command'""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'test command'""#);+ repo.write_project_config(r#"pre-start = "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 d77f260ab..72576e50d 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-create = "echo 'test'""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'test'""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'test'""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'test'""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'first'"-post-create = "echo 'second'"+pre-start = "echo 'first'"+post-start = "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-create = "echo 'test'""#);+ repo.write_project_config(r#"pre-start = "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-create = "echo 'hello'"+ r#"pre-start = "echo 'hello'""#,).unwrap();diff --git a/tests/integration_tests/bare_repository.rs b/tests/integration_tests/bare_repository.rsindex 931b0abad..4b5d30fd2 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-create = \"echo hook-executed > '{}'\"\n", marker_str),+ format!("post-start = \"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-create = \"echo hook-executed > '{}'\"\n", marker_str),+ format!("post-start = \"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-create = \"echo bad > '{}'\"\n", marker_str),+ format!("post-start = \"echo bad > '{}'\"\n", marker_str),).unwrap();diff --git a/tests/integration_tests/completion.rs b/tests/integration_tests/completion.rsindex fe0347b7d..d30f491a6 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-create"), "Missing pre-create");- assert!(subcommands.contains(&"post-create"), "Missing post-create");+ assert!(subcommands.contains(&"pre-start"), "Missing pre-start");+ assert!(subcommands.contains(&"post-start"), "Missing post-start");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-create"));+ assert!(subcommands.contains(&"post-start"));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 15ff50d8d..75cc620d3 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-create]]+ r#"[[project.pre-start]]run = "echo hello""#,)diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rsindex 445d35fd6..34ec72fef 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-create = "npm install"+ r#"pre-start = "npm install"-[post-create]+[post-start]server = "npm run dev""#,)@@ -364,7 +364,7 @@ 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`+/// `ProjectConfig::load` migrates the keys to `pre-start`/`post-start`/// 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.@@ -385,9 +385,9 @@ deps = "post-start-tool"// 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"),+ ("pre-start", "pre-start-tool"),+ ("post-start", "post-start-tool"),("post-start", "post-start-tool"),];for (type_arg, expected) in cases {@@ -663,7 +663,7 @@ pager = "delta --paging=never"let mut cmd = repo.wt_command();cmd.env("WORKTRUNK_SYSTEM_CONFIG_PATH", &system_config_path).env("NO_COLOR", "1");- cmd.args(["hook", "show", "post-create"])+ cmd.args(["hook", "show", "post-start"]).current_dir(repo.root_path());let output = cmd.output().unwrap();@@ -680,7 +680,7 @@ pager = "delta --paging=never"let stdout = String::from_utf8_lossy(&output.stdout);assert!(stdout.contains("npm install"),- "post-start in system config should migrate to post-create and stay active, got: {stdout}"+ "post-start in system config should migrate to post-start and stay active, got: {stdout}");}@@ -1862,7 +1862,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-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"+pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules""#,).unwrap();@@ -1908,7 +1908,7 @@ fn test_deprecated_template_variables_verbose_shows_content(repo: TestRepo, tempfs::write(config_path,r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"+pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules""#,).unwrap();@@ -1980,7 +1980,7 @@ fn test_fixing_deprecated_config_then_reintroducing_still_warns(fs::write(&project_config_path,- r#"pre-create = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-start = "ln -sf {{ main_worktree }}/node_modules""#,).unwrap();@@ -1993,7 +1993,7 @@ fn test_fixing_deprecated_config_then_reintroducing_still_warns(fs::write(&project_config_path,- r#"pre-create = "ln -sf {{ repo }}/node_modules"+ r#"pre-start = "ln -sf {{ repo }}/node_modules""#,).unwrap();@@ -2012,7 +2012,7 @@ fn test_fixing_deprecated_config_then_reintroducing_still_warns(fs::write(&project_config_path,- r#"pre-create = "cd {{ worktree }} && npm install"+ r#"pre-start = "cd {{ worktree }} && npm install""#,).unwrap();@@ -2949,7 +2949,7 @@ fn test_config_show_displays_deprecation_details(mut repo: TestRepo, temp_home:fs::write(&config_path,r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-create = "ln -sf {{ repo_root }}/node_modules"+pre-start = "ln -sf {{ repo_root }}/node_modules""#,).unwrap();@@ -2990,7 +2990,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-create = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-start = "ln -sf {{ main_worktree }}/node_modules""#,).unwrap();@@ -3135,7 +3135,7 @@ approved-commands = ["npm install", "npm test"]#[rstest]fn test_config_update_applies_project_config_migration(repo: TestRepo) {repo.write_project_config(- r#"pre-create = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-start = "ln -sf {{ main_worktree }}/node_modules""#,);repo.commit("Add deprecated project config");@@ -3153,7 +3153,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-create"));+ assert!(updated.contains("pre-start"));assert!(updated.contains("{{ repo }}"));assert!(!updated.contains("main_worktree"));}@@ -3164,7 +3164,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-create = "echo ready"+ r#"pre-start = "echo ready""#,);repo.commit("Add clean project config");@@ -3188,7 +3188,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-create = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-start = "ln -sf {{ main_worktree }}/node_modules""#,);repo.commit("Add deprecated project config");@@ -3235,7 +3235,7 @@ fn test_config_update_print_emits_both_configs(repo: TestRepo) {).unwrap();repo.write_project_config(- r#"pre-create = "ln -sf {{ main_worktree }}/node_modules"+ r#"pre-start = "ln -sf {{ main_worktree }}/node_modules""#,);repo.commit("Add deprecated project config");@@ -3250,7 +3250,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-create"));+ assert!(stdout.contains("pre-start"));}/// `wt config update --print` on a clean config exits silently with empty@@ -3344,7 +3344,7 @@ fn test_config_update_applies_template_var_migration(repo: TestRepo) {fs::write(config_path,r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"-pre-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"+pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules""#,).unwrap();@@ -3398,7 +3398,7 @@ fn test_config_show_displays_pre_hook_table_form_deprecation(test = "cargo test"lint = "cargo clippy"-[pre-create]+[pre-start]install = "npm ci"env = "cp .env.example .env""#,@@ -4578,12 +4578,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-create = \"in-repo-hook\"\n").unwrap();+ fs::write(&in_repo_config, "pre-start = \"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-create = \"override-hook\"\n").unwrap();+ fs::write(&override_path, "pre-start = \"override-hook\"\n").unwrap();let mut cmd = wt_command();repo.configure_wt_cmd(&mut cmd);@@ -4602,7 +4602,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-create"], "override-hook",+ json["project"]["config"]["pre-start"], "override-hook","expected override config to be loaded, got: {}",json["project"]);diff --git a/tests/integration_tests/config_state.rs b/tests/integration_tests/config_state.rsindex b11750a08..c0ff4ca33 100644--- a/tests/integration_tests/config_state.rs+++ b/tests/integration_tests/config_state.rs@@ -684,7 +684,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-create", "npm"),+ &hook_log_rel_path("feature", "user", "post-start", "npm"),"npm output here",);// >= 1024 bytes to exercise the `{}K` size-formatting branch in@@ -709,10 +709,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-create/npm.log <SIZE> <AGE>+ File Size Age+ ─────────────────────────────── ──── ──────+ bugfix/internal/remove.log <SIZE> <AGE>+ feature/user/post-start/npm.log <SIZE> <AGE>[36mDIAGNOSTIC[39m @ <PATH>[107m [0m (none)@@ -823,7 +823,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-create", "npm"),+ &hook_log_rel_path("feature", "user", "post-start", "npm"),"npm output",);write_log_at(@@ -848,7 +848,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-create-npm.log"), "old layout").unwrap();+ std::fs::write(log_dir.join("feature-post-start-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();@@ -1163,7 +1163,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-create", "npm"),+ &hook_log_rel_path("feature", "user", "post-start", "npm"),"npm output",);write_log_at(@@ -1336,7 +1336,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-create", "npm"),+ &hook_log_rel_path("feature", "user", "post-start", "npm"),"npm output",);write_log_at(@@ -1392,11 +1392,11 @@ fn test_state_get_json_with_logs(repo: TestRepo) {},{"branch": "feature",- "file": "feature/user/post-create/npm.log",- "hook_type": "post-create",+ "file": "feature/user/post-start/npm.log",+ "hook_type": "post-start","modified_at": "<MTIME>","name": "npm",- "path": "_REPO_/.git/wt/logs/feature/user/post-create/npm.log",+ "path": "_REPO_/.git/wt/logs/feature/user/post-start/npm.log","size": "<SIZE>","source": "user"}@@ -2108,7 +2108,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-create", "server"),+ &hook_log_rel_path("main", "user", "post-start", "server"),"output",);diff --git a/tests/integration_tests/config_update_pty.rs b/tests/integration_tests/config_update_pty.rsindex ae98b8608..26a0680fb 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-create = "ln -sf {{ repo_root }}/node_modules"+pre-start = "ln -sf {{ repo_root }}/node_modules""#,).unwrap();@@ -60,7 +60,7 @@ pre-create = "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-create = "ln -sf {{ repo_root }}/node_modules"+pre-start = "ln -sf {{ repo_root }}/node_modules""#;fs::write(config_path, original_content).unwrap();diff --git a/tests/integration_tests/e2e_shell_post_create.rs b/tests/integration_tests/e2e_shell_post_start.rssimilarity index 90%rename from tests/integration_tests/e2e_shell_post_create.rsrename to tests/integration_tests/e2e_shell_post_start.rsindex c7e4fc600..51c86a1ac 100644--- a/tests/integration_tests/e2e_shell_post_create.rs+++ b/tests/integration_tests/e2e_shell_post_start.rs@@ -13,17 +13,17 @@ use std::fs;// Test with bash and fish#[case("bash")]#[case("fish")]-fn test_shell_integration_post_create_background(#[case] shell: &str, repo: TestRepo) {+fn test_shell_integration_post_start_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-create = "sleep 0.05 && echo 'Background task done' > bg_marker.txt""#,+ r#"post-start = "sleep 0.05 && echo 'Background task done' > bg_marker.txt""#,).unwrap();- repo.commit("Add post-create config");+ repo.commit("Add post-start 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_create_parallel(repo: TestRepo) {+fn test_bash_shell_integration_post_start_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-create]+ r#"[post-start]task1 = "sleep 0.05 && echo 'Task 1' > task1.txt"task2 = "sleep 0.05 && echo 'Task 2' > task2.txt""#,).unwrap();- repo.commit("Add multiple post-create commands");+ repo.commit("Add multiple post-start commands");// Pre-approve commandsrepo.write_test_approvals(@@ -157,17 +157,17 @@ approved-commands = [}#[rstest]-fn test_bash_shell_integration_post_create_blocks(repo: TestRepo) {+fn test_bash_shell_integration_post_start_blocks(repo: TestRepo) {// Create project config with blocking commandlet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"pre-create = "echo 'Setup done' > setup.txt""#,+ r#"pre-start = "echo 'Setup done' > setup.txt""#,).unwrap();- repo.commit("Add pre-create command");+ repo.commit("Add pre-start command");// Pre-approve commandrepo.write_test_approvals(@@ -203,12 +203,12 @@ approved-commands = ["echo 'Setup done' > setup.txt"]output);- // Verify that pre-create command completed before wt returned (blocking behavior)+ // Verify that pre-start 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-create is blocking)"+ "Setup file should exist immediately after wt returns (pre-start 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_create_background(repo: TestRepo) {+fn test_fish_shell_integration_post_start_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-create]+ r#"[post-start]fish_bg = "sleep 0.05 && echo 'Fish background done' > fish_bg.txt""#,)diff --git a/tests/integration_tests/help.rs b/tests/integration_tests/help.rsindex ec6d818d6..eef5e66a0 100644--- a/tests/integration_tests/help.rs+++ b/tests/integration_tests/help.rs@@ -280,11 +280,7 @@ 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_create",- "pre-create",- "wt hook pre-create"-)]+#[case("nested_subcommand_hook_pre_start", "pre-start", "wt hook pre-start")]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 c9bc603fc..0f45806cb 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-create]+[post-start]deps = "npm install""#,);@@ -88,7 +88,7 @@ fn setup_all_hook_types(repo: &TestRepo, temp_home: &TempDir) {{test = "cargo test"},]-[post-create]+[post-start]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-create]+[post-start]global-hook = "echo global"-[projects.'{project_id_str}'.post-create]+[projects.'{project_id_str}'.post-start]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-create hooks, so using it in pre-commit+/// The `base` variable is only defined for pre-start 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-create hooks)+ // Create project config with `base` variable (only defined for pre-start 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-create]+[post-start]deps = "npm install""#,);@@ -474,7 +474,7 @@ deps = "npm install"assert_eq!(entries.len(),3,- "user pre-commit + project pre-merge + project post-create"+ "user pre-commit + project pre-merge + project post-start");// 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-create]+[post-start]user-greet = "echo hi""#,)@@ -520,7 +520,7 @@ user-greet = "echo hi"r#"[pre-commit]project-fmt = "echo fmt {{ branch }}"-[post-create]+[post-start]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-create hooks from both user and project.+ // Filter dropped the post-start 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 972173c0a..2a48a287a 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-create]+ r#"[post-start]server = "npm run dev -- --port {{ branch | hash_port }} &"[list]diff --git a/tests/integration_tests/merge.rs b/tests/integration_tests/merge.rsindex 12d20b891..f1935ab87 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_create and test_readme_example_hooks_pre_merge+// NOTE: test_readme_example_hooks_pre_start 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.diff --git a/tests/integration_tests/mod.rs b/tests/integration_tests/mod.rsindex 13ca94d28..50cfb46f3 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_create;+pub mod e2e_shell_post_start;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_create_commands;+pub mod post_start_commands;pub mod push;pub mod readme_sync;pub mod remove;diff --git a/tests/integration_tests/post_create_commands.rs b/tests/integration_tests/post_start_commands.rssimilarity index 84%rename from tests/integration_tests/post_create_commands.rsrename to tests/integration_tests/post_start_commands.rsindex 0e812384e..a9322d6a3 100644--- a/tests/integration_tests/post_create_commands.rs+++ b/tests/integration_tests/post_start_commands.rs@@ -37,15 +37,15 @@ fn snapshot_switch(test_name: &str, repo: &TestRepo, args: &[&str]) {// ============================================================================#[rstest]-fn test_post_create_no_config(repo: TestRepo) {+fn test_post_start_no_config(repo: TestRepo) {// Switch without project config should work normally- snapshot_switch("post_create_no_config", &repo, &["--create", "feature"]);+ snapshot_switch("post_start_no_config", &repo, &["--create", "feature"]);}#[rstest]-fn test_post_create_single_command(repo: TestRepo) {+fn test_post_start_single_command(repo: TestRepo) {// Create project config with a single command (string format)- repo.write_project_config(r#"pre-create = "echo 'Setup complete'""#);+ repo.write_project_config(r#"pre-start = "echo 'Setup complete'""#);repo.commit("Add config");@@ -57,15 +57,11 @@ approved-commands = ["echo 'Setup complete'"]);// Command should execute without prompting- snapshot_switch(- "post_create_single_command",- &repo,- &["--create", "feature"],- );+ snapshot_switch("post_start_single_command", &repo, &["--create", "feature"]);}/// 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+/// the key is silently migrated to `pre-start`. 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) {@@ -90,7 +86,7 @@ approved-commands = ["echo ran > marker.txt"]String::from_utf8_lossy(&output.stderr));- // The hook ran — the `pre-start` key was migrated to `pre-create`.+ // The hook ran — the `pre-start` key was migrated to `pre-start`.let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");assert!(worktree_path.join("marker.txt").exists(),@@ -107,10 +103,10 @@ approved-commands = ["echo ran > marker.txt"]}#[rstest]-fn test_post_create_named_commands(repo: TestRepo) {+fn test_post_start_named_commands(repo: TestRepo) {// Create project config with named commands (table format)repo.write_project_config(- r#"[pre-create]+ r#"[pre-start]install = "echo 'Installing deps'"setup = "echo 'Running setup'""#,@@ -129,17 +125,13 @@ approved-commands = [);// Commands should execute sequentially- snapshot_switch(- "post_create_named_commands",- &repo,- &["--create", "feature"],- );+ snapshot_switch("post_start_named_commands", &repo, &["--create", "feature"]);}#[rstest]-fn test_post_create_failing_command(repo: TestRepo) {+fn test_post_start_failing_command(repo: TestRepo) {// Create project config with a command that will fail- repo.write_project_config(r#"pre-create = "exit 1""#);+ repo.write_project_config(r#"pre-start = "exit 1""#);repo.commit("Add config with failing command");@@ -150,19 +142,19 @@ approved-commands = ["exit 1"]"#,);- // Failing pre-create hook (via deprecated pre-create name) aborts with FailFast+ // Failing pre-start hook (via deprecated pre-start name) aborts with FailFastsnapshot_switch(- "post_create_failing_command",+ "post_start_failing_command",&repo,&["--create", "feature"],);}#[rstest]-fn test_post_create_template_expansion(repo: TestRepo) {+fn test_post_start_template_expansion(repo: TestRepo) {// Create project config with template variablesrepo.write_project_config(- r#"[pre-create]+ r#"[pre-start]repo = "echo 'Repo: {{ repo }}' > info.txt"branch = "echo 'Branch: {{ branch }}' >> info.txt"hash_port = "echo 'Port: {{ branch | hash_port }}' >> info.txt"@@ -190,7 +182,7 @@ approved-commands = [// Commands should execute with expanded templatessnapshot_switch(- "post_create_template_expansion",+ "post_start_template_expansion",&repo,&["--create", "feature/test"],);@@ -240,10 +232,10 @@ approved-commands = [}#[rstest]-fn test_post_create_verbose_template_expansion(repo: TestRepo) {- // Test that -v shows template expansion for pre-create hooks+fn test_post_start_verbose_template_expansion(repo: TestRepo) {+ // Test that -v shows template expansion for pre-start hooksrepo.write_project_config(- r#"[pre-create]+ r#"[pre-start]setup = "echo 'Setting up {{ branch | sanitize }} in {{ worktree_path }}'""#,);@@ -273,15 +265,15 @@ approved-commands = [&["-v"],);set_temp_home_env(&mut cmd, temp_home.path());- assert_cmd_snapshot!("post_create_verbose_template_expansion", cmd);+ assert_cmd_snapshot!("post_start_verbose_template_expansion", cmd);});}#[rstest]-fn test_post_create_default_branch_template(repo: TestRepo) {+fn test_post_start_default_branch_template(repo: TestRepo) {// Create project config with default_branch template variablerepo.write_project_config(- r#"pre-create = "echo 'Default: {{ default_branch }}' > default.txt""#,+ r#"pre-start = "echo 'Default: {{ default_branch }}' > default.txt""#,);repo.commit("Add config with default_branch template");@@ -295,7 +287,7 @@ approved-commands = ["echo 'Default: {{ default_branch }}' > default.txt"]// Create a feature branch worktree (--yes skips approval prompt)snapshot_switch(- "post_create_default_branch_template",+ "post_start_default_branch_template",&repo,&["--create", "feature", "--yes"],);@@ -318,7 +310,7 @@ approved-commands = ["echo 'Default: {{ default_branch }}' > default.txt"]}#[rstest]-fn test_post_create_git_variables_template(#[from(repo_with_remote)] repo: TestRepo) {+fn test_post_start_git_variables_template(#[from(repo_with_remote)] repo: TestRepo) {// Set up an upstream tracking branchrepo.git_command().args(["push", "-u", "origin", "main"])@@ -327,7 +319,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-create]+ r#"[pre-start]commit = "echo 'Commit: {{ commit }}' > git_vars.txt"short = "echo 'Short: {{ short_commit }}' >> git_vars.txt"remote = "echo 'Remote: {{ remote }}' >> git_vars.txt"@@ -339,7 +331,7 @@ worktree_name = "echo 'Worktree Name: {{ worktree_name }}' >> git_vars.txt"// Create a feature branch worktree (--yes skips approval prompt)snapshot_switch(- "post_create_git_variables_template",+ "post_start_git_variables_template",&repo,&["--create", "feature", "--yes"],);@@ -391,7 +383,7 @@ worktree_name = "echo 'Worktree Name: {{ worktree_name }}' >> git_vars.txt"}#[rstest]-fn test_post_create_upstream_template(#[from(repo_with_remote)] repo: TestRepo) {+fn test_post_start_upstream_template(#[from(repo_with_remote)] repo: TestRepo) {// Push main to set up trackingrepo.git_command().args(["push", "-u", "origin", "main"])@@ -401,14 +393,14 @@ fn test_post_create_upstream_template(#[from(repo_with_remote)] repo: TestRepo)// Create project config with upstream template variable// 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-create = "echo 'Upstream: {{ upstream }}' > upstream.txt""#);+ // This test verifies the error case - see test_post_start_upstream_conditional for the fix.+ repo.write_project_config(r#"pre-start = "echo 'Upstream: {{ upstream }}' > upstream.txt""#);repo.commit("Add config with upstream template");// Create a feature branch - it won't have upstream tracking configured yetsnapshot_switch(- "post_create_upstream_template",+ "post_start_upstream_template",&repo,&["--create", "feature", "--yes"],);@@ -425,7 +417,7 @@ fn test_post_create_upstream_template(#[from(repo_with_remote)] repo: TestRepo)}#[rstest]-fn test_post_create_upstream_conditional(#[from(repo_with_remote)] repo: TestRepo) {+fn test_post_start_upstream_conditional(#[from(repo_with_remote)] repo: TestRepo) {// Push main to set up trackingrepo.git_command().args(["push", "-u", "origin", "main"])@@ -435,7 +427,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-create = "{% if not upstream %}echo 'no-upstream' > upstream.txt{% else %}echo '{{ upstream }}' > upstream.txt{% endif %}""#,+ r#"pre-start = "{% if not upstream %}echo 'no-upstream' > upstream.txt{% else %}echo '{{ upstream }}' > upstream.txt{% endif %}""#,);repo.commit("Add config with conditional upstream");@@ -449,7 +441,7 @@ approved-commands = ["{% if not upstream %}echo 'no-upstream' > upstream.txt{% e// Create a feature branch - it won't have upstream tracking configured yetsnapshot_switch(- "post_create_upstream_conditional",+ "post_start_upstream_conditional",&repo,&["--create", "feature", "--yes"],);@@ -472,10 +464,10 @@ approved-commands = ["{% if not upstream %}echo 'no-upstream' > upstream.txt{% e}#[rstest]-fn test_post_create_base_variables(repo: TestRepo) {+fn test_post_start_base_variables(repo: TestRepo) {// Create project config with base template variablesrepo.write_project_config(- r#"[pre-create]+ r#"[pre-start]base = "echo 'Base: {{ base }}' > base_info.txt"base_path = "echo 'Base Path: {{ base_worktree_path }}' >> base_info.txt""#,@@ -495,7 +487,7 @@ approved-commands = [// Create a feature branch worktree from mainsnapshot_switch(- "post_create_base_variables",+ "post_start_base_variables",&repo,&["--create", "feature", "--base", "main"],);@@ -542,12 +534,12 @@ approved-commands = [}#[rstest]-fn test_pre_create_json_stdin(repo: TestRepo) {+fn test_pre_start_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-create = "cat > context.json""#);+ repo.write_project_config(r#"pre-start = "cat > context.json""#);repo.commit("Add config");@@ -612,14 +604,14 @@ approved-commands = ["cat > context.json"]);assert_eq!(json["hook_type"].as_str(),- Some("pre-create"),+ Some("pre-start"),"JSON should contain hook_type");}#[rstest]#[cfg(unix)]-fn test_post_create_script_reads_json(repo: TestRepo) {+fn test_post_start_script_reads_json(repo: TestRepo) {use crate::common::wt_command;use std::os::unix::fs::PermissionsExt;@@ -650,7 +642,7 @@ with open('hook_output.txt', 'w') as f:// Create project config that runs the scriptrepo.write_project_config(- r#"[pre-create]+ r#"[pre-start]setup = "./scripts/setup.py""#,);@@ -705,7 +697,7 @@ approved-commands = ["./scripts/setup.py"]contents);assert!(- contents.contains("hook_type=pre-create"),+ contents.contains("hook_type=pre-start"),"Output should contain hook_type: {}",contents);@@ -717,11 +709,11 @@ approved-commands = ["./scripts/setup.py"]}#[rstest]-fn test_post_create_json_stdin(repo: TestRepo) {+fn test_post_start_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-create = "cat > context.json""#);+ repo.write_project_config(r#"post-start = "cat > context.json""#);repo.commit("Add config");@@ -764,7 +756,7 @@ approved-commands = ["cat > context.json"]);assert_eq!(json["hook_type"].as_str(),- Some("post-create"),+ Some("post-start"),"Background hook should receive hook_type");}@@ -774,10 +766,10 @@ approved-commands = ["cat > context.json"]// ============================================================================#[rstest]-fn test_post_create_single_background_command(repo: TestRepo) {+fn test_post_start_single_background_command(repo: TestRepo) {// Create project config with a background commandrepo.write_project_config(- r#"post-create = "sleep 0.1 && echo 'Background task done' > background.txt""#,+ r#"post-start = "sleep 0.1 && echo 'Background task done' > background.txt""#,);repo.commit("Add background command");@@ -791,7 +783,7 @@ approved-commands = ["sleep 0.1 && echo 'Background task done' > background.txt"// Command should spawn in background (wt exits immediately)snapshot_switch(- "post_create_single_background",+ "post_start_single_background",&repo,&["--create", "feature"],);@@ -809,10 +801,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_create_verbose_shows_per_hook_output(repo: TestRepo) {+fn test_post_start_verbose_shows_per_hook_output(repo: TestRepo) {// Create project config with a background commandrepo.write_project_config(- r#"[post-create]+ r#"[post-start]setup = "echo 'verbose test' > verbose.txt""#,);@@ -828,17 +820,17 @@ approved-commands = ["echo 'verbose test' > verbose.txt"]// With -v, should show detailed per-hook output with command in guttersnapshot_switch(- "post_create_verbose_output",+ "post_start_verbose_output",&repo,&["-v", "--create", "feature"],);}#[rstest]-fn test_post_create_multiple_background_commands(repo: TestRepo) {+fn test_post_start_multiple_background_commands(repo: TestRepo) {// Create project config with multiple background commands (table format)repo.write_project_config(- r#"[post-create]+ r#"[post-start]task1 = "echo 'Task 1 running' > task1.txt"task2 = "echo 'Task 2 running' > task2.txt""#,@@ -858,7 +850,7 @@ approved-commands = [// Commands should spawn in parallelsnapshot_switch(- "post_create_multiple_background",+ "post_start_multiple_background",&repo,&["--create", "feature"],);@@ -870,12 +862,12 @@ approved-commands = [}#[rstest]-fn test_both_pre_create_and_post_create(repo: TestRepo) {+fn test_both_pre_start_and_post_start(repo: TestRepo) {// Create project config with both a blocking and a background creation hookrepo.write_project_config(- r#"pre-create = "echo 'Setup done' > setup.txt"+ r#"pre-start = "echo 'Setup done' > setup.txt"-[post-create]+[post-start]server = "sleep 0.05 && echo 'Server running' > server.txt""#,);@@ -892,10 +884,10 @@ approved-commands = ["#,);- // pre-create runs first (blocking), then post-create (background)- snapshot_switch("both_pre_and_post_create", &repo, &["--create", "feature"]);+ // pre-start runs first (blocking), then post-start (background)+ snapshot_switch("both_pre_and_post_start", &repo, &["--create", "feature"]);- // Setup file should exist immediately (pre-create is blocking)+ // Setup file should exist immediately (pre-start is blocking)let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");assert!(worktree_path.join("setup.txt").exists(),@@ -909,7 +901,7 @@ approved-commands = [#[rstest]fn test_invalid_toml(repo: TestRepo) {// Create invalid TOML- repo.write_project_config("pre-create = [invalid syntax\n");+ repo.write_project_config("pre-start = [invalid syntax\n");repo.commit("Add invalid config");@@ -922,11 +914,9 @@ fn test_invalid_toml(repo: TestRepo) {// ============================================================================#[rstest]-fn test_post_create_log_file_captures_output(repo: TestRepo) {+fn test_post_start_log_file_captures_output(repo: TestRepo) {// Create command that writes to both stdout and stderr- repo.write_project_config(- r#"post-create = "echo 'stdout output' && echo 'stderr output' >&2""#,- );+ repo.write_project_config(r#"post-start = "echo 'stdout output' && echo 'stderr output' >&2""#);repo.commit("Add command with stdout/stderr");@@ -938,7 +928,7 @@ approved-commands = ["echo 'stdout output' && echo 'stderr output' >&2"]);snapshot_switch(- "post_create_log_captures_output",+ "post_start_log_captures_output",&repo,&["--create", "feature"],);@@ -950,13 +940,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-create/cmd-0-*.log`.- let post_create_dir = log_dir+ // Find the command log file at `{branch}/project/post-start/cmd-0-*.log`.+ let post_start_dir = log_dir.join(worktrunk::path::sanitize_for_filename("feature")).join("project")- .join("post-create");- let cmd_log = fs::read_dir(&post_create_dir)- .unwrap_or_else(|e| panic!("reading {post_create_dir:?}: {e}"))+ .join("post-start");+ let cmd_log = fs::read_dir(&post_start_dir)+ .unwrap_or_else(|e| panic!("reading {post_start_dir:?}: {e}")).filter_map(|e| e.ok()).map(|e| e.path()).find(|p| {@@ -980,9 +970,9 @@ approved-commands = ["echo 'stdout output' && echo 'stderr output' >&2"]}#[rstest]-fn test_post_create_invalid_command_handling(repo: TestRepo) {+fn test_post_start_invalid_command_handling(repo: TestRepo) {// Create command with syntax error (missing quote)- repo.write_project_config(r#"post-create = "echo 'unclosed quote""#);+ repo.write_project_config(r#"post-start = "echo 'unclosed quote""#);repo.commit("Add invalid command");@@ -995,7 +985,7 @@ approved-commands = ["echo 'unclosed quote"]// wt should still complete successfully even if background command has errorssnapshot_switch(- "post_create_invalid_command",+ "post_start_invalid_command",&repo,&["--create", "feature"],);@@ -1004,15 +994,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-create command fails"+ "Worktree should be created even if post-start command fails");}#[rstest]-fn test_post_create_multiple_commands_separate_logs(repo: TestRepo) {+fn test_post_start_multiple_commands_separate_logs(repo: TestRepo) {// Create multiple background commands with distinct outputrepo.write_project_config(- r#"[post-create]+ r#"[post-start]task1 = "echo 'TASK1_OUTPUT'"task2 = "echo 'TASK2_OUTPUT'"task3 = "echo 'TASK3_OUTPUT'"@@ -1032,7 +1022,7 @@ approved-commands = ["#,);- snapshot_switch("post_create_separate_logs", &repo, &["--create", "feature"]);+ snapshot_switch("post_start_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");@@ -1041,13 +1031,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-create/{task}.log` in the nested layout.- let post_create_dir = log_dir+ // `{branch}/project/post-start/{task}.log` in the nested layout.+ let post_start_dir = log_dir.join(worktrunk::path::sanitize_for_filename("feature")).join("project")- .join("post-create");- let log_files: Vec<_> = fs::read_dir(&post_create_dir)- .unwrap_or_else(|e| panic!("reading {post_create_dir:?}: {e}"))+ .join("post-start");+ let log_files: Vec<_> = fs::read_dir(&post_start_dir)+ .unwrap_or_else(|e| panic!("reading {post_start_dir:?}: {e}")).filter_map(|e| e.ok()).collect();for (task, expected) in [@@ -1058,7 +1048,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_create_dir:?}"));+ .unwrap_or_else(|| panic!("should have log file for {task} in {post_start_dir:?}"));wait_for_file_content(&log_file.path());let contents = fs::read_to_string(log_file.path()).unwrap();@@ -1070,9 +1060,9 @@ approved-commands = [}#[rstest]-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""#);+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""#);repo.commit("Add background command");@@ -1083,9 +1073,9 @@ approved-commands = ["echo 'Background task' > background.txt"]"#,);- // Use --execute flag along with post-create command+ // Use --execute flag along with post-start commandsnapshot_switch(- "execute_with_post_create",+ "execute_with_post_start",&repo,&["--create",@@ -1108,10 +1098,10 @@ approved-commands = ["echo 'Background task' > background.txt"]}#[rstest]-fn test_post_create_complex_shell_commands(repo: TestRepo) {+fn test_post_start_complex_shell_commands(repo: TestRepo) {// Create command with pipes and redirectsrepo.write_project_config(- r#"post-create = "echo 'line1\nline2\nline3' | grep line2 > filtered.txt""#,+ r#"post-start = "echo 'line1\nline2\nline3' | grep line2 > filtered.txt""#,);repo.commit("Add complex shell command");@@ -1123,7 +1113,7 @@ approved-commands = ["echo 'line1\nline2\nline3' | grep line2 > filtered.txt"]"#,);- snapshot_switch("post_create_complex_shell", &repo, &["--create", "feature"]);+ snapshot_switch("post_start_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");@@ -1135,10 +1125,10 @@ approved-commands = ["echo 'line1\nline2\nline3' | grep line2 > filtered.txt"]}#[rstest]-fn test_post_create_multiline_commands_with_newlines(repo: TestRepo) {+fn test_post_start_multiline_commands_with_newlines(repo: TestRepo) {// Create command with actual newlines (using TOML triple-quoted string)repo.write_project_config(- r#"post-create = """+ r#"post-start = """echo 'first line' > multiline.txtecho 'second line' >> multiline.txtecho 'third line' >> multiline.txt@@ -1163,7 +1153,7 @@ approved-commands = ["""));snapshot_switch(- "post_create_multiline_with_newlines",+ "post_start_multiline_with_newlines",&repo,&["--create", "feature"],);@@ -1182,10 +1172,10 @@ approved-commands = ["""}#[rstest]-fn test_post_create_multiline_with_control_structures(repo: TestRepo) {+fn test_post_start_multiline_with_control_structures(repo: TestRepo) {// Test multiline command with if-else control structurerepo.write_project_config(- r#"pre-create = """+ r#"pre-start = """if [ ! -f test.txt ]; thenecho 'File does not exist' > result.txtelse@@ -1214,7 +1204,7 @@ approved-commands = ["""));snapshot_switch(- "post_create_multiline_control_structure",+ "post_start_multiline_control_structure",&repo,&["--create", "feature"],);@@ -1236,44 +1226,44 @@ approved-commands = ["""// ============================================================================///-/// This is a regression test for a bug where post-create commands were running on ALL+/// This is a regression test for a bug where post-start commands were running on ALL/// `wt switch` operations instead of only on `wt switch --create`.#[rstest]-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""#);+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""#);- repo.commit("Add post-create config");+ repo.commit("Add post-start config");// Pre-approve the commandrepo.write_test_approvals(r#"[projects."../origin"]-approved-commands = ["echo 'POST-START-RAN' > post_create_marker.txt"]+approved-commands = ["echo 'POST-START-RAN' > post_start_marker.txt"]"#,);- // First: Create worktree - post-create SHOULD run+ // First: Create worktree - post-start SHOULD runsnapshot_switch(- "post_create_create_with_command",+ "post_start_create_with_command",&repo,&["--create", "feature"],);- // Wait for background post-create command to complete+ // Wait for background post-start command to completelet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");- let marker_file = worktree_path.join("post_create_marker.txt");+ let marker_file = worktree_path.join("post_start_marker.txt");wait_for_file(marker_file.as_path());- // Remove the marker file to detect if post-create runs again+ // Remove the marker file to detect if post-start runs againfs::remove_file(&marker_file).unwrap();- // Second: Switch to EXISTING worktree - post-create should NOT run- snapshot_switch("post_create_skip_existing", &repo, &["feature"]);+ // Second: Switch to EXISTING worktree - post-start should NOT run+ snapshot_switch("post_start_skip_existing", &repo, &["feature"]);// Wait to ensure no background command starts (testing absence requires fixed wait)thread::sleep(SLEEP_FOR_ABSENCE_CHECK);- // Verify post-create did NOT run when switching to existing worktree+ // Verify post-start did NOT run when switching to existing worktreeassert!(!marker_file.exists(),"Post-start should NOT run when switching to existing worktree"@@ -1285,10 +1275,10 @@ approved-commands = ["echo 'POST-START-RAN' > post_create_marker.txt"]// ============================================================================#[rstest]-fn test_post_create_project_pipeline(repo: TestRepo) {+fn test_post_start_project_pipeline(repo: TestRepo) {// Project config with pipeline: serial setup, then concurrent tasksrepo.write_project_config(- r#"post-create = [+ r#"post-start = ["echo SETUP > setup_marker.txt",{ task1 = "cat setup_marker.txt > task1_saw_setup.txt", task2 = "echo TASK2 > task2.txt" }]@@ -1307,7 +1297,7 @@ approved-commands = [);snapshot_switch(- "post_create_project_pipeline",+ "post_start_project_pipeline",&repo,&["--create", "feature"],);@@ -1325,10 +1315,10 @@ approved-commands = [}#[rstest]-fn test_post_create_pipeline_with_template_vars(repo: TestRepo) {+fn test_post_start_pipeline_with_template_vars(repo: TestRepo) {// Pipeline with template variable expansionrepo.write_project_config(- r#"post-create = [+ r#"post-start = ["echo {{ branch }} > branch_marker.txt",{ check = "cat branch_marker.txt > branch_check.txt" }]@@ -1346,7 +1336,7 @@ approved-commands = [);snapshot_switch(- "post_create_pipeline_template_vars",+ "post_start_pipeline_template_vars",&repo,&["--create", "feature"],);@@ -1363,11 +1353,11 @@ approved-commands = [}#[rstest]-fn test_post_create_target_variable_expands_to_branch(repo: TestRepo) {- // `{{ target }}` in post-create should equal the bare `{{ branch }}` —+fn test_post_start_target_variable_expands_to_branch(repo: TestRepo) {+ // `{{ target }}` in post-start should equal the bare `{{ branch }}` —// symmetric with `pre-switch`, which already injects `target`.- repo.write_project_config(r#"post-create = "echo '{{ target }}' > target_marker.txt""#);- repo.commit("Add post-create with target var");+ repo.write_project_config(r#"post-start = "echo '{{ target }}' > target_marker.txt""#);+ repo.commit("Add post-start with target var");repo.write_test_approvals(r#"[projects."../origin"]@@ -1376,7 +1366,7 @@ approved-commands = ["echo '{{ target }}' > target_marker.txt"]);snapshot_switch(- "post_create_target_variable",+ "post_start_target_variable",&repo,&["--create", "feature"],);@@ -1411,7 +1401,7 @@ approved-commands = ["echo '{{ target }}' > target_marker.txt"]repo.wt_command().args(["switch", "--create", "feature", "--no-hooks", "--yes"]).output()- .expect("failed to pre-create feature worktree");+ .expect("failed to pre-start feature worktree");repo.wt_command().args(["switch", "main", "--no-hooks", "--yes"]).output()@@ -1432,11 +1422,11 @@ approved-commands = ["echo '{{ target }}' > target_marker.txt"]}#[rstest]-fn test_post_create_mixed_user_pipeline_project_flat(repo: TestRepo) {+fn test_post_start_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-create = [+ r#"post-start = ["echo USER_SETUP > user_pipeline_marker.txt",{ user_bg = "echo USER_BG > user_bg.txt" }]@@ -1444,7 +1434,7 @@ fn test_post_create_mixed_user_pipeline_project_flat(repo: TestRepo) {);repo.write_project_config(- r#"[post-create]+ r#"[post-start]proj = "echo PROJECT > project_marker.txt""#,);@@ -1457,7 +1447,7 @@ approved-commands = ["echo PROJECT > project_marker.txt"]);snapshot_switch(- "post_create_mixed_user_pipeline_project_flat",+ "post_start_mixed_user_pipeline_project_flat",&repo,&["--create", "feature"],);@@ -1482,14 +1472,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_create_concurrent_serial_force(repo: TestRepo) {+fn test_post_start_concurrent_serial_force(repo: TestRepo) {repo.write_project_config(- r#"[post-create]+ r#"[post-start]first = "echo FIRST >> serial_order.txt"second = "echo SECOND >> serial_order.txt""#,);- repo.commit("Add concurrent post-create");+ repo.commit("Add concurrent post-start");repo.write_test_approvals(r#"[projects."../origin"]@@ -1518,17 +1508,17 @@ approved-commands = [}#[rstest]-fn test_post_create_concurrent_serial_bails_on_failure(repo: TestRepo) {+fn test_post_start_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-create]+ r#"[post-start]first = "echo FIRST > first_marker.txt && false"second = "echo SECOND > second_marker.txt""#,);- repo.commit("Add failing post-create");+ repo.commit("Add failing post-start");repo.write_test_approvals(r#"[projects."../origin"]diff --git a/tests/integration_tests/readme_sync.rs b/tests/integration_tests/readme_sync.rsindex 72eb593cc..1faaac343 100644--- a/tests/integration_tests/readme_sync.rs+++ b/tests/integration_tests/readme_sync.rs@@ -1242,10 +1242,11 @@ fn test_config_docs_include_all_sections() {let all_keys = valid_user_config_keys();- // Hook keys from HookType enum + removed post-create (kept in schema but rejected at load)+ // Hook keys from HookType enum + `pre-create`/`post-create` aliases (see+ // `HooksConfig` in src/config/hooks.rs).let hook_keys: HashSet<String> = HookType::iter().map(|h| h.to_string())- .chain(std::iter::once("post-create".to_string()))+ .chain(["pre-create".to_string(), "post-create".to_string()]).collect();// Keys that are bare scalars or internal flags, not TOML section headers@@ -1306,10 +1307,11 @@ fn test_project_config_docs_include_all_sections() {let all_keys = valid_project_config_keys();- // Hook keys from HookType enum + removed post-create (kept in schema but rejected at load)+ // Hook keys from HookType enum + `pre-create`/`post-create` aliases (see+ // `HooksConfig` in src/config/hooks.rs).let hook_keys: HashSet<String> = HookType::iter().map(|h| h.to_string())- .chain(std::iter::once("post-create".to_string()))+ .chain(["pre-create".to_string(), "post-create".to_string()]).collect();// Separate schema keys into section keys and hook keysdiff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rsindex 55e331b2f..c518d03ef 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-create (blocking) and post-create (background)+ /// Test switch --create with pre-start (blocking) and post-start (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-create and post-create hooks+ // Create project config with both pre-start and post-start 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-create = [+pre-start = [{install = "echo 'Installing dependencies...'"},{build = "echo 'Building project...'"},]# Background commands that run in parallel-[post-create]+[post-start]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_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 leaks+ 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 leakslet config_dir = repo.root_path().join(".config");fs::create_dir_all(&config_dir).unwrap();fs::write(config_dir.join("wt.toml"),- r#"post-create = "echo 'test command executed'""#,+ r#"post-start = "echo 'test command executed'""#,).unwrap();- repo.commit("Add post-create command");+ repo.commit("Add post-start 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-create background command that will trigger progress output+ // Configure a post-start 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-create = "echo 'background task'""#,+ r#"post-start = "echo 'background task'""#,).unwrap();- repo.commit("Add post-create command");+ repo.commit("Add post-start 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-create background command that will trigger progress output+ // Configure a post-start 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-create = "echo 'fish background task'""#,+ r#"post-start = "echo 'fish background task'""#,).unwrap();- repo.commit("Add post-create command");+ repo.commit("Add post-start 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-create command that will trigger background job+ // Configure a post-start 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-create = "echo 'background job'""#,+ r#"post-start = "echo 'background job'""#,).unwrap();- repo.commit("Add post-create command");+ repo.commit("Add post-start 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-create command that will trigger background job+ // Configure a post-start 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-create = "echo 'bash background'""#,+ r#"post-start = "echo 'bash background'""#,).unwrap();- repo.commit("Add post-create command");+ repo.commit("Add post-start 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-create command to exercise the background job code path+ // Configure a post-start 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-create = "echo 'cleanup test'""#,+ r#"post-start = "echo 'cleanup test'""#,).unwrap();- repo.commit("Add post-create command");+ repo.commit("Add post-start 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-create and post-create hooks+ /// README example: Creating worktree with pre-start and post-start 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_create.snap+ /// Source: tests/snapshots/shell_wrapper__tests__readme_example_hooks_pre_start.snap#[rstest]- fn test_readme_example_hooks_pre_create(repo: TestRepo) {- // Create project config with pre-create and post-create hooks+ fn test_readme_example_hooks_pre_start(repo: TestRepo) {+ // Create project config with pre-start and post-start 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-create]+[pre-start]"install" = "uv sync"-[post-create]+[post-start]"dev" = "uv run dev""#;@@ -2620,7 +2620,7 @@ fishell_wrapper_settings().bind(|| assert_snapshot!(&output.combined));}- /// README example: approval prompt for pre-create commands+ /// README example: approval prompt for pre-start 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-create commands+ // Create project config with named pre-start commandsrepo.write_project_config(- r#"pre-create = [+ r#"pre-start = [{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 0a0f27ba4..04c3f0ca3 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@@ -1,5 +1,5 @@---source: tests/integration_tests/git_error_display.rs-expression: err.to_string()+expression: err.render()----[31m✗[39m [31mpre-create command failed: command not found[39m+[31m✗[39m [31mpre-start command failed: command not found[39mdiff --git a/tests/integration_tests/switch.rs b/tests/integration_tests/switch.rsindex b76662581..c19147d3b 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_create_commands(repo: TestRepo) {+fn test_switch_no_config_commands_skips_post_start_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_create_commands(repo: TestRepo) {fs::write(config_dir.join("wt.toml"),- format!(r#"post-create = "{}""#, create_file_cmd),+ format!(r#"post-start = "{}""#, create_file_cmd),).unwrap();@@ -1013,14 +1013,14 @@ approved-commands = ["{}"]).unwrap();- // With --no-hooks, the post-create command should be skipped+ // With --no-hooks, the post-start command should be skippedsnapshot_switch(- "switch_no_hooks_skips_post_create",+ "switch_no_hooks_skips_post_start",&repo,- &["--create", "no-post-create", "--no-hooks"],+ &["--create", "no-post-start", "--no-hooks"],);- // post-create runs in the background; with --no-hooks it is never spawned,+ // post-start 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-create"));+ .join(format!("{repo_name}.no-post-start"));assert!(!worktree.join("marker.txt").exists(),- "post-create hook should have been skipped, but marker.txt was created"+ "post-start 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-create = "echo 'marker' > marker.txt""#,+ r#"post-start = "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-create runs in the background; with --no-hooks it is never spawned,+ // post-start 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-create hook should have been skipped, but marker.txt was created"+ "post-start hook should have been skipped, but marker.txt was created");}-/// `wt switch --create <new> --base <other>` resolves `pre-create` / `post-create`+/// `wt switch --create <new> --base <other>` resolves `pre-start` / `post-start`/// 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-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"+ 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""#,).unwrap();@@ -1132,19 +1132,19 @@ post-create = "echo post-create-from-base > {{ repo_path }}/post-create-marker.tString::from_utf8_lossy(&output.stderr));- let pre_marker = repo.root_path().join("pre-create-marker.txt");+ let pre_marker = repo.root_path().join("pre-start-marker.txt");wait_for_file_content(&pre_marker);assert_eq!(fs::read_to_string(&pre_marker).unwrap().trim(),- "pre-create-from-base",- "pre-create should run with the base branch's config"+ "pre-start-from-base",+ "pre-start should run with the base branch's config");- let post_marker = repo.root_path().join("post-create-marker.txt");+ let post_marker = repo.root_path().join("post-start-marker.txt");wait_for_file_content(&post_marker);assert_eq!(fs::read_to_string(&post_marker).unwrap().trim(),- "post-create-from-base",- "post-create should run with the base branch's config"+ "post-start-from-base",+ "post-start 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-create = "echo IGNORED-COMMITTED-HOOK > {{ repo_path }}/wrong-marker.txt""#,+ r#"post-start = "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-create = "echo OVERRIDE-HOOK > {{ repo_path }}/right-marker.txt""#,+ r#"post-start = "echo OVERRIDE-HOOK > {{ repo_path }}/right-marker.txt""#,).unwrap();@@ -1971,25 +1971,25 @@ fn test_switch_post_hook_no_path_with_shell_integration(repo: TestRepo) {);}-/// 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"+/// 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"#[rstest]-fn test_switch_combined_post_switch_and_post_create_hooks(repo: TestRepo) {- // Create project config with both post-switch and post-create hooks+fn test_switch_combined_post_switch_and_post_start_hooks(repo: TestRepo) {+ // Create project config with both post-switch and post-start 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-create = "echo started"+post-start = "echo started""#,).unwrap();repo.commit("Add config");- // Run switch --create (triggers both post-switch and post-create)- // Should show a single combined line: "Running post-switch: project; post-create: project @ path"+ // Run switch --create (triggers both post-switch and post-start)+ // Should show a single combined line: "Running post-switch: project; post-start: project @ path"snapshot_switch("switch_combined_hooks",&repo,@@ -2551,7 +2551,7 @@ fn test_switch_pr_fork(#[from(repo_with_remote)] repo: TestRepo) {});}-/// `pre-create`, `post-create`, and `post-switch` hooks on PR/MR-created worktrees+/// `pre-start`, `post-start`, 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@@ -2565,13 +2565,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-create (background) populate pr_number/pr_url too.+ // post-switch + post-start (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-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"+ 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"post-switch = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_path }}/post_switch.txt""#,)@@ -2641,7 +2641,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_create.txt", "post_create.txt", "post_switch.txt"] {+ for marker in ["pre_start.txt", "post_start.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);@@ -2655,7 +2655,7 @@ post-switch = "echo 'pr_number={{ pr_number }} pr_url={{ pr_url }}' > {{ repo_pa}}-/// `wt switch pr:N` resolves `post-create` etc. from the PR's tree — the fetched+/// `wt switch pr:N` resolves `post-start` 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@@ -2671,7 +2671,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-create = "echo PR-CONFIG-HOOK-RAN > {{ repo_path }}/pr-hook-marker.txt""#,+ r#"post-start = "echo PR-CONFIG-HOOK-RAN > {{ repo_path }}/pr-hook-marker.txt""#,).unwrap();repo.run_git(&["add", "pr-file.txt", ".config/wt.toml"]);@@ -2741,7 +2741,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-create hook; stderr:\n{stderr}"+ "approval prompt should list the PR ref's post-start hook; stderr:\n{stderr}");assert!(!output.status.success(),@@ -2752,7 +2752,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-create` runs against the new worktree.+ // (b) With `--yes`: the PR's `post-start` 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);@@ -2768,7 +2768,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-create should run with the PR ref's config"+ "post-start should run with the PR ref's config");}diff --git a/tests/integration_tests/switch_picker.rs b/tests/integration_tests/switch_picker.rsindex 567b22446..68b8210e9 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-create` template would let the worktree be+/// Without this, a broken `pre-start` 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-create` to the user config, fires picker-create, asserts that no branch+/// `pre-start` 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-create` in user config: unbalanced `{{` is a minijinja parse+ // Broken `pre-start` 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-create = "echo {{ unclosed""#);+ repo.write_test_config(r#"pre-start = "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-create template is broken.\nScreen:\n{}",+ "Expected non-zero exit when pre-start 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-create = "true""#);+ repo.write_test_config(r#"pre-start = "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 72149dfa2..18e6e323c 100644--- a/tests/integration_tests/user_hooks.rs+++ b/tests/integration_tests/user_hooks.rs@@ -36,22 +36,22 @@ fn snapshot_switch(test_name: &str, repo: &TestRepo, args: &[&str]) {}#[rstest]-fn test_user_pre_create_hook_executes(repo: TestRepo) {- // Write user config with pre-create hook (no project config)+fn test_user_pre_start_hook_executes(repo: TestRepo) {+ // Write user config with pre-start hook (no project config)repo.write_test_config(- r#"[pre-create]+ r#"[pre-start]log = "echo 'USER_PRE_CREATE_RAN' > user_hook_marker.txt""#,);- snapshot_switch("user_pre_create_executes", &repo, &["--create", "feature"]);+ snapshot_switch("user_pre_start_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-create hook should have created marker file"+ "User pre-start hook should have created marker file");let contents = fs::read_to_string(&marker_file).unwrap();@@ -63,13 +63,13 @@ log = "echo 'USER_PRE_CREATE_RAN' > user_hook_marker.txt"#[rstest]fn test_user_hooks_run_before_project_hooks(repo: TestRepo) {- // Create project config with pre-create hook- repo.write_project_config(r#"pre-create = "echo 'PROJECT_HOOK' >> hook_order.txt""#);+ // Create project config with pre-start hook+ repo.write_project_config(r#"pre-start = "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-create]+ r#"[pre-start]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-create]+ r#"[pre-start]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-create hook- repo.write_project_config(r#"pre-create = "echo 'PROJECT_HOOK' > project_marker.txt""#);+ // Create project config with pre-start hook+ repo.write_project_config(r#"pre-start = "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-create]+ r#"[pre-start]log = "echo 'USER_HOOK' > user_marker.txt""#,);@@ -158,24 +158,24 @@ approved-commands = ["echo 'PROJECT_HOOK' > project_marker.txt"]}#[rstest]-fn test_user_post_create_hook_failure(repo: TestRepo) {+fn test_user_post_start_hook_failure(repo: TestRepo) {// Write user config with failing hookrepo.write_test_config(- r#"[pre-create]+ r#"[pre-start]failing = "exit 1""#,);- // 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"]);+ // 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.+ snapshot_switch("user_post_start_failure", &repo, &["--create", "feature"]);- // Worktree exists (created before pre-create ran) but the command failed+ // Worktree exists (created before pre-start 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-create ran"+ "Worktree should exist — it was created before pre-start ran");}@@ -184,15 +184,15 @@ failing = "exit 1"// ============================================================================#[rstest]-fn test_user_post_create_hook_executes(repo: TestRepo) {- // Write user config with post-create hook (background)+fn test_user_post_start_hook_executes(repo: TestRepo) {+ // Write user config with post-start hook (background)repo.write_test_config(- r#"[post-create]+ r#"[post-start]bg = "echo 'USER_POST_CREATE_RAN' > user_bg_marker.txt""#,);- snapshot_switch("user_post_create_executes", &repo, &["--create", "feature"]);+ snapshot_switch("user_post_start_executes", &repo, &["--create", "feature"]);// Wait for background hook to complete and write contentlet worktree_path = repo.root_path().parent().unwrap().join("repo.feature");@@ -202,7 +202,7 @@ bg = "echo 'USER_POST_CREATE_RAN' > user_bg_marker.txt"let contents = fs::read_to_string(&marker_file).unwrap();assert!(contents.contains("USER_POST_CREATE_RAN"),- "User post-create hook should have run in background"+ "User post-start 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-create]-capture-bg = "echo \"bg=$WORKTRUNK_FOREGROUND\" > post_create_env.txt"+ r#"[post-start]+capture-bg = "echo \"bg=$WORKTRUNK_FOREGROUND\" > post_start_env.txt"-[pre-create]-capture-fg = "echo \"fg=$WORKTRUNK_FOREGROUND\" > pre_create_env.txt"+[pre-start]+capture-fg = "echo \"fg=$WORKTRUNK_FOREGROUND\" > pre_start_env.txt""#,);@@ -230,37 +230,37 @@ capture-fg = "echo \"fg=$WORKTRUNK_FOREGROUND\" > pre_create_env.txt"let worktree_path = repo.root_path().parent().unwrap().join("repo.feature");- // pre-create wrote its marker synchronously; post-create runs in the+ // pre-start wrote its marker synchronously; post-start runs in the// background, so poll for the file.- let bg_marker = worktree_path.join("post_create_env.txt");+ let bg_marker = worktree_path.join("post_start_env.txt");wait_for_file_content(&bg_marker);let bg = fs::read_to_string(&bg_marker).unwrap();assert_eq!(bg.trim(),"bg=-1",- "post-create (background) hook should see WORKTRUNK_FOREGROUND=-1, got {bg:?}"+ "post-start (background) hook should see WORKTRUNK_FOREGROUND=-1, got {bg:?}");- let fg_marker = worktree_path.join("pre_create_env.txt");+ let fg_marker = worktree_path.join("pre_start_env.txt");let fg = fs::read_to_string(&fg_marker).unwrap();assert_eq!(fg.trim(),"fg=",- "pre-create (foreground) hook should NOT see WORKTRUNK_FOREGROUND set, got {fg:?}"+ "pre-start (foreground) hook should NOT see WORKTRUNK_FOREGROUND set, got {fg:?}");}#[rstest]-fn test_user_post_create_skipped_with_no_hooks(repo: TestRepo) {- // Write user config with post-create hook+fn test_user_post_start_skipped_with_no_hooks(repo: TestRepo) {+ // Write user config with post-start hookrepo.write_test_config(- r#"[post-create]+ r#"[post-start]bg = "echo 'USER_BG' > user_bg_marker.txt""#,);snapshot_switch(- "user_post_create_skipped_no_hooks",+ "user_post_start_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-create hook should be skipped with --no-hooks"+ "User post-start 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-create]+ r#"[pre-start]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_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""#);+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""#);repo.commit("Add project config");// Write user config with unnamed hook AND pre-approve project commandrepo.write_test_config(- r#"post-create = "echo 'USER_POST_START' > user_bg.txt"+ r#"post-start = "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_create",+ "user_and_project_unnamed_post_start",&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-create should have run"+ "User post-start should have run");assert!(worktree_path.join("project_bg.txt").exists(),- "Project post-create should have run"+ "Project post-start should have run");}#[rstest]-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""#);+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""#);repo.commit("Add project config");// Write user config with user hook AND pre-approve project commandrepo.write_test_config(- r#"[post-create]+ r#"[post-start]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_create",+ "user_and_project_post_start",&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-create should have run"+ "User post-start should have run");assert!(worktree_path.join("project_bg.txt").exists(),- "Project post-create should have run"+ "Project post-start should have run");}@@ -1573,17 +1573,17 @@ fn test_standalone_hook_failure_omits_skip_hint(repo: TestRepo) {}#[rstest]-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""#);+fn test_standalone_hook_pre_start(repo: TestRepo) {+ // Write project config with pre-start hook+ repo.write_project_config(r#"pre-start = "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-create", "--yes"]);+ cmd.args(["hook", "pre-start", "--yes"]);let output = cmd.output().unwrap();- assert!(output.status.success(), "wt hook pre-create should succeed");+ assert!(output.status.success(), "wt hook pre-start should succeed");let marker = repo.root_path().join("hook_ran.txt");crate::common::wait_for_file_content(&marker);@@ -1593,9 +1593,9 @@ fn test_standalone_hook_pre_create(repo: TestRepo) {#[rstest]fn test_standalone_hook_start_alias_runs_silently(repo: TestRepo) {- // `wt hook pre-start` is a deprecated alias for `wt hook pre-create`. It+ // `wt hook pre-start` is a deprecated alias for `wt hook pre-start`. 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""#);+ repo.write_project_config(r#"pre-start = "echo 'START_ALIAS' > hook_ran.txt""#);let mut cmd = crate::common::wt_command();cmd.current_dir(repo.root_path());@@ -1605,7 +1605,7 @@ fn test_standalone_hook_start_alias_runs_silently(repo: TestRepo) {let output = cmd.output().unwrap();assert!(output.status.success(),- "wt hook pre-start should succeed (alias for pre-create)"+ "wt hook pre-start should succeed (alias for pre-start)");let stderr = String::from_utf8_lossy(&output.stderr);assert!(@@ -1621,38 +1621,35 @@ fn test_standalone_hook_start_alias_runs_silently(repo: TestRepo) {}#[rstest]-fn test_standalone_hook_pre_create_fails_on_failure(repo: TestRepo) {- // pre-create hooks use FailFast like all other pre-* hooks — consistent with+fn test_standalone_hook_pre_start_fails_on_failure(repo: TestRepo) {+ // pre-start 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-create = "exit 1""#);+ repo.write_project_config(r#"pre-start = "exit 1""#);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes"])+ .args(["hook", "pre-start", "--yes"]).output().unwrap();assert!(!output.status.success(),- "wt hook pre-create should exit non-zero when the hook fails (fail-fast, like all pre-* hooks)"+ "wt hook pre-start should exit non-zero when the hook fails (fail-fast, like all pre-* hooks)");}#[rstest]-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""#);+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""#);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", "post-start", "--yes"]);let output = cmd.output().unwrap();- assert!(- output.status.success(),- "wt hook post-create should succeed"- );+ assert!(output.status.success(), "wt hook post-start should succeed");// Hook spawns in background - wait for marker filelet marker = repo.root_path().join("hook_ran.txt");@@ -1662,21 +1659,21 @@ fn test_standalone_hook_post_create(repo: TestRepo) {}#[rstest]-fn test_standalone_hook_post_create_foreground(repo: TestRepo) {- // Write project config with post-create hook that echoes to both file and stdout+fn test_standalone_hook_post_start_foreground(repo: TestRepo) {+ // Write project config with post-start hook that echoes to both file and stdoutrepo.write_project_config(- r#"post-create = "echo 'FOREGROUND_POST_START' && echo 'marker' > hook_ran.txt""#,+ r#"post-start = "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-create", "--yes", "--foreground"]);+ cmd.args(["hook", "post-start", "--yes", "--foreground"]);let output = cmd.output().unwrap();assert!(output.status.success(),- "wt hook post-create --foreground should succeed"+ "wt hook post-start --foreground should succeed");// With --foreground, marker file should exist immediately (no waiting)@@ -1829,7 +1826,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-create", "--yes"]);+ cmd.args(["hook", "pre-start", "--yes"]);let output = cmd.output().unwrap();assert!(@@ -1840,7 +1837,7 @@ fn test_standalone_hook_no_hooks_configured(repo: TestRepo) {let stderr = String::from_utf8_lossy(&output.stderr);assert!(- stderr.contains("No pre-create hooks configured"),+ stderr.contains("No pre-start hooks configured"),"stderr should warn about missing hooks, got: {stderr}");}@@ -1869,12 +1866,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-create = "echo 'SHOULD_NOT_RUN' > hook_ran.txt""#);+ repo.write_project_config(r#"pre-start = "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-create", "--dry-run"]);+ cmd.args(["hook", "pre-start", "--dry-run"]);let output = cmd.output().unwrap();assert!(output.status.success(), "dry-run should succeed");@@ -1910,37 +1907,37 @@ fn test_hook_dry_run_named_hooks(repo: TestRepo) {}// ============================================================================-// Background Hook Execution Tests (post-create, post-switch)+// Background Hook Execution Tests (post-start, 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-create = "echo HOOK_OUTPUT_MARKER; exit 1""#);+ repo.write_project_config(r#"post-start = "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-create", "--yes"]);+ cmd.args(["hook", "post-start", "--yes"]);let output = cmd.output().unwrap();// Background spawning always succeeds (spawn succeeded, failure is logged)assert!(output.status.success(),- "wt hook post-create should succeed (spawns in background)"+ "wt hook post-start 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-create/{name}.log`.- let post_create_dir = log_dir+ // Hook logs live at `{branch}/project/post-start/{name}.log`.+ let post_start_dir = log_dir.join(worktrunk::path::sanitize_for_filename("main")).join("project")- .join("post-create");- let cmd_log = fs::read_dir(&post_create_dir)- .unwrap_or_else(|e| panic!("reading {post_create_dir:?}: {e}"))+ .join("post-start");+ let cmd_log = fs::read_dir(&post_start_dir)+ .unwrap_or_else(|e| panic!("reading {post_start_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");@@ -1962,7 +1959,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-create]+ r#"[post-start]first = "echo FIRST_OUTPUT"second = "echo SECOND_OUTPUT""#,@@ -1971,26 +1968,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-create", "--yes"]);+ cmd.args(["hook", "post-start", "--yes"]);let output = cmd.output().unwrap();// Background spawning always succeeds (spawn succeeded)assert!(output.status.success(),- "wt hook post-create should succeed (spawns in background)"+ "wt hook post-start 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-create/{name}.log`.- let post_create_dir = log_dir+ // Hook logs live at `{branch}/project/post-start/{name}.log`.+ let post_start_dir = log_dir.join(worktrunk::path::sanitize_for_filename("main")).join("project")- .join("post-create");- let log_files: Vec<_> = fs::read_dir(&post_create_dir)- .unwrap_or_else(|e| panic!("reading {post_create_dir:?}: {e}"))+ .join("post-start");+ let log_files: Vec<_> = fs::read_dir(&post_start_dir)+ .unwrap_or_else(|e| panic!("reading {post_start_dir:?}: {e}")).filter_map(|e| e.ok()).collect();@@ -2012,25 +2009,25 @@ second = "echo SECOND_OUTPUT"#[rstest]fn test_concurrent_hook_user_and_project(repo: TestRepo) {- // Write user config with post-create hook (using table format for named hook)+ // Write user config with post-start hook (using table format for named hook)repo.write_test_config(- r#"[post-create]+ r#"[post-start]user = "echo 'USER_HOOK' > user_hook_ran.txt""#,);- // Write project config with post-create hook- repo.write_project_config(r#"post-create = "echo 'PROJECT_HOOK' > project_hook_ran.txt""#);+ // Write project config with post-start hook+ repo.write_project_config(r#"post-start = "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-create", "--yes"]);+ cmd.args(["hook", "post-start", "--yes"]);let output = cmd.output().unwrap();assert!(output.status.success(),- "wt hook post-create should succeed, stderr: {}",+ "wt hook post-start should succeed, stderr: {}",String::from_utf8_lossy(&output.stderr));@@ -2074,7 +2071,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-create]+ r#"[post-start]first = "echo 'FIRST' > first.txt"second = "echo 'SECOND' > second.txt""#,@@ -2084,12 +2081,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-create", "--yes", "first"]);+ cmd.args(["hook", "post-start", "--yes", "first"]);let output = cmd.output().unwrap();assert!(output.status.success(),- "wt hook post-create --name first should succeed, stderr: {}",+ "wt hook post-start --name first should succeed, stderr: {}",String::from_utf8_lossy(&output.stderr));@@ -2108,7 +2105,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-create]+ r#"[post-start]first = "echo 'FIRST'""#,);@@ -2117,12 +2114,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-create", "--yes", "nonexistent"]);+ cmd.args(["hook", "post-start", "--yes", "nonexistent"]);let output = cmd.output().unwrap();assert!(!output.status.success(),- "wt hook post-create --name nonexistent should fail"+ "wt hook post-start --name nonexistent should fail");let stderr = String::from_utf8_lossy(&output.stderr);@@ -2185,7 +2182,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-create]+ r#"[pre-start]test = "echo '{{ target }}' > target_output.txt""#,);@@ -2194,7 +2191,7 @@ test = "echo '{{ target }}' > target_output.txt".wt_command().args(["hook",- "pre-create",+ "pre-start","--yes","--var","target=CUSTOM_TARGET",@@ -2216,7 +2213,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-create]+ r#"[pre-start]test = "echo '{{ target }} {{ remote }}' > multi_var_output.txt""#,);@@ -2225,7 +2222,7 @@ test = "echo '{{ target }} {{ remote }}' > multi_var_output.txt".wt_command().args(["hook",- "pre-create",+ "pre-start","--yes","--var","target=FIRST",@@ -2249,7 +2246,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-create]+ r#"[pre-start]test = "echo '{{ branch }}' > branch_output.txt""#,);@@ -2258,7 +2255,7 @@ test = "echo '{{ branch }}' > branch_output.txt".wt_command().args(["hook",- "pre-create",+ "pre-start","--yes","--var","branch=CUSTOM_BRANCH_NAME",@@ -2280,7 +2277,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-create", "--var", "no_equals_sign"])+ .args(["hook", "pre-start", "--var", "no_equals_sign"]).output().expect("Failed to run wt");@@ -2298,14 +2295,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-create]+ r#"[pre-start]test = "echo '{{ custom_var }}' > custom_var_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes", "--var", "custom_var=hello"])+ .args(["hook", "pre-start", "--yes", "--var", "custom_var=hello"]).output().expect("Failed to run wt hook");@@ -2327,7 +2324,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-create]+ r#"[pre-start]test = "echo '{{ target }}' > target_output.txt""#,);@@ -2336,7 +2333,7 @@ test = "echo '{{ target }}' > target_output.txt".wt_command().args(["hook",- "pre-create",+ "pre-start","--yes","--var","target=FIRST",@@ -2360,14 +2357,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-create]+ r#"[pre-start]test = "echo '{{ branch }}' > shorthand_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes", "--branch=SHORTHAND_BRANCH"])+ .args(["hook", "pre-start", "--yes", "--branch=SHORTHAND_BRANCH"]).output().expect("Failed to run wt hook");@@ -2389,7 +2386,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-create]+ r#"[pre-start]test = "echo '{{ branch }} {{ target }}' > mixed_output.txt""#,);@@ -2398,7 +2395,7 @@ test = "echo '{{ branch }} {{ target }}' > mixed_output.txt".wt_command().args(["hook",- "pre-create",+ "pre-start","--yes","--branch=SHORT","--var",@@ -2423,14 +2420,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-create]+ r#"[pre-start]test = "echo '{{ my_env }}' > custom_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes", "--my-env=staging"])+ .args(["hook", "pre-start", "--yes", "--my-env=staging"]).output().expect("Failed to run wt hook");@@ -2453,14 +2450,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-create]+ r#"[pre-start]test = "echo '{{ args }}' > args_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes", "--unused-var=value"])+ .args(["hook", "pre-start", "--yes", "--unused-var=value"]).output().expect("Failed to run wt hook");@@ -2482,14 +2479,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-create]+ r#"[pre-start]test = "echo '{{ my_env }}:{{ args }}' > combined_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes", "--my-env=staging"])+ .args(["hook", "pre-start", "--yes", "--my-env=staging"]).output().expect("Failed to run wt hook");@@ -2503,14 +2500,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-create]+ r#"[pre-start]test = "echo '{{ args }}' > dashdash_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes", "--", "--fast", "extra"])+ .args(["hook", "pre-start", "--yes", "--", "--fast", "extra"]).output().expect("Failed to run wt hook");@@ -2532,14 +2529,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-create]+ r#"[pre-start]test = "echo '{{ my_env }}' > deprecated_output.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes", "--var", "my_env=staging"])+ .args(["hook", "pre-start", "--yes", "--var", "my_env=staging"]).output().expect("Failed to run wt hook");@@ -2560,14 +2557,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-create]+ r#"[pre-start]test = "echo '{{ args[0] | default('none') }}:{{ args | length }}' > args_seq.txt""#,);let output = repo.wt_command()- .args(["hook", "pre-create", "--yes", "--", "first", "second"])+ .args(["hook", "pre-start", "--yes", "--", "first", "second"]).output().expect("Failed to run wt hook");@@ -2583,7 +2580,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-create]+ r#"[pre-start]test = "echo '{{ my_env }}|{{ override }}|{{ args }}' > mixed_output.txt""#,);@@ -2592,7 +2589,7 @@ test = "echo '{{ my_env }}|{{ override }}|{{ args }}' > mixed_output.txt".wt_command().args(["hook",- "pre-create",+ "pre-start","--yes","--my-env=prod","--var",@@ -2644,7 +2641,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-create]+ r#"[pre-start]test = "echo '{{ main_worktree }}' > alias_output.txt""#,);@@ -2653,7 +2650,7 @@ test = "echo '{{ main_worktree }}' > alias_output.txt".wt_command().args(["hook",- "pre-create",+ "pre-start","--yes","--var","main_worktree=/custom/path",@@ -2682,7 +2679,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-create]+ r#"[pre-start]vscode = "echo '1' >> hook_order.txt"claude = "echo '2' >> hook_order.txt"copy = "echo '3' >> hook_order.txt"@@ -3122,12 +3119,12 @@ check = "test -d {{ cwd }} && echo 'cwd_exists=true' > ../cwd_check.txt || echo// ============================================================================#[rstest]-fn test_user_post_create_pipeline_serial_ordering(repo: TestRepo) {+fn test_user_post_start_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-create = [+ r#"post-start = ["echo SETUP_DONE > pipeline_marker.txt",{ bg = "cat pipeline_marker.txt > bg_saw_marker.txt" }]@@ -3135,7 +3132,7 @@ fn test_user_post_create_pipeline_serial_ordering(repo: TestRepo) {);snapshot_switch(- "user_post_create_pipeline_ordering",+ "user_post_start_pipeline_ordering",&repo,&["--create", "feature"],);@@ -3152,10 +3149,10 @@ fn test_user_post_create_pipeline_serial_ordering(repo: TestRepo) {}#[rstest]-fn test_user_post_create_pipeline_failure_skips_later_steps(repo: TestRepo) {+fn test_user_post_start_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-create = [+ r#"post-start = ["exit 1",{ bg = "echo SHOULD_NOT_RUN > should_not_exist.txt" }]@@ -3163,7 +3160,7 @@ fn test_user_post_create_pipeline_failure_skips_later_steps(repo: TestRepo) {);snapshot_switch(- "user_post_create_pipeline_failure",+ "user_post_start_pipeline_failure",&repo,&["--create", "feature"],);@@ -3180,12 +3177,12 @@ fn test_user_post_create_pipeline_failure_skips_later_steps(repo: TestRepo) {}#[rstest]-fn test_user_post_create_pipeline_lazy_vars_foreground(repo: TestRepo) {+fn test_user_post_start_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-create = [+ r#"post-start = ["git config worktrunk.state.main.vars.name '{{ branch | sanitize }}-postgres'",{ db = "echo {{ vars.name }} > lazy_expanded.txt" }]@@ -3197,7 +3194,7 @@ fn test_user_post_create_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-create", "--yes", "--foreground"]);+ cmd.args(["hook", "post-start", "--yes", "--foreground"]);let output = cmd.output().expect("Failed to run foreground hook");@@ -3223,13 +3220,13 @@ fn test_user_post_create_pipeline_lazy_vars_foreground(repo: TestRepo) {}#[rstest]-fn test_user_post_create_pipeline_lazy_vars_background(repo: TestRepo) {+fn test_user_post_start_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-create = [+ r#"post-start = ["git config worktrunk.state.{{ branch }}.vars.name '{{ branch | sanitize }}-postgres'",{ db = "echo {{ vars.name }} > lazy_bg_expanded.txt" }]@@ -3237,7 +3234,7 @@ fn test_user_post_create_pipeline_lazy_vars_background(repo: TestRepo) {);snapshot_switch(- "user_post_create_pipeline_lazy_vars_bg",+ "user_post_start_pipeline_lazy_vars_bg",&repo,&["--create", "feature"],);@@ -3254,17 +3251,17 @@ fn test_user_post_create_pipeline_lazy_vars_background(repo: TestRepo) {}#[rstest]-fn test_user_post_create_pipeline_concurrent_all_run(repo: TestRepo) {+fn test_user_post_start_pipeline_concurrent_all_run(repo: TestRepo) {// Concurrent group: both commands should run and produce output.repo.write_test_config(- r#"post-create = [+ r#"post-start = [{ a = "echo AAA > concurrent_a.txt", b = "echo BBB > concurrent_b.txt" }]"#,);snapshot_switch(- "user_post_create_pipeline_concurrent_all",+ "user_post_start_pipeline_concurrent_all",&repo,&["--create", "feature"],);@@ -3288,12 +3285,12 @@ fn test_user_post_create_pipeline_concurrent_all_run(repo: TestRepo) {}#[rstest]-fn test_user_post_create_pipeline_concurrent_partial_failure(repo: TestRepo) {+fn test_user_post_start_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-create = [+ r#"post-start = [{ fail = "exit 1", ok = "echo SURVIVED > concurrent_survivor.txt" },"echo SHOULD_NOT_RUN > after_concurrent.txt"]@@ -3301,7 +3298,7 @@ fn test_user_post_create_pipeline_concurrent_partial_failure(repo: TestRepo) {);snapshot_switch(- "user_post_create_pipeline_concurrent_failure",+ "user_post_start_pipeline_concurrent_failure",&repo,&["--create", "feature"],);@@ -3327,13 +3324,13 @@ fn test_user_post_create_pipeline_concurrent_partial_failure(repo: TestRepo) {}#[rstest]-fn test_user_post_create_pipeline_shell_escaping(repo: TestRepo) {+fn test_user_post_start_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-create = [+ r#"post-start = ["git config worktrunk.state.{{ branch }}.vars.tricky 'hello world $HOME \"quotes\"'",{ check = "echo {{ vars.tricky }} > escaped_output.txt" }]@@ -3344,7 +3341,7 @@ fn test_user_post_create_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-create", "--yes", "--foreground"]);+ cmd.args(["hook", "post-start", "--yes", "--foreground"]);let output = cmd.output().expect("Failed to run foreground hook");assert!(@@ -3377,12 +3374,12 @@ fn test_user_post_create_pipeline_shell_escaping(repo: TestRepo) {// ============================================================================#[rstest]-fn test_user_post_create_pipeline_hook_name_per_step(repo: TestRepo) {+fn test_user_post_start_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-create = [+ r#"post-start = [{ step_one = "echo {{ hook_name }} > step_one_name.txt" },{ step_two = "echo {{ hook_name }} > step_two_name.txt" }]@@ -3390,7 +3387,7 @@ fn test_user_post_create_pipeline_hook_name_per_step(repo: TestRepo) {);snapshot_switch(- "user_post_create_pipeline_hook_name_per_step",+ "user_post_start_pipeline_hook_name_per_step",&repo,&["--create", "feature"],);@@ -3495,12 +3492,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-create db`. Before the fix, the flat+ // name-filtered via `wt hook post-start 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-create = [+ r#"post-start = [{ setup = "echo setup" },{ db = "echo {{ vars.name }} > lazy_filtered.txt" }]@@ -3515,7 +3512,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-create", "db"], None);+ let mut cmd = make_snapshot_cmd(&repo, "hook", &["post-start", "db"], None);assert_cmd_snapshot!("standalone_hook_name_filtered_lazy_template", cmd);});@@ -3570,7 +3567,7 @@ fn test_foreground_hook_passes_directive_file(repo: TestRepo) {// installed" hint instead.repo.write_test_config(&format!(r#"-[pre-create]+[pre-start]setup = "'{wt_toml}' switch --create hook-created --no-hooks""#,));@@ -3579,8 +3576,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-create hook manually in foreground- cmd.args(["hook", "pre-create", "setup"]);+ // Run the pre-start hook manually in foreground+ cmd.args(["hook", "pre-start", "setup"]);let output = cmd.output().unwrap();assert!(@@ -3728,12 +3725,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_create_verbose_shows_per_hook_output` doesn't hit.+/// `test_post_start_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-create = "echo user-hook""#);- repo.write_project_config(r#"post-create = "echo project-hook""#);- repo.commit("add post-create");+ 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_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 371caeb76..e1af7a28d 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-create:+[2m○[22m pre-start:[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-create project hook @ [1m_REPO_.test-approve[22m[39m+[36m◎[39m [36mRunning pre-start 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 31abb5fc3..8b92d8238 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-create:+[2m○[22m pre-start:[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 433ad1713..2fecbf9f1 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-create [1mfirst[22m:+[2m○[22m pre-start [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-create [1mthird[22m:+[2m○[22m pre-start [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-create [1mproject:first[22m @ [1m_REPO_.test-mixed-accept[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:second[22m @ [1m_REPO_.test-mixed-accept[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:third[22m @ [1m_REPO_.test-mixed-accept[22m[39m+[36m◎[39m [36mRunning pre-start [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 f0df94aaa..acc3810cc 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-create [1mfirst[22m:+[2m○[22m pre-start [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-create [1mthird[22m:+[2m○[22m pre-start [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 8708212d8..b1f00710b 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-create [1mfirst[22m:+[2m○[22m pre-start [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-create [1msecond[22m:+[2m○[22m pre-start [1msecond[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Second command'[0m[2m-[2m○[22m pre-create [1mthird[22m:+[2m○[22m pre-start [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-create [1mproject:first[22m @ [1m_REPO_.test-multi[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:second[22m @ [1m_REPO_.test-multi[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:third[22m @ [1m_REPO_.test-multi[22m[39m+[36m◎[39m [36mRunning pre-start [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 d15a15dbb..70df98529 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-create [1minstall[22m:+[2m○[22m pre-start [1minstall[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2m-[2m○[22m pre-create [1mbuild[22m:+[2m○[22m pre-start [1mbuild[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2m-[2m○[22m pre-create [1mtest[22m:+[2m○[22m pre-start [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-create [1mproject:install[22m @ [1m_REPO_.test-named[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:build[22m @ [1m_REPO_.test-named[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:test[22m @ [1m_REPO_.test-named[22m[39m+[36m◎[39m [36mRunning pre-start [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 1b28669e3..38062520e 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-create:+[2m○[22m pre-start:[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-create project hook @ [1m_REPO_.test-permission[22m[39m+[36m◎[39m [36mRunning pre-start 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 e09740dcf..4496d4c83 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@@ -57,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.test-approved[22m[39m+[36m◎[39m [36mRunning pre-start 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 187b82a25..cc1b1bca2 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@@ -58,7 +58,7 @@ exit_code: 1----- stderr -----[33m▲[39m [33m[1morigin[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-create:+[2m○[22m pre-start:[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 195234e6a..3b4fb5eae 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-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+[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[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-create [1mfirst[22m:+[2m○[22m pre-start [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-create [1mthird[22m:+[2m○[22m pre-start [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 bdd14b62d..7531b3d15 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-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+[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[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-create [1mbranch[22m:+[2m○[22m pre-start [1mbranch[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Branch: {{ branch }}'[0m[2m-[2m○[22m pre-create [1mworktree[22m:+[2m○[22m pre-start [1mworktree[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Worktree: {{ worktree_path }}'[0m[2m-[2m○[22m pre-create [1mrepo[22m:+[2m○[22m pre-start [1mrepo[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Repo: {{ repo }}'[0m[2m-[2m○[22m pre-create [1mpwd[22m:+[2m○[22m pre-start [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 fbe312867..2cd78fd1f 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-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+[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[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-create [1minstall[22m:+[2m○[22m pre-start [1minstall[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2m-[2m○[22m pre-create [1mbuild[22m:+[2m○[22m pre-start [1mbuild[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Building project...'[0m[2m-[2m○[22m pre-create [1mtest[22m:+[2m○[22m pre-start [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 fe8a4037d..35034f56c 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-create:+[2m○[22m pre-start:[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 195234e6a..3b4fb5eae 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-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+[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[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-create [1mfirst[22m:+[2m○[22m pre-start [1mfirst[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'First command'[0m[2m-[2m○[22m pre-create [1mthird[22m:+[2m○[22m pre-start [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 c14744e1e..8ff28129e 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@@ -58,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.test-yes-tty[22m[39m+[36m◎[39m [36mRunning pre-start 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 da81989bc..70368040d 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@@ -58,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.test-yes[22m[39m+[36m◎[39m [36mRunning pre-start 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 a77909609..ff5aa65a1 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-create:+[2m○[22m pre-start:[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 9031e34c2..40dfe8248 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@@ -59,7 +59,7 @@ exit_code: 1----- stderr -----[33m▲[39m [33m[1morigin[22m needs approval to execute [1m1[22m command:[39m-[2m○[22m pre-create:+[2m○[22m pre-start:[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 0cdc2eb3f..66758aae6 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@@ -52,7 +52,7 @@ exit_code: 1----- stderr -----▲ repo needs approval to execute 1 command:-○ pre-create:+○ pre-start: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 8b4d5a73b..53cab2de1 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 da40ce6..12d38d2 100644[m+[107m [0m [1mindex dee4883..5eef8a6 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-create = "ln -sf {{ repo_root }}/node_modules"[m+[107m [0m [31m-pre-start = "ln -sf {{ repo_root }}/node_modules"[m[107m [0m [32m+[m[32mworktree-path = "../{{ repo }}.{{ branch }}"[m-[107m [0m [32m+[m[32mpre-create = "ln -sf {{ repo_path }}/node_modules"[m+[107m [0m [32m+[m[32mpre-start = "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 ffc037a6a..3034ed8e6 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-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+[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[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 a85327e..319e745 100644[m+[107m [0m [1mindex 3a61835..dc2a222 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-create][m-[107m [0m [32m+[m[32m[[pre-create]][m+[107m [0m [31m-[pre-start][m+[107m [0m [32m+[m[32m[[pre-start]][m[107m [0m install = "npm ci"[m[107m [0m [32m+[m-[107m [0m [32m+[m[32m[[pre-create]][m+[107m [0m [32m+[m[32m[[pre-start]][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.snapindex 176867c78..27cf55819 100644--- 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.snap@@ -55,15 +55,7 @@ success: trueexit_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+[107m [0m [2mpre-start = [0m[2m[32m"npm install"[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_with_project_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snapindex ec94aa553..6e5015965 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-create = [0m[2m[32m"npm install"+[107m [0m [2mpre-start = [0m[2m[32m"npm install"[107m [0m-[107m [0m [2m[36m[post-create]+[107m [0m [2m[36m[post-start][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 fefaf8826..b61ed41f3 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@@ -62,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 61ddfbb..0a92575 100644[m+[107m [0m [1mindex 7cc556b..b3535c5 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-create = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"[m+[107m [0m [31m-pre-start = "ln -sf {{ repo_root }}/node_modules {{ worktree }}/node_modules"[m[107m [0m [32m+[m[32mworktree-path = "../{{ repo }}.{{ branch }}"[m-[107m [0m [32m+[m[32mpre-create = "ln -sf {{ repo_path }}/node_modules {{ worktree_path }}/node_modules"[m+[107m [0m [32m+[m[32mpre-start = "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 b4be5ddd0..801b6c615 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-create/server.log",- "hook_type": "post-create",+ "file": "main/user/post-start/server.log",+ "hook_type": "post-start","modified_at": "<TIMESTAMP>","name": "server",- "path": "_REPO_/.git/wt/logs/main/user/post-create/server.log",+ "path": "_REPO_/.git/wt/logs/main/user/post-start/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 2b8cda83f..ba876b2cc 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-create/npm.log 10B future+ File Size Age+ ─────────────────────────────── ──── ──────+ bugfix/internal/remove.log 13B future+ feature/user/post-start/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 986807208..4c275aeb6 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 da40ce6..12d38d2 100644[m+[107m [0m [1mindex dee4883..5eef8a6 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-create = "ln -sf {{ repo_root }}/node_modules"[m+[107m [0m [31m-pre-start = "ln -sf {{ repo_root }}/node_modules"[m[107m [0m [32m+[m[32mworktree-path = "../{{ repo }}.{{ branch }}"[m-[107m [0m [32m+[m[32mpre-create = "ln -sf {{ repo_path }}/node_modules"[m+[107m [0m [32m+[m[32mpre-start = "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 c5ec3f0cb..b8bb8e69e 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 da40ce6..12d38d2 100644[m+[107m [0m [1mindex dee4883..5eef8a6 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-create = "ln -sf {{ repo_root }}/node_modules"[m+[107m [0m [31m-pre-start = "ln -sf {{ repo_root }}/node_modules"[m[107m [0m [32m+[m[32mworktree-path = "../{{ repo }}.{{ branch }}"[m-[107m [0m [32m+[m[32mpre-create = "ln -sf {{ repo_path }}/node_modules"[m+[107m [0m [32m+[m[32mpre-start = "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 dc79095b3..36b141194 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-create.env = "cp .env.example .env"[0m+[107m [0m [2m# pre-start.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-create.server = "..."` and a `[projects."github.com/user/repo".post-create]` 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-start.server = "..."` and a `[projects."github.com/user/repo".post-start]` 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-create = "mise trust"[0m+[107m [0m [2m# post-start = "mise trust"[0m[107m [0m [2m#[0m[107m [0m [2m# # Multiple commands, running concurrently[0m-[107m [0m [2m# [projects."github.com/user/repo".post-create][0m+[107m [0m [2m# [projects."github.com/user/repo".post-start][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-create]][0m+[107m [0m [2m# [[projects."github.com/user/repo".post-start]][0m[107m [0m [2m# install = "npm ci"[0m[107m [0m [2m#[0m-[107m [0m [2m# [[projects."github.com/user/repo".post-create]][0m+[107m [0m [2m# [[projects."github.com/user/repo".post-start]][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-create = "npm ci"[0m-[107m [0m [2m# post-create = "npm run dev"[0m+[107m [0m [2m# pre-start = "npm ci"[0m+[107m [0m [2m# post-start = "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 7496c09ad..0b4f210b1 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-create][0m+[107m [0m [2m[36m[pre-start][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-create.env = [0m[2m[32m"cp .env.example .env"[0m+[107m [0m [2mpre-start.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-create.server = "..."[0m and a [2m[projects."github.com/user/repo".post-create][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-start.server = "..."[0m and a [2m[projects."github.com/user/repo".post-start][0m table the same way:[107m [0m [2m# Single command[0m[107m [0m [2m[36m[projects."github.com/user/repo"][0m-[107m [0m [2mpost-create = [0m[2m[32m"mise trust"[0m+[107m [0m [2mpost-start = [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-create][0m+[107m [0m [2m[36m[projects."github.com/user/repo".post-start][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-create]][0m+[107m [0m [2m[36m[[projects."github.com/user/repo".post-start]][0m[107m [0m [2minstall = [0m[2m[32m"npm ci"[0m[107m [0m-[107m [0m [2m[36m[[projects."github.com/user/repo".post-create]][0m+[107m [0m [2m[36m[[projects."github.com/user/repo".post-start]][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-create = [0m[2m[32m"npm ci"[0m-[107m [0m [2mpost-create = [0m[2m[32m"npm run dev"[0m+[107m [0m [2mpre-start = [0m[2m[32m"npm ci"[0m+[107m [0m [2mpost-start = [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 0b9b1b667..d7b0058e6 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@@ -98,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-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.+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.[32mDiagnostic files[0m@@ -126,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-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[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[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 7eeb2bf4b..8ac22d88f 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap@@ -144,8 +144,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-create hooks, blocking until complete-5. Spawns post-create and post-switch hooks in the background+4. Runs pre-start hooks, blocking until complete+5. Spawns post-start 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_create.snap b/tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_start.snapsimilarity index 89%rename from tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_create.snaprename to tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_start.snapindex 1783bdd19..abf2e4538 100644--- a/tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_create.snap+++ b/tests/snapshots/integration__integration_tests__help__nested_subcommand_hook_pre_start.snap@@ -3,7 +3,7 @@ source: tests/integration_tests/help.rsinfo:program: wtargs:- - pre-create+ - pre-startenv:CLICOLOR_FORCE: "1"COLUMNS: "500"@@ -38,10 +38,10 @@ exit_code: 2----- stdout ---------- stderr ------[1m[31merror:[0m unrecognized subcommand '[1m[33mpre-create[0m'+[1m[31merror:[0m unrecognized subcommand '[1m[33mpre-start[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-create[39m[22m?+ [33mtip:[39m perhaps [36m[1mwt hook pre-start[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 9cbc556d4..179ca8eea 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-create [1mglobal-hook[22m:+[2m○[22m post-start [1mglobal-hook[22m:[107m [0m [2m[0m[2m[34mecho[0m[2m global-[2m○[22m post-create [1mproject-hook[22m:+[2m○[22m post-start [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 b97333a57..338e557d4 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@@ -58,7 +58,7 @@ exit_code: 0[2m↳[22m [2m(none configured)[22m[36mPROJECT HOOKS[39m @ _REPO_/.config/wt.toml-[36m❯[39m post-create [1mdeps[22m: [2m(requires approval)[22m+[36m❯[39m post-start [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_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.snapdeleted file mode 100644index 76dda7e31..000000000--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_mixed_user_pipeline_project_flat.snap+++ /dev/null@@ -1,64 +0,0 @@-----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_create_commands__post_create_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiple_background.snapdeleted file mode 100644index 2be275ebe..000000000--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiple_background.snap+++ /dev/null@@ -1,64 +0,0 @@-----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_pipeline_template_vars.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_pipeline_template_vars.snapdeleted file mode 100644index 45960b19e..000000000--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_pipeline_template_vars.snap+++ /dev/null@@ -1,64 +0,0 @@-----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.snapdeleted file mode 100644index 3342dc060..000000000--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_project_pipeline.snap+++ /dev/null@@ -1,64 +0,0 @@-----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.snapdeleted file mode 100644index aa5572e03..000000000--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_separate_logs.snap+++ /dev/null@@ -1,64 +0,0 @@-----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.snapdeleted file mode 100644index 4a6248e64..000000000--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_background.snap+++ /dev/null@@ -1,64 +0,0 @@-----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_target_variable.snap b/tests/snapshots/integration__integration_tests__post_create_commands__post_create_target_variable.snapdeleted file mode 100644index 4a6248e64..000000000--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_target_variable.snap+++ /dev/null@@ -1,64 +0,0 @@-----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__both_pre_and_post_create.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_pre_and_post_start.snapsimilarity index 89%rename from tests/snapshots/integration__integration_tests__post_create_commands__both_pre_and_post_create.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__both_pre_and_post_start.snapindex 1fafa1754..39c9737c7 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__both_pre_and_post_create.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__both_pre_and_post_start.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -57,10 +57,10 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start 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-create: [1mserver[22m (project) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [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_start_commands__execute_with_post_start.snapsimilarity index 94%rename from tests/snapshots/integration__integration_tests__post_create_commands__execute_with_post_create.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snapindex bc7ca8775..70407b37e 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__execute_with_post_create.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -63,6 +63,6 @@ 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[39m+[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__invalid_toml.snap b/tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snapsimilarity index 90%rename from tests/snapshots/integration__integration_tests__post_create_commands__invalid_toml.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snapindex 0488ee4d6..af7213541 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__invalid_toml.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__invalid_toml.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -59,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 29+[107m [0m TOML parse error at line 1, column 28[107m [0m |-[107m [0m 1 | pre-create = [invalid syntax-[107m [0m | ^+[107m [0m 1 | pre-start = [invalid syntax+[107m [0m | ^[107m [0m unclosed array, expected `]`diff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_base_variables.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_base_variables.snapsimilarity index 80%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_base_variables.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_base_variables.snapindex 7659db927..1b61b0a15 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_base_variables.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_base_variables.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -59,11 +59,11 @@ exit_code: 0----- stdout ---------- stderr ------[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+[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[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-create [1mproject:base[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:base_path[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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_create_commands__post_create_create_with_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snapsimilarity index 93%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_create_with_command.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snapindex 4a6248e64..9e4fdf7a2 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_create_with_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -61,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-create: project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_complex_shell.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snapsimilarity index 93%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_complex_shell.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snapindex 4a6248e64..9e4fdf7a2 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_complex_shell.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -61,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-create: project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_default_branch_template.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_default_branch_template.snapsimilarity index 93%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_default_branch_template.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_default_branch_template.snapindex cb217a766..0198742e2 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_default_branch_template.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_default_branch_template.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -58,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start 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_create_commands__post_create_failing_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_failing_command.snapsimilarity index 85%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_failing_command.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_failing_command.snapindex cb1a8d83c..504e574b3 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_failing_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_failing_command.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -57,7 +57,7 @@ exit_code: 1----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start project hook @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mexit[0m[2m 1-[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[22m+[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[22mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_git_variables_template.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_git_variables_template.snapsimilarity index 72%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_git_variables_template.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_git_variables_template.snapindex f97fc1935..2e3e0a285 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_git_variables_template.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_git_variables_template.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -58,15 +58,15 @@ exit_code: 0----- stdout ---------- stderr ------[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+[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[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[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+[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[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-create [1mproject:worktree_name[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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_start_commands__post_start_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snapnew file mode 100644index 000000000..9e4fdf7a2--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap@@ -0,0 +1,64 @@+---+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_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-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.snapnew file mode 100644index 000000000..9e4fdf7a2--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap@@ -0,0 +1,64 @@+---+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_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-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.snapnew file mode 100644index 000000000..f10af8f33--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_mixed_user_pipeline_project_flat.snap@@ -0,0 +1,64 @@+---+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_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-start: …, [1muser_bg[22m (user); [1mproj[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_control_structure.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_control_structure.snapsimilarity index 94%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_control_structure.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_control_structure.snapindex feed7d341..ba3a4af7d 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_control_structure.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_control_structure.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -57,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start 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_start_commands__post_start_multiline_with_newlines.snapsimilarity index 93%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_with_newlines.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snapindex 8354018bf..03bb723f6 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_multiline_with_newlines.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -60,4 +60,4 @@ exit_code: 0[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[39m+[36m◎[39m [36mRunning post-start: 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_start_commands__post_start_multiple_background.snapsimilarity index 92%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_log_captures_output.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snapindex 4a6248e64..719ad718e 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_log_captures_output.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -61,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-create: project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1mtask1[22m & [1mtask2[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_named_commands.snapsimilarity index 79%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_named_commands.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_named_commands.snapindex 6ea21f10c..79e2867e1 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_named_commands.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_named_commands.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -57,12 +57,12 @@ exit_code: 0----- stdout ---------- stderr ------[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+[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[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-create [1mproject:install[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:setup[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start [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_create_commands__post_create_no_config.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_no_config.snapsimilarity index 97%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_no_config.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_no_config.snapindex df2ac08b8..5f9f4f9db 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_no_config.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_no_config.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:diff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snapsimilarity index 92%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_invalid_command.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snapindex 4a6248e64..57147bbc5 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_invalid_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_pipeline_template_vars.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -61,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-create: project @ [1m_REPO_.feature[22m[39m+[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.snapnew file mode 100644index 000000000..a99b2fad9--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_project_pipeline.snap@@ -0,0 +1,64 @@+---+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_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-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.snapnew file mode 100644index 000000000..88a18b6d4--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap@@ -0,0 +1,64 @@+---+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_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-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.snapnew file mode 100644index 000000000..9e4fdf7a2--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap@@ -0,0 +1,64 @@+---+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_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-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_command.snapsimilarity index 93%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_command.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_command.snapindex 87050eacd..2548276c9 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_single_command.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_command.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -57,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start 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_create_commands__post_create_skip_existing.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snapsimilarity index 97%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_skip_existing.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snapindex e97fc91e5..0da82d5b2 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_skip_existing.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:diff --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.snapnew file mode 100644index 000000000..9e4fdf7a2--- /dev/null+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_target_variable.snap@@ -0,0 +1,64 @@+---+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_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-start: project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_template_expansion.snapsimilarity index 75%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_template_expansion.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_template_expansion.snapindex 09561d445..d2dbca33f 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_template_expansion.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_template_expansion.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -57,17 +57,17 @@ exit_code: 0----- stdout ---------- stderr ------[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+[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[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-create [1mproject:repo[22m @ [1m_REPO_.feature-test[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1mproject:branch[22m @ [1m_REPO_.feature-test[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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-create [1mproject:hash_port[22m @ [1m_REPO_.feature-test[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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-create [1mproject:worktree[22m @ [1m_REPO_.feature-test[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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-create [1mproject:root[22m @ [1m_REPO_.feature-test[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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_create_commands__post_create_upstream_conditional.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_upstream_conditional.snapsimilarity index 93%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_conditional.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_upstream_conditional.snapindex 21299e0af..15d35d0b5 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_conditional.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_upstream_conditional.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -58,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start 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_create_commands__post_create_upstream_template.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_upstream_template.snapsimilarity index 93%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_template.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_upstream_template.snapindex 742073895..cd7ef5a64 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_upstream_template.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_upstream_template.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -58,6 +58,6 @@ exit_code: 1----- stdout ---------- stderr ------[31m✗[39m [31mFailed to expand project pre-create hook: undefined value @ line 1[39m+[31m✗[39m [31mFailed to expand project pre-start 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_create_commands__post_create_verbose_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snapsimilarity index 91%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_output.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snapindex f5a0160d1..80b120d73 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_output.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_output.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -74,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 = cc56115a2d40689b4609d28787b6c4c0f8911148-[107m [0m short_commit = cc56115+[107m [0m commit = d545a78b148af245c616612b474fd2049705c00c+[107m [0m short_commit = d545a78[107m [0m upstream = (unset)[107m [0m base = main[107m [0m base_worktree_path = _REPO_@@ -91,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-create+[107m [0m hook_type = post-start[107m [0m hook_name = setup-[36m◎[39m [36mRunning post-create: [1msetup[22m (project) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1msetup[22m (project) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_template_expansion.snapsimilarity index 91%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_template_expansion.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_template_expansion.snapindex 593827fe9..39b559bd4 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_create_verbose_template_expansion.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_verbose_template_expansion.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:@@ -70,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 = 10d3d6e5762be0da3395f897e4656e429b1e5e94-[107m [0m short_commit = 10d3d6e+[107m [0m commit = 7900f355a9d429e8ac86370140fe4622e7d27e33+[107m [0m short_commit = 7900f35[107m [0m upstream = (unset)[107m [0m base = main[107m [0m base_worktree_path = _REPO_@@ -87,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-create+[107m [0m hook_type = pre-start[107m [0m hook_name = setup-[36m◎[39m [36mRunning pre-create [1mproject:setup[22m @ [1m_REPO_.verbose-hooks[22m[39m+[36m◎[39m [36mRunning pre-start [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_create_commands__post_switch_target_variable_existing.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_switch_target_variable_existing.snapsimilarity index 97%rename from tests/snapshots/integration__integration_tests__post_create_commands__post_switch_target_variable_existing.snaprename to tests/snapshots/integration__integration_tests__post_start_commands__post_switch_target_variable_existing.snapindex 525b48081..5c7958ae2 100644--- a/tests/snapshots/integration__integration_tests__post_create_commands__post_switch_target_variable_existing.snap+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_switch_target_variable_existing.snap@@ -1,5 +1,5 @@----source: tests/integration_tests/post_create_commands.rs+source: tests/integration_tests/post_start_commands.rsinfo:program: wtargs:diff --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 417755e50..976bf773f 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-create: project[39m+[36m◎[39m [36mRunning post-start: 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 77340c40d..16af8bb7a 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-create install:+○ pre-start install:echo 'Installing dependencies...'-○ pre-create build:+○ pre-start build:echo 'Building project...'-○ pre-create test:+○ pre-start 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_create.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snapsimilarity index 74%rename from tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_create.snaprename to tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snapindex 98a26bc74..60a26d8d4 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_create.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__readme_example_hooks_pre_start.snap@@ -3,11 +3,11 @@ source: tests/integration_tests/shell_wrapper.rsexpression: "&output.combined"----[36m◎[39m [36mRunning pre-create [1mproject:install[22m[39m+[36m◎[39m [36mRunning pre-start [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-create: [1mdev[22m (project)[39m+[36m◎[39m [36mRunning post-start: [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 d1f9527d3..3ceb1698a 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-create [1mproject:install[22m[39m+[36m◎[39m [36mRunning pre-start [1mproject:install[22m[39m[107m [0m [2m[0m[2m[34mecho[0m[2m [0m[2m[32m'Installing dependencies...'[0m[2mInstalling dependencies...-[36m◎[39m [36mRunning pre-create [1mproject:build[22m[39m+[36m◎[39m [36mRunning pre-start [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-create: [1mserver[22m & [1mwatch[22m (project)[39m+[36m◎[39m [36mRunning post-start: [1mserver[22m & [1mwatch[22m (project)[39mdiff --git a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_create_command_no_directive_leak.snap b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snapsimilarity index 85%rename from tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_create_command_no_directive_leak.snaprename to tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_command_no_directive_leak.snapindex 3007eb60a..f200e69c6 100644--- a/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_create_command_no_directive_leak.snap+++ b/tests/snapshots/integration__integration_tests__shell_wrapper__unix_tests__switch_with_post_start_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-create: project[39m+[36m◎[39m [36mRunning post-start: 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 70890b221..25d9666f1 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-create: project[39m+[36m◎[39m [36mRunning post-start: 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 f74cabb0f..747515567 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_combined_hooks.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_combined_hooks.snap@@ -62,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-create: project @ [1m_REPO_.combined-hooks-test[22m[39m+[36m◎[39m [36mRunning post-switch: project; post-start: project @ [1m_REPO_.combined-hooks-test[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_create.snap b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snapsimilarity index 92%rename from tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_create.snaprename to tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snapindex 2c9767d4f..8ccbde604 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_create.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_no_hooks_skips_post_start.snap@@ -5,7 +5,7 @@ info:args:- switch- "--create"- - no-post-create+ - no-post-start- "--no-hooks"env:APPDATA: "[TEST_CONFIG_HOME]"@@ -58,7 +58,7 @@ exit_code: 0----- stdout ---------- stderr ------[32m✓[39m [32mCreated branch [1mno-post-create[22m from [1mmain[22m and worktree @ [1m_REPO_.no-post-create[22m[39m+[32m✓[39m [32mCreated branch [1mno-post-start[22m from [1mmain[22m and worktree @ [1m_REPO_.no-post-start[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 8e89fbe2f..25dfd7c2f 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@@ -57,10 +57,10 @@ exit_code: 0----- stdout ---------- stderr ------[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+[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[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-create: [1mcapture-bg[22m (user) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [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 bc93aaff0..dd8280839 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@@ -66,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-create hook[22m+[2m○[22m Expanding [1muser post-start 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-create hook[22m+[2m○[22m Expanding [1mproject post-start 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@@ -78,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 = 5fd290273dcb433c49ba3d0d37601e1d034a113d-[107m [0m short_commit = 5fd2902+[107m [0m commit = 26c70caa73d841981f190bafd2a2a6e1d4eed34e+[107m [0m short_commit = 26c70ca[107m [0m upstream = (unset)[107m [0m base = main[107m [0m base_worktree_path = _REPO_@@ -95,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-create+[107m [0m hook_type = post-start[107m [0m hook_name = (unset)-[36m◎[39m [36mRunning post-create: user; project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: 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 6f55cfb1b..499f0d363 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-create+ - post-start- dbenv:APPDATA: "[TEST_CONFIG_HOME]"@@ -57,4 +57,4 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning post-create: [1mdb[22m (user)[39m+[36m◎[39m [36mRunning post-start: [1mdb[22m (user)[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_post_start.snapnew file mode 100644index 000000000..fe023c429--- /dev/null+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_start.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-start: [1mbg[22m (user); project @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_create.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_start.snapsimilarity index 95%rename from tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_create.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_start.snapindex f20fbd0c0..a3bef767a 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_create.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_unnamed_post_start.snap@@ -61,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-create: user; project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: 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 a8ba290ab..980f3ddbe 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@@ -57,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create [1muser:vars[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start [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 662135e4c..ef390ee39 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@@ -57,9 +57,9 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create [1muser:log[22m @ [1m_REPO_.feature[22m[39m+[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_HOOK'[0m[2m [0m[2m[36m>>[0m[2m hook_order.txt-[0m[36m◎[39m [36mRunning pre-create project hook @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-start 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 d4534b858..3e8538831 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@@ -57,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create [1muser:setup[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start [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 7665272e2..8249586ba 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@@ -57,15 +57,15 @@ exit_code: 0----- stdout ---------- stderr ------[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+[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[2m↳[22m [2mTo see details, run [4mwt config show[24m; to apply updates, run [4mwt config update[24m[22m-[36m◎[39m [36mRunning pre-create [1muser:vscode[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start [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-create [1muser:claude[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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-create [1muser:copy[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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-create [1muser:submodule[22m @ [1m_REPO_.feature[22m[39m+[0m[36m◎[39m [36mRunning pre-start [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_pipeline_concurrent_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_failure.snapdeleted file mode 100644index 534e4c800..000000000--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_failure.snap+++ /dev/null@@ -1,64 +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_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_post_create_pipeline_hook_name_per_step.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_hook_name_per_step.snapdeleted file mode 100644index fda3ab5b7..000000000--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_hook_name_per_step.snap+++ /dev/null@@ -1,64 +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_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_create_pipeline_ordering.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_ordering.snapdeleted file mode 100644index 11209577a..000000000--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_ordering.snap+++ /dev/null@@ -1,64 +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_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) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snapsimilarity index 95%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snapindex 8dcfd620d..bb4e31fc0 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_executes.snap@@ -61,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-create: [1mbg[22m (user) @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [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_start_failure.snapsimilarity index 86%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_start_failure.snapindex 902b8fadf..6c66d92aa 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_failure.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_failure.snap@@ -57,7 +57,7 @@ exit_code: 1----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create [1muser:failing[22m @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning pre-start [1muser:failing[22m @ [1m_REPO_.feature[22m[39m[107m [0m [2m[0m[2m[34mexit[0m[2m 1-[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[22m+[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[22mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_create.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snapsimilarity index 95%rename from tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_create.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snapindex 14a3a28b5..c908e901d 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_and_project_post_create.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_all.snap@@ -61,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-create: [1mbg[22m (user); project @ [1m_REPO_.feature[22m[39m+[36m◎[39m [36mRunning post-start: [1ma[22m & [1mb[22m (user) @ [1m_REPO_.feature[22m[39mdiff --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_start_pipeline_concurrent_failure.snapsimilarity index 94%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_concurrent_all.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_concurrent_failure.snapindex 6e5246432..6a9c453a2 100644--- 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_start_pipeline_concurrent_failure.snap@@ -61,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-create: [1ma[22m & [1mb[22m (user) @ [1m_REPO_.feature[22m[39m+[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_create_pipeline_lazy_vars_bg.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snapsimilarity index 95%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_lazy_vars_bg.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snapindex 01067ff60..57d48c6a4 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_lazy_vars_bg.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_failure.snap@@ -61,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-create: …, [1mdb[22m (user) @ [1m_REPO_.feature[22m[39m+[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.snapnew file mode 100644index 000000000..3ee8923c3--- /dev/null+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_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-start: [1mstep_one[22m, [1mstep_two[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_failure.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snapsimilarity index 95%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_failure.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snapindex 11209577a..6d5b3ec34 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_pipeline_failure.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_lazy_vars_bg.snap@@ -61,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-create: …, [1mbg[22m (user) @ [1m_REPO_.feature[22m[39m+[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.snapnew file mode 100644index 000000000..57d48c6a4--- /dev/null+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_pipeline_ordering.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-start: …, [1mbg[22m (user) @ [1m_REPO_.feature[22m[39mdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_post_create_skipped_no_hooks.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_post_start_skipped_no_hooks.snapsimilarity index 100%rename from tests/snapshots/integration__integration_tests__user_hooks__user_post_create_skipped_no_hooks.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_post_start_skipped_no_hooks.snapdiff --git a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_create_executes.snap b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_start_executes.snapsimilarity index 96%rename from tests/snapshots/integration__integration_tests__user_hooks__user_pre_create_executes.snaprename to tests/snapshots/integration__integration_tests__user_hooks__user_pre_start_executes.snapindex 9ef513c56..34e64a290 100644--- a/tests/snapshots/integration__integration_tests__user_hooks__user_pre_create_executes.snap+++ b/tests/snapshots/integration__integration_tests__user_hooks__user_pre_start_executes.snap@@ -57,7 +57,7 @@ exit_code: 0----- stdout ---------- stderr ------[36m◎[39m [36mRunning pre-create [1muser:log[22m @ [1m_REPO_.feature[22m[39m+[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_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