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:
@@ -106,6 +106,55 @@ SCOPE: [boundaries]
|
||||
CONTEXT: [background/constraints]
|
||||
```
|
||||
|
||||
### Pattern 6: Interactive Preference Collection (SKILL.md Responsibility)
|
||||
|
||||
Workflow preferences (auto mode, force explore, etc.) MUST be collected via AskUserQuestion in SKILL.md **before** dispatching to phases. Phases reference these as `workflowPreferences.{key}` context variables.
|
||||
|
||||
**Anti-Pattern**: Command-line flags (`--yes`, `-e`, `--explore`) parsed within phase files via `$ARGUMENTS.includes(...)`.
|
||||
|
||||
```javascript
|
||||
// CORRECT: In SKILL.md (before phase dispatch)
|
||||
const prefResponse = AskUserQuestion({
|
||||
questions: [
|
||||
{ question: "是否跳过确认?", header: "Auto Mode", options: [
|
||||
{ label: "Interactive (Recommended)", description: "交互模式" },
|
||||
{ label: "Auto", description: "跳过所有确认" }
|
||||
]}
|
||||
]
|
||||
})
|
||||
workflowPreferences = { autoYes: prefResponse.autoMode === 'Auto' }
|
||||
|
||||
// CORRECT: In phase files (reference only)
|
||||
const autoYes = workflowPreferences.autoYes
|
||||
|
||||
// WRONG: In phase files (flag parsing)
|
||||
const autoYes = $ARGUMENTS.includes('--yes') || $ARGUMENTS.includes('-y')
|
||||
```
|
||||
|
||||
### Pattern 7: Direct Phase Handoff
|
||||
|
||||
When one phase needs to invoke another phase within the same skill, read and execute the phase document directly. Do NOT use Skill() routing back through SKILL.md.
|
||||
|
||||
```javascript
|
||||
// CORRECT: Direct handoff (executionContext already set)
|
||||
Read("phases/02-lite-execute.md")
|
||||
// Execute with executionContext (Mode 1)
|
||||
|
||||
// WRONG: Skill routing (unnecessary round-trip)
|
||||
Skill(skill="workflow:lite-execute", args="--in-memory")
|
||||
```
|
||||
|
||||
### Pattern 8: Phase File Hygiene
|
||||
|
||||
Phase files are internal execution documents. They MUST NOT contain:
|
||||
|
||||
| Prohibited | Reason | Correct Location |
|
||||
|------------|--------|------------------|
|
||||
| Flag parsing (`$ARGUMENTS.includes(...)`) | Preferences collected in SKILL.md | SKILL.md via AskUserQuestion |
|
||||
| Invocation syntax (`/skill-name "..."`) | Not user-facing docs | Removed or SKILL.md only |
|
||||
| Conversion provenance (`Source: Converted from...`) | Implementation detail | Removed |
|
||||
| Skill routing for inter-phase (`Skill(skill="...")`) | Use direct phase read | Direct `Read("phases/...")` |
|
||||
|
||||
## Execution Flow
|
||||
|
||||
```
|
||||
@@ -221,9 +270,14 @@ allowed-tools: {tools}
|
||||
1. **{Principle}**: {Description}
|
||||
...
|
||||
|
||||
## Auto Mode
|
||||
## Interactive Preference Collection
|
||||
|
||||
When `--yes` or `-y`: {auto-mode behavior}.
|
||||
Collect workflow preferences via AskUserQuestion before dispatching to phases:
|
||||
{AskUserQuestion code with preference derivation → workflowPreferences}
|
||||
|
||||
## Auto Mode Defaults
|
||||
|
||||
When `workflowPreferences.autoYes === true`: {auto-mode behavior}.
|
||||
|
||||
## Execution Flow
|
||||
|
||||
@@ -316,4 +370,5 @@ When designing a new workflow skill, answer these questions:
|
||||
| What's the TodoWrite granularity? | TodoWrite Pattern | Some phases have sub-tasks, others are atomic |
|
||||
| Is there a planning notes pattern? | Post-Phase Updates | Accumulated state document across phases |
|
||||
| What's the error recovery? | Error Handling | Retry once then report, vs rollback |
|
||||
| Does it need auto mode? | Auto Mode section | Skip confirmations with --yes flag |
|
||||
| Does it need preference collection? | Interactive Preference Collection | Collect via AskUserQuestion in SKILL.md, pass as workflowPreferences |
|
||||
| Does phase N hand off to phase M? | Direct Phase Handoff (Pattern 7) | Read phase doc directly, not Skill() routing |
|
||||
|
||||
Reference in New Issue
Block a user