Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Release v0.42.0
Maximilian Roosa24e9577a208
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8c818d57e..d5e4394e7 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,29 @@# Changelog+## 0.42.0++### Improved++- **Alias banner is silent when there's nothing to summarize**: `◎ Running alias <name>` now only prints when the alias has at least one named step worth naming. Single unnamed aliases (`ls = "wt list"`) and all-anonymous pipelines return no announcement — the banner was just echoing the user's typed name. Pipelines with named steps keep their informative summary (`◎ Running alias deploy: install; build, lint`). `-v` still prints the bare form as a confirmation line. ([#2339](https://github.com/max-sixty/worktrunk/pull/2339), thanks @markjaquith for reporting [#2322](https://github.com/max-sixty/worktrunk/issues/2322))++- **Alias dispatch ~30% faster via batched git config reads**: `RepoCache` now reads every config key with a single `git config --list -z` instead of one `git config` subprocess per key. Config-backed accessors (`is_bare`, `primary_remote`, `remote_url`, `default_branch` fast path, `switch_previous`, `has_shown_hint`, `core.fsmonitor`, `core.pager`, and more) resolve via an O(1) map lookup. Writes route through `set_config_value` / `unset_config` helpers that update the on-disk config and the in-memory map together. Benchmarked on `benches/alias`: `warm/1` 77.4 → 56.9 ms (−29%), `cold/100` 80.5 → 54.5 ms (−30%) — ~25 ms saved per `wt <alias>` invocation. ([#2344](https://github.com/max-sixty/worktrunk/pull/2344), [#2346](https://github.com/max-sixty/worktrunk/pull/2346), thanks @markjaquith for reporting [#2322](https://github.com/max-sixty/worktrunk/issues/2322))++- **Further O(1) single-branch upstream lookups on `wt merge` / `wt switch`**: Follow-up to [#2337](https://github.com/max-sixty/worktrunk/pull/2337). `effective_integration_target` and the `wt switch` tracking-info report switched from bulk `Branch::upstream()` (a `for-each-ref` over every local branch) to `upstream_single()` — `wt list` still uses the bulk cache, but one-shot callers no longer pay for it. ([#2338](https://github.com/max-sixty/worktrunk/pull/2338))++- **Stale cached default branch surfaces a clear error with a reset hint**: `default_branch()`'s fast path no longer re-validates the cached `worktrunk.default-branch` on every call; when the cached value is stale, `require_target_branch` / `require_target_ref` raise a new `StaleDefaultBranch` error that names the cache key and suggests clearing it. `wt list --branches` opportunistically warns when the cached default isn't among the enumerated branches — no extra `git` fork. (The old silent fallback + two preflight warning sites are removed.) ([#2344](https://github.com/max-sixty/worktrunk/pull/2344))++### Documentation++- **`worktrunk` skill: non-interactive hook approval guidance**: `skills/worktrunk/SKILL.md` now covers the hook-approval prompt error that agents hit running `wt merge` (or any command that runs project hooks) in a non-interactive session. Explains `wt config approvals add` (interactive, persists to `~/.config/worktrunk/approvals.toml`) vs `--yes` (single-invocation bypass for CI/CD), and directs agents to escalate rather than auto-`--yes`, since pre-approval is a trust decision. ([#2343](https://github.com/max-sixty/worktrunk/pull/2343))++### Internal++- **Flaky `test_switch_picker_preview_panel_main_diff` on macOS**: Under heavy parallel load, skim's `N/M` match counter updated ahead of the list-panel repaint, so `wait_for_stable` could declare a screen stable with stale rows still visible (~1-in-120 failure rate). The stability check now rejects states where skim's parsed match count doesn't equal the visible list-row count. Closes [#2334](https://github.com/max-sixty/worktrunk/issues/2334). ([#2345](https://github.com/max-sixty/worktrunk/pull/2345))++- **`benches/alias` regression guard for parent-side dispatch overhead**: Five-variant harness (`wt --version` startup floor; noop alias at 1/100 worktrees × warm/cold caches) protects the #2337/#2338 O(1) upstream work and the #2344 bulk config read. ([#2340](https://github.com/max-sixty/worktrunk/pull/2340))++- **Remove/TTFO benches invalidate `wt` caches between iterations**: `benches/remove.rs::first_output` and `benches/time_to_first_output.rs::remove` were reporting warm-cache cost because iter 1 populated `.git/wt/cache/` and iter 2+ hit it. Now use `iter_batched` + `invalidate_caches_auto` (which also clears `worktrunk.default-branch`). `benches/CLAUDE.md` documents the rule and the full list of what `invalidate_caches_auto` clears vs. preserves. ([#2341](https://github.com/max-sixty/worktrunk/pull/2341))+## 0.41.0### Improveddiff --git a/Cargo.lock b/Cargo.lockindex c199e9c8f..3a5b23bcc 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3126,7 +3126,7 @@ checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"[[package]]name = "worktrunk"-version = "0.41.0"+version = "0.42.0"dependencies = ["ansi-str","ansi-to-html",diff --git a/Cargo.toml b/Cargo.tomlindex 7ad7668e1..4bb05352a 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -5,7 +5,7 @@ default-members = [".", "tests/helpers/mock-stub", "tests/helpers/wt-perf"][package]name = "worktrunk"-version = "0.41.0"+version = "0.42.0"edition = "2024"rust-version = "1.93"build = "build.rs"diff --git a/docs/static/.well-known/agent-skills/index.json b/docs/static/.well-known/agent-skills/index.jsonindex 423cf20c7..c41a5e4da 100644--- a/docs/static/.well-known/agent-skills/index.json+++ b/docs/static/.well-known/agent-skills/index.json@@ -6,7 +6,7 @@"type": "skill-md","description": "Guidance for Worktrunk (the `wt` CLI) — git worktree management, hooks, and config. Load when editing .config/wt.toml or ~/.config/worktrunk/config.toml; adding, modifying, or debugging hooks (post-merge, post-start, pre-commit, pre-merge, post-switch, etc.); configuring commit message generation or command aliases; or troubleshooting wt behavior. Also answers general worktrunk/wt questions.","url": "./worktrunk/SKILL.md",- "digest": "sha256:6abf56a9247605fd346e4dd7fb32225d23ac1437599c193260aec33cd7d489a4"+ "digest": "sha256:cdbbbf4ef2eac0b217477fff00195bf1af0bedd8743b5d7e46de5fc6848c02d6"}]}diff --git a/skills/worktrunk/SKILL.md b/skills/worktrunk/SKILL.mdindex 099b28550..14ac0066c 100644--- a/skills/worktrunk/SKILL.md+++ b/skills/worktrunk/SKILL.md@@ -1,7 +1,7 @@---name: worktrunkdescription: 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.-version: 0.41.0+version: 0.42.0license: MIT OR Apache-2.0compatibility: Requires worktrunk CLI (https://worktrunk.dev)---