mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
Refactor task attachment terminology across workflow commands to use "dispatch" instead of "invoke" for clarity and consistency. Update documentation to reflect changes in task execution and attachment models, emphasizing the orchestrator's role in executing attached tasks. Adjust phase descriptions and command examples to align with the new terminology.
This commit is contained in:
@@ -9,11 +9,11 @@ allowed-tools: SlashCommand(*), Task(*), TodoWrite(*), Read(*), Write(*), Bash(*
|
||||
|
||||
## Coordinator Role
|
||||
|
||||
**This command is a pure orchestrator**: Execute 3 phases in sequence (interactive framework → parallel role analysis → synthesis), coordinating specialized commands/agents through task attachment model.
|
||||
**This command is a pure orchestrator**: Dispatches 3 phases in sequence (interactive framework → parallel role analysis → synthesis), coordinating specialized commands/agents through task attachment model.
|
||||
|
||||
**Task Attachment Model**:
|
||||
- SlashCommand invocation **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- Task agent execution **attaches analysis tasks** to orchestrator's TodoWrite
|
||||
- SlashCommand dispatch **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- Task agent dispatch **attaches analysis tasks** to orchestrator's TodoWrite
|
||||
- Phase 1: artifacts command attaches its internal tasks (Phase 1-5)
|
||||
- Phase 2: N conceptual-planning-agent tasks attached in parallel
|
||||
- Phase 3: synthesis command attaches its internal tasks
|
||||
@@ -26,9 +26,9 @@ allowed-tools: SlashCommand(*), Task(*), TodoWrite(*), Read(*), Write(*), Bash(*
|
||||
This workflow runs **fully autonomously** once triggered. Phase 1 (artifacts) handles user interaction, Phase 2 (role agents) runs in parallel.
|
||||
|
||||
1. **User triggers**: `/workflow:brainstorm:auto-parallel "topic" [--count N]`
|
||||
2. **Phase 1 executes** → artifacts command (tasks ATTACHED) → Auto-continues
|
||||
3. **Phase 2 executes** → Parallel role agents (N tasks ATTACHED concurrently) → Auto-continues
|
||||
4. **Phase 3 executes** → Synthesis command (tasks ATTACHED) → Reports final summary
|
||||
2. **Dispatch Phase 1** → artifacts command (tasks ATTACHED) → Auto-continues
|
||||
3. **Dispatch Phase 2** → Parallel role agents (N tasks ATTACHED concurrently) → Auto-continues
|
||||
4. **Dispatch Phase 3** → Synthesis command (tasks ATTACHED) → Reports final summary
|
||||
|
||||
**Auto-Continue Mechanism**:
|
||||
- TodoList tracks current phase status and dynamically manages task attachment/collapse
|
||||
@@ -38,13 +38,13 @@ This workflow runs **fully autonomously** once triggered. Phase 1 (artifacts) ha
|
||||
|
||||
## Core Rules
|
||||
|
||||
1. **Start Immediately**: First action is TodoWrite initialization, second action is Phase 1 command execution
|
||||
1. **Start Immediately**: First action is TodoWrite initialization, second action is dispatch Phase 1 command
|
||||
2. **No Preliminary Analysis**: Do not analyze topic before Phase 1 - artifacts handles all analysis
|
||||
3. **Parse Every Output**: Extract selected_roles from workflow-session.json after Phase 1
|
||||
4. **Auto-Continue via TodoList**: Check TodoList status to execute next pending phase automatically
|
||||
4. **Auto-Continue via TodoList**: Check TodoList status to dispatch next pending phase automatically
|
||||
5. **Track Progress**: Update TodoWrite dynamically with task attachment/collapse pattern
|
||||
6. **Task Attachment Model**: SlashCommand and Task invocations **attach** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
7. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After executing all attached tasks, immediately collapse them and execute next phase
|
||||
6. **Task Attachment Model**: SlashCommand and Task dispatches **attach** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
7. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After executing all attached tasks, immediately collapse them and dispatch next phase
|
||||
8. **Parallel Execution**: Phase 2 attaches multiple agent tasks simultaneously for concurrent execution
|
||||
|
||||
## Usage
|
||||
@@ -67,7 +67,11 @@ This workflow runs **fully autonomously** once triggered. Phase 1 (artifacts) ha
|
||||
|
||||
### Phase 1: Interactive Framework Generation
|
||||
|
||||
**Command**: `SlashCommand(command="/workflow:brainstorm:artifacts \"{topic}\" --count {N}")`
|
||||
**Step 1: Dispatch** - Interactive framework generation via artifacts command
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:brainstorm:artifacts \"{topic}\" --count {N}")
|
||||
```
|
||||
|
||||
**What It Does**:
|
||||
- Topic analysis: Extract challenges, generate task-specific questions
|
||||
@@ -87,7 +91,7 @@ This workflow runs **fully autonomously** once triggered. Phase 1 (artifacts) ha
|
||||
- workflow-session.json contains selected_roles[] (metadata only, no content duplication)
|
||||
- Session directory `.workflow/active/WFS-{topic}/.brainstorming/` exists
|
||||
|
||||
**TodoWrite Update (Phase 1 SlashCommand invoked - tasks attached)**:
|
||||
**TodoWrite Update (Phase 1 SlashCommand dispatched - tasks attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 0: Parameter Parsing", "status": "completed", "activeForm": "Parsing count parameter"},
|
||||
@@ -102,7 +106,7 @@ This workflow runs **fully autonomously** once triggered. Phase 1 (artifacts) ha
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** artifacts' 5 internal tasks. Orchestrator **executes** these tasks sequentially.
|
||||
**Note**: SlashCommand dispatch **attaches** artifacts' 5 internal tasks. Orchestrator **executes** these tasks sequentially.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 1.1-1.5** sequentially
|
||||
|
||||
@@ -183,7 +187,7 @@ TOPIC: {user-provided-topic}
|
||||
"
|
||||
```
|
||||
|
||||
**Parallel Execution**:
|
||||
**Parallel Dispatch**:
|
||||
- Launch N agents simultaneously (one message with multiple Task calls)
|
||||
- Each agent task **attached** to orchestrator's TodoWrite
|
||||
- All agents execute concurrently, each attaching their own analysis sub-tasks
|
||||
@@ -201,7 +205,7 @@ TOPIC: {user-provided-topic}
|
||||
- **FORBIDDEN naming**: No `recommendations.md`, `recommendations-*.md`, or any non-`analysis` prefixed files
|
||||
- All N role analyses completed
|
||||
|
||||
**TodoWrite Update (Phase 2 agents invoked - tasks attached in parallel)**:
|
||||
**TodoWrite Update (Phase 2 agents dispatched - tasks attached in parallel)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 0: Parameter Parsing", "status": "completed", "activeForm": "Parsing count parameter"},
|
||||
@@ -214,7 +218,7 @@ TOPIC: {user-provided-topic}
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: Multiple Task invocations **attach** N role analysis tasks simultaneously. Orchestrator **executes** these tasks in parallel.
|
||||
**Note**: Multiple Task dispatches **attach** N role analysis tasks simultaneously. Orchestrator **executes** these tasks in parallel.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 2.1-2.N** concurrently
|
||||
|
||||
@@ -236,7 +240,11 @@ TOPIC: {user-provided-topic}
|
||||
|
||||
### Phase 3: Synthesis Generation
|
||||
|
||||
**Command**: `SlashCommand(command="/workflow:brainstorm:synthesis --session {sessionId}")`
|
||||
**Step 3: Dispatch** - Synthesis integration via synthesis command
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:brainstorm:synthesis --session {sessionId}")
|
||||
```
|
||||
|
||||
**What It Does**:
|
||||
- Load original user intent from workflow-session.json
|
||||
@@ -250,7 +258,7 @@ TOPIC: {user-provided-topic}
|
||||
- `.workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.md` exists
|
||||
- Synthesis references all role analyses
|
||||
|
||||
**TodoWrite Update (Phase 3 SlashCommand invoked - tasks attached)**:
|
||||
**TodoWrite Update (Phase 3 SlashCommand dispatched - tasks attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 0: Parameter Parsing", "status": "completed", "activeForm": "Parsing count parameter"},
|
||||
@@ -263,7 +271,7 @@ TOPIC: {user-provided-topic}
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** synthesis' internal tasks. Orchestrator **executes** these tasks sequentially.
|
||||
**Note**: SlashCommand dispatch **attaches** synthesis' internal tasks. Orchestrator **executes** these tasks sequentially.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 3.1-3.3** sequentially
|
||||
|
||||
@@ -296,7 +304,7 @@ Synthesis: .workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.m
|
||||
|
||||
### Key Principles
|
||||
|
||||
1. **Task Attachment** (when SlashCommand/Task invoked):
|
||||
1. **Task Attachment** (when SlashCommand/Task dispatched):
|
||||
- Sub-command's or agent's internal tasks are **attached** to orchestrator's TodoWrite
|
||||
- Phase 1: `/workflow:brainstorm:artifacts` attaches 5 internal tasks (Phase 1.1-1.5)
|
||||
- Phase 2: Multiple `Task(conceptual-planning-agent)` calls attach N role analysis tasks simultaneously
|
||||
@@ -317,7 +325,7 @@ Synthesis: .workflow/active/WFS-{topic}/.brainstorming/synthesis-specification.m
|
||||
- No user intervention required between phases
|
||||
- TodoWrite dynamically reflects current execution state
|
||||
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase 1 invoked (artifacts tasks ATTACHED) → Artifacts sub-tasks executed → Phase 1 completed (tasks COLLAPSED) → Phase 2 invoked (N role tasks ATTACHED in parallel) → Role analyses executed concurrently → Phase 2 completed (tasks COLLAPSED) → Phase 3 invoked (synthesis tasks ATTACHED) → Synthesis sub-tasks executed → Phase 3 completed (tasks COLLAPSED) → Workflow complete.
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase 1 dispatched (artifacts tasks ATTACHED) → Artifacts sub-tasks executed → Phase 1 completed (tasks COLLAPSED) → Phase 2 dispatched (N role tasks ATTACHED in parallel) → Role analyses executed concurrently → Phase 2 completed (tasks COLLAPSED) → Phase 3 dispatched (synthesis tasks ATTACHED) → Synthesis sub-tasks executed → Phase 3 completed (tasks COLLAPSED) → Workflow complete.
|
||||
|
||||
### Brainstorming Workflow Specific Features
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
|
||||
## Coordinator Role
|
||||
|
||||
**This command is a pure orchestrator**: Execute 5 slash commands in sequence (including a quality gate), parse their outputs, pass context between them, and ensure complete execution through **automatic continuation**.
|
||||
**This command is a pure orchestrator**: Dispatch 5 slash commands in sequence (including a quality gate), parse their outputs, pass context between them, and ensure complete execution through **automatic continuation**.
|
||||
|
||||
**Execution Model - Auto-Continue Workflow with Quality Gate**:
|
||||
|
||||
@@ -17,14 +17,14 @@ This workflow runs **fully autonomously** once triggered. Phase 3 (conflict reso
|
||||
|
||||
|
||||
1. **User triggers**: `/workflow:plan "task"`
|
||||
2. **Phase 1 executes** → Session discovery → Auto-continues
|
||||
3. **Phase 2 executes** → Context gathering → Auto-continues
|
||||
4. **Phase 3 executes** (optional, if conflict_risk ≥ medium) → Conflict resolution → Auto-continues
|
||||
5. **Phase 4 executes** → Task generation (task-generate-agent) → Reports final summary
|
||||
2. **Phase 1 dispatches** → Session discovery → Auto-continues
|
||||
3. **Phase 2 dispatches** → Context gathering → Auto-continues
|
||||
4. **Phase 3 dispatches** (optional, if conflict_risk ≥ medium) → Conflict resolution → Auto-continues
|
||||
5. **Phase 4 dispatches** → Task generation (task-generate-agent) → Reports final summary
|
||||
|
||||
**Task Attachment Model**:
|
||||
- SlashCommand invocation **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- When a sub-command is invoked (e.g., `/workflow:tools:context-gather`), its internal tasks are attached to the orchestrator's TodoWrite
|
||||
- SlashCommand dispatch **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- When a sub-command is dispatched (e.g., `/workflow:tools:context-gather`), its internal tasks are attached to the orchestrator's TodoWrite
|
||||
- Orchestrator **executes these attached tasks** sequentially
|
||||
- After completion, attached tasks are **collapsed** back to high-level phase summary
|
||||
- This is **task expansion**, not external delegation
|
||||
@@ -43,7 +43,7 @@ This workflow runs **fully autonomously** once triggered. Phase 3 (conflict reso
|
||||
3. **Parse Every Output**: Extract required data from each command/agent output for next phase
|
||||
4. **Auto-Continue via TodoList**: Check TodoList status to execute next pending phase automatically
|
||||
5. **Track Progress**: Update TodoWrite dynamically with task attachment/collapse pattern
|
||||
6. **Task Attachment Model**: SlashCommand invocation **attaches** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
6. **Task Attachment Model**: SlashCommand dispatch **attaches** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
7. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After executing all attached tasks, immediately collapse them and execute next phase
|
||||
|
||||
## Execution Process
|
||||
@@ -79,7 +79,12 @@ Return:
|
||||
## 5-Phase Execution
|
||||
|
||||
### Phase 1: Session Discovery
|
||||
**Command**: `SlashCommand(command="/workflow:session:start --auto \"[structured-task-description]\"")`
|
||||
|
||||
**Step 1.1: Dispatch** - Create or discover workflow session
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:session:start --auto \"[structured-task-description]\"")
|
||||
```
|
||||
|
||||
**Task Description Structure**:
|
||||
```
|
||||
@@ -111,7 +116,12 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
---
|
||||
|
||||
### Phase 2: Context Gathering
|
||||
**Command**: `SlashCommand(command="/workflow:tools:context-gather --session [sessionId] \"[structured-task-description]\"")`
|
||||
|
||||
**Step 2.1: Dispatch** - Gather project context and analyze codebase
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:context-gather --session [sessionId] \"[structured-task-description]\"")
|
||||
```
|
||||
|
||||
**Use Same Structured Description**: Pass the same structured format from Phase 1
|
||||
|
||||
@@ -125,9 +135,9 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
- Context package path extracted
|
||||
- File exists and is valid JSON
|
||||
|
||||
<!-- TodoWrite: When context-gather invoked, INSERT 3 context-gather tasks, mark first as in_progress -->
|
||||
<!-- TodoWrite: When context-gather dispatched, INSERT 3 context-gather tasks, mark first as in_progress -->
|
||||
|
||||
**TodoWrite Update (Phase 2 SlashCommand invoked - tasks attached)**:
|
||||
**TodoWrite Update (Phase 2 SlashCommand dispatched - tasks attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
||||
@@ -139,7 +149,7 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** context-gather's 3 tasks. Orchestrator **executes** these tasks sequentially.
|
||||
**Note**: SlashCommand dispatch **attaches** context-gather's 3 tasks. Orchestrator **executes** these tasks sequentially.
|
||||
|
||||
<!-- TodoWrite: After Phase 2 tasks complete, REMOVE Phase 2.1-2.3, restore to orchestrator view -->
|
||||
|
||||
@@ -162,7 +172,11 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
|
||||
**Trigger**: Only execute when context-package.json indicates conflict_risk is "medium" or "high"
|
||||
|
||||
**Command**: `SlashCommand(command="/workflow:tools:conflict-resolution --session [sessionId] --context [contextPath]")`
|
||||
**Step 3.1: Dispatch** - Detect and resolve conflicts with CLI analysis
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:conflict-resolution --session [sessionId] --context [contextPath]")
|
||||
```
|
||||
|
||||
**Input**:
|
||||
- sessionId from Phase 1
|
||||
@@ -182,7 +196,7 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
|
||||
<!-- TodoWrite: If conflict_risk ≥ medium, INSERT 3 conflict-resolution tasks -->
|
||||
|
||||
**TodoWrite Update (Phase 3 SlashCommand invoked - tasks attached, if conflict_risk ≥ medium)**:
|
||||
**TodoWrite Update (Phase 3 SlashCommand dispatched - tasks attached, if conflict_risk ≥ medium)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
||||
@@ -195,7 +209,7 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** conflict-resolution's 3 tasks. Orchestrator **executes** these tasks sequentially.
|
||||
**Note**: SlashCommand dispatch **attaches** conflict-resolution's 3 tasks. Orchestrator **executes** these tasks sequentially.
|
||||
|
||||
<!-- TodoWrite: After Phase 3 tasks complete, REMOVE Phase 3.1-3.3, restore to orchestrator view -->
|
||||
|
||||
@@ -215,9 +229,14 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
|
||||
**Memory State Check**:
|
||||
- Evaluate current context window usage and memory state
|
||||
- If memory usage is high (>110K tokens or approaching context limits):
|
||||
- **Command**: `SlashCommand(command="/compact")`
|
||||
- This optimizes memory before proceeding to Phase 3.5
|
||||
- If memory usage is high (>120K tokens or approaching context limits):
|
||||
|
||||
**Step 3.2: Dispatch** - Optimize memory before proceeding
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/compact")
|
||||
```
|
||||
|
||||
- Memory compaction is particularly important after analysis phase which may generate extensive documentation
|
||||
- Ensures optimal performance and prevents context overflow
|
||||
|
||||
@@ -251,12 +270,13 @@ CONTEXT: Existing user database schema, REST API endpoints
|
||||
- Task generation translates high-level role analyses into concrete, actionable work items
|
||||
- **Intent priority**: Current user prompt > role analysis.md files > guidance-specification.md
|
||||
|
||||
**Command**:
|
||||
```bash
|
||||
# Default (agent mode)
|
||||
**Step 4.1: Dispatch** - Generate implementation plan and task JSONs
|
||||
|
||||
```javascript
|
||||
// Default (agent mode)
|
||||
SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId]")
|
||||
|
||||
# With CLI execution
|
||||
// With CLI execution (if --cli-execute flag present)
|
||||
SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId] --cli-execute")
|
||||
```
|
||||
|
||||
@@ -270,9 +290,9 @@ SlashCommand(command="/workflow:tools:task-generate-agent --session [sessionId]
|
||||
- `.workflow/active/[sessionId]/.task/IMPL-*.json` exists (at least one)
|
||||
- `.workflow/active/[sessionId]/TODO_LIST.md` exists
|
||||
|
||||
<!-- TodoWrite: When task-generate-agent invoked, ATTACH 1 agent task -->
|
||||
<!-- TodoWrite: When task-generate-agent dispatched, ATTACH 1 agent task -->
|
||||
|
||||
**TodoWrite Update (Phase 4 SlashCommand invoked - agent task attached)**:
|
||||
**TodoWrite Update (Phase 4 SlashCommand dispatched - agent task attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
||||
@@ -316,7 +336,7 @@ Quality Gate: Consider running /workflow:action-plan-verify to catch issues earl
|
||||
|
||||
### Key Principles
|
||||
|
||||
1. **Task Attachment** (when SlashCommand invoked):
|
||||
1. **Task Attachment** (when SlashCommand dispatched):
|
||||
- Sub-command's internal tasks are **attached** to orchestrator's TodoWrite
|
||||
- **Phase 2, 3**: Multiple sub-tasks attached (e.g., Phase 2.1, 2.2, 2.3)
|
||||
- **Phase 4**: Single agent task attached (e.g., "Execute task-generate-agent")
|
||||
@@ -335,7 +355,7 @@ Quality Gate: Consider running /workflow:action-plan-verify to catch issues earl
|
||||
- No user intervention required between phases
|
||||
- TodoWrite dynamically reflects current execution state
|
||||
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase invoked (tasks ATTACHED) → Sub-tasks executed sequentially → Phase completed (tasks COLLAPSED to summary for Phase 2/3, or marked completed for Phase 4) → Next phase begins → Repeat until all phases complete.
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase dispatched (tasks ATTACHED) → Sub-tasks executed sequentially → Phase completed (tasks COLLAPSED to summary for Phase 2/3, or marked completed for Phase 4) → Next phase begins → Repeat until all phases complete.
|
||||
|
||||
|
||||
|
||||
@@ -427,7 +447,7 @@ User triggers: /workflow:plan "Build authentication system"
|
||||
Phase 1: Session Discovery
|
||||
→ sessionId extracted
|
||||
↓
|
||||
Phase 2: Context Gathering (SlashCommand invoked)
|
||||
Phase 2: Context Gathering (SlashCommand dispatched)
|
||||
→ ATTACH 3 sub-tasks: ← ATTACHED
|
||||
- → Analyze codebase structure
|
||||
- → Identify integration points
|
||||
@@ -438,7 +458,7 @@ Phase 2: Context Gathering (SlashCommand invoked)
|
||||
↓
|
||||
Conditional Branch: Check conflict_risk
|
||||
├─ IF conflict_risk ≥ medium:
|
||||
│ Phase 3: Conflict Resolution (SlashCommand invoked)
|
||||
│ Phase 3: Conflict Resolution (SlashCommand dispatched)
|
||||
│ → ATTACH 3 sub-tasks: ← ATTACHED
|
||||
│ - → Detect conflicts with CLI analysis
|
||||
│ - → Present conflicts to user
|
||||
@@ -448,7 +468,7 @@ Conditional Branch: Check conflict_risk
|
||||
│
|
||||
└─ ELSE: Skip Phase 3, proceed to Phase 4
|
||||
↓
|
||||
Phase 4: Task Generation (SlashCommand invoked)
|
||||
Phase 4: Task Generation (SlashCommand dispatched)
|
||||
→ Single agent task (no sub-tasks)
|
||||
→ Agent autonomously completes internally:
|
||||
(discovery → planning → output)
|
||||
@@ -458,12 +478,12 @@ Return summary to user
|
||||
```
|
||||
|
||||
**Key Points**:
|
||||
- **← ATTACHED**: Tasks attached to TodoWrite when SlashCommand invoked
|
||||
- **← ATTACHED**: Tasks attached to TodoWrite when SlashCommand dispatched
|
||||
- Phase 2, 3: Multiple sub-tasks
|
||||
- Phase 4: Single agent task
|
||||
- **← COLLAPSED**: Sub-tasks collapsed to summary after completion (Phase 2, 3 only)
|
||||
- **Phase 4**: Single agent task, no collapse (just mark completed)
|
||||
- **Conditional Branch**: Phase 3 only executes if conflict_risk ≥ medium
|
||||
- **Conditional Branch**: Phase 3 only dispatches if conflict_risk ≥ medium
|
||||
- **Continuous Flow**: No user intervention between phases
|
||||
|
||||
## Error Handling
|
||||
|
||||
@@ -9,40 +9,45 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
|
||||
## Coordinator Role
|
||||
|
||||
**This command is a pure orchestrator**: Execute 6 slash commands in sequence, parse outputs, pass context, and ensure complete TDD workflow creation with Red-Green-Refactor task generation.
|
||||
**This command is a pure orchestrator**: Dispatches 6 slash commands in sequence, parse outputs, pass context, and ensure complete TDD workflow creation with Red-Green-Refactor task generation.
|
||||
|
||||
**Execution Modes**:
|
||||
- **Agent Mode** (default): Use `/workflow:tools:task-generate-tdd` (autonomous agent-driven)
|
||||
- **CLI Mode** (`--cli-execute`): Use `/workflow:tools:task-generate-tdd --cli-execute` (Gemini/Qwen)
|
||||
|
||||
**Task Attachment Model**:
|
||||
- SlashCommand invocation **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- When a sub-command is invoked (e.g., `/workflow:tools:test-context-gather`), its internal tasks are attached to the orchestrator's TodoWrite
|
||||
- SlashCommand dispatch **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- When dispatching a sub-command (e.g., `/workflow:tools:test-context-gather`), its internal tasks are attached to the orchestrator's TodoWrite
|
||||
- Orchestrator **executes these attached tasks** sequentially
|
||||
- After completion, attached tasks are **collapsed** back to high-level phase summary
|
||||
- This is **task expansion**, not external delegation
|
||||
|
||||
**Auto-Continue Mechanism**:
|
||||
- TodoList tracks current phase status and dynamically manages task attachment/collapse
|
||||
- When each phase finishes executing, automatically execute next pending phase
|
||||
- When each phase finishes executing, automatically dispatch next pending phase
|
||||
- All phases run autonomously without user interaction
|
||||
- **⚠️ CONTINUOUS EXECUTION** - Do not stop until all phases complete
|
||||
|
||||
## Core Rules
|
||||
|
||||
1. **Start Immediately**: First action is TodoWrite initialization, second action is Phase 1 execution
|
||||
1. **Start Immediately**: First action is TodoWrite initialization, second action is dispatch Phase 1
|
||||
2. **No Preliminary Analysis**: Do not read files before Phase 1
|
||||
3. **Parse Every Output**: Extract required data for next phase
|
||||
4. **Auto-Continue via TodoList**: Check TodoList status to execute next pending phase automatically
|
||||
4. **Auto-Continue via TodoList**: Check TodoList status to dispatch next pending phase automatically
|
||||
5. **Track Progress**: Update TodoWrite dynamically with task attachment/collapse pattern
|
||||
6. **TDD Context**: All descriptions include "TDD:" prefix
|
||||
7. **Task Attachment Model**: SlashCommand invocation **attaches** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
8. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After executing all attached tasks, immediately collapse them and execute next phase
|
||||
7. **Task Attachment Model**: SlashCommand dispatch **attaches** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
8. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After executing all attached tasks, immediately collapse them and dispatch next phase
|
||||
|
||||
## 6-Phase Execution (with Conflict Resolution)
|
||||
|
||||
### Phase 1: Session Discovery
|
||||
**Command**: `/workflow:session:start --auto "TDD: [structured-description]"`
|
||||
|
||||
**Step 1.1: Dispatch** - Session discovery and initialization
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:session:start --auto \"TDD: [structured-description]\"")
|
||||
```
|
||||
|
||||
**TDD Structured Format**:
|
||||
```
|
||||
@@ -62,7 +67,12 @@ TEST_FOCUS: [Test scenarios]
|
||||
---
|
||||
|
||||
### Phase 2: Context Gathering
|
||||
**Command**: `/workflow:tools:context-gather --session [sessionId] "TDD: [structured-description]"`
|
||||
|
||||
**Step 2.1: Dispatch** - Context gathering and analysis
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:context-gather --session [sessionId] \"TDD: [structured-description]\"")
|
||||
```
|
||||
|
||||
**Use Same Structured Description**: Pass the same structured format from Phase 1
|
||||
|
||||
@@ -83,7 +93,12 @@ TEST_FOCUS: [Test scenarios]
|
||||
---
|
||||
|
||||
### Phase 3: Test Coverage Analysis
|
||||
**Command**: `/workflow:tools:test-context-gather --session [sessionId]`
|
||||
|
||||
**Step 3.1: Dispatch** - Test coverage analysis and framework detection
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:test-context-gather --session [sessionId]")
|
||||
```
|
||||
|
||||
**Purpose**: Analyze existing codebase for:
|
||||
- Existing test patterns and conventions
|
||||
@@ -95,9 +110,9 @@ TEST_FOCUS: [Test scenarios]
|
||||
|
||||
|
||||
|
||||
<!-- TodoWrite: When test-context-gather invoked, INSERT 3 test-context-gather tasks -->
|
||||
<!-- TodoWrite: When test-context-gather dispatched, INSERT 3 test-context-gather tasks -->
|
||||
|
||||
**TodoWrite Update (Phase 3 SlashCommand invoked - tasks attached)**:
|
||||
**TodoWrite Update (Phase 3 SlashCommand dispatched - tasks attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
||||
@@ -111,7 +126,7 @@ TEST_FOCUS: [Test scenarios]
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** test-context-gather's 3 tasks. Orchestrator **executes** these tasks.
|
||||
**Note**: SlashCommand dispatch **attaches** test-context-gather's 3 tasks. Orchestrator **executes** these tasks.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 3.1-3.3** sequentially
|
||||
|
||||
@@ -138,7 +153,11 @@ TEST_FOCUS: [Test scenarios]
|
||||
|
||||
**Trigger**: Only execute when context-package.json indicates conflict_risk is "medium" or "high"
|
||||
|
||||
**Command**: `SlashCommand(command="/workflow:tools:conflict-resolution --session [sessionId] --context [contextPath]")`
|
||||
**Step 4.1: Dispatch** - Conflict detection and resolution
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:conflict-resolution --session [sessionId] --context [contextPath]")
|
||||
```
|
||||
|
||||
**Input**:
|
||||
- sessionId from Phase 1
|
||||
@@ -156,9 +175,9 @@ TEST_FOCUS: [Test scenarios]
|
||||
- If conflict_risk is "none" or "low", skip directly to Phase 5
|
||||
- Display: "No significant conflicts detected, proceeding to TDD task generation"
|
||||
|
||||
<!-- TodoWrite: If conflict_risk ≥ medium, INSERT 3 conflict-resolution tasks -->
|
||||
<!-- TodoWrite: If conflict_risk ≥ medium, INSERT 3 conflict-resolution tasks when dispatched -->
|
||||
|
||||
**TodoWrite Update (Phase 4 SlashCommand invoked - tasks attached, if conflict_risk ≥ medium)**:
|
||||
**TodoWrite Update (Phase 4 SlashCommand dispatched - tasks attached, if conflict_risk ≥ medium)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
||||
@@ -173,7 +192,7 @@ TEST_FOCUS: [Test scenarios]
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** conflict-resolution's 3 tasks. Orchestrator **executes** these tasks.
|
||||
**Note**: SlashCommand dispatch **attaches** conflict-resolution's 3 tasks. Orchestrator **executes** these tasks.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 4.1-4.3** sequentially
|
||||
|
||||
@@ -198,7 +217,13 @@ TEST_FOCUS: [Test scenarios]
|
||||
**Memory State Check**:
|
||||
- Evaluate current context window usage and memory state
|
||||
- If memory usage is high (>110K tokens or approaching context limits):
|
||||
- **Command**: `SlashCommand(command="/compact")`
|
||||
|
||||
**Step 4.5: Dispatch** - Memory compaction
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/compact")
|
||||
```
|
||||
|
||||
- This optimizes memory before proceeding to Phase 5
|
||||
- Memory compaction is particularly important after analysis phase which may generate extensive documentation
|
||||
- Ensures optimal performance and prevents context overflow
|
||||
@@ -206,9 +231,16 @@ TEST_FOCUS: [Test scenarios]
|
||||
---
|
||||
|
||||
### Phase 5: TDD Task Generation
|
||||
**Command**:
|
||||
- Agent Mode (default): `/workflow:tools:task-generate-tdd --session [sessionId]`
|
||||
- CLI Mode (`--cli-execute`): `/workflow:tools:task-generate-tdd --session [sessionId] --cli-execute`
|
||||
|
||||
**Step 5.1: Dispatch** - TDD task generation via action-planning-agent
|
||||
|
||||
```javascript
|
||||
// Agent Mode (default)
|
||||
SlashCommand(command="/workflow:tools:task-generate-tdd --session [sessionId]")
|
||||
|
||||
// CLI Mode (--cli-execute flag)
|
||||
SlashCommand(command="/workflow:tools:task-generate-tdd --session [sessionId] --cli-execute")
|
||||
```
|
||||
|
||||
**Parse**: Extract feature count, task count (not chain count - tasks now contain internal TDD cycles)
|
||||
|
||||
@@ -223,9 +255,9 @@ TEST_FOCUS: [Test scenarios]
|
||||
- IMPL_PLAN.md contains workflow_type: "tdd" in frontmatter
|
||||
- Task count ≤10 (compliance with task limit)
|
||||
|
||||
<!-- TodoWrite: When task-generate-tdd invoked, INSERT 3 task-generate-tdd tasks -->
|
||||
<!-- TodoWrite: When task-generate-tdd dispatched, INSERT 3 task-generate-tdd tasks -->
|
||||
|
||||
**TodoWrite Update (Phase 5 SlashCommand invoked - tasks attached)**:
|
||||
**TodoWrite Update (Phase 5 SlashCommand dispatched - tasks attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Phase 1: Session Discovery", "status": "completed", "activeForm": "Executing session discovery"},
|
||||
@@ -239,7 +271,7 @@ TEST_FOCUS: [Test scenarios]
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** task-generate-tdd's 3 tasks. Orchestrator **executes** these tasks. Each generated IMPL task will contain internal Red-Green-Refactor cycle.
|
||||
**Note**: SlashCommand dispatch **attaches** task-generate-tdd's 3 tasks. Orchestrator **executes** these tasks. Each generated IMPL task will contain internal Red-Green-Refactor cycle.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 5.1-5.3** sequentially
|
||||
|
||||
@@ -319,7 +351,7 @@ Quality Gate: Consider running /workflow:action-plan-verify to validate TDD task
|
||||
|
||||
### Key Principles
|
||||
|
||||
1. **Task Attachment** (when SlashCommand invoked):
|
||||
1. **Task Attachment** (when SlashCommand dispatched):
|
||||
- Sub-command's internal tasks are **attached** to orchestrator's TodoWrite
|
||||
- Example: `/workflow:tools:test-context-gather` attaches 3 sub-tasks (Phase 3.1, 3.2, 3.3)
|
||||
- First attached task marked as `in_progress`, others as `pending`
|
||||
@@ -336,7 +368,7 @@ Quality Gate: Consider running /workflow:action-plan-verify to validate TDD task
|
||||
- No user intervention required between phases
|
||||
- TodoWrite dynamically reflects current execution state
|
||||
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase invoked (tasks ATTACHED) → Sub-tasks executed sequentially → Phase completed (tasks COLLAPSED to summary) → Next phase begins (conditional Phase 4 if conflict_risk ≥ medium) → Repeat until all phases complete.
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase dispatched (tasks ATTACHED) → Sub-tasks executed sequentially → Phase completed (tasks COLLAPSED to summary) → Next phase begins (conditional Phase 4 if conflict_risk ≥ medium) → Repeat until all phases complete.
|
||||
|
||||
### TDD-Specific Features
|
||||
|
||||
|
||||
@@ -59,8 +59,8 @@ This command is a **pure planning coordinator**:
|
||||
- **All execution delegated to `/workflow:test-cycle-execute`**
|
||||
|
||||
**Task Attachment Model**:
|
||||
- SlashCommand invocation **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- When a sub-command is invoked (e.g., `/workflow:tools:test-context-gather`), its internal tasks are attached to the orchestrator's TodoWrite
|
||||
- SlashCommand dispatch **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- When dispatching a sub-command (e.g., `/workflow:tools:test-context-gather`), its internal tasks are attached to the orchestrator's TodoWrite
|
||||
- Orchestrator **executes these attached tasks** sequentially
|
||||
- After completion, attached tasks are **collapsed** back to high-level phase summary
|
||||
- This is **task expansion**, not external delegation
|
||||
@@ -136,7 +136,7 @@ This command is a **pure planning coordinator**:
|
||||
|
||||
### Core Execution Rules
|
||||
|
||||
1. **Start Immediately**: First action is TodoWrite, second is Phase 1 session creation
|
||||
1. **Start Immediately**: First action is TodoWrite, second is dispatch Phase 1 session creation
|
||||
2. **No Preliminary Analysis**: Do not read files before Phase 1
|
||||
3. **Parse Every Output**: Extract required data from each phase for next phase
|
||||
4. **Sequential Execution**: Each phase depends on previous phase's output
|
||||
@@ -144,16 +144,22 @@ This command is a **pure planning coordinator**:
|
||||
6. **Track Progress**: Update TodoWrite dynamically with task attachment/collapse pattern
|
||||
7. **Automatic Detection**: Mode auto-detected from input pattern
|
||||
8. **Parse Flags**: Extract `--use-codex` and `--cli-execute` flags for Phase 4
|
||||
9. **Task Attachment Model**: SlashCommand invocation **attaches** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
9. **Task Attachment Model**: SlashCommand dispatch **attaches** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
10. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After executing all attached tasks, immediately collapse them and execute next phase
|
||||
|
||||
### 5-Phase Execution
|
||||
|
||||
#### Phase 1: Create Test Session
|
||||
|
||||
**Command**:
|
||||
- **Session Mode**: `SlashCommand("/workflow:session:start --new \"Test validation for [sourceSessionId]\"")`
|
||||
- **Prompt Mode**: `SlashCommand("/workflow:session:start --new \"Test generation for: [description]\"")`
|
||||
**Step 1.1: Dispatch** - Create test workflow session
|
||||
|
||||
```javascript
|
||||
// Session Mode
|
||||
SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]\"")
|
||||
|
||||
// Prompt Mode
|
||||
SlashCommand(command="/workflow:session:start --new \"Test generation for: [description]\"")
|
||||
```
|
||||
|
||||
**Input**: User argument (session ID, description, or file path)
|
||||
|
||||
@@ -177,9 +183,15 @@ This command is a **pure planning coordinator**:
|
||||
|
||||
#### Phase 2: Gather Test Context
|
||||
|
||||
**Command**:
|
||||
- **Session Mode**: `SlashCommand("/workflow:tools:test-context-gather --session [testSessionId]")`
|
||||
- **Prompt Mode**: `SlashCommand("/workflow:tools:context-gather --session [testSessionId] \"[task_description]\"")`
|
||||
**Step 2.1: Dispatch** - Gather test context via appropriate method
|
||||
|
||||
```javascript
|
||||
// Session Mode
|
||||
SlashCommand(command="/workflow:tools:test-context-gather --session [testSessionId]")
|
||||
|
||||
// Prompt Mode
|
||||
SlashCommand(command="/workflow:tools:context-gather --session [testSessionId] \"[task_description]\"")
|
||||
```
|
||||
|
||||
**Input**: `testSessionId` from Phase 1
|
||||
|
||||
@@ -208,7 +220,11 @@ This command is a **pure planning coordinator**:
|
||||
|
||||
#### Phase 3: Test Generation Analysis
|
||||
|
||||
**Command**: `SlashCommand("/workflow:tools:test-concept-enhanced --session [testSessionId] --context [contextPath]")`
|
||||
**Step 3.1: Dispatch** - Generate test requirements using Gemini
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:test-concept-enhanced --session [testSessionId] --context [contextPath]")
|
||||
```
|
||||
|
||||
**Input**:
|
||||
- `testSessionId` from Phase 1
|
||||
@@ -264,7 +280,11 @@ For each targeted file/function, Gemini MUST generate:
|
||||
|
||||
#### Phase 4: Generate Test Tasks
|
||||
|
||||
**Command**: `SlashCommand("/workflow:tools:test-task-generate [--use-codex] [--cli-execute] --session [testSessionId]")`
|
||||
**Step 4.1: Dispatch** - Generate test task JSONs
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:test-task-generate [--use-codex] [--cli-execute] --session [testSessionId]")
|
||||
```
|
||||
|
||||
**Input**:
|
||||
- `testSessionId` from Phase 1
|
||||
@@ -357,7 +377,7 @@ CRITICAL - Next Steps:
|
||||
|
||||
#### Key Principles
|
||||
|
||||
1. **Task Attachment** (when SlashCommand invoked):
|
||||
1. **Task Attachment** (when SlashCommand dispatched):
|
||||
- Sub-command's internal tasks are **attached** to orchestrator's TodoWrite
|
||||
- Example - Phase 2 with sub-tasks:
|
||||
```json
|
||||
@@ -392,7 +412,7 @@ CRITICAL - Next Steps:
|
||||
- No user intervention required between phases
|
||||
- TodoWrite dynamically reflects current execution state
|
||||
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase invoked (tasks ATTACHED with mode-specific context gathering) → Sub-tasks executed sequentially → Phase completed (tasks COLLAPSED to summary) → Next phase begins → Repeat until all phases complete.
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase dispatched (tasks ATTACHED with mode-specific context gathering) → Sub-tasks executed sequentially → Phase completed (tasks COLLAPSED to summary) → Next phase begins → Repeat until all phases complete.
|
||||
|
||||
#### Test-Fix-Gen Specific Features
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
- **Manual First**: Default to manual fixes, use `--use-codex` flag for automated Codex fix application
|
||||
|
||||
**Task Attachment Model**:
|
||||
- SlashCommand invocation **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- When a sub-command is invoked (e.g., `/workflow:tools:test-context-gather`), its internal tasks are attached to the orchestrator's TodoWrite
|
||||
- SlashCommand dispatch **expands workflow** by attaching sub-tasks to current TodoWrite
|
||||
- When a sub-command is dispatched (e.g., `/workflow:tools:test-context-gather`), its internal tasks are attached to the orchestrator's TodoWrite
|
||||
- Orchestrator **executes these attached tasks** sequentially
|
||||
- After completion, attached tasks are **collapsed** back to high-level phase summary
|
||||
- This is **task expansion**, not external delegation
|
||||
@@ -50,13 +50,18 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
7. **Automatic Detection**: context-gather auto-detects test session and gathers source session context
|
||||
8. **Parse --use-codex Flag**: Extract flag from arguments and pass to Phase 4 (test-task-generate)
|
||||
9. **Command Boundary**: This command ends at Phase 5 summary. Test execution is NOT part of this command.
|
||||
10. **Task Attachment Model**: SlashCommand invocation **attaches** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
10. **Task Attachment Model**: SlashCommand dispatch **attaches** sub-tasks to current workflow. Orchestrator **executes** these attached tasks itself, then **collapses** them after completion
|
||||
11. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After executing all attached tasks, immediately collapse them and execute next phase
|
||||
|
||||
## 5-Phase Execution
|
||||
|
||||
### Phase 1: Create Test Session
|
||||
**Command**: `SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]\"")`
|
||||
|
||||
**Step 1.1: Dispatch** - Create new test workflow session
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:session:start --new \"Test validation for [sourceSessionId]\"")
|
||||
```
|
||||
|
||||
**Input**: `sourceSessionId` from user argument (e.g., `WFS-user-auth`)
|
||||
|
||||
@@ -82,7 +87,12 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
---
|
||||
|
||||
### Phase 2: Gather Test Context
|
||||
**Command**: `SlashCommand(command="/workflow:tools:test-context-gather --session [testSessionId]")`
|
||||
|
||||
**Step 2.1: Dispatch** - Gather test coverage context from source session
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:test-context-gather --session [testSessionId]")
|
||||
```
|
||||
|
||||
**Input**: `testSessionId` from Phase 1 (e.g., `WFS-test-user-auth`)
|
||||
|
||||
@@ -104,9 +114,9 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
- Test framework detected
|
||||
- Test conventions documented
|
||||
|
||||
<!-- TodoWrite: When test-context-gather invoked, INSERT 3 test-context-gather tasks -->
|
||||
<!-- TodoWrite: When test-context-gather dispatched, INSERT 3 test-context-gather tasks -->
|
||||
|
||||
**TodoWrite Update (Phase 2 SlashCommand invoked - tasks attached)**:
|
||||
**TodoWrite Update (Phase 2 SlashCommand dispatched - tasks attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Create independent test session", "status": "completed", "activeForm": "Creating test session"},
|
||||
@@ -119,7 +129,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** test-context-gather's 3 tasks. Orchestrator **executes** these tasks.
|
||||
**Note**: SlashCommand dispatch **attaches** test-context-gather's 3 tasks. Orchestrator **executes** these tasks.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 2.1-2.3** sequentially
|
||||
|
||||
@@ -141,7 +151,12 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
---
|
||||
|
||||
### Phase 3: Test Generation Analysis
|
||||
**Command**: `SlashCommand(command="/workflow:tools:test-concept-enhanced --session [testSessionId] --context [testContextPath]")`
|
||||
|
||||
**Step 3.1: Dispatch** - Analyze test requirements with Gemini
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:test-concept-enhanced --session [testSessionId] --context [testContextPath]")
|
||||
```
|
||||
|
||||
**Input**:
|
||||
- `testSessionId` from Phase 1
|
||||
@@ -168,9 +183,9 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
- Implementation Targets (test files to create)
|
||||
- Success Criteria
|
||||
|
||||
<!-- TodoWrite: When test-concept-enhanced invoked, INSERT 3 concept-enhanced tasks -->
|
||||
<!-- TodoWrite: When test-concept-enhanced dispatched, INSERT 3 concept-enhanced tasks -->
|
||||
|
||||
**TodoWrite Update (Phase 3 SlashCommand invoked - tasks attached)**:
|
||||
**TodoWrite Update (Phase 3 SlashCommand dispatched - tasks attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Create independent test session", "status": "completed", "activeForm": "Creating test session"},
|
||||
@@ -183,7 +198,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** test-concept-enhanced's 3 tasks. Orchestrator **executes** these tasks.
|
||||
**Note**: SlashCommand dispatch **attaches** test-concept-enhanced's 3 tasks. Orchestrator **executes** these tasks.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 3.1-3.3** sequentially
|
||||
|
||||
@@ -205,7 +220,12 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
---
|
||||
|
||||
### Phase 4: Generate Test Tasks
|
||||
**Command**: `SlashCommand(command="/workflow:tools:test-task-generate [--use-codex] [--cli-execute] --session [testSessionId]")`
|
||||
|
||||
**Step 4.1: Dispatch** - Generate test task JSON files and planning documents
|
||||
|
||||
```javascript
|
||||
SlashCommand(command="/workflow:tools:test-task-generate [--use-codex] [--cli-execute] --session [testSessionId]")
|
||||
```
|
||||
|
||||
**Input**:
|
||||
- `testSessionId` from Phase 1
|
||||
@@ -252,9 +272,9 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
- Phase 2: Iterative Gemini diagnosis + manual/Codex fixes (based on flag)
|
||||
- Phase 3: Final validation and certification
|
||||
|
||||
<!-- TodoWrite: When test-task-generate invoked, INSERT 3 test-task-generate tasks -->
|
||||
<!-- TodoWrite: When test-task-generate dispatched, INSERT 3 test-task-generate tasks -->
|
||||
|
||||
**TodoWrite Update (Phase 4 SlashCommand invoked - tasks attached)**:
|
||||
**TodoWrite Update (Phase 4 SlashCommand dispatched - tasks attached)**:
|
||||
```json
|
||||
[
|
||||
{"content": "Create independent test session", "status": "completed", "activeForm": "Creating test session"},
|
||||
@@ -267,7 +287,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*)
|
||||
]
|
||||
```
|
||||
|
||||
**Note**: SlashCommand invocation **attaches** test-task-generate's 3 tasks. Orchestrator **executes** these tasks.
|
||||
**Note**: SlashCommand dispatch **attaches** test-task-generate's 3 tasks. Orchestrator **executes** these tasks.
|
||||
|
||||
**Next Action**: Tasks attached → **Execute Phase 4.1-4.3** sequentially
|
||||
|
||||
@@ -329,7 +349,7 @@ Ready for execution. Use appropriate workflow commands to proceed.
|
||||
|
||||
### Key Principles
|
||||
|
||||
1. **Task Attachment** (when SlashCommand invoked):
|
||||
1. **Task Attachment** (when SlashCommand dispatched):
|
||||
- Sub-command's internal tasks are **attached** to orchestrator's TodoWrite
|
||||
- Example: `/workflow:tools:test-context-gather` attaches 3 sub-tasks (Phase 2.1, 2.2, 2.3)
|
||||
- First attached task marked as `in_progress`, others as `pending`
|
||||
@@ -346,7 +366,7 @@ Ready for execution. Use appropriate workflow commands to proceed.
|
||||
- No user intervention required between phases
|
||||
- TodoWrite dynamically reflects current execution state
|
||||
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase invoked (tasks ATTACHED) → Sub-tasks executed sequentially → Phase completed (tasks COLLAPSED to summary) → Next phase begins → Repeat until all phases complete.
|
||||
**Lifecycle Summary**: Initial pending tasks → Phase dispatched (tasks ATTACHED) → Sub-tasks executed sequentially → Phase completed (tasks COLLAPSED to summary) → Next phase begins → Repeat until all phases complete.
|
||||
|
||||
### Test-Gen Specific Features
|
||||
|
||||
@@ -483,7 +503,7 @@ See `/workflow:tools:test-task-generate` for complete JSON schemas.
|
||||
**Prerequisite Commands**:
|
||||
- `/workflow:plan` or `/workflow:execute` - Complete implementation session that needs test validation
|
||||
|
||||
**Called by This Command** (5 phases):
|
||||
**Dispatched by This Command** (5 phases):
|
||||
- `/workflow:session:start` - Phase 1: Create independent test workflow session
|
||||
- `/workflow:tools:test-context-gather` - Phase 2: Analyze test coverage and gather source session context
|
||||
- `/workflow:tools:test-concept-enhanced` - Phase 3: Generate test requirements and strategy using Gemini
|
||||
|
||||
@@ -27,8 +27,8 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Glob(*), Write(*
|
||||
6. **Phase 10 (ui-assembly)** → **Attach tasks → Execute → Collapse** → Workflow complete
|
||||
|
||||
**Phase Transition Mechanism**:
|
||||
- **Phase 5 (User Interaction)**: User confirms targets → IMMEDIATELY triggers Phase 7
|
||||
- **Phase 7-10 (Autonomous)**: `SlashCommand` invocation **ATTACHES** tasks to current workflow
|
||||
- **Phase 5 (User Interaction)**: User confirms targets → IMMEDIATELY dispatches Phase 7
|
||||
- **Phase 7-10 (Autonomous)**: SlashCommand dispatch **ATTACHES** tasks to current workflow
|
||||
- **Task Execution**: Orchestrator **EXECUTES** these attached tasks itself
|
||||
- **Task Collapse**: After tasks complete, collapse them into phase summary
|
||||
- **Phase Transition**: Automatically execute next phase after collapsing
|
||||
@@ -36,7 +36,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Glob(*), Write(*
|
||||
|
||||
**Auto-Continue Mechanism**: TodoWrite tracks phase status with dynamic task attachment/collapse. After executing all attached tasks, you MUST immediately collapse them, restore phase summary, and execute the next phase. No user intervention required. The workflow is NOT complete until Phase 10 (UI assembly) finishes.
|
||||
|
||||
**Task Attachment Model**: SlashCommand invocation is NOT delegation - it's task expansion. The orchestrator executes these attached tasks itself, not waiting for external completion.
|
||||
**Task Attachment Model**: SlashCommand dispatch is NOT delegation - it's task expansion. The orchestrator executes these attached tasks itself, not waiting for external completion.
|
||||
|
||||
**Target Type Detection**: Automatically inferred from prompt/targets, or explicitly set via `--target-type`.
|
||||
|
||||
@@ -63,26 +63,26 @@ Phase 5: Unified Target Inference
|
||||
|
||||
Phase 6: Code Import (Conditional)
|
||||
└─ Decision (design_source):
|
||||
├─ code_only | hybrid → Execute /workflow:ui-design:import-from-code
|
||||
├─ code_only | hybrid → Dispatch /workflow:ui-design:import-from-code
|
||||
└─ visual_only → Skip to Phase 7
|
||||
|
||||
Phase 7: Style Extraction
|
||||
└─ Decision (needs_visual_supplement):
|
||||
├─ visual_only OR supplement needed → Execute /workflow:ui-design:style-extract
|
||||
├─ visual_only OR supplement needed → Dispatch /workflow:ui-design:style-extract
|
||||
└─ code_only AND style_complete → Use code import
|
||||
|
||||
Phase 8: Animation Extraction
|
||||
└─ Decision (should_extract_animation):
|
||||
├─ visual_only OR incomplete OR regenerate → Execute /workflow:ui-design:animation-extract
|
||||
├─ visual_only OR incomplete OR regenerate → Dispatch /workflow:ui-design:animation-extract
|
||||
└─ code_only AND animation_complete → Use code import
|
||||
|
||||
Phase 9: Layout Extraction
|
||||
└─ Decision (needs_visual_supplement OR NOT layout_complete):
|
||||
├─ True → Execute /workflow:ui-design:layout-extract
|
||||
├─ True → Dispatch /workflow:ui-design:layout-extract
|
||||
└─ False → Use code import
|
||||
|
||||
Phase 10: UI Assembly
|
||||
└─ Execute /workflow:ui-design:generate → Workflow complete
|
||||
└─ Dispatch /workflow:ui-design:generate → Workflow complete
|
||||
```
|
||||
|
||||
## Core Rules
|
||||
@@ -92,7 +92,7 @@ Phase 10: UI Assembly
|
||||
3. **Parse & Pass**: Extract data from each output for next phase
|
||||
4. **Default to All**: When selecting variants/prototypes, use ALL generated items
|
||||
5. **Track Progress**: Update TodoWrite dynamically with task attachment/collapse pattern
|
||||
6. **⚠️ CRITICAL: Task Attachment Model** - SlashCommand invocation **ATTACHES** tasks to current workflow. Orchestrator **EXECUTES** these attached tasks itself, not waiting for external completion. This is NOT delegation - it's task expansion.
|
||||
6. **⚠️ CRITICAL: Task Attachment Model** - SlashCommand dispatch **ATTACHES** tasks to current workflow. Orchestrator **EXECUTES** these attached tasks itself, not waiting for external completion. This is NOT delegation - it's task expansion.
|
||||
7. **⚠️ CRITICAL: DO NOT STOP** - This is a continuous multi-phase workflow. After executing all attached tasks, you MUST immediately collapse them and execute the next phase. Workflow is NOT complete until Phase 10 (UI assembly) finishes.
|
||||
|
||||
## Parameter Requirements
|
||||
@@ -355,13 +355,16 @@ detect_target_type(target_list):
|
||||
```
|
||||
|
||||
### Phase 6: Code Import & Completeness Assessment (Conditional)
|
||||
```bash
|
||||
|
||||
**Step 6.1: Dispatch** - Import design system from code files
|
||||
|
||||
```javascript
|
||||
IF design_source IN ["code_only", "hybrid"]:
|
||||
REPORT: "🔍 Phase 6: Code Import ({design_source})"
|
||||
command = "/workflow:ui-design:import-from-code --design-id \"{design_id}\" --source \"{code_base_path}\""
|
||||
|
||||
TRY:
|
||||
# SlashCommand invocation ATTACHES import-from-code's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES import-from-code's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself:
|
||||
# - Phase 0: Discover and categorize code files
|
||||
# - Phase 1.1-1.3: Style/Animation/Layout Agent extraction
|
||||
@@ -465,7 +468,10 @@ IF design_source IN ["code_only", "hybrid"]:
|
||||
```
|
||||
|
||||
### Phase 7: Style Extraction
|
||||
```bash
|
||||
|
||||
**Step 7.1: Dispatch** - Extract style design systems
|
||||
|
||||
```javascript
|
||||
IF design_source == "visual_only" OR needs_visual_supplement:
|
||||
REPORT: "🎨 Phase 7: Style Extraction (variants: {style_variants})"
|
||||
command = "/workflow:ui-design:style-extract --design-id \"{design_id}\" " +
|
||||
@@ -473,7 +479,7 @@ IF design_source == "visual_only" OR needs_visual_supplement:
|
||||
(prompt_text ? "--prompt \"{prompt_text}\" " : "") +
|
||||
"--variants {style_variants} --interactive"
|
||||
|
||||
# SlashCommand invocation ATTACHES style-extract's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES style-extract's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(command)
|
||||
|
||||
@@ -483,7 +489,10 @@ ELSE:
|
||||
```
|
||||
|
||||
### Phase 8: Animation Extraction
|
||||
```bash
|
||||
|
||||
**Step 8.1: Dispatch** - Extract animation patterns
|
||||
|
||||
```javascript
|
||||
# Determine if animation extraction is needed
|
||||
should_extract_animation = false
|
||||
|
||||
@@ -513,7 +522,7 @@ IF should_extract_animation:
|
||||
|
||||
command = " ".join(command_parts)
|
||||
|
||||
# SlashCommand invocation ATTACHES animation-extract's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES animation-extract's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(command)
|
||||
|
||||
@@ -526,7 +535,10 @@ ELSE:
|
||||
```
|
||||
|
||||
### Phase 9: Layout Extraction
|
||||
```bash
|
||||
|
||||
**Step 9.1: Dispatch** - Extract layout templates
|
||||
|
||||
```javascript
|
||||
targets_string = ",".join(inferred_target_list)
|
||||
|
||||
IF (design_source == "visual_only" OR needs_visual_supplement) OR (NOT layout_complete):
|
||||
@@ -536,7 +548,7 @@ IF (design_source == "visual_only" OR needs_visual_supplement) OR (NOT layout_co
|
||||
(prompt_text ? "--prompt \"{prompt_text}\" " : "") +
|
||||
"--targets \"{targets_string}\" --variants {layout_variants} --device-type \"{device_type}\" --interactive"
|
||||
|
||||
# SlashCommand invocation ATTACHES layout-extract's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES layout-extract's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(command)
|
||||
|
||||
@@ -546,7 +558,10 @@ ELSE:
|
||||
```
|
||||
|
||||
### Phase 10: UI Assembly
|
||||
```bash
|
||||
|
||||
**Step 10.1: Dispatch** - Assemble UI prototypes from design tokens and layout templates
|
||||
|
||||
```javascript
|
||||
command = "/workflow:ui-design:generate --design-id \"{design_id}\"" + (--session ? " --session {session_id}" : "")
|
||||
|
||||
total = style_variants × layout_variants × len(inferred_target_list)
|
||||
@@ -556,7 +571,7 @@ REPORT: " → Pure assembly: Combining layout templates + design tokens"
|
||||
REPORT: " → Device: {device_type} (from layout templates)"
|
||||
REPORT: " → Assembly tasks: {total} combinations"
|
||||
|
||||
# SlashCommand invocation ATTACHES generate's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES generate's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(command)
|
||||
|
||||
@@ -581,10 +596,10 @@ TodoWrite({todos: [
|
||||
|
||||
// ⚠️ CRITICAL: Dynamic TodoWrite task attachment strategy:
|
||||
//
|
||||
// **Key Concept**: SlashCommand invocation ATTACHES tasks to current workflow.
|
||||
// **Key Concept**: SlashCommand dispatch ATTACHES tasks to current workflow.
|
||||
// Orchestrator EXECUTES these attached tasks itself, not waiting for external completion.
|
||||
//
|
||||
// Phase 7-10 SlashCommand Invocation Pattern (when tasks are attached):
|
||||
// Phase 7-10 SlashCommand Dispatch Pattern (when tasks are attached):
|
||||
// Example - Phase 7 with sub-tasks:
|
||||
// [
|
||||
// {"content": "Phase 7: Style Extraction", "status": "in_progress", "activeForm": "Executing style extraction"},
|
||||
|
||||
@@ -26,7 +26,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Write(*), Bash(*)
|
||||
7. Phase 4: Design system integration → **Execute orchestrator task** → Reports completion
|
||||
|
||||
**Phase Transition Mechanism**:
|
||||
- **Task Attachment**: `SlashCommand` invocation **ATTACHES** tasks to current workflow
|
||||
- **Task Attachment**: SlashCommand dispatch **ATTACHES** tasks to current workflow
|
||||
- **Task Execution**: Orchestrator **EXECUTES** these attached tasks itself
|
||||
- **Task Collapse**: After tasks complete, collapse them into phase summary
|
||||
- **Phase Transition**: Automatically execute next phase after collapsing
|
||||
@@ -34,7 +34,7 @@ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Write(*), Bash(*)
|
||||
|
||||
**Auto-Continue Mechanism**: TodoWrite tracks phase status with dynamic task attachment/collapse. After executing all attached tasks, you MUST immediately collapse them, restore phase summary, and execute the next phase. No user intervention required. The workflow is NOT complete until reaching Phase 4.
|
||||
|
||||
**Task Attachment Model**: SlashCommand invocation is NOT delegation - it's task expansion. The orchestrator executes these attached tasks itself, not waiting for external completion.
|
||||
**Task Attachment Model**: SlashCommand dispatch is NOT delegation - it's task expansion. The orchestrator executes these attached tasks itself, not waiting for external completion.
|
||||
|
||||
## Execution Process
|
||||
|
||||
@@ -53,30 +53,30 @@ Phase 0: Parameter Parsing & Input Detection
|
||||
|
||||
Phase 0.5: Code Import (Conditional)
|
||||
└─ Decision (design_source):
|
||||
├─ hybrid → Execute /workflow:ui-design:import-from-code
|
||||
├─ hybrid → Dispatch /workflow:ui-design:import-from-code
|
||||
└─ Other → Skip to Phase 2
|
||||
|
||||
Phase 2: Style Extraction
|
||||
└─ Decision (skip_style):
|
||||
├─ code_only AND style_complete → Use code import
|
||||
└─ Otherwise → Execute /workflow:ui-design:style-extract
|
||||
└─ Otherwise → Dispatch /workflow:ui-design:style-extract
|
||||
|
||||
Phase 2.3: Animation Extraction
|
||||
└─ Decision (skip_animation):
|
||||
├─ code_only AND animation_complete → Use code import
|
||||
└─ Otherwise → Execute /workflow:ui-design:animation-extract
|
||||
└─ Otherwise → Dispatch /workflow:ui-design:animation-extract
|
||||
|
||||
Phase 2.5: Layout Extraction
|
||||
└─ Decision (skip_layout):
|
||||
├─ code_only AND layout_complete → Use code import
|
||||
└─ Otherwise → Execute /workflow:ui-design:layout-extract
|
||||
└─ Otherwise → Dispatch /workflow:ui-design:layout-extract
|
||||
|
||||
Phase 3: UI Assembly
|
||||
└─ Execute /workflow:ui-design:generate
|
||||
└─ Dispatch /workflow:ui-design:generate
|
||||
|
||||
Phase 4: Design System Integration
|
||||
└─ Decision (session_id):
|
||||
├─ Provided → Execute /workflow:ui-design:update
|
||||
├─ Provided → Dispatch /workflow:ui-design:update
|
||||
└─ Not provided → Standalone completion
|
||||
```
|
||||
|
||||
@@ -86,7 +86,7 @@ Phase 4: Design System Integration
|
||||
2. **No Preliminary Validation**: Sub-commands handle their own validation
|
||||
3. **Parse & Pass**: Extract data from each output for next phase
|
||||
4. **Track Progress**: Update TodoWrite dynamically with task attachment/collapse pattern
|
||||
5. **⚠️ CRITICAL: Task Attachment Model** - SlashCommand invocation **ATTACHES** tasks to current workflow. Orchestrator **EXECUTES** these attached tasks itself, not waiting for external completion. This is NOT delegation - it's task expansion.
|
||||
5. **⚠️ CRITICAL: Task Attachment Model** - SlashCommand dispatch **ATTACHES** tasks to current workflow. Orchestrator **EXECUTES** these attached tasks itself, not waiting for external completion. This is NOT delegation - it's task expansion.
|
||||
6. **⚠️ CRITICAL: DO NOT STOP** - This is a continuous multi-phase workflow. After executing all attached tasks, you MUST immediately collapse them and execute the next phase. Workflow is NOT complete until Phase 4.
|
||||
|
||||
## Parameter Requirements
|
||||
@@ -276,7 +276,9 @@ TodoWrite({todos: [
|
||||
|
||||
### Phase 0.5: Code Import & Completeness Assessment (Conditional)
|
||||
|
||||
```bash
|
||||
**Step 0.5.1: Dispatch** - Import design system from code files
|
||||
|
||||
```javascript
|
||||
# Only execute if code files detected
|
||||
IF design_source == "hybrid":
|
||||
REPORT: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
@@ -289,7 +291,7 @@ IF design_source == "hybrid":
|
||||
"--source \"{code_base_path}\""
|
||||
|
||||
TRY:
|
||||
# SlashCommand invocation ATTACHES import-from-code's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES import-from-code's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself:
|
||||
# - Phase 0: Discover and categorize code files
|
||||
# - Phase 1.1-1.3: Style/Animation/Layout Agent extraction
|
||||
@@ -380,7 +382,9 @@ TodoWrite(mark_completed: "Initialize and detect design source",
|
||||
|
||||
### Phase 2: Style Extraction
|
||||
|
||||
```bash
|
||||
**Step 2.1: Dispatch** - Extract style design system
|
||||
|
||||
```javascript
|
||||
# Determine if style extraction needed
|
||||
skip_style = (design_source == "code_only" AND style_complete)
|
||||
|
||||
@@ -405,7 +409,7 @@ ELSE:
|
||||
|
||||
extract_command = " ".join(command_parts)
|
||||
|
||||
# SlashCommand invocation ATTACHES style-extract's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES style-extract's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(extract_command)
|
||||
|
||||
@@ -415,7 +419,9 @@ ELSE:
|
||||
|
||||
### Phase 2.3: Animation Extraction
|
||||
|
||||
```bash
|
||||
**Step 2.3.1: Dispatch** - Extract animation patterns
|
||||
|
||||
```javascript
|
||||
skip_animation = (design_source == "code_only" AND animation_complete)
|
||||
|
||||
IF skip_animation:
|
||||
@@ -436,7 +442,7 @@ ELSE:
|
||||
|
||||
animation_extract_command = " ".join(command_parts)
|
||||
|
||||
# SlashCommand invocation ATTACHES animation-extract's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES animation-extract's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(animation_extract_command)
|
||||
|
||||
@@ -446,7 +452,9 @@ ELSE:
|
||||
|
||||
### Phase 2.5: Layout Extraction
|
||||
|
||||
```bash
|
||||
**Step 2.5.1: Dispatch** - Extract layout templates
|
||||
|
||||
```javascript
|
||||
skip_layout = (design_source == "code_only" AND layout_complete)
|
||||
|
||||
IF skip_layout:
|
||||
@@ -469,7 +477,7 @@ ELSE:
|
||||
|
||||
layout_extract_command = " ".join(command_parts)
|
||||
|
||||
# SlashCommand invocation ATTACHES layout-extract's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES layout-extract's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(layout_extract_command)
|
||||
|
||||
@@ -479,11 +487,13 @@ ELSE:
|
||||
|
||||
### Phase 3: UI Assembly
|
||||
|
||||
```bash
|
||||
**Step 3.1: Dispatch** - Assemble UI prototypes from design tokens and layout templates
|
||||
|
||||
```javascript
|
||||
REPORT: "🚀 Phase 3: UI Assembly"
|
||||
generate_command = f"/workflow:ui-design:generate --design-id \"{design_id}\""
|
||||
|
||||
# SlashCommand invocation ATTACHES generate's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES generate's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(generate_command)
|
||||
|
||||
@@ -493,12 +503,14 @@ TodoWrite(mark_completed: "Assemble UI", mark_in_progress: session_id ? "Integra
|
||||
|
||||
### Phase 4: Design System Integration
|
||||
|
||||
```bash
|
||||
**Step 4.1: Dispatch** - Integrate design system into workflow session
|
||||
|
||||
```javascript
|
||||
IF session_id:
|
||||
REPORT: "🚀 Phase 4: Design System Integration"
|
||||
update_command = f"/workflow:ui-design:update --session {session_id}"
|
||||
|
||||
# SlashCommand invocation ATTACHES update's tasks to current workflow
|
||||
# SlashCommand dispatch ATTACHES update's tasks to current workflow
|
||||
# Orchestrator will EXECUTE these attached tasks itself
|
||||
SlashCommand(update_command)
|
||||
|
||||
@@ -624,10 +636,10 @@ TodoWrite({todos: [
|
||||
|
||||
// ⚠️ CRITICAL: Dynamic TodoWrite task attachment strategy:
|
||||
//
|
||||
// **Key Concept**: SlashCommand invocation ATTACHES tasks to current workflow.
|
||||
// **Key Concept**: SlashCommand dispatch ATTACHES tasks to current workflow.
|
||||
// Orchestrator EXECUTES these attached tasks itself, not waiting for external completion.
|
||||
//
|
||||
// Phase 2-4 SlashCommand Invocation Pattern (when tasks are attached):
|
||||
// Phase 2-4 SlashCommand Dispatch Pattern (when tasks are attached):
|
||||
// Example - Phase 2 with sub-tasks:
|
||||
// [
|
||||
// {"content": "Phase 0: Initialize and Detect Design Source", "status": "completed", "activeForm": "Initializing"},
|
||||
@@ -690,7 +702,7 @@ TodoWrite({todos: [
|
||||
|
||||
- **Input**: `--images` (glob pattern) and/or `--prompt` (text/file paths) + optional `--session`
|
||||
- **Output**: Complete design system in `{base_path}/` (style-extraction, layout-extraction, prototypes)
|
||||
- **Sub-commands Called**:
|
||||
- **Sub-commands Dispatched**:
|
||||
1. `/workflow:ui-design:import-from-code` (Phase 0.5, conditional - if code files detected)
|
||||
2. `/workflow:ui-design:style-extract` (Phase 2 - complete design systems)
|
||||
3. `/workflow:ui-design:animation-extract` (Phase 2.3 - animation tokens)
|
||||
|
||||
Reference in New Issue
Block a user