Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
docs(wt-switch-create): number the rationale's design steps as SKILL.md does (#4399)
Worktrunk Botf7558da7969e
diff --git a/plugins/worktrunk/skills/wt-switch-create/rationale.md b/plugins/worktrunk/skills/wt-switch-create/rationale.mdindex 1cc788d6d..0dbaf90b7 100644--- a/plugins/worktrunk/skills/wt-switch-create/rationale.md+++ b/plugins/worktrunk/skills/wt-switch-create/rationale.md@@ -18,12 +18,15 @@ Binary symbol names are deliberately omitted — they re-minify every build.## The design-1. `EnterWorktree({name})` for a new branch in this repo. It creates through+Steps are numbered as in `SKILL.md`; step 1, picking the branch name, needs+no rationale.++2. `EnterWorktree({name})` for a new branch in this repo. It creates throughworktrunk's `WorktreeCreate` hook (`wt switch --create`), so the result isan ordinary `wt` worktree, and it passes no `path`, which is what keeps M2'sconfirmation from firing. It fails on an existing branch and from a sessionthat already entered a worktree, and it has no repo targeting.-2. Otherwise `wt -C <repo> switch --create <branch> --no-cd --format=json` in+3. Otherwise `wt -C <repo> switch --create <branch> --no-cd --format=json` inBash, then, for another repo, `cd <repo>`, then `EnterWorktree({path})`.`wt` solves repo targeting (`-C` works from anywhere), existing-branchhandling (rerun without `--create`), and machine-readable output (`.path`@@ -33,7 +36,8 @@ Binary symbol names are deliberately omitted — they re-minify every build.worktrunk's hook answers the confirmation only for that repository'sworktrees ("The confirmation hook"). The `cd` satisfies both. Entry that someone declinedends there, with the worktree left unentered (M2).-3. On a tool error (or a denial with no user behind it), the session can still++ On a tool error (or a denial with no user behind it), the session can stillwork there iff the path sitsinside a directory it's allowed in (an `additionalDirectories` entry). Asingle `cd <path>` discovers which: it sticks when reachable, resets whendiff --git a/skills/wt-switch-create/rationale.md b/skills/wt-switch-create/rationale.mdindex 1cc788d6d..0dbaf90b7 100644--- a/skills/wt-switch-create/rationale.md+++ b/skills/wt-switch-create/rationale.md@@ -18,12 +18,15 @@ Binary symbol names are deliberately omitted — they re-minify every build.## The design-1. `EnterWorktree({name})` for a new branch in this repo. It creates through+Steps are numbered as in `SKILL.md`; step 1, picking the branch name, needs+no rationale.++2. `EnterWorktree({name})` for a new branch in this repo. It creates throughworktrunk's `WorktreeCreate` hook (`wt switch --create`), so the result isan ordinary `wt` worktree, and it passes no `path`, which is what keeps M2'sconfirmation from firing. It fails on an existing branch and from a sessionthat already entered a worktree, and it has no repo targeting.-2. Otherwise `wt -C <repo> switch --create <branch> --no-cd --format=json` in+3. Otherwise `wt -C <repo> switch --create <branch> --no-cd --format=json` inBash, then, for another repo, `cd <repo>`, then `EnterWorktree({path})`.`wt` solves repo targeting (`-C` works from anywhere), existing-branchhandling (rerun without `--create`), and machine-readable output (`.path`@@ -33,7 +36,8 @@ Binary symbol names are deliberately omitted — they re-minify every build.worktrunk's hook answers the confirmation only for that repository'sworktrees ("The confirmation hook"). The `cd` satisfies both. Entry that someone declinedends there, with the worktree left unentered (M2).-3. On a tool error (or a denial with no user behind it), the session can still++ On a tool error (or a denial with no user behind it), the session can stillwork there iff the path sitsinside a directory it's allowed in (an `additionalDirectories` entry). Asingle `cd <path>` discovers which: it sticks when reachable, resets when