mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-19 18:58:47 +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-planex", args="task 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,7 +65,7 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-planex/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: planex
|
||||
@@ -73,7 +73,7 @@ requirement: <task-description>
|
||||
inner_loop: <true|false>
|
||||
execution_method: <codex|gemini>
|
||||
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -40,7 +40,7 @@ When coordinator needs to execute a command:
|
||||
| Interrupted session | Active/paused session exists in `.workflow/.team/PEX-*` | -> Phase 0 |
|
||||
| New session | None of above | -> Phase 1 |
|
||||
|
||||
For callback/check/resume: load `commands/monitor.md` and execute the appropriate handler, then STOP.
|
||||
For callback/check/resume: load `@commands/monitor.md` and execute the appropriate handler, then STOP.
|
||||
|
||||
### handleAdd
|
||||
|
||||
@@ -67,7 +67,7 @@ For callback/check/resume: load `commands/monitor.md` and execute the appropriat
|
||||
|
||||
TEXT-LEVEL ONLY. No source code reading.
|
||||
|
||||
1. Delegate to commands/analyze.md -> produces task-analysis.json
|
||||
1. Delegate to @commands/analyze.md -> produces task-analysis.json
|
||||
2. Parse arguments: Extract input type (Issue IDs / --text / --plan) and optional flags (--exec, -y)
|
||||
3. Determine execution method (see specs/pipelines.md Selection Decision Table):
|
||||
- Explicit `--exec` flag -> use specified method
|
||||
@@ -78,12 +78,15 @@ TEXT-LEVEL ONLY. No source code reading.
|
||||
|
||||
## Phase 2: Create Team + Initialize Session
|
||||
|
||||
1. Generate session ID: `PEX-<slug>-<date>`
|
||||
2. Create session folder: `.workflow/.team/<session-id>/`
|
||||
3. Create subdirectories: `artifacts/solutions/`, `wisdom/`
|
||||
4. Call `TeamCreate` with team name (default: "planex")
|
||||
5. Initialize wisdom files (learnings.md, decisions.md, conventions.md, issues.md)
|
||||
6. Initialize meta.json with pipeline metadata:
|
||||
1. Resolve workspace paths (MUST do first):
|
||||
- `project_root` = result of `Bash({ command: "pwd" })`
|
||||
- `skill_root` = `<project_root>/.claude/skills/team-planex`
|
||||
2. Generate session ID: `PEX-<slug>-<date>`
|
||||
3. Create session folder: `.workflow/.team/<session-id>/`
|
||||
4. Create subdirectories: `artifacts/solutions/`, `wisdom/`
|
||||
5. Call `TeamCreate` with team name (default: "planex")
|
||||
6. Initialize wisdom files (learnings.md, decisions.md, conventions.md, issues.md)
|
||||
7. Initialize meta.json with pipeline metadata:
|
||||
```typescript
|
||||
mcp__ccw-tools__team_msg({
|
||||
operation: "log", session_id: "<id>", from: "coordinator",
|
||||
@@ -101,14 +104,14 @@ mcp__ccw-tools__team_msg({
|
||||
|
||||
## Phase 3: Create Task Chain
|
||||
|
||||
Delegate to `commands/dispatch.md`:
|
||||
Delegate to `@commands/dispatch.md`:
|
||||
1. Read `roles/coordinator/commands/dispatch.md`
|
||||
2. Execute its workflow to create PLAN-001 task
|
||||
3. PLAN-001 contains input info + execution method in description
|
||||
|
||||
## Phase 4: Spawn-and-Stop
|
||||
|
||||
1. Load `commands/monitor.md`
|
||||
1. Load `@commands/monitor.md`
|
||||
2. Execute `handleSpawnNext` to find ready tasks and spawn planner worker
|
||||
3. Output status summary
|
||||
4. STOP (idle, wait for worker callback)
|
||||
|
||||
Reference in New Issue
Block a user