fix: spawn_workers skill 名称修正 — airplan → airplan-v2:do
skill 目录名是 airplan-v2,不是 airplan。Claude Code 按目录名注册。
正确的 Skill 调用格式为 Skill("airplan-v2:do")。
同步更新:
- eng_mode.py spawn_workers() 返回值
- commands/eng.md dispatch 操作步骤
- test_t_121_122.py 测试断言
- 设计文档 3.2.11b spawn_workers 伪代码
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -682,8 +682,8 @@ def spawn_workers(project_root: Path, task_ids: list[str]) -> list[dict]:
|
||||
node = graph.nodes.get(tid)
|
||||
task_text = node.task if node else ""
|
||||
instructions.append({
|
||||
"skill": "airplan",
|
||||
"args": f"do --sub enter --task-id {tid} --task-text '{task_text}' --project .",
|
||||
"skill": "airplan-v2:do",
|
||||
"args": f"--sub enter --task-id {tid} --task-text '{task_text}' --project .",
|
||||
"taskId": tid,
|
||||
"taskText": task_text,
|
||||
})
|
||||
|
||||
@@ -59,8 +59,8 @@ dispatch 返回 `{waveId, taskIds, dispatchPath}`。**然后按以下步骤操
|
||||
2. 对 `taskIds` 中的**每个** `tid`,顺序执行:
|
||||
a. 读 `AirPlan/state/airarc/reviews/task-graph.json`,从 `nodes[tid].task` 取任务描述文本
|
||||
b. 调用 `Skill` 工具启动子代理:
|
||||
- `skill`: `"airplan"`
|
||||
- `args`: `"do --sub enter --task-id {tid} --task-text '{task描述}' --project ."`
|
||||
- `skill`: `"airplan-v2:do"`
|
||||
- `args`: `"--sub enter --task-id {tid} --task-text '{task描述}' --project ."`
|
||||
c. 每个 `Skill` 调用自动以 `fork_context=false` 运行,创建隔离的 Do Worker
|
||||
3. 所有 Worker spawn 完成后,进入 monitor 状态
|
||||
4. Worker 完成后,对其 `result.json` 调用 `--sub merge --result <path>`
|
||||
|
||||
@@ -625,8 +625,8 @@ def spawn_workers(project_root: Path, task_ids: list[str]) -> list[dict]:
|
||||
node = graph.nodes.get(tid)
|
||||
task_text = node.task if node else ""
|
||||
instructions.append({
|
||||
"skill": "airplan",
|
||||
"args": f"do --sub enter --task-id {tid} --task-text '{task_text}' --project .",
|
||||
"skill": "airplan-v2:do",
|
||||
"args": f"--sub enter --task-id {tid} --task-text '{task_text}' --project .",
|
||||
"taskId": tid,
|
||||
"taskText": task_text,
|
||||
})
|
||||
|
||||
@@ -29,8 +29,8 @@ def test_spawn_workers():
|
||||
|
||||
instructions = spawn_workers(root, ["G-001", "G-002"])
|
||||
assert len(instructions) == 2
|
||||
assert instructions[0]["skill"] == "airplan"
|
||||
assert "do --sub enter --task-id G-001" in instructions[0]["args"]
|
||||
assert instructions[0]["skill"] == "airplan-v2:do"
|
||||
assert "--sub enter --task-id G-001" in instructions[0]["args"]
|
||||
assert "实现视频解码器" in instructions[0]["args"]
|
||||
assert instructions[1]["taskId"] == "G-002"
|
||||
|
||||
@@ -151,8 +151,8 @@ def test_full_pipeline_e2e():
|
||||
instructions = spawn_workers(root, dispatch["taskIds"])
|
||||
assert len(instructions) >= 2
|
||||
for inst in instructions:
|
||||
assert inst["skill"] == "airplan"
|
||||
assert "do --sub enter --task-id" in inst["args"]
|
||||
assert inst["skill"] == "airplan-v2:do"
|
||||
assert "--sub enter --task-id" in inst["args"]
|
||||
assert inst["taskText"] # 不能为空
|
||||
print(f"4. spawn_workers: {len(instructions)} 个 Worker 指令准备完成")
|
||||
for inst in instructions:
|
||||
|
||||
Reference in New Issue
Block a user