From 52d366e866ef6b0e7f2897bc8e19f1c9c967cb6d Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Thu, 26 Feb 2026 00:40:35 +0900 Subject: [PATCH] feat(start-work): update template with --worktree flag documentation Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- .../builtin-commands/templates/start-work.ts | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/features/builtin-commands/templates/start-work.ts b/src/features/builtin-commands/templates/start-work.ts index 4db39be1b..98ffd1e21 100644 --- a/src/features/builtin-commands/templates/start-work.ts +++ b/src/features/builtin-commands/templates/start-work.ts @@ -1,5 +1,14 @@ export const START_WORK_TEMPLATE = `You are starting a Sisyphus work session. +## ARGUMENTS + +- \`/start-work [plan-name] [--worktree ]\` + - \`plan-name\` (optional): name or partial match of the plan to start + - \`--worktree \` (optional): absolute path to an existing git worktree to work in + - If specified and valid: hook pre-sets worktree_path in boulder.json + - If specified but invalid: you must run \`git worktree add \` first + - If omitted: you MUST choose or create a worktree (see Worktree Setup below) + ## WHAT TO DO 1. **Find available plans**: Search for Prometheus-generated plan files at \`.sisyphus/plans/\` @@ -15,17 +24,24 @@ export const START_WORK_TEMPLATE = `You are starting a Sisyphus work session. - If ONE plan: auto-select it - If MULTIPLE plans: show list with timestamps, ask user to select -4. **Create/Update boulder.json**: +4. **Worktree Setup** (when \`worktree_path\` not already set in boulder.json): + 1. \`git worktree list --porcelain\` — see available worktrees + 2. Create: \`git worktree add \` + 3. Update boulder.json to add \`"worktree_path": ""\` + 4. All work happens inside that worktree directory + +5. **Create/Update boulder.json**: \`\`\`json { "active_plan": "/absolute/path/to/plan.md", "started_at": "ISO_TIMESTAMP", "session_ids": ["session_id_1", "session_id_2"], - "plan_name": "plan-name" + "plan_name": "plan-name", + "worktree_path": "/absolute/path/to/git/worktree" } \`\`\` -5. **Read the plan file** and start executing tasks according to atlas workflow +6. **Read the plan file** and start executing tasks according to atlas workflow ## OUTPUT FORMAT @@ -49,6 +65,7 @@ Resuming Work Session Active Plan: {plan-name} Progress: {completed}/{total} tasks Sessions: {count} (appending current session) +Worktree: {worktree_path} Reading plan and continuing from last incomplete task... \`\`\` @@ -60,6 +77,7 @@ Starting Work Session Plan: {plan-name} Session ID: {session_id} Started: {timestamp} +Worktree: {worktree_path} Reading plan and beginning execution... \`\`\` @@ -68,5 +86,6 @@ Reading plan and beginning execution... - The session_id is injected by the hook - use it directly - Always update boulder.json BEFORE starting work +- Always set worktree_path in boulder.json before executing any tasks - Read the FULL plan file before delegating any tasks - Follow atlas delegation protocols (7-section format)`