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:
@@ -43,7 +43,7 @@ Skill(skill="team-brainstorm", args="topic description")
|
||||
|
||||
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
|
||||
|
||||
@@ -65,14 +65,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-brainstorm/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: brainstorm
|
||||
requirement: <topic-description>
|
||||
inner_loop: 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).`
|
||||
})
|
||||
```
|
||||
@@ -89,7 +89,7 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: ideator
|
||||
role_spec: ~ or <project>/.claude/skills/team-brainstorm/roles/ideator/role.md
|
||||
role_spec: <skill_root>/roles/ideator/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: brainstorm
|
||||
@@ -97,7 +97,7 @@ requirement: <topic-description>
|
||||
agent_name: ideator-<N>
|
||||
inner_loop: false
|
||||
|
||||
Read role_spec file to load Phase 2-4 domain instructions.
|
||||
Read role_spec file (@<skill_root>/roles/ideator/role.md) to load Phase 2-4 domain instructions.
|
||||
Execute built-in Phase 1 (task discovery, owner=ideator-<N>) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -44,7 +44,7 @@ When coordinator needs to execute a specific phase:
|
||||
| Interrupted session | Active session in .workflow/.team/BRS-* | -> Phase 0 |
|
||||
| New session | None of above | -> Phase 1 |
|
||||
|
||||
For callback/check/resume/consensus/adapt/complete: load commands/monitor.md, execute handler, STOP.
|
||||
For callback/check/resume/consensus/adapt/complete: load @commands/monitor.md, execute handler, STOP.
|
||||
|
||||
## Phase 0: Session Resume Check
|
||||
|
||||
@@ -78,11 +78,14 @@ TEXT-LEVEL ONLY. No source code reading.
|
||||
|
||||
## Phase 2: Create Team + Initialize Session
|
||||
|
||||
1. Generate session ID: `BRS-<topic-slug>-<date>`
|
||||
2. Create session folder structure: ideas/, critiques/, synthesis/, evaluation/, wisdom/, .msg/
|
||||
3. TeamCreate with team name `brainstorm`
|
||||
4. Write session.json with pipeline, angles, gc_round=0, max_gc_rounds=2
|
||||
5. Initialize meta.json via team_msg state_update:
|
||||
1. Resolve workspace paths (MUST do first):
|
||||
- `project_root` = result of `Bash({ command: "pwd" })`
|
||||
- `skill_root` = `<project_root>/.claude/skills/team-brainstorm`
|
||||
2. Generate session ID: `BRS-<topic-slug>-<date>`
|
||||
3. Create session folder structure: ideas/, critiques/, synthesis/, evaluation/, wisdom/, .msg/
|
||||
4. TeamCreate with team name `brainstorm`
|
||||
5. Write session.json with pipeline, angles, gc_round=0, max_gc_rounds=2
|
||||
6. Initialize meta.json via team_msg state_update:
|
||||
```
|
||||
mcp__ccw-tools__team_msg({
|
||||
operation: "log", session_id: "<id>", from: "coordinator",
|
||||
@@ -90,18 +93,18 @@ TEXT-LEVEL ONLY. No source code reading.
|
||||
data: { pipeline_mode: "<mode>", pipeline_stages: ["ideator","challenger","synthesizer","evaluator"], team_name: "brainstorm", topic: "<topic>", angles: [...], gc_round: 0 }
|
||||
})
|
||||
```
|
||||
6. Write session.json
|
||||
7. Write session.json
|
||||
|
||||
## Phase 3: Create Task Chain
|
||||
|
||||
Delegate to commands/dispatch.md:
|
||||
Delegate to @commands/dispatch.md:
|
||||
1. Read pipeline mode and angles from session.json
|
||||
2. Create tasks for selected pipeline with correct blockedBy
|
||||
3. Update session.json with task count
|
||||
|
||||
## Phase 4: Spawn-and-Stop
|
||||
|
||||
Delegate to commands/monitor.md#handleSpawnNext:
|
||||
Delegate to @commands/monitor.md#handleSpawnNext:
|
||||
1. Find ready tasks (pending + blockedBy resolved)
|
||||
2. Spawn team-worker agents (see SKILL.md Spawn Template)
|
||||
3. Output status summary
|
||||
|
||||
Reference in New Issue
Block a user