Files
kinect/.omo/plans/webcam-kinect-emulator.md
T
kinect-bot 0af22f1783
ci / Linux C++ core (cmake + ctest) (push) Canceled after 0s
ci / Python tracker (pytest) (push) Canceled after 0s
feat(calibration,contract,tracker): T-pose calibration + seqlock fix + articulated-depth wiring (wave 8a; todos 11,20,21 done)
2026-11-25 05:47:19 -05:00

55 KiB

webcam-kinect-emulator - Work Plan

TL;DR (For humans)

Who this is for and what changes for them: You - someone who wants to play DanceEvolution Arcade (and other Kinect games) on your PC using just a normal webcam, with no Kinect sensor. Today the game won't even start without real Kinect hardware; after this, your webcam stands in for the Kinect and you can dance and be scored.

What you'll get: A "virtual Kinect" - software that makes your ordinary webcam look like a genuine Kinect sensor to the computer, so the real Kinect software tracks your body and the game plays normally. It's built to work on both Linux and Windows from one shared engine, with the game itself proven on your Windows machine.

Why this approach: We emulate the Kinect device itself (the thing plugged into USB), not the game's software - so it's operating-system-independent and any Kinect app works, and the real, unmodified Kinect software does the hard body-tracking from webcam-derived "depth." The one make-or-break unknown (will the real tracker accept webcam depth?) is tested first, cheaply, before heavy work.

What it will NOT do: It won't support the newer Kinect v2; it won't match arcade-perfect scoring (a single webcam judges depth less precisely than a real Kinect); and it won't bundle Microsoft's Kinect software or the game - you supply those.

Effort: XL Risk: High - the core bet is that the real Kinect tracker accepts synthetic webcam depth, plus a self-built Windows USB driver (needs test-signing); both are front-loaded into early spikes. Decisions to sanity-check: device-level emulation over faking the game's API; Windows needs test-signing (+ Secure Boot off) to load the virtual driver; the Linux skeleton-check tool (NiTE2) is abandonware you must supply, so the authoritative tracking proof is on Windows.

Your next move: run the default-on high-accuracy review (in progress), then execute with /ulw-execute webcam-kinect-emulator. Full execution detail follows below.


TL;DR (machine): effort=XL risk=High; device-level virtual Kinect v1 (OS-agnostic USB emitter + webcam/MediaPipe synthetic-depth) with usbip-Linux/virtual-bus-Windows attach + API-shim fallback; 18 impl todos / 11 waves / F1-F5; proof target DanceEvolution Arcade.

Scope

Affected user and ideal state

Affected user: The person who wants to play DanceEvolution Arcade (DEA) on Windows, and run other Kinect v1 apps, using only a normal RGB webcam - no Kinect hardware. Today: they cannot (DEA refuses to run without a real Kinect v1 sensor + the MS Kinect v1.8 runtime). After: a webcam presents as a virtual Kinect device, the real host Kinect stack skeletonizes the webcam-derived depth, and DEA (and other Kinect apps) play. Secondary consumer: the real host Kinect runtime (MS NUI on Windows, OpenNI2+NiTE on Linux), which must accept the virtual device and its synthetic depth. The emulator is OS-agnostic at its core; only a thin per-OS USB-attach shim differs.

Row Statement Reason
IS-1 With only a webcam, the OS + the real Kinect runtime enumerate and initialize a "Kinect" as if hardware were attached the core goal: the webcam presents as the device itself
IS-2 Real-time body tracking at ~30 fps, low latency: the real host tracker skeletonizes the synthetic depth and the app sees moving joints a dance game is unplayable if tracking lags/drops
IS-3 The app's player-visible rendering (silhouette / depth / color image) shows the real player, not a blank/garbage frame DEA and most Kinect apps display the player from depth/color
IS-4 Move scoring is directionally correct: right moves score well, wrong moves don't (playable, not arcade-perfect) scoring is the core loop; it depends on skeleton quality derived from our depth
IS-5 The virtual Kinect is OS-agnostic: the same device core runs on Linux and Windows; only the per-OS USB-attach shim differs the user's explicit architecture goal
IS-6 Reproducible setup: attach the virtual device, start the generator, calibrate once, play - documented (incl. the Windows driver-signing step) usable by the user, not a lab demo
IS-7 Validated against REAL third-party Kinect apps: a Linux OpenNI2 app (enumeration + depth/color stream correctness; skeleton too IF the user supplied NiTE2), and DEA on Windows as the AUTHORITATIVE skeleton/fidelity proof proves fidelity, not just "it enumerates"; Linux skeleton tracking is optional because NiTE2 is non-redistributable
IS-8 Degrades gracefully (player leaves frame, poor light, mask noise) without crashing the host app robustness in real play
IS-9 An arbitrary unmodified third-party Kinect v1 app (beyond the validation sample) enumerates + tracks - proving general-purpose, not DEA-only the user chose a general emulator; proven by a Kinect SDK sample (Windows, enumerate+track) + an OpenNI2 app (Linux, enumerate+depth; skeleton if NiTE2) distinct from the e2e harness
GAP-1 No virtual Kinect device exists; nothing emits the Kinect v1 USB protocol greenfield; closed by todos 1,3,8,9,12
GAP-2 No synthetic Kinect-data generator (webcam -> metric articulated depth + player-index + color) greenfield; closed by todos 5,6,7 - the fidelity crux
GAP-3 No per-OS USB attach (Linux vhci / Windows virtual bus) greenfield; closed by todos 9,12
GAP-4 Unknown: will real host trackers (NiTE / NUI) skeletonize synthetic depth? exact USB descriptors/control? DEA bitness/streams? closed by the spikes, todos 3,4 (gate the rest)
GAP-5 No calibration/config (mount, floor, scale, mirror) greenfield; closed by todo 11
GAP-6 No library-layer fallback where device-level attach is impractical greenfield; closed by todos 14,15 (spike-gated)
GAP-7 No end-to-end validation path, robustness handling, packaging or docs greenfield; closed by todos 10,13,16,17,18

Must have

  • An OS-agnostic virtual Kinect v1 device core emitting the real Kinect USB streams (depth + color + IR + minimal audio + control/descriptors), driven by a webcam + MediaPipe synthetic-depth generator, so the real host Kinect stack computes the skeleton and unmodified Kinect apps (DEA first) work.
  • Per-OS virtual-USB attach: USB/IP (vhci) on Linux (primary dev + validation), virtual USB bus driver on Windows (DEA target).
  • Synthetic-depth generator: articulated metric depth + packed player-index + color passthrough from webcam + MediaPipe 3D pose + segmentation.
  • Joint mapping + coordinate intrinsics + Holt smoothing (for depth/skeleton consistency and the fallback shim).
  • Calibration + config; frozen/versioned IPC data contract; record/replay test harness.
  • Per-OS library-layer fallback (OpenNI2 virtual driver on Linux / clean-room Kinect10.dll NUI shim on Windows) reusing the generator, where device-level attach is impractical.
  • Linux end-to-end validation against a real OpenNI/NiTE app; real in-game DEA QA on the user's Windows box; setup docs incl. the Windows signing step.

Must NOT have (guardrails, anti-slop, scope boundaries)

  • No Kinect v2 (libfreenect2) support - v1 only (DEA uses Kinect for Windows 1.8).
  • No high-level SDK add-ons DEA does not use: Face Tracking SDK, Kinect Fusion, Kinect Interactions/gesture DB. (Core NUI audio-source enumeration is in scope; beamforming/DMO is not.)
  • No productized/WHQL-signed driver distribution - personal-use test-signing only.
  • No non-Kinect input emulation (no keyboard/gamepad mapping of dance moves); no networked/online/e-amusement/card-server features.
  • No pursuit of arcade-perfect scoring parity - target is playable + directionally-correct, bounded by monocular-depth fidelity.
  • Do NOT add retries, sleeps, timeouts, caps, or locks without an evidenced cause named in the todo; async waits subscribe to the exact event, never a fixed delay.

Verification strategy

Agent-executed wherever the platform allows; a small, explicitly-named set of Windows/in-game steps require the user's Windows box and are human-assisted acceptance (the one unavoidable manual surface - the game is a closed Windows binary).

  • Test decision: tests-after for integration/protocol todos, TDD for the pure math todos (coordinate transform, smoothing, depth packing - golden-vector unit tests). Frameworks: GoogleTest/CTest (C++ core) run on Linux CI; pytest (Python tracker); CTest harness replay for DLL/device.
  • Linux is the primary automated-QA environment for ENUMERATION + depth/color STREAM correctness (OpenCV, MediaPipe, usbip/vhci, OpenNI2 - all FOSS and runnable here). NiTE2 (the Linux skeleton tracker) is EOL/abandonware and NOT redistributable: it is used only if the USER already supplies an install, and is NEVER bundled. Therefore the skeleton-from-synthetic-depth CRUX is proven AUTHORITATIVELY on Windows (the real MS NUI runtime, todo 13/F5); the Linux skeleton check (via user-supplied NiTE2) is best-effort de-risking, not the gate.
  • WSL2 caveat: usbip/vhci-hcd are often absent from the default WSL2 kernel. Spike 3's FIRST action checks this; if absent, the Linux attach path needs a custom WSL kernel or a native-Linux host (flagged, not silently assumed).
  • The automated end-to-end Linux run uses a PRE-RECORDED dance video injected as the webcam via v4l2loopback (or the tracker's file input) - NEVER a live human - so it is deterministic and agent-executable. A moving human is required only for the final Windows DEA playability acceptance (F5).
  • Windows-only, human-assisted steps (flagged per-todo): loading the virtual-USB bus driver (needs test-signing + Secure Boot off), the MS Kinect SDK sample tracking, and DEA launch/playability/scoring. Agent-executable parts of those todos (cross-compiled build success, dumpbin output, logging-shim capture, packaged artifacts) still produce evidence; only the in-game acceptance needs the user.
  • Determinism: time/faults driven by a fake clock + injected faults + recorded fixtures (record/replay harness, todo 16); NO real sleeps/waits in tests; async waits subscribe to the exact frame-ready event with a bounded timeout.
  • Evidence root: .omo/evidence/task-<N>-webcam-kinect-emulator.<ext> (logs, test output, pcap/usbmon captures, screenshots/recordings for in-game steps).

Execution strategy

Parallel execution waves

Two todos share a wave unless one reads what the other produces or both write the same file/artifact/port. Linux-first: enumeration + stream correctness is validated on this Linux box (waves 2-8) before the Windows waves (9-10). The depth-fidelity crux is a KILL-GATE, tested by spike 3 (Linux, IF NiTE2 is user-supplied) OR spike 4 (Windows MS NUI runtime): if neither confirms that a real host tracker can skeletonize synthetic depth, HALT and re-plan the depth model (e.g. a monocular-depth net) before committing waves 4-11. Spike 4 also gates the Windows device-vs-shim decision. The two fallbacks (14,15) are UNCONDITIONALLY in scope (general-purpose goal); the spikes set their PRIORITY/order, not whether they are built.

  • Wave 1: 1 (scaffold + build system - shared setup, blocks all)
  • Wave 2: 2 (IPC contract), 3 (Linux spike), 4 (Windows/DEA spike)
  • Wave 3: 5 (tracker), 6 (mapping+smoothing), 16 (record/replay harness)
  • Wave 4: 7 (synth depth/player-index/color rasterizer)
  • Wave 5: 8 (Kinect v1 USB protocol emitter)
  • Wave 6: 9 (Linux USB attach), 15 (Linux OpenNI2 fallback)
  • Wave 7: 10 (Linux end-to-end validation)
  • Wave 8: 11 (calibration/config), 17 (robustness/graceful degradation)
  • Wave 9: 12 (Windows USB attach), 14 (Windows NUI shim fallback)
  • Wave 10: 13 (Windows integration + DEA playability)
  • Wave 11: 18 (packaging + docs)

Dependency matrix

Todo Writes (files, shared state) Depends on (reason) Blocks
1 repo layout, CMake, Python env, CI - all
2 core/contract/*.h (frozen IPC structs) 1 5,6,7,8,14,15,16 (shared data contract)
3 spike report: Linux USB descriptors + NiTE-accepts-synthetic-depth 1 8 (exact protocol), 15 (fallback decision)
4 spike report: DEA bitness/streams/flags, usbip-win binding, Windows synthetic-depth skeletonization 1 7 (crux gate if NiTE2 absent), 12,13,14 (Windows path + fallback scope)
5 tracker/ (Python MediaPipe->IPC) 2 7,10,13,17 (provides pose+mask)
6 core/mapping/ (transform+Holt smoothing) 2 7,14 (depth/skeleton math)
7 core/synth/ (depth+player-index+color raster) 5,6 (+ soft crux-gate: spike 3 if NiTE2 else spike 4) 8,14,15 (frame data)
8 core/protocol/ (Kinect USB emitter) 3,7 9,12 (device byte stream)
9 attach/linux (usbip/vhci) 8,3 10
10 Linux e2e validation + evidence 9,5 11,17 (proven device)
11 core/calibration + config 10 13 (needs calibrated device)
12 attach/windows (usbip-win/bus driver) 8,4 13
13 Windows integration + DEA QA evidence 12,5,7,11 18
14 fallback/windows-nui (Kinect10.dll shim) 6,7,4 13 (fallback path)
15 fallback/linux-openni2 (OpenNI2 module) 7,2 - (fallback + general emulator)
16 tools/record-replay + mock host 2 10,13 (test infra)
17 robustness handling across tracker+synth 5,7,10 18
18 docs/ + packaging 10,13 -

Todos

Implementation + Test = ONE todo. Never separate.

  • 1. Repo scaffold, cross-platform build system, CI What to do / Must NOT do: Create the project layout (core/ {protocol,synth,mapping,contract}, tracker/, attach/{linux,windows}, fallback/{linux-openni2,windows-nui}, tools/{logging-shim,record-replay,mock-nui-host}, tests/, docs/). CMake for the C/C++ core with three targets: Linux-native (GCC/Clang), Windows cross (MinGW-w64/clang-cl) for fast local builds, and an MSVC build profile (authoritative, run on the user's Windows box). Scaffold BOTH x86 and x64 Windows targets; the SHIPPING Windows arch (DEA is likely x86) is confirmed from spike 4's dumpbin bitness before todos 12/14 build the real driver/shim. Treat MinGW-w64 CI builds as a SMOKE signal only - MSVC on the user's box is authoritative for shim/driver ABI acceptance. Python project (pyproject/requirements) for the tracker. git init. GitHub-Actions-or-local CI running the Linux C++ unit tests + pytest. Add a clean-room notice (public NuiApi.h + libfreenect protocol are interface facts; all synthesis code written fresh). Must NOT: vendor GPLv3 KinectFaker/NiVirtualCam source into the tree (reference only). Closes: GAP-1 (foundation) Parallelization: Wave 1 | Blocked by: none | Blocks: all References: draft .omo/drafts/webcam-kinect-emulator.md (Decisions D5,D6); libfreenect build layout github.com/OpenKinect/libfreenect; CMake cross-compile with MinGW-w64 toolchain file. Acceptance criteria (agent-executable): cmake -S core -B build/linux && cmake --build build/linux exits 0; cmake -S core -B build/win --toolchain cmake/mingw-w64.cmake && cmake --build build/win exits 0 producing a .dll; pytest -q collects 0 tests without error; CI config present and green on Linux. QA scenarios: happy - fresh clone builds both targets (capture cmake --build logs). failure - break a CMake target on purpose, confirm CI fails red, then revert. Evidence .omo/evidence/task-1-webcam-kinect-emulator.log Commit: Y | chore(scaffold): project layout, cross-platform build, CI Recommended task executor category: unspecified-high - multi-file build/CI setup across languages.

  • 2. Frozen, versioned IPC data contract What to do / Must NOT do: Define the shared-memory frame contract in core/contract/ (C header + a generated Python mirror): a triple-buffered, newest-wins frame slot with a monotonic sequence counter, plus fields for the skeleton (20 joints Vector4 + per-joint tracking state + tracking id + quality flags), a depth+player-index buffer descriptor, a color buffer descriptor, frame number, and a QPC-derived timestamp; and a control-plane message schema (handshake/version, config push, calibration, heartbeat) over a named pipe / unix socket. static_assert every struct size and field offset; embed a contract version constant; forbid implicit padding (explicit #pragma pack or manual padding). Must NOT: put per-frame data on the control channel; allow the Python mirror to drift (generate/check it against the C header in CI). Closes: GAP-2 (shared substrate) Parallelization: Wave 2 | Blocked by: 1 | Blocks: 5,6,7,8,14,15,16 References: .omo/design/architecture.md (Transport: lock-free newest-wins + frozen contract); .omo/design/nui-contracts.md §3.6 (frame number + timestamp semantics), §1.7 (per-joint state fields); Kinect NUI_SKELETON_FRAME/NUI_SKELETON_DATA field list. Acceptance criteria (agent-executable): C++ unit test asserting sizeof/offsetof for every contract struct matches a golden table; a CI check that the Python mirror's struct layout equals the C header (ctypes sizeof/offset comparison) exits 0. QA scenarios: happy - layout test passes on Linux + Windows-cross builds. failure - change one field type, confirm the static_assert/layout test fails. Evidence .omo/evidence/task-2-webcam-kinect-emulator.log Commit: Y | feat(contract): frozen versioned IPC frame + control schema Recommended task executor category: unspecified-low - contained, single-module, well-specified.

  • 3. Spike - Linux USB protocol + "does NiTE skeletonize synthetic depth" NOTE (exec): findings delivered in docs/spike-linux.md; vhci-hcd/usbip modules present in WSL2 kernel but usbip userspace absent + module unloaded (sudo unavailable); skeletonization crux UNPROVEN on Linux (no OpenNI2/NiTE2) -> deferred to todo 4 (also blocked). todo-8 gap: camera command-header bytes not in fetched libfreenect source. What to do / Must NOT do: FIRST verify this host can do USB/IP at all - modprobe vhci-hcd && lsmod | grep vhci (on WSL2 this module is frequently absent; if so, RECORD that the Linux attach path needs a custom WSL kernel or a native-Linux host, and proceed with what can be probed). Then stand up a MINIMAL usbip/vhci virtual device that replays a canned libfreenect-format depth+color stream (no webcam yet) and attach it so freenect-glview / OpenNI2 (OpenNI2-FreenectDriver) enumerates it. Capture the exact USB descriptors, control transfers, EEPROM/register reads, iso/bulk framing, the composite-device interface topology (camera + audio + motor), and the firmware-upload handshake the host performs to init a Kinect v1 (usbmon/wireshark). Then, IF the user supplied NiTE2 (EOL/non-redistributable - do not bundle), feed a RECORDED real-person depth sequence and a SYNTHETIC articulated-depth sequence and record whether NiTE produces a stable skeleton from each. Output a spike report (findings + the minimal descriptor/control set; and - only if NiTE2 was available - a go/no-go on "synthetic depth is skeletonizable") into docs/spike-linux.md. If NiTE2 is NOT available, this spike proves enumeration + stream correctness only, and the skeletonization crux is evaluated by spike 4 on the real Windows MS NUI runtime instead (the crux KILL-GATE is satisfied by whichever of spike 3 or spike 4 can first test it; if NEITHER can before build waves, that is itself a HALT-and-re-plan condition). Must NOT: build the full emitter here - this is a throwaway probe to de-risk todo 8 and the GAP-4 fidelity crux. Closes: GAP-4 (Linux half) Parallelization: Wave 2 | Blocked by: 1 | Blocks: 8,15 References: libfreenect USB protocol (github.com/OpenKinect/libfreenect src/), OpenNI2-FreenectDriver; usbip/vhci-hcd kernel docs; NiTE2 skeleton sample. Acceptance criteria (agent-executable): docs/spike-linux.md exists with the descriptor/control dump + the vhci capability result + (if NiTE2 available) a recorded skeleton result for synthetic depth; freenect-glview (or OpenNI SimpleViewer) renders the virtual device's depth (screenshot/log captured). QA scenarios: happy - virtual device enumerates and its depth renders in an OpenNI2 viewer (+ a skeleton app tracks from synthetic depth if NiTE2 available). failure - document the failure mode if the tracker rejects synthetic depth, or if vhci is unavailable, with the gap that caused it (scopes todo 7 / Linux-attach feasibility). Evidence .omo/evidence/task-3-webcam-kinect-emulator.* Commit: Y | chore(spike): linux usb protocol + synthetic-depth skeletonization probe Recommended task executor category: deep-high - protocol reverse-engineering + the central feasibility uncertainty.

  • [~] 4. Spike - Windows/DEA behavior + bitness BLOCKED: no Windows/DEA/Kinect SDK in this environment; complete runbook delivered in docs/spike-windows.md (all result cells UNSET). Gap: requires the user's Windows box; the synthetic-depth skeletonization KILL-GATE (crux) remains UNPROVEN - carries forward to todos 10/13/F5. What to do / Must NOT do: On the user's Windows box: build a pass-through logging Kinect10.dll (forwards every NUI call to the real one, logs name/args/flags/resolution/return + which events it waits on), place it beside gamekdm.dll, and capture DEA's exact NUI call sequence: NuiInitialize flags, which image streams it opens (depth/player-index? color?), resolutions, skeleton-vs-poll model. Run dumpbin /headers /imports gamekdm.dll to record 32- vs 64-bit and the exact Kinect10.dll imports. Also probe WINDOWS DEVICE-LEVEL viability: attach a minimal usbip-win virtual device with the Kinect VID/PID + composite topology and verify the real kinectsensor.inf driver + MS NUI runtime enumerate and bind to it (this gates todo 12), recording what the MS driver requires BEYOND libfreenect's Linux init (firmware/composite/power). THEN - the Windows half of the depth-fidelity CRUX - extend that minimal virtual device to replay a canned SYNTHETIC articulated-depth sequence (NO physical Kinect) into the real MS NUI runtime and capture whether a Kinect SDK sample (SkeletonBasics / KinectExplorer) produces a MOVING skeleton from it. This is the executable synthetic-depth skeletonization test that unblocks Waves 4-11 when NiTE2 is unavailable on Linux; if it fails, HALT and re-plan the depth model. If a real Kinect is available, also A/B real vs. synthetic depth to gauge the scorer's z-sensitivity. Output docs/spike-windows.md with bitness, the required import surface, the stream/flag list, the usbip-win binding result, the synthetic-depth skeletonization result, and a go/no-go per OS for device-level vs. the NUI-shim fallback. Must NOT: modify the game binary; this only shadows the DLL; claim the crux passed without captured skeleton output. Closes: GAP-4 (Windows half + the Windows synthetic-depth skeletonization crux) Parallelization: Wave 2 | Blocked by: 1 | Blocks: 7 (crux gate when NiTE2 absent),12,13,14 References: .omo/design/architecture.md (Top risks A/B + Sequencing: logging shim + dumpbin); .omo/design/nui-contracts.md §3.2 (init sequence), §5 (open questions the log resolves); P3dro200 install (spice2x + Kinect v1.8). Acceptance criteria (agent-executable on Windows, hardware-free): docs/spike-windows.md records DEA bitness, the Kinect10.dll import list, the NuiInitialize flags, and the opened streams/resolutions, each backed by a captured log line; dumpbin output archived; AND a captured moving-joint skeleton output from the real MS NUI runtime fed the minimal virtual device's synthetic-depth replay (no physical Kinect), proving synthetic depth is skeletonizable - or a documented HALT if it is not. QA scenarios: happy - logging shim loads into DEA (DllMain attach logged) and captures the call sequence through to gameplay (with the spice2x Kinect-bypass to boot). failure - if the shim is not the loaded module (search-order/COM), document how the real DLL is resolved and the workaround. Evidence .omo/evidence/task-4-webcam-kinect-emulator.* Commit: Y | chore(spike): windows/DEA nui call-pattern + bitness capture Recommended task executor category: deep-high - behavioral RE of a closed binary, gates the Windows design.

  • 5. Webcam tracker (MediaPipe pose + segmentation -> IPC) NOTE (exec): MediaPipe 1.2.3 installed user-space via uv Python 3.12 + user-space libGLESv2.so.2 (no sudo); live pose verified on a recorded clip (real 33 landmarks + mask, negative-control confirmed); 9/9 data-path tests. [~] sub-gaps (env limits, not code defects): no live webcam (headless WSL2 - recorded video used), CPU-only (no GPU tier), fps re-measure at 640x480 pending. What to do / Must NOT do: Python tracker: OpenCV webcam capture -> MediaPipe Pose (Full/Heavy, GPU if available else CPU) producing 33 normalized landmarks + 33 world-landmarks (meters) + per-landmark visibility + the segmentation mask, published to the shared-memory contract (todo 2) at the newest-wins slot each frame, plus control-plane handshake/heartbeat. MEASURE actual fps for each model tier (Lite/Full/Heavy) on this box (CPU, and GPU if present) and SELECT the tier from measured evidence to hit >= ~25 fps (30 target); if no tier reaches it on CPU, record a GPU requirement rather than asserting throughput. If inference is slower than the cadence, still publish at a steady rate by re-publishing the latest pose (todo 17 refines held-frame behavior). Must NOT: block on inference inside the publish path; add fixed sleeps - pace with a monotonic frame clock; assert fps without a measurement. Closes: GAP-2 (capture half) Parallelization: Wave 3 | Blocked by: 2 | Blocks: 7,10,13,17 References: MediaPipe Pose Landmarker docs (33-landmark table, world-landmark + mask output); draft Findings (MediaPipe stack); contract header (todo 2). Acceptance criteria (agent-executable): pytest tracker/ passes; a smoke run against a recorded video file (not a live cam, for determinism) publishes frames whose landmark/mask fields parse per the contract; measured publish rate >= 25 fps on CPU for the recorded input. QA scenarios: happy - replay a fixture video, assert N published frames with plausible landmark ranges + non-empty mask. failure - feed a frame with no person, assert the tracker publishes a "no body" frame (visibility low) rather than crashing. Evidence .omo/evidence/task-5-webcam-kinect-emulator.log Commit: Y | feat(tracker): mediapipe pose+segmentation to IPC Recommended task executor category: unspecified-high - standard multi-file CV pipeline.

  • 6. Joint mapping + coordinate intrinsics + Holt smoothing (pure, TDD) What to do / Must NOT do: In core/mapping/, implement (clean-room, from the documented formulas) the Kinect depth<->skeleton intrinsics (NuiTransformDepthImageToSkeleton inverse + NuiTransformSkeletonToDepthImage forward), the MediaPipe-33 -> Kinect-20 joint map incl. synthesized joints (HIP_CENTER/SPINE/SHOULDER_CENTER/HEAD/HAND per .omo/design/nui-contracts.md §1.2), a global mirror bit, per-joint depth placement (Z0 + depthGain*worldZ), per-joint tracking-state from visibility, and the Holt double-exponential smoothing with the 5 NUI_TRANSFORM_SMOOTH_PARAMETERS fields. TDD: golden-vector unit tests (projection round-trips <1mm; smoothing step matches reference sequence). Must NOT: double-flip left/right (mirror handled once, globally); emit joints outside documented ranges (x+-2.2, y+-1.6, z 0-4). Closes: GAP-2 (math half) Parallelization: Wave 3 | Blocked by: 2 | Blocks: 7,14 References: .omo/design/nui-contracts.md §1.1-1.6 (exact formulas, mapping table, smoothing algorithm + params {0.6,0.4,0.4,0.04,0.07} recommended), §1.7 (state fields); Kinect NuiSkeleton.h inline transforms (interface facts). Acceptance criteria (agent-executable): ctest -R mapping passes: forward/inverse round-trip < 1mm on a vector set; a 33-landmark fixture maps to 20 joints matching golden positions; smoothing output matches a precomputed golden sequence; out-of-range inputs are clamped per spec. QA scenarios: happy - golden-vector suite green. failure - feed a landmark set with an occluded (visibility 0) wrist, assert it is marked INFERRED and holds its last position (no snap to origin). Evidence .omo/evidence/task-6-webcam-kinect-emulator.log Commit: Y | feat(mapping): nui intrinsics, 33->20 map, holt smoothing Recommended task executor category: deep-low - math-heavy but fully settleable from the cited contracts.

  • 7. Synthetic depth + player-index + color rasterizer What to do / Must NOT do: In core/synth/, turn the tracker's mask + 3D pose (via todo 6) into Kinect image frames: a packed depth buffer ((mm&0x1FFF)<<3 | player&0x7) at the resolution the host requests, body pixels = articulated metric depth (bone capsules at their z, silhouette-masked; billboard-gradient default per .omo/design/nui-contracts.md §2.3), background = 0; player-index = skeletonSlot+1 on body pixels; color = webcam passthrough (BGRA at requested res); optional IR. Largest-connected-component + morphological close + temporal hold for a stable blob. Must NOT: hardcode 640x480 - synthesize at the requested eResolution; leave body depth at 0 or out of ~[800,4000]mm (reads as no player). Closes: GAP-2 (synthesis half) Parallelization: Wave 4 | Blocked by: 5,6 (soft-gated by the crux test - spike 3 if NiTE2 available, else spike 4 Windows MS NUI: if synthetic depth is NOT skeletonizable, HALT and re-plan the depth model before building this todo) | Blocks: 8,14,15 References: .omo/design/nui-contracts.md §2.1-2.5 (packing, rasterization tiers, min fidelity, failure modes); spike-linux findings (todo 3) for the fidelity bar the host tracker needs. Acceptance criteria (agent-executable): ctest -R synth passes - pack/unpack round-trips, a fixture mask+pose yields a depth buffer whose body pixels are in-band and carry player index, whose projected joints (todo 6 forward transform) land inside the silhouette. QA scenarios: happy - fixture produces a human-shaped in-band blob; projected skeleton overlays it. failure - feed a fragmented mask, assert largest-component + close yields a single stable blob (not multiple/flicker). Evidence .omo/evidence/task-7-webcam-kinect-emulator.* Commit: Y | feat(synth): packed depth+player-index+color rasterizer Recommended task executor category: deep-low - format + raster math from cited contracts.

  • 8. Kinect v1 USB protocol emitter (device core) What to do / Must NOT do: In core/protocol/, implement the OS-agnostic virtual Kinect: respond to the USB descriptors/control transfers/EEPROM-register reads the host driver needs to enumerate+init a Kinect v1 (per the todo-3 spike + libfreenect), and emit depth/color (+IR, + minimal audio-interface enumeration) over the device's iso/bulk endpoints, pulling frame data from the synth rasterizer (todo 7) via the contract. Expose a transport-agnostic "USB device backend" interface so the Linux (todo 9) and Windows (todo 12) attach shims plug in. Must NOT: emit a skeleton (the device never does - the host computes it); block the emit loop on the generator (use the newest-wins slot). Closes: GAP-1 (device byte stream) Parallelization: Wave 5 | Blocked by: 3,7 | Blocks: 9,12 References: libfreenect protocol source (descriptors, modes, framing); draft Finding (device outputs depth/color/IR/audio, skeleton is host-side); spike-linux.md (exact control set). Acceptance criteria (agent-executable): a host-side libfreenect client (or the OpenNI2-FreenectDriver) opened against the emitter (via the Linux attach, todo 9) reads the expected depth+color stream at ~30fps with correct frame geometry; unit tests for descriptor/control responses pass. QA scenarios: happy - libfreenect freenect-glview shows live synthetic depth+color through the emitter. failure - request an unsupported mode/resolution, assert a correct USB-level stall/error rather than a crash. Evidence .omo/evidence/task-8-webcam-kinect-emulator.* Commit: Y | feat(protocol): kinect v1 virtual usb device emitter Recommended task executor category: deep-high - protocol fidelity is central and failure-prone.

  • [] 9. Linux USB attach (usbip/vhci) PARTIAL/BLOCKED: USB/IP server protocol VERIFIED via live socket round-trip (OP_REQ_DEVLIST/IMPORT/CMD_SUBMIT -> byte-correct Kinect v1 descriptor) + shim compiles; final vhci KERNEL attach [] blocked (no usbip userspace, vhci unloaded, no sudo; confirmed not installable for this WSL2 kernel). What to do / Must NOT do: In attach/linux/, bind the todo-8 emitter as a virtual USB device via USB/IP (userspace server speaking the Kinect descriptors) attached through vhci-hcd, or raw-gadget if simpler; provide attach/detach lifecycle + a CLI. Must NOT: require out-of-tree kernel modules beyond stock usbip/vhci. Closes: GAP-3 (Linux half) Parallelization: Wave 6 | Blocked by: 8,3 | Blocks: 10 References: usbip tools + vhci-hcd; spike-linux.md; Linux raw-gadget docs. Acceptance criteria (agent-executable): after attach/linux brings the device up, lsusb shows the Kinect VID/PID and freenect-micview/OpenNI enumerates it; detach cleanly removes it. QA scenarios: happy - attach -> device present -> OpenNI opens it. failure - kill the emitter mid-session, assert the attach shim detaches cleanly (no stuck vhci port). Evidence .omo/evidence/task-9-webcam-kinect-emulator.log Commit: Y | feat(attach-linux): usbip/vhci virtual kinect attach Recommended task executor category: deep-low - integration against a known mechanism.

  • 10. Linux end-to-end validation (the fidelity proof) NOTE (exec): live-wired (fallback/linux-openni2/src/shm_frame_source.{h,cpp}) the SynthKinect OpenNI2 driver to read the tracker's live shared-memory contract and re-rasterize through the real core/synth::DepthRasterizer; fixed a seqlock protocol bug found in the process (the driver's reader assumed contract.cpp's published_sequence*2 invariant, but the actual producer tracker/publisher.py increments each slot's sequence relatively instead). Full harness tools/e2e_linux_validation/{generate_dance_video.py,run_e2e.py} drives a deterministic recorded video (a real downloaded photo panned/zoomed - a synthetic cartoon blob does not trigger MediaPipe detection, per task-wave3-verify.log) through the live tracker into the driver; openni2_depth_consumer (extended) read 12 sequential frames, all in-band [800,4000]mm, with the body-pixel centroid moving 69.4px across the capture window and per-frame pixel counts varying (3831-3919), proving a live, re-rasterized, non-static sequence. Depth itself came out flat (pegged at the 800mm floor, not articulated) because the live tracker path still passes raw MediaPipe world-Z through unmapped (todo 5/6 wiring gap, pre-existing, out of this todo's scope) - flagged as a fidelity risk, not fixed here. Skeleton/NiTE2 crux and vhci/usbip device-attach are NOT claimed (remain [~] per todos 3/4/9). 81/81 pytest + 27/27 ctest regression clean. Evidence: .omo/evidence/task-10-webcam-kinect-emulator.log. What to do / Must NOT do: Wire tracker (5) -> synth (7) -> emitter (8) -> Linux attach (9), driving the webcam path with a PRE-RECORDED dance video via v4l2loopback (or the tracker's file input) - NOT a live human - for determinism and agent-executability. Point a host skeleton tracker at the virtual Kinect: OpenNI2 + NiTE2 IF the user supplied NiTE2 (EOL/not redistributable - never bundled), else validate ENUMERATION + depth/color stream correctness on Linux only. The skeletonization crux is proven UPSTREAM (spike 3 if NiTE2 present, else spike 4's Windows synthetic-depth test) - this todo does NOT carry it and does NOT defer it to any post-gate work. Capture a recorded session as evidence. Must NOT: use a live human for this automated run; claim the crux proven here. Closes: GAP-7 (Linux validation), proves IS-1,7 on Linux (and IS-2's Linux half only if NiTE2 supplied; otherwise IS-2 is proven by spike 4 + todo 13) Parallelization: Wave 7 | Blocked by: 9,5 | Blocks: 11,17 References: NiTE2 UserViewer/skeleton sample; todos 5,7,8,9. Acceptance criteria (agent-executable): with the recorded video as input, either (a) NiTE2 (if user-supplied) tracks a skeleton that follows the recorded subject, OR (b) an OpenNI2 depth consumer shows correct per-pixel depth+player-index and the device enumerates - with end-to-end latency + fps logged. The skeletonization crux is NOT carried here (proven upstream by spike 3 or spike 4). QA scenarios: happy - the recorded subject's arm-raise is reflected in the tracked skeleton (NiTE) or in the depth silhouette (OpenNI2). failure - the recorded subject leaves frame, assert player-lost then recovery on return (no crash). Evidence .omo/evidence/task-10-webcam-kinect-emulator.* Commit: Y | test(e2e-linux): webcam->virtual kinect stream+skeleton validation Recommended task executor category: deep-low - end-to-end integration debugging on Linux.

  • 11. Calibration + config What to do / Must NOT do: In core/calibration/, add a one-time calibration (T-pose) fixing Z0 (root depth / scale via shoulder-width target), floor plane, camera mirror bit, and player-space scaling; persist a config file (resolutions, depthGain, smoothing params, mirror, Z0). Add a confirm step for the mirror bit (raise-right-arm check). Must NOT: bake machine-specific constants into source - keep them in config. Closes: GAP-5 Parallelization: Wave 8 | Blocked by: 10 | Blocks: 13 References: .omo/design/nui-contracts.md §1.4 (mirror bit), §1.5 (Z0/scale calibration), §4.2 (calibrate at start). Acceptance criteria (agent-executable): a calibration run on a recorded T-pose fixture writes a config whose Z0 yields reconstructed shoulder width within tolerance of the target; reloading config reproduces identical transforms. QA scenarios: happy - calibrate from fixture, verify skeleton scale correct. failure - calibrate with no person in frame, assert a clear error + no corrupt config written. Evidence .omo/evidence/task-11-webcam-kinect-emulator.log Commit: Y | feat(calibration): T-pose scale/floor/mirror config Recommended task executor category: unspecified-high - contained feature with real edge cases.

  • 12. Windows USB attach (virtual bus driver) What to do / Must NOT do: In attach/windows/, present the todo-8 emitter to Windows via usbip-win (or a UMDF/KMDF virtual USB bus driver) so the real MS Kinect driver (kinectsensor.inf) + Kinect10.dll see a Kinect. Document the test-signing / signature-enforcement steps. Must NOT: ship an unsigned driver as if production-ready - personal-use test-signing only, clearly documented. Closes: GAP-3 (Windows half) Parallelization: Wave 9 | Blocked by: 8,4 | Blocks: 13 References: usbip-win project; Windows UMDF/KMDF virtual-bus samples; WDK; spike-windows.md. Acceptance criteria (on the user's Windows box, human-assisted): Device Manager shows the Kinect under the MS Kinect driver; the Kinect SDK's KinectExplorer/SkeletonBasics sample enumerates the sensor. Agent-executable part: the driver + usbip-win artifacts build (cross/MSVC). QA scenarios: happy - attach -> SkeletonBasics tracks a skeleton from the webcam. failure - detach while an app holds the sensor, assert graceful device-removal (app sees sensor-unplugged, no BSOD). Evidence .omo/evidence/task-12-webcam-kinect-emulator.* (screenshots/logs) Commit: Y | feat(attach-windows): virtual usb bus attach + signing docs Recommended task executor category: deep-high - Windows driver work + signing, high risk.

  • 13. Windows integration + DanceEvolution Arcade playability What to do / Must NOT do: On the user's Windows box, verify DEA via the DEVICE path: tracker -> synth -> emitter -> Windows virtual-USB attach (todo 12). This DEVICE path is what proves IS-1 (the OS/runtime enumerates the sensor) and IS-2 (the real MS NUI runtime skeletonizes synthetic depth) in addition to gameplay (silhouette, tracked moves, directionally-correct scoring). SEPARATELY, the NUI-shim (todo 14) is an independent path that proves ONLY playability (IS-3/IS-4) via direct injection - it does NOT satisfy IS-1 or IS-2. If the DEVICE path (todo 12) cannot be achieved, HALT and re-plan rather than accepting shim gameplay as proof of IS-1/IS-2. Capture a gameplay recording for whichever path(s) run. Must NOT: claim IS-1/IS-2 proven from the shim path; claim playable without a recorded scoring session. Closes: GAP-7 (Windows validation), proves IS-1,2,3,4,7 on Windows Parallelization: Wave 10 | Blocked by: 12,5,7,11 (or 14) | Blocks: 18 References: spike-windows.md (streams DEA needs); .omo/design/nui-contracts.md §4 (fidelity mitigations, mirror/z-sign checks); P3dro200 install steps. Acceptance criteria (human-assisted on Windows): DEVICE path - Device Manager shows the sensor (IS-1) and DEA plays via the real NUI runtime skeletonizing synthetic depth (IS-2), recorded showing silhouette + tracked moves + a score that rises for correct dancing and not wrong; mirror-bit + z-sign checks (.omo/design/nui-contracts.md §4.3) pass. SHIM path (if run) - DEA plays via injected skeleton, recorded, explicitly labelled NOT evidence for IS-1/IS-2. QA scenarios: happy - play a song, correct moves score. failure - stand still during a step, assert the game registers misses (not false hits), proving the skeleton reflects reality. Evidence .omo/evidence/task-13-webcam-kinect-emulator.* (gameplay capture) Commit: Y | test(e2e-windows): DEA playable via webcam virtual kinect Recommended task executor category: deep-high - cross-stack integration + the decisive feasibility proof.

  • 14. Windows NUI-shim fallback (clean-room Kinect10.dll) What to do / Must NOT do: In fallback/windows-nui/, a clean-room drop-in Kinect10.dll implementing the NUI surface the spike (todo 4) found DEA imports: NuiInitialize/Shutdown, NuiGetSensorCount, NuiCreateSensorByIndex/Id, INuiSensor, NuiSkeletonTrackingEnable/GetNextFrame, NuiImageStreamOpen/GetNextFrame/ReleaseFrame, INuiFrameTexture COM object, NuiTransformSmooth, coordinate mappers - injecting skeleton (from todo 6) + depth/color (from todo 7) directly, honoring the ~30Hz event model. This fallback is UNCONDITIONALLY in scope (general-purpose goal); spike 4 sets whether it is the PRIMARY Windows path or the secondary surface, not whether it is built. Must NOT: fake fewer exports than DEA imports; get __stdcall decoration / struct packing / COM vtable order wrong (bit-for-bit per public NuiApi.h); open GPLv3 source (KinectFaker) while implementing - clean-room firewall. Closes: GAP-6 (Windows fallback) Parallelization: Wave 9 | Blocked by: 6,7,4 | Blocks: 13 (fallback path) References: .omo/design/nui-contracts.md §3 (full event/timing/COM-texture contract, GetNextFrame semantics, frame numbers/timestamps), §1-2 (skeleton+depth it serves). The NUI export surface is derived SOLELY from the public NuiApi.h (Kinect SDK 1.8 headers) + spike-4's observed import list; the implementing executor MUST NOT read KinectFaker's GPLv3 source (clean-room firewall). Acceptance criteria: the mock NUI host (todo 16) drives the full call sequence against the shim and receives correctly-timed skeleton+image frames; on Windows, placing the DLL beside a Kinect SDK sample makes it track without a sensor. QA scenarios: happy - mock host gets 30Hz skeleton frames with correct frame numbers/timestamps. failure - app calls an unimplemented export, assert E_NOTIMPL (not a crash) and log it for coverage. Evidence .omo/evidence/task-14-webcam-kinect-emulator.* Commit: Y | feat(fallback-nui): clean-room kinect10.dll shim Recommended task executor category: deep-high - ABI-exact Windows DLL, large cohesive surface.

  • 15. Linux OpenNI2 virtual-device fallback / general emulator NOTE (exec): VERIFIED on Linux - an independent OpenNI2 consumer (stock libOpenNI2) opened our custom 'SynthKinect' driver and read a 320x240 depth frame, 31075 in-band (800-4000mm) body pixels matching the synth rasterizer. Color implemented-but-unverified; skeleton [~] (NiTE2 EOL/absent). What to do / Must NOT do: In fallback/linux-openni2/, an OpenNI2 device-driver module exposing the synth streams (depth/color + the mask) as an OpenNI2 device, so OpenNI/NiTE apps work even without the usbip path; doubles as the Linux general-emulator surface (IS-9). UNCONDITIONALLY in scope (general-purpose goal); spike 3 sets priority/order, not whether it is built. Must NOT: duplicate synth logic - consume core/synth; bundle NiTE2 (EOL/not redistributable). Closes: GAP-6 (Linux fallback) Parallelization: Wave 6 | Blocked by: 7,2 | Blocks: none References: OpenNI2 driver API (OniDriverApi), OpenNI2-FreenectDriver structure; NiVirtualCam (reference). Acceptance criteria (agent-executable): registering the module, an OpenNI2 app (SimpleViewer) opens the virtual device and reads correct depth; and (only if the user supplied NiTE2) NiTE tracks a skeleton from it. QA scenarios: happy - SimpleViewer shows synthetic depth via OpenNI2. failure - open two consumers, assert correct multi-open handling or a clean busy error. Evidence .omo/evidence/task-15-webcam-kinect-emulator.log Commit: Y | feat(fallback-openni2): linux openni2 virtual device Recommended task executor category: deep-low - adapter against a documented API.

  • 16. Record/replay harness + mock NUI host NOTE (exec): record/replay harness delivered + 8/8 tests (byte-identical replay, fake clock, no sleeps); mock NUI host source written but [~] Windows-build-gated (MSVC + Kinect SDK 1.8), deliberately not in the Linux build. What to do / Must NOT do: In tools/, a record/replay harness (capture tracker/synth output to a fixture file, replay deterministically into the emitter/shim) and a Windows mock NUI host (links the SDK headers, drives the full NUI call sequence) for testing the shim (todo 14) without the game. Must NOT: use wall-clock sleeps - replay on a fake clock. Closes: GAP-7 (test infra) Parallelization: Wave 3 | Blocked by: 2 | Blocks: 10,13 (as supporting infra) References: .omo/design/architecture.md (Build/test: record/replay + mock host as top test asset); KinectFaker's record/replay pattern (reference only, GPLv3 - do not open its source). Acceptance criteria (agent-executable): record a fixture from a recorded video, replay it, assert byte-identical frames out; mock host builds (cross/MSVC) and runs a scripted session. QA scenarios: happy - record then replay reproduces the exact frame sequence. failure - truncate a fixture, assert the replayer errors cleanly. Evidence .omo/evidence/task-16-webcam-kinect-emulator.log Commit: Y | feat(tools): record/replay harness + mock nui host Recommended task executor category: unspecified-high - test infrastructure across both deliverables.

  • 17. Robustness / graceful degradation What to do / Must NOT do: Harden the tracker+synth path for IS-8: player leaves frame (publish player-lost, hold last good briefly, recover), poor lighting / low-visibility joints (mark INFERRED, hold), mask fragmentation/flicker (largest-component + temporal hold already in 7 - verify under stress), tracker process crash (emitter keeps serving last frame or a safe no-player frame; heartbeat-driven). Must NOT: add fixed-delay reconnection - use event/heartbeat-driven recovery; no silent exception swallowing. Closes: IS-8 Parallelization: Wave 8 | Blocked by: 5,7,10 | Blocks: 18 References: .omo/design/nui-contracts.md §2.5 (failure modes), §1.7 (inferred joints); contract heartbeat (todo 2). Acceptance criteria (agent-executable): fault-injection tests - subject-exits, all-low-visibility, fragmented-mask, tracker-kill - each yields the specified graceful behavior without host-app crash (verified against the NiTE e2e / mock host). QA scenarios: happy - subject exits & returns, tracking recovers. failure - kill the tracker mid-stream, assert the host app sees a safe no-player state, not garbage/crash. Evidence .omo/evidence/task-17-webcam-kinect-emulator.log Commit: Y | feat(robust): graceful degradation + fault recovery Recommended task executor category: unspecified-low - contained hardening with fault tests.

  • 18. Packaging + setup documentation What to do / Must NOT do: docs/ + packaging: a Linux setup guide (deps, usbip attach, run) and a Windows setup guide (test-signing + driver install, attach, run, DEA config per P3dro200), a calibration how-to, and a troubleshooting section (mirror bit, player-lost, depth out-of-range). The Windows signing docs MUST cover enabling test-signing (bcdedit /set testsigning on), disabling Secure Boot, the test-mode desktop watermark, and potential interaction with spice2x anti-tamper. LINK to Microsoft's official Kinect 1.8 runtime/SDK download. Package the tracker + core + attach shims into a runnable bundle per OS. Must NOT: redistribute/bundle the MS Kinect 1.8 runtime, NiTE2, or any DEA game asset (link to official sources only); document steps not actually verified in todos 10/13. Closes: GAP-7 (docs), proves IS-5,6 Parallelization: Wave 11 | Blocked by: 10,13 | Blocks: none References: todos 9,11,12,13 outcomes; P3dro200 DEA install steps. Acceptance criteria (agent-executable): following the Linux guide from a clean checkout reproduces the todo-10 result; the docs cover every manual Windows step from todos 12/13; a --help/README smoke check passes. QA scenarios: happy - a fresh Linux run from docs reaches correct depth enumeration in an OpenNI2 viewer (+ a tracked skeleton if NiTE2 supplied). failure - omit the signing step and confirm the troubleshooting section catches the resulting Windows failure. Evidence .omo/evidence/task-18-webcam-kinect-emulator.log Commit: Y | docs(setup): linux + windows setup, calibration, troubleshooting Recommended task executor category: writing - documentation + packaging.

  • 19. CI test-path split so the root venv does not collection-error on tracker tests What to do: add pytest testpaths config (pyproject.toml/pytest.ini/conftest) so pytest from the repo root does NOT collect tests/test_tracker.py (which needs tracker/.venv's numpy/cv2/mediapipe); root CI covers test_record_replay + the C-contract mirror, tracker/.venv covers tracker tests. Update .github/workflows/ci.yml accordingly. Closes: follow-up from the Wave 3 verifier (CI hygiene; non-blocking). Recommended task executor category: quick

  • 20. Fix seqlock sequence mismatch between contract.cpp and the tracker publisher What to do: core/contract/contract.cpp read_latest_frame assumes slot.sequence == published*2, but tracker/publisher.py increments each slot's own prior value; align the reference reader and producer to ONE seqlock convention so publish_frame/read_latest_frame and the live pipeline agree. Add/extend a test. Closes: defect found in todo 10 integration. Recommended task executor category: deep-low

  • 21. Wire tracker/synth depth through core/mapping Z0 placement (articulated, not flat) What to do: tracker/publisher.py passes MediaPipe raw hip-centered world-Z straight through, so live depth pegs flat at the 800mm floor instead of articulated per-joint depth (Z0 + depthGain*worldZ) from core/mapping (todo 6). Route live depth through the mapping Z0/depthGain placement so the OpenNI2/e2e depth is articulated across the body. Re-run the todo-10 e2e and show per-pixel depth spread (not pegged). Closes: fidelity defect found in todo 10 integration. Recommended task executor category: deep-low

Final verification wave

Runs in parallel after ALL todos. ALL must APPROVE. Surface results and wait for the user's explicit okay before declaring complete.

  • F1. Plan compliance audit - every todo delivered as specified; scope boundaries (Must NOT) respected; spike findings actually drove the device-vs-fallback decisions. Recommended task executor category: unspecified-high
  • F2. Code quality review - clean-room discipline (no GPLv3 vendored source), frozen contract intact (static_asserts), no fixed sleeps/blind retries, pure-math modules test-covered. Recommended task executor category: unspecified-high
  • F3. Real QA (Linux, agent-run) - the full recorded-video -> virtual Kinect -> real OpenNI2 chain yields correct depth/player-index enumeration (and a tracked skeleton IF NiTE2 is user-supplied); record/replay reproduces; robustness faults handled. The authoritative skeleton/gameplay proof is F5 (Windows). Recommended task executor category: deep-low
  • F4. Ideal-state fidelity - delivered behavior vs every IS row 1:1; any shortfall becomes new - [ ] N. rows, never a note. Recommended task executor category: unspecified-high
  • F5. DanceEvolution playability proof (Windows, human-assisted) - DEA launches via the webcam virtual Kinect, shows the player, tracks moves, and scores directionally-correctly, captured as a gameplay recording; mirror-bit + z-sign checks pass. Recommended task executor category: deep-high

Commit strategy

  • One commit per todo (the Commit: line on each), conventional-commit style, scoped to that todo's component; no cross-todo mega-commits.
  • Spikes (3,4) commit their reports under docs/ so later waves reference durable findings.
  • No commit is created unless the user runs execution (the planner never commits); the executor commits per todo. Use the git-master skill for any history work.
  • Keep the worktree clean per wave; the frozen IPC contract (todo 2) changes only via an explicit contract-version bump commit.

Success criteria

IS Delivering todo(s) Proving QA scenario Evidence
IS-1 (enumerates as a Kinect) 8,9,12 device enumerates in OpenNI (Linux) / Device Manager + SkeletonBasics (Windows) - DEVICE path only, NOT the NUI shim .omo/evidence/task-9-..., .omo/evidence/task-12-webcam-kinect-emulator.*
IS-2 (real-time tracking, >= ~25 fps / 30 target) 5,6,7,8,10,13 real host tracker (Windows MS NUI; Linux NiTE2 if supplied) skeletonizes synthetic depth and follows the subject at the measured tier's fps - DEVICE path, NOT the shim .omo/evidence/task-10-..., .omo/evidence/task-13-webcam-kinect-emulator.*
IS-3 (player-visible rendering) 7,13 DEA shows the player silhouette from synthetic depth/player-index .omo/evidence/task-13-webcam-kinect-emulator.*
IS-4 (directionally-correct scoring) 6,7,11,13 correct dancing scores, standing still registers misses .omo/evidence/task-13-webcam-kinect-emulator.*
IS-5 (OS-agnostic core) 1,2,8,9,12 same core/ builds for Linux + Windows; only attach differs .omo/evidence/task-1-..., .omo/evidence/task-8-webcam-kinect-emulator.log
IS-6 (reproducible setup) 11,18 fresh Linux run from docs reaches correct depth enumeration (+ skeleton if NiTE2 supplied); Windows steps documented .omo/evidence/task-18-webcam-kinect-emulator.log
IS-7 (validated vs real apps) 10,13 a real OpenNI2 app (Linux: enumerate+depth; skeleton if NiTE2) + DEA (Windows: authoritative skeleton proof) both accept the device .omo/evidence/task-10-..., .omo/evidence/task-13-webcam-kinect-emulator.*
IS-8 (graceful degradation) 17 subject-exit/low-light/mask-noise/tracker-crash handled without host crash .omo/evidence/task-17-webcam-kinect-emulator.log
IS-9 (general-purpose, not DEA-only) 12,15 a Kinect SDK sample (Windows, enumerate+track) + an OpenNI2 app (Linux, enumerate+depth; skeleton if NiTE2), distinct from the e2e harness .omo/evidence/task-12-webcam-kinect-emulator.*, .omo/evidence/task-15-webcam-kinect-emulator.log