feat(player): sub-project 3 slice 1 — alteration engine + player core #5

Merged
benstull merged 7 commits from feature/player-alteration-core into main 2026-06-06 01:11:22 +00:00
Owner

Begins sub-project 3 (Player Runtime + alteration engine) per docs/ROADMAP.md §3 and the approved machine-altered-perception design (§4 alteration engine, §5 mood grade, §6 7-way content dial, §7 intensity).

Ships slice 1 — the pure-logic core as a new player/ package, fully unit-tested (56 new tests; 189 passed / 2 skipped total) with all I/O (video/audio/serial) behind injected interfaces — mirroring how sub-project 1 was the pure-logic dependency root.

What's in player/

  • controls.pyControls, the full panel state (7-way content dial + 4 experience knobs + volume + brightness); the serial-contract data shape shared with sub-project 4.
  • content.pyresolve_content, the §6 7-way dial → (audio source, video on/off) table.
  • alteration.pyplan_alteration, knob vector → RenderPlan (mood ColorGrade with center=identity §5; Left AnalyticalOverlay; Right Restyle), encoding the §4.2 layering rule (substrate vs overlay; Left & Right stack, not cancel).
  • state.pyPlayer, the state machine that diffs successive controls into transitions: FADE_TO_BLACK/FADE_FROM_BLACK (video on/off), CROSSFADE (clip/restyle-variant swap), LIVE_UPDATE (continuous grade/overlay/level ops per §4.3), NONE (unchanged).

Deferred to later slices (named in the plan/roadmap, not built here)

mpv/ffmpeg runtime renderer + GPU shaders; real USB-serial reader + the 3⇄4 framing contract; white-noise DSP; offline v2v variant pipeline; catalog audio-source + neutral-base flag (sub-project 2 territory).

Flagged for operator (transcript Deferred decisions)

The knob→strength calibration reconciles a §3 vs §4.2/§5 conflict: brain knobs use value/4 (0=off, 4=max); mood uses (light−dark)/4 (equal dark/light = identity). This reads §3's "(2,2,2,2) neutral" as a vestige of the old coordinate-grid center. The calibration lives in three one-line helpers so the convention can be flipped trivially.

Plan: docs/superpowers/plans/2026-06-05-player-alteration-core.md. Session 0006.

🤖 Generated with Claude Code

Begins **sub-project 3 (Player Runtime + alteration engine)** per `docs/ROADMAP.md` §3 and the approved machine-altered-perception design (§4 alteration engine, §5 mood grade, §6 7-way content dial, §7 intensity). Ships **slice 1 — the pure-logic core** as a new `player/` package, fully unit-tested (56 new tests; 189 passed / 2 skipped total) with all I/O (video/audio/serial) behind injected interfaces — mirroring how sub-project 1 was the pure-logic dependency root. ### What's in `player/` - **`controls.py`** — `Controls`, the full panel state (7-way content dial + 4 experience knobs + volume + brightness); the serial-contract data shape shared with sub-project 4. - **`content.py`** — `resolve_content`, the §6 7-way dial → (audio source, video on/off) table. - **`alteration.py`** — `plan_alteration`, knob vector → `RenderPlan` (mood `ColorGrade` with center=identity §5; Left `AnalyticalOverlay`; Right `Restyle`), encoding the §4.2 layering rule (substrate vs overlay; Left & Right stack, not cancel). - **`state.py`** — `Player`, the state machine that diffs successive controls into transitions: `FADE_TO_BLACK`/`FADE_FROM_BLACK` (video on/off), `CROSSFADE` (clip/restyle-variant swap), `LIVE_UPDATE` (continuous grade/overlay/level ops per §4.3), `NONE` (unchanged). ### Deferred to later slices (named in the plan/roadmap, not built here) mpv/ffmpeg runtime renderer + GPU shaders; real USB-serial reader + the 3⇄4 framing contract; white-noise DSP; offline v2v variant pipeline; catalog audio-source + neutral-base flag (sub-project 2 territory). ### Flagged for operator (transcript Deferred decisions) The knob→strength calibration reconciles a §3 vs §4.2/§5 conflict: brain knobs use `value/4` (0=off, 4=max); mood uses `(light−dark)/4` (equal dark/light = identity). This reads §3's "(2,2,2,2) neutral" as a vestige of the old coordinate-grid center. The calibration lives in three one-line helpers so the convention can be flipped trivially. Plan: `docs/superpowers/plans/2026-06-05-player-alteration-core.md`. Session 0006. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
benstull added 7 commits 2026-06-06 01:11:06 +00:00
benstull merged commit aeeed66f49 into main 2026-06-06 01:11:22 +00:00
Sign in to join this conversation.