feat: P1-19 P1-20 实现 - 边界测试强制 + 高风险审计 + UI Skill 路由

P1-19.1: Arc 边界测试强制
- TaskNode 新增 test_required 字段
- _inject_boundary_tests() 为每个模块注入接口测试和单元测试任务
- Done When 验证必须包含"测试通过"

P1-19.2: AirRvr 高风险审计
- 新增 HighRiskAudit, HighRiskFinding 数据类
- ReviewReport 新增 highRiskAudit 字段,含 lifecycle/nullPointer/danglingPointer/exceptionSafety/concurrency + overallRisk + deliveryVerdict
- 序列化/反序列化支持

P1-19.3: block-release 集成
- dispatch_worker_group() 派发前扫描最新审查报告
- deliveryVerdict=block-release 时阻止所有后续派发
- 记录 eng.blocked 事件

P1-20: frontend-design Skill 集成
- is_ui_task() UI 任务检测
- ensure_frontend_design_skill() 自动安装 Skill
- route_ui_task() UI 任务路由决策
- enter_worker() 集成 UI 检测,skill 不可用时阻止执行
- commands/do.md 更新 UI 处理说明
- SKILL.md 新增 INV-12/INV-13/INV-14

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
AirLongDian
2026-06-10 17:06:48 +08:00
commit e73a4da354
54 changed files with 6054 additions and 0 deletions

99
lib/air_runtime/paths.py Normal file
View File

@@ -0,0 +1,99 @@
"""
路径约定 — V2 统一所有子模块的 AirPlan 目录结构。
"""
from __future__ import annotations
from pathlib import Path
def airplan_root(project_root: Path) -> Path:
return project_root / "AirPlan"
def state_root(project_root: Path) -> Path:
return airplan_root(project_root) / "state"
def todo_path(project_root: Path) -> Path:
return airplan_root(project_root) / "todo.md"
def plan_path(project_root: Path) -> Path:
return airplan_root(project_root) / "plan.md"
def agents_path(project_root: Path) -> Path:
return airplan_root(project_root) / "AGENTS.md"
def docs_root(project_root: Path) -> Path:
return airplan_root(project_root) / "docs"
# --- 子模块状态路径 ---
def engine_state_path(project_root: Path) -> Path:
return state_root(project_root) / "aireng" / "state.json"
def worker_state_path(project_root: Path, task_id: str) -> Path:
return state_root(project_root) / "airdo" / "tasks" / task_id / "worker-state.json"
def arc_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airarc" / "state.json"
def dbg_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airdbg" / "state.json"
def xdb_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airxdb" / "state.json"
def sdb_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airsdb" / "state.json"
def ndb_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airndb" / "state.json"
def ctx_state_path(project_root: Path) -> Path:
return state_root(project_root) / "aircontext" / "state.json"
def dep_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airdep" / "state.json"
def tst_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airtst" / "state.json"
def sec_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airsec" / "state.json"
def rvr_state_path(project_root: Path) -> Path:
return state_root(project_root) / "airrvr" / "state.json"
def event_log_path(project_root: Path) -> Path:
return state_root(project_root) / "events.jsonl"
def task_graph_state_path(project_root: Path) -> Path:
return state_root(project_root) / "task-graph.json"
def required_project_artifacts() -> list[str]:
return [
"AirPlan/AGENTS.md",
"AirPlan/plan.md",
"AirPlan/todo.md",
"AirPlan/docs/architecture/adr/",
"AirPlan/docs/architecture/c4/module.md",
]