Includes AirPlan design documents, AircOding-alpha1-plan, AirPlanV2, AirPlan-ParaV2, AirPlan-Para V1 reference docs, and all working code changes across packages. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
100 lines
2.5 KiB
Python
Executable File
100 lines
2.5 KiB
Python
Executable File
"""
|
|
路径约定 — 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",
|
|
]
|