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:
59
lib/air_runtime/project_bootstrap.py
Normal file
59
lib/air_runtime/project_bootstrap.py
Normal file
@@ -0,0 +1,59 @@
|
||||
"""
|
||||
项目引导模块 — 确保 AirPlan 目录结构存在。
|
||||
V2 保持与 V1 相同的不变量:制品驱动通信、上下文隔离。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def ensure_project_bootstrap(project_root: Path) -> dict[str, bool]:
|
||||
"""创建 AirPlan 必需目录结构。"""
|
||||
root = project_root / "AirPlan"
|
||||
docs = root / "docs"
|
||||
arch = docs / "architecture"
|
||||
adr_dir = arch / "adr"
|
||||
c4_dir = arch / "c4"
|
||||
debug_dir = docs / "debug"
|
||||
state = root / "state"
|
||||
|
||||
dirs = [
|
||||
root,
|
||||
docs,
|
||||
arch,
|
||||
adr_dir,
|
||||
c4_dir,
|
||||
debug_dir,
|
||||
state,
|
||||
state / "airarc" / "reviews",
|
||||
state / "aireng" / "dispatch",
|
||||
state / "aireng" / "archive",
|
||||
state / "aireng" / "plans",
|
||||
state / "airdo" / "tasks",
|
||||
state / "airdbg" / "sessions",
|
||||
state / "airdbg" / "snapshots",
|
||||
state / "airxdb" / "artifacts",
|
||||
state / "airsdb" / "reports",
|
||||
state / "airndb" / "captures",
|
||||
state / "aircontext",
|
||||
state / "airdep" / "sessions",
|
||||
state / "airtst" / "reports",
|
||||
state / "airsec",
|
||||
state / "airrvr" / "reviews",
|
||||
]
|
||||
|
||||
for d in dirs:
|
||||
d.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# 创建必要文件
|
||||
(root / "AGENTS.md").touch()
|
||||
(root / "plan.md").touch()
|
||||
(root / "todo.md").touch()
|
||||
(adr_dir / "placeholder.md").touch()
|
||||
(c4_dir / "module.md").touch()
|
||||
(debug_dir / "debug-log.md").touch()
|
||||
(debug_dir / "gui-debug-log.md").touch()
|
||||
(docs / "staticanalysis.md").touch()
|
||||
|
||||
return {"bootstrap": True}
|
||||
Reference in New Issue
Block a user