部署一个包含4个代理的开发团队助手系统。在以下情况下使用此技能:1. 用户想要自动化代码审查、测试和PR文档。2. 用户正在配置...
Deploy 4 agents that automate the PR workflow: review, test, docs, and coordination.
RoleHostnameSkillsPurposereviewer<prefix>-reviewerpilot-github-bridge, pilot-review, pilot-chatReviews PR diffs for qualitytest-runner<prefix>-test-runnerpilot-github-bridge, pilot-task-router, pilot-audit-logRuns test suitesdoc-writer<prefix>-doc-writerpilot-github-bridge, pilot-share, pilot-task-routerGenerates docscoordinator<prefix>-coordinatorpilot-github-bridge, pilot-task-chain, pilot-slack-bridge, pilot-broadcastOrchestrates and summarizes
Step 1: Ask the user which role and prefix.
Step 2: Install skills:
bash
# reviewer:
clawhub install pilot-github-bridge pilot-review pilot-chat
# test-runner:
clawhub install pilot-github-bridge pilot-task-router pilot-audit-log
# doc-writer:
clawhub install pilot-github-bridge pilot-share pilot-task-router
# coordinator:
clawhub install pilot-github-bridge pilot-task-chain pilot-slack-bridge pilot-broadcast
Step 3: Set hostname and write manifest to ~/.pilot/setups/dev-team-assistants.json.
Step 4: Handshake with coordinator (all agents handshake the coordinator).
json
{
"setup": "dev-team-assistants", "role": "coordinator", "role_name": "PR Coordinator",
"hostname": "<prefix>-coordinator",
"skills": {
"pilot-github-bridge": "Watch GitHub for new PRs, post unified summary comments.",
"pilot-task-chain": "Fan out review/test/doc tasks and collect results.",
"pilot-slack-bridge": "Post PR status updates to Slack.",
"pilot-broadcast": "Broadcast new PR notifications to all assistants."
},
"data_flows": [
{ "direction": "send", "peer": "<prefix>-reviewer", "port": 1002, "topic": "pr-review", "description": "PR details for review" },
{ "direction": "send", "peer": "<prefix>-test-runner", "port": 1002, "topic": "pr-test", "description": "PR details for testing" },
{ "direction": "send", "peer": "<prefix>-doc-writer", "port": 1002, "topic": "pr-docs", "description": "PR details for docs" },
{ "direction": "receive", "peer": "<prefix>-reviewer", "port": 1002, "topic": "review-result", "description": "Review findings" },
{ "direction": "receive", "peer": "<prefix>-test-runner", "port": 1002, "topic": "test-result", "description": "Test results" },
{ "direction": "receive", "peer": "<prefix>-doc-writer", "port": 1001, "topic": "docs-result", "description": "Generated docs" }
],
"handshakes_needed": ["<prefix>-reviewer", "<prefix>-test-runner", "<prefix>-doc-writer"]
}
json
{
"setup": "dev-team-assistants", "role": "reviewer", "role_name": "Code Reviewer",
"hostname": "<prefix>-reviewer",
"skills": {
"pilot-github-bridge": "Fetch PR diffs from GitHub.",
"pilot-review": "Analyze code for quality, security, and style issues.",
"pilot-chat": "Discuss review findings with coordinator."
},
"data_flows": [
{ "direction": "receive", "peer": "<prefix>-coordinator", "port": 1002, "topic": "pr-review", "description": "PR details" },
{ "direction": "send", "peer": "<prefix>-coordinator", "port": 1002, "topic": "review-result", "description": "Review findings" }
],
"handshakes_needed": ["<prefix>-coordinator"]
}
coordinator → reviewer/test-runner/doc-writer : PR details (port 1002)reviewer/test-runner → coordinator : results (port 1002)doc-writer → coordinator : generated docs (port 1001)bash
# On coordinator — fan out:
pilotctl --json task submit <prefix>-reviewer --task '{"pr":1234,"repo":"acme/api","action":"review"}'
pilotctl --json task submit <prefix>-test-runner --task '{"pr":1234,"action":"test","branch":"feature/auth"}'
# On reviewer — return:
pilotctl --json publish <prefix>-coordinator review-result '{"pr":1234,"issues":2,"approval":"changes_requested"}'
# On test-runner — return:
pilotctl --json publish <prefix>-coordinator test-result '{"pr":1234,"passed":89,"failed":0,"coverage":82}'
Requires pilot-protocol skill, pilotctl binary, clawhub binary, and a running daemon.