@hraness/slopcamera 3.2.8 → 3.3.1

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 (150) hide show
  1. package/README.md +29 -9
  2. package/apps/desktop/application/context.ts +6 -0
  3. package/apps/desktop/application/default-registry.ts +26 -0
  4. package/apps/desktop/application/operation.ts +14 -1
  5. package/apps/desktop/application/operations/index.ts +4 -0
  6. package/apps/desktop/application/operations/spatial-behavior.ts +151 -0
  7. package/apps/desktop/application/operations/spatial-direction.ts +222 -0
  8. package/apps/desktop/application/operations/spatial-rendered-audit.ts +174 -0
  9. package/apps/desktop/application/operations/spatial-review.ts +194 -0
  10. package/apps/desktop/application/operations/spatial-scene.ts +25 -1
  11. package/apps/desktop/application/registry.ts +2 -2
  12. package/apps/desktop/application/spatial-asset-admission.ts +201 -0
  13. package/apps/desktop/application/spatial-assets.ts +160 -31
  14. package/apps/desktop/application/spatial-render.ts +217 -20
  15. package/apps/desktop/application/spatial-rendered-audit.ts +273 -0
  16. package/apps/desktop/application/spatial-review.ts +361 -0
  17. package/apps/desktop/application/spatial-spz.ts +48 -3
  18. package/apps/desktop/application/spatial-world-import.ts +26 -5
  19. package/apps/desktop/application/spatial-world-metadata.ts +105 -0
  20. package/apps/desktop/cli/args.ts +514 -11
  21. package/apps/desktop/cli/capability-manifest.ts +374 -0
  22. package/apps/desktop/cli/cinema-renderer.ts +608 -0
  23. package/apps/desktop/cli/command-host-resources.ts +29 -1
  24. package/apps/desktop/cli/commands.ts +1188 -4
  25. package/apps/desktop/cli/gateway-review-provider.ts +334 -0
  26. package/apps/desktop/cli/help.ts +172 -6
  27. package/apps/desktop/cli/main.ts +3 -3
  28. package/apps/desktop/cli/portable-surface.ts +6 -1
  29. package/apps/desktop/cli/spatial-asset-service.ts +124 -0
  30. package/apps/desktop/cli/spatial-design-service.ts +237 -0
  31. package/apps/desktop/cli/spatial-generate-service.ts +370 -0
  32. package/apps/desktop/cli/spatial-scene-service.ts +268 -4
  33. package/apps/desktop/cli/workflow-code.ts +1 -1
  34. package/apps/desktop/code/semantic-builder.ts +24 -0
  35. package/apps/desktop/contracts/cinema.ts +736 -0
  36. package/apps/desktop/contracts/index.ts +1 -0
  37. package/apps/desktop/contracts/spatial-asset.ts +16 -0
  38. package/apps/desktop/contracts/spatial-world.ts +26 -3
  39. package/apps/desktop/core/cinema-plan.ts +1320 -0
  40. package/apps/desktop/core/index.ts +1 -0
  41. package/apps/desktop/core/storage.ts +75 -0
  42. package/apps/desktop/dist/cli/main.js +725 -273
  43. package/apps/desktop/html-overlay/spatial.ts +619 -57
  44. package/apps/desktop/workflows/cinematic-world.ts +127 -0
  45. package/apps/desktop/workflows/index.ts +6 -0
  46. package/dist/cli.js +25 -429
  47. package/dist/code/advanced.js +1 -269
  48. package/dist/code/index.js +16 -2239
  49. package/dist/generate.js +1 -23
  50. package/dist/host-resources.js +1 -25
  51. package/dist/index-0bbesn4m.js +35 -0
  52. package/dist/index-296qhpf2.js +3 -0
  53. package/dist/index-3cxf2c58.js +3 -0
  54. package/dist/index-77fjfg9f.js +3 -0
  55. package/dist/index-80a36bc0.js +3 -0
  56. package/dist/index-a3vvs3rf.js +3 -0
  57. package/dist/index-b3geqczn.js +5 -0
  58. package/dist/index-cgpkyjqa.js +3 -0
  59. package/dist/index-f0ptv8dm.js +7 -0
  60. package/dist/index-grk47tgs.js +3 -0
  61. package/dist/index-qry58nj2.js +10 -0
  62. package/dist/index.js +1 -226
  63. package/dist/operations.js +1 -28
  64. package/dist/skill-install-gx7afxsd.js +2 -0
  65. package/dist/vectorize/worker.js +1 -141
  66. package/dist/workflow.js +1 -15
  67. package/docs/README.md +5 -1
  68. package/package.json +7 -5
  69. package/skills/slopcamera/SKILL.md +6 -1
  70. package/skills/slopcamera/references/directed-scenes.md +22 -2
  71. package/skills/slopcamera/references/gateway-media.md +15 -1
  72. package/skills/slopcamera/references/image-galleries.md +166 -0
  73. package/skills/slopcamera/references/install.md +1 -1
  74. package/skills/slopcamera/references/parametric-design.md +14 -0
  75. package/skills/slopcamera/references/scene-building.md +32 -0
  76. package/skills/slopcamera/references/social-collage-banners.md +204 -0
  77. package/skills/slopcamera/references/workflows-sdk.md +3 -3
  78. package/skills/slopcamera/scripts/compose-social-collage-banner.ts +728 -0
  79. package/src/capability-manifest.ts +361 -0
  80. package/src/cli.ts +222 -4
  81. package/src/code/canonical-json.ts +9 -0
  82. package/src/generate.ts +2 -2
  83. package/src/icon.ts +1111 -0
  84. package/src/image-gallery.ts +1049 -0
  85. package/src/index.ts +11 -0
  86. package/src/mcp/boundary.ts +11 -11
  87. package/src/mcp/index.ts +3 -0
  88. package/src/mcp/server.ts +2 -1
  89. package/src/mcp/tools.ts +1642 -130
  90. package/src/mcp/types.ts +19 -0
  91. package/src/operations.ts +412 -0
  92. package/src/portable-capability-manifest.ts +67 -0
  93. package/src/scene-gallery.ts +184 -0
  94. package/src/spatial-scene/asset-admission.ts +183 -0
  95. package/src/spatial-scene/audit-rendered.ts +692 -0
  96. package/src/spatial-scene/audit.ts +617 -0
  97. package/src/spatial-scene/behavior-audit.ts +252 -0
  98. package/src/spatial-scene/behavior-bake.ts +233 -0
  99. package/src/spatial-scene/behavior-fns.ts +585 -0
  100. package/src/spatial-scene/behavior-gallery.ts +109 -0
  101. package/src/spatial-scene/behavior-stdlib.ts +323 -0
  102. package/src/spatial-scene/behavior-trace.ts +325 -0
  103. package/src/spatial-scene/behavior.ts +618 -0
  104. package/src/spatial-scene/build.ts +632 -0
  105. package/src/spatial-scene/camera-rig.ts +125 -0
  106. package/src/spatial-scene/camera-track.ts +4 -2
  107. package/src/spatial-scene/character.ts +124 -0
  108. package/src/spatial-scene/contracts.ts +75 -7
  109. package/src/spatial-scene/design-templates.ts +351 -0
  110. package/src/spatial-scene/design.ts +327 -0
  111. package/src/spatial-scene/direction-compile.ts +584 -0
  112. package/src/spatial-scene/direction.ts +122 -0
  113. package/src/spatial-scene/effects.ts +149 -0
  114. package/src/spatial-scene/evaluate.ts +109 -29
  115. package/src/spatial-scene/gallery.ts +277 -0
  116. package/src/spatial-scene/generate.ts +239 -0
  117. package/src/spatial-scene/geometry-native.ts +165 -0
  118. package/src/spatial-scene/geometry.ts +1216 -0
  119. package/src/spatial-scene/gltf.ts +600 -77
  120. package/src/spatial-scene/identity.ts +55 -2
  121. package/src/spatial-scene/index.ts +36 -0
  122. package/src/spatial-scene/inspect.ts +35 -6
  123. package/src/spatial-scene/material-lighting.ts +609 -0
  124. package/src/spatial-scene/math.ts +21 -4
  125. package/src/spatial-scene/motion-evidence.ts +88 -0
  126. package/src/spatial-scene/parametric.ts +765 -0
  127. package/src/spatial-scene/particle-preparation.ts +183 -0
  128. package/src/spatial-scene/particle.ts +195 -0
  129. package/src/spatial-scene/patch.ts +109 -15
  130. package/src/spatial-scene/performance.ts +1613 -0
  131. package/src/spatial-scene/probe.ts +137 -0
  132. package/src/spatial-scene/recipe-pack.ts +86 -0
  133. package/src/spatial-scene/render-effects.ts +240 -0
  134. package/src/spatial-scene/review.ts +639 -0
  135. package/src/spatial-scene/simulation-bake.ts +206 -0
  136. package/src/spatial-scene/simulation.ts +187 -0
  137. package/src/spatial-scene/solve.ts +366 -0
  138. package/src/spatial-scene/temporal-audit.ts +354 -0
  139. package/src/version.ts +1 -1
  140. package/dist/index-42zsesc1.js +0 -2257
  141. package/dist/index-7131pg1c.js +0 -1820
  142. package/dist/index-7308egqr.js +0 -48
  143. package/dist/index-8txs6fkn.js +0 -712
  144. package/dist/index-fava6pge.js +0 -192
  145. package/dist/index-h1k0fnjq.js +0 -2363
  146. package/dist/index-r7gdhmsp.js +0 -424
  147. package/dist/index-sh6xbav6.js +0 -1219
  148. package/dist/index-z1w83f81.js +0 -4
  149. package/dist/index-zfnddgay.js +0 -2029
  150. package/dist/skill-install-dh0ntqba.js +0 -10
@@ -0,0 +1,166 @@
1
+ # Generate and review candidate galleries
2
+
3
+ Use an image gallery when a request leaves visual alternatives open: texture
4
+ maps, skyboxes and environment plates, backdrops, sprites, or competing design
5
+ directions. One command produces several bounded candidates in parallel,
6
+ composes a labelled contact sheet, and keeps every candidate independently
7
+ addressable with its exact prompt, digest, and provenance. Review the sheet
8
+ once, then promote the chosen candidate through an explicit authored step.
9
+ Generation never edits authored source or an existing project implicitly.
10
+
11
+ ## Pick the gallery lane
12
+
13
+ Two commands share one planner and compositor:
14
+
15
+ ```sh
16
+ # Portable: bounded file output, default utility model, still paid per candidate.
17
+ slopcamera image gallery 'weathered copper panel' \
18
+ --kind texture --output-dir review/copper --json
19
+
20
+ # Durable: one tracked Gateway job per candidate, catalog model required.
21
+ slopcamera ai image gallery 'weathered copper panel' \
22
+ --model <image-model-id> --kind texture --output-dir review/copper --json
23
+ ```
24
+
25
+ The portable lane writes candidate files, `gallery.png`, and `receipt.json`
26
+ into `--output-dir`. The durable lane additionally publishes each candidate
27
+ through the generated-artifact store beneath `artifacts/slopcamera/generated/`
28
+ with a retained job record per attempt, so interrupted or ambiguous paid work
29
+ stays reconcilable. Prefer the durable lane when provenance must survive the
30
+ invocation; both lanes are paid calls per candidate with zero client retries.
31
+
32
+ ## Choose the kind
33
+
34
+ `--kind` selects the prompt contract and default aspect:
35
+
36
+ | Kind | Contract | Aspect |
37
+ | --- | --- | --- |
38
+ | `image` | Plain subject, clean composition | 1:1 |
39
+ | `texture` | Seamless tileable flat-lit surface | 1:1 |
40
+ | `skybox` | Equirectangular 360 panorama, centered horizon | 2:1 |
41
+ | `backdrop` | Scenic plate for compositing | 16:9 |
42
+ | `sprite` | One isolated subject on neutral background | 1:1 |
43
+
44
+ ## Control the candidate set
45
+
46
+ - `--count <n>` renders the same kind contract `n` times (up to 16).
47
+ - `--vary 'axis[=v1,v2][;axis2...]'` takes the cartesian product of
48
+ `style`, `palette`, `material`, `lighting`, `mood`, and `detail` values.
49
+ Omit `=values` to use the kind-aware defaults, for example
50
+ `--vary 'style;lighting=golden hour,night'`.
51
+ - `--candidates <file.json>` supplies an explicit bounded list of
52
+ `{id, prompt|variant}` entries. `prompt` replaces the kind template
53
+ verbatim; `variant` appends one direction inside it.
54
+ - `--cell <n>` sets the square cell edge in pixels (64–1024, default 512).
55
+
56
+ `--candidates` is mutually exclusive with `--vary` and `--count`.
57
+
58
+ ## See seams and applied renders, not flat pixels
59
+
60
+ `--kind texture` composites each cell as a 2×2 tiled repeat so tiling seams
61
+ are visible in the sheet itself; `--no-tile` keeps a flat cell, and `--tile`
62
+ opts other kinds in. `--tile` and `--no-tile` are mutually exclusive, and
63
+ receipt rows carry `tiled: true`.
64
+
65
+ On the durable lane, `--preview probe` renders each settled candidate inside a
66
+ fixed checked-in probe scene — a texture becomes the material map on lit
67
+ geometry plus four adjacent wall tiles that expose seams, a skybox becomes the
68
+ scene environment lighting a reflective sphere, a backdrop becomes a surface
69
+ behind a lit subject — and the cell shows the rendered still:
70
+
71
+ ```sh
72
+ slopcamera ai image gallery 'weathered copper panel' \
73
+ --model <image-model-id> --kind texture --preview probe \
74
+ --output-dir review/copper --json
75
+ ```
76
+
77
+ `--preview probe` is valid only for `texture`, `skybox`, and `backdrop`. The
78
+ receipt row keeps the generated candidate `path`/`sha256` and the rendered
79
+ `cellImage` `path`/`sha256` as separate fields — promotion always targets the
80
+ candidate, never the still. A failed render leaves the flat candidate in the
81
+ sheet with a warning.
82
+
83
+ ## Review whole-scene variants
84
+
85
+ `slopcamera ai scene gallery` renders a base scene's bounded typed variants —
86
+ environment swaps, material changes, palette or transform axes expressed as
87
+ `slopcamera.spatial-scene-patch` operations — into the same kind of labelled
88
+ contact sheet, with no paid calls:
89
+
90
+ ```sh
91
+ slopcamera ai scene gallery scene.json \
92
+ --variants gallery.variants.json --output-dir review/world --json
93
+ ```
94
+
95
+ ```json
96
+ { "kind": "slopcamera.scene-variants", "schemaVersion": 1,
97
+ "variants": [
98
+ { "id": "dusk", "label": "Dusk",
99
+ "patch": { "kind": "slopcamera.spatial-scene-patch", "schemaVersion": 1,
100
+ "operations": [{ "kind": "set-color", "entityId": "entity_sky_dome", "color": "#2a1e4f" }] } }
101
+ ] }
102
+ ```
103
+
104
+ Each variant's `expectedSceneSha256` is optional and defaults to the base
105
+ digest; a mismatched value fails before any render. Every derived scene is
106
+ published at `variants/<id>/scene.json` under the output directory with its
107
+ asset payloads staged alongside — inherited payload paths resolve beside the
108
+ authored scene, variant-authored `add-asset`/`replace-asset` payload paths
109
+ resolve beside the variants file — so the derived scene re-renders
110
+ standalone. The receipt keeps the base digest, per-variant patch and derived
111
+ scene digests, the rendered still digest, and the render receipt path per row;
112
+ a failed render stays in the sheet as a failed row. `--camera` selects a scene
113
+ camera, `--time-us` picks the frame, `--cell` sizes cells.
114
+
115
+ ## Review the sheet
116
+
117
+ Inspect `gallery.png` directly. Each cell carries a `#<index> <id>` label; a
118
+ failed candidate stays in the sheet as a dark cell marked `failed` so the
119
+ review covers the whole requested set. `receipt.json` rows map every index to
120
+ its path, SHA-256, media type, request ID, cell geometry, and — on the durable
121
+ lane — its job record path.
122
+
123
+ ## Promote a selected candidate explicitly
124
+
125
+ A gallery never applies itself. After selecting a cell, use that candidate's
126
+ own path and digest. For a scene material or environment, declare the image
127
+ as an asset and apply it through one `scene patch` carrying the current
128
+ `expectedSceneSha256`:
129
+
130
+ ```json
131
+ { "kind": "add-asset", "asset": {
132
+ "assetId": "asset_copper",
133
+ "payload": { "path": "<candidate path relative to the scene file>", "sha256": "<receipt sha256>", "bytes": <n> },
134
+ "interpretation": { "kind": "image", "width": <w>, "height": <h>, "colorSpace": "srgb", "alpha": "opaque", "mimeType": "image/png" },
135
+ "dependencies": [],
136
+ "provenance": { "source": "generated", "description": "Gallery candidate copper-weathered", "receiptSha256": "<receipt.json sha256>" } } },
137
+ { "kind": "set-material", "entityId": "entity_pedestal",
138
+ "material": { "kind": "standard", "color": "#ffffff", "opacity": 1, "roughness": 0.7, "metalness": 0.8, "map": "asset_copper" } }
139
+ ```
140
+
141
+ `material.map` applies to authored procedural geometry only, and scene image
142
+ assets admit PNG/JPEG/SVG payloads. For a selected skybox, `add-entity` a
143
+ `kind: "environment"` entity referencing the image asset with
144
+ `role: "background" | "environment" | "both"` and a bounded `intensity`; at
145
+ most one visible environment entity may appear in a frame, so gate alternates
146
+ through authored `visible` flags. Keep the scene file where its asset paths
147
+ resolve, the same rule as world imports.
148
+
149
+ Outside scenes, promote by pointing the consuming step at the exact retained
150
+ path — a video `project add`, a design slot, or an `image vectorize` input —
151
+ never by copying bytes into an authored path implicitly.
152
+
153
+ For a scene-variant gallery, promotion is adopting the variant: apply the
154
+ selected patch from the variants file through `scene patch` (the receipt row
155
+ keeps its digest), or move the derived `variants/<id>/scene.json` — with its
156
+ staged payloads — to its permanent home. The authored base scene is never
157
+ edited by the gallery.
158
+
159
+ ## Preserve failures and outputs
160
+
161
+ Gallery publication is no-replace: an existing `gallery.png` or
162
+ `receipt.json` in the output directory fails the command before any paid
163
+ dispatch. A failed candidate never retries inside the run; reconcile its
164
+ retained job record or receipt row before deciding a new paid command is
165
+ authorized. If every candidate fails, the labelled sheet and receipt are
166
+ still retained and the command reports `GENERATION_FAILED`.
@@ -14,7 +14,7 @@ command -v slopcamera
14
14
 
15
15
  A restricted shell can omit package-manager paths. Check known host installation paths before declaring a tool unavailable. If Bun is genuinely absent, follow its official [installation guide](https://bun.sh/docs/installation) within the user’s authorized setup scope. Do not switch package managers or pipe an unreviewed installer into a shell.
16
16
 
17
- Slopcamera installs from its verified release archive: `bun add --global https://github.com/hraness/slopcamera/releases/download/v3.2.6/hraness-slopcamera-3.2.6.tgz`, then `slopcamera doctor --json`. Building from source is the contributor path. Historical Atet archives do not install the renamed CLI; never substitute `slopcamera` into an old archive URL.
17
+ Slopcamera installs from its verified release archive: `bun add --global https://github.com/hraness/slopcamera/releases/download/v3.2.8/hraness-slopcamera-3.2.8.tgz`, then `slopcamera doctor --json`. Building from source is the contributor path. Historical Atet archives do not install the renamed CLI; never substitute `slopcamera` into an old archive URL.
18
18
 
19
19
  Use an existing compatible source build when available. Otherwise follow the [complete source-install guide](https://github.com/hraness/slopcamera/blob/main/docs/how-to/use-current-source.md): clone into a new directory, record its exact commit, install locked dependencies without lifecycle scripts, build the SDK and source CLI, then define the shell command against that checkout. A clone or skill installation alone does not install the executable. Do not alter an existing active checkout to satisfy this path.
20
20
 
@@ -0,0 +1,14 @@
1
+ # Build a revisable parametric design
2
+
3
+ Use current source and `slopcamera scene design` for dimensions, repeated architectural parts, furniture, pavilions and façades that must regenerate from retained rules. This is a local mesh-design workflow; Rhino, Grasshopper and native engine execution are separate tools.
4
+
5
+ 1. Discover original studies with `slopcamera scene design catalog --json`. Start with `scene design init <new-directory> --template crescent-pavilion|spiral-stair|ribbed-tower|modular-bookshelf`.
6
+ 2. Read the emitted `design.json` and inspect it with `scene design inspect`. Describe the user's intended shape in named parameters, derived scalar values, constraints and semantic geometry stages. Keep references to engineering knowledge separate from visual references. Do not infer structural validation from appearance.
7
+ 3. Save an explicit numeric values object and use `scene design set <design.json> --parameters <values.json> --output <new-design.json>` to preserve revisions. A dimensional change should update dependent members and details together.
8
+ 4. Compile with `scene design compile <design.json> --scene <base.scene.json> --output-dir <new-bundle> --json`. Pass the starter's staging scene for cameras and lights, or a previous compiled scene to preserve supported generated-part overrides. Retain design, scene, exact asset bytes and receipt together.
9
+ 5. Render `scene render <bundle/scene.json> --request <bundle/render.json> --json`. Review hero pixels, then use `camera_detail` and `camera_plan` to inspect repeated members, joints, silhouette and framing. Geometry compilation does not prove visual quality.
10
+ 6. For alternatives, use `scene design gallery` with a bounded `slopcamera.spatial-design-variants` document. It emits up to six complete models; render the candidates through the same camera before selecting one. It makes no paid calls and does not upload source.
11
+
12
+ Place generated bundles below `artifacts/slopcamera/generated/`. Existing files conflict. An interrupted bundle without its final receipt is incomplete; inspect it and choose a fresh destination. The design compiler never executes source text. For native CAD operations or Blender/Cycles production shading, retain a native-studio source and use the explicit trusted-code workflow in [native studio](native-studio.md).
13
+
14
+ Detailed contracts and checked commands: [design reference](https://github.com/hraness/slopcamera/blob/main/docs/parametric-design.md) and [design guide](https://github.com/hraness/slopcamera/blob/main/docs/how-to/parametric-design.md). The portable SDK exports the design compiler and starter catalog from `@hraness/slopcamera/code`; file publication and rendering belong to the CLI.
@@ -0,0 +1,32 @@
1
+ # Build scenes from code
2
+
3
+ Prefer helpers over hand-written scene JSON. The `@hraness/slopcamera/code` export ships pure builders in `spatial-scene/build` that return validated v1 scene data; feed their output into entities, transforms, and animation channels, then parse the whole scene before writing it. Helpers never read files, execute source, or touch a renderer, and every result already satisfies the contract schemas. Use [directed scenes](directed-scenes.md) for rendering, patching, and project commands.
4
+
5
+ ## Camera and animation helpers
6
+
7
+ - `perspectiveFromFov({fovDeg, width, height, near, far})` → calibrated projection. `fovDeg` is the horizontal field of view.
8
+ - `lookAtPose(position, target)` → camera pose facing local −Z at the target.
9
+ - `frameFitPose(bounds, projection, margin)` → pose framing authored or admitted bounds.
10
+ - `easeKeys({from, to, durationUs, easing})` → dense keys for `linear`, `ease-in`, `ease-out`, or `ease-in-out`; `easeChannel({channelId, targetId, property, ...})` wraps them into a ready animation channel. Baked keys stay small: about 25 per 4-second span.
11
+ - `orbitKeys({center, radius, durationUs, ...})` → paired position and look-at rotation keys for a turntable.
12
+
13
+ ## Layout and placement helpers
14
+
15
+ - `align(items, axis, edge)`, `distribute(items, axis, {gap}|{span})`, `row`, `column`, `stack` order existing entities by their transforms and optional bounds.
16
+ - `grid({rows, columns, cellSize, origin?})` → ground-plane cell positions; `scatter({seed, count, region, minSpacing?})` → deterministic seeded XZ positions.
17
+ - `groundSnap(transform, halfHeight, floorY)`, `onTopOf(moverBounds, moverTransform, targetBounds, targetTransform)`, `nextTo(...)`, `facing(transform, target)` resolve relations to concrete transforms immediately. They need bounds — primitives have them; GLB and splat bounds come from `scene asset admit` output or an explicit `--asset-bounds` map.
18
+
19
+ ## The create → audit → patch loop
20
+
21
+ 1. Build or generate the scene JSON.
22
+ 2. `slopcamera scene audit scene.json --camera camera_hero --json` samples evaluated geometry across the duration and reports per-entity frustum state, projected pixel footprint, and findings such as off-camera or never-visible entities. `--times-us` picks explicit samples; `--asset-bounds bounds.json` supplies decoded asset enclosures as a bounds map, an admission document, a `{manifest, facts}` pair, or an array of those.
23
+ 3. Fix with a typed `scene patch` carrying `expectedSceneSha256`, or regenerate. `slopcamera scene diff before.json after.json --json` shows the exact structural difference a patch produced.
24
+ 4. Re-audit, then verify pixels with `slopcamera scene render-audit scene.json --camera camera_hero --json` — it renders the real object-ID pass in the bound browser runtime at each sampled time and counts attributed pixels per entity, catching occlusion and never-rendered cases geometric audit cannot see. Splats and camera-bound view surfaces report honestly as unsupported or non-attributable rather than estimated. Neither audit tier inspects beauty output — materials, textures, text layout, and splat internals still need rendered-frame inspection.
25
+
26
+ ## Generate procedural scenes
27
+
28
+ `slopcamera scene generate --module <file.ts> --generator-id <id> --output scene.json --json` runs a trusted TypeScript module at authoring time — the same trust class as an explicitly imported workflow module, with no sandbox. See `examples/scene-generators/grid-city.ts` for the shape: the module exports `generate(ctx)` returning `{entities, editableKeys?}`; entities carry a caller `key` and never `entityId` or `origin`, which the host stamps from the generator identity. Draw randomness only from `ctx.seed`; an identical run must reproduce identical output, and the retained record pins source, parameters, seed, and output digests. Use `ctx.lib.entityId(key)` to parent entities inside one output. `--parameters` accepts a bounded JSON object; `--into scene.json` regenerates one generator's output while preserving authored entities, other generators, and declared overrides. Transitive relative `.ts`/`.js`/`.json` imports inside the module's own directory are allowed and hashed into the retained closure digest; absolute or escaping specifiers, symlinks, `require()`, and dynamic `import()` are rejected. Asset references are rejected in this version.
29
+
30
+ ## Admit a local glTF asset
31
+
32
+ `slopcamera scene asset admit model.glb --source-root <dir> --output manifest.json --json` validates a local GLB 2.0 against the closed profile, stores it content-addressed, derives model-space and scene-space bounds into a sibling facts manifest, and emits the mesh entity plus ready `add-asset`/`add-entity` patch operations. The source path must stay inside `--source-root`; unsupported GLB features reject rather than degrade. Apply the returned operations through `scene patch`, then feed the admission document itself to `scene audit --asset-bounds`.
@@ -0,0 +1,204 @@
1
+ # Compose a social collage banner
2
+
3
+ Use this workflow for an editorial or social banner built from several generated visual roles, local labels, annotations, and optional diagram material. Generate the parts independently, inspect them, then assemble the selected files with the packaged local compositor. Do not ask one model call to render the final banner or important text.
4
+
5
+ ## Fix the delivery frame first
6
+
7
+ Record the exact output geometry before prompting. For an X profile header, use `1500×500` unless the user or current platform tooling supplies another target. Keep important faces and title copy away from the lower-left profile-photo overlap and the outer crop margins.
8
+
9
+ Split the brief into visual roles rather than requesting several complete banners:
10
+
11
+ - one opaque background plate that establishes place, lighting, and atmosphere;
12
+ - one or more isolated subjects on transparent backgrounds;
13
+ - one motif cluster for secondary concepts;
14
+ - optional editable diagrams for literal values and relationships;
15
+ - local title, labels, circles, arrows, tape, grain, and vignette.
16
+
17
+ A role prompt should describe only that asset. Tell an isolated-asset model that the output needs a fully transparent background and no words, letters, or logos. Tell a background model to omit people when a separate character layer will cover it. This reduces accidental text, duplicate subjects, and baked-in composition decisions.
18
+
19
+ ## Discover the model and controls
20
+
21
+ Inspect the current image catalog and selected model instead of naming a remembered “latest” model:
22
+
23
+ ```sh
24
+ slopcamera ai models list --type image --json
25
+ slopcamera ai models show <image-model-id> --json
26
+ ```
27
+
28
+ Check that the model reports image output, the intended size or aspect control, and provider options for transparent PNG output before relying on them. Keep provider options in a private physical file because the same surface may contain sensitive values:
29
+
30
+ ```sh
31
+ cat > transparent-provider-options.json <<'JSON'
32
+ {
33
+ "openai": {
34
+ "background": "transparent",
35
+ "outputFormat": "png",
36
+ "quality": "high"
37
+ }
38
+ }
39
+ JSON
40
+ chmod 600 transparent-provider-options.json
41
+ ```
42
+
43
+ That object is an example for a compatible OpenAI image model, not a portable option set. Use only namespaces and fields reported for the selected model. An opaque background plate normally needs a separate options file without `background: "transparent"`.
44
+
45
+ ## Generate independent roles in parallel
46
+
47
+ Write one prompt file per role and retain it beside the collage manifest. Start independent text-only generations concurrently when the agent host supports parallel tool calls. Each command remains one durable paid job with its own output and receipt:
48
+
49
+ ```sh
50
+ vercel env run -- bun "$SLOPCAMERA_SOURCE_ROOT/apps/desktop/dist/cli/main.js" ai image generate \
51
+ --model <image-model-id> \
52
+ --prompt-file prompts/background.txt \
53
+ --size 1536x1024 \
54
+ --provider-options opaque-provider-options.json \
55
+ --json
56
+
57
+ vercel env run -- bun "$SLOPCAMERA_SOURCE_ROOT/apps/desktop/dist/cli/main.js" ai image generate \
58
+ --model <image-model-id> \
59
+ --prompt-file prompts/character-sticker.txt \
60
+ --size 1024x1024 \
61
+ --provider-options transparent-provider-options.json \
62
+ --json
63
+ ```
64
+
65
+ Do not hide several semantic roles in `--count`; they need separate prompts and retained requests. Use an [image gallery](image-galleries.md) when a role needs competing visual alternatives. Text-only generation does not authorize uploading local media. If a role needs a local reference, name that exact file and add `--allow-cloud-upload` only when the task already authorizes its upload.
66
+
67
+ Inspect every candidate before composition. Check background alpha for isolated layers, accidental writing, duplicated limbs or objects, clipped silhouettes, and whether the visual metaphor still reads at banner size. A successful receipt does not establish those facts.
68
+
69
+ ## Render literal facts as an editable diagram
70
+
71
+ Use a Slopcamera diagram when the banner needs a pipeline, architecture, values, or named relationships. Keep its `.diagram.json` source and render the PNG locally:
72
+
73
+ ```sh
74
+ slopcamera diagram check work/token-flow.diagram.json --strict
75
+ slopcamera diagram render work/token-flow.diagram.json
76
+ ```
77
+
78
+ Place that PNG as a `paper` image layer. The diagram remains editable and factual while the surrounding composition can stay loose and expressive.
79
+
80
+ ## Author the collage manifest
81
+
82
+ The packaged compositor accepts local PNG, JPEG, and WebP inputs. Paths are relative to the manifest unless absolute. Every `x` and `y` identifies the layer center. Array order is back-to-front.
83
+
84
+ ```json
85
+ {
86
+ "schemaVersion": 1,
87
+ "canvas": {
88
+ "width": 1500,
89
+ "height": 500,
90
+ "color": "#100a1c",
91
+ "background": {
92
+ "path": "../generated/background.png",
93
+ "position": "centre"
94
+ }
95
+ },
96
+ "layers": [
97
+ {
98
+ "kind": "image",
99
+ "path": "../generated/character.png",
100
+ "x": 255,
101
+ "y": 258,
102
+ "width": 330,
103
+ "rotation": -4,
104
+ "treatment": {
105
+ "kind": "sticker",
106
+ "border": 12,
107
+ "borderColor": "#ffffff",
108
+ "shadow": { "dx": 10, "dy": 14, "blur": 14, "opacity": 0.5 }
109
+ }
110
+ },
111
+ {
112
+ "kind": "image",
113
+ "path": "token-flow.light.png",
114
+ "x": 760,
115
+ "y": 430,
116
+ "width": 850,
117
+ "rotation": -1.5,
118
+ "treatment": {
119
+ "kind": "paper",
120
+ "padding": 26,
121
+ "color": "#faf5e8"
122
+ }
123
+ },
124
+ {
125
+ "kind": "tape",
126
+ "x": 430,
127
+ "y": 325,
128
+ "width": 120,
129
+ "height": 38,
130
+ "rotation": -38,
131
+ "color": "#f8ebaa",
132
+ "opacity": 0.82
133
+ },
134
+ {
135
+ "kind": "text",
136
+ "text": "275B TOKENS",
137
+ "x": 760,
138
+ "y": 64,
139
+ "fontSize": 58,
140
+ "fontFamily": "sans",
141
+ "fontWeight": 900,
142
+ "fill": "#ffe05a",
143
+ "stroke": "#3c1450",
144
+ "strokeWidth": 4,
145
+ "rotation": 1
146
+ },
147
+ {
148
+ "kind": "ellipse",
149
+ "x": 1210,
150
+ "y": 250,
151
+ "width": 350,
152
+ "height": 330,
153
+ "rotation": -5,
154
+ "color": "#ff5048",
155
+ "strokeWidth": 8
156
+ },
157
+ {
158
+ "kind": "arrow",
159
+ "from": { "x": 1080, "y": 130 },
160
+ "to": { "x": 1150, "y": 180 },
161
+ "bend": 0.25,
162
+ "color": "#ff5048",
163
+ "width": 8
164
+ }
165
+ ],
166
+ "effects": {
167
+ "grain": 0.18,
168
+ "grainSeed": 7,
169
+ "vignette": 0.35,
170
+ "chromaticShift": 2
171
+ }
172
+ }
173
+ ```
174
+
175
+ Image treatments are `plain`, `sticker`, and `paper`. Text supports `sans`, `serif`, and `mono`, newline-separated rows, fill, stroke, weight, alignment, and rotation. Annotation layers are `arrow`, `ellipse`, and `tape`. The compositor bounds canvas size, input bytes, decoded pixels, layer count, text, geometry, and effects; it rejects remote URLs and never replaces an existing output.
176
+
177
+ Render through the version-matched packaged skill:
178
+
179
+ ```sh
180
+ skill_root="$(slopcamera skill path)"
181
+ bun "$skill_root/scripts/compose-social-collage-banner.ts" \
182
+ --manifest /absolute/banner.manifest.json \
183
+ --output /absolute/banner-v1.png
184
+ ```
185
+
186
+ The command writes the PNG and a same-stem `.receipt.json` containing the manifest digest, exact input paths and digests, output digest, canvas, and layer count. Save a new manifest or output name for each material revision.
187
+
188
+ ## Inspect the delivered pixels
189
+
190
+ Open the final PNG and inspect it at full size. Also inspect crops around the title, faces, high-contrast annotations, paper edges, and each platform exclusion zone. Confirm:
191
+
192
+ - the file has the exact requested dimensions;
193
+ - text is local, legible, and free of missing-glyph boxes;
194
+ - transparent assets have no opaque square or dark fringe;
195
+ - paper clippings and tape stay behind labels that must remain readable;
196
+ - chromatic shift and grain do not damage small text;
197
+ - factual diagram labels remain accurate;
198
+ - the composition still reads when scaled down.
199
+
200
+ Keep the prompt files, provider-option digests, generated receipts, diagram source, collage manifest, compositor receipt, and rejected attempts that explain a selection or recovery.
201
+
202
+ ## Recover paid failures deliberately
203
+
204
+ Run each paid command with zero client retries. If a generation fails or is interrupted, inspect its retained job path and reconciliation state before doing anything else. Do not automatically resubmit an ambiguous attempt. A deliberate replacement call is appropriate only after reconciliation and within the task's existing spending authority. The local compositor is deterministic and unpaid, so layout revisions should happen there rather than through more model calls.
@@ -1,6 +1,6 @@
1
1
  # Use SDKs and durable workflows
2
2
 
3
- Use `slopcamera workflows list --json` and `slopcamera workflows show <id> --json` to discover checked recipes and their actual inputs. Built-ins include `talking-head-cleanup`, `polished-screen-demo`, `chaptered-demo`, `social-variants`, `creative-iteration`, `creative-selection` and `directed-scene`. Keep ordinary project edits complete before a V2 scene migration.
3
+ Use `slopcamera workflows list --json` and `slopcamera workflows show <id> --json` to discover checked recipes and their actual inputs. Built-ins include `talking-head-cleanup`, `polished-screen-demo`, `chaptered-demo`, `social-variants`, `creative-iteration`, `creative-selection`, `directed-scene` and `cinematic-world`. Keep ordinary project edits complete before a V2 scene migration.
4
4
 
5
5
  ```sh
6
6
  slopcamera workflows plan <id> --input input.json --json
@@ -32,9 +32,9 @@ Keep run IDs, errors and receipts after failure. A missing journal does not prov
32
32
 
33
33
  ## Use the portable MCP surface narrowly
34
34
 
35
- When connected, use `check_diagram` and `render_diagram` for compatibility calls, or `search_slopcamera` and `execute_slopcamera` with one exact returned operation and typed JSON. No tool rewrites source.
35
+ When connected, use `check_diagram` and `render_diagram` for compatibility calls, `check_scene`/`inspect_scene`/`audit_scene`/`audit_scene_temporal`/`diff_scenes`/`evaluate_scene` for read-only spatial scene work, `check_scene_direction`/`plan_scene_direction`/`plan_scene_gallery`/`check_scene_effects`/`plan_scene_effects` for cinematic planning evidence, or `search_slopcamera` and `execute_slopcamera` with one exact returned operation and typed JSON. No tool rewrites source or mutates project state; candidate selection stays an explicit CLI or SDK call.
36
36
 
37
- - Use root-relative paths. A diagram must end in `.diagram.json`.
37
+ - Use root-relative paths. A diagram must end in `.diagram.json`; a scene must end in `.json`.
38
38
  - Diagram render replaces the five documented exports, never its source.
39
39
  - MCP bounds diagrams to 64 shapes and 128 edges and reports at most 40 findings. Use the CLI for larger checked sources.
40
40
  - MCP uses built-in themes/icons and never executes workspace configuration; trusted custom config belongs to the CLI.