diff --git a/.claude/skills/team-coordinate-v2/SKILL.md b/.claude/skills/team-coordinate-v2/SKILL.md index d42fc418..eb16cf37 100644 --- a/.claude/skills/team-coordinate-v2/SKILL.md +++ b/.claude/skills/team-coordinate-v2/SKILL.md @@ -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" | +-------------------+-------------------------------+ | @@ -64,7 +64,7 @@ Always route to coordinator. Coordinator reads `roles/coordinator/role.md` and e User just provides task description. -**Invocation**: `Skill(skill="team-coordinate", args="task description")` +**Invocation**: `Skill(skill="team-coordinate-v2", args="task description")` **Lifecycle**: ``` @@ -143,7 +143,7 @@ AskUserQuestion({ | Choice | Steps | |--------|-------| | 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 | --- diff --git a/.claude/skills/team-coordinate-v2/roles/coordinator/commands/monitor.md b/.claude/skills/team-coordinate-v2/roles/coordinator/commands/monitor.md index bf36bad1..dc972d3f 100644 --- a/.claude/skills/team-coordinate-v2/roles/coordinator/commands/monitor.md +++ b/.claude/skills/team-coordinate-v2/roles/coordinator/commands/monitor.md @@ -192,7 +192,7 @@ All tasks completed (no pending, no in_progress) | | Output final summary with artifact paths | +- "Keep Active": | | 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": | AskUserQuestion for target directory | Copy deliverables to target diff --git a/.claude/skills/team-lifecycle-v3/roles/coordinator/role.md b/.claude/skills/team-lifecycle-v3/roles/coordinator/role.md index a69de4f7..13d58946 100644 --- a/.claude/skills/team-lifecycle-v3/roles/coordinator/role.md +++ b/.claude/skills/team-lifecycle-v3/roles/coordinator/role.md @@ -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/.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 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 | | 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 | -| 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. +### 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 diff --git a/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md b/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md index bd4f524a..bba5a362 100644 --- a/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md +++ b/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md @@ -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/.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 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 | | 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 | -| 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. +### 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