Tighten agent validation gates

This commit is contained in:
2026-06-30 23:24:31 +08:00
parent 53b81dd04d
commit 5055084788
9 changed files with 87 additions and 20 deletions

View File

@@ -134,10 +134,19 @@ def evaluate_project() -> dict:
if not suggestions:
suggestions.append("Current platform covers the requested control-plane features, uploaded YOLO dataset train/predict/heatmap actions, live uploaded-data YOLO predict/heatmap acceptance, real workspace data acceptance, and synthetic deep training acceptance; next focus is a longer operator-run task on a full dataset.")
score = sum(1 for item in checks if item["passed"]) / max(len(checks), 1)
passed_count = sum(1 for item in checks if item["passed"])
total_count = max(len(checks), 1)
score = passed_count / total_count
passed = passed_count == len(checks)
return {
"agent": "evaluation_suggestion_agent",
"passed": passed,
"score": round(score, 3),
"summary": {
"passed_checks": passed_count,
"total_checks": len(checks),
"missing_checks": [item["name"] for item in checks if not item["passed"]],
},
"checks": checks,
"suggestions": suggestions,
}