From ffa404d23643468baa8c89242a0857d71ae329fa Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 13 May 2026 17:31:49 +0200 Subject: [PATCH] =?UTF-8?q?docs(B.4b):=20correct=20file=20paths=20?= =?UTF-8?q?=E2=80=94=20WorldPicker=20lives=20in=20AcDream.Core.Selection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original spec placed WorldPicker in src/AcDream.App/Rendering/ and the test in tests/AcDream.App.Tests/, but AcDream.App.Tests doesn't exist as a project. Moved to AcDream.Core.Selection where it conceptually belongs (no App-layer deps; only WorldEntity + System.Numerics) and where the existing AcDream.Core.Tests project can hold the tests. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../specs/2026-05-13-phase-b4b-design.md | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/superpowers/specs/2026-05-13-phase-b4b-design.md b/docs/superpowers/specs/2026-05-13-phase-b4b-design.md index b3ecce1..e160d3b 100644 --- a/docs/superpowers/specs/2026-05-13-phase-b4b-design.md +++ b/docs/superpowers/specs/2026-05-13-phase-b4b-design.md @@ -123,11 +123,15 @@ server's reply. Outbound is the only block. One new file + edits to `GameWindow.cs`. -**New:** `src/AcDream.App/Rendering/WorldPicker.cs` — static helper -class in `AcDream.App.Rendering` namespace. Two pure methods, no -state, no DI. Lives next to `GameWindow.cs` because the picker -shares `WorldEntity` shape knowledge with the rendering layer (uses -`.ServerGuid` + `.Position`). +**New:** `src/AcDream.Core/Selection/WorldPicker.cs` — static helper +class in `AcDream.Core.Selection` namespace. Two pure methods, no +state, no DI. **Lives in Core** (not App) because it has no App-layer +dependencies: it operates on `WorldEntity` (Core) plus +`System.Numerics` matrices/vectors. Putting it in Core also means it +can be unit-tested via the existing `AcDream.Core.Tests` project; no +new test project required (`AcDream.App.Tests` does not exist as of +2026-05-13 and creating it would add more LOC than the picker +itself). **Edited:** `src/AcDream.App/Rendering/GameWindow.cs`: 1. Rename field `_selectedTargetGuid` → `_selectedGuid` (project-wide @@ -299,8 +303,8 @@ player walks through doorway ### Testing -**Unit tests** — `tests/AcDream.App.Tests/Rendering/WorldPickerTests.cs` -(new file): +**Unit tests** — `tests/AcDream.Core.Tests/Selection/WorldPickerTests.cs` +(new file in existing test project): | Test | Scenario | Asserts | |---|---|---| @@ -363,8 +367,8 @@ This is one slice. No further sub-slicing. | Step | Files | LOC | Subagent? | |---|---|---|---| -| 1. Write `WorldPickerTests.cs` (TDD: tests first) | `tests/AcDream.App.Tests/Rendering/WorldPickerTests.cs` (new) | ~80 | Yes (Sonnet) — bounded TDD task | -| 2. Create `WorldPicker.cs` static helper | `src/AcDream.App/Rendering/WorldPicker.cs` (new) | ~50 | Same agent as step 1 | +| 1. Write `WorldPickerTests.cs` (TDD: tests first) | `tests/AcDream.Core.Tests/Selection/WorldPickerTests.cs` (new) | ~80 | Yes (Sonnet) — bounded TDD task | +| 2. Create `WorldPicker.cs` static helper | `src/AcDream.Core/Selection/WorldPicker.cs` (new) | ~50 | Same agent as step 1 | | 3. Rename `_selectedTargetGuid` → `_selectedGuid` in `GameWindow.cs` | 1 file edit | ~5 sites | Manual or Sonnet | | 4. Add 3 switch cases + 3 helper methods in `GameWindow.OnInputAction` | 1 file edit | ~40 | Manual or Sonnet | | 5. `dotnet build` + `dotnet test` green | — | — | Manual |