QE-Agent 是一个自动化质量工程代理,专注于 main branch 的发布质量。 通过三层验收测试(Schema / Coverage / LLM Audit)验证 IR 管道的输出质量, 并与 Dev-Agent 通过 Gitea Issue 协同工作。
bash scripts/start_qe_agent.sh — 三种模式:单次 / 持续轮询 / 交互claude --agent agents/QE_AGENT.md — 直接启动交互模式(默认 /loop 10m 轮询)
| QE-Agent | Dev-Agent | |
|---|---|---|
| 关注范围 | main branch 健康 | 功能开发与 bug 修复 |
| 代码 | tests/acceptance/ | skills/ scripts/ |
| 测试 | 验收测试 (三层) | UT/IT |
| 分支 | test/issue-N | dev/issue-N-* |
| Commit | test: ... - Closes #N | fix: ... - Closes #N |
| 签名 | [qe-agent: qa-01] | [da-01] |
| Issue 标签 | test-code | agent-task ci-failure |
| Layer | 方法 | 阈值 | LLM |
|---|---|---|---|
| A — Schema | IR 结构验证 (rule_id / trigger / sources / actions) | 0 errors | 不需要 |
| B — Coverage | IR sources[] 对文档内容单元的引用率 | ≥ 70% | 不需要 |
| C — QE Audit | LLM 逐章节评估 IR 覆盖充分性 | inadequate ≤ 30% | deepseek-v4-flash |
python scripts/agent_poller.py --action list --labels test-code python scripts/agent_poller.py --action list --labels acceptance-failure
git pull origin mainpython scripts/run_pipeline.py --parsed <path> --test## REOPEN by [qe-agent: qa-01] 评论,包含:Issue 状态是唯一通信渠道。两个 agent 共用 pzhang_zywl Gitea 账号,通过签名区分:
[qe-agent: qa-01][da-01]QE → Dev: 发现问题 → 开 dev issue (agent-task) / 重开已有 dev issue
Dev → QE: 修复完成 → 关闭 dev issue(自验证后)
QE 验收: 拉取 main → 重跑 e2e → 通过就关 test-code,不通过就重开 dev issue
| 操作 | 命令 |
|---|---|
| 轮询 issue | agent_poller.py --action list --labels test-code |
| 查看 issue | agent_poller.py --action get --issue <N> |
| 评论 | agent_poller.py --action comment --issue <N> --body "..." |
| 生命周期 | agent_poller.py --action lifecycle --issue <N> |
| 创建 PR | agent_poller.py --action create-pr --issue <N> --branch test/issue-<N> |
| 查 PR CI | agent_poller.py --action pr-status --pr <N> |
| 合并 PR | agent_poller.py --action merge-pr --pr <N> |
| 跑管道 | python scripts/run_pipeline.py --parsed <path> --test |
| 验收测试 | pytest tests/acceptance/ -v --run-acceptance |
| 仅 Layer A+B | pytest tests/acceptance/ -v --run-acceptance -k "not test_layer_c" |
tests/acceptance/ ├── conftest.py # Pytest 配置、fixtures、LLM client ├── ir_schema.py # IR schema 验证 ├── report.py # 三层 JSON 报告 └── test_main_health.py # Layer A → B → C scripts/ ├── agent_poller.py # Gitea API 工具 ├── run_pipeline.py # 端到端管道运行器 ├── start_qe_agent.sh # QE-Agent 启动脚本 └── .env # Token 配置 (gitignored) agents/ ├── QE_AGENT.md # QE-Agent 系统指令 └── DEV_AGENT.md # Dev-Agent 系统指令 .gitea/workflows/ ├── ci.yml # CI (push/PR) └── acceptance.yml # 手动触发验收
| Issue | 内容 | 结果 |
|---|---|---|
| #10 | 移除硬编码路径,适配 config.py | closed |
| #12 | 实现端到端验收测试流程 | closed |
| #14 | 跑完整 e2e 测试 | closed |
| #15 | Dev: IR rules=[] (多次 reopen) | closed |
| #18 | 再跑 e2e 测试 | open |
| #21 | P0: 覆盖率不足 (多次 reopen) | reopened |
| #22 | P1: trigger.operator 为空 | closed |
QE-Agent [qe-agent: qa-01] — document_analyzer project