diff --git a/.planning/phases/02-pathfinding/02-01-PLAN.md b/.planning/phases/02-pathfinding/02-01-PLAN.md index 887399b..af1dcf6 100644 --- a/.planning/phases/02-pathfinding/02-01-PLAN.md +++ b/.planning/phases/02-pathfinding/02-01-PLAN.md @@ -140,6 +140,12 @@ Output: 02-INTERFACE-DRAFT.md(草案 + 决策问题清单)、mover.test.ts +## Artifacts this phase produces + +- `.planning/phases/02-pathfinding/02-INTERFACE-DRAFT.md` — 接口草案文档(含 `IPathfindingSystem` 等全部草案 interface/type 声明、文件归属提案、D-08 两方案、P1 调查、打断时序与图方向性选项、拍板记录节) +- `packages-user/data-common/src/common/mover.test.ts` — L0 坐标回写回归测试(4 个 skip 用例脚手架;02-02 翻绿) +- 本计划不新建任何生产符号(D-07:拍板前零实现) + ## Trust Boundaries | Boundary | Description | diff --git a/.planning/phases/02-pathfinding/02-02-PLAN.md b/.planning/phases/02-pathfinding/02-02-PLAN.md index 6c5b413..bde59da 100644 --- a/.planning/phases/02-pathfinding/02-02-PLAN.md +++ b/.planning/phases/02-pathfinding/02-02-PLAN.md @@ -140,6 +140,14 @@ Output: 修复后的 mover.ts + 绿色 L0 回归;pathfinding/{types,graph,syst +## Artifacts this phase produces + +- 接口/类型(命名以拍板草案为唯一事实源):损失函数类型(默认每格 1)、回退策略函数类型(入参路径 + 每步到达位置)、通行性谓词函数类型、图节点/邻接 interface(`packages-user/data-system/src/pathfinding/types.ts`) +- 类:`PathfindingSystem`(L2,绑定 `IMapLayer`/`IObjectMovable` 注入槽位,D-03) +- 函数/方法:有向图构建(graph.ts)、自写 Dijkstra 最小损失搜索、仅取路径 API(D-06)、移动方式决策(D-04/D-05 槽位)、方向→PassBit 映射(谓词默认实现内) +- 修改:`packages-user/data-common/src/common/mover.ts`(mover.ts:651 回写条件,按拍板)、`packages/common/src/logger.json`(新 warn 码 ≥173)、`packages-user/data-system/src/index.ts`(barrel 追加) +- 测试:`mover.test.ts`(翻绿)、`graph.test.ts`、`system.test.ts` + ## Trust Boundaries | Boundary | Description | diff --git a/.planning/phases/02-pathfinding/02-03-PLAN.md b/.planning/phases/02-pathfinding/02-03-PLAN.md index c2881d8..c30ce10 100644 --- a/.planning/phases/02-pathfinding/02-03-PLAN.md +++ b/.planning/phases/02-pathfinding/02-03-PLAN.md @@ -140,6 +140,13 @@ Output: heroPathfinding.ts + 接线与测试;更新 core.ts、双 barrel、log +## Artifacts this phase produces + +- 类:`HeroPathfinding`(L3 接线类,`packages-user/data-state/src/pathfinding/heroPathfinding.ts`) +- 方法:路径→`ObjectMoveType.Dir` 步骤翻译、逐步执行(复用 `DefaultHeroMoveTopImpl` 事件链,D-09)、瞬移执行(D-04)、默认回退策略「路径上存在事件即回退」(D-05)、D-08 情形 1 相邻格 + OnTouch + 面朝、打断接管入口(D-10) +- 修改:`packages-user/data-state/src/core.ts`(CoreState 寻路接线)、`packages-user/data-state/src/index.ts` 与 `packages-user/data-system/src/index.ts`(barrel)、`packages/common/src/logger.json`(集中登记码位) +- 测试:`heroPathfinding.test.ts`(端到端逐步/瞬移/回退/D-08 双语义/打断) + ## Trust Boundaries | Boundary | Description |