# Retrospective

## Milestone: v1.0 — Beyond 2 SteamVR Proximity Driver

**Shipped:** 2026-03-23
**Phases:** 11 | **Plans:** 22

### What Was Built

- SteamVR sidecar driver DLL with OpenVR SDK v2.5.1 and CMake build system
- HIDAPI shared-mode HID access to Beyond 2 proprietary device
- Named pipe debug server with CLI tool (beyond_prox_ctl)
- Firmware-equivalent proximity algorithm (calibration, moving average, hysteresis)
- Algorithm-driven standby/wake via HMD property write
- VRSettings-based runtime configuration (report rate, verbosity, moving avg length)
- Null guards, safe arithmetic, structured logging
- Inno Setup installer with git-derived versioning

### What Worked

- **Feasibility-first phasing:** Phases 1-3 validated the sidecar approach before building features. Phase 3 spike discovered the /proximity-on-tracker limitation early, avoiding wasted work on the wrong approach.
- **PowerShell verification scripts:** Each phase had a dedicated verification script providing automated regression testing against vrserver log output. Low-overhead, high-confidence validation appropriate for a hardware driver.
- **Atomic task commits:** Every task committed individually, making git history easy to bisect and review.
- **Hardware checkpoints:** Mandatory human verification gates caught issues that automated checks couldn't (e.g., actual standby/wake behavior, installer UX).
- **Decimal phases (3.1, 3.2):** Clean mechanism for inserting urgent work without disrupting phase numbering.

### What Was Inefficient

- **ROADMAP.md drift:** Several phases (4, 5, 6, 8) showed "Not started" with unchecked plan boxes despite being complete. Progress table wasn't consistently updated during execution.
- **Missing SUMMARY files:** Phases 05-02 and 08-02 (verification/hardware checkpoint plans) never got SUMMARY files. The work was done and UAT recorded, but the formal artifact was skipped.
- **VERIFICATION.md human_needed:** Phases 1, 2, 3.2 had hardware validated during execution but VERIFICATION.md status was never updated from human_needed to passed.
- **Inno Setup compilation errors:** The ISS script had two bugs (preprocessor #9 misparse, AnsiString/String type mismatch) that required debugging during the build step. Research phase could have caught these IS6-specific gotchas.

### Patterns Established

- **Nested driver pattern:** BeyondProximity deploys as `bin/BeyondProximity/` within official Beyond driver package, matching BeyondEyetracking pattern
- **HMD property write:** SetBoolProperty(Prop_ContainsProximitySensor_Bool) on HMD container for standby/wake — not /proximity component on tracker
- **PowerShell verify script pattern:** Numbered checks with PASS/FAIL/SKIP, summary counts, exit code
- **Named pipe debug interface:** `\\.\pipe\beyond_proximity_ctl` with text commands
- **CMake package target:** `add_custom_target(package)` invoking ISCC.exe with git-derived version

### Key Lessons

- SteamVR's /proximity component only affects the device it's registered on — not useful for triggering HMD standby from a sidecar
- HIDAPI shared-mode works from vrserver.exe — no IPC bridge needed for HID access
- Inno Setup 6 Pascal Script uses AnsiString for file I/O functions but String for string manipulation — need explicit casts
- Inno Setup preprocessor runs on raw text including [Code] sections — #N character constants at line start are misinterpreted as directives

### Cost Observations

- Model mix: ~70% Opus (execution), ~30% Sonnet (verification, integration checking)
- Sessions: ~8 across 3 days
- Notable: Phase execution with subagents kept orchestrator context lean (~10-15%)

---

## Cross-Milestone Trends

| Metric | v1.0 |
|--------|------|
| Phases | 11 |
| Plans | 22 |
| Days | 3 |
| C++ LOC | 1,147 |
| Requirements | 31/31 |
| Commits | 154 |
