Files
.pouch/skills/agent-collaboration-kit/prompt-templates.md
T

138 lines
3.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Prompt Templates
这些模板用于 Coordinator 给 Developer Worker 派发任务。复制时替换尖括号占位符。
## 1. 初始派发模板
```text
你现在接到一个受监督的 Orca 编排任务。请在 <dev_worktree> 开发工作树内完成。
编排上下文:
- taskId: <orca_task_id>
- dispatchId: <orca_dispatch_id>
- coordinator: <coordinator_handle>
任务:
- 修复 <task_id>: <task_title>
请先读取:
- AGENTS.md
- tasks.yaml
- <relevant_spec_or_test_doc>
当前失败证据:
<copy latest Product/Test evidence>
验收标准:
1. <expected behavior 1>
2. <expected behavior 2>
3. <expected behavior 3>
约束:
- 只修改 Developer 可写路径。
- 不要修改 Product/Test 负责的规格和集成测试文件,除非任务明确要求。
- 不要标记 verified。
- 不要提交或推送,除非用户明确要求。
- 最小 diff,避免无关重构。
完成前必须运行:
- <test command 1>
- <test command 2>
- <test command 3>
完成后发送一次 worker_done
orca orchestration send --to <coordinator_handle> --type worker_done --subject "<task_id> fix ready round <n>" --body "<三句话内:修了什么、验证、风险>" --payload '{"taskId":"<orca_task_id>","dispatchId":"<orca_dispatch_id>","filesModified":["<paths>"],"verification":["<commands>"]}' --json
如果阻塞,请发送 escalation 或 ask。
```
## 2. 复测失败再派发模板
```text
第 <n> 轮 QA 未通过,请继续修 <task_id>。
上一轮开发声称:
<worker_done summary>
Product/Test 独立复测结果:
- 运行命令:<commands>
- 失败页面/API<page or endpoint>
- 仍缺失:<missing expected checks>
- 实际观察:<actual evidence>
关键提示:
- 不要只满足静态文案,必须满足交互后的真实状态。
- 如果后端/API 正常而 UI 不更新,请优先排查事件链、状态重置、异步请求、构建产物和服务 worktree。
- 修复后请自己用浏览器或脚本复现 Product/Test 的完整步骤。
验收不变:
<copy acceptance criteria>
完成后发送 worker_donesubject 使用:
"<task_id> fix ready round <n>"
```
## 3. 三轮失败留档模板
```text
<task_id> 已完成 3 轮受监督修复,但仍未通过 Product/Test 复测。
最终状态:
- status: leftover
- reason: failed after 3 supervised developer rounds
保留证据:
- round 1: <summary>
- round 2: <summary>
- round 3: <summary>
- final failing evidence: <latest evidence>
处理策略:
- 不再自动派发同一问题。
- 继续处理下一个 open / failed_retest 任务。
- 该问题留给人工专项检查或后续重新设计。
```
## 4. Developer Worker worker_done 模板
```bash
orca orchestration send \
--to <coordinator_handle> \
--type worker_done \
--subject "<task_id> fix ready round <n>" \
--body "<修了什么。跑了哪些验证。还有什么风险。>" \
--payload '{
"taskId": "<orca_task_id>",
"dispatchId": "<orca_dispatch_id>",
"filesModified": [
"<file_a>",
"<file_b>"
],
"verification": [
"<command_a>: passed",
"<command_b>: passed"
],
"risk": "<remaining risk or none>"
}' \
--json
```
## 5. Coordinator 最终报告模板
```text
本轮闭环完成。
已验证:
- <task_id>: <what passed>
遗留:
- <task_id>: 三轮仍未通过,已记录为 leftover。最后失败证据:<evidence>
验证命令:
- <command>: passed
工作树状态:
- <repo_path>: <git status summary>
- <dev_worktree>: <git status summary>
```