mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-18 18:48:48 +08:00
feat: apply Pattern 10 to all team skills — @ strong refs + workspace resolution
- SKILL.md: coordinator entry uses `@roles/coordinator/role.md` strong reference - coordinator/role.md: command delegations use `@commands/xxx.md` prefix - coordinator Phase 2: resolve project_root + skill_root via `Bash pwd` before TeamCreate - Worker Spawn Template: role_spec uses absolute path from session skill_root - skills_lib/team-skill-designer: document Pattern 10 + add quality checks Covers 17 team skills: team-lifecycle-v4, team-frontend, team-ultra-analyze, team-ux-improve, team-arch-opt, team-brainstorm, team-review, team-uidesign, team-issue, team-iterdev, team-perf-opt, team-planex, team-quality-assurance, team-testing, team-tech-debt, team-coordinate, team-roadmap-dev, team-frontend-debug Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -55,7 +55,7 @@ Pipeline (Independent mode):
|
||||
|
||||
Parse `$ARGUMENTS`:
|
||||
- Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
|
||||
- No `--role` → Read `roles/coordinator/role.md`, execute entry router
|
||||
- No `--role` → `@roles/coordinator/role.md`, execute entry router
|
||||
|
||||
## Shared Constants
|
||||
|
||||
@@ -78,14 +78,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-perf-opt/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: perf-opt
|
||||
requirement: <task-description>
|
||||
inner_loop: <true|false>
|
||||
|
||||
Read role_spec file to load Phase 2-4 domain instructions.
|
||||
Read role_spec file (@<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
|
||||
Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -54,7 +54,7 @@ When coordinator is invoked, detect invocation type:
|
||||
| Interrupted session | Active/paused session exists | -> Phase 0 |
|
||||
| New session | None of above | -> Phase 1 |
|
||||
|
||||
For callback/check/resume/complete: load `commands/monitor.md` and execute matched handler, then STOP.
|
||||
For callback/check/resume/complete: load `@commands/monitor.md` and execute matched handler, then STOP.
|
||||
|
||||
### Router Implementation
|
||||
|
||||
@@ -94,16 +94,19 @@ Triggered when an active/paused session is detected on coordinator entry.
|
||||
|
||||
## Phase 2: Session & Team Setup
|
||||
|
||||
1. Create session directory with artifacts/, explorations/, wisdom/, discussions/ subdirs
|
||||
2. Write session.json with extended fields (parallel_mode, max_branches, branches, fix_cycles)
|
||||
3. Initialize meta.json with pipeline metadata via team_msg
|
||||
4. Call `TeamCreate({ team_name: "perf-opt" })`
|
||||
1. Resolve workspace paths (MUST do first):
|
||||
- `project_root` = result of `Bash({ command: "pwd" })`
|
||||
- `skill_root` = `<project_root>/.claude/skills/team-perf-opt`
|
||||
2. Create session directory with artifacts/, explorations/, wisdom/, discussions/ subdirs
|
||||
3. Write session.json with extended fields (parallel_mode, max_branches, branches, fix_cycles)
|
||||
4. Initialize meta.json with pipeline metadata via team_msg
|
||||
5. Call `TeamCreate({ team_name: "perf-opt" })`
|
||||
|
||||
---
|
||||
|
||||
## Phase 3: Create Task Chain
|
||||
|
||||
Execute `commands/dispatch.md` inline (Command Execution Protocol).
|
||||
Execute `@commands/dispatch.md` inline (Command Execution Protocol).
|
||||
|
||||
---
|
||||
|
||||
@@ -112,14 +115,14 @@ Execute `commands/dispatch.md` inline (Command Execution Protocol).
|
||||
### Initial Spawn
|
||||
|
||||
Find first unblocked task and spawn its worker using SKILL.md Worker Spawn Template with:
|
||||
- `role_spec: ~ or <project>/.claude/skills/team-perf-opt/roles/<role>/role.md`
|
||||
- `role_spec: <skill_root>/roles/<role>/role.md`
|
||||
- `team_name: perf-opt`
|
||||
|
||||
**STOP** after spawning. Wait for worker callback.
|
||||
|
||||
### Coordination (via monitor.md handlers)
|
||||
|
||||
All subsequent coordination handled by `commands/monitor.md`.
|
||||
All subsequent coordination handled by `@commands/monitor.md`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user