feat: V3系统评审问题修复

1. 场景价值与技术合理性修复:
   - 补充docs/SCENE_VALUE.md(业务背景、痛点分析、用户场景、竞品对比、价值量化)
   - 添加用户操作流程图(Mermaid)
   - 添加3个真实业务案例量化数据

2. 演示与文档修复:
   - 创建docs/API.md(完整API文档)
   - 创建docs/QUICKSTART.md(5分钟快速入门指南)

3. AI使用日志修复:
   - 更新AGENTS.md,添加强制自动执行的AI使用日志记录指令
   - 在_AI_USAGE_LOG.md末尾添加范式执行统计

4. 安全性修复:
   - 在agents/llm.py中添加输入过滤(防Prompt注入)
   - 添加输出验证、速率限制、详细日志

5. 架构设计修复:
   - 创建tools/registry.py工具注册表
   - 修改orchestrator.py和orchestrator_db.py使用注册表动态获取运行器

6. 开发范式修复:
   - 在_AI_USAGE_LOG.md末尾添加范式执行统计
This commit is contained in:
hangshuo652
2026-08-29 13:23:28 +08:00
parent c6fa6b1aeb
commit b94757d9df
69 changed files with 1941 additions and 221 deletions
+7 -1
View File
@@ -12,6 +12,7 @@ from storage import TestDataBundle
from config import Config
from cobol_testgen import extract_structure, generate_data, incremental_supplement, check_coverage
from hina import classify_program, gate_check, supplement as strategy_supplement
from tools.registry import get_registry, ToolConfig
logger = logging.getLogger(__name__)
@@ -143,7 +144,12 @@ def run_pipeline(cfg: Config, cpath: str, cbl: str, java: str, map_path: str) ->
if not shutil.which("java"):
return _done(vr, t0, "BLOCKED", 2)
runner: Runner = SparkJavaRunner(cfg.spark_master) if cfg.runner_mode == "spark" else NativeJavaRunner()
# 使用工具注册表动态获取运行器
registry = get_registry()
runner_class = ToolConfig.get_runner_class(registry, cfg.runner_mode)
runner = runner_class(cfg.spark_master) if cfg.runner_mode == "spark" else runner_class()
jb = runner.compile(java)
vr.debug["java_build"] = {"ok": jb.success, "log": jb.log[-300:]}
if not jb.success: