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

@@ -54,7 +54,7 @@ Skill(skill="team-frontend-debug", args="feature list or bug 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
@@ -63,6 +63,20 @@ Parse `$ARGUMENTS`:
- **CLI tools**: `ccw cli --mode analysis` (read-only), `ccw cli --mode write` (modifications)
- **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
## Workspace Resolution
Coordinator MUST resolve paths at Phase 2 before TeamCreate:
1. Run `Bash({ command: "pwd" })` → capture `project_root` (absolute path)
2. `skill_root = <project_root>/.claude/skills/team-frontend-debug`
3. Store in `team-session.json`:
```json
{ "project_root": "/abs/path/to/project", "skill_root": "/abs/path/to/skill" }
```
4. All worker `role_spec` values MUST use `<skill_root>/roles/<role>/role.md` (absolute)
This ensures workers spawned with `run_in_background: true` always receive an absolute, resolvable path regardless of their working directory.
## Chrome DevTools MCP Tools
All browser inspection operations use Chrome DevTools MCP. Reproducer and Verifier are primary consumers.
@@ -99,14 +113,14 @@ Agent({
run_in_background: true,
prompt: `## Role Assignment
role: <role>
role_spec: ~ or <project>/.claude/skills/team-frontend-debug/roles/<role>/role.md
role_spec: <skill_root>/roles/<role>/role.md
session: <session-folder>
session_id: <session-id>
team_name: <team-name>
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).`
})
```