本仓库定义了一套面向政府采购场景的“采购需求合规性检查智能体” harness 化架构。
目标不只是回答“某条款有没有风险”,而是帮助采购人在采购需求形成、复核和发布前,尽早发现可能影响公平竞争、履约边界、验收可执行性和合同平衡性的风险,并把智能体的工作回路做成可检查、可续跑、可评测、可持续改进的系统。
当前阶段重点:
- 帮助采购人在发布前发现风险
- 帮助采购人完成改稿和复核
- 帮助采购人更放心地把采购需求进行公布
当前执行主线:
- 只优先推进“采购需求合规性检查智能体”的审查能力做完整
- 当前阶段以真实文件人工 vs 代码差异闭环、主链降噪、查点补齐、正式意见输出质量为最高优先级
incubator、budget_demand和其他新智能体方向当前暂停新增扩张,仅保留已具备能力
当前暂不优先扩展为:
- 发布后的争议裁判
- 投标文件评审裁判
- 履约争议归责系统
核心思路:
- 顶层文件负责告诉智能体先看哪里
- 领域规则沉淀在产品规格文档中
- 推理依据和设计取舍沉淀在设计文档中
- 当前工作状态记录在执行计划中
- 质量通过评测样例和反馈产物持续提升
从这里开始:
- ARCHITECTURE.md
- openai-harness-notes.md
- procurement-compliance-review-workflow.md
- initial-harness-bootstrap.md
- local-offline-runtime-roadmap.md
能力建设重点文档:
- capability-overview.md
- full-capability-profile.md
- code-review-system-technical-description.md
- local-runtime-skeleton.md
- local-codeification-roadmap.md
- code-review-to-human-parity-roadmap.md
- code-review-gap-closure-roadmap.md
- continuous-human-parity-architecture.md
- procurement-catalog-layer-design.md
- code-review-main-pipeline-update.md
- architecture-gap-priorities.md
- engine-tuning-checklist.md
- procurement-risk-identification-priorities.md
- human-vs-code-review-gap-matrix.md
- legal-semantic-layer-design.md
- legal-authority-local-storage-spec.md
- review-export-design.md
- review-check-progress-design.md
- effective-requirement-scope-filter-design.md
- requirement-scope-layer-design.md
- tender-document-risk-scope-layer-design.md
- tender-document-parser-design.md
- budget-demand-agent-architecture.md
- repo-layered-architecture.md
- agent-incubation-and-distillation-design.md
- incubator-six-layer-mapping.md
- agent-incubator-mvp-acceptance.md
- agent-incubator-enhancement-backlog.md
- llm-fast-path-design.md
- legal-authority-system.md
- case-library-design.md
- continuous-update-mechanism.md
- consistency-and-caching-design.md
产品与对接文档:
本地执行骨架:
setup.pysrc/agent_compliance/tests/
当前最小可运行命令:
PYTHONPATH=src python3 -m agent_compliance normalize <file>PYTHONPATH=src python3 -m agent_compliance scan-rules <file> --jsonPYTHONPATH=src python3 -m agent_compliance review <file> --jsonPYTHONPATH=src python3 -m agent_compliance review <file> --json --tender-parser-mode assistPYTHONPATH=src python3 -m agent_compliance incubate-agent <agent_key>PYTHONPATH=src python3 -m agent_compliance web
智能体孵化与蒸馏工厂当前能力保留可用,但不作为当前新增建设主线:
- 默认生成
product_outline.md - 默认生成
evals/README.md - 默认生成
tests/test_agent_smoke.py /incubator已支持查看趋势摘要、多轮 run 对比和更新蒸馏建议状态/incubator/definition已支持完成第一层“需求定义层”,先分析业务需求的建议处理流程与待补充问题,再生成标准需求定义确认稿并落盘到docs/generated/incubator-definition/
测试阶段默认关闭 review 缓存;如需复用缓存,可显式加:
PYTHONPATH=src python3 -m agent_compliance review <file> --json --use-cache
招标文件独立解析器当前已支持可配置前置:
- 环境变量:
AGENT_COMPLIANCE_TENDER_PARSER_MODE=off|assist|required - CLI:
--tender-parser-mode off|assist|required - 当前推荐先使用
assist
智能体孵化与蒸馏工厂当前已支持:
- 标准蓝图模板:
review / budget_analysis / demand_research / comparison_eval - 当前具体蓝图:
review_agent、budget_agent、demand_research_agent、special_checks_agent - 标准命令:
PYTHONPATH=src python3 -m agent_compliance incubate-agent <agent_key> - 多轮比较命令:
PYTHONPATH=src python3 -m agent_compliance compare-incubation-runs <run1> <run2> ... - 建议状态命令:
PYTHONPATH=src python3 -m agent_compliance update-incubation-recommendation <run.json> <recommendation_key> --status ... - 产品化固化命令:
PYTHONPATH=src python3 -m agent_compliance productize-incubation-run <run_manifest> - 回归回挂字段:
--regression-result--capability-change
- 标准产物:
*-distillation-report.md*-distillation-report.json*-run.json*-productization.md*-productization.json
- 当前已用
政府采购需求调查智能体跑通第一轮真实 MVP 孵化验证,产物位于:docs/generated/incubator/demand_research/
- 当前也已用
政府采购四类专项检查智能体跑通一轮最小孵化验证,产物位于:docs/generated/incubator/special_checks/
- 当前也已支持最小自动对照生成:
--human-baseline-file--strong-agent-result-file--target-agent-result-file用于把三份标准文本自动转换成一条ValidationComparison
- 当前也已支持从标准目录自动采集对照:
--comparison-root <dir>- 目录约定为
<dir>/<sample_id>/human_baseline.txt|strong_agent_result.txt|target_agent_result.txt - 如同时提供样例清单,则优先只采集 manifest 中声明的样例
- 当前
run manifest也已开始记录阶段执行痕迹:- 包括样例登记、comparison 追加、建议生成、建议状态更新等事件
- 蒸馏报告中会同步展示总执行事件数和阶段最近事件
- 当前样例清单也已开始支持版本化:
--sample-manifest-version <vN>--sample-change-summary <text>--sample-manifest-file <manifest.json>- 工厂会把样例清单同步写成独立
sample-manifest.json资产
- 当前多轮 run 比较也已开始支持趋势化输出:
gap_seriesrecommendation_seriesvalidated_change_seriesgap_trendvalidated_change_trend
- 当前已形成独立的 MVP 验收总结:
docs/design-docs/agent-incubator-mvp-acceptance.md
- 当前也已提供一个轻量 Web 控制台:
/incubator- 只负责启动一轮孵化、列出现有 run、查看 run manifest 和蒸馏报告
- 当前也已开始支持从单轮 run 自动生成产品化固化模板:
- 发布 checklist
- 运维口径
- 交付模板
- 验收模板
本地大模型兜底接口已预留,默认关闭;如需显式启用:
PYTHONPATH=src python3 -m agent_compliance review <file> --json --use-llm- 可选覆盖模型和地址:
--llm-model <model>、--llm-base-url <base_url> - 当本地模型启用时,当前会额外执行三类局部判断:
- 模板错贴与标的域不匹配
- 评分结构判断
- 商务链路联合判断
- 同时自动产出:
docs/generated/improvement/*-rule-candidates.{json,md}docs/generated/improvement/*-benchmark-gate.{json,md}
- 当前模型调用已支持自动探测
/v1/models并在默认模型失效时回退到服务端可用模型。
本地 Web 页面:
- 启动:
PYTHONPATH=src python3 -m agent_compliance web - 默认地址:http://127.0.0.1:8765
- 当前支持上传文件、启用缓存/本地模型开关、查看审查摘要和 findings 列表;对
docx会优先按段落/表格结构渲染原文,并按 finding 跳转定位到对应位置 - 当前已补入采购人视角页面
/review-check,更偏正式审查意见和改稿工作台视角,弱化实验性信息,只保留问题导航、原文定位、法规依据、建议改写和导出 - 当前已补入规则管理区,可查看正式规则数量、候选规则、benchmark gate 状态,并记录“确认入库 / 暂缓 / 忽略”决策
review-next已开始支持审查结果导出,当前提供Markdown / Excel / JSON和主问题版 / 完整明细版- 导出产物会同步写入
docs/generated/exports/ - Excel 导出已包含摘要页、冻结首行、自动筛选和按风险等级着色,便于业务和法务直接复核
- 当前导出默认按“采购需求形成与发布前审查”场景组织,优先服务采购人改稿和发布前复核
本地引用资料:
本地品目知识:
- 采购品目目录层设计方案
data/procurement-catalog/catalogs.json
更新输出模板:
新增评测样本: