wt-new
/wt:new - Create New Worktree and Branch
Description
Quick command to create a new git worktree with a new branch. Supports both interactive and automated modes.
Usage
/wt:new # fully interactive
/wt:new [BRANCH_NAME] # skip branch name prompt
/wt:new [BRANCH_NAME] [BASE_BRANCH] # fully non-interactive
Examples
/wt:new # prompts for both base branch and feature branch
/wt:new story/WINT-1012 # uses main as base, prompts skipped
/wt:new story/WINT-1012 main # fully automated, no prompts
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
BRANCH_NAME |
No | (prompted) | Feature branch name (e.g., story/WINT-1012) |
BASE_BRANCH |
No | (prompted) | Branch to base off (e.g., main, develop) |
When parameters are provided, the corresponding interactive prompts are skipped.
What It Does
This slash command:
- Verifies the git repository state
- Determines base branch (from parameter or interactive prompt)
- Determines feature branch name (from parameter or interactive prompt)
- Fetches latest from remote (
git fetch origin) to ensure base is up-to-date - Creates
tree/directory if it doesn't exist - Creates the worktree at
tree/{branch-name}based onorigin/{base-branch} - Reports the result: path to the new worktree, branch name
Workflow
Interactive mode (/wt:new)
- Verify git repository - Ensure you're in a valid git repo
- Ask for base branch - Which branch to start from (e.g.,
main,develop) - Ask for feature branch name - Name for your new branch (e.g.,
story/WISH-001) - Fetch latest from remote -
git fetch originto get latest commits without changing current checkout - Create worktree directory - Create
tree/if it doesn't exist - Create worktree -
git worktree add -b {branch-name} tree/{branch-name} origin/{base-branch} - Confirm success - Show you the path to your new worktree
Automated mode (/wt:new story/WINT-1012 main)
- Verify git repository - Ensure you're in a valid git repo
- Use provided base branch - Skip prompt, use
main - Use provided branch name - Skip prompt, use
story/WINT-1012 - Fetch latest from remote -
git fetch originto get latest commits without changing current checkout - Create worktree directory - Create
tree/if it doesn't exist - Create worktree -
git worktree add -b story/WINT-1012 tree/story/WINT-1012 origin/main - Report result - Output path and branch name for caller to use
Output
After completion, always report:
WORKTREE CREATED
branch: {branch-name}
path: tree/{branch-name}
This structured output allows the calling orchestrator (e.g., dev-implement-story) to capture
the branch name and path for worktree_register().
Benefits
✅ Quick Start - One command to create a new worktree
✅ Automated - Can be called non-interactively from workflow orchestrators
✅ Safe - Verifies git state before making changes
✅ Organized - Keeps all worktrees in tree/ directory
More from michael-menard/monorepo
review
Comprehensive code review with parallel specialist sub-agents. Analyzes requirements traceability, code quality, security, performance, accessibility, test coverage, and technical debt. Produces detailed findings and calls /qa-gate for final gate decision.
40lint-fix
Run ESLint with --fix across the repo (or a scope), capture errors that could not be auto-fixed, group them by rule, store results in the KB, and scan for eslint-disable suppressions (which are covered-up errors, not fixes). Use this skill instead of running pnpm lint directly.
25plans
List all plans from the KB database with key metadata. Use to get a quick overview of plan statuses, priorities, and story counts.
24wt-list
List all active git worktrees with their status. Use when checking what worktrees exist, their branches, and which has uncommitted changes. Quick overview command.
23roadmap
Show the active roadmap — current and future plans only (excludes implemented, superseded, archived). Quick view of what's in flight and coming next.
23review-draft-story
Comprehensive draft story review with parallel specialist sub-agents. Spawns PM, UX, and SM agents to review stories from product, design, and implementation readiness perspectives before development begins.
23