diff --git a/.claude/commands/workflow/test-fix-gen.md b/.claude/commands/workflow/test-fix-gen.md index ad559a92..080da660 100644 --- a/.claude/commands/workflow/test-fix-gen.md +++ b/.claude/commands/workflow/test-fix-gen.md @@ -143,13 +143,25 @@ This command is a **pure planning coordinator**: #### Phase 1: Create Test Session -**Step 1.1: Dispatch** - Create test workflow session +**Step 1.0: Load Source Session Intent (Session Mode Only)** - Preserve user's original task description for semantic CLI selection ```javascript -// Session Mode -SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]\"") +// Session Mode: Read source session metadata to get original task description +Read(".workflow/active/[sourceSessionId]/workflow-session.json") +// OR if context-package exists: +Read(".workflow/active/[sourceSessionId]/.process/context-package.json") -// Prompt Mode +// Extract: metadata.task_description or project/description field +// This preserves user's CLI tool preferences (e.g., "use Codex for fixes") +``` + +**Step 1.1: Dispatch** - Create test workflow session with preserved intent + +```javascript +// Session Mode - Include original task description to enable semantic CLI selection +SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]: [originalTaskDescription]\"") + +// Prompt Mode - User's description already contains their intent SlashCommand(command="/workflow:session:start --new \"Test generation for: [description]\"") ``` @@ -158,8 +170,8 @@ SlashCommand(command="/workflow:session:start --new \"Test generation for: [desc **Expected Behavior**: - Creates new session: `WFS-test-[slug]` - Writes `workflow-session.json` metadata: - - **Session Mode**: Includes `workflow_type: "test_session"`, `source_session_id: "[sourceId]"` - - **Prompt Mode**: Includes `workflow_type: "test_session"` only + - **Session Mode**: Includes `workflow_type: "test_session"`, `source_session_id: "[sourceId]"`, description with original user intent + - **Prompt Mode**: Includes `workflow_type: "test_session"` only (user's description already contains intent) - Returns new session ID **Parse Output**: diff --git a/.claude/commands/workflow/test-gen.md b/.claude/commands/workflow/test-gen.md index 99ea7d5e..916a58ab 100644 --- a/.claude/commands/workflow/test-gen.md +++ b/.claude/commands/workflow/test-gen.md @@ -57,19 +57,35 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*) ### Phase 1: Create Test Session -**Step 1.1: Dispatch** - Create new test workflow session +**Step 1.0: Load Source Session Intent** - Preserve user's original task description for semantic CLI selection ```javascript -SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]\"") +// Read source session metadata to get original task description +Read(".workflow/active/[sourceSessionId]/workflow-session.json") +// OR if context-package exists: +Read(".workflow/active/[sourceSessionId]/.process/context-package.json") + +// Extract: metadata.task_description or project/description field +// This preserves user's CLI tool preferences (e.g., "use Codex for fixes") ``` -**Input**: `sourceSessionId` from user argument (e.g., `WFS-user-auth`) +**Step 1.1: Dispatch** - Create new test workflow session with preserved intent + +```javascript +// Include original task description to enable semantic CLI selection +SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]: [originalTaskDescription]\"") +``` + +**Input**: +- `sourceSessionId` from user argument (e.g., `WFS-user-auth`) +- `originalTaskDescription` from source session metadata (preserves CLI tool preferences) **Expected Behavior**: - Creates new session with pattern `WFS-test-[source-slug]` (e.g., `WFS-test-user-auth`) - Writes metadata to `workflow-session.json`: - `workflow_type: "test_session"` - `source_session_id: "[sourceSessionId]"` + - Description includes original user intent for semantic CLI selection - Returns new session ID for subsequent phases **Parse Output**: diff --git a/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md b/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md index ad559a92..080da660 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md +++ b/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md @@ -143,13 +143,25 @@ This command is a **pure planning coordinator**: #### Phase 1: Create Test Session -**Step 1.1: Dispatch** - Create test workflow session +**Step 1.0: Load Source Session Intent (Session Mode Only)** - Preserve user's original task description for semantic CLI selection ```javascript -// Session Mode -SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]\"") +// Session Mode: Read source session metadata to get original task description +Read(".workflow/active/[sourceSessionId]/workflow-session.json") +// OR if context-package exists: +Read(".workflow/active/[sourceSessionId]/.process/context-package.json") -// Prompt Mode +// Extract: metadata.task_description or project/description field +// This preserves user's CLI tool preferences (e.g., "use Codex for fixes") +``` + +**Step 1.1: Dispatch** - Create test workflow session with preserved intent + +```javascript +// Session Mode - Include original task description to enable semantic CLI selection +SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]: [originalTaskDescription]\"") + +// Prompt Mode - User's description already contains their intent SlashCommand(command="/workflow:session:start --new \"Test generation for: [description]\"") ``` @@ -158,8 +170,8 @@ SlashCommand(command="/workflow:session:start --new \"Test generation for: [desc **Expected Behavior**: - Creates new session: `WFS-test-[slug]` - Writes `workflow-session.json` metadata: - - **Session Mode**: Includes `workflow_type: "test_session"`, `source_session_id: "[sourceId]"` - - **Prompt Mode**: Includes `workflow_type: "test_session"` only + - **Session Mode**: Includes `workflow_type: "test_session"`, `source_session_id: "[sourceId]"`, description with original user intent + - **Prompt Mode**: Includes `workflow_type: "test_session"` only (user's description already contains intent) - Returns new session ID **Parse Output**: diff --git a/.claude/skills/command-guide/reference/commands/workflow/test-gen.md b/.claude/skills/command-guide/reference/commands/workflow/test-gen.md index 99ea7d5e..916a58ab 100644 --- a/.claude/skills/command-guide/reference/commands/workflow/test-gen.md +++ b/.claude/skills/command-guide/reference/commands/workflow/test-gen.md @@ -57,19 +57,35 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*) ### Phase 1: Create Test Session -**Step 1.1: Dispatch** - Create new test workflow session +**Step 1.0: Load Source Session Intent** - Preserve user's original task description for semantic CLI selection ```javascript -SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]\"") +// Read source session metadata to get original task description +Read(".workflow/active/[sourceSessionId]/workflow-session.json") +// OR if context-package exists: +Read(".workflow/active/[sourceSessionId]/.process/context-package.json") + +// Extract: metadata.task_description or project/description field +// This preserves user's CLI tool preferences (e.g., "use Codex for fixes") ``` -**Input**: `sourceSessionId` from user argument (e.g., `WFS-user-auth`) +**Step 1.1: Dispatch** - Create new test workflow session with preserved intent + +```javascript +// Include original task description to enable semantic CLI selection +SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]: [originalTaskDescription]\"") +``` + +**Input**: +- `sourceSessionId` from user argument (e.g., `WFS-user-auth`) +- `originalTaskDescription` from source session metadata (preserves CLI tool preferences) **Expected Behavior**: - Creates new session with pattern `WFS-test-[source-slug]` (e.g., `WFS-test-user-auth`) - Writes metadata to `workflow-session.json`: - `workflow_type: "test_session"` - `source_session_id: "[sourceSessionId]"` + - Description includes original user intent for semantic CLI selection - Returns new session ID for subsequent phases **Parse Output**: