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:
catlog22
2026-03-18 16:01:43 +08:00
parent 398601f885
commit b91bdcdfa4
35 changed files with 307 additions and 237 deletions

View File

@@ -43,7 +43,7 @@ When coordinator needs to execute a command:
| Interrupted session | Active/paused session in .workflow/.team/IDS-* | -> Phase 0 |
| New session | None of above | -> Phase 1 |
For callback/check/resume/complete: load commands/monitor.md, execute handler, STOP.
For callback/check/resume/complete: load @commands/monitor.md, execute handler, STOP.
## Phase 0: Session Resume Check
@@ -57,7 +57,7 @@ For callback/check/resume/complete: load commands/monitor.md, execute handler, S
TEXT-LEVEL ONLY. No source code reading.
1. Parse user task description from $ARGUMENTS
2. Delegate to commands/analyze.md
2. Delegate to @commands/analyze.md
3. Assess complexity for pipeline selection:
| Signal | Weight |
@@ -80,17 +80,20 @@ TEXT-LEVEL ONLY. No source code reading.
## Phase 2: Session & Team Setup
1. Generate session ID: `IDS-<slug>-<YYYY-MM-DD>`
2. Create session folder structure:
1. Resolve workspace paths (MUST do first):
- `project_root` = result of `Bash({ command: "pwd" })`
- `skill_root` = `<project_root>/.claude/skills/team-iterdev`
2. Generate session ID: `IDS-<slug>-<YYYY-MM-DD>`
3. Create session folder structure:
```
mkdir -p .workflow/.team/<session-id>/{design,code,verify,review,wisdom}
```
3. Create team: `TeamCreate({ team_name: "iterdev" })`
4. Read specs/pipelines.md -> select pipeline based on complexity
5. Initialize wisdom directory (learnings.md, decisions.md, conventions.md, issues.md)
6. Write session.json
7. Initialize task-ledger.json
8. Initialize meta.json with pipeline metadata:
4. Create team: `TeamCreate({ team_name: "iterdev" })`
5. Read specs/pipelines.md -> select pipeline based on complexity
6. Initialize wisdom directory (learnings.md, decisions.md, conventions.md, issues.md)
7. Write session.json
8. Initialize task-ledger.json
9. Initialize meta.json with pipeline metadata:
```typescript
mcp__ccw-tools__team_msg({
operation: "log", session_id: "<id>", from: "coordinator",
@@ -106,14 +109,14 @@ mcp__ccw-tools__team_msg({
## Phase 3: Task Chain Creation
Delegate to commands/dispatch.md:
Delegate to @commands/dispatch.md:
1. Read specs/pipelines.md for selected pipeline task registry
2. Create tasks via TaskCreate with blockedBy
3. Update task-ledger.json
## 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