luckiest-co 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/package.json +1 -1
  3. package/skills/luckiest-ab-testing/SKILL.md +1 -1
  4. package/skills/luckiest-ad-creative/SKILL.md +1 -1
  5. package/skills/luckiest-ads/SKILL.md +1 -1
  6. package/skills/luckiest-advisors/SKILL.md +1 -1
  7. package/skills/luckiest-aeo-grader/SKILL.md +1 -1
  8. package/skills/luckiest-ai-seo/SKILL.md +1 -1
  9. package/skills/luckiest-analytics/SKILL.md +1 -1
  10. package/skills/luckiest-aso/SKILL.md +1 -1
  11. package/skills/luckiest-churn-prevention/SKILL.md +1 -1
  12. package/skills/luckiest-co-marketing/SKILL.md +1 -1
  13. package/skills/luckiest-coder/SKILL.md +1 -1
  14. package/skills/luckiest-coder-brainstorming/SKILL.md +1 -1
  15. package/skills/luckiest-coder-consistency/SKILL.md +1 -1
  16. package/skills/luckiest-coder-constitution/SKILL.md +1 -1
  17. package/skills/luckiest-coder-debugging/SKILL.md +1 -1
  18. package/skills/luckiest-coder-dispatching-parallel-agents/SKILL.md +1 -1
  19. package/skills/luckiest-coder-executing-plans/SKILL.md +1 -1
  20. package/skills/luckiest-coder-finishing-a-branch/SKILL.md +1 -1
  21. package/skills/luckiest-coder-git-worktrees/SKILL.md +1 -1
  22. package/skills/luckiest-coder-guard/SKILL.md +1 -1
  23. package/skills/luckiest-coder-qa/SKILL.md +1 -1
  24. package/skills/luckiest-coder-receiving-code-review/SKILL.md +1 -1
  25. package/skills/luckiest-coder-requesting-code-review/SKILL.md +1 -1
  26. package/skills/luckiest-coder-shipping/SKILL.md +1 -1
  27. package/skills/luckiest-coder-subagent-driven-development/SKILL.md +1 -1
  28. package/skills/luckiest-coder-tdd/SKILL.md +1 -1
  29. package/skills/luckiest-coder-verification/SKILL.md +1 -1
  30. package/skills/luckiest-coder-writing-plans/SKILL.md +1 -1
  31. package/skills/luckiest-coder-writing-skills/SKILL.md +1 -1
  32. package/skills/luckiest-cold-email/SKILL.md +1 -1
  33. package/skills/luckiest-community-marketing/SKILL.md +1 -1
  34. package/skills/luckiest-competitor-profiling/SKILL.md +1 -1
  35. package/skills/luckiest-competitors/SKILL.md +1 -1
  36. package/skills/luckiest-content-strategy/SKILL.md +1 -1
  37. package/skills/luckiest-copy-editing/SKILL.md +1 -1
  38. package/skills/luckiest-copywriting/SKILL.md +1 -1
  39. package/skills/luckiest-cro/SKILL.md +1 -1
  40. package/skills/luckiest-customer-research/SKILL.md +1 -1
  41. package/skills/luckiest-directory-submissions/SKILL.md +1 -1
  42. package/skills/luckiest-emails/SKILL.md +1 -1
  43. package/skills/luckiest-extract-design-system/SKILL.md +1 -1
  44. package/skills/luckiest-free-tools/SKILL.md +1 -1
  45. package/skills/luckiest-image/SKILL.md +1 -1
  46. package/skills/luckiest-launch/SKILL.md +1 -1
  47. package/skills/luckiest-lead-magnets/SKILL.md +1 -1
  48. package/skills/luckiest-marketing-ideas/SKILL.md +1 -1
  49. package/skills/luckiest-marketing-plan/SKILL.md +1 -1
  50. package/skills/luckiest-marketing-psychology/SKILL.md +1 -1
  51. package/skills/luckiest-model-router/SKILL.md +1 -1
  52. package/skills/luckiest-offers/SKILL.md +1 -1
  53. package/skills/luckiest-onboarding/SKILL.md +1 -1
  54. package/skills/luckiest-paywalls/SKILL.md +1 -1
  55. package/skills/luckiest-popups/SKILL.md +1 -1
  56. package/skills/luckiest-pricing/SKILL.md +1 -1
  57. package/skills/luckiest-product-marketing/SKILL.md +1 -1
  58. package/skills/luckiest-programmatic-seo/SKILL.md +1 -1
  59. package/skills/luckiest-prompt-rewrite/SKILL.md +1 -1
  60. package/skills/luckiest-prospecting/SKILL.md +1 -1
  61. package/skills/luckiest-public-relations/SKILL.md +1 -1
  62. package/skills/luckiest-referrals/SKILL.md +1 -1
  63. package/skills/luckiest-revops/SKILL.md +1 -1
  64. package/skills/luckiest-sales-enablement/SKILL.md +1 -1
  65. package/skills/luckiest-schema/SKILL.md +1 -1
  66. package/skills/luckiest-seo-audit/SKILL.md +1 -1
  67. package/skills/luckiest-session-handoff/SKILL.md +1 -1
  68. package/skills/luckiest-signup/SKILL.md +1 -1
  69. package/skills/luckiest-site-architecture/SKILL.md +1 -1
  70. package/skills/luckiest-sms/SKILL.md +1 -1
  71. package/skills/luckiest-social/SKILL.md +1 -1
  72. package/skills/luckiest-thinker/SKILL.md +1 -1
  73. package/skills/luckiest-trends/SKILL.md +1 -1
  74. package/skills/luckiest-video/SKILL.md +1 -1
  75. package/skills/luckiest-website-cloner/ATTRIBUTION.md +29 -0
  76. package/skills/luckiest-website-cloner/CHANGELOG.md +8 -0
  77. package/skills/luckiest-website-cloner/LICENSE +21 -0
  78. package/skills/luckiest-website-cloner/SKILL.md +289 -0
  79. package/skills/luckiest-website-cloner/references/builtin-browser-recipes.md +74 -0
  80. package/skills/luckiest-website-cloner/references/compositing.md +65 -0
  81. package/skills/luckiest-website-cloner/references/fidelity-fast-path.md +92 -0
  82. package/skills/luckiest-website-cloner/references/playwright-cli-recipes.md +68 -0
  83. package/skills/luckiest-website-cloner/references/teardown.md +142 -0
  84. package/skills/luckiest-website-cloner/references/visual-qa.md +102 -0
  85. package/skills/luckiest-website-cloner/scripts/build-bundle.cjs +12 -0
  86. package/skills/luckiest-website-cloner/scripts/motion-probe.js +423 -0
  87. package/skills/luckiest-website-cloner/scripts/surface-map.js +392 -0
  88. package/skills/luckiest-website-cloner/scripts/tokens-probe.js +178 -0
  89. package/skills/luckiest-website-cloner-dom/ATTRIBUTION.md +4 -0
  90. package/skills/luckiest-website-cloner-dom/CHANGELOG.md +8 -0
  91. package/skills/luckiest-website-cloner-dom/LICENSE +21 -0
  92. package/skills/luckiest-website-cloner-dom/SKILL.md +170 -0
  93. package/skills/luckiest-website-cloner-dom/references/asset-resolution.md +93 -0
  94. package/skills/luckiest-website-cloner-dom/references/interaction-fingerprints.md +85 -0
  95. package/skills/luckiest-website-cloner-remix/ATTRIBUTION.md +4 -0
  96. package/skills/luckiest-website-cloner-remix/CHANGELOG.md +8 -0
  97. package/skills/luckiest-website-cloner-remix/LICENSE +21 -0
  98. package/skills/luckiest-website-cloner-remix/SKILL.md +202 -0
  99. package/skills/luckiest-website-cloner-remix/references/directions.md +82 -0
  100. package/skills/luckiest-website-cloner-remix/references/reskin.md +84 -0
  101. package/skills/luckiest-website-cloner-remix/references/tweak-panel.md +72 -0
  102. package/skills/luckiest-website-cloner-remix/scripts/apply-overrides.cjs +105 -0
  103. package/skills/luckiest-website-cloner-remix/scripts/gallery.cjs +71 -0
  104. package/skills/luckiest-website-cloner-remix/scripts/tokenize-css.cjs +127 -0
  105. package/skills/luckiest-website-cloner-remix/scripts/tweak-panel.js +169 -0
  106. package/skills/luckiest-website-cloner-shaders/ATTRIBUTION.md +11 -0
  107. package/skills/luckiest-website-cloner-shaders/CHANGELOG.md +8 -0
  108. package/skills/luckiest-website-cloner-shaders/LICENSE +21 -0
  109. package/skills/luckiest-website-cloner-shaders/SKILL.md +129 -0
  110. package/skills/luckiest-website-cloner-shaders/references/capture-backends.md +89 -0
  111. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/SKILL.md +123 -0
  112. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/capture-backends.md +201 -0
  113. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/evidence-policy.md +93 -0
  114. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/operating-contract.md +82 -0
  115. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/qa-failure-policy.md +100 -0
  116. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/recon-kernel.md +206 -0
  117. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/replay-policy.md +145 -0
  118. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/shaders-com.md +212 -0
  119. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/source-analysis.md +112 -0
  120. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/surface-discovery.md +113 -0
  121. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/target-lock.md +205 -0
  122. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/three-shader-reconstruction.md +155 -0
  123. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/tool-capability-matrix.md +57 -0
  124. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/references/unicorn-studio.md +387 -0
  125. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/scripts/fetch-rendered-dom.mjs +178 -0
  126. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/scripts/scan-bundle.sh +80 -0
  127. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/templates/extraction-report.md +41 -0
  128. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/templates/known-gaps.md +14 -0
  129. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/templates/qa-report.md +74 -0
  130. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/templates/replay-manifest.json +147 -0
  131. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/templates/run-state.json +75 -0
  132. package/skills/luckiest-website-cloner-shaders/vendor/web-shader-extractor/templates/scout-card.json +106 -0
@@ -0,0 +1,145 @@
1
+ # Replay Policy
2
+
3
+ Replay policy covers the `REPLAY_READY` gate, first local baseline, and stack choice.
4
+ The goal is to match recorded source behavior with the fewest new assumptions.
5
+
6
+ ## Replay Ready Contract
7
+
8
+ Record before entering `RAW_REPLAY`:
9
+
10
+ - replay route: `SOURCE_REPLAY`, `PIPELINE_REPLAY`, or `BEHAVIOR_REBUILD`
11
+ - fidelity tier and known limits
12
+ - blocking, important, deferred, and external unknowns
13
+ - fallback for any unresolved blocking unknown
14
+ - truth labels for implementation-critical leaf and wiring facts
15
+
16
+ Do not mark `REPLAY_READY` because the capture appears plausible.
17
+ `SOURCE` leaf facts do not imply `SOURCE` wiring.
18
+ If pass order, input coupling, time units, or output composite are still inferred, label those facts `PARTIAL` or `GUESS`.
19
+ Keep inferred gate facts blocking or record an explicit fidelity downgrade.
20
+
21
+ Proceed to `RAW_REPLAY` only when `blockingUnknowns` is empty, or every blocker has an explicit fallback with a recorded fidelity downgrade.
22
+ Move important unknowns into QA focus.
23
+
24
+ Do not enter `RAW_REPLAY` until `replay-manifest.json.gateDecision.replayReady` is true.
25
+ Its required evidence checklist must contain structured evidence items.
26
+ If the baseline depends on a fallback, record the fallback and downgrade in the manifest before implementation starts.
27
+
28
+ If a local baseline uses fitted values to run, those facts are not source replay.
29
+ Keep the values labeled `GUESS`.
30
+ Place them in `known-gaps.md`.
31
+ Route QA toward the missing source/runtime evidence.
32
+
33
+ ## Replay Routes
34
+
35
+ Choose and record one replay route in `replay-manifest.json`:
36
+
37
+ - `SOURCE_REPLAY`: public structured definitions, original source, source maps, readable framework modules, platform exports, or configs. Prefer this when available.
38
+ - `PIPELINE_REPLAY`: shader/WGSL, runtime objects, GPU frame capture, draw/pass/resource/state, input, and timing trace. Use when source is incomplete but runtime facts are sufficient.
39
+ - `BEHAVIOR_REBUILD`: partial source plus observed behavior. This is the last fallback and must be labeled approximate.
40
+
41
+ Do not describe a behavior rebuild as source extraction. Projectization does not change the baseline fidelity tier.
42
+
43
+ ## Stack Selection
44
+
45
+ Use native WebGL/WebGL2 when the target is:
46
+
47
+ - fullscreen shader
48
+ - small number of passes
49
+ - no complex scene graph
50
+ - no PBR/material lifecycle
51
+ - no GPGPU lifecycle tied to a framework
52
+ - conversion facts are complete
53
+
54
+ Use the source stack when:
55
+
56
+ - the framework/platform version is known or closely bounded
57
+ - source, source map, platform definition, or runtime objects are complete
58
+ - behavior depends on material systems, node graphs, post-processing, scene graph, resource lifecycle, or renderer quirks
59
+ - retaining the source stack reaches an evidence-matched baseline with fewer assumptions
60
+
61
+ Project-lite is a post-verification optimization. It is not a substitute for the verified baseline.
62
+
63
+ ## Raw Replay Priorities
64
+
65
+ Raw replay creates the first local baseline with the least rewriting:
66
+
67
+ 1. Preserve recorded source behavior and data shape.
68
+ 2. Keep original constants, shader code, pass order, timing, resources, and color model.
69
+ 3. Make it run locally with a minimal launch path.
70
+ 4. Document known gaps rather than masking them with tuning.
71
+
72
+ Use the source stack when it adds fewer assumptions. Use native WebGL/WebGL2 only when conversion does not add uncertainty.
73
+
74
+ ## Baseline Directory
75
+
76
+ Output artifacts should be layered:
77
+
78
+ ```text
79
+ output/
80
+ |-- capture-baseline/
81
+ |-- editable-project/
82
+ |-- project-lite/
83
+ |-- scout-card.json
84
+ |-- replay-manifest.json
85
+ |-- qa-report.md
86
+ |-- extraction-report.md
87
+ |-- known-gaps.md
88
+ `-- .web-shader-extractor/run-state.json
89
+ ```
90
+
91
+ ```text
92
+ output/capture-baseline/
93
+ |-- index.html
94
+ |-- src/
95
+ |-- assets/
96
+ |-- README-run.md
97
+ `-- evidence-links.md
98
+ ```
99
+
100
+ ## No Compensation Tuning
101
+
102
+ Do not change brightness, speed, offsets, noise scale, fresnel multipliers, SDF epsilons, or color values without evidence.
103
+ If the result differs, classify the root cause: color, timing, coordinates, FBO graph, resource, state, input, or environment.
104
+
105
+ Once baseline verification starts, do not overwrite it for projectization.
106
+ Fix baseline in place only for baseline errors.
107
+ Create `editable-project/` separately for refactors.
108
+
109
+ Use the bundled templates as starting schemas, not free-form notes:
110
+ `templates/scout-card.json`, `templates/replay-manifest.json`, `templates/run-state.json`, `templates/qa-report.md`, `templates/known-gaps.md`, and `templates/extraction-report.md`.
111
+ Fill every placeholder with target-bound evidence or record the gap.
112
+
113
+ ## Projectization
114
+
115
+ Projectization starts only after `BASELINE_VERIFIED`.
116
+
117
+ Default output:
118
+
119
+ ```text
120
+ output/editable-project/
121
+ |-- package.json or importmap-based index.html
122
+ |-- src/
123
+ |-- assets/
124
+ |-- README.md
125
+ `-- qa/
126
+ ```
127
+
128
+ Projectization may modularize source, add parameter interfaces, improve naming, or introduce a build pipeline.
129
+ It must not silently change the replay route or fidelity tier.
130
+
131
+ Run Baseline -> Editable validation after projectization:
132
+
133
+ - same viewport, DPR, browser/backend
134
+ - same fixed time/frame
135
+ - same pointer/scroll/resize state
136
+ - same crop and background/composite
137
+
138
+ Any P0/P1/P2 regression returns to `PROJECTIZE`, not to target scouting unless the regression reveals the baseline was wrong.
139
+
140
+ Create `project-lite/` only when simplification is supported by evidence and independently verified.
141
+ If it fails, remove or mark it experimental.
142
+ Do not downgrade the verified editable project.
143
+
144
+ Do not create `editable-project/` as the primary deliverable until `qa-report.md` records Source -> Baseline as passed or passed with documented gaps.
145
+ Do not mark `DONE_PROJECTIZED` until Baseline -> Editable regression is recorded in `qa-report.md`.
@@ -0,0 +1,212 @@
1
+ # shaders.com / TSL Adapter
2
+
3
+ Use this adapter only after the target surface group has been attributed to a shaders.com renderer or a shaders.com public definition.
4
+ Treat versions, keys, mappings, and backend choice as runtime facts to verify on the current target.
5
+
6
+ Stability: volatile. Treat endpoint names, variable names, keys, component IDs, short-code mappings, and backend choices as hints until verified on the current target.
7
+
8
+ shaders.com is a shader design tool. Observed builds use Nuxt.js, Three.js TSL, and Supabase. Verify the exact Three.js version and WebGPU/WebGL backend from target runtime or current bundle evidence.
9
+
10
+ ## Adapter Interface
11
+
12
+ - `detect(context)`: target canvas has shaders.com renderer evidence, target route/API returns the matching preset/collection definition, or runtime owner binds the renderer to target.
13
+ - `preferredEvidence(context)`: public collection/preset definition, current runtime config, and target-bound Three.js/TSL module route.
14
+ - `capture(context)`: component tree, decoded definition, TSL node source, assets/SDFs, renderer backend, time/input rules, color/output model.
15
+ - `replay(context)`: `SOURCE_REPLAY` when definition and TSL source are sufficient; `PIPELINE_REPLAY` when runtime/capture facts are sufficient but source is incomplete.
16
+ - `validationHints(context)`: SDF Y flip, linear color pipeline, TSL timer rules, Glass parameter fidelity, WebGPU vs WebGL backend.
17
+ - `fallback(context)`: target-bound source-map or module slice, frame capture, then behavior rebuild with explicit downgrade.
18
+
19
+ ## Recognition Signals
20
+
21
+ - URL pattern: `shaders.com/collection/{slug}/{presetId}` or `shaders.com/preset/{id}`
22
+ - Canvas hints such as `data-renderer="shaders"` plus `data-engine`; verify the version dynamically
23
+ - Nuxt.js paths such as `_nuxt/`
24
+ - Clerk authentication on the site
25
+ - Supabase storage URLs such as `data.shaders.com/storage/v1/`
26
+
27
+ ## Architecture Differences
28
+
29
+ Compared with Unicorn Studio:
30
+
31
+ - It commonly uses Three.js TSL node graphs rather than raw GLSL source.
32
+ - It has multiple component types, each potentially backed by a TSL `fragmentNode`; verify the current count and names from the current bundle.
33
+ - Definition data may be XOR + base64 encoded.
34
+ - Components can be nested; for example a Glass component may contain child effects.
35
+
36
+ ## Data Acquisition
37
+
38
+ ### API Endpoints
39
+
40
+ ```bash
41
+ # Collection variant with encoded definition; public when accessible without auth.
42
+ curl -s "https://shaders.com/api/collections/{slug}/{variantId}"
43
+
44
+ # Preview API with encoded definition and possible watermark injection.
45
+ curl -s "https://shaders.com/api/preview/preset/{presetId}"
46
+
47
+ # Nuxt payload, usually metadata only rather than shader definition.
48
+ curl -s "https://shaders.com/collection/{slug}/{id}/_payload.json"
49
+ ```
50
+
51
+ ### Definition Decoding
52
+
53
+ Definitions may use XOR + base64 encoding with route-specific keys.
54
+
55
+ 1. Website API (`/api/collections/`):
56
+ - Extract the obfuscation key from the current Nuxt runtime config. Do not reuse fixed keys from old samples.
57
+ - Component/property names may use short codes such as `C52` for `Plasma` or `p06` for `angle`.
58
+ - Decode with `JSON.parse(XOR(base64decode(encoded), keyBytes))`.
59
+ - Restore readable names with the current code-to-name mapping table.
60
+
61
+ 2. Preview API (`/api/preview/`):
62
+ - Verify the key and response shape from the current public frontend code.
63
+ - It may use readable property names directly.
64
+ - It may inject a watermark `ImageTexture` component.
65
+
66
+ ### Code Mapping Table
67
+
68
+ Extract component and property short-code mappings from the current JS bundle. Do not assume component counts, sorting, or numeric IDs are stable across releases.
69
+
70
+ ## Known Failure Cases
71
+
72
+ ### Y-Axis Flip
73
+
74
+ Observed shaders.com samples show a Y flip for SDF textures and UVs.
75
+
76
+ SDF binaries (`.bin`) often use image coordinates where Y=0 is at the top, while WebGL texture coordinates use Y=0 at the bottom. Loading them directly can flip shapes vertically.
77
+
78
+ ```glsl
79
+ // Wrong: direct sampling.
80
+ float sdf = texture(tSDF, shapeUV).r;
81
+
82
+ // Correct for known flipped SDFs: flip Y.
83
+ vec2 sdfUV = vec2(shapeUV.x, 1.0 - shapeUV.y);
84
+ float sdf = texture(tSDF, sdfUV).r;
85
+
86
+ // The Y component of the gradient may also need sign inversion.
87
+ float dSdy = -(texture(tSDF, sdfUV - vec2(0, eps)).r - sdf) / eps;
88
+ ```
89
+
90
+ Component definitions may also use DOM coordinates where Y=0 is at the top. For Glass-style shaders, verify whether `center.y` must be flipped as `center.y = 1.0 - center.y`.
91
+
92
+ ### SDF Binary Format
93
+
94
+ Known samples use:
95
+
96
+ - 512 x 512 Float32 single-channel data
97
+ - 1,048,576 bytes: `512 * 512 * 4`
98
+ - signed distance values, negative inside and positive outside
99
+ - raw values without `* 2.0 - 1.0` remapping
100
+ - `OES_texture_float_linear` for linear filtering when needed
101
+
102
+ WebGL2 loading pattern:
103
+
104
+ ```js
105
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.R32F, 512, 512, 0, gl.RED, gl.FLOAT, data);
106
+ ```
107
+
108
+ ## Component Table
109
+
110
+ | Category | Components | Complexity |
111
+ |---|---|---|
112
+ | Texture | Plasma, Godrays, SimplexNoise, LinearGradient, RadialGradient | medium |
113
+ | Shape | Glass, Blob, Circle, Ring, Star, RoundedRect, Polygon | high |
114
+ | Distortion | WaveDistortion, ChromaticAberration, Liquify, Twirl, Bulge | low to medium |
115
+ | Stylization | FilmGrain, Halftone, Ascii, Dither, Glow, Bloom | low to medium |
116
+ | Post-processing | Blur, ProgressiveBlur, BrightnessContrast, HueShift | low |
117
+
118
+ ## Render Pipeline
119
+
120
+ Typical target-bound evidence may reveal:
121
+
122
+ ```text
123
+ Three.js TSL renderer; verify version dynamically
124
+ |- prefers WebGPU, falls back to WebGL
125
+ |- orthographic camera plus one fullscreen quad
126
+ |- component tree composited bottom to top
127
+ |- components with children capture child content through RTT
128
+ |- blend mode implemented with custom blend functions
129
+ `- Glass path: SDF evaluation -> gradient normal -> refraction -> chromatic aberration -> blur -> tint -> highlight -> Fresnel -> composite
130
+ ```
131
+
132
+ ## Replay Strategy
133
+
134
+ 1. TSL cannot be copied as raw GLSL; translate it or replay it through the source stack.
135
+ 2. Extract the target-bound TSL `fragmentNode` from the current JS bundle when source replay requires it.
136
+ 3. Convert the component tree into a multi-pass FBO graph.
137
+ 4. Validate SDF Y orientation against the target.
138
+ 5. Glass components have many parameters; keep source multipliers exact.
139
+
140
+ ## Color Space
141
+
142
+ Known shaders.com / Three.js TSL samples commonly use a linear workflow, but the current target must still be verified from renderer, runtime, or source evidence.
143
+
144
+ - Hex colors such as `#2c2c42` are commonly sRGB values.
145
+ - TSL `color()` commonly converts sRGB to linear.
146
+ - Whether intermediate FBOs store linear values must be verified from the target render graph.
147
+ - The final output encoding stage must be verified from target renderer configuration.
148
+
149
+ Example for a common path:
150
+
151
+ ```glsl
152
+ // Common path: sRGB hex -> linear at definition time.
153
+ vec3 colorA = pow(vec3(0.173, 0.173, 0.259), vec3(2.2)); // #2c2c42
154
+
155
+ // Intermediate passes and final output encoding must follow target evidence.
156
+ fragColor = vec4(pow(color.rgb, vec3(1.0 / 2.2)), color.a);
157
+ ```
158
+
159
+ Error case: applying a fixed gamma correction in intermediate or final passes without verifying the target renderer's color configuration.
160
+
161
+ ## Parameter Fidelity
162
+
163
+ Do not tune parameters manually. Match the formulas and multipliers from the TSL translation:
164
+
165
+ ```text
166
+ Original TSL multiplier GLSL must use
167
+ aberration * 0.06 not 0.12
168
+ fresnelSoftness * 0.06 not 0.12
169
+ fresnel = 0.17 not 0.4
170
+ SDF gradient eps = 0.01 not 0.005
171
+ ```
172
+
173
+ If the visual result does not match, inspect:
174
+
175
+ 1. color space, especially sRGB/linear confusion
176
+ 2. noise implementation differences such as Perlin vs `mx_noise_float`
177
+ 3. time base
178
+ 4. FBO/component-tree order
179
+
180
+ Do not change multipliers to mask a mismatch. That may fit one preset while breaking other parameter combinations.
181
+
182
+ ## TSL Time Convention
183
+
184
+ `timerLocal(speed)` increments by `speed` units per second. Replay as `uTime = seconds * speed`, then apply any component-specific multiplier inside the shader.
185
+
186
+ | Component | speed parameter | shader multiplier | effective rate per second |
187
+ |---|---:|---:|---:|
188
+ | Plasma | 2 | 0.125 | 0.25 |
189
+ | Godrays | 0.7 | 0.2 | 0.14 |
190
+ | WaveDistortion | 0.8 | 0.5 | 0.4 |
191
+ | FilmGrain | none | none | static |
192
+
193
+ ## TSL To GLSL Identifier Mapping
194
+
195
+ These mappings are examples from one observed bundle and may change. Extract them dynamically from the current build.
196
+
197
+ | Local name | TSL function | GLSL |
198
+ |---|---|---|
199
+ | `C` / `z` | `vec4()` | `vec4` |
200
+ | `x` / `D` | `vec2()` | `vec2` |
201
+ | `q` / `N` | `vec3()` | `vec3` |
202
+ | `P` / `J` | `resolution` | `u_resolution` |
203
+ | `A` / `$` | `uv` | `vUv` |
204
+ | `se` / `Oe` | `sin()` | `sin` |
205
+ | `W` / `I` | `cos()` | `cos` |
206
+ | `ne` | `mix()` | `mix` |
207
+ | `D` | `smoothstep()` | `smoothstep` |
208
+ | `fe` | `clamp()` | `clamp` |
209
+ | `ar` | `mx_noise_float()` | `perlinNoise3D()` candidate |
210
+ | `dr` / `Gt` | `timerLocal()` | `u_time * speed` |
211
+ | `Me` / `wt` | `rtt()` | FBO pass |
212
+ | `Ce` | `renderOutput()` | `fragColor` |
@@ -0,0 +1,112 @@
1
+ # Source Analysis
2
+
3
+ Source analysis is a targeted fallback after target lock, or before lock only when it resolves a precise `nextProbe`. Keep output as evidence, not rewritten implementation.
4
+
5
+ ## Bundle Slices
6
+
7
+ Allowed before `TARGET_LOCKED` only when the current `scout-card.json` is `attributed` or has a precise `nextProbe`:
8
+
9
+ - source map lookup for a target context creation stack
10
+ - public platform definition referenced by target embed ID
11
+ - dynamic chunk graph around a target script URL
12
+ - small grep for target IDs, canvas selectors, or known shader/program names
13
+
14
+ Do not download and deobfuscate every bundle before `TARGET_LOCKED`.
15
+
16
+ If a local slice already exists, `scripts/scan-bundle.sh` can summarize keyword hypotheses. Use it only to choose the next target-bound probe; do not promote its counts to implementation facts.
17
+
18
+ When delegating bundle analysis, provide:
19
+
20
+ ```text
21
+ Target: surface-1 / targetSet [...]
22
+ Known owner evidence: ...
23
+ Unknown to resolve: ...
24
+ Files/slices: ...
25
+ Search anchors: target ID, stack function, shader keyword, platform component
26
+ Required output: exact source facts with file offsets and confidence
27
+ Forbidden: global framework conclusions not bound to target
28
+ ```
29
+
30
+ Look for:
31
+
32
+ - shader/WGSL/TSL source or node definitions
33
+ - renderer/canvas creation path
34
+ - render graph and FBO setup
35
+ - resource URLs and loaders
36
+ - timing/input update rules
37
+ - config decoding and component tree reconstruction
38
+
39
+ ## Config Extraction
40
+
41
+ Configuration values must be source-derived and target-bound. Do not guess colors, dimensions, speeds, or feature flags to compensate for visual mismatch.
42
+
43
+ Evidence priority:
44
+
45
+ 1. Public structured API or platform definition whose instance ID matches the target surface/embed.
46
+ 2. Payload data referenced by the target route or target component.
47
+ 3. Inline JSON or `window` globals tied to the target instance.
48
+ 4. Source map or readable module creating the target surface.
49
+ 5. Narrow bundle slice selected from target-bound evidence.
50
+
51
+ Common searches:
52
+
53
+ ```bash
54
+ rg -o 'api/(presets|shaders|collections|embeds)[^"'\'' )]+' evidence/source
55
+ rg '_payload\.json|public:\{' evidence/source evidence/dom
56
+ rg '__NEXT_DATA__|self\.__next_f|runtimeConfig' evidence/dom evidence/source
57
+ rg 'window\.__[A-Z0-9_]+__\s*=' evidence/dom evidence/source
58
+ ```
59
+
60
+ For every implementation-critical value, record:
61
+
62
+ - evidence location
63
+ - target IDs it applies to
64
+ - value type and units
65
+ - whether ranges are 0-1, 0-255, CSS pixels, backing pixels, seconds, frames, or normalized coordinates
66
+ - any decode step used
67
+
68
+ If a config value cannot be proven and the baseline depends on it, keep it in `blockingUnknowns` or mark an explicit replay-route downgrade.
69
+
70
+ ## Encoded Definitions
71
+
72
+ Use this when a target-bound public API or payload contains encoded scene/effect definitions.
73
+
74
+ Decode only definitions from public content or content the user is authorized to access.
75
+ Do not persist private cookies, Authorization headers, tokens, or account data.
76
+ Do not bypass paywalls, CAPTCHA, or access controls.
77
+
78
+ Recognition signals:
79
+
80
+ - `_encoded: true`
81
+ - `definition` is Base64 or compressed text instead of JSON
82
+ - source contains `atob`, `btoa`, `TextEncoder`, `TextDecoder`, XOR, inflate, or mapping tables
83
+ - runtime config exposes a public obfuscation/decode key
84
+
85
+ ```bash
86
+ rg '(atob|btoa|obfuscation|_encoded|TextDecoder|TextEncoder|inflate)' evidence/source
87
+ rg '(codeToComponent|codeToProp|components.*sort|properties.*sort)' evidence/source
88
+ ```
89
+
90
+ When decoding, record:
91
+
92
+ - input definition path
93
+ - key source path and whether it is public
94
+ - decode algorithm source
95
+ - decoded schema hash
96
+ - target IDs using the decoded definition
97
+
98
+ Base64 + XOR pattern:
99
+
100
+ ```python
101
+ import base64, json
102
+
103
+ def decode(encoded, key):
104
+ raw = base64.b64decode(encoded)
105
+ key_bytes = key.encode("utf-8")
106
+ decrypted = bytes([raw[i] ^ key_bytes[i % len(key_bytes)] for i in range(len(raw))])
107
+ return json.loads(decrypted.decode("utf-8"))
108
+ ```
109
+
110
+ Treat hard-coded keys in examples as stale. Extract keys dynamically from the current public source and bind them to the target route.
111
+
112
+ After decoding, validate the definition by checking that component tree, resources, and render route match target runtime evidence.
@@ -0,0 +1,113 @@
1
+ # Surface Discovery
2
+
3
+ Surface discovery has two jobs: inventory candidates, then prove causality between the requested visual and one or more rendering surfaces. Inventory alone never decides the target.
4
+
5
+ ## Surfaces To Enumerate
6
+
7
+ - visible and hidden `canvas`
8
+ - canvases inside same-origin iframes; for cross-origin iframes, record frame bounds, screenshots, network/frame metadata, or tool-accessible observations without bypassing origin restrictions
9
+ - `OffscreenCanvas` transferred to workers
10
+ - WebGPU canvas contexts
11
+ - DOM masks, clip paths, sticky containers, SVG filters, videos, and images composited with canvas
12
+ - shared renderer canvases that persist across routes
13
+
14
+ ## Candidate Record
15
+
16
+ Record each candidate as:
17
+
18
+ ```json
19
+ {
20
+ "id": "surface-1",
21
+ "selector": "canvas#hero",
22
+ "frame": "main",
23
+ "bounds": { "x": 0, "y": 0, "width": 1440, "height": 900 },
24
+ "cssSize": { "width": 1440, "height": 900 },
25
+ "backingSize": { "width": 2880, "height": 1800 },
26
+ "dpr": 2,
27
+ "visibility": "visible",
28
+ "zIndex": "auto",
29
+ "context": "webgl2|webgl|webgpu|2d|bitmaprenderer|unknown",
30
+ "owner": "main-thread|iframe|worker|unknown",
31
+ "routePersistence": "single-route|persistent|unknown",
32
+ "notes": []
33
+ }
34
+ ```
35
+
36
+ ## Context Probes
37
+
38
+ Use non-destructive runtime evaluation first:
39
+
40
+ - inspect size, bounding rect, computed style, opacity, transform, pointer-events, z-index
41
+ - check known dataset hints such as `data-engine`, `data-renderer`, embed IDs
42
+ - detect existing contexts without creating unrelated new contexts when possible
43
+ - observe worker script URLs, `transferControlToOffscreen`, and WebGPU adapter/device calls if available
44
+
45
+ If context creation must be probed, label that as probe-induced evidence so it is not confused with the page's real context.
46
+
47
+ ## Target Model
48
+
49
+ The target may be a surface group:
50
+
51
+ ```text
52
+ canvas#background
53
+ + canvas#particles
54
+ + DOM mask
55
+ + scroll progress
56
+ ```
57
+
58
+ Use `targetSet` in Scout Card and Manifest. Do not force the result into a single `targetCanvas`.
59
+
60
+ ## Ranking And Attribution
61
+
62
+ Rank candidates for attribution by:
63
+
64
+ - overlap with the requested visual area
65
+ - frame-to-frame pixel change
66
+ - z-order and clipping relationship
67
+ - pointer/scroll/resize coupling
68
+ - route persistence
69
+ - owner traceability
70
+
71
+ Attribution scoring dimensions:
72
+
73
+ - `visualCoverage`: how much the surface overlaps the target visual region
74
+ - `temporalActivity`: how much the surface changes across sampled frames
75
+ - `interactionCoupling`: pointer, scroll, resize, or route changes affect the target
76
+ - `sectionCoupling`: relationship to page sections, sticky positioning, masks, and clips
77
+ - `routePersistence`: whether the surface persists across route changes
78
+ - `ablationImpact`: what target pixels/behaviors disappear when the surface is hidden or frozen
79
+ - `ownershipEvidence`: how well context and renderer owner can be traced
80
+
81
+ ## Attribution Actions
82
+
83
+ Use the lowest-cost action that resolves the current unknown:
84
+
85
+ 1. style, bounds, and visibility observation
86
+ 2. multi-frame diff on a target crop
87
+ 3. temporary `visibility:hidden`, opacity, transform, or clip ablation
88
+ 4. freeze `requestAnimationFrame` or replace a candidate surface output
89
+ 5. pointer sweep
90
+ 6. small scroll
91
+ 7. resize
92
+ 8. route switch
93
+ 9. owner stack or preload probe
94
+
95
+ All modifications are brief, reversible, and observational. Do not persist source-site changes.
96
+
97
+ ## Evidence Examples
98
+
99
+ Strong attribution examples:
100
+
101
+ - target crop loses the distortion only when `surface-2` is hidden
102
+ - scroll progress changes uniforms on `surface-1` and the visual phase changes accordingly
103
+ - DOM mask plus canvas output together create the visible target; either alone is incomplete
104
+ - `OffscreenCanvas` worker owns the only context whose frame changes match the target crop
105
+
106
+ Weak attribution examples:
107
+
108
+ - candidate is the largest canvas
109
+ - candidate animates continuously
110
+ - candidate has a framework-looking dataset attribute
111
+ - bundle contains shader strings but no target binding exists
112
+
113
+ Area alone is weak evidence. A small overlay, mask, or DOM layer may be essential to the target effect.