AirPlan V2 initial release — unified scheduler with 12 sub-modes
Merges 8 V1 plugins into 1 unified plugin, adds 4 new components (dep, tst, sec, rvr). 12 sub-modes: arc, eng, do, dbg, xdb, sdb, ndb, ctx, dep, tst, sec, rvr. L1 code-level guarantees: atomic writes, file locks, evidence gating, forced debug routing, 3-phase arc gate, evidence-first debug gate, Chinese language lock, scheduler boundary. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
99
lib/air_runtime/paths.py
Normal file
99
lib/air_runtime/paths.py
Normal 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",
|
||||
]
|
||||
Reference in New Issue
Block a user