mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat: Add roles for issue resolution pipeline including planner, reviewer, integrator, and implementer
- Implemented `planner` role for solution design and task decomposition using issue-plan-agent. - Introduced `reviewer` role for solution review, technical feasibility validation, and risk assessment. - Created `integrator` role for queue formation and conflict detection using issue-queue-agent. - Added `implementer` role for code implementation and test verification via code-developer. - Defined message types and role boundaries for each role to ensure clear responsibilities. - Established a team configuration file to manage roles, pipelines, and collaboration patterns for the issue processing pipeline.
This commit is contained in:
@@ -44,9 +44,54 @@ function detectMode() {
|
||||
| `workflow:multi-cli-plan` | plan | [phases/01-multi-cli-plan.md](phases/01-multi-cli-plan.md) | Multi-CLI collaborative planning (ACE context → discussion → plan → execute) |
|
||||
| `workflow:lite-execute` | execute | [phases/02-lite-execute.md](phases/02-lite-execute.md) | Standalone execution (in-memory / prompt / file) |
|
||||
|
||||
## Interactive Preference Collection
|
||||
|
||||
Before dispatching, collect workflow preferences via AskUserQuestion:
|
||||
|
||||
```javascript
|
||||
if (mode === 'plan') {
|
||||
const prefResponse = AskUserQuestion({
|
||||
questions: [
|
||||
{
|
||||
question: "是否跳过所有确认步骤(自动模式)?",
|
||||
header: "Auto Mode",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Interactive (Recommended)", description: "交互模式,包含确认步骤" },
|
||||
{ label: "Auto", description: "跳过所有确认,自动执行" }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
workflowPreferences = {
|
||||
autoYes: prefResponse.autoMode === 'Auto'
|
||||
}
|
||||
} else {
|
||||
// Execute mode
|
||||
const prefResponse = AskUserQuestion({
|
||||
questions: [
|
||||
{
|
||||
question: "是否跳过所有确认步骤(自动模式)?",
|
||||
header: "Auto Mode",
|
||||
multiSelect: false,
|
||||
options: [
|
||||
{ label: "Interactive (Recommended)", description: "交互模式,包含确认步骤" },
|
||||
{ label: "Auto", description: "跳过所有确认,自动执行" }
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
workflowPreferences = {
|
||||
autoYes: prefResponse.autoMode === 'Auto'
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**workflowPreferences** is passed to phase execution as context variable, referenced as `workflowPreferences.autoYes` within phases.
|
||||
|
||||
## Prompt Enhancement
|
||||
|
||||
Before dispatching to the target phase, enhance context:
|
||||
After collecting preferences, enhance context and dispatch:
|
||||
|
||||
```javascript
|
||||
// Step 1: Check for project context files
|
||||
@@ -61,7 +106,7 @@ if (hasProjectGuidelines) {
|
||||
console.log('Project guidelines available: .workflow/project-guidelines.json')
|
||||
}
|
||||
|
||||
// Step 3: Dispatch to phase
|
||||
// Step 3: Dispatch to phase (workflowPreferences available as context)
|
||||
if (mode === 'plan') {
|
||||
// Read phases/01-multi-cli-plan.md and execute
|
||||
} else {
|
||||
@@ -74,17 +119,17 @@ if (mode === 'plan') {
|
||||
### Plan Mode (workflow:multi-cli-plan)
|
||||
|
||||
```
|
||||
1. Parse flags (-y/--yes, --max-rounds, --tools, --mode) and task description
|
||||
1. Collect preferences via AskUserQuestion (autoYes)
|
||||
2. Enhance prompt with project context availability
|
||||
3. Read phases/01-multi-cli-plan.md
|
||||
4. Execute multi-cli-plan pipeline (Phase 1-5 within the phase doc)
|
||||
5. Phase 5 internally calls workflow:lite-execute via Skill handoff
|
||||
5. Phase 5 directly reads and executes Phase 2 (lite-execute) with executionContext
|
||||
```
|
||||
|
||||
### Execute Mode (workflow:lite-execute)
|
||||
|
||||
```
|
||||
1. Parse flags (--in-memory, -y/--yes) and input
|
||||
1. Collect preferences via AskUserQuestion (autoYes)
|
||||
2. Enhance prompt with project context availability
|
||||
3. Read phases/02-lite-execute.md
|
||||
4. Execute lite-execute pipeline (input detection → execution → review)
|
||||
@@ -92,17 +137,10 @@ if (mode === 'plan') {
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Multi-CLI plan mode
|
||||
/workflow:multi-cli-plan "Implement user authentication"
|
||||
/workflow:multi-cli-plan --yes "Add dark mode support"
|
||||
/workflow:multi-cli-plan "Refactor payment module" --max-rounds=3 --tools=gemini,codex
|
||||
Plan mode and execute mode are triggered by skill name routing (see Mode Detection). Workflow preferences (auto mode) are collected interactively via AskUserQuestion before dispatching to phases.
|
||||
|
||||
# Execute mode (standalone)
|
||||
/workflow:lite-execute "Add unit tests for auth" # Prompt description
|
||||
/workflow:lite-execute plan.json # File input
|
||||
/workflow:lite-execute --in-memory # Called by multi-cli-plan internally
|
||||
```
|
||||
**Plan mode**: Task description provided as arguments → interactive preference collection → multi-CLI planning pipeline
|
||||
**Execute mode**: Task description, file path, or in-memory context → interactive preference collection → execution pipeline
|
||||
|
||||
## Phase Reference Documents
|
||||
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
|
||||
Complete multi-CLI collaborative planning pipeline with ACE context gathering and iterative cross-verification. This phase document preserves the full content of the original `workflow:multi-cli-plan` command.
|
||||
|
||||
> **Source**: Converted from `.claude/commands/workflow/multi-cli-plan.md`. Frontmatter moved to SKILL.md.
|
||||
|
||||
## Auto Mode
|
||||
|
||||
When `--yes` or `-y`: Auto-approve plan, use recommended solution and execution method (Agent, Skip review).
|
||||
When `workflowPreferences.autoYes` is true: Auto-approve plan, use recommended solution and execution method (Agent, Skip review).
|
||||
|
||||
# Multi-CLI Collaborative Planning Command
|
||||
|
||||
@@ -448,8 +446,9 @@ executionContext = {
|
||||
|
||||
**Step 4: Hand off to Execution**:
|
||||
```javascript
|
||||
// Execute to lite-execute with in-memory context
|
||||
Skill(skill="workflow:lite-execute", args="--in-memory")
|
||||
// Direct phase handoff: Read and execute Phase 2 (lite-execute) with in-memory context
|
||||
Read("phases/02-lite-execute.md")
|
||||
// Execute Phase 2 with executionContext (Mode 1: In-Memory Plan)
|
||||
```
|
||||
|
||||
## Output File Structure
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# Phase 2: Lite Execute
|
||||
|
||||
Complete execution engine supporting multiple input modes: in-memory plan, prompt description, or file content. This phase document preserves the full content of the original `workflow:lite-execute` command.
|
||||
Complete execution engine supporting multiple input modes: in-memory plan, prompt description, or file content.
|
||||
|
||||
> **Source**: Converted from `.claude/commands/workflow/lite-execute.md`. Frontmatter moved to SKILL.md.
|
||||
## Objective
|
||||
|
||||
# Workflow Lite-Execute Command (/workflow:lite-execute)
|
||||
- Execute implementation tasks from in-memory plan, prompt description, or file content
|
||||
- Support batch execution with grouped tasks and code review
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -61,14 +62,14 @@ Flexible task execution command supporting three input modes: in-memory plan (fr
|
||||
|
||||
**User Interaction**:
|
||||
```javascript
|
||||
// Parse --yes flag
|
||||
const autoYes = $ARGUMENTS.includes('--yes') || $ARGUMENTS.includes('-y')
|
||||
// Reference workflowPreferences (set by SKILL.md via AskUserQuestion)
|
||||
const autoYes = workflowPreferences.autoYes
|
||||
|
||||
let userSelection
|
||||
|
||||
if (autoYes) {
|
||||
// Auto mode: Use defaults
|
||||
console.log(`[--yes] Auto-confirming execution:`)
|
||||
console.log(`[Auto] Auto-confirming execution:`)
|
||||
console.log(` - Execution method: Auto`)
|
||||
console.log(` - Code review: Skip`)
|
||||
|
||||
@@ -753,7 +754,7 @@ Appended to `previousExecutionResults` array for context continuity in multi-exe
|
||||
|
||||
## Post-Completion Expansion
|
||||
|
||||
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `/issue:new "{summary} - {dimension}"`
|
||||
完成后询问用户是否扩展为issue(test/enhance/refactor/doc),选中项调用 `Skill(skill="issue:new", args="{summary} - {dimension}")`
|
||||
|
||||
**Fixed ID Pattern**: `${sessionId}-${groupId}` enables predictable lookup without auto-generated timestamps.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user