Skip to content

v0.3.0 规范

Agent QC v0.3.0 是面向 Agent 项目的通用草案标准,用于证据驱动的质量控制。

Agent 项目可以是 runtime CLI、SDK、tool server、MCP/ACP gateway、multi-channel bot、GUI/TUI/desktop client、skill/plugin ecosystem、background scheduler、distribution package 或 evaluation suite。Agent QC 不假设一种产品形态;它先分类项目 profile,再选择匹配风险的 gate。

范围

Agent QC 标准化以下内容:

  1. Agent 系统的 project profile。
  2. qc_planqc_caseqc_gateqc_runqc_evidenceqc_verdictqc_report 对象。
  3. 从静态检查到 live provider 和 release smoke 的 gate taxonomy。
  4. 有证据支撑的 pass/fail 语义。
  5. 面向重复独立 case 的 qcloop-compatible batch QC。
  6. 代表性 runtime、TUI、gateway、scheduler、UI、release 和 eval 项目的案例映射。

Agent QC 不标准化单一编程语言、CI vendor、测试框架、浏览器驱动、模型协议、存储后端或 UI 皮肤。

Project profiles

qc_plan.project_profiles 数组声明项目适用的形态。

Profile典型风险示例门禁
agent-runtime-clitool execution、sandbox、permission、stream、resume、subprocess cleanupunit、protocol、fake model server、CLI e2e、sandbox tests
agent-sdk-apipublic API compatibility、generated contract、fake server behavior、async cancellationsignature tests、generated contract diff、fake server integration
agent-tool-mcp-gatewaytool declaration drift、stdio/http transport、recovery、resource access、audit refsprotocol conformance、mock server、transport recovery、contract tests
multi-channel-agent-gatewaychannel adapter、auth、secret、webhook verification、provider drift、media routingchannel contract tests、secret isolation、live opt-in、docker smoke
agent-ui-tui-desktoprendering、terminal/browser state、user controls、screenshot、accessibility、bridge readinessUI unit、snapshot、Playwright、terminal fixture、GUI smoke
agent-skills-pluginsmanifest shape、loader、package boundary、trust、marketplace/registry driftschema、discovery、package export、fixture install、security scan
background-agent-schedulercron、queue、lease、retry、concurrency、idempotency、stuck-loop recoverydeterministic scheduler tests、race tests、stress tests、checkpoint/reclaim
agent-distribution-releaseinstall、package contents、Docker、cross-platform、lockfile、supply-chaininstall smoke、package dry run、Docker smoke、OS matrix、lock checks
agent-evals-qualitymodel behavior regression、prompt drift、rubric quality、answer groundingeval suite、baseline comparison、LLM/human judge、qcloop batch

一个项目可以组合多个 profile。例如 OpenClaw 同时包含 channel gateway、tool gateway、distribution、live provider 和 plugin profile。

Interaction surfaces

project profile 说明项目拥有什么风险;interaction surface 说明用户或操作者在哪里观察 Agent。JSON schema 中 qc_case.surface 是可选字段,但用户可见 gate 应该填写。

Surface适用对象额外证据要求
cli-streamcommand output、JSONL/NDJSON、stdout/stderrexit status、stdout/stderr transcript、structured event sample
tuiterminal UI、Ink、ratatui、cursesterminal snapshot、viewport size、key sequence、runtime transcript
webuibrowser dashboard、extension UI、admin/QA consolescreenshot/trace、console log、route state、browser-only assertion
desktop-guiTauri、Electron、native shellshell start evidence、bridge health、workspace/session readiness、OS note
browser-automationCDP、Playwright、browser-use、remote browser providerscreenshot、DOM/a11y snapshot、console/network log、cleanup evidence
channel-uimobile、QR、chat apps、webhook surfaceschannel transcript、media fixture、auth/webhook replay、device/emulator log
eval-uiQA dashboard 与 semantic evaluation reportrubric、judge output、baseline delta、reviewer note

ui-interaction gate 应该明确这些 surface 之一。缺少 surface-specific evidence 的通过结论不完整。Surface proof 应连接 entrypoint、user action、visible frame、runtime backing 与 cleanup evidence。

核心对象

Object用途
qc_plan面向一次 change、release、investigation 或 regression sweep 的测试计划。
qc_case行为级条目,包含 steps、expected result、required gates 和 evidence。
qc_gate验证边界,例如 static、unit、contract、integration、e2e、live、stress、release 或 review。
qc_run一次执行尝试,包含 command、executor、environment、output refs、duration 和 result。
qc_evidence指向 logs、reports、traces、screenshots、fixtures、qcloop attempts、CI runs 或 review notes 的引用。
qc_verdict基于证据的判断:passed、failed、blocked、exhausted、waived 或 needs-review。
qc_report汇总结果、剩余风险、waiver 和下一步动作。

Gate families

Family目的证据示例
staticformat、lint、type、dependency 和 policy hygienecommand logs、SARIF、lockfile check output
unitdeterministic local behaviortest report、coverage、fixture output
property-fuzzinvariant 与 generated inputseed、corpus、failing case artifact
contract-protocolschema、API、generated client、command/tool surfacecontract report、schema diff、mock transcript
fake-integration面向 fake server 或 local adapter 的集成fake server log、request/response transcript
runtime-e2e不依赖外部 provider 的真实 CLI/runtime/task flowCLI transcript、process cleanup evidence、state snapshot
ui-interactionGUI/TUI/browser/terminal behaviorscreenshot、trace、video、accessibility report
live-provideropt-in real provider 或 network pathredacted transcript、credential-scope note、cost/budget
stress-concurrencyrace、lease、retry、long-running loopstress report、worker timeline、seed、benchmark
distribution-releaseinstall、package、Docker、cross-platform release readinesstarball manifest、Docker smoke、OS matrix、release check
semantic-evalmodel output quality、grounding、policy、user intenteval result、rubric、judge output、baseline delta
reviewhuman 或 LLM reviewreviewer decision、rubric、evidence refs

状态值

qc_case.statusqc_gate.statusqc_report.status 使用:

  • planned
  • running
  • passed
  • failed
  • blocked
  • exhausted
  • waived
  • skipped
  • needs-review

如果项目存在 waiver 流程,waived gate 必须包含 waiver.reasonwaiver.approverwaiver.expires

证据规则

passed verdict 必须包含证据。failed verdict 必须包含最小可行动失败。blocked verdict 必须指出缺失的环境事实。exhausted verdict 必须保留 attempts 和 verifier feedback。

self-report 不是证据。“the agent checked it” 只有在链接到 command output、test report、transcript、trace、screenshot 或 review record 时才有效。

qcloop 映射

qc_case 可以成为 qcloop item_value。qcloop attempt 映射到 qc_run;qcloop qc_round 映射到 qc_verdict;qcloop exhausted 映射到 Agent QC exhausted,不是普通失败。

当 case 可重复、独立且适合 verifier 判定时使用 qcloop。不要用 qcloop 替代必需的项目门禁,也不要用它隐藏 live-provider 风险。

Draft standard for evidence-driven quality control of Agent projects.