mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
fix(team-skills): resolve skill name inconsistency and add command execution protocol
team-coordinate-v2: - Fix skill name mismatch: update all doc examples to use "team-coordinate-v2" - This was the root cause of v2 failing to invoke teams team-lifecycle-v3/v4: - Add Command Execution Protocol section before Entry Router - Fix Entry Router logic: distinguish interrupted vs new sessions - Add Router Implementation subsection with concrete steps
This commit is contained in:
@@ -13,7 +13,7 @@ Universal team coordination skill: analyze task -> generate role-specs -> dispat
|
|||||||
|
|
||||||
```
|
```
|
||||||
+---------------------------------------------------+
|
+---------------------------------------------------+
|
||||||
| Skill(skill="team-coordinate") |
|
| Skill(skill="team-coordinate-v2") |
|
||||||
| args="task description" |
|
| args="task description" |
|
||||||
+-------------------+-------------------------------+
|
+-------------------+-------------------------------+
|
||||||
|
|
|
|
||||||
@@ -64,7 +64,7 @@ Always route to coordinator. Coordinator reads `roles/coordinator/role.md` and e
|
|||||||
|
|
||||||
User just provides task description.
|
User just provides task description.
|
||||||
|
|
||||||
**Invocation**: `Skill(skill="team-coordinate", args="task description")`
|
**Invocation**: `Skill(skill="team-coordinate-v2", args="task description")`
|
||||||
|
|
||||||
**Lifecycle**:
|
**Lifecycle**:
|
||||||
```
|
```
|
||||||
@@ -143,7 +143,7 @@ AskUserQuestion({
|
|||||||
| Choice | Steps |
|
| Choice | Steps |
|
||||||
|--------|-------|
|
|--------|-------|
|
||||||
| Archive & Clean | Update session status="completed" -> TeamDelete -> output final summary with artifact paths |
|
| Archive & Clean | Update session status="completed" -> TeamDelete -> output final summary with artifact paths |
|
||||||
| Keep Active | Update session status="paused" -> output: "Resume with: Skill(skill='team-coordinate', args='resume')" |
|
| Keep Active | Update session status="paused" -> output: "Resume with: Skill(skill='team-coordinate-v2', args='resume')" |
|
||||||
| Export Results | AskUserQuestion(target path) -> copy artifacts to target -> Archive & Clean |
|
| Export Results | AskUserQuestion(target path) -> copy artifacts to target -> Archive & Clean |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ All tasks completed (no pending, no in_progress)
|
|||||||
| | Output final summary with artifact paths
|
| | Output final summary with artifact paths
|
||||||
| +- "Keep Active":
|
| +- "Keep Active":
|
||||||
| | Update session status="paused"
|
| | Update session status="paused"
|
||||||
| | Output: "Resume with: Skill(skill='team-coordinate', args='resume')"
|
| | Output: "Resume with: Skill(skill='team-coordinate-v2', args='resume')"
|
||||||
| +- "Export Results":
|
| +- "Export Results":
|
||||||
| AskUserQuestion for target directory
|
| AskUserQuestion for target directory
|
||||||
| Copy deliverables to target
|
| Copy deliverables to target
|
||||||
|
|||||||
@@ -24,6 +24,27 @@ Orchestrate the team-lifecycle workflow: team creation, task dispatching, progre
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Command Execution Protocol
|
||||||
|
|
||||||
|
When coordinator needs to execute a command (dispatch, monitor):
|
||||||
|
|
||||||
|
1. **Read the command file**: `roles/coordinator/commands/<command-name>.md`
|
||||||
|
2. **Follow the workflow** defined in the command file (Phase 2-4 structure)
|
||||||
|
3. **Commands are inline execution guides** - NOT separate agents or subprocesses
|
||||||
|
4. **Execute synchronously** - complete the command workflow before proceeding
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
Phase 3 needs task dispatch
|
||||||
|
-> Read roles/coordinator/commands/dispatch.md
|
||||||
|
-> Execute Phase 2 (Context Loading)
|
||||||
|
-> Execute Phase 3 (Task Chain Creation)
|
||||||
|
-> Execute Phase 4 (Validation)
|
||||||
|
-> Continue to Phase 4
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Entry Router
|
## Entry Router
|
||||||
|
|
||||||
When coordinator is invoked, first detect the invocation type:
|
When coordinator is invoked, first detect the invocation type:
|
||||||
@@ -33,10 +54,24 @@ When coordinator is invoked, first detect the invocation type:
|
|||||||
| Worker callback | Message contains `[role-name]` tag from a known worker role | → handleCallback: auto-advance pipeline |
|
| Worker callback | Message contains `[role-name]` tag from a known worker role | → handleCallback: auto-advance pipeline |
|
||||||
| Status check | Arguments contain "check" or "status" | → handleCheck: output execution graph, no advancement |
|
| Status check | Arguments contain "check" or "status" | → handleCheck: output execution graph, no advancement |
|
||||||
| Manual resume | Arguments contain "resume" or "continue" | → handleResume: check worker states, advance pipeline |
|
| Manual resume | Arguments contain "resume" or "continue" | → handleResume: check worker states, advance pipeline |
|
||||||
| New session | None of the above | → Phase 0 (Session Resume Check) |
|
| Interrupted session | Active/paused session exists in `.workflow/.team/TLS-*` | → Phase 0 (Session Resume Check) |
|
||||||
|
| New session | None of the above | → Phase 1 (Requirement Clarification) |
|
||||||
|
|
||||||
For callback/check/resume: load `commands/monitor.md` and execute the appropriate handler, then STOP.
|
For callback/check/resume: load `commands/monitor.md` and execute the appropriate handler, then STOP.
|
||||||
|
|
||||||
|
### Router Implementation
|
||||||
|
|
||||||
|
1. **Load session context** (if exists):
|
||||||
|
- Scan `.workflow/.team/TLS-*/team-session.json` for active/paused sessions
|
||||||
|
- If found, extract known worker roles from session or SKILL.md Role Registry
|
||||||
|
|
||||||
|
2. **Parse $ARGUMENTS** for detection keywords
|
||||||
|
|
||||||
|
3. **Route to handler**:
|
||||||
|
- For monitor handlers: Read `commands/monitor.md`, execute matched handler section, STOP
|
||||||
|
- For Phase 0: Execute Session Resume Check below
|
||||||
|
- For Phase 1: Execute Requirement Clarification below
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Phase 0: Session Resume Check
|
## Phase 0: Session Resume Check
|
||||||
|
|||||||
@@ -24,6 +24,27 @@ Orchestrate the team-lifecycle workflow: team creation, task dispatching, progre
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Command Execution Protocol
|
||||||
|
|
||||||
|
When coordinator needs to execute a command (dispatch, monitor):
|
||||||
|
|
||||||
|
1. **Read the command file**: `roles/coordinator/commands/<command-name>.md`
|
||||||
|
2. **Follow the workflow** defined in the command file (Phase 2-4 structure)
|
||||||
|
3. **Commands are inline execution guides** - NOT separate agents or subprocesses
|
||||||
|
4. **Execute synchronously** - complete the command workflow before proceeding
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
Phase 3 needs task dispatch
|
||||||
|
-> Read roles/coordinator/commands/dispatch.md
|
||||||
|
-> Execute Phase 2 (Context Loading)
|
||||||
|
-> Execute Phase 3 (Task Chain Creation)
|
||||||
|
-> Execute Phase 4 (Validation)
|
||||||
|
-> Continue to Phase 4
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Entry Router
|
## Entry Router
|
||||||
|
|
||||||
When coordinator is invoked, first detect the invocation type:
|
When coordinator is invoked, first detect the invocation type:
|
||||||
@@ -33,10 +54,24 @@ When coordinator is invoked, first detect the invocation type:
|
|||||||
| Worker callback | Message contains `[role-name]` tag from a known worker role | -> handleCallback: auto-advance pipeline |
|
| Worker callback | Message contains `[role-name]` tag from a known worker role | -> handleCallback: auto-advance pipeline |
|
||||||
| Status check | Arguments contain "check" or "status" | -> handleCheck: output execution graph, no advancement |
|
| Status check | Arguments contain "check" or "status" | -> handleCheck: output execution graph, no advancement |
|
||||||
| Manual resume | Arguments contain "resume" or "continue" | -> handleResume: check worker states, advance pipeline |
|
| Manual resume | Arguments contain "resume" or "continue" | -> handleResume: check worker states, advance pipeline |
|
||||||
| New session | None of the above | -> Phase 0 (Session Resume Check) |
|
| Interrupted session | Active/paused session exists in `.workflow/.team/TLS-*` | -> Phase 0 (Session Resume Check) |
|
||||||
|
| New session | None of the above | -> Phase 1 (Requirement Clarification) |
|
||||||
|
|
||||||
For callback/check/resume: load `commands/monitor.md` and execute the appropriate handler, then STOP.
|
For callback/check/resume: load `commands/monitor.md` and execute the appropriate handler, then STOP.
|
||||||
|
|
||||||
|
### Router Implementation
|
||||||
|
|
||||||
|
1. **Load session context** (if exists):
|
||||||
|
- Scan `.workflow/.team/TLS-*/team-session.json` for active/paused sessions
|
||||||
|
- If found, extract known worker roles from session or SKILL.md Role Registry
|
||||||
|
|
||||||
|
2. **Parse $ARGUMENTS** for detection keywords
|
||||||
|
|
||||||
|
3. **Route to handler**:
|
||||||
|
- For monitor handlers: Read `commands/monitor.md`, execute matched handler section, STOP
|
||||||
|
- For Phase 0: Execute Session Resume Check below
|
||||||
|
- For Phase 1: Execute Requirement Clarification below
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Phase 0: Session Resume Check
|
## Phase 0: Session Resume Check
|
||||||
|
|||||||
Reference in New Issue
Block a user