From b91bdcdfa4d232e9309a536f69b2fa21be5150fc Mon Sep 17 00:00:00 2001 From: catlog22 Date: Wed, 18 Mar 2026 16:01:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20apply=20Pattern=2010=20to=20all=20team?= =?UTF-8?q?=20skills=20=E2=80=94=20@=20strong=20refs=20+=20workspace=20res?= =?UTF-8?q?olution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .claude/skills/team-arch-opt/SKILL.md | 6 ++-- .../team-arch-opt/roles/coordinator/role.md | 21 ++++++------ .claude/skills/team-brainstorm/SKILL.md | 10 +++--- .../team-brainstorm/roles/coordinator/role.md | 21 ++++++------ .../team-coordinate/roles/coordinator/role.md | 32 +++++++++++-------- .claude/skills/team-frontend-debug/SKILL.md | 20 ++++++++++-- .../roles/coordinator/role.md | 13 +++++--- .claude/skills/team-frontend/SKILL.md | 6 ++-- .../team-frontend/roles/coordinator/role.md | 25 ++++++++------- .claude/skills/team-issue/SKILL.md | 10 +++--- .../team-issue/roles/coordinator/role.md | 21 ++++++------ .claude/skills/team-iterdev/SKILL.md | 6 ++-- .../team-iterdev/roles/coordinator/role.md | 27 +++++++++------- .claude/skills/team-lifecycle-v4/SKILL.md | 10 +++--- .../roles/coordinator/role.md | 29 +++++++++-------- .claude/skills/team-perf-opt/SKILL.md | 6 ++-- .../team-perf-opt/roles/coordinator/role.md | 19 ++++++----- .claude/skills/team-planex/SKILL.md | 6 ++-- .../team-planex/roles/coordinator/role.md | 23 +++++++------ .../skills/team-quality-assurance/SKILL.md | 6 ++-- .../roles/coordinator/role.md | 27 +++++++++------- .claude/skills/team-review/SKILL.md | 6 ++-- .../team-review/roles/coordinator/role.md | 23 +++++++------ .claude/skills/team-roadmap-dev/SKILL.md | 6 ++-- .../roles/coordinator/role.md | 24 ++++++++------ .claude/skills/team-tech-debt/SKILL.md | 6 ++-- .../team-tech-debt/roles/coordinator/role.md | 21 ++++++------ .claude/skills/team-testing/SKILL.md | 6 ++-- .../team-testing/roles/coordinator/role.md | 23 +++++++------ .claude/skills/team-uidesign/SKILL.md | 6 ++-- .../team-uidesign/roles/coordinator/role.md | 21 ++++++------ .claude/skills/team-ultra-analyze/SKILL.md | 6 ++-- .../roles/coordinator/role.md | 21 ++++++------ .claude/skills/team-ux-improve/SKILL.md | 6 ++-- .../team-ux-improve/roles/coordinator/role.md | 25 ++++++++------- 35 files changed, 307 insertions(+), 237 deletions(-) diff --git a/.claude/skills/team-arch-opt/SKILL.md b/.claude/skills/team-arch-opt/SKILL.md index dc59beec..be5ee9b3 100644 --- a/.claude/skills/team-arch-opt/SKILL.md +++ b/.claude/skills/team-arch-opt/SKILL.md @@ -44,7 +44,7 @@ Skill(skill="team-arch-opt", args="task description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -66,14 +66,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-arch-opt/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: arch-opt requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-arch-opt/roles/coordinator/role.md b/.claude/skills/team-arch-opt/roles/coordinator/role.md index 3c6a3766..8cb70aac 100644 --- a/.claude/skills/team-arch-opt/roles/coordinator/role.md +++ b/.claude/skills/team-arch-opt/roles/coordinator/role.md @@ -46,7 +46,7 @@ When coordinator needs to execute a specific phase: | Interrupted session | Active session in .workflow/.team/TAO-* | -> 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 @@ -81,11 +81,14 @@ TEXT-LEVEL ONLY. No source code reading. ## Phase 2: Create Team + Initialize Session -1. Generate session ID: `TAO--` -2. Create session folder structure -3. TeamCreate with team name `arch-opt` -4. Write session.json with parallel_mode, max_branches, branches, independent_targets, fix_cycles -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` = `/.claude/skills/team-arch-opt` +2. Generate session ID: `TAO--` +3. Create session folder structure +4. TeamCreate with team name `arch-opt` +5. Write session.json with parallel_mode, max_branches, branches, independent_targets, fix_cycles +6. Initialize meta.json via team_msg state_update: ``` mcp__ccw-tools__team_msg({ operation: "log", session_id: "", from: "coordinator", @@ -93,11 +96,11 @@ TEXT-LEVEL ONLY. No source code reading. data: { pipeline_mode: "", pipeline_stages: ["analyzer","designer","refactorer","validator","reviewer"], team_name: "arch-opt" } }) ``` -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 dependency graph and parallel mode from session.json 2. Topological sort tasks 3. Create tasks via TaskCreate with blockedBy @@ -105,7 +108,7 @@ Delegate to commands/dispatch.md: ## 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 diff --git a/.claude/skills/team-brainstorm/SKILL.md b/.claude/skills/team-brainstorm/SKILL.md index 492b77ea..82c3c292 100644 --- a/.claude/skills/team-brainstorm/SKILL.md +++ b/.claude/skills/team-brainstorm/SKILL.md @@ -43,7 +43,7 @@ Skill(skill="team-brainstorm", args="topic description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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_spec: ~ or /.claude/skills/team-brainstorm/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: brainstorm requirement: inner_loop: false -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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 /.claude/skills/team-brainstorm/roles/ideator/role.md +role_spec: /roles/ideator/role.md session: session_id: team_name: brainstorm @@ -97,7 +97,7 @@ requirement: agent_name: ideator- inner_loop: false -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles/ideator/role.md) to load Phase 2-4 domain instructions. Execute built-in Phase 1 (task discovery, owner=ideator-) -> role Phase 2-4 -> built-in Phase 5 (report).` }) ``` diff --git a/.claude/skills/team-brainstorm/roles/coordinator/role.md b/.claude/skills/team-brainstorm/roles/coordinator/role.md index 7782fa80..6f1fec98 100644 --- a/.claude/skills/team-brainstorm/roles/coordinator/role.md +++ b/.claude/skills/team-brainstorm/roles/coordinator/role.md @@ -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--` -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` = `/.claude/skills/team-brainstorm` +2. Generate session ID: `BRS--` +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: "", from: "coordinator", @@ -90,18 +93,18 @@ TEXT-LEVEL ONLY. No source code reading. data: { pipeline_mode: "", pipeline_stages: ["ideator","challenger","synthesizer","evaluator"], team_name: "brainstorm", 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 diff --git a/.claude/skills/team-coordinate/roles/coordinator/role.md b/.claude/skills/team-coordinate/roles/coordinator/role.md index 2fcb1fdb..8b8082a1 100644 --- a/.claude/skills/team-coordinate/roles/coordinator/role.md +++ b/.claude/skills/team-coordinate/roles/coordinator/role.md @@ -110,7 +110,7 @@ When coordinator is invoked, first detect the invocation type: | Interrupted session | Active/paused session exists in `.workflow/.team/TC-*` | -> Phase 0 (Resume Check) | | New session | None of above | -> Phase 1 (Task Analysis) | -For callback/check/resume/adapt/complete: load `commands/monitor.md` and execute the appropriate handler, then STOP. +For callback/check/resume/adapt/complete: load `@commands/monitor.md` and execute the appropriate handler, then STOP. ### Router Implementation @@ -166,7 +166,7 @@ For callback/check/resume/adapt/complete: load `commands/monitor.md` and execute - What deliverables are expected? (documents, code, analysis reports) - Any constraints? (timeline, technology, style) -3. **Delegate to `commands/analyze-task.md`**: +3. **Delegate to `@commands/analyze-task.md`**: - Signal detection: scan keywords -> infer capabilities - Artifact inference: each capability -> default output type (.md) - Dependency graph: build DAG of work streams @@ -203,15 +203,19 @@ Regardless of complexity score or role count, coordinator MUST: **Workflow**: -1. **Check `needs_research` flag** from task-analysis.json: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-coordinate` + +2. **Check `needs_research` flag** from task-analysis.json: - If `true`: **Spawn researcher worker first** to gather codebase context - Wait for researcher callback - Merge research findings into task context - Update task-analysis.json with enriched context -2. **Generate session ID**: `TC--` (slug from first 3 meaningful words of task) +3. **Generate session ID**: `TC--` (slug from first 3 meaningful words of task) -3. **Create session folder structure**: +4. **Create session folder structure**: ``` .workflow/.team// +-- role-specs/ @@ -222,11 +226,11 @@ Regardless of complexity score or role count, coordinator MUST: +-- .msg/ ``` -4. **Call TeamCreate** with team name derived from session ID +5. **Call TeamCreate** with team name derived from session ID -5. **Read `specs/role-spec-template.md`** for Behavioral Traits + Reference Patterns +6. **Read `specs/role-spec-template.md`** for Behavioral Traits + Reference Patterns -6. **For each role in task-analysis.json#roles**: +7. **For each role in task-analysis.json#roles**: - Fill YAML frontmatter: role, prefix, inner_loop, additional_members, message_types - **Compose Phase 2-4 content** (NOT copy from template): - Phase 2: Derive input sources and context loading steps from **task description + upstream dependencies** @@ -235,14 +239,14 @@ Regardless of complexity score or role count, coordinator MUST: - Reference Patterns may guide phase structure, but task description determines specific content - Write generated role-spec to `/role-specs/.md` -7. **Register roles** in team-session.json#roles (with `role_spec` path instead of `role_file`) +8. **Register roles** in team-session.json#roles (with `role_spec` path instead of `role_file`) -8. **Initialize shared infrastructure**: +9. **Initialize shared infrastructure**: - `wisdom/learnings.md`, `wisdom/decisions.md`, `wisdom/issues.md` (empty with headers) - `explorations/cache-index.json` (`{ "entries": [] }`) - `discussions/` (empty directory) -9. **Initialize pipeline metadata** via team_msg: +10. **Initialize pipeline metadata** via team_msg: ```typescript // 使用 team_msg 将 pipeline 元数据写入 .msg/meta.json // 注意: 此处为动态角色,执行时需将 替换为 task-analysis.json 中生成的实际角色列表 @@ -261,7 +265,7 @@ mcp__ccw-tools__team_msg({ }) ``` -10. **Write team-session.json** with: session_id, task_description, status="active", roles, pipeline (empty), active_workers=[], completion_action="interactive", created_at +11. **Write team-session.json** with: session_id, task_description, status="active", roles, pipeline (empty), active_workers=[], completion_action="interactive", created_at **Success**: Session created, role-spec files generated, shared infrastructure initialized. @@ -271,7 +275,7 @@ mcp__ccw-tools__team_msg({ **Objective**: Dispatch tasks based on dependency graph with proper dependencies. -Delegate to `commands/dispatch.md` which creates the full task chain: +Delegate to `@commands/dispatch.md` which creates the full task chain: 1. Reads dependency_graph from task-analysis.json 2. Topological sorts tasks 3. Creates tasks via TaskCreate with correct blockedBy @@ -291,7 +295,7 @@ Delegate to `commands/dispatch.md` which creates the full task chain: **Design**: Spawn-and-Stop + Callback pattern, with worker fast-advance. **Workflow**: -1. Load `commands/monitor.md` +1. Load `@commands/monitor.md` 2. Find tasks with: status=pending, blockedBy all resolved, owner assigned 3. For each ready task -> spawn team-worker (see SKILL.md Coordinator Spawn Template) 4. Output status summary with execution graph diff --git a/.claude/skills/team-frontend-debug/SKILL.md b/.claude/skills/team-frontend-debug/SKILL.md index a21234c6..35ea2ab3 100644 --- a/.claude/skills/team-frontend-debug/SKILL.md +++ b/.claude/skills/team-frontend-debug/SKILL.md @@ -54,7 +54,7 @@ Skill(skill="team-frontend-debug", args="feature list or bug description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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=, ...)` +## Workspace Resolution + +Coordinator MUST resolve paths at Phase 2 before TeamCreate: + +1. Run `Bash({ command: "pwd" })` → capture `project_root` (absolute path) +2. `skill_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 `/roles//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_spec: ~ or /.claude/skills/team-frontend-debug/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-frontend-debug/roles/coordinator/role.md b/.claude/skills/team-frontend-debug/roles/coordinator/role.md index 1bfbc811..590dfaf9 100644 --- a/.claude/skills/team-frontend-debug/roles/coordinator/role.md +++ b/.claude/skills/team-frontend-debug/roles/coordinator/role.md @@ -67,14 +67,17 @@ TEXT-LEVEL ONLY. No source code reading. - Test mode: base URL, feature list - Debug mode: bug description, URL, reproduction steps 3. Clarify if ambiguous (AskUserQuestion) -4. Delegate to commands/analyze.md +4. Delegate to @commands/analyze.md 5. Output: task-analysis.json 6. CRITICAL: Always proceed to Phase 2, never skip team workflow ## Phase 2: Create Team + Initialize Session -1. Generate session ID: TFD-- -2. Create session folder structure: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-frontend-debug` +2. Generate session ID: TFD-- +3. Create session folder structure: ``` .workflow/.team/TFD--/ ├── team-session.json @@ -91,7 +94,7 @@ TEXT-LEVEL ONLY. No source code reading. ## Phase 3: Create Task Chain -Delegate to commands/dispatch.md: +Delegate to @commands/dispatch.md: 1. Read dependency graph from task-analysis.json 2. Read specs/pipelines.md for debug-pipeline task registry 3. Topological sort tasks @@ -100,7 +103,7 @@ Delegate to commands/dispatch.md: ## 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 diff --git a/.claude/skills/team-frontend/SKILL.md b/.claude/skills/team-frontend/SKILL.md index 5a8dad1f..70b4f984 100644 --- a/.claude/skills/team-frontend/SKILL.md +++ b/.claude/skills/team-frontend/SKILL.md @@ -44,7 +44,7 @@ Skill(skill="team-frontend", args="task description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -66,14 +66,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-frontend/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: frontend requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-frontend/roles/coordinator/role.md b/.claude/skills/team-frontend/roles/coordinator/role.md index 8ad71d1f..87d12386 100644 --- a/.claude/skills/team-frontend/roles/coordinator/role.md +++ b/.claude/skills/team-frontend/roles/coordinator/role.md @@ -42,7 +42,7 @@ When coordinator needs to execute a command: | Interrupted session | Active/paused session in .workflow/.team/FE-* | -> 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 @@ -56,7 +56,7 @@ For callback/check/resume/complete: load commands/monitor.md, execute handler, S TEXT-LEVEL ONLY. No source code reading. 1. Parse task description from $ARGUMENTS -2. Delegate to commands/analyze.md -> produces task-analysis.json +2. Delegate to @commands/analyze.md -> produces task-analysis.json 3. Ask for missing parameters via AskUserQuestion: **Scope Selection**: @@ -83,15 +83,18 @@ TEXT-LEVEL ONLY. No source code reading. ## Phase 2: Session & Team Setup -1. Generate session ID: `FE--` -2. Create session folder structure: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-frontend` +3. Generate session ID: `FE--` +4. Create session folder structure: ``` mkdir -p .workflow/.team//{.msg,wisdom,analysis,architecture,qa,build} ``` -3. TeamCreate with team name: `TeamCreate({ team_name: "frontend" })` -4. Read specs/pipelines.md -> select pipeline based on scope -5. Register roles in session state -6. Initialize meta.json with pipeline metadata: +5. TeamCreate with team name: `TeamCreate({ team_name: "frontend" })` +6. Read specs/pipelines.md -> select pipeline based on scope +7. Register roles in session state +8. Initialize meta.json with pipeline metadata: ```typescript mcp__ccw-tools__team_msg({ operation: "log", session_id: "", from: "coordinator", @@ -106,18 +109,18 @@ mcp__ccw-tools__team_msg({ } }) ``` -7. Write session.json +9. Write session.json ## 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 session.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 diff --git a/.claude/skills/team-issue/SKILL.md b/.claude/skills/team-issue/SKILL.md index 3ddfeeba..52aaa7dd 100644 --- a/.claude/skills/team-issue/SKILL.md +++ b/.claude/skills/team-issue/SKILL.md @@ -44,7 +44,7 @@ Skill(skill="team-issue", args=" [--mode=]") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -67,14 +67,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-issue/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: issue requirement: inner_loop: false -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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: -role_spec: ~ or /.claude/skills/team-issue/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: issue @@ -97,7 +97,7 @@ requirement: agent_name: - inner_loop: false -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//role.md) to load Phase 2-4 domain instructions. Execute built-in Phase 1 (task discovery, owner=-) -> role Phase 2-4 -> built-in Phase 5 (report).` }) ``` diff --git a/.claude/skills/team-issue/roles/coordinator/role.md b/.claude/skills/team-issue/roles/coordinator/role.md index fb94fce1..8b182b7f 100644 --- a/.claude/skills/team-issue/roles/coordinator/role.md +++ b/.claude/skills/team-issue/roles/coordinator/role.md @@ -49,7 +49,7 @@ When coordinator needs to execute a specific phase: | Interrupted session | Active session in .workflow/.team/TISL-* | -> 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 @@ -95,14 +95,17 @@ TEXT-LEVEL ONLY. No source code reading. ## Phase 2: Create Team + Initialize Session -1. Generate session ID: `TISL--` -2. Create session folder structure: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-issue` +2. Generate session ID: `TISL--` +3. Create session folder structure: ``` Bash("mkdir -p .workflow/.team/TISL--/{explorations,solutions,audits,queue,builds,wisdom,.msg}") ``` -3. TeamCreate with team name `issue` -4. Write session.json with pipeline_mode, issue_ids, execution_method, fix_cycles=0, max_fix_cycles=2 -5. Initialize meta.json via team_msg state_update: +4. TeamCreate with team name `issue` +5. Write session.json with pipeline_mode, issue_ids, execution_method, fix_cycles=0, max_fix_cycles=2 +6. Initialize meta.json via team_msg state_update: ``` mcp__ccw-tools__team_msg({ operation: "log", session_id: "", from: "coordinator", @@ -110,18 +113,18 @@ TEXT-LEVEL ONLY. No source code reading. data: { pipeline_mode: "", pipeline_stages: ["explorer","planner","reviewer","integrator","implementer"], team_name: "issue", issue_ids: [...], fix_cycles: 0 } }) ``` -6. Initialize wisdom files (learnings.md, decisions.md, conventions.md, issues.md) +7. Initialize wisdom files (learnings.md, decisions.md, conventions.md, issues.md) ## Phase 3: Create Task Chain -Delegate to commands/dispatch.md: +Delegate to @commands/dispatch.md: 1. Read pipeline mode and issue IDs 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 diff --git a/.claude/skills/team-iterdev/SKILL.md b/.claude/skills/team-iterdev/SKILL.md index 6aa7a59d..fa6c66f3 100644 --- a/.claude/skills/team-iterdev/SKILL.md +++ b/.claude/skills/team-iterdev/SKILL.md @@ -44,7 +44,7 @@ Skill(skill="team-iterdev", args="task description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -66,14 +66,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-iterdev/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: iterdev requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-iterdev/roles/coordinator/role.md b/.claude/skills/team-iterdev/roles/coordinator/role.md index 4b99b964..bb0ca040 100644 --- a/.claude/skills/team-iterdev/roles/coordinator/role.md +++ b/.claude/skills/team-iterdev/roles/coordinator/role.md @@ -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--` -2. Create session folder structure: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-iterdev` +2. Generate session ID: `IDS--` +3. Create session folder structure: ``` mkdir -p .workflow/.team//{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: "", 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 diff --git a/.claude/skills/team-lifecycle-v4/SKILL.md b/.claude/skills/team-lifecycle-v4/SKILL.md index b30e753c..2eba5557 100644 --- a/.claude/skills/team-lifecycle-v4/SKILL.md +++ b/.claude/skills/team-lifecycle-v4/SKILL.md @@ -49,7 +49,7 @@ Skill(skill="team-lifecycle-v4", args="task description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -71,14 +71,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-lifecycle-v4/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` @@ -98,13 +98,13 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: supervisor -role_spec: ~ or /.claude/skills/team-lifecycle-v4/roles/supervisor/role.md +role_spec: /roles/supervisor/role.md session: session_id: team_name: requirement: -Read role_spec file to load checkpoint definitions. +Read role_spec file (@/roles/supervisor/role.md) to load checkpoint definitions. Init: load baseline context, report ready, go idle. Wake cycle: coordinator sends checkpoint requests via SendMessage.` }) diff --git a/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md b/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md index 03c94208..5d792444 100644 --- a/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md +++ b/.claude/skills/team-lifecycle-v4/roles/coordinator/role.md @@ -43,7 +43,7 @@ When coordinator needs to execute a specific phase: | Interrupted session | Active session in .workflow/.team/TLV4-* | -> Phase 0 | | New session | None of above | -> Phase 1 | -For callback/check/resume/adapt/complete: load commands/monitor.md, execute handler, STOP. +For callback/check/resume/adapt/complete: load @commands/monitor.md, execute handler, STOP. ## Phase 0: Session Resume Check @@ -64,19 +64,22 @@ TEXT-LEVEL ONLY. No source code reading. 1. Parse task description 2. Clarify if ambiguous (AskUserQuestion: scope, deliverables, constraints) -3. Delegate to commands/analyze.md +3. Delegate to @commands/analyze.md 4. Output: task-analysis.json 5. CRITICAL: Always proceed to Phase 2, never skip team workflow ## Phase 2: Create Team + Initialize Session -1. Generate session ID: TLV4-- -2. Create session folder structure -3. TeamCreate with team name -4. Read specs/pipelines.md -> select pipeline -5. Register roles in team-session.json -6. Initialize shared infrastructure (wisdom/*.md, explorations/cache-index.json) -7. Initialize pipeline via team_msg state_update: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-lifecycle-v4` +2. Generate session ID: TLV4-- +3. Create session folder structure +4. TeamCreate with team name +5. Read specs/pipelines.md -> select pipeline +6. Register roles in team-session.json +7. Initialize shared infrastructure (wisdom/*.md, explorations/cache-index.json) +8. Initialize pipeline via team_msg state_update: ``` mcp__ccw-tools__team_msg({ operation: "log", session_id: "", from: "coordinator", @@ -84,15 +87,15 @@ TEXT-LEVEL ONLY. No source code reading. data: { pipeline_mode: "", pipeline_stages: [...], team_name: "" } }) ``` -8. Write team-session.json -9. Spawn resident supervisor (if pipeline has CHECKPOINT tasks AND `supervision !== false`): +9. Write team-session.json +10. Spawn resident supervisor (if pipeline has CHECKPOINT tasks AND `supervision !== false`): - Use SKILL.md Supervisor Spawn Template (subagent_type: "team-supervisor") - Wait for "[supervisor] Ready" callback before proceeding to Phase 3 - Record supervisor in active_workers with `resident: true` flag ## Phase 3: Create Task Chain -Delegate to commands/dispatch.md: +Delegate to @commands/dispatch.md: 1. Read dependency graph from task-analysis.json 2. Read specs/pipelines.md for selected pipeline's task registry 3. Topological sort tasks @@ -101,7 +104,7 @@ Delegate to commands/dispatch.md: ## 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 diff --git a/.claude/skills/team-perf-opt/SKILL.md b/.claude/skills/team-perf-opt/SKILL.md index a7476dd9..5638ba6f 100644 --- a/.claude/skills/team-perf-opt/SKILL.md +++ b/.claude/skills/team-perf-opt/SKILL.md @@ -55,7 +55,7 @@ Pipeline (Independent mode): Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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_spec: ~ or /.claude/skills/team-perf-opt/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: perf-opt requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-perf-opt/roles/coordinator/role.md b/.claude/skills/team-perf-opt/roles/coordinator/role.md index e74a6cb3..20150d8c 100644 --- a/.claude/skills/team-perf-opt/roles/coordinator/role.md +++ b/.claude/skills/team-perf-opt/roles/coordinator/role.md @@ -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` = `/.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 /.claude/skills/team-perf-opt/roles//role.md` +- `role_spec: /roles//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`. --- diff --git a/.claude/skills/team-planex/SKILL.md b/.claude/skills/team-planex/SKILL.md index 50de5157..2a44fc86 100644 --- a/.claude/skills/team-planex/SKILL.md +++ b/.claude/skills/team-planex/SKILL.md @@ -43,7 +43,7 @@ Skill(skill="team-planex", args="task description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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_spec: ~ or /.claude/skills/team-planex/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: planex @@ -73,7 +73,7 @@ requirement: inner_loop: execution_method: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-planex/roles/coordinator/role.md b/.claude/skills/team-planex/roles/coordinator/role.md index 4f2c8f4d..e66f42ad 100644 --- a/.claude/skills/team-planex/roles/coordinator/role.md +++ b/.claude/skills/team-planex/roles/coordinator/role.md @@ -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--` -2. Create session folder: `.workflow/.team//` -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` = `/.claude/skills/team-planex` +2. Generate session ID: `PEX--` +3. Create session folder: `.workflow/.team//` +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: "", 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) diff --git a/.claude/skills/team-quality-assurance/SKILL.md b/.claude/skills/team-quality-assurance/SKILL.md index 23193da7..5872c3a0 100644 --- a/.claude/skills/team-quality-assurance/SKILL.md +++ b/.claude/skills/team-quality-assurance/SKILL.md @@ -45,7 +45,7 @@ Skill(skill="team-quality-assurance", args="task description") Parse `$ARGUMENTS`: - Has `--role ` -> Read `roles//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 @@ -68,14 +68,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-quality-assurance/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: quality-assurance requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-quality-assurance/roles/coordinator/role.md b/.claude/skills/team-quality-assurance/roles/coordinator/role.md index f5c4ec2b..f4c4d5fb 100644 --- a/.claude/skills/team-quality-assurance/roles/coordinator/role.md +++ b/.claude/skills/team-quality-assurance/roles/coordinator/role.md @@ -43,7 +43,7 @@ When coordinator needs to execute a specific phase: | Interrupted session | Active session in .workflow/.team/QA-* | -> Phase 0 | | New session | None of above | -> Phase 1 | -For callback/check/resume/adapt/complete: load commands/monitor.md, execute handler, STOP. +For callback/check/resume/adapt/complete: load @commands/monitor.md, execute handler, STOP. ## Phase 0: Session Resume Check @@ -69,19 +69,22 @@ TEXT-LEVEL ONLY. No source code reading. | No explicit flag and no keyword match | full (default) | 3. Clarify if ambiguous (AskUserQuestion: scope, deliverables, constraints) -4. Delegate to commands/analyze.md +4. Delegate to @commands/analyze.md 5. Output: task-analysis.json 6. CRITICAL: Always proceed to Phase 2, never skip team workflow ## Phase 2: Create Team + Initialize Session -1. Generate session ID: QA-- -2. Create session folder structure -3. TeamCreate with team name "quality-assurance" -4. Read specs/pipelines.md -> select pipeline based on mode -5. Register roles in session.json -6. Initialize shared infrastructure (wisdom/*.md) -7. Initialize pipeline via team_msg state_update: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-quality-assurance` +2. Generate session ID: QA-- +3. Create session folder structure +4. TeamCreate with team name "quality-assurance" +5. Read specs/pipelines.md -> select pipeline based on mode +6. Register roles in session.json +7. Initialize shared infrastructure (wisdom/*.md) +8. Initialize pipeline via team_msg state_update: ``` mcp__ccw-tools__team_msg({ operation: "log", session_id: "", from: "coordinator", @@ -100,11 +103,11 @@ TEXT-LEVEL ONLY. No source code reading. } }) ``` -8. Write session.json +9. Write session.json ## Phase 3: Create Task Chain -Delegate to commands/dispatch.md: +Delegate to @commands/dispatch.md: 1. Read dependency graph from task-analysis.json 2. Read specs/pipelines.md for selected pipeline's task registry 3. Topological sort tasks @@ -113,7 +116,7 @@ Delegate to commands/dispatch.md: ## 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 diff --git a/.claude/skills/team-review/SKILL.md b/.claude/skills/team-review/SKILL.md index 0a32a43e..004b0cdc 100644 --- a/.claude/skills/team-review/SKILL.md +++ b/.claude/skills/team-review/SKILL.md @@ -43,7 +43,7 @@ Skill(skill="team-review", args="task description") Parse `$ARGUMENTS`: - Has `--role ` -> Read `roles//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 @@ -66,14 +66,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-review/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: review requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-review/roles/coordinator/role.md b/.claude/skills/team-review/roles/coordinator/role.md index 3688ef69..97815bdc 100644 --- a/.claude/skills/team-review/roles/coordinator/role.md +++ b/.claude/skills/team-review/roles/coordinator/role.md @@ -43,7 +43,7 @@ When coordinator needs to execute a specific phase: | Interrupted session | Active session in .workflow/.team/RV-* | -> Phase 0 | | New session | None of above | -> Phase 1 | -For callback/check/resume/adapt/complete: load commands/monitor.md, execute handler, STOP. +For callback/check/resume/adapt/complete: load @commands/monitor.md, execute handler, STOP. ## Phase 0: Session Resume Check @@ -67,17 +67,20 @@ TEXT-LEVEL ONLY. No source code reading. 2. Extract parameters: target, dimensions, auto-confirm flag 3. Clarify if ambiguous (AskUserQuestion for target path) -4. Delegate to commands/analyze.md +4. Delegate to @commands/analyze.md 5. Output: task-analysis.json 6. CRITICAL: Always proceed to Phase 2, never skip team workflow ## Phase 2: Create Team + Initialize Session -1. Generate session ID: RV-- -2. Create session folder structure (scan/, review/, fix/, wisdom/) -3. TeamCreate with team name "review" -4. Read specs/pipelines.md -> select pipeline based on mode -5. Initialize pipeline via team_msg state_update: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-review` +2. Generate session ID: RV-- +3. Create session folder structure (scan/, review/, fix/, wisdom/) +4. TeamCreate with team name "review" +5. Read specs/pipelines.md -> select pipeline based on mode +6. Initialize pipeline via team_msg state_update: ``` mcp__ccw-tools__team_msg({ operation: "log", session_id: "", from: "coordinator", @@ -92,18 +95,18 @@ TEXT-LEVEL ONLY. No source code reading. } }) ``` -6. Write session meta.json +7. Write session meta.json ## Phase 3: Create Task Chain -Delegate to commands/dispatch.md: +Delegate to @commands/dispatch.md: 1. Read specs/pipelines.md for selected pipeline's task registry 2. Create tasks via TaskCreate with blockedBy 3. Update session meta.json with pipeline.tasks_total ## 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 diff --git a/.claude/skills/team-roadmap-dev/SKILL.md b/.claude/skills/team-roadmap-dev/SKILL.md index 6d192e20..c203a4ff 100644 --- a/.claude/skills/team-roadmap-dev/SKILL.md +++ b/.claude/skills/team-roadmap-dev/SKILL.md @@ -49,7 +49,7 @@ Multi-phase: Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -72,14 +72,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-roadmap-dev/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: roadmap-dev requirement: inner_loop: true -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-roadmap-dev/roles/coordinator/role.md b/.claude/skills/team-roadmap-dev/roles/coordinator/role.md index e91e3758..a6f831c2 100644 --- a/.claude/skills/team-roadmap-dev/roles/coordinator/role.md +++ b/.claude/skills/team-roadmap-dev/roles/coordinator/role.md @@ -65,14 +65,14 @@ When coordinator is invoked, detect invocation type: | Detection | Condition | Handler | |-----------|-----------|---------| | Worker callback | Message contains role tag [planner], [executor], [verifier] | -> handleCallback | -| Resume mode | Arguments contain `--resume` | -> commands/resume.md: load session, re-enter monitor | +| Resume mode | Arguments contain `--resume` | -> @commands/resume.md: load session, re-enter monitor | | Status check | Arguments contain "check" or "status" | -> handleCheck | | Manual resume | Arguments contain "resume" or "continue" | -> handleResume | | Pipeline complete | All tasks have status "completed" | -> handleComplete | | Interrupted session | Active/paused session exists | -> Phase 0 (Session Resume Check) | | New session | None of above | -> Phase 1 (Init Prerequisites) | -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 @@ -86,7 +86,7 @@ For callback/check/resume/complete: load `commands/monitor.md` and execute match 3. **Route to handler**: - For monitor handlers: Read `commands/monitor.md`, execute matched handler, STOP - - For --resume: Read `commands/resume.md`, execute resume flow + - For --resume: Read `@commands/resume.md`, execute resume flow - For Phase 0: Execute Session Resume Check - For Phase 1: Execute Init Prerequisites below @@ -160,7 +160,7 @@ Bash("ccw team log --session-id --from coordinator --type -- **Workflow**: 1. Parse arguments for flags: `--resume`, `--yes`, task description -2. If `--resume` present -> load commands/resume.md and execute resume flow +2. If `--resume` present -> load @commands/resume.md and execute resume flow 3. Ensure project-tech.json exists: | Condition | Action | @@ -178,7 +178,7 @@ Bash("ccw team log --session-id --from coordinator --type -- **Objective**: Discuss roadmap with user and generate phase plan. -Delegate to `commands/roadmap-discuss.md`: +Delegate to `@commands/roadmap-discuss.md`: | Step | Action | |------|--------| @@ -198,9 +198,13 @@ Delegate to `commands/roadmap-discuss.md`: **Workflow**: -1. Call `TeamCreate({ team_name: "roadmap-dev" })` +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-roadmap-dev` -2. Initialize meta.json with pipeline metadata: +2. Call `TeamCreate({ team_name: "roadmap-dev" })` + +3. Initialize meta.json with pipeline metadata: ```typescript // Use team_msg to write pipeline metadata to .msg/meta.json mcp__ccw-tools__team_msg({ @@ -218,8 +222,8 @@ mcp__ccw-tools__team_msg({ }) ``` -3. Spawn worker roles (see SKILL.md Coordinator Spawn Template) -4. Load `commands/dispatch.md` for task chain creation +4. Spawn worker roles (see SKILL.md Coordinator Spawn Template) +5. Load `@commands/dispatch.md` for task chain creation | Step | Action | |------|--------| @@ -242,7 +246,7 @@ mcp__ccw-tools__team_msg({ - User can use "check" / "resume" to manually advance - Coordinator does one operation per invocation, then STOPS -Delegate to `commands/monitor.md`: +Delegate to `@commands/monitor.md`: | Step | Action | |------|--------| diff --git a/.claude/skills/team-tech-debt/SKILL.md b/.claude/skills/team-tech-debt/SKILL.md index 7de7819f..3429810a 100644 --- a/.claude/skills/team-tech-debt/SKILL.md +++ b/.claude/skills/team-tech-debt/SKILL.md @@ -45,7 +45,7 @@ Skill(skill="team-tech-debt", args="task description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -68,14 +68,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-tech-debt/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: tech-debt requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-tech-debt/roles/coordinator/role.md b/.claude/skills/team-tech-debt/roles/coordinator/role.md index 2023d552..7c062aad 100644 --- a/.claude/skills/team-tech-debt/roles/coordinator/role.md +++ b/.claude/skills/team-tech-debt/roles/coordinator/role.md @@ -44,7 +44,7 @@ When coordinator needs to execute a command (analyze, dispatch, monitor): | Interrupted session | Active/paused session exists in .workflow/.team/TD-* | -> Phase 0 | | New session | None of above | -> Phase 1 | -For callback/check/resume/complete: load `commands/monitor.md`, execute matched handler, STOP. +For callback/check/resume/complete: load `@commands/monitor.md`, execute matched handler, STOP. ## Phase 0: Session Resume Check @@ -70,19 +70,22 @@ TEXT-LEVEL ONLY. No source code reading. 3. Ask for missing parameters (skip if auto mode): - AskUserQuestion: Tech Debt Target (自定义 / 全项目扫描 / 完整治理 / 定向修复) 4. Store: mode, scope, focus, constraints -5. Delegate to commands/analyze.md -> output task-analysis context +5. Delegate to @commands/analyze.md -> output task-analysis context ## Phase 2: Create Team + Initialize Session -1. Generate session ID: `TD--` -2. Create session folder structure (scan/, assessment/, plan/, fixes/, validation/, wisdom/) -3. Initialize .msg/meta.json via team_msg state_update with pipeline metadata -4. TeamCreate(team_name="tech-debt") -5. Do NOT spawn workers yet - deferred to Phase 4 +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-tech-debt` +2. Generate session ID: `TD--` +3. Create session folder structure (scan/, assessment/, plan/, fixes/, validation/, wisdom/) +4. Initialize .msg/meta.json via team_msg state_update with pipeline metadata +5. TeamCreate(team_name="tech-debt") +6. Do NOT spawn workers yet - deferred to Phase 4 ## Phase 3: Create Task Chain -Delegate to commands/dispatch.md. Task chain by mode: +Delegate to @commands/dispatch.md. Task chain by mode: | Mode | Task Chain | |------|------------| @@ -92,7 +95,7 @@ Delegate to commands/dispatch.md. Task chain by mode: ## 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 diff --git a/.claude/skills/team-testing/SKILL.md b/.claude/skills/team-testing/SKILL.md index 640f51ab..ddac38df 100644 --- a/.claude/skills/team-testing/SKILL.md +++ b/.claude/skills/team-testing/SKILL.md @@ -44,7 +44,7 @@ Skill(skill="team-testing", args="task description") Parse `$ARGUMENTS`: - Has `--role ` -> Read `roles//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 @@ -67,14 +67,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-testing/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: testing requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-testing/roles/coordinator/role.md b/.claude/skills/team-testing/roles/coordinator/role.md index 21ec3170..fad548a1 100644 --- a/.claude/skills/team-testing/roles/coordinator/role.md +++ b/.claude/skills/team-testing/roles/coordinator/role.md @@ -42,7 +42,7 @@ When coordinator needs to execute a specific phase: | Interrupted session | Active session in .workflow/.team/TST-* | -> Phase 0 | | New session | None of above | -> Phase 1 | -For callback/check/resume/adapt/complete: load commands/monitor.md, execute handler, STOP. +For callback/check/resume/adapt/complete: load @commands/monitor.md, execute handler, STOP. ## Phase 0: Session Resume Check @@ -69,17 +69,20 @@ TEXT-LEVEL ONLY. No source code reading. | Otherwise | comprehensive | 4. Clarify if ambiguous (AskUserQuestion for scope) -5. Delegate to commands/analyze.md +5. Delegate to @commands/analyze.md 6. Output: task-analysis.json 7. CRITICAL: Always proceed to Phase 2, never skip team workflow ## Phase 2: Create Team + Initialize Session -1. Generate session ID: TST-- -2. Create session folder structure (strategy/, tests/L1-unit/, tests/L2-integration/, tests/L3-e2e/, results/, analysis/, wisdom/) -3. TeamCreate with team name "testing" -4. Read specs/pipelines.md -> select pipeline based on mode -5. Initialize pipeline via team_msg state_update: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-testing` +2. Generate session ID: TST-- +3. Create session folder structure (strategy/, tests/L1-unit/, tests/L2-integration/, tests/L3-e2e/, results/, analysis/, wisdom/) +4. TeamCreate with team name "testing" +5. Read specs/pipelines.md -> select pipeline based on mode +6. Initialize pipeline via team_msg state_update: ``` mcp__ccw-tools__team_msg({ operation: "log", session_id: "", from: "coordinator", @@ -93,11 +96,11 @@ TEXT-LEVEL ONLY. No source code reading. } }) ``` -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 specs/pipelines.md for selected pipeline's task registry 2. Topological sort tasks 3. Create tasks via TaskCreate with blockedBy @@ -105,7 +108,7 @@ Delegate to commands/dispatch.md: ## 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 diff --git a/.claude/skills/team-uidesign/SKILL.md b/.claude/skills/team-uidesign/SKILL.md index 7c5f4b99..768193cc 100644 --- a/.claude/skills/team-uidesign/SKILL.md +++ b/.claude/skills/team-uidesign/SKILL.md @@ -44,7 +44,7 @@ Skill(skill="team-uidesign", args="task description") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -67,14 +67,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-uidesign/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: uidesign requirement: inner_loop: false -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-uidesign/roles/coordinator/role.md b/.claude/skills/team-uidesign/roles/coordinator/role.md index 7dac8352..8c53cb3d 100644 --- a/.claude/skills/team-uidesign/roles/coordinator/role.md +++ b/.claude/skills/team-uidesign/roles/coordinator/role.md @@ -45,7 +45,7 @@ When coordinator needs to execute a command (analyze, dispatch, monitor): | Interrupted session | Active/paused session exists in .workflow/.team/UDS-* | -> Phase 0 | | New session | None of above | -> Phase 1 | -For callback/check/resume/adapt/complete: load `commands/monitor.md`, execute matched handler, STOP. +For callback/check/resume/adapt/complete: load `@commands/monitor.md`, execute matched handler, STOP. ## Phase 0: Session Resume Check @@ -84,13 +84,16 @@ TEXT-LEVEL ONLY. No source code reading. ] }) ``` -4. Delegate to `commands/analyze.md` -> output scope context +4. Delegate to `@commands/analyze.md` -> output scope context 5. Record: pipeline_mode, industry, complexity ## Phase 2: Create Team + Initialize Session -1. Generate session ID: `UDS--` -2. Create session folder structure: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-uidesign` +2. Generate session ID: `UDS--` +3. Create session folder structure: ``` .workflow/.team/UDS--/research/ .workflow/.team/UDS--/design/component-specs/ @@ -101,13 +104,13 @@ TEXT-LEVEL ONLY. No source code reading. .workflow/.team/UDS--/wisdom/ .workflow/.team/UDS--/.msg/ ``` -3. Initialize `.msg/meta.json` via team_msg state_update with pipeline metadata -4. TeamCreate(team_name="uidesign") -5. Do NOT spawn workers yet - deferred to Phase 4 +4. Initialize `.msg/meta.json` via team_msg state_update with pipeline metadata +5. TeamCreate(team_name="uidesign") +6. Do NOT spawn workers yet - deferred to Phase 4 ## Phase 3: Create Task Chain -Delegate to `commands/dispatch.md`. Task chains by mode: +Delegate to `@commands/dispatch.md`. Task chains by mode: | Mode | Task Chain | |------|------------| @@ -117,7 +120,7 @@ Delegate to `commands/dispatch.md`. Task chains by mode: ## 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 diff --git a/.claude/skills/team-ultra-analyze/SKILL.md b/.claude/skills/team-ultra-analyze/SKILL.md index 3f0839b3..8b1884a5 100644 --- a/.claude/skills/team-ultra-analyze/SKILL.md +++ b/.claude/skills/team-ultra-analyze/SKILL.md @@ -52,7 +52,7 @@ Pipeline (Quick mode): Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -75,7 +75,7 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-ultra-analyze/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: ultra-analyze @@ -83,7 +83,7 @@ requirement: agent_name: inner_loop: false -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//role.md) to load Phase 2-4 domain instructions. Execute built-in Phase 1 (task discovery, owner=) -> role Phase 2-4 -> built-in Phase 5 (report).` }) ``` diff --git a/.claude/skills/team-ultra-analyze/roles/coordinator/role.md b/.claude/skills/team-ultra-analyze/roles/coordinator/role.md index 9823c642..9cc6a274 100644 --- a/.claude/skills/team-ultra-analyze/roles/coordinator/role.md +++ b/.claude/skills/team-ultra-analyze/roles/coordinator/role.md @@ -51,7 +51,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 @@ -95,15 +95,18 @@ TEXT-LEVEL ONLY. No source code reading. 1. Parse user task description from $ARGUMENTS 2. Extract explicit settings: `--mode`, scope, focus areas -3. Delegate to `commands/analyze.md` for signal detection and pipeline mode selection +3. Delegate to `@commands/analyze.md` for signal detection and pipeline mode selection 4. **Interactive clarification** (non-auto mode): AskUserQuestion for focus, perspectives, depth. --- ## Phase 2: Create Team + Initialize Session -1. Generate session ID: `UAN-{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` = `/.claude/skills/team-ultra-analyze` +3. Generate session ID: `UAN-{slug}-{YYYY-MM-DD}` +4. Create session folder structure: ``` .workflow/.team/UAN-{slug}-{date}/ @@ -117,8 +120,8 @@ TEXT-LEVEL ONLY. No source code reading. +-- learnings.md, decisions.md, conventions.md, issues.md ``` -3. Write session.json with mode, requirement, timestamp -4. Initialize .msg/meta.json with pipeline metadata via team_msg: +5. Write session.json with mode, requirement, timestamp +6. Initialize .msg/meta.json with pipeline metadata via team_msg: ```typescript mcp__ccw-tools__team_msg({ operation: "log", @@ -134,13 +137,13 @@ mcp__ccw-tools__team_msg({ } }) ``` -5. Call `TeamCreate({ team_name: "ultra-analyze" })` +7. Call `TeamCreate({ team_name: "ultra-analyze" })` --- ## Phase 3: Create Task Chain -Execute `commands/dispatch.md` inline (Command Execution Protocol): +Execute `@commands/dispatch.md` inline (Command Execution Protocol): 1. Read `roles/coordinator/commands/dispatch.md` 2. Follow dispatch Phase 2 -> Phase 3 -> Phase 4 3. Result: all pipeline tasks created with correct blockedBy dependencies @@ -152,7 +155,7 @@ Execute `commands/dispatch.md` inline (Command Execution Protocol): ### Initial Spawn Find first unblocked tasks and spawn their workers. Use SKILL.md Worker Spawn Template with: -- `role_spec: ~ or /.claude/skills/team-ultra-analyze/roles//role.md` +- `role_spec: /roles//role.md` - `team_name: ultra-analyze` - `inner_loop: false` diff --git a/.claude/skills/team-ux-improve/SKILL.md b/.claude/skills/team-ux-improve/SKILL.md index 87d90922..2b1db81e 100644 --- a/.claude/skills/team-ux-improve/SKILL.md +++ b/.claude/skills/team-ux-improve/SKILL.md @@ -53,7 +53,7 @@ Skill(skill="team-ux-improve", args=" [--framework react|vue]") Parse `$ARGUMENTS`: - Has `--role ` → Read `roles//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 @@ -76,14 +76,14 @@ Agent({ run_in_background: true, prompt: `## Role Assignment role: -role_spec: ~ or /.claude/skills/team-ux-improve/roles//role.md +role_spec: /roles//role.md session: session_id: team_name: ux-improve requirement: inner_loop: -Read role_spec file to load Phase 2-4 domain instructions. +Read role_spec file (@/roles//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).` }) ``` diff --git a/.claude/skills/team-ux-improve/roles/coordinator/role.md b/.claude/skills/team-ux-improve/roles/coordinator/role.md index d810a291..eb2f8f3c 100644 --- a/.claude/skills/team-ux-improve/roles/coordinator/role.md +++ b/.claude/skills/team-ux-improve/roles/coordinator/role.md @@ -45,7 +45,7 @@ When coordinator needs to execute a command (analyze, dispatch, monitor): | Interrupted session | Active/paused session exists in .workflow/.team/ux-improve-* | -> Phase 0 | | New session | None of above | -> Phase 1 | -For callback/check/resume/adapt/complete: load `commands/monitor.md`, execute matched handler, STOP. +For callback/check/resume/adapt/complete: load `@commands/monitor.md`, execute matched handler, STOP. ## Phase 0: Session Resume Check @@ -62,13 +62,16 @@ TEXT-LEVEL ONLY. No source code reading. - `` (required) - `--framework react|vue` (optional, auto-detect if omitted) 2. If project path missing -> AskUserQuestion for path -3. Delegate to `commands/analyze.md` -> output scope context +3. Delegate to `@commands/analyze.md` -> output scope context 4. Store: project_path, framework, pipeline_mode, issue_signals ## Phase 2: Create Team + Initialize Session -1. Generate session ID: `ux-improve-` -2. Create session folder structure: +1. Resolve workspace paths (MUST do first): + - `project_root` = result of `Bash({ command: "pwd" })` + - `skill_root` = `/.claude/skills/team-ux-improve` +2. Generate session ID: `ux-improve-` +3. Create session folder structure: ``` .workflow/.team/ux-improve-/ ├── .msg/ @@ -76,20 +79,20 @@ TEXT-LEVEL ONLY. No source code reading. ├── explorations/ └── wisdom/contributions/ ``` -3. **Wisdom Initialization**: Copy `~ or /.claude/skills/team-ux-improve/wisdom/` to `/wisdom/` -4. Initialize `.msg/meta.json` via team_msg state_update with pipeline metadata -5. TeamCreate(team_name="ux-improve") -6. Do NOT spawn workers yet - deferred to Phase 4 +4. **Wisdom Initialization**: Copy `/wisdom/` to `/wisdom/` +5. Initialize `.msg/meta.json` via team_msg state_update with pipeline metadata +6. TeamCreate(team_name="ux-improve") +7. Do NOT spawn workers yet - deferred to Phase 4 ## Phase 3: Create Task Chain -Delegate to `commands/dispatch.md`. Standard pipeline: +Delegate to `@commands/dispatch.md`. Standard pipeline: SCAN-001 -> DIAG-001 -> DESIGN-001 -> IMPL-001 -> TEST-001 ## 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 @@ -110,7 +113,7 @@ Delegate to `commands/monitor.md#handleSpawnNext`: 3. **Wisdom Consolidation**: Check `/wisdom/contributions/` for worker contributions - If contributions exist -> AskUserQuestion to merge to permanent wisdom - - If approved -> copy to `~ or /.claude/skills/team-ux-improve/wisdom/` + - If approved -> copy to `/wisdom/` 4. Calculate: completed_tasks, total_issues_found, issues_fixed, test_pass_rate 5. Output pipeline summary with [coordinator] prefix