From 333e047bc41fcbea2a128a0a668cfa21c1dae513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E8=96=84=E4=BA=91?= Date: Mon, 3 Aug 2026 22:55:47 +0800 Subject: [PATCH] docs: record EM planner Stage 2 checkpoint --- .../progress/em-planner-progress.md | 107 ++++++++---------- 1 file changed, 45 insertions(+), 62 deletions(-) diff --git a/docs/superpowers/progress/em-planner-progress.md b/docs/superpowers/progress/em-planner-progress.md index bce1410..9c28b57 100644 --- a/docs/superpowers/progress/em-planner-progress.md +++ b/docs/superpowers/progress/em-planner-progress.md @@ -2,10 +2,10 @@ ## Current State -- Current stage: 1 — Foundation contracts and boundaries +- Current stage: 2 — Foundation coordinates and corridor - Stage status: Completed - Current branch: `trajplanner` -- Last checkpoint commit: `e492e16` (last Stage 1 functional commit; this file is the Stage 1 checkpoint) +- Last checkpoint commit: `aa62d6b` (last Stage 2 functional commit; this file is the Stage 2 checkpoint) - Protocol design baseline: `554c84f` - Implementation-plan baseline: `8dd8ff0` @@ -16,54 +16,54 @@ | 1 | `2026-08-03-em-planner-foundation-implementation.md` | Task 1 — Verification Host and Immutable Contracts | `e12eb31` | RED: `foundation` failed with missing `VehicleMotionState`/`EmTrajectoryPoint`; GREEN: `foundation` printed `PASS foundation` with exit 0. | | 1 | `2026-08-03-em-planner-foundation-implementation.md` | Task 2 — Configuration, Diagnostics, and Request Validation | `b326431` | RED: `foundation` failed with missing configuration/validation types; GREEN: `foundation` printed `PASS foundation` twice with byte-identical stdout and exit 0. | | 1 | `2026-08-03-em-planner-foundation-implementation.md` | Task 3 — Direction Segmentation and Exact Boundary Anchors | `e492e16` | RED: `segmentation` failed with missing `ReferencePathSegmenter`; GREEN: `foundation` and `segmentation` each printed their PASS line with exit 0. | +| 2 | `2026-08-03-em-planner-foundation-implementation.md` | Task 4 — Reverse-Safe Frenet Projection and Reconstruction | `06687e2` | RED: `frenet` failed with missing Frenet types including `FrenetProjector`; GREEN: `PASS frenet` with forward/reverse sign, yaw-wrap, bounded U-branch, singular-denominator, and reconstruction checks. | +| 2 | `2026-08-03-em-planner-foundation-implementation.md` | Task 5 — Topology-Preserving Static Corridor | `2d252ff` | RED: `corridor` failed with missing static-corridor types; GREEN: `PASS corridor`, followed by `all-foundation` with all four PASS lines. | +| 2 | `2026-08-03-em-planner-foundation-implementation.md` | Task 6 — Foundation Documentation and Gate | `aa62d6b` | RED: Foundation README was absent; GREEN: README contract scan passed. Placeholder/format scans passed, `all-foundation` passed twice with identical four-line stdout, and the normal-project baseline contained only legacy `auto_avoidance` errors. | ## Current Verification - Commands: - `dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- foundation` - `dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- segmentation` + - `dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- frenet` + - `dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- corridor` + - `dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- all-foundation` (run twice, stdout compared exactly) - `git diff --check` - - `git diff-tree --no-commit-id --name-only -r e12eb31` - - `git diff-tree --no-commit-id --name-only -r b326431` - - `git diff-tree --no-commit-id --name-only -r e492e16` -- Result: Stage 1 exit passed. `foundation` printed `PASS foundation`; `segmentation` printed `PASS segmentation`; both commands exited 0. `git diff --check` exited 0. Task 2 ran `foundation` twice with identical stdout. The isolated host build may display two pre-existing `TireFollowing` obsolete-API warnings; it displays no EM Planner warnings or errors. -- Verified commit: `e492e16` + - `rg -n "NotImplementedException|throw new Exception\(\)" ClumsyPilot/ParkrobTrajplanner/EMPlanner ClumsyPilot/tests/EMPlannerVerificationHost` + - `dotnet build ClumsyPilot/ClumsyPilot.csproj --no-restore` +- Result: `foundation`, `segmentation`, `frenet`, and `corridor` pass. `all-foundation` produced exactly `PASS foundation`, `PASS segmentation`, `PASS frenet`, and `PASS corridor` twice with exit 0 and identical stdout. `git diff --check` and the placeholder scan have no diagnostics. The isolated host may display two pre-existing `TireFollowing` obsolete-API warnings during a cold implicit build; warmed direct runs contain only the four PASS lines and no EM Planner warnings or errors. The normal project build exits 1 only for the existing `auto_avoidance/MultiWheelAutoAvoidance.cs` missing `NetTopologySuite` (3) and `OpenCvSharp` (1) references, plus that legacy file's duplicate-using warning; it has no EM Planner errors. +- Verified commit: `aa62d6b` ## Preserved Workspace State -- The workspace already contains many unrelated Map, CoarsePath, PathSmoothing, project-file, report, and documentation changes. They belong to the user and must remain untouched and unstaged. +- The workspace continues to contain many unrelated Map, CoarsePath, PathSmoothing, project-file, report, and documentation changes. They belong to the user and remain untouched and unstaged. - Use explicit file paths for every `git add`; never stage the whole workspace. -- Inspect the existing diff before modifying `ClumsyPilot/ClumsyPilot.csproj`, then append only the Stage 1 rules required by the Foundation plan. -- The normal `ClumsyPilot.csproj` build can be blocked by legacy `auto_avoidance/MultiWheelAutoAvoidance.cs` references to `NetTopologySuite` and `OpenCvSharp`. -- Stage 1 used the isolated `EMPlannerVerificationHost` rule. The normal project build was intentionally not used as a Stage 1 gate and no legacy functionality was deleted or rewritten. -- Start and end `git status --short` both retain the user's unrelated changes; only the Stage 1 source and host additions were committed. +- The existing user hunk in `ClumsyPilot/ClumsyPilot.csproj` remains preserved. Do not clean, rewrite, or stage it. +- The normal `ClumsyPilot.csproj` build remains blocked by legacy `auto_avoidance/MultiWheelAutoAvoidance.cs` references to `NetTopologySuite` and `OpenCvSharp`; do not delete or bypass legacy functionality to change this baseline. ## Decisions Needed -- None. Stage 1 completed within scope. +- None. Stage 2 completed within scope. ## Next Stage -- Stage: 2 — Foundation coordinates and corridor -- Readiness: Ready for Stage 2 entry checks. -- Plan: `docs/superpowers/plans/2026-08-03-em-planner-foundation-implementation.md` +- Stage: 3 — OSQP contracts and native loading +- Readiness: Ready for Stage 3 entry checks. +- Plan: `docs/superpowers/plans/2026-08-03-em-planner-osqp-backend-implementation.md` - Tasks: - - Task 4 — Reverse-Safe Frenet Projection and Reconstruction - - Task 5 — Topology-Preserving Static Corridor - - Task 6 — Foundation Documentation and Gate + - Task 1 — Solver-Neutral Sparse QP Contracts + - Task 2 — Reproducible OSQP 1.0.0 Native Package + - Task 3 — Absolute-Path Native Loader and ABI Structures - Entry checks: - - Confirm branch `trajplanner`. - - Confirm `e12eb31`, `b326431`, and `e492e16` exist and each has only its recorded Stage 1 task files. - - Confirm the staging area is empty. - - Capture `git status --short` before editing. - - Run the isolated host `foundation` and `segmentation` groups; both must pass before Task 4 starts. - - Preserve all unrelated user changes, including the existing modified `ClumsyPilot.csproj` hunk. + - Confirm branch `trajplanner`, commits through `aa62d6b`, and an empty staging area. + - Capture `git status --short` before editing and preserve every unrelated user change. + - Confirm the Stage 2 checkpoint content and run `all-foundation` before Task 1. + - Read the OSQP implementation plan and verify its required native-build tools/files before modifying code. - Exit gate: - - Each of Foundation Tasks 4–6 has its own passing verification and independent commit. - - `all-foundation` passes twice with deterministic four-line output. - - The normal project baseline is recorded separately; only the documented legacy `auto_avoidance` dependency errors may remain. - - `git diff --check` reports no new whitespace errors and the staging area is empty after task commits. - - This progress file is updated to mark Stage 2 completed and Stage 3 ready, then committed alone. + - Tasks 1–3 each have an independent commit and their prescribed RED/GREEN evidence. + - The OSQP contract, reproducible package, absolute-path loader, ABI, and failure diagnostics checks pass. + - `all-foundation` remains passing; normal-project baseline remains separately recorded. + - `git diff --check` is clean; the staging area is empty; a Stage 3 progress checkpoint is committed alone. ## Next-Window Prompt @@ -72,49 +72,32 @@ 工作目录:D:\Users\Desktop\项目\prakrobot\ParkingRobot -本窗口是阶段 2:Foundation 坐标与走廊,只执行 Foundation 实施计划的 Task 4–6,不得提前执行阶段 3 或后续阶段。 +本窗口是阶段 3:OSQP 契约与原生加载,只执行 `docs/superpowers/plans/2026-08-03-em-planner-osqp-backend-implementation.md` 的 Task 1–3;不得提前执行阶段 4 或后续阶段。 开始工作前必须完整读取: 1. docs/superpowers/specs/2026-08-03-em-planner-ls-st-design.md 2. docs/superpowers/specs/2026-08-03-em-planner-windowed-execution-design.md 3. docs/superpowers/progress/em-planner-progress.md -4. docs/superpowers/plans/2026-08-03-em-planner-foundation-implementation.md +4. docs/superpowers/plans/2026-08-03-em-planner-osqp-backend-implementation.md 执行时使用 executing-plans、test-driven-development 和 verification-before-completion 技能,并完整读取对应 SKILL.md。不要使用子代理。 开始前: -- 确认工作目录和分支 trajplanner; -- 确认提交 e12eb31、b326431 与 e492e16 存在; -- 检查 git status --short 和暂存区; -- 保存开始时的工作区状态用于结束时对照; -- 当前工作区存在大量用户修改,全部保留,不得清理、覆盖或顺带提交; -- 如果进度文件、Git 或实际文件不一致,先诊断并报告,不要直接覆盖。 -- 运行: - - `dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- foundation` - - `dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- segmentation` - 两者必须通过后才能开始 Task 4。 - -阶段范围: -- Task 4:Reverse-Safe Frenet Projection and Reconstruction; -- Task 5:Topology-Preserving Static Corridor; -- Task 6:Foundation Documentation and Gate。 +- 确认工作目录、分支 `trajplanner`、Stage 1–2 提交(含 `06687e2`、`2d252ff`、`aa62d6b`)及暂存区为空。 +- 保存 `git status --short` 作为结束对照;保留所有既有用户修改,绝不清理、覆盖或顺带提交。 +- 核对本进度文件与 Git;若不一致,先诊断并报告。 +- 运行 `dotnet run --project ClumsyPilot/tests/EMPlannerVerificationHost/EMPlannerVerificationHost.csproj -- all-foundation`,必须通过后才开始 Task 1。 +- 记录正常项目基线:旧 `auto_avoidance/MultiWheelAutoAvoidance.cs` 缺失 `NetTopologySuite`/`OpenCvSharp` 引用仍可存在,不得通过删除旧功能规避。 执行要求: -- 严格按 Foundation 计划逐任务进行 TDD; -- 每个任务先运行计划指定的失败验证,再实现最小内容,再运行通过验证; -- 每个任务形成独立提交,只用显式路径 git add; -- 修改 ClumsyPilot/ClumsyPilot.csproj 前先查看现有差异,只追加本阶段要求; -- 不修改无关 Map、CoarsePath、PathSmoothing 和旧 auto_avoidance 文件; -- 不实现 OSQP、LS、ST、滚动执行或动态障碍功能; -- 主项目既有 auto_avoidance 依赖失败不能通过删除旧功能规避;使用计划中的隔离验证宿主; -- 任何完成声明前运行计划指定验证和 git diff --check。 +- 严格逐任务 TDD:RED、最小 GREEN、计划指定验证;每项独立提交,只显式暂存计划范围文件。 +- 不修改无关 Map、CoarsePath、PathSmoothing 或旧 auto_avoidance。 +- 不实现 LS、ST、滚动执行、动态障碍或阶段 4 OSQP solve lifecycle。 +- 完成声明前运行计划指定验证和 `git diff --check`。 阶段结束时: -- 确认 Task 4–6 各有独立提交和测试证据; -- 运行完整 Foundation 阶段出口验证(`all-foundation` 两次)及计划指定的正常项目基线检查; -- 核对每个提交只包含计划文件,暂存区为空; -- 更新 docs/superpowers/progress/em-planner-progress.md:记录提交、验证命令和结果,将阶段 2 标为 Completed,将阶段 3 标为 ready; -- 只暂存进度文件并单独提交阶段检查点; -- 返回本阶段完成内容、提交列表、测试证据、遗留问题; -- 给出阶段 3 可直接复制的新窗口提示词。 +- 完成 Task 1–3 的独立提交和测试证据;执行 OSQP 阶段出口验证,并确认 `all-foundation` 仍通过。 +- 按计划记录正常项目基线;暂存区为空。 +- 更新并单独提交 `docs/superpowers/progress/em-planner-progress.md`,将 Stage 3 标为 Completed、Stage 4 标为 Ready。 +- 返回提交、证据、遗留问题和 Stage 4 提示词。 ```