Commit Graph

32 Commits

Author SHA1 Message Date
BenStullsBets 73e5c4a3c7 docs(spec): stamp content-pipeline design graduated + Increment 1 shipped (session 0014)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 08:28:02 -07:00
BenStullsBets e812f41ef1 docs: content-sourcing procedure + roadmap update + setup docstring (content pipeline Increment 1)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 08:19:41 -07:00
BenStullsBets 750e87eb0b docs(plan): content pipeline Increment 1 implementation plan (session 0014)
Bite-sized TDD plan for Increment 1 (real footage, no ML): the deterministic
tools/pipeline/ package (frame → crossfade-loop → master+proxy transcode →
manifest assembly, pure ffmpeg arg builders unit-tested + an opt-in integration
test on the real forest POC base), the backward-compatible keyframed annotation
track schema with client-side interpolation, and the 5-scale ring (orbit + reef).
9 tasks. Implements spec §3 (stages 1–4,6), §4, §5, §6, §7, and §8 Increment 1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 07:47:00 -07:00
Ben Stull e210de6f84 docs(spec): content pipeline design — source → process → label → manifest (session 0014)
Brainstormed + scoped the content pipeline that turns strict-PD source clips into
shippable, seamless-looping, labelled neutral bases for the scale ring.

Decisions settled this session:
- Scale set: lean 5 (cosmos · orbit · forest/land · reef · abyss; microscopic dropped)
- Loop: crossfade tail→head seam
- Labels: motion-tracked, hybrid (ML proposes where it can, hand-seed + classical
  tracker elsewhere); label semantics always hand-authored
- Format: master + 1080p H.264 proxy

Anchor fact: the Right dream is real-time (no per-clip ML bake, session 0013), so
the pipeline is transcode + authoring — the one offline ML step is the chosen
motion-track pass. Six stages + an optional keyframed annotation-track schema
(backward compatible) + a 2-increment rollout (real footage no-ML first, then the
hybrid track pass + simulator author mode). i2v ring transitions + Pi/pano deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 07:12:52 -07:00
Ben Stull cbb7c9f53d feat(sim): Right axis = deterministic real-time painterly dream
Replace the pre-baked SD restyle variants (too fluid — the painting re-rolled
every keyframe and the flow-warp melted frames) with a deterministic, real-time
dream that holds STILL across the loop; only the footage's own motion moves.
Design: docs/superpowers/specs/2026-06-22-right-axis-deterministic-dream-design.md

Engine (player/alteration.py): Restyle(variant) -> Dream(strength, intensity);
Calibration.right_variant_map -> dream_gain. player/state.py: a Right change is a
LIVE_UPDATE now, not a crossfade (only a clip swap crossfades). Plan dict
restyle -> dream. Tests migrated; 233 green. (No new Python behavior for the
client-render swap below.)

Renderer (simulator front-end): the Right dream is a WebGL2 Kuwahara shader on a
<canvas> over the live video — edge-preserving, so motion/structure stay crisp;
the dream is the same footage, just stylized (no blur). Ramped by the knob; max
goes "trippy" (vivid saturation + ~45deg hue drift + posterize, concentrated near
max via t=intensity^2). Phase-1 luminous-haze (CSS+bloom) was built then retired
by eye (blur read as out-of-focus video). Mood grade rides as a CSS filter on the
canvas; bloom layer removed.

Dev ergonomics that fell out of the iteration:
- /dev/version + a 1s client poll = live-reload (open tab never runs stale
  renderer code; reloads on my edits AND server restarts).
- no-cache on the dev server; an on-screen error banner + crash-proof render so a
  silent throw can't masquerade as "nothing is changing".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 09:55:35 -07:00
Ben Stull 6adb93407b feat(sim): analytical Left HUD redesign + affect channel + no-cache
Left-brain HUD look-and-feel pass (judged by eye in the sim):
- corner-bracket targeting reticles (capped arms) replace plain boxes
- translucent label chips, legible over any frame
- two sensor channels: cyan detections (with deterministic confidence
  scores) vs amber measurements (center crosshair)
- bbox-sized "ANALYSIS . L{n} . {k} OBJ" status tag, escalating with Left

Affect channel (emotions in the HUD), per
docs/superpowers/specs/2026-06-22-affect-channel-hud-design.md:
- surfaces only when BOTH knobs up; strength = min(left, right)
- stable per-scene palette, more words appear with combined strength
- soft glowing violet words on their own opacity layer (the dream
  leaking into the machine's read); math in player/alteration.py
- forest/cosmos/abyss palettes in the manifest; 5 new unit tests

Simulator no-cache middleware so by-eye iteration never serves a stale
app.js / api response (fixes the latent "plan has affect but clip.affect
empty" stale-/api/clips bug).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 23:11:02 -07:00
Ben Stull 46064912ed feat(sim): forest carries real multi-strength Right variants
Ran the baker for the forest scale: real flow-stabilized painterly Right variants
1-4 now back the dreamlike axis on real Yosemite footage (was: 1 real + 3 ffmpeg
placeholders). By-eye finding this surfaced: sd-turbo's painterly transform is
sharply non-linear in img2img strength (barely registers <0.5, ramps hard through
~0.5-0.65), so the initial linear 0.28-0.58 ramp left levels 1-3 ~identical to
raw. Re-baked with a clustered 0.46/0.52/0.58/0.64 curve -> a real perceptual
ramp: gentle dream haze -> clearly impressionist -> strongest, each notch visibly
dreamier, temporally calm (flow-stabilized).

- manifest: forest right_variants 1-4 all model 'sd-turbo+farneback-flow'
- setup_sample_media.py: now only stages the neutral base; the baker owns the
  Right variants, so re-running it never clobbers a real bake
- docs: USER_GUIDE setup steps + ROADMAP v2v vertical-slice-done note

Suite 228 passed / 2 skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 06:58:29 -07:00
Ben Stull 95d08d5c01 docs(plan): v2v vertical slice — real forest Right variants
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 06:32:04 -07:00
Ben Stull f11b9ee72d feat(ring): fast-spin blended pass past a speed threshold (scales design §3)
A multi-detent encoder spin previously chained one full transition per scale
crossed (e.g. +5 ≈ 5 placeholder morphs ≈ 12-15s), which feels sluggish for a
fast spin. Design §3 anticipates this: "transitions chain, or past a speed
threshold a faster blended pass is used."

`player.ring.advance_ring` gains an opt-in `fast_spin_threshold` (canonical
default `DEFAULT_FAST_SPIN_THRESHOLD = 3`). A spin batches its detents into one
advance() call, so `abs(delta)` is the input layer's proxy for spin speed; at or
above the threshold the move collapses to a single blended pass — one
`TransitionStep` (the arrival edge, marked `blended`, landing straight on the
destination, `RingMove.fast=True`) instead of the full chain. Landing index,
seam-crossing (`wrapped`), and arrival edge/direction are exactly the full
chain's; only the in-between transitions are dropped.

The policy is opt-in (default off) because the pure function cannot observe
wall-clock spin speed — the simulator/firmware, which can, enables it. This keeps
all existing complete-chain behavior and tests intact. The simulator passes the
default threshold and plays the blended step at 2.5× (FAST_BLEND_RATE); a
dedicated fast-blend clip can replace the accelerated arrival-edge placeholder
when real transition media exists.

- player/ring.py: TransitionStep.blended, RingMove.fast, threshold param + policy
- simulator/clips.py: serialize fast/blended in ring_move_to_dict
- simulator/app.py: apply DEFAULT_FAST_SPIN_THRESHOLD at /api/ring/advance
- simulator/static/app.js: play a blended step at FAST_BLEND_RATE
- docs: scales design §3, USER_GUIDE, ROADMAP slice-3 note

Tests: +9 (ring policy, serializer, API). Suite 224 passed / 2 skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 00:17:47 -07:00
Ben Stull 7a50ae41bb feat(sim+player): scale-ring navigation (endless encoder) + cosmos/abyss scales
Add scale-ring navigation to the simulator per the scales-library design §3:
an endless rotary-encoder control (relative, vs the absolute 0-4 experience
knobs) walks a closed ring of neutral "scales of nature" clips, with placeholder
AI zoom/warp transitions between adjacent scales and a small->large wrap (the
infinite-zoom payoff).

- player/ring.py (new, canonical pure logic): ScaleRing + advance_ring; one
  transition clip per edge, played forward zooming inward / reversed outward;
  modulo wrap both ways; chained steps for a multi-detent spin. Mirrors
  player/content.py conventions (frozen dataclasses, pure functions).
- simulator: load_ring + ring_to_dict/ring_move_to_dict; GET /api/ring and
  POST /api/ring/advance (Python owns step/wrap/transition math; the browser
  only plays the returned transition(s) then settles on the target scale).
- frontend: endless-encoder control (zoom in/out buttons + stage scroll),
  current-scale readout, multi-clip active-scale selection, transition playback.
- media: two cheap true-PD scales so the ring is demonstrable -- cosmos
  (NASA/Hubble) + abyss (NOAA Ocean Exploration), provenance recorded in the
  manifest, bytes generated as labelled placeholders by setup_scales_media.py.
  The expensive multi-strength flow-stabilized Right re-bake is DEFERRED (new
  scales carry a raw base only) until the ring is liked; Pi renderer +
  serial/firmware remain deferred (simulator-first).
- docs: ROADMAP slice-3 done; USER_GUIDE scale-ring gesture; plan doc.

Verified: pytest 215 passed / 2 skipped (+22 new); sim boots, /api/ring +
/api/ring/advance correct incl. wrap, media served, and a headless-Chrome CDP
drive walked cosmos -> forest -> abyss -> (wrap) -> cosmos with the active clip
reloading correctly.

Spec: docs/superpowers/specs/2026-06-07-scales-library-and-right-axis-pipeline-design.md (§3)
Plan: docs/superpowers/plans/2026-06-07-scale-ring-navigation.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 23:40:21 -07:00
Ben Stull 9c347d580f feat(sim+engine): lock alteration calibration + fix psychedelic dark grade
Tuning the look by eye in the simulator (design §8) surfaced that the dark
mood pole rendered a full-frame hue-rotate(-200deg) — rock orange, trees
purple: the disorienting look rejected in session 0008, not the peaceful POC
dark_frame. Replace it with darken + slight desaturate on the video filter
plus a multiply-blended deep-blue wash (#tint, below the SVG HUD so the
overlay stays legible). Dark now reads cool/somber with natural greens, like
the approved POC look; light/left/right unchanged and confirmed peaceful.

With full tilt now tasteful on every axis, LOCK DEFAULT_CALIBRATION to unity
gains + linear variant map as a deliberate by-eye choice (not placeholders),
closing the open session-0006 knob->strength decision: knobs run 0=off..4=max,
equal Dark/Light = identity, the 5 notches map 1:1 to the 5 discrete Right
bakes. Guard the locked constants with test_default_calibration_is_locked.

Resolves design §8 open questions (calibration curve shape; grade-vs-overlay
ordering) and records the dark-grade fix. Full suite 193 passed / 2 skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 23:19:53 -07:00
Ben Stull b8543906be docs: point parent design at reconciliation; roadmap + user guide for sim alteration
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:58:46 -07:00
Ben Stull e5ca07e2a4 docs(plan): implementation plan for reconciled simulator-alteration slice
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:52:01 -07:00
Ben Stull eda259e5b8 docs(spec): reconcile 0007/0008 sim-alteration designs (session 0009)
Bring the unmerged session-0007 simulator-alteration-preview design onto a
single thread and add the reconciliation design that resolves the load-bearing
Left-HUD conflict between it and the merged session-0008 scales-library /
right-axis design.

Decision (operator-approved): Left is a RUNTIME overlay (authored annotation
track + per-language string tables, shaped live — browser in the sim, Pango/
HarfBuzz on the Pi), not baked pixels. Consequently the pre-baked variant set is
1-D over Right strength, not 0007's 2-D 5x5 Left x Right grid; 0007's baked-HUD
position (its sec 4/5/8) is superseded. Engine change is surgical — the merged
slice-1 engine already keeps a runtime AnalyticalOverlay.

Scopes the first simulator-runnable slice: deterministic Dark/Light/Left +
discrete pre-baked flow-stabilized Right variants over ONE neutral clip, wired
into the simulator, with a parameterized Calibration tuned by eye.

Spec: docs/superpowers/specs/2026-06-07-reconciled-simulator-alteration-slice-design.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:47:56 -07:00
Ben Stull 0238260908 docs(spec): scales-of-nature library + stabilized right-axis pipeline (session 0008)
Design revision refining the machine-altered-perception design (2026-06-05):

- Right axis is a LOCAL offline restyle (SD img2img on MPS), not a cloud API
  (refines §4.1/§4.3, §9). Per-frame restyle boils/flickers — disqualifying for
  a peaceful piece — so temporal coherence is now a hard constraint, met by
  optical-flow keyframe propagation (the EbSynth principle, OpenCV impl).
- Content = a small NEUTRAL "scales of nature" library (~4-6 clips, one per
  scale), not a single stitched cosmic-zoom film; keeps the neutral-base thesis
  and interactivity while retaining the awe-of-scale richness (refines §6/§8).
- NEW: the scales form a navigable closed RING joined by short AI zoom/warp
  transitions, driven by an infinitely-turnable endless rotary encoder; diving
  past the microscopic wraps around to the cosmos (refines §2 selector / §11).
- i18n sharpened (§1.2, sharpens §10): Left labels are a Pi-rendered runtime
  graphics overlay (annotation-track + per-language string tables, shaped via
  Pango/HarfBuzz + Noto) — NOT a baked per-language overlay video, which would
  break i18n economics. Added Pi-resolution headroom to open questions.
- Strict-PD sourcing map (NASA/NOAA/NPS/USGS); non-US terrestrial is the CC-BY
  soft spot. Economics: local authoring is ~free, not $300-3k of cloud API.

Grounded in a local POC this session (M4 Pro, sd-turbo, OpenCV flow): all four
axes validated on real footage; deterministic axes ~2.4s, Right flow-propagated
~2.7min/8s clip and calm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 22:31:12 -07:00
Ben Stull 5403021e4a docs(roadmap): sub-project 3 alteration-engine + player-core slice shipped 2026-06-05 18:09:54 -07:00
Ben Stull 70834ae0ad docs(plan): sub-project 3 player alteration core (slice 1)
Pure-logic core per design §4/§5/§6/§7 and ROADMAP.md §3.
2026-06-05 18:05:34 -07:00
Ben Stull c5952c6cfd docs(design): machine-altered-perception thesis revision
Revise the Human Experience Filter design: the piece becomes about how
humans interact with machines and how that reshapes the nervous system.
Neutral public-domain nature footage in, machine-altered perception out —
soothing or disturbing, good and bad.

Supersedes the 2026-06-04 design's thesis (§1), selection model (§3 — now
"transform from neutral", not catalog lookup), tagging division (§5), and
sourcing (§8); expands the control panel and hardware (§2/§6). Coordinate
axes and the single-pano projector are preserved.

Captures: the per-axis alteration mapping (Left=analytical overlay,
Right=generative v2v dissolve, Dark/Light=color grade), the substrate-vs-
overlay composition rule, the Light=yellow/white → neutral grey →
Dark=blue/black mood ramp, the 6-way content dial + volume/brightness, the
tactile/braille/LED/read-aloud wooden panel, and the runtime-overlay
architecture that makes multilingual labels nearly free.

Per docs/ROADMAP.md (reshapes sub-projects 2/3/4 + adds an offline v2v
authoring pipeline). Discovery session 0005.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 17:30:27 -07:00
Ben Stull 859f868d3b docs(simulator): user-guide section for the curator's X-ray
Per docs/superpowers/plans/2026-06-04-experience-simulator.md Task 7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:51:06 -07:00
Ben Stull ddec45d39c docs(simulator): implementation plan for curator's X-ray simulator
Bite-sized TDD plan, 7 tasks: hef.selection.ranked_candidates() + select()
refactor; simulator package + deps; synthetic fixture catalog; FastAPI app
(/api/select, /api/catalog/meta); X-ray frontend; Docker/compose/make; user
guide + full-suite verification.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:36:25 -07:00
Ben Stull 9cb4fb62d8 docs(simulator): design spec + BDDs for curator's X-ray experience simulator
Discovery session 0003. Web-based, Docker-on-localhost simulator to feel the
selection model: real hef.selection wired to a synthetic fixture catalog, with
a full-transparency X-ray (ranked pool + distances + brain/mood grid maps) and
live model knobs (weights, pool size, approved-only).

- docs/superpowers/specs/2026-06-04-experience-simulator-design.md
- features/{selection_xray,model_knobs,fixture_catalog,simulator_service}.feature
- one additive hef.selection.ranked_candidates() change planned (single source of truth)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 03:36:25 -07:00
Ben Stull 50ce6c9dfa docs(roadmap): mark sub-project 2 done, sub-project 3 next
Sub-project 2 (ingest & tagging / review tools) shipped via PR #1 this session.
Updates the status table and §2 detail, reconciles resolved decisions (first-ship
archives, media-root layout, ffmpeg-only opt-in dominant_color), and marks §3
(Pi player) as next.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 07:33:32 -07:00
Ben Stull 1e2a4dd966 docs: user guide for ingest + review tools
Per sub-project-2 plan Task 14. Updates the scope banner (catalog core + tools
now built), adds an 'Ingesting & reviewing media' section (ffmpeg prereqs,
--media-root, first-ship archives, ingest_cli/review_cli usage, Freesound token
note, opt-in dominant_color), and reconciles the absolute-vs-relative file_path
note (spec §6.3).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 06:36:15 -07:00
Ben Stull 6d6cbb5cad plan: sub-project 2 — ingest & tagging / review tools
Task-by-task TDD plan implementing the approved sub-project-2 spec: tools/
scaffolding, the additive hef.catalog change (validate_catalog/index_by_id),
ffprobe/ffmpeg mechanical tagging with cover-art guard, per-archive license
normalization, heuristic coordinate drafting, the ingest pipeline + first-ship
fetchers (LibriVox/NASA/Internet Archive, others deferred stubs), the review
transition core + interactive CLI, and hermetic + opt-in integration tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 06:14:28 -07:00
Ben Stull dd02c2c36a docs: revise design + roadmap for single pano projector
Operator decision (2026-06-04): single panoramic projector spanning the
three walls showing the real selected video (nature-video focus), replacing
four projectors + a procedural side-wall renderer.

- Design spec: revision banner; updated §1, §6 (one pano projector), §7
  (procedural side walls REMOVED), §10 layout, §12 open questions.
- ROADMAP: sub-project 5 marked Dropped; diagram + dependency order updated;
  §3 player drives one pano output; cross-cutting decisions reconciled.
- Sub-project-2 spec: follow-up note updated to past tense (design spec done).

dominant_color's only consumer was the side walls, so it stays optional/opt-in
in the sub-project-2 tooling (already specced).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 06:12:09 -07:00
Ben Stull b5f5ee6663 docs: link the sub-project 2 spec from ROADMAP
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 06:07:32 -07:00
Ben Stull 4c1ec6e02e spec: fold in operator approval + pano-projector design change
Operator approved the spec and confirmed first-ship archives
(LibriVox + NASA + IA). Folds in the 2026-06-04 design change (single
panoramic projector across all three walls, nature-video content):
demotes dominant_color to optional/opt-in (its only consumer was the
procedural side walls), ffmpeg-only when computed, never an image lib.
Flags the design-spec/ROADMAP follow-up as out of scope here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 06:06:45 -07:00
Ben Stull f80ec65553 spec: sub-project 2 — ingest & tagging / review tools
Develops the draft-then-review pipeline spec (design §5/§8, ROADMAP §2):
per-archive fetchers, mechanical tagging (ffprobe mode/duration/resolution,
ffmpeg dominant_color, origin license/attribution), heuristic coordinate
drafting (review_status=proposed + one-line rationale), and the review CLI
(walk proposed -> approve + reviewed_at).

Builds on hef.catalog additively: schema unchanged (Record defaults already
match the proposed shape); the only required core addition is a catalog-level
validate_catalog (unique-id integrity), with optional index_by_id.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 05:45:37 -07:00
Ben Stull 7f0e92d130 docs: roadmap for the five sub-projects (catalog core done, tools next)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 01:51:35 -07:00
Ben Stull 8c8291a94a docs: user guide for configuring media (hand-authoring + validating the catalog)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 01:48:14 -07:00
Ben Stull f15fe739ee docs: implementation plan for catalog+selection core (sub-project 1/5)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 01:31:10 -07:00
Ben Stull 46e5d8e475 docs: human-experience-filter design spec
Single-viewer four-wall projection installation. Coordinate model
(content mode + brain plane + mood plane), nearest-match selection from a
tagged JSONL catalog, Arduino-controller/Pi-player hardware split,
procedural side walls, public-domain sourcing strategy, lean-to-dense
sizing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 01:22:01 -07:00