Files
Agent-System-Dev/plugins/example/workflows/demo-brief.json
T
weichenandCursor 4836fee08f Require a marker so the example critic can reject once
Why: The live check needs the first draft to miss a line the critic can name, then the retry can add it.
Evidence: The prompt does not mention the marker. maxRetries stays 1.
Impact: demo.brief drafts are rejected until they contain 核对标记:P4.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-01 16:25:04 +00:00

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": "必须包含单独一行「核对标记:P4」。没有这一行就不通过,nextAction 请要求补上这一行。", "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": "不会再改"}
]
}
}
]
}