51 lines
2.0 KiB
Markdown
51 lines
2.0 KiB
Markdown
# Testing Guide for Agent Team Collaboration Framework
|
|
|
|
## What to Observe
|
|
|
|
### 1. Parallel Execution
|
|
- **Expected**: When master assigns tasks to multiple members, they should appear in the UI **simultaneously** (not sequentially)
|
|
- **How to verify**: Watch the frontend - you should see streaming output from both 合同律师 and 合规专员 at the same time
|
|
|
|
### 2. Shared Blackboard
|
|
- **Expected**: Each member's draft output is added to the board
|
|
- **How to verify**: Check the board context in the master's feedback message
|
|
|
|
### 3. Challenge Round
|
|
- **Expected**: After parallel execution, members with `can_challenge: true` review the board
|
|
- **How to verify**:
|
|
- Look for events with `role: "challenge"` in the event stream
|
|
- Frontend should show challenge phase output
|
|
- If a member outputs `CHALLENGE:...`, it appears in the board
|
|
|
|
### 4. Master Integration
|
|
- **Expected**: Master receives complete board (drafts + challenges) before making final decision
|
|
- **How to verify**: Master's feedback message includes `<team_board>` section with all entries
|
|
|
|
## Test Scenario: Employee Termination
|
|
|
|
Send a question like:
|
|
```
|
|
我们需要辞退一名员工,请帮我们制定一个合法的辞退方案。
|
|
```
|
|
|
|
Expected flow:
|
|
1. Master analyzes and assigns tasks to both 合同律师 and 合规专员
|
|
2. Both members work in parallel (visible in UI)
|
|
3. Challenge round begins - members review each other's work
|
|
4. If 合规专员 finds compliance issues in 合同律师's draft, outputs `CHALLENGE:...`
|
|
5. Master sees complete board and makes final decision
|
|
|
|
## Key Events to Monitor
|
|
|
|
- `EvtAgentMessage` with `role: "member"` - parallel execution
|
|
- `EvtAgentMessage` with `role: "challenge"` - challenge round
|
|
- `EvtRoomStatus` - status transitions (thinking → working → thinking → pending)
|
|
- Board context in master's feedback messages
|
|
|
|
## Code Locations
|
|
|
|
- Parallel execution: `room.go:runMembersParallel()`
|
|
- Challenge round: `room.go:runChallengeRound()`
|
|
- Main flow: `room.go:HandleUserMessage()` (lines 281-362)
|
|
- SharedBoard: `room.go:SharedBoard` type (lines 90-114)
|