feat(skill): design-jnpf-execute 主 SKILL.md (调度器)
This commit is contained in:
1 parent
65817ae22c
commit
2aa0a04564
2 files changed
+59
No files matched your search
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(AUTOPUSH_MAX_FILES=999999 bash *)"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
name: design-jnpf-execute
|
||||
description: Use when executing stage 4 of ssw-h5dev-flow — dispatches one sub-agent per 1-2 forms to run dacli form create + release + validate, returning a 1-line summary per form. Triggers on: 阶段4执行, 批量建表单, 派子代理建表单, dispatch sub-agent, form 批量创建, ssw-h5dev-flow stage 4.
|
||||
---
|
||||
|
||||
# design-jnpf-execute
|
||||
|
||||
阶段 4 调度器:把 `design-jnpf.html` 里所有 form 拆给 1 form = 1 sub-agent 跑。
|
||||
|
||||
## 何时用
|
||||
- 已完成 `design-jnpf.html` + `docs/{app}/scripts/03_forms.py`
|
||||
- 阶段 2 末 `dacli form lint` 已 PASS
|
||||
- 准备进入阶段 4 批量建 form
|
||||
|
||||
## 核心原则
|
||||
1. **1 form = 1 sub-agent** (Explore/Plan type)
|
||||
2. **子代理只返 1 行摘要** (enCode/id/state/validate BS=...) < 200 字符
|
||||
3. **不返 formData/columnData 完整 JSON** (主代理不吞原始 schema)
|
||||
4. **dispatch 幂等** — 子代理先查后建 (idempotency 字段)
|
||||
5. **5 盲点必查** — use*Permission / label / decimal / f_flow_task_id / __config__
|
||||
|
||||
## 调用模式
|
||||
主代理按 form 切片循环 dispatch:
|
||||
```bash
|
||||
for form in $(dacli form list --json | jq -r '.[].enCode'); do
|
||||
dispatch_subagent(
|
||||
prompt=render_template("$form", "$form_slice"),
|
||||
expect=SUBAGENT_SUMMARY_PROTOCOL,
|
||||
)
|
||||
done
|
||||
```
|
||||
|
||||
详细 prompt 模板: [references/subagent-prompts.md](references/subagent-prompts.md)
|
||||
5 盲点必查: [references/anti-blindspots.md](references/anti-blindspots.md)
|
||||
可抄范例: [examples/dispatch-1form.md](examples/dispatch-1form.md)
|
||||
|
||||
## 摘要协议
|
||||
子代理 stdout **严格 1 行**:
|
||||
```
|
||||
{enCode} {id} state={0|1} validate={PASS|FAIL} BS={BS-31}/{BS-V2} idempotency={reused|created} keyDecision={一句话}
|
||||
```
|
||||
|
||||
主代理收 14 行后写 `plan.html` "已决事项"段, 不写完整 schema。
|
||||
|
||||
## 错误处理
|
||||
- 子代理 FAIL → 暂停 dispatch, 决策: 改 design / 换 prompt / 人工
|
||||
- 子代理协议违约 (吐 JSON) → 重 dispatch 1 次, prompt 加强约束
|
||||
- 3 次违约 → 暂停, 报人
|
||||
|
||||
## 范围
|
||||
- **本技能只管阶段 4 调度**, 不管 lint (那是 `dacli form lint`) 也不管 e2e (那是 `ssw-e2e-test`)
|
||||
- **不写** form 字段定义 (那是 `03_forms.py` 的事)
|
||||
Reference in new issue
Block a user