Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
docs: Standardize "main worktree" and "default branch"
Maximilian Roosaaf8f732ca49
diff --git a/CLAUDE.md b/CLAUDE.mdindex e535e8e19..e3eba3f68 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -32,6 +32,15 @@ Example of escalating instead of suppressing:fn parse_config() { ... }```+## Terminology++Use consistent terminology in documentation, help text, and code comments:++- **main worktree** — when referring to the primary worktree (the original git directory)+- **default branch** — when referring to the branch (main, master, etc.)++Avoid mixing: "main/default branch worktree" is confusing. Use "main worktree" for worktrees and "default branch" for branches.+## Testing### Running Testsdiff --git a/README.md b/README.mdindex 934a57a2b..4aedb14fe 100644--- a/README.md+++ b/README.md@@ -202,7 +202,7 @@ Automate setup and validation at worktree lifecycle events:| --------------- | ----------------------------------- | ---------------------------- || **post-create** | After worktree created | `cp -r .cache`, `ln -s` || **post-start** | After worktree created (background) | `npm install`, `cargo build` |-| **pre-commit** | Before squash commit created | `pre-commit run` |+| **pre-commit** | Before creating any commit | `pre-commit run` || **pre-merge** | After squash, before push | `cargo test`, `pytest` || **post-merge** | After successful merge | `cargo install --path .` |@@ -794,7 +794,7 @@ branch `foo` has a different worktree at `repo.bar/`, an error is raised.- `@` - current worktree (by path, works in detached HEAD)- `-` - previous worktree (from switch history)-- `^` - main/default branch worktree+- `^` - main worktree### Branch deletion@@ -973,7 +973,7 @@ Note: `locked` and `prunable` are top-level fields on worktree objects, not in s**Worktree position fields** (for identifying special worktrees):-- `is_main`: boolean - is the main/default worktree+- `is_main`: boolean - is the main worktree- `is_current`: boolean - is the current working directory (present when true)- `is_previous`: boolean - is the previous worktree from `wt switch` (present when true)diff --git a/src/cli.rs b/src/cli.rsindex b0113a04a..dfd91c12a 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -158,7 +158,7 @@ wt config shell init fish | sourceZsh (~/.zshrc):```zsheval "$(wt config shell init zsh)"-```console+```## Auto Setup@@ -673,7 +673,7 @@ Note: `locked` and `prunable` are top-level fields on worktree objects, not in s**Worktree position fields** (for identifying special worktrees):-- `is_main`: boolean - is the main/default worktree+- `is_main`: boolean - is the main worktree- `is_current`: boolean - is the current working directory (present when true)- `is_previous`: boolean - is the previous worktree from `wt switch` (present when true)@@ -897,7 +897,7 @@ branch `foo` has a different worktree at `repo.bar/`, an error is raised.- `@` - current worktree (by path, works in detached HEAD)- `-` - previous worktree (from switch history)-- `^` - main/default branch worktree+- `^` - main worktree### Branch deletiondiff --git a/src/commands/list/model.rs b/src/commands/list/model.rsindex ec5d5071e..6a156ae04 100644--- a/src/commands/list/model.rs+++ b/src/commands/list/model.rs@@ -592,7 +592,7 @@ pub enum MainDivergence {/// Up to date with main branch#[default]None,- /// This is the main/default branch itself+ /// This is the default branch itselfIsMain,/// Ahead of main (has commits main doesn't have)Ahead,diff --git a/src/git/repository/mod.rs b/src/git/repository/mod.rsindex 0795286c9..41489b841 100644--- a/src/git/repository/mod.rs+++ b/src/git/repository/mod.rs@@ -330,7 +330,7 @@ impl Repository {/// * `name` - The worktree name to resolve:/// - "@" for current HEAD/// - "-" for previous branch (via worktrunk.history)- /// - "^" for main/default branch+ /// - "^" for default branch/// - any other string is returned as-is////// # Returns@@ -377,7 +377,7 @@ impl Repository {/// * `name` - The worktree name to resolve:/// - "@" for current worktree (works even in detached HEAD)/// - "-" for previous branch's worktree- /// - "^" for main/default branch's worktree+ /// - "^" for main worktree/// - any other string is treated as a branch name////// # Returnsdiff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snapindex 7d21f145e..44ec0f55f 100644--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap@@ -124,7 +124,7 @@ Note: [2mlocked[0m and [2mprunable[0m are top-level fields on worktree objec[1mWorktree position fields[0m (for identifying special worktrees):-- [2mis_main[0m: boolean - is the main/default worktree+- [2mis_main[0m: boolean - is the main worktree- [2mis_current[0m: boolean - is the current working directory (present when true)- [2mis_previous[0m: boolean - is the previous worktree from [2mwt switch[0m (present when true)diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snapindex 0739ad496..872e2631c 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap@@ -82,7 +82,7 @@ branch [2mfoo[0m has a different worktree at [2mrepo.bar/[0m, an error is ra- [2m@[0m - current worktree (by path, works in detached HEAD)- [2m-[0m - previous worktree (from switch history)-- [2m^[0m - main/default branch worktree+- [2m^[0m - main worktree### Branch deletion