"""AirRvr mode — V2 需求审查器。""" from pathlib import Path from air_runtime.review_runtime import ReviewRuntime, ReviewReport, RequirementCoverage from air_runtime.io import safe_json_load from air_runtime.paths import airplan_root def main(args) -> None: project_root = Path(args.project).expanduser().resolve() tid = args.task_id sub = args.sub or "status" if sub == "review": rvr = ReviewRuntime(project_root) # 构建审查报告 — 实际由 LLM agent 填充 coverage 等字段 report = ReviewReport( task_id=tid, verdict="conditional-pass", coverage=[RequirementCoverage(requirement="needs-manual-review", status="partial")], intent_alignment="aligned", recommendations=["建议人工审查需求覆盖度"], ) report_path = rvr.save_report(report) verdict = rvr.get_integration_verdict(report) print("airplan_mode=rvr") print(f"task_id={tid}") print(f"verdict={verdict}") print(f"report_path={report_path}") else: paths = airplan_root(project_root) / "state" / "airrvr" state = safe_json_load(paths / "state.json") or {} print(f"airplan_mode=rvr\nenabled={state.get('enabled', False)}")