Saltar a contenido

rai worktree

Manage RaiSE git worktrees. RaiSE tracks registered worktrees in the mission registry so that session context, signal routing, and memory retrieval are scoped to the correct branch and story. One worktree per mission is the recommended pattern.

Worktrees live under .worktree/ in the main repository root by convention. Do not use EnterWorktree tool for RaiSE worktrees — instead, navigate manually and set the working directory in your shell or editor.

rai worktree register

Register an existing git worktree with RaiSE. Links the worktree to the active mission and records its branch, merge target, and linked story keys.

Argument Description
PATH Path to the worktree to register (required)
Flag Short Description
--mission -m Mission ID to bind this worktree to
--story -s Story key(s) linked to this worktree (repeatable)
--merge-target Branch this worktree merges back to. Default: inferred from git config
# Register the current worktree
rai worktree register .

# Register with explicit mission and story binding
rai worktree register .worktree/raise-commons-auth \
  --mission framework-extensibility \
  --story RAISE-1234

rai worktree context

Show the full context record for a registered worktree — branch, linked mission, story keys, merge target, and session history.

Argument Description
PATH Worktree path (optional — defaults to current directory)
rai worktree context
rai worktree context .worktree/raise-commons-auth

rai worktree complete

Mark a registered worktree as complete. Updates the worktree's status in the mission registry. Does not delete the worktree.

Argument Description
PATH Worktree path (optional — defaults to current directory)
rai worktree complete
rai worktree complete .worktree/raise-commons-auth

rai worktree list

List all registered worktrees and their current status.

Flag Short Description
--format -f Output format: human, json. Default: human
--mission -m Filter by mission ID
rai worktree list
rai worktree list --mission framework-extensibility
rai worktree list --format json

See also: rai mission, rai session