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:
@@ -44,7 +44,7 @@ Skill(skill="team-arch-opt", 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
|
||||
|
||||
@@ -66,14 +66,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-arch-opt/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: arch-opt
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<slug>-<date>`
|
||||
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` = `<project_root>/.claude/skills/team-arch-opt`
|
||||
2. Generate session ID: `TAO-<slug>-<date>`
|
||||
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: "<id>", from: "coordinator",
|
||||
@@ -93,11 +96,11 @@ TEXT-LEVEL ONLY. No source code reading.
|
||||
data: { pipeline_mode: "<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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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` = `<project_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>-<date>` (slug from first 3 meaningful words of task)
|
||||
3. **Generate session ID**: `TC-<slug>-<date>` (slug from first 3 meaningful words of task)
|
||||
|
||||
3. **Create session folder structure**:
|
||||
4. **Create session folder structure**:
|
||||
```
|
||||
.workflow/.team/<session-id>/
|
||||
+-- 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 `<session>/role-specs/<role-name>.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
|
||||
// 注意: 此处为动态角色,执行时需将 <placeholders> 替换为 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
|
||||
|
||||
@@ -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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<slug>-<date>
|
||||
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-frontend-debug`
|
||||
2. Generate session ID: TFD-<slug>-<date>
|
||||
3. Create session folder structure:
|
||||
```
|
||||
.workflow/.team/TFD-<slug>-<date>/
|
||||
├── 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
|
||||
|
||||
@@ -44,7 +44,7 @@ Skill(skill="team-frontend", 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
|
||||
|
||||
@@ -66,14 +66,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-frontend/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: frontend
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<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-frontend`
|
||||
3. Generate session ID: `FE-<slug>-<YYYY-MM-DD>`
|
||||
4. Create session folder structure:
|
||||
```
|
||||
mkdir -p .workflow/.team/<session-id>/{.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: "<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
|
||||
|
||||
@@ -44,7 +44,7 @@ Skill(skill="team-issue", args="<issue-ids> [--mode=<mode>]")
|
||||
|
||||
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
|
||||
|
||||
@@ -67,14 +67,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-issue/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: issue
|
||||
requirement: <task-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: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-issue/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: issue
|
||||
@@ -97,7 +97,7 @@ requirement: <task-description>
|
||||
agent_name: <role>-<N>
|
||||
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, owner=<role>-<N>) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<issue-slug>-<date>`
|
||||
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-issue`
|
||||
2. Generate session ID: `TISL-<issue-slug>-<date>`
|
||||
3. Create session folder structure:
|
||||
```
|
||||
Bash("mkdir -p .workflow/.team/TISL-<slug>-<date>/{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: "<id>", from: "coordinator",
|
||||
@@ -110,18 +113,18 @@ TEXT-LEVEL ONLY. No source code reading.
|
||||
data: { pipeline_mode: "<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
|
||||
|
||||
@@ -44,7 +44,7 @@ Skill(skill="team-iterdev", 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
|
||||
|
||||
@@ -66,14 +66,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-iterdev/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: iterdev
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -49,7 +49,7 @@ Skill(skill="team-lifecycle-v4", 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
|
||||
|
||||
@@ -71,14 +71,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-lifecycle-v4/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).`
|
||||
})
|
||||
```
|
||||
@@ -98,13 +98,13 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: supervisor
|
||||
role_spec: ~ or <project>/.claude/skills/team-lifecycle-v4/roles/supervisor/role.md
|
||||
role_spec: <skill_root>/roles/supervisor/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: <team-name>
|
||||
requirement: <task-description>
|
||||
|
||||
Read role_spec file to load checkpoint definitions.
|
||||
Read role_spec file (@<skill_root>/roles/supervisor/role.md) to load checkpoint definitions.
|
||||
Init: load baseline context, report ready, go idle.
|
||||
Wake cycle: coordinator sends checkpoint requests via SendMessage.`
|
||||
})
|
||||
|
||||
@@ -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-<slug>-<date>
|
||||
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` = `<project_root>/.claude/skills/team-lifecycle-v4`
|
||||
2. Generate session ID: TLV4-<slug>-<date>
|
||||
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: "<id>", from: "coordinator",
|
||||
@@ -84,15 +87,15 @@ TEXT-LEVEL ONLY. No source code reading.
|
||||
data: { pipeline_mode: "<mode>", pipeline_stages: [...], team_name: "<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
|
||||
|
||||
@@ -55,7 +55,7 @@ Pipeline (Independent mode):
|
||||
|
||||
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
|
||||
|
||||
@@ -78,14 +78,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-perf-opt/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: perf-opt
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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` = `<project_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 <project>/.claude/skills/team-perf-opt/roles/<role>/role.md`
|
||||
- `role_spec: <skill_root>/roles/<role>/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`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -45,7 +45,7 @@ Skill(skill="team-quality-assurance", 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
|
||||
|
||||
@@ -68,14 +68,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-quality-assurance/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: quality-assurance
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<slug>-<date>
|
||||
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` = `<project_root>/.claude/skills/team-quality-assurance`
|
||||
2. Generate session ID: QA-<slug>-<date>
|
||||
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: "<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
|
||||
|
||||
@@ -43,7 +43,7 @@ Skill(skill="team-review", 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
|
||||
|
||||
@@ -66,14 +66,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-review/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: review
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<slug>-<date>
|
||||
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` = `<project_root>/.claude/skills/team-review`
|
||||
2. Generate session ID: RV-<slug>-<date>
|
||||
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: "<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
|
||||
|
||||
@@ -49,7 +49,7 @@ Multi-phase:
|
||||
|
||||
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
|
||||
|
||||
@@ -72,14 +72,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-roadmap-dev/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: roadmap-dev
|
||||
requirement: <task-description>
|
||||
inner_loop: true
|
||||
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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 <session-id> --from coordinator --type <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 <session-id> --from coordinator --type <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` = `<project_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 |
|
||||
|------|--------|
|
||||
|
||||
@@ -45,7 +45,7 @@ Skill(skill="team-tech-debt", 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
|
||||
|
||||
@@ -68,14 +68,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-tech-debt/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: tech-debt
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<slug>-<YYYY-MM-DD>`
|
||||
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` = `<project_root>/.claude/skills/team-tech-debt`
|
||||
2. Generate session ID: `TD-<slug>-<YYYY-MM-DD>`
|
||||
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
|
||||
|
||||
@@ -44,7 +44,7 @@ Skill(skill="team-testing", 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
|
||||
|
||||
@@ -67,14 +67,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-testing/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: testing
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<slug>-<date>
|
||||
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` = `<project_root>/.claude/skills/team-testing`
|
||||
2. Generate session ID: TST-<slug>-<date>
|
||||
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: "<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
|
||||
|
||||
@@ -44,7 +44,7 @@ Skill(skill="team-uidesign", 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
|
||||
|
||||
@@ -67,14 +67,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-uidesign/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: uidesign
|
||||
requirement: <task-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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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-<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-uidesign`
|
||||
2. Generate session ID: `UDS-<slug>-<YYYY-MM-DD>`
|
||||
3. Create session folder structure:
|
||||
```
|
||||
.workflow/.team/UDS-<slug>-<date>/research/
|
||||
.workflow/.team/UDS-<slug>-<date>/design/component-specs/
|
||||
@@ -101,13 +104,13 @@ TEXT-LEVEL ONLY. No source code reading.
|
||||
.workflow/.team/UDS-<slug>-<date>/wisdom/
|
||||
.workflow/.team/UDS-<slug>-<date>/.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
|
||||
|
||||
@@ -52,7 +52,7 @@ Pipeline (Quick mode):
|
||||
|
||||
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
|
||||
|
||||
@@ -75,7 +75,7 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-ultra-analyze/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: ultra-analyze
|
||||
@@ -83,7 +83,7 @@ requirement: <topic-description>
|
||||
agent_name: <agent-name>
|
||||
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, owner=<agent-name>) -> role Phase 2-4 -> built-in Phase 5 (report).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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` = `<project_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 <project>/.claude/skills/team-ultra-analyze/roles/<role>/role.md`
|
||||
- `role_spec: <skill_root>/roles/<role>/role.md`
|
||||
- `team_name: ultra-analyze`
|
||||
- `inner_loop: false`
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ Skill(skill="team-ux-improve", args="<project-path> [--framework react|vue]")
|
||||
|
||||
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
|
||||
|
||||
@@ -76,14 +76,14 @@ Agent({
|
||||
run_in_background: true,
|
||||
prompt: `## Role Assignment
|
||||
role: <role>
|
||||
role_spec: ~ or <project>/.claude/skills/team-ux-improve/roles/<role>/role.md
|
||||
role_spec: <skill_root>/roles/<role>/role.md
|
||||
session: <session-folder>
|
||||
session_id: <session-id>
|
||||
team_name: ux-improve
|
||||
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).`
|
||||
})
|
||||
```
|
||||
|
||||
@@ -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.
|
||||
- `<project-path>` (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-<timestamp>`
|
||||
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-ux-improve`
|
||||
2. Generate session ID: `ux-improve-<timestamp>`
|
||||
3. Create session folder structure:
|
||||
```
|
||||
.workflow/.team/ux-improve-<timestamp>/
|
||||
├── .msg/
|
||||
@@ -76,20 +79,20 @@ TEXT-LEVEL ONLY. No source code reading.
|
||||
├── explorations/
|
||||
└── wisdom/contributions/
|
||||
```
|
||||
3. **Wisdom Initialization**: Copy `~ or <project>/.claude/skills/team-ux-improve/wisdom/` to `<session>/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 `<skill_root>/wisdom/` to `<session>/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 `<session>/wisdom/contributions/` for worker contributions
|
||||
- If contributions exist -> AskUserQuestion to merge to permanent wisdom
|
||||
- If approved -> copy to `~ or <project>/.claude/skills/team-ux-improve/wisdom/`
|
||||
- If approved -> copy to `<skill_root>/wisdom/`
|
||||
|
||||
4. Calculate: completed_tasks, total_issues_found, issues_fixed, test_pass_rate
|
||||
5. Output pipeline summary with [coordinator] prefix
|
||||
|
||||
Reference in New Issue
Block a user