Class: Sxn::MCP::Prompts::NewSession

Inherits:
MCP::Prompt
  • Object
show all
Defined in:
lib/sxn/mcp/prompts/workflow_prompts.rb

Overview

Guided new session creation workflow

Class Method Summary collapse

Class Method Details

.template(args = {}, _server_context: nil) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/sxn/mcp/prompts/workflow_prompts.rb', line 25

def template(args = {}, _server_context: nil)
  # Handle both string and symbol keys
  task_description = args["task_description"] || args[:task_description]
  projects = args["projects"] || args[:projects]
  project_list = projects ? projects.split(",").map(&:strip).join(", ") : "Not specified"

  <<~PROMPT
    # Create a New Development Session

    Help me create a new sxn development session.

    ## Task Information
    - Description: #{task_description || "Not provided"}
    - Requested projects: #{project_list}

    ## Steps to Complete

    1. **Generate session name** based on the task description
    2. **Create the session** using sxn_sessions_create
    3. **Add worktrees** for each requested project using sxn_worktrees_add
    4. **Navigate to the session** using sxn_sessions_swap

    ## Guidelines
    - Session names should be descriptive but concise (e.g., "user-auth", "api-refactor")
    - Use alphanumeric characters, hyphens, and underscores only
    - Apply project rules automatically when creating worktrees
  PROMPT
end