SkillSpace/archives/dev-pipeline-universal/references/quality-gates.md
sinohqb 8dafa5bc52 Add archives, import dev-pipeline skill, and complete Hermes Agent spec
- Add archives/ directory for immutable external skill snapshots
  - Strict immutability rule: only README/CHANGELOG can be modified
  - First import: dev-pipeline-universal v1.0.0 (Hermes Agent)
- Import dev-pipeline-universal into hermes-agent/skills/ with CHANGELOG
- Update hermes-agent/publish/registry.json with imported skill
- Rewrite meta-skills/create-hermes-agent-skill/ with full spec:
  - SKILL.md frontmatter fields and validator constraints
  - Recommended body structure (Overview → When to Use → Pitfalls → Verification)
  - Progressive disclosure (3-level loading)
  - 8 writing quality principles
  - Official reference skills from GitHub repo
  - Tool chain docs (skill_manage, /learn, skill_view)
- Update README.md with archives/ in directory structure
2026-07-02 00:46:13 +08:00

110 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 研发流水线 — 质量门禁规范
# 每个阶段完成后,由马总管自动执行质量门禁检查
---
## 质量门禁总览
```
需求 ──→ [QG1] ──→ 设计 ──→ [QG2] ──→ 编码 ──→ [QG3] ──→ 测试 ──→ [QG4] ──→ 部署
```
---
## QG1: 需求分析门禁
**执行时机:** ①需求分析完成后,进入②设计之前
| 检查项 | 通过标准 | 执行方式 |
|--------|---------|---------|
| 产物格式完整 | YAML所有必填字段非空 | 自动 |
| 验收标准可测试 | 每条AC标记testable=true | 自动 |
| 范围边界清晰 | in_scope和out_of_scope均非空 | 自动 |
| 用户确认 | 乔确认需求理解正确 | 人工 |
**不通过处理:** 补充缺失信息,重新跟乔确认
---
## QG2: 技术方案门禁
**执行时机:** ②设计完成后,进入③编码之前
| 检查项 | 通过标准 | 执行方式 |
|--------|---------|---------|
| 产物格式完整 | YAML所有必填字段非空 | 自动 |
| 文件变更清单 | file_changes列表非空 | 自动 |
| API设计与需求对齐 | 每个AC至少对应一个API或功能点 | AI审查 |
| 无遗留阻断问题 | open_issues中无阻断级问题 | 自动 |
| 重大决策确认 | 涉及架构变更时需乔确认 | 条件人工 |
**不通过处理:** 反馈问题给架构师Agent重新设计最多2轮
---
## QG3: 编码实现门禁
**执行时机:** ③编码完成后,进入④审查之前
| 检查项 | 通过标准 | 执行方式 |
|--------|---------|---------|
| 产物格式完整 | YAML所有必填字段非空 | 自动 |
| 代码可编译/无语法错误 | self_check.compiles=true | 自动 |
| lint通过 | self_check.lint_passes=true | 自动 |
| 文件变更与设计一致 | 实际变更文件 ⊆ 设计中的file_changes | AI审查 |
| 无常驻进程残留 | 无未关闭的后台服务 | 自动 |
**不通过处理:** 反馈给程序员Agent修复最多3轮
---
## QG4: 测试验证门禁
**执行时机:** ⑤测试完成后,进入⑥部署之前
| 检查项 | 通过标准 | 执行方式 |
|--------|---------|---------|
| 所有测试通过 | verdict=ALL_PASS | 自动 |
| 覆盖率达标 | line_percent >= 阈值(见测试规范) | 自动 |
| 无回归 | existing_tests_still_pass=true | 自动 |
| 冒烟测试通过 | smoke.failed=0 | 自动 |
| 部署确认 | 乔确认可以部署 | 人工 |
**不通过处理:** 失败信息反馈给程序员Agent修复 → 重新测试最多3轮
---
## 门禁执行规则
### 重试策略
```
第1次失败 → 同模型重试,附带失败原因
第2次失败 → 换备用模型重试
第3次失败 → 上报乔,进入人工介入
```
### 备用模型降级链(示例 — 根据实际可用模型替换)
降级原则:主模型失败时,按以下优先级替换:
1. 同平台其他模型(相同 API 端点)
2. 不同平台同等级模型
3. 快速响应模型兜底
| 角色 | 降级策略 |
|------|---------|
| 架构师 | 强推理模型 → 同平台次强模型 → 通用模型 |
| 设计师 | 编码版模型 → 通用强模型 → 快速模型 |
| 主程序员 | 深度编码模型 → 其他编码模型 → 快速模型 |
| 结对程序员 | 与主程序员不同家族模型 → 主程序员模型 |
| 审查员 | 深度推理模型 → 架构师模型 |
| 测试员 | Agent能力强的模型 → 编码模型 |
### 超时保护
| 阶段 | 超时时间 | 超时处理 |
|------|---------|---------|
| ②设计 | 30分钟 | 终止,记录已有产出,人工介入 |
| ③UI设计 | 10分钟 | 换模型重试精简prompt |
| ④编码 | 50分钟 | 终止,保留已写代码,人工介入 |
| ⑤审查 | 25分钟 | 终止,标记"审查超时",进入测试 |
| ⑥测试 | 40分钟 | 终止,保留已有测试结果,人工介入 |