You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/cli/compose.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -228,7 +228,7 @@ ${autoRun ? ' Include specific information from the user\'s description' :
228
228
- **Detailed tasks**: Task descriptions should be specific — tell the role what to do and what format to output
229
229
${inputsDesignPrinciple}
230
230
- **Use human_input when the user needs to clarify something — don't have a role "ask" in its task**: if the task genuinely can't proceed without more info from the user (personal preference, choosing between options, a specific detail not in inputs — classic case: registration/enrollment-type requests where you must ask the user's specifics partway through), insert a \`type: human_input\` step to ask them, and feed the answer downstream as its output variable. Writing "ask the user X" inside a regular role step's task does NOT work — the engine won't actually pause, the model will just make up an answer
231
-
- **Acceptance criteria**: give key steps — at minimum the FINAL deliverable step — an \`acceptance:\` field with 2-5 verifiable conditions the output must satisfy. Concrete and checkable ("contains X/Y/Z sections", "every recommendation states its risk"), never vague ("high quality"). It is injected into the step's prompt and used as the review yardstick
231
+
- **Acceptance criteria**: give key steps — at minimum the FINAL deliverable step — an \`acceptance:\` field with 2-5 verifiable conditions the output must satisfy. Concrete and checkable ("contains X/Y/Z sections", "every recommendation states its risk"), never vague ("high quality"). It is injected into the step's prompt AND actually enforced: after the step runs, the engine checks the output against each item, and any unmet item triggers one automatic rework round — so every item must be objectively machine-checkable from the output text alone
232
232
- **High-risk tasks need an approval gate**: for finance/investment, medical, legal, or anything spending real money / hard to reverse — insert a \`type: approval\` step before the final recommendation/execution step, so the user signs off before proceeding
233
233
- **Final deliverable**: The last step must output the final deliverable the user wants (e.g., complete article, complete report), not review comments or suggestions. If there's a review step, it should output the revised final version, not a "list of suggestions"
234
234
- **Clean final output (IMPORTANT)**: The LAST step's \`task\` MUST end with an explicit instruction to output ONLY the deliverable itself — no preamble/greeting, no "what I changed"/change-log, no formatting notes, no questions to the user, no suggestions to run \`ao\`/other commands, no "shall I continue?" closers. Append a line like: "⚠️ Output only the final deliverable itself — no preamble, no change-log, no meta-commentary, no questions, no tool/command suggestions." (If you genuinely need to ask the user something, use the human_input step above instead — not in the final step)
en: "- `id`: unique step id, referenced by `depends_on`\n- `role`: an expert, as `category/role-name`\n- `task`: the task, with `{{var}}` interpolation\n- `output`: save this step's output as a variable for downstream\n- `depends_on`: array of step deps, defines the DAG\n- `condition`: conditional execution (see Loops & conditions)\n- `loop`: loop block (see Loops & conditions)",
en: "- `id`: unique step id, referenced by `depends_on`\n- `role`: an expert, as `category/role-name`\n- `task`: the task, with `{{var}}` interpolation\n- `output`: save this step's output as a variable for downstream\n- `depends_on`: array of step deps, defines the DAG\n- `condition`: conditional execution (see Loops & conditions)\n- `loop`: loop block (see Loops & conditions)\n- `acceptance`: acceptance criteria, auto-verified after the step runs (see Acceptance & auto-verify)\n- `verify: false`: opt this step out of auto-verify",
en: "Give key steps (at minimum the final deliverable step) an `acceptance:` field: 2-5 **checkable** conditions the output must satisfy — concrete ('contains sections X/Y/Z', 'every recommendation states its risk'), never vague ('high quality'). It is injected at the step's prompt tail and anchors the blind judge in `--compare`.",
321
+
},
322
+
code: ` - id: write_report
323
+
role: "product/product-analyst"
324
+
task: "基于 {{research}} 写投资分析报告"
325
+
acceptance: |
326
+
1. 包含「机会 / 风险 / 建议」三节
327
+
2. 每条建议都标注风险等级
328
+
3. 结尾给出明确的行动清单
329
+
output: report`,
330
+
},
331
+
{
332
+
heading: {zh: "自动核验 + 一轮自动返工(默认开)",en: "Auto-verify + one rework round (on by default)"},
en: "After a step with `acceptance` runs, the engine **checks each item** with the same provider; on failure it hands the previous output + unmet items back to the same expert for one targeted rework round, then re-checks. Acceptance goes from 'a note injected into the prompt' to 'someone actually checks after the run'.\n\nA failed check is a **quality signal**, not an execution error: the step never fails because of it — worst case a ⚠️-flagged reworked version flows downstream as usual; if the verifier itself errors, verification is skipped without blocking the pipeline. Verification status shows in the CLI result line, `summary.md`, `metadata.json`, and the Studio run/history panels.",
en: "Priority high to low: CLI `--verify` / `--no-verify` > top-level `verify:` in YAML > per-step `verify: false`. On by default and only affects steps that declare `acceptance`; verify/rework usage counts toward that step's token cost (a single check is a small max_tokens-500 call).",
343
+
},
344
+
code: "ao run workflow.yaml --no-verify # 本次运行关闭自动核验",
0 commit comments