fix: 复用 agent
This commit is contained in:
@@ -50,9 +50,9 @@ python3 docs/ack/kit/scripts/validate_tasks.py docs/ack/tasks.yaml
|
||||
|
||||
---
|
||||
|
||||
## 第 3 步:校验并启动 worker
|
||||
## 第 3 步:复用或启动 worker
|
||||
|
||||
先读 `docs/ack/project.md` 的项目覆盖规则。如果项目提供 `validate_worker_command.py`,校验未通过时不得创建终端。
|
||||
先读 `docs/ack/project.md` 的项目覆盖规则,再按 `orca-adapter.md` §「解析并复用 worker」执行:先列出现有终端和活跃任务,优先复用同 worktree、同角色、配置兼容且空闲的 worker。只有没有可复用项时才创建新终端;如果项目提供 `validate_worker_command.py`,校验未通过时不得创建。
|
||||
|
||||
```bash
|
||||
# Codex 示例(模型与执行模式以项目覆盖层为准)
|
||||
@@ -60,16 +60,16 @@ DEV_CMD='codex --dangerously-bypass-approvals-and-sandbox -m gpt-5.6-terra -c mo
|
||||
TEST_CMD='codex --dangerously-bypass-approvals-and-sandbox -m gpt-5.6-luna -c model_reasoning_effort=low'
|
||||
python3 docs/ack/validate_worker_command.py --role developer --command "$DEV_CMD"
|
||||
python3 docs/ack/validate_worker_command.py --role test --command "$TEST_CMD"
|
||||
orca terminal create --worktree active --command "$DEV_CMD" --title "DEV" --json
|
||||
orca terminal create --worktree active --command "$TEST_CMD" --title "TEST" --json
|
||||
orca terminal create --worktree active --command "$DEV_CMD" --title "ACK-DEV-CODEX-TERRA-1" --json
|
||||
orca terminal create --worktree active --command "$TEST_CMD" --title "ACK-TEST-CODEX-LUNA-1" --json
|
||||
|
||||
# Cursor 示例
|
||||
CURSOR_CMD='cursor-agent --yolo --model auto'
|
||||
python3 docs/ack/validate_worker_command.py --role developer --command "$CURSOR_CMD"
|
||||
orca terminal create --worktree active --command "$CURSOR_CMD" --title "DEV" --json
|
||||
orca terminal create --worktree active --command "$CURSOR_CMD" --title "ACK-DEV-CURSOR-AUTO-1" --json
|
||||
```
|
||||
|
||||
新 worktree 时先 `orca worktree create --name <feature> --base-branch <base>`,再在其中起终端。选型与升级见 `model-routing.md`。终端启动后、dispatch 前必须读取启动信息,确认实际 CLI、模型和 reasoning effort。
|
||||
上面的 `terminal create` 都是“没有空闲兼容 worker”时的兜底,不是每次 kickoff 的固定动作。新 worktree 时先 `orca worktree create --name <feature> --base-branch <base>`,再解析该 worktree 的 worker。选型与升级见 `model-routing.md`。新建终端后、dispatch 前必须读取启动信息,确认实际 CLI、模型和 reasoning effort;派发后把实际 handle 写入对应任务的 `dispatch.worker`。
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user