Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions frontend/scripts/agent-branch-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,34 @@ OPENSPEC_MASTERPLAN_LABEL_RAW="${GUARDEX_OPENSPEC_MASTERPLAN_LABEL-masterplan}"
PRINT_NAME_ONLY=0
POSITIONAL_ARGS=()

print_usage() {
cat <<'USAGE'
Usage: agent-branch-start [task] [agent] [base] [options]

Start an isolated agent/* branch + worktree for a task.

Positional:
task Task name/slug (default: "task")
agent Agent name (default: "agent")
base Base branch to fork from (default: repo default)

Options:
--task <name> Task name/slug
--agent <name> Agent name
--base <branch> Base branch to fork from
--worktree-root <p> Worktree root dir (default: .omx/agent-worktrees)
--tier <T1|T2|T3> OpenSpec tier (accepted for compatibility)
--print-name-only Print the computed branch name and exit
-h, --help Show this help and exit
USAGE
}

while [[ $# -gt 0 ]]; do
case "$1" in
-h|--help)
print_usage
exit 0
;;
--task)
TASK_NAME="${2:-task}"
shift 2
Expand Down
4 changes: 4 additions & 0 deletions templates/scripts/agent-branch-finish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ AUTO_PROMOTE_DRAFT="$(normalize_bool "$AUTO_PROMOTE_DRAFT_RAW" "1")"

while [[ $# -gt 0 ]]; do
case "$1" in
-h|--help)
echo "Usage: $0 [--base <branch>] [--branch <branch>] [--no-push] [--cleanup|--no-cleanup] [--wait-for-merge|--no-wait-for-merge] [--wait-timeout-seconds <n>] [--wait-poll-seconds <n>] [--parent-gitlink-commit|--no-parent-gitlink-commit] [--keep-remote-branch|--delete-remote-branch] [--mode auto|direct|pr|--via-pr|--direct-only] [--auto-resolve[=none|safe|full]|--no-auto-resolve] [--no-preflight|--preflight] [--preflight-script <path>] [--no-auto-promote|--auto-promote]"
exit 0
;;
--base)
BASE_BRANCH="${2:-}"
BASE_BRANCH_EXPLICIT=1
Expand Down
31 changes: 31 additions & 0 deletions templates/scripts/agent-branch-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,39 @@ run_guardex_cli() {
return 127
}

print_usage() {
cat <<'USAGE'
Usage: agent-branch-start [task] [agent] [base] [options]

Start an isolated agent/* branch + worktree for a task.

Positional:
task Task name/slug (default: "task")
agent Agent name (default: "agent")
base Base branch to fork from (default: repo default)

Options:
--task <name> Task name/slug
--agent <name> Agent name
--base <branch> Base branch to fork from
--worktree-root <p> Worktree root dir (default: .omx/agent-worktrees)
--reuse-existing Reuse an existing matching worktree (default)
--new Force a fresh worktree instead of reusing
--tier <T1|T2|T3> OpenSpec tier for scaffolding
--transfer Auto-transfer uncommitted changes into the worktree (default)
--no-transfer Do not auto-transfer uncommitted changes
--transfer-exclude <globs> Colon-separated globs to exclude from transfer
--print-name-only Print the computed branch name and exit
-h, --help Show this help and exit
USAGE
}

while [[ $# -gt 0 ]]; do
case "$1" in
-h|--help)
print_usage
exit 0
;;
--task)
TASK_NAME="${2:-task}"
shift 2
Expand Down
Loading