From 0a1fc594a4b4935b77711586fdce9d804497f709 Mon Sep 17 00:00:00 2001 From: Dustin Hilgaertner Date: Sun, 5 Apr 2026 15:05:43 -0500 Subject: [PATCH] Fix session names to use repo-number-slug convention The crow-workspace skill was creating sessions with just a short slug (e.g., "drag-drop-photo") instead of the full "{repo}-{number}-{slug}" format (e.g., "crow-51-drag-drop-photo"). This made session names inconsistent with the worktree paths and branch names. Adds an explicit Session Naming Convention section and updates the session creation example, prompt file paths, and send command to use the consistent naming format. Closes #79 Co-Authored-By: Claude Opus 4.6 (1M context) --- skills/crow-workspace/SKILL.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/skills/crow-workspace/SKILL.md b/skills/crow-workspace/SKILL.md index 461b7ff..5cc38fe 100644 --- a/skills/crow-workspace/SKILL.md +++ b/skills/crow-workspace/SKILL.md @@ -197,12 +197,23 @@ git -C {repo_path} worktree add {path} \ All `crow` commands require `dangerouslyDisableSandbox: true`. +### Session Naming Convention + +The session name **MUST** match the worktree directory name (which is the branch slug without the `feature/` prefix): + +- **Ticket-based:** `{repo}-{ticket_number}-{slug}` (e.g., `crow-51-drag-drop-photo`) +- **PR-based:** `{repo}-{pr_branch_slug}` (e.g., `citadel-45-jwt-validation`) +- **Natural language:** `{repo}-{feature-slug}` (e.g., `citadel-update-auth`) + +This keeps session names, worktree paths, and branch names consistent. + ### Complete Step-by-Step Flow ```bash # 1. Create session (parse session_id from JSON output) -crow new-session --name "{feature_name}" -# Output: {"session_id":"","name":"feature_name"} +# The name MUST match the worktree directory name +crow new-session --name "{repo}-{ticket_number}-{slug}" +# Output: {"session_id":"","name":"crow-51-drag-drop-photo"} # 2. Set ticket metadata (only if URL was provided) crow set-ticket --session {session_id} \ @@ -259,7 +270,7 @@ gh issue edit {ticket_url} --add-assignee @me # IMPORTANT: Write to {devRoot}/.claude/prompts/ — NOT $TMPDIR (which differs per session) # The prompt MUST start with /plan to enter plan mode mkdir -p {devRoot}/.claude/prompts -cat > {devRoot}/.claude/prompts/crow-prompt-{feature_name}.md << 'PROMPT' +cat > {devRoot}/.claude/prompts/crow-prompt-{session_name}.md << 'PROMPT' {prompt content — see template below} PROMPT @@ -282,14 +293,14 @@ sleep 3 # Use single quotes so the shell doesn't expand $(cat ...). # Use --permission-mode plan to start Claude in plan mode. # Use full path to claude binary. -crow send --session {session_id} --terminal {terminal_id} 'cd {primary_worktree_path} && {claude_binary_path} --permission-mode plan "$(cat {devRoot}/.claude/prompts/crow-prompt-{feature_name}.md)"\n' +crow send --session {session_id} --terminal {terminal_id} 'cd {primary_worktree_path} && {claude_binary_path} --permission-mode plan "$(cat {devRoot}/.claude/prompts/crow-prompt-{session_name}.md)"\n' ``` ## First Prompt Template IMPORTANT: Always use full absolute paths, never abbreviated (`...`) or home-relative (`~`) paths. -The prompt is written to `{devRoot}/.claude/prompts/crow-prompt-{feature_name}.md`. It starts with `/plan` to enter plan mode. +The prompt is written to `{devRoot}/.claude/prompts/crow-prompt-{session_name}.md`. It starts with `/plan` to enter plan mode. **Repo descriptions for the prompt table:**