Why: The example plugin needs a bound intent and a plugin-shipped script so the three P4 paths can be checked against a real plugin. Evidence: TestRepoExamplePluginLoads accepts the plugin, asks 主题是什么?, and keeps the topic slot. Impact: demo.brief starts the five-step workflow. demo.script stays unbound and needs runtime.workflowScripts. Refs: feature/agent-harness-p4 Co-authored-by: Cursor <cursoragent@cursor.com>
58 lines
1.7 KiB
JSON
58 lines
1.7 KiB
JSON
{
|
|
"id": "demo.brief",
|
|
"title": "示例简报",
|
|
"description": "命中 demo.brief 后:选篇幅、起草、落成工件、发一张结果卡,再请用户确认。",
|
|
"intentId": "demo.brief",
|
|
"steps": [
|
|
{
|
|
"id": "length",
|
|
"title": "篇幅",
|
|
"kind": "hitl",
|
|
"hitl": {
|
|
"question": "要多长?",
|
|
"kind": "choice",
|
|
"allowFreeInput": false,
|
|
"choices": [
|
|
{"id": "short", "label": "短", "description": "一段", "impact": "只写一段"},
|
|
{"id": "long", "label": "长", "description": "几段", "impact": "会写得更长"}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "draft",
|
|
"title": "起草",
|
|
"kind": "prompt",
|
|
"agent": "research",
|
|
"prompt": "写一份关于「{{slots.topic}}」的简报,篇幅:{{steps.length.output}}。",
|
|
"critic": {"criteria": "必须提到主题,并且是一段能读完的简报", "maxRetries": 1}
|
|
},
|
|
{
|
|
"id": "save",
|
|
"title": "成稿",
|
|
"kind": "artifact",
|
|
"artifact": "demo-brief.md",
|
|
"prompt": "{{steps.draft.output}}"
|
|
},
|
|
{
|
|
"id": "note",
|
|
"title": "收件",
|
|
"kind": "card",
|
|
"card": {"kind": "result", "title": "简报好了", "tone": "ok"}
|
|
},
|
|
{
|
|
"id": "confirm",
|
|
"title": "确认",
|
|
"kind": "hitl",
|
|
"hitl": {
|
|
"question": "这份简报可以用吗?",
|
|
"kind": "confirm",
|
|
"allowFreeInput": false,
|
|
"choices": [
|
|
{"id": "yes", "label": "可以用", "description": "结束", "impact": "不会再改"},
|
|
{"id": "no", "label": "先不用", "description": "结束", "impact": "不会再改"}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|