Worktree add
worktree_add
Worktree-add hook action.
Creates a git worktree at /tmp/axm-worktrees/<ticket_id>/ with a branch
derived from ticket metadata via branch_name_from_ticket().
WorktreeAddHook
dataclass
Create a worktree + branch for a ticket.
Reads ticket_id, ticket_title, ticket_labels, and
repo_path from context. The worktree is placed under
/tmp/axm-worktrees/<ticket_id>/.
Skips gracefully when the working directory is not a git repository or the worktree already exists.
Source code in packages/axm-git/src/axm_git/hooks/worktree_add.py
execute(context, **params)
Execute the hook action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
dict[str, Any]
|
Session context dictionary. |
required |
**params
|
Any
|
Optional |
{}
|
Returns:
| Type | Description |
|---|---|
HookResult
|
HookResult with |