feat: surface world class evidence in review studio
This commit is contained in:
@@ -458,6 +458,20 @@ ACTION_GUIDANCE: dict[str, dict[str, str]] = {
|
||||
],
|
||||
"verification": "python3 scripts/render_review_waivers.py .",
|
||||
},
|
||||
"world-class-evidence": {
|
||||
"summary": "补齐 provider、真人盲评、原生权限执行和真实客户端遥测证据,或明确本次发布不声明 world-class 完成。",
|
||||
"why": "世界级结论必须来自已接受的外部/人工证据;计划、metadata fallback、待评审和本地命令都不能替代完成证据。",
|
||||
"source_fix": "reports/world_class_evidence_ledger.md + reports/world_class_evidence_plan.md",
|
||||
"source_paths": [
|
||||
{"path": "reports/world_class_evidence_ledger.md", "label": "world-class evidence ledger", "kind": "report", "patterns": ["# World-Class Evidence Ledger"]},
|
||||
{"path": "reports/world_class_evidence_plan.md", "label": "world-class evidence plan", "kind": "report", "patterns": ["# World-Class Evidence Plan"]},
|
||||
{"path": "reports/skill_os2_audit.md", "label": "Skill OS 2.0 audit", "kind": "report", "patterns": ["# Skill OS"]},
|
||||
{"path": "reports/output_review_decisions.json", "label": "human review decisions", "kind": "report", "patterns": ["winner_variant"]},
|
||||
{"path": "reports/runtime_permission_probes.md", "label": "runtime permission probes", "kind": "report", "patterns": ["# Runtime"]},
|
||||
{"path": "reports/adoption_drift_report.md", "label": "adoption drift", "kind": "report", "patterns": ["# Adoption"]},
|
||||
],
|
||||
"verification": "python3 scripts/yao.py world-class-ledger . && python3 scripts/yao.py review-studio .",
|
||||
},
|
||||
"registry-audit": {
|
||||
"summary": "补齐 registry package metadata、checksum、license、owner、review cadence 和 install evidence。",
|
||||
"why": "分发元数据不完整时,团队无法安全安装、升级或追溯包体来源。",
|
||||
@@ -626,6 +640,7 @@ def render_html(report: dict[str, Any]) -> str:
|
||||
atlas_summary = report["data"]["atlas"].get("summary", {})
|
||||
adoption_summary = report["data"]["adoption_drift"].get("summary", {})
|
||||
waiver_summary = report["data"]["review_waivers"].get("summary", {})
|
||||
world_class_summary = report["data"].get("world_class_evidence_ledger", {}).get("summary", {})
|
||||
annotation_summary = report["data"]["review_annotations"].get("summary", {})
|
||||
annotation_caption = (
|
||||
f"{annotation_summary.get('annotation_count', 0)} 条批注;"
|
||||
@@ -716,6 +731,19 @@ def render_html(report: dict[str, Any]) -> str:
|
||||
["waiver_count", "active_count", "expired_count", "invalid_count", "covered_gate_count"],
|
||||
"no review waiver summary",
|
||||
)
|
||||
world_class_panel = render_kv_grid(
|
||||
world_class_summary,
|
||||
[
|
||||
"ledger_entry_count",
|
||||
"accepted_count",
|
||||
"pending_count",
|
||||
"human_pending_count",
|
||||
"external_pending_count",
|
||||
"overclaim_guard_active",
|
||||
"ready_to_claim_world_class",
|
||||
],
|
||||
"world-class evidence ledger missing",
|
||||
)
|
||||
registry_panel = render_kv_grid(
|
||||
registry_package_summary(registry_package),
|
||||
[
|
||||
@@ -883,6 +911,11 @@ def render_html(report: dict[str, Any]) -> str:
|
||||
<div class="panel"><h2>批准台账</h2>{waiver_panel}</div>
|
||||
</section>
|
||||
|
||||
<section id="world-class" class="twocol">
|
||||
<div class="panel"><h2>世界证据</h2><p>{html.escape(gate_details.get('world-class-evidence', 'world-class evidence ledger missing'))}</p></div>
|
||||
<div class="panel"><h2>证据台账</h2>{world_class_panel}</div>
|
||||
</section>
|
||||
|
||||
<section id="registry" class="twocol">
|
||||
<div class="panel"><h2>注册审计</h2><p>{html.escape(gate_details.get('registry-audit', 'registry audit missing'))}</p></div>
|
||||
<div class="panel"><h2>包体元数据</h2>{registry_panel}</div>
|
||||
|
||||
@@ -418,6 +418,39 @@ def build_gates(skill_dir: Path, output_html: Path, data: dict[str, dict[str, An
|
||||
)
|
||||
)
|
||||
|
||||
world_class_ledger = data.get("world_class_evidence_ledger", {})
|
||||
world_class_summary = world_class_ledger.get("summary", {}) if isinstance(world_class_ledger, dict) else {}
|
||||
if not world_class_ledger and maturity == "governed":
|
||||
world_class_status = "warn"
|
||||
world_class_detail = "world-class evidence ledger is missing; public world-class readiness cannot be claimed"
|
||||
elif not world_class_ledger:
|
||||
world_class_status = "pass"
|
||||
world_class_detail = "world-class evidence ledger is optional until governed or public world-class readiness is claimed"
|
||||
elif world_class_summary.get("ready_to_claim_world_class") is True:
|
||||
world_class_status = "pass"
|
||||
world_class_detail = (
|
||||
f"{world_class_summary.get('accepted_count', 0)} accepted evidence entries; "
|
||||
f"{world_class_summary.get('pending_count', 0)} pending"
|
||||
)
|
||||
else:
|
||||
world_class_status = "warn"
|
||||
world_class_detail = (
|
||||
f"{world_class_summary.get('pending_count', 0)} pending world-class evidence entries; "
|
||||
f"{world_class_summary.get('human_pending_count', 0)} human pending; "
|
||||
f"{world_class_summary.get('external_pending_count', 0)} external pending; "
|
||||
f"overclaim guard {str(world_class_summary.get('overclaim_guard_active', False)).lower()}"
|
||||
)
|
||||
gates.append(
|
||||
gate(
|
||||
"world-class-evidence",
|
||||
"世界证据",
|
||||
world_class_status,
|
||||
world_class_detail,
|
||||
"reports/world_class_evidence_ledger.json",
|
||||
_report_link(output_html, skill_dir, "reports/world_class_evidence_ledger.md"),
|
||||
)
|
||||
)
|
||||
|
||||
registry = data["registry"]
|
||||
install = data["install_simulation"]
|
||||
if not registry:
|
||||
@@ -505,6 +538,7 @@ def weighted_score(gates: list[dict[str, str]]) -> int:
|
||||
"skill-atlas": 10,
|
||||
"operations-loop": 10,
|
||||
"review-waivers": 10,
|
||||
"world-class-evidence": 10,
|
||||
"registry-audit": 10,
|
||||
"release-notes": 10,
|
||||
"intent-canvas": 10,
|
||||
|
||||
@@ -22,6 +22,7 @@ REVIEW_STUDIO_NAV = [
|
||||
("#atlas", "组合治理"),
|
||||
("#telemetry", "运营回路"),
|
||||
("#waivers", "人工批准"),
|
||||
("#world-class", "世界证据"),
|
||||
("#registry", "注册审计"),
|
||||
("#release", "发布路线"),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user