feat(skill): design-jnpf-execute 加批量 dispatch 模式章节
This commit is contained in:
1 parent
a141e976e0
commit
550824e5b7
1 file changed
+26
@@ -34,6 +34,32 @@ done
|
||||
5 盲点必查: [references/anti-blindspots.md](references/anti-blindspots.md)
|
||||
可抄范例: [examples/dispatch-1form.md](examples/dispatch-1form.md)
|
||||
|
||||
## 批量 dispatch 模式 (主代理)
|
||||
|
||||
主代理拿到 14 form 列表后, **for 循环串行 dispatch** (不并发, 因 dacli 串行跑 form create 不会抢 JNPF 资源):
|
||||
|
||||
```bash
|
||||
SUMMARIES=()
|
||||
for FORM in $(dacli form list --json 2>/dev/null | jq -r '.[].enCode' | grep '^tdss_'); do
|
||||
OUT=$(claude_subagent_explore --prompt-file=.../subagent-prompts.md --inputs="$FORM_SLICES[$FORM]")
|
||||
LINES=$(echo "$OUT" | grep -c 'state=')
|
||||
if [ "$LINES" -ne 1 ]; then
|
||||
echo "PROTOCOL_VIOLATION: $FORM"
|
||||
# 重试 1 次, prompt 加强约束
|
||||
OUT=$(claude_subagent_explore --prompt-file=.../subagent-prompts.md --inputs="$FORM_SLICES[$FORM]" --add-flag="STRICT_1_LINE")
|
||||
LINES=$(echo "$OUT" | grep -c 'state=')
|
||||
[ "$LINES" -ne 1 ] && { echo "STOP: 3 次违约, 请人工"; exit 1; }
|
||||
fi
|
||||
SUMMARIES+=("$OUT")
|
||||
append_plan_row "$FORM" "$OUT" # 写 plan.html "已决事项" 段
|
||||
done
|
||||
print_summary_table "${SUMMARIES[@]}"
|
||||
```
|
||||
|
||||
**串行而非并发**: 避免 14 form 同时 POST /visualdev/Base 触发 JNPF 限流; 14 form 串行总耗时 ~3-5 min, 仍在可接受范围。
|
||||
|
||||
**为什么子代理 Explore/Plan type**: 任务只是"按 7 步跑 dacli 命令", 不需要写代码或调 API, 用 Explore 轻量级足够; Plan type 也可, 但要小心别让子代理开始写 plan。
|
||||
|
||||
## 摘要协议
|
||||
子代理 stdout **严格 1 行**:
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user