diff --git a/plugins/ultraplan-local/README.md b/plugins/ultraplan-local/README.md index cb35dbc..8d72d33 100644 --- a/plugins/ultraplan-local/README.md +++ b/plugins/ultraplan-local/README.md @@ -270,7 +270,7 @@ Per step: apply Changes exactly as written → run Verify (exit code is truth) When a plan has an `## Execution Strategy` section (auto-generated by `/ultraplan-local` for plans with > 5 steps), `/ultraexecute-local` automatically: 1. **Pre-flight checks** — validates clean working tree, plan file tracked in git, no scope fence overlaps between parallel sessions, no stale worktrees -2. **Creates git worktrees** — each parallel session gets its own isolated worktree and branch (`ultraplan/{slug}/session-{N}`) +2. **Creates git worktrees** — each parallel session gets its own isolated worktree and branch (`trek/{slug}/session-{N}`) 3. Launches `claude -p` per session per wave, each in its own worktree 4. **Merges branches back** sequentially with `--no-ff` after each wave completes 5. **Cleans up** worktrees and branches unconditionally (even on failure) diff --git a/plugins/ultraplan-local/commands/trekexecute.md b/plugins/ultraplan-local/commands/trekexecute.md index e9d3b2b..7dccc24 100644 --- a/plugins/ultraplan-local/commands/trekexecute.md +++ b/plugins/ultraplan-local/commands/trekexecute.md @@ -467,7 +467,7 @@ git worktree prune Also check for stale branches: ```bash -git branch --list "ultraplan/{slug}/*" | while read b; do +git branch --list "trek/{slug}/*" | while read b; do git branch -D "$b" 2>/dev/null done ``` @@ -570,7 +570,7 @@ override for long runs: For each session N in this wave: ```bash -BRANCH_NAME="ultraplan/{slug}/session-{N}" +BRANCH_NAME="trek/{slug}/session-{N}" WORKTREE_PATH="$WORKTREE_DIR/session-{N}" GIT_OPTIONAL_LOCKS=0 git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH" HEAD ``` @@ -717,8 +717,8 @@ branch survives even if cleanup races ahead (research/02 R3 — converts an unrecoverable failure to a recoverable one). Push failure is non-fatal (no remote, offline, etc.): ```bash -GIT_OPTIONAL_LOCKS=0 git push origin "ultraplan/{slug}/session-{N}" 2>/dev/null || true -GIT_OPTIONAL_LOCKS=0 git merge --no-ff "ultraplan/{slug}/session-{N}" \ +GIT_OPTIONAL_LOCKS=0 git push origin "trek/{slug}/session-{N}" 2>/dev/null || true +GIT_OPTIONAL_LOCKS=0 git merge --no-ff "trek/{slug}/session-{N}" \ -m "merge: ultraplan session {N} — {session-title}" ``` @@ -748,7 +748,7 @@ After successful merge of all sessions in the wave: ```bash for each session N in the wave: GIT_OPTIONAL_LOCKS=0 git worktree remove "$WORKTREE_DIR/session-{N}" --force - GIT_OPTIONAL_LOCKS=0 git branch -d "ultraplan/{slug}/session-{N}" + GIT_OPTIONAL_LOCKS=0 git branch -d "trek/{slug}/session-{N}" done GIT_OPTIONAL_LOCKS=0 git worktree prune ``` @@ -777,7 +777,7 @@ done GIT_OPTIONAL_LOCKS=0 git worktree prune # Remove session branches -GIT_OPTIONAL_LOCKS=0 git branch --list "ultraplan/{slug}/*" | while read branch; do +GIT_OPTIONAL_LOCKS=0 git branch --list "trek/{slug}/*" | while read branch; do GIT_OPTIONAL_LOCKS=0 git branch -D "$branch" 2>/dev/null done diff --git a/plugins/ultraplan-local/templates/headless-launch-template.md b/plugins/ultraplan-local/templates/headless-launch-template.md index 0deaec0..b532a31 100644 --- a/plugins/ultraplan-local/templates/headless-launch-template.md +++ b/plugins/ultraplan-local/templates/headless-launch-template.md @@ -56,14 +56,14 @@ cleanup_worktrees() { cd "$REPO_ROOT" # push-before-cleanup (Hard Rule 19): push any remaining branches so work # survives even if subsequent removal races. Failure is non-fatal. - git branch --list "ultraplan/{slug}/*" | while read b; do + git branch --list "trek/{slug}/*" | while read b; do git push origin "$b" 2>/dev/null || true done for wt in "$WORKTREE_BASE"/session-*; do [ -d "$wt" ] && git worktree remove "$wt" --force 2>/dev/null && echo "Removed: $wt" done git worktree prune - git branch --list "ultraplan/{slug}/*" | while read b; do + git branch --list "trek/{slug}/*" | while read b; do git branch -D "$b" 2>/dev/null done rmdir "$WORKTREE_BASE" 2>/dev/null @@ -109,8 +109,8 @@ echo "" echo "--- Wave {N}: {description} ---" {# For each parallel session in this wave, create worktree: } -git worktree add -b "ultraplan/{slug}/session-{n}" "$WORKTREE_BASE/session-{n}" HEAD -echo "Worktree created: session-{n} (branch: ultraplan/{slug}/session-{n})" +git worktree add -b "trek/{slug}/session-{n}" "$WORKTREE_BASE/session-{n}" HEAD +echo "Worktree created: session-{n} (branch: trek/{slug}/session-{n})" {# Launch session in its worktree (with safety preamble + budget caps + shared context): } cd "$WORKTREE_BASE/session-{n}" && claude -p "${SAFETY_PREAMBLE} @@ -136,8 +136,8 @@ echo "" echo "--- Merging Wave {N} ---" cd "$REPO_ROOT" {# For each session in the wave: push BEFORE merge (Hard Rule 19 — push-before-cleanup). } -git push origin "ultraplan/{slug}/session-{n}" 2>/dev/null || true -git merge --no-ff "ultraplan/{slug}/session-{n}" \ +git push origin "trek/{slug}/session-{n}" 2>/dev/null || true +git merge --no-ff "trek/{slug}/session-{n}" \ -m "merge: ultraplan session {n} — {title}" if [ $? -ne 0 ]; then echo "MERGE CONFLICT: session {n}. Conflicting files:" @@ -147,7 +147,7 @@ if [ $? -ne 0 ]; then exit 1 fi git worktree remove "$WORKTREE_BASE/session-{n}" --force -git branch -d "ultraplan/{slug}/session-{n}" +git branch -d "trek/{slug}/session-{n}" echo "Merged and cleaned: session {n}" git worktree prune