Files
fengqun/docs/INDUSTRY_STANDARD_AGNET_TEST_PLAN.md
T
gongzhiyongandOmX cd2431ece2 Add minimal quality-gated convergence
Promote the S07 external FastAPI chain from score-only acceptance to a minimal quality-gated flow with refusal detection, retry/fallback recovery, handoff quality checks, and a multi-round consensus gate before final convergence.

Constraint: The user asked to fix the documented shortcomings around score-only convergence, weak refusal scoring, and unqualified handoff evidence while continuing the minimal version.

Rejected: Replacing the whole coordinator with a production consensus runtime | the minimal fix keeps the existing task pool/convergence shape and adds scenario-level quality gates plus consensus evidence.

Confidence: high

Scope-risk: moderate

Directive: Future S07 runs must keep all_outputs_pass_quality_gate and multi_round_quality_consensus_accepts_chain as required checks before claiming PASS.

Tested: .venv/bin/python -B -m unittest tests.test_standard_scenarios; .venv/bin/python -u -B examples/run_continuous_reasoning_acceptance.py; .venv/bin/python -B examples/export_model_agnet_io_report.py; .venv/bin/python -B -m unittest discover -s tests; .venv/bin/python -B -m py_compile swarm_minimal/*.py examples/*.py tests/*.py; .venv/bin/python -u -B examples/run_academic_standard_evaluation.py; .venv/bin/python -B -m unittest tests.test_model_io_report_audit; git diff --check; docs secret pattern scan.

Not-tested: The combined run_standard_scenario_acceptance wrapper was not rerun after report export to avoid creating a newer live run that would make the exported latest-run report stale.

Co-authored-by: OmX <omx@oh-my-codex.dev>
2026-05-16 16:35:00 +08:00

56 lines
3.1 KiB
Markdown

# Agent 行业参考标准映射
当前行业没有统一的 “Agnet/Agent 质量认证标准”。本项目不再用普通软件产品质量标准作为主标准,而是采用:
- `AGENT_SWARM_QUALITY_STANDARD.zh-CN.md`:主标准,定义通用 Agent 质量标准 AQS 和蜂群 Agent 质量标准 SW-AQS。
- `ACADEMIC_STANDARD_TEST_REPORT.zh-CN.md`:执行报告,记录本轮测试过程、结果、算法和马尔可夫过程判定。
- `MODEL_AGNET_IO_REPORT.zh-CN.md`:输入输出报告,记录模型任务、prompt 结构、实际输出和接手机制。
## 行业参考框架
| 来源 | 在本项目中的用途 |
| --- | --- |
| NIST AI RMF 1.0 | 管理 Agent 风险、可控性、可度量性和治理闭环 |
| NIST AI 600-1 | 处理生成式 AI 的幻觉、隐私、信息安全、组件集成和预部署测试 |
| OWASP LLM Top 10 | 覆盖 prompt injection、敏感信息泄露、过度代理、不安全输出处理、过度信任 |
| OWASP Agentic Skills Top 10 | 覆盖 Agent 工具/技能执行层的权限、隔离、审计和运行时安全 |
| MITRE ATLAS | 从对抗性 AI 和误用角度设计失败、越权、诱导和异常场景 |
| OpenTelemetry | 约束 run_id、task、event、metric、log、artifact 等可观测证据 |
| LangGraph handoff | 参考 active-agent 和 `transfer_to_<agent>` 式交接语义 |
| 蜂群模式归纳标准 | 约束去中心化、自组织、局部感知、信息素、涌现、鲁棒性和收敛 |
## 最小通过条件
本项目当前最小通过条件不是“代码质量通过”,而是:
1. AQS 通用 Agent 标准中,任务理解、上下文、模型选择、资源边界、敏感信息、可观测性、错误可解释、交接准备度均有证据。
2. SW-AQS 蜂群 Agent 标准中,任务池、共享状态、信息素、handoff、事件流、质量门、fallback 补救、多轮质量共识、收敛、鲁棒性、涌现性、传统基线对比和 live 外部闭环均有证据。
3. 模型输入输出能被审计:知道每个 Agent 被分配了什么任务、收到了什么输入、输出了什么、下一个 Agent 如何接手。
4. live 测试真实连接 Azure PostgreSQL、Redis、Blob 和 NewAPI,且不输出任何真实密钥。
5. 模型拒答、角色拒绝、偏题或目标漂移不能直接通过,必须被扣分并进入重试、换模型或质量共识门。
最新一次标准矩阵(S01-S08)已经通过,以下为 S07 外部 GitHub live 证据:
```json
{
"run_id": "37155251926d4165a7b7af68e8967f64",
"target_repo": "fastapi/fastapi",
"target_commit": "ecace740f3eaccb1aba152cf1de79477095c56f4",
"completed_tasks": 7,
"accepted_score": 1.0,
"check_count": 14,
"quality_consensus_rounds": 2,
"failed_checks": []
}
```
## 保留缺口
当前满足“最小蜂群 Agent 质量标准 v1”,但还不是完整生产级蜂群平台认证。仍需补:
- 并发 worker 自主 claim,而不是 coordinator 顺序驱动。
- Redis Stream 事件被其他 Agent 消费并改变决策。
- 3/5/7 Agent 扩缩容和稳定性压测。
- 更完整的自然语言互相质询与动态补充任务。
- 收敛速度、Agent 利用率、响应时间、信息素分布等统一 metrics。