Skip to content

QualityGates

AI Software Factory edited this page Aug 21, 2026 · 1 revision

Quality Gates

每个阶段出口一个 Gate;Gate 判定权在 Factory Manager(独立验证),不在执行者

Gate 定义(contracts/gates.yaml)

Gate 检查内容 脚本
requirementCoverage 每条 user-story 有对应任务 Manager 审查
architectureConsistency spec ↔ schema ↔ 代码一致 Manager + 审查子代理
test pytest 全绿(含边界) scripts/gates/test-gate.sh
build py_compile + npm build scripts/gates/build-gate.sh
security secret 扫描 + 依赖审计 scripts/gates/security-gate.sh
review Review 子代理 verdict = approve Review 角色
deployment compose up + 健康检查 + 冒烟 scripts/smoke-test.sh

失败回退闭环(实证)

注入回归缺陷 → test-gate FAIL(6/48) → 状态机 RETRYING
  → Switch Agent 修复 → 全量测试恢复 → test-gate PASS → 状态机回滚/前进
  • 失败证据(pytest 输出、commit hash)随修复任务注入
  • Gate 结果追加到 reports/<stage>-gate.md(可审计)

纪律

  • 子代理不自证成功:置 done 的唯一依据是 Manager 独立运行的验证
  • 所有 Gate 结果留证据文件;build-report.md 有 10 项校验清单逐项打勾

Clone this wiki locally