Skip to content

Commit c16b740

Browse files
committed
Merge remote-tracking branch 'origin/main' into dsa/support-codex
Conflicts: - docs/content/claude-code.md / skills/worktrunk/reference/claude-code.md: Combined the Codex framing from this branch with main's new Claude-only /wt-switch-create command section. Worktree isolation and /wt-switch-create are now under "Claude Code only" headings, and the Codex callout remains. - tests/common/mod.rs: dropped the dead `add_filter` env-stripping block (per tests/CLAUDE.md, `add_filter` does not work on the YAML env block; main already redacts LLVM_PROFILE_FILE / CARGO_LLVM_COV* via `add_redaction` in `add_standard_env_redactions`). Kept main's trailing `add_placeholder_ansi_strip_filter(&mut settings)` call. Also regenerated tests/snapshots/integration__integration_tests__config_show__config_show_codex_available.snap to pick up main's new [BUILD_MODE] and [LLVM_PROFILE_FILE] redactions.
2 parents b604431 + b1195dd commit c16b740

337 files changed

Lines changed: 17537 additions & 2728 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude-plugin/CLAUDE.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22

33
## Directory Layout
44

5-
Skills are at the repo root (`skills/worktrunk/`) — the standard plugin location.
6-
Hooks remain in `.claude-plugin/hooks/` for now.
5+
Skills are at the repo root (`skills/`) — the standard plugin location. Hooks
6+
remain in `.claude-plugin/hooks/` for now.
77

88
```
9-
worktrunk.skills/ ← plugin root
9+
worktrunk/ ← plugin root (repo root)
1010
├── .claude-plugin/
11-
│ ├── plugin.json ← manifest
12-
│ └── hooks/hooks.json ← activity tracking hooks
11+
│ ├── plugin.json ← manifest (lists every skill dir)
12+
│ └── hooks/hooks.json ← activity tracking + WorktreeCreate/Remove hooks
1313
└── skills/
14-
└── worktrunk/ ← main skill + reference docs
14+
├── worktrunk/ ← config/hook guidance skill + reference docs
15+
└── wt-switch-create/ ← /wt-switch-create slash command
1516
```
1617

17-
Paths in `plugin.json` and `marketplace.json` resolve from the plugin root (repo root).
18+
Paths in `plugin.json` and `marketplace.json` resolve from the plugin root (repo
19+
root). Each skill directory must be listed in `plugin.json`'s `skills` array.
1820

1921
## Known Limitations
2022

‎.claude-plugin/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Git worktree management CLI integration with activity tracking.
66

77
1. **Configuration skill** — Guides LLM-powered commit message setup, project hooks (pre-start, pre-merge), and worktree path customization
88
2. **Activity tracking** — Shows which branches have active Claude sessions via indicators in `wt list`
9+
3. **`/wt-switch-create` command** — Creates a worktrunk worktree and moves the current Claude session into it
910

1011
## Examples
1112

@@ -22,3 +23,7 @@ The configuration skill guides through configuring an AI tool (Claude Code, Code
2223
**Add pre-start hooks to run npm install automatically**
2324

2425
The skill configures `.config/wt.toml` with project hooks. Pre-start hooks run when creating worktrees, pre-merge hooks validate before merging.
26+
27+
**Start work in a fresh worktree**
28+
29+
`/wt-switch-create fix-auth Investigate the 5-minute session timeout` creates a `fix-auth` worktree in worktrunk's normal sibling layout (`<repo>.fix-auth/`), switches the session into it, and starts the task there. On session exit the worktree is offered for removal — a worktree with uncommitted changes is kept rather than removed.

‎.claude-plugin/plugin.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
},
77
"hooks": "./.claude-plugin/hooks/hooks.json",
88
"skills": [
9-
"./skills/worktrunk"
9+
"./skills/worktrunk",
10+
"./skills/wt-switch-create"
1011
]
1112
}

‎.claude/skills/release/SKILL.md‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ metadata:
1919
```bash
2020
cargo release X.Y.Z -p worktrunk -x --no-publish --no-push --no-tag --no-verify --no-confirm && cargo check
2121
```
22-
This bumps `Cargo.toml`, `Cargo.lock`, and applies `pre-release-replacements` (e.g., `SKILL.md`'s `version:` line), then auto-commits. We'll reset this commit in step 9 to fold in the CHANGELOG.
23-
24-
Then sync the SHA-256 digest of `SKILL.md` in `docs/static/.well-known/agent-skills/index.json` — `cargo-release` doesn't know that file derives from `SKILL.md`, so it stays stale until the docs-sync test rewrites it:
25-
```bash
26-
cargo test --test integration test_docs_are_in_sync || cargo test --test integration test_docs_are_in_sync
27-
```
28-
The first run rewrites the digest and exits non-zero; the second confirms sync. The regenerated `index.json` is then picked up by `git add -A` in step 9.
22+
This bumps `Cargo.toml` and `Cargo.lock`, then auto-commits. We'll reset this commit in step 9 to fold in the CHANGELOG.
2923
8. **Update CHANGELOG**: Add `## X.Y.Z` section at top with changes (see MANDATORY verification below)
3024
9. **Commit**: Reset the auto-commit from step 7, stage everything, and create the final release commit:
3125
```bash

‎.claude/skills/running-tend/SKILL.md‎

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ CLI for managing git worktrees). The generic skills (`tend-running-in-ci`,
1212
`tend-review`, `tend-triage`, etc.) provide the workflow framework;
1313
this skill adds worktrunk conventions.
1414

15+
## Filing issues in other repos
16+
17+
Standing exception granted: file directly in agent-equipped targets (per
18+
**Filing Issues in Other Repos** in the bundled `running-in-ci` skill) without
19+
asking permission here first. The default rule (open an issue here asking
20+
permission first) still applies when the target shows no agent signals.
21+
1522
## Codecov Monitoring
1623

1724
After required CI checks pass, poll `codecov/patch` — it is mandatory despite
@@ -127,10 +134,7 @@ GitHub blocks both `gh run rerun --failed` and per-job rerun
127134
`benchmarks` job routinely runs 80+ minutes after `test (linux|macos|windows)`
128135
finish, so dismiss-then-wait-then-rerun cascades into a long session for no
129136
benefit — the maintainer can rerun the failed job directly once `benchmarks`
130-
clears, or merge regardless if the failure is clearly a flake. Past
131-
occurrence: PR #2512 ([run 25196909437](https://github.com/max-sixty/worktrunk/actions/runs/25196909437))
132-
spent ~90 min in a wait-and-rerun loop after dismissing approval over an
133-
unrelated `step_prune` Windows flake.
137+
clears, or merge regardless if the failure is clearly a flake.
134138

135139
The codecov-failure dismissal pattern is different and remains correct:
136140
`CLAUDE.md` requires explicit user approval before merging with failing
@@ -180,6 +184,28 @@ Suggest an alias when:
180184
4. Link to the [aliases docs](https://worktrunk.dev/step/#aliases) and
181185
[tips & patterns](https://worktrunk.dev/tips-patterns/) for further recipes
182186

187+
### Don't fix tests by adding skip guards
188+
189+
When a test fails because production code or test setup can't handle some
190+
scenario, fix the production code or rework the test setup. Don't add an
191+
early-return skip — that removes the safety net while looking like a fix.
192+
If a triage fix reaches for `let Ok(_) = ... else { return };`, a newly-added
193+
`if !path.exists() { return; }`, or a fresh `#[ignore]`, stop and ask what
194+
production behavior is actually broken.
195+
196+
If the test relies on inherited environment (process CWD, ambient env
197+
vars), rework it to set up its own — most worktrunk tests already do this
198+
via `TestRepo::with_initial_commit()` plus a tempdir.
199+
200+
### Same-root-cause-class triage
201+
202+
The "work on the existing PR if it addresses the same problem" rule keys
203+
on the same test. It doesn't catch a different test failing for the same
204+
underlying reason. Group failing tests by root-cause class before writing
205+
a fix; if an outstanding PR addresses any test in the class, wait for it
206+
to merge and re-run, then mirror its approach for any sites still failing
207+
rather than opening a parallel PR with a weaker fix.
208+
183209
## Weekly Maintenance: MSRV & Toolchain
184210

185211
Bump both MSRV and the development toolchain to **latest stable − 1**. When
@@ -211,8 +237,8 @@ Pinned third-party versions in CI are invisible to Dependabot — it follows `Ca
211237

212238
For each weekly run, check upstream and bump:
213239

214-
- **`baptiste0928/cargo-install@v3` blocks** in `.github/workflows/ci.yaml` and `.github/actions/{test,claude}-setup/action.yaml` — every `version: "=X.Y.Z"` against `cargo info <crate>`. Today: `cargo-insta`, `cargo-nextest`, `cargo-llvm-cov`, `cargo-msrv`, `cargo-udeps`, `lychee`, `worktrunk`. The `cargo-affected` install has no version pin (follows default branch) — leave it alone. Verify each crate's `rust-version` against the pinned toolchain and note compatibility in the PR body (see PR #1657 for the format).
215-
- **`hustcer/setup-nu@v3`** `version:` input — latest from `gh api repos/nushell/nushell/releases/latest --jq '.tag_name'`. Three call sites: `ci.yaml` (`benchmarks`, `code-coverage`) and `actions/test-setup/action.yaml`.
240+
- **`baptiste0928/cargo-install@v3` blocks** in `.github/workflows/ci.yaml`, `.github/workflows/nightly.yaml`, and `.github/actions/{test,claude}-setup/action.yaml` — every `version: "=X.Y.Z"` against `cargo info <crate>`. Today: `cargo-insta`, `cargo-nextest`, `cargo-llvm-cov`, `cargo-msrv`, `cargo-udeps`, `lychee`, `worktrunk`. The `cargo-affected` install has no version pin (follows default branch) — leave it alone. Verify each crate's `rust-version` against the pinned toolchain and note compatibility in the PR body (see PR #1657 for the format).
241+
- **`hustcer/setup-nu@v3`** `version:` input — latest from `gh api repos/nushell/nushell/releases/latest --jq '.tag_name'`. Three call sites: `ci.yaml` (`code-coverage`), `nightly.yaml` (`benchmarks`), and `actions/test-setup/action.yaml`.
216242
- **`taiki-e/[email protected]`** `tool: zola@<ver>` in the `check-docs` job — latest from `gh api repos/getzola/zola/releases/latest --jq '.tag_name'`.
217243
- **Runner images** — `ubuntu-24.04`, `macos-15`, `windows-2022`. Keep `windows-2022` pinned (actions/runner-images#12677 — windows-2025 lacks the D: drive).
218244

@@ -244,13 +270,23 @@ Triage each duplicate:
244270
- **Legitimate** (different cwd, different ref form that can't be normalized,
245271
intentional double-call across phases) — note in the response and move on.
246272
- **Cache miss** (same logical operation should hit cache but doesn't) —
247-
open an issue or fix it. Past examples: `merge_base("main", "<sha>")` vs
273+
open an issue or fix it. Common shapes: `merge_base("main", "<sha>")` vs
248274
`merge_base("main", "branch")` keying separately;
249275
`worktree_at(cwd)` vs `worktree_at(porcelain_path)` not canonicalizing.
250276

251277
Baseline: ~29 git subprocesses per render on a clean tree; a jump above
252278
~32 warrants investigation.
253279

280+
## Weekly Maintenance: LLM Model Names in Docs
281+
282+
Grep for current Claude and Codex pins across every tracked file:
283+
284+
```bash
285+
git grep -niE "claude|codex"
286+
```
287+
288+
Check the latest IDs at <https://docs.anthropic.com/en/docs/about-claude/models> and <https://developers.openai.com/codex/models>. The recommended commit-message commands should use the most recent fastest model from each vendor (Haiku for Anthropic, the smallest current Codex variant for OpenAI).
289+
254290
## README Date Check
255291

256292
The README blockquote opens with a month+year (e.g., "**April 2026**"). During daily

‎.claude/skills/writing-user-outputs/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: writing-user-outputs
3-
description: CLI output formatting standards for worktrunk. Use when writing user-facing messages, error handling, progress output, hints, warnings, or working with the output system.
3+
description: CLI output formatting standards for worktrunk. Load before editing any code that calls warning_message, hint_message, error_message, info_message, eprintln, or println, or that produces strings the user will see (CLI help, progress UI, snapshot text). Documents ANSI color nesting rules, message patterns, and output system architecture.
44
metadata:
55
internal: true
66
---

‎.config/tend.toml‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎.config/tend.yaml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bot_name: worktrunk-bot
2+
setup:
3+
- uses: ./.github/actions/claude-setup
4+
secrets:
5+
allowed:
6+
- CODECOV_TOKEN
7+
workflows:
8+
ci-fix:
9+
watched_workflows:
10+
- ci
11+
- publish-docs

‎.github/actions/claude-setup/action.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ runs:
1717
uses: baptiste0928/cargo-install@v3
1818
with:
1919
crate: cargo-insta
20-
version: "=1.46.3"
20+
version: "=1.47.2"
2121

2222
- name: Install cargo-nextest
2323
if: inputs.install-cargo-tools == 'true'
2424
uses: baptiste0928/cargo-install@v3
2525
with:
2626
crate: cargo-nextest
27-
version: "=0.9.132"
27+
version: "=0.9.133"
2828

2929
- name: "\U0001F4B0 Cache"
3030
uses: Swatinem/rust-cache@v2

‎.github/actions/test-setup/action.yaml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,26 @@ runs:
1111
uses: baptiste0928/cargo-install@v3
1212
with:
1313
crate: cargo-insta
14-
version: "=1.46.3"
14+
version: "=1.47.2"
1515

1616
- name: Install cargo-nextest
1717
uses: baptiste0928/cargo-install@v3
1818
with:
1919
crate: cargo-nextest
20-
version: "=0.9.132"
20+
version: "=0.9.133"
2121

2222
- name: 💰 Cache
2323
uses: Swatinem/rust-cache@v2
24+
with:
25+
# Don't cache ~/.cargo/bin. The runner-image rustup binary acts as
26+
# the cargo/rustc/rustup proxy; restoring a stale copy on top of a
27+
# new image leaves the proxy resolving as `rustup-init`, breaking
28+
# `cargo install` (only exposed when the install is a cache miss).
29+
# Tools we need are installed via baptiste0928/cargo-install into a
30+
# separate `--root`, so nothing else in here relies on ~/.cargo/bin.
31+
cache-bin: false
32+
# Bumped to invalidate caches that already include the stale bin.
33+
prefix-key: v1-rust
2434

2535
- name: Install shells (zsh, fish) - Ubuntu
2636
if: runner.os == 'Linux'

0 commit comments

Comments
 (0)