Skill Tracer
Skills › HyperFrames › media-use › media-treatments.md

media-treatments.md

206 lines · skills/media-use/references/media-treatments.md at a595755

Open on GitHub
1# Media treatments
2
3A media treatment is a source-aware plan that composes existing HyperFrames
4color, effect, timeline, and Registry primitives. It is not a second runtime
5schema. Use this file to choose a primary direction. A matching recipe is an
6optional tested seed; bespoke requests may assemble a validated treatment from
7the canonical capability catalog.
8

Media treatments

A media treatment is a source-aware plan that composes existing HyperFrames color, effect, timeline, and Registry primitives. It is not a second runtime schema. Use this file to choose a primary direction. A matching recipe is an optional tested seed; bespoke requests may assemble a validated treatment from the canonical capability catalog.

Raw lines 1 to 8
9## Permission and scope
11- An explicit request such as "polish this", "make it look better", or "make it
12 fit the topic" delegates a conservative treatment. Apply it, verify it, and
13 report what changed.
14- During an unsolicited opportunity scan, show or suggest the treatment first.
15- Target meaningful photographic media. Skip text, SVG, logos, icons, UI
16 chrome, and intentionally stylized footage unless the user asks.
17- Realtime grading and effects apply to the entire selected real `<img>` or
18 `<video>`. They do not isolate or track a face, plate, address, or other
19 region. For region-only work, first create a separate cropped/masked media
20 layer or use an external segmentation/tracking tool; never imply that a
21 whole-media Blur or Pixelate performed region isolation.
22- The realtime treatment path is Rec.709/SDR. Do not silently process HDR, HLG,
23 PQ, or camera LOG sources through it.

Permission and scope

  • An explicit request such as "polish this", "make it look better", or "make it fit the topic" delegates a conservative treatment. Apply it, verify it, and report what changed.
  • During an unsolicited opportunity scan, show or suggest the treatment first.
  • Target meaningful photographic media. Skip text, SVG, logos, icons, UI chrome, and intentionally stylized footage unless the user asks.
  • Realtime grading and effects apply to the entire selected real <img> or <video>. They do not isolate or track a face, plate, address, or other region. For region-only work, first create a separate cropped/masked media layer or use an external segmentation/tracking tool; never imply that a whole-media Blur or Pixelate performed region isolation.
  • The realtime treatment path is Rec.709/SDR. Do not silently process HDR, HLG, PQ, or camera LOG sources through it.
Raw lines 9 to 24
25## Classify the request
27Choose the smallest lane that satisfies the request before choosing a recipe
28or assembling a custom treatment:
30| User intent | Lane |
31| --------------------------------------------------- | ------------------------------------------ |
32| too dark, flat, too warm, too many shadows | correction |
33| shape shadows/highlights or selected colors | wheels, curves, or HSL secondary |
34| polished, premium, warm, cinematic, fit the topic | preset or custom treatment |
35| retro, print, ASCII, glitch, camcorder | shader effect or effect-bearing preset |
36| obscure the whole selected media | privacy Blur or Pixelate |
37| hide one face, plate, address, or screen region | separate crop/mask/asset or external tool |
38| draw attention to media without changing its pixels | framing, motion, or optional overlay |
39| reveal, focus, depixelate, fade the treatment | finite seek-safe treatment keyframes |
40| REC HUD, light leak, flash, freeze-frame cutout | Registry overlay plus any justified pixels |
42The lane identifies the primary reason for the change; it is not a one-feature
43limit. A final treatment may combine correction, a preset, finishing, multiple
44compatible shader effects, finite keyframed values, and optional overlays when
45the inspected media and user intent justify the complete combination. Keep one
46primary intent as the creative anchor so the result remains coherent and
47deterministic.
49Do not add a stylized Effect when correction solves the complaint. Do not
50change color when the request is only temporal, and do not install an overlay
51when the selected media alone communicates the result.
53Match strength to intent. When the user explicitly names a bold look such as
54VHS, glitch, ASCII, halftone, camcorder, print, or engraving, apply its
55signature effects strongly enough to read unmistakably. The guard against
56unrequested additions does not mean under-delivering an effect the user asked
57for. Correction and polish stay restrained; named stylization must be obvious
58in the after-frame.

Classify the request

Choose the smallest lane that satisfies the request before choosing a recipe or assembling a custom treatment:

User intentLane
too dark, flat, too warm, too many shadowscorrection
shape shadows/highlights or selected colorswheels, curves, or HSL secondary
polished, premium, warm, cinematic, fit the topicpreset or custom treatment
retro, print, ASCII, glitch, camcordershader effect or effect-bearing preset
obscure the whole selected mediaprivacy Blur or Pixelate
hide one face, plate, address, or screen regionseparate crop/mask/asset or external tool
draw attention to media without changing its pixelsframing, motion, or optional overlay
reveal, focus, depixelate, fade the treatmentfinite seek-safe treatment keyframes
REC HUD, light leak, flash, freeze-frame cutoutRegistry overlay plus any justified pixels

The lane identifies the primary reason for the change; it is not a one-feature limit. A final treatment may combine correction, a preset, finishing, multiple compatible shader effects, finite keyframed values, and optional overlays when the inspected media and user intent justify the complete combination. Keep one primary intent as the creative anchor so the result remains coherent and deterministic.

Do not add a stylized Effect when correction solves the complaint. Do not change color when the request is only temporal, and do not install an overlay when the selected media alone communicates the result.

Match strength to intent. When the user explicitly names a bold look such as VHS, glitch, ASCII, halftone, camcorder, print, or engraving, apply its signature effects strongly enough to read unmistakably. The guard against unrequested additions does not mean under-delivering an effect the user asked for. Correction and polish stay restrained; named stylization must be obvious in the after-frame.

Raw lines 25 to 59
60### Translate vague feedback conservatively
62| User feedback | First action | Add only when the frames justify it | Never infer |
63| ------------------------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------- |
64| too many shadows and a bit boring | lift shadows/protect highlights, then compare one restrained source-appropriate preset | mild contrast or vibrance | retro texture, HUD, or palette effect |
65| make the product footage feel premium | protect product color and labels, compare Product Polish | restrained vignette on lifestyle footage | a cinematic LUT or crushed blacks |
66| make this reveal cooler | preserve color and animate one supported effect or treatment value | a short owned overlay block | unrelated whole-clip styling |
67| make it feel like an old home video | compare 8mm and VHS language against the source | finite weave/flicker or justified HUD | that every old-video request means VHS |
68| hide this face | explain that realtime effects are whole-media; isolate the region first or use an external tool | whole-media Blur/Pixelate only when the user accepts that scope | face tracking or masking that was not performed |
69| keep the brand colors exact | leave UI/logo pixels unchanged; use framing and motion | demonstrated exposure-only correction | stylized preset, palette, or LUT |
71When more than one lane could fit, generate at most two candidates and choose
72from inspected before/after evidence. Ordinary correction or polish starts with
73one candidate; a second candidate is an escalation, not the default. Do not
74stack effects merely to make the answer look more sophisticated.

Translate vague feedback conservatively

User feedbackFirst actionAdd only when the frames justify itNever infer
too many shadows and a bit boringlift shadows/protect highlights, then compare one restrained source-appropriate presetmild contrast or vibranceretro texture, HUD, or palette effect
make the product footage feel premiumprotect product color and labels, compare Product Polishrestrained vignette on lifestyle footagea cinematic LUT or crushed blacks
make this reveal coolerpreserve color and animate one supported effect or treatment valuea short owned overlay blockunrelated whole-clip styling
make it feel like an old home videocompare 8mm and VHS language against the sourcefinite weave/flicker or justified HUDthat every old-video request means VHS
hide this faceexplain that realtime effects are whole-media; isolate the region first or use an external toolwhole-media Blur/Pixelate only when the user accepts that scopeface tracking or masking that was not performed
keep the brand colors exactleave UI/logo pixels unchanged; use framing and motiondemonstrated exposure-only correctionstylized preset, palette, or LUT

When more than one lane could fit, generate at most two candidates and choose from inspected before/after evidence. Ordinary correction or polish starts with one candidate; a second candidate is an escalation, not the default. Do not stack effects merely to make the answer look more sophisticated.

Raw lines 60 to 75
76## Seed or assemble
78Use the table when a tested recipe directly fits. Read only that recipe
79section. Recipes are optional macros, not a closed list of allowed results.
81| Intent or source | Recipe heading to read |
82| -------------------------------------------------------- | ------------------------------------------------- |
83| Talking head, interview, presenter, people-focused photo | `Natural Portrait` |
84| Product footage, lifestyle footage, clean social polish | `Product Polish` |
85| Screen capture, dashboard, website, app UI | `UI Fidelity` |
86| Warm memory, restrained nostalgia | `Film Memory` |
87| Creator/UGC handheld camera character | `Creator Camcorder` |
88| Analog tape playback | `VHS Playback` |
89| Small-gauge home-movie character | `8mm Home Movie` |
90| Editorial dots or ink print | `Editorial Halftone` or `Two-Ink Editorial Print` |
91| Monochrome dot/line screen print | `Monochrome Screen Print` |
92| Engraved or hand-hatched illustration | `Engraved Illustration` or `Crosshatched Sketch` |
93| Curved scanlined display | `CRT Display` |
94| Glyph-based art | `Procedural ASCII` |
95| Realtime palette quantization | `Ordered Palette Dither` |
96| Exact historical error diffusion | `Cached Error Diffusion` |
97| Finite warm flare layer | `Organic Light Leak` |
98| Held-frame graphic interruption | `Freeze-Frame Cutout` |
99| Short exposure-flash transition | `Social Flash / Editorial Reveal` |
101Use `rg -n '^## <heading>$' <SKILL_DIR>/references/media-treatment-recipes.md`,
102then read only from that heading to the next `##`. Do not load the entire
103cookbook for one request.
105When source intent is unclear, inspect the concise capability overview:
107```bash
108hyperframes media-treatment --capabilities --json
109```
111It lists the complete surface by family with one-line descriptions. Then load
112only the family, effect, preset, or palette relevant to the inspected source:
114```bash
115hyperframes media-treatment --capability <id> --json
116```
118The focused result provides legal controls, recommended apply values, render
119cost, palette support, and the exact animation contract when supported. Use
120`--all` only for tooling/tests or a genuinely exhaustive audit. Compose one
121nested payload from these existing parts. Recipes and catalog-built payloads
122use the same renderer and persistence contract.
124Treat `renderLane: "multipass"` as a cost signal. Blur, Bloom, and Kuwahara are
125bounded but more expensive than single-pass effects; avoid stacking several of
126them across many simultaneous media elements unless the composition needs it,
127then verify playback and a draft render.
128Cost follows treated pixel area as well as element count. More than two
129simultaneously visible full-frame multipass media layers requires a continuous
130playback check on the target machine; simplify or pre-render the stack if it
131drops frames. Do not impose or claim a universal hard cap from one machine.

Seed or assemble

Use the table when a tested recipe directly fits. Read only that recipe section. Recipes are optional macros, not a closed list of allowed results.

Intent or sourceRecipe heading to read
Talking head, interview, presenter, people-focused photoNatural Portrait
Product footage, lifestyle footage, clean social polishProduct Polish
Screen capture, dashboard, website, app UIUI Fidelity
Warm memory, restrained nostalgiaFilm Memory
Creator/UGC handheld camera characterCreator Camcorder
Analog tape playbackVHS Playback
Small-gauge home-movie character8mm Home Movie
Editorial dots or ink printEditorial Halftone or Two-Ink Editorial Print
Monochrome dot/line screen printMonochrome Screen Print
Engraved or hand-hatched illustrationEngraved Illustration or Crosshatched Sketch
Curved scanlined displayCRT Display
Glyph-based artProcedural ASCII
Realtime palette quantizationOrdered Palette Dither
Exact historical error diffusionCached Error Diffusion
Finite warm flare layerOrganic Light Leak
Held-frame graphic interruptionFreeze-Frame Cutout
Short exposure-flash transitionSocial Flash / Editorial Reveal

Use rg -n '^## <heading>$' <SKILL_DIR>/references/media-treatment-recipes.md, then read only from that heading to the next ##. Do not load the entire cookbook for one request.

When source intent is unclear, inspect the concise capability overview:

hyperframes media-treatment --capabilities --json

It lists the complete surface by family with one-line descriptions. Then load only the family, effect, preset, or palette relevant to the inspected source:

hyperframes media-treatment --capability <id> --json

The focused result provides legal controls, recommended apply values, render cost, palette support, and the exact animation contract when supported. Use --all only for tooling/tests or a genuinely exhaustive audit. Compose one nested payload from these existing parts. Recipes and catalog-built payloads use the same renderer and persistence contract.

Treat renderLane: "multipass" as a cost signal. Blur, Bloom, and Kuwahara are bounded but more expensive than single-pass effects; avoid stacking several of them across many simultaneous media elements unless the composition needs it, then verify playback and a draft render. Cost follows treated pixel area as well as element count. More than two simultaneously visible full-frame multipass media layers requires a continuous playback check on the target machine; simplify or pre-render the stack if it drops frames. Do not impose or claim a universal hard cap from one machine.

Raw lines 76 to 132
133## Common workflow
1351. Confirm the target is a real `<img>` or `<video>` and inspect source color
136 metadata.
1372. For an image, read it once. For video, capture early/middle/late output as
138 one labeled sheet and read that one image:
140 ```bash
141 hyperframes snapshot <project> --frames 3 --no-end \
142 --output snapshots/treatment-before
143 ```
145 Read `snapshots/treatment-before/contact-sheet.jpg`; do not spend separate
146 model turns reading each frame unless the sheet exposes a specific problem.
147 Do not infer semantics from signal statistics alone.
1493. Choose one primary lane. Use one matching recipe as a tested seed, or read
150 the overview and one focused capability detail when the request is bespoke.
151 A seed may be changed or combined with compatible catalog controls when the
152 contact sheet justifies it. Do not invent keys, exceed reported ranges, or
153 stack effects without a visual reason. Do not run the generic grade/LUT
154 resolver first; it adds irrelevant candidates and may download an unused
155 LUT. Use `media-treatment --selector "#hero" --analyze --json` only when
156 correction needs measured signal evidence.
1574. Persist pixel settings with `hyperframes media-treatment`; it validates and
158 merges a patch into the existing nested `data-color-grading` contract. Use registered
159 GSAP only for supported animated values and Registry overlay blocks only
160 for authored dressing.
161 ```bash
162 hyperframes media-treatment --selector "<selector>" \
163 --grading '<nested JSON patch>' --apply --json
164 ```
165 A selector that matches several images or videos patches every match, each
166 merged into its own current grading (the JSON reports `count` and each
167 target); run `--clear` first for an identical look, or add
168 `--selector-index` to patch only one.
169 For a temporal reveal, use the focused capability result's `animation`
170 contract. If it is `null`, the capability is static. Author the starting CSS
171 property inline on the real media element and return temporary treatment
172 values to neutral so the finished shot preserves its existing pixels.
173 Prefer that bounded media animation first; if an overlay is justified,
174 install the owned Registry block instead of recreating it with bespoke
175 overlay markup.
176 For correction and ordinary polish, keep those values as editable
177 preset/adjustment JSON; do not generate a LUT for controls the realtime shader
178 already owns.
179 Use the canonical `details`/`effects` fields for vignette, grain, blur,
180 pixelate, and related primitives. Do not duplicate them with CSS filters,
181 SVG turbulence, opacity, or decorative DOM overlays.
1825. When the treatment calls for an overlay, install that named block with
183 `hyperframes add <name> --dir <project> --no-clipboard --json`, inspect its
184 returned `data-composition-src` host, and place it once using the block's
185 timing contract. Check for the installed file and host element
186 ID before insertion; never duplicate an existing overlay block. This is one
187 treatment workflow: do not make the user discover Catalog or separately ask
188 for the recipe's justified overlay.
1896. For ordinary correction/polish, capture one after-sheet with the same three
190 timestamps under `snapshots/treatment-after`, compare it to the before-sheet,
191 and stop when the result is clearly better. Run the normal project check;
192 do not encode a draft solely to prove a static correction.
1937. Escalate only when evidence requires it. Read individual frames to diagnose a
194 specific visual problem. Preview and render moving evidence when judging
195 treatment keyframes, glitch/tape motion, overlays, playback smoothness, LUT
196 timing, or any other temporal behavior. HDR/LOG, privacy, and brand-sensitive
197 work also require the existing explicit caveats and stronger verification.
198 If the treatment is not clearly better, keep the source unchanged.
1998. Report the selected media, primary intent, recipe seed if used, final
200 composed controls, optional overlays, and the frames/render that were
201 actually checked. Do not report visual quality from command success alone.
203`media-treatment --analyze` provides deterministic clipping and signal
204evidence for local composition media, not subject recognition or automatic
205taste. It reports HDR/metadata caveats and a bounded primary-correction patch;
206it does not invent wheels, curves, or HSL selections from statistics.

Common workflow

  1. Confirm the target is a real <img> or <video> and inspect source color metadata.
  2. For an image, read it once. For video, capture early/middle/late output as one labeled sheet and read that one image:

bash hyperframes snapshot <project> --frames 3 --no-end \ --output snapshots/treatment-before

Read snapshots/treatment-before/contact-sheet.jpg; do not spend separate model turns reading each frame unless the sheet exposes a specific problem. Do not infer semantics from signal statistics alone.

  1. Choose one primary lane. Use one matching recipe as a tested seed, or read the overview and one focused capability detail when the request is bespoke. A seed may be changed or combined with compatible catalog controls when the contact sheet justifies it. Do not invent keys, exceed reported ranges, or stack effects without a visual reason. Do not run the generic grade/LUT resolver first; it adds irrelevant candidates and may download an unused LUT. Use media-treatment --selector "#hero" --analyze --json only when correction needs measured signal evidence.
  2. Persist pixel settings with hyperframes media-treatment; it validates and merges a patch into the existing nested data-color-grading contract. Use registered GSAP only for supported animated values and Registry overlay blocks only for authored dressing. ``bash hyperframes media-treatment --selector "<selector>" \ --grading '<nested JSON patch>' --apply --json ` A selector that matches several images or videos patches every match, each merged into its own current grading (the JSON reports count and each target); run --clear first for an identical look, or add --selector-index to patch only one. For a temporal reveal, use the focused capability result's animation contract. If it is null, the capability is static. Author the starting CSS property inline on the real media element and return temporary treatment values to neutral so the finished shot preserves its existing pixels. Prefer that bounded media animation first; if an overlay is justified, install the owned Registry block instead of recreating it with bespoke overlay markup. For correction and ordinary polish, keep those values as editable preset/adjustment JSON; do not generate a LUT for controls the realtime shader already owns. Use the canonical details/effects` fields for vignette, grain, blur, pixelate, and related primitives. Do not duplicate them with CSS filters, SVG turbulence, opacity, or decorative DOM overlays.
  3. When the treatment calls for an overlay, install that named block with hyperframes add <name> --dir <project> --no-clipboard --json, inspect its returned data-composition-src host, and place it once using the block's timing contract. Check for the installed file and host element ID before insertion; never duplicate an existing overlay block. This is one treatment workflow: do not make the user discover Catalog or separately ask for the recipe's justified overlay.
  4. For ordinary correction/polish, capture one after-sheet with the same three timestamps under snapshots/treatment-after, compare it to the before-sheet, and stop when the result is clearly better. Run the normal project check; do not encode a draft solely to prove a static correction.
  5. Escalate only when evidence requires it. Read individual frames to diagnose a specific visual problem. Preview and render moving evidence when judging treatment keyframes, glitch/tape motion, overlays, playback smoothness, LUT timing, or any other temporal behavior. HDR/LOG, privacy, and brand-sensitive work also require the existing explicit caveats and stronger verification. If the treatment is not clearly better, keep the source unchanged.
  6. Report the selected media, primary intent, recipe seed if used, final composed controls, optional overlays, and the frames/render that were actually checked. Do not report visual quality from command success alone.

media-treatment --analyze provides deterministic clipping and signal evidence for local composition media, not subject recognition or automatic taste. It reports HDR/metadata caveats and a bounded primary-correction patch; it does not invent wheels, curves, or HSL selections from statistics.

Raw lines 133 to 206