# EM Planner Execution Progress

## Current State

- Current stage: 1 — Foundation contracts and boundaries
- Stage status: NotStarted
- Current branch: `trajplanner`
- Last checkpoint commit: None; Stage 1 has not started
- Protocol design baseline: `554c84f`
- Implementation-plan baseline: `8dd8ff0`

## Completed Tasks

| Stage | Plan | Tasks | Commits | Verification |
|---:|---|---|---|---|
| — | — | — | — | No implementation task has started |

## Current Verification

- Commands:
  - `git cat-file -e 554c84f^{commit}`
  - `git cat-file -e 8dd8ff0^{commit}`
  - `git branch --show-current`
  - `git diff --cached --name-only`
- Result: Bootstrap prerequisites passed; Stage 1 entry is ready
- Verified commit: `554c84f` for protocol design and `8dd8ff0` for implementation plans

## 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.
- 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 must use the isolated `EMPlannerVerificationHost` rule from the Foundation plan. Do not delete or rewrite legacy functionality to hide the baseline build failure.

## Decisions Needed

- None. The Stage 1 scope and contracts are approved.

## Next Stage

- Stage: 1 — Foundation contracts and boundaries
- Plan: `docs/superpowers/plans/2026-08-03-em-planner-foundation-implementation.md`
- Tasks:
  - Task 1 — Verification Host and Immutable Contracts
  - Task 2 — Configuration, Diagnostics, and Request Validation
  - Task 3 — Direction Segmentation and Exact Boundary Anchors
- Entry checks:
  - Confirm branch `trajplanner`.
  - Confirm commits `554c84f` and `8dd8ff0` exist.
  - Confirm the staging area is empty.
  - Capture `git status --short` before editing.
  - Confirm no prior Stage 1 functionality commit is recorded; if EM files already exist, inspect and reconcile them before continuing.
- Exit gate:
  - Each of Foundation Tasks 1–3 has its own passing verification and independent commit.
  - The Foundation verification host passes `foundation` and `segmentation` groups required through Task 3.
  - Exact gear-switch approach/departure identities and exact horizon anchors are verified.
  - `git diff --check` reports no new whitespace errors.
  - The staging area is empty after all task commits.
  - This progress file is updated to mark Stage 1 completed and Stage 2 ready, then committed alone.

## Next-Window Prompt

```text
请继续 ParkingRobot 仓库的 EM Planner 多窗口实施。

工作目录：D:\Users\Desktop\项目\prakrobot\ParkingRobot

本窗口是阶段 1：Foundation 契约与边界，只执行 Foundation 实施计划的 Task 1–3，不得提前执行 Task 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

执行时使用 executing-plans、test-driven-development 和 verification-before-completion 技能，并完整读取对应 SKILL.md。不要使用子代理。

开始前：
- 确认工作目录和分支 trajplanner；
- 确认提交 554c84f 与 8dd8ff0 存在；
- 检查 git status --short 和暂存区；
- 保存开始时的工作区状态用于结束时对照；
- 当前工作区存在大量用户修改，全部保留，不得清理、覆盖或顺带提交；
- 如果进度文件、Git 或实际文件不一致，先诊断并报告，不要直接覆盖。

阶段范围：
- Task 1：Verification Host and Immutable Contracts；
- Task 2：Configuration, Diagnostics, and Request Validation；
- Task 3：Direction Segmentation and Exact Boundary Anchors。

执行要求：
- 严格按 Foundation 计划逐任务进行 TDD；
- 每个任务先运行计划指定的失败验证，再实现最小内容，再运行通过验证；
- 每个任务形成独立提交，只用显式路径 git add；
- 修改 ClumsyPilot/ClumsyPilot.csproj 前先查看现有差异，只追加本阶段要求；
- 不修改无关 Map、CoarsePath、PathSmoothing 和旧 auto_avoidance 文件；
- 不实现 Frenet、静态走廊、OSQP、LS、ST、滚动执行或动态障碍功能；
- 主项目既有 auto_avoidance 依赖失败不能通过删除旧功能规避；使用计划中的隔离验证宿主；
- 任何完成声明前运行计划指定验证和 git diff --check。

阶段结束时：
- 确认 Task 1–3 各有独立提交和测试证据；
- 运行截至 Task 3 的 Foundation 阶段出口验证；
- 核对每个提交只包含计划文件，暂存区为空；
- 更新 docs/superpowers/progress/em-planner-progress.md：记录提交、验证命令和结果，将阶段 1 标为 Completed，将阶段 2 标为 ready；
- 只暂存进度文件并单独提交阶段检查点；
- 返回本阶段完成内容、提交列表、测试证据、遗留问题；
- 给出阶段 2 可直接复制的新窗口提示词。
```
