Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
7702c98
feat(commands): reserve the guide and live link groups
nodemode-ai Dec 5, 2026
16b9bd9
feat(service): reserve the scripting channel and the plugin host
nodemode-ai Dec 5, 2026
7c37665
feat(setup): reserve the script command and the agents sync parts
nodemode-ai Dec 5, 2026
f52ddfe
feat(ui): reserve the console and plugins modules
nodemode-ai Dec 5, 2026
251a160
feat(plugins): add the anodised metals material pack
nodemode-ai Dec 5, 2026
d897904
feat(plugins): add the colourways and render every camera plugins
nodemode-ai Dec 5, 2026
13baf31
feat(plugins): add the auto materials and mood grades plugins
nodemode-ai Dec 5, 2026
f7abd6c
docs(plugins): add the plugins index and its log
nodemode-ai Dec 5, 2026
35bb68b
feat(setup): run Python scripts with ./formshot script
nodemode-ai Dec 5, 2026
535c5d6
feat(agents): generate the Python command reference
nodemode-ai Dec 5, 2026
ff4b271
docs(python): add the example scripts and the Python guide
nodemode-ai Dec 5, 2026
03d5466
feat(service): headless consent and the folders agents may use
nodemode-ai Dec 5, 2026
3443001
feat(setup): serve --headless and a bridge that starts it
nodemode-ai Dec 5, 2026
ef8fb4a
docs: the headless service, its consent and agent folders
nodemode-ai Dec 5, 2026
916974c
feat(plugins): host plugin folders as processes with consent
nodemode-ai Dec 5, 2026
2129454
docs(plugins): describe the plugin format, API and lifecycle
nodemode-ai Dec 5, 2026
2ba673d
feat(plugins): add the plugin template
nodemode-ai Dec 5, 2026
f6ed31c
docs: MCP profiles and the curated agent tools
nodemode-ai Dec 5, 2026
0298108
feat(python): add the client of the scripting channel
nodemode-ai Dec 5, 2026
b8668cc
feat(service): open the local scripting channel with discovery
nodemode-ai Dec 5, 2026
20e2bca
docs(service): describe the scripting channel and log what ran
nodemode-ai Dec 5, 2026
fb093ab
feat(mcp): curated agent tools and the full, standard, restricted pro…
nodemode-ai Dec 5, 2026
09e68c9
feat(agents): sync and check the guide pages in the rendering skill
nodemode-ai Dec 5, 2026
b2df756
feat(ui): a Keep in sync switch and its state in the hand-off list
nodemode-ai Dec 5, 2026
6861f85
docs(logs): log the agent guide and its sync
nodemode-ai Dec 5, 2026
19b97a4
fix(mcp): run every tool through the headless folder rule and consent
nodemode-ai Dec 5, 2026
9667c24
docs: separate the merged sections of the service and setup logs
nodemode-ai Dec 5, 2026
a082108
feat(engine): add help.guide with the agent guide pages
nodemode-ai Dec 5, 2026
d1f000c
docs(logs): log Keep in sync for hand-offs
nodemode-ai Dec 5, 2026
aeb6764
docs: start each log section after a blank line
nodemode-ai Dec 5, 2026
4f95632
feat(service): keep hand-offs in sync with their source files
nodemode-ai Dec 5, 2026
7012629
feat(blender): add the FormShot Link add-on for Blender
nodemode-ai Dec 5, 2026
fea091d
docs(blender): describe the add-on, its licence and what ran
nodemode-ai Dec 5, 2026
f14132e
feat(ui): add the console under the viewport
nodemode-ai Dec 5, 2026
eed0b76
feat(ui): add the Agents and Scripting preferences page
nodemode-ai Dec 5, 2026
07cd7ca
docs(ui): log the console and the Agents and Scripting page
nodemode-ai Dec 5, 2026
7f36a0c
feat(brand): the owner's FormShot icon for the desktop app
nodemode-ai Dec 5, 2026
7ca073f
feat(brand): show the new icon in the window and the splash
nodemode-ai Dec 5, 2026
5aa2a7e
feat(commands): live link hello, sync, camera, status and forget
nodemode-ai Dec 5, 2026
9599be2
docs: the live link protocol for any client
nodemode-ai Dec 5, 2026
b47bccb
feat(ui): plugins window, plugin commands and data-declared panels
nodemode-ai Dec 5, 2026
e84f271
docs(ui): log the plugins window in the frontend HASHOUT_LOG
nodemode-ai Dec 5, 2026
59aa54c
docs(ui): correct the step count of the plugins window run
nodemode-ai Dec 5, 2026
d5538d9
fix(plugins): one-plugin answers and every client's events
nodemode-ai Dec 5, 2026
49761d0
fix(service): keep the engine's error code on EngineError
nodemode-ai Dec 5, 2026
b497055
feat(setup): serve --headless on Windows and in the help
nodemode-ai Dec 5, 2026
ff2ae05
feat(cli): render setups by name, selftest and the guide command
nodemode-ai Dec 5, 2026
77293a8
fix(cli): print guide examples once and name the next page
nodemode-ai Dec 5, 2026
cbb2642
docs(cli): describe the command line and log the render setups
nodemode-ai Dec 5, 2026
8665b95
docs: start the merged P18 log sections after a blank line
nodemode-ai Dec 5, 2026
4ccaa20
chore(agents): sync the tool reference with help.guide and link
nodemode-ai Dec 5, 2026
f02e6d6
feat(i18n): translate the console and plugins into Mexican Spanish
nodemode-ai Dec 5, 2026
3a68aec
feat(i18n): translate the console and plugins into Polish
nodemode-ai Dec 5, 2026
003567e
docs(architecture): describe the agents layer and where it sits
nodemode-ai Dec 5, 2026
304c65e
docs(import): add Keep in sync to the hand-offs and link Python from …
nodemode-ai Dec 5, 2026
e4ce754
feat(i18n): translate the console and plugins into Brazilian Portuguese
nodemode-ai Dec 5, 2026
0ba6ad1
feat(i18n): translate the console and plugins into Czech
nodemode-ai Dec 5, 2026
d46204f
docs(wiki): add Agents and Scripting and link it from Home, the sideb…
nodemode-ai Dec 5, 2026
101f82b
feat(i18n): translate the console and plugins into French
nodemode-ai Dec 5, 2026
44ed444
docs(agents): note the new modules and how agents connect in CLAUDE.m…
nodemode-ai Dec 5, 2026
40d9a0c
feat(i18n): translate the console and plugins into Hungarian
nodemode-ai Dec 5, 2026
15f7fbd
feat(i18n): translate the console and plugins into Canadian French
nodemode-ai Dec 5, 2026
bc803c7
feat(i18n): translate the console and plugins into Ukrainian
nodemode-ai Dec 5, 2026
90a8b4c
feat(i18n): translate the console and plugins into German
nodemode-ai Dec 5, 2026
1e3932e
feat(i18n): translate the console and plugins into Turkish
nodemode-ai Dec 5, 2026
ead50d7
docs(skills): bring the harness skill to the agents layer
nodemode-ai Dec 5, 2026
f3dace1
feat(i18n): translate the console and plugins into Indonesian
nodemode-ai Dec 5, 2026
61e902b
feat(i18n): translate the console and plugins into Italian
nodemode-ai Dec 5, 2026
587add3
docs(skills): tell rendering agents about profiles, the guide and hea…
nodemode-ai Dec 5, 2026
bba50ed
feat(i18n): translate the console and plugins into Spanish
nodemode-ai Dec 5, 2026
fc03a87
feat(i18n): translate the console and plugins into Dutch
nodemode-ai Dec 5, 2026
1daae2f
feat(i18n): translate the console and plugins into Thai
nodemode-ai Dec 5, 2026
d0b05ad
feat(i18n): translate the console and plugins into Vietnamese
nodemode-ai Dec 5, 2026
26c4a1b
feat(i18n): translate the console and plugins into Danish
nodemode-ai Dec 5, 2026
20d7048
feat(i18n): translate the console and plugins into Simplified Chinese
nodemode-ai Dec 5, 2026
bd036a8
feat(i18n): translate the console and plugins into Finnish
nodemode-ai Dec 5, 2026
4f46c26
feat(i18n): translate the console and plugins into Traditional Chinese
nodemode-ai Dec 5, 2026
9f8b197
feat(i18n): translate the console and plugins into Norwegian Bokmal
nodemode-ai Dec 5, 2026
53e349b
fix(agents): read preset ids as ids, not paths, for headless agents
nodemode-ai Dec 5, 2026
96222a6
fix(scripting): stamp the discovery file in local time
nodemode-ai Dec 5, 2026
80d16d0
fix(python): let scripts use the packages installed for their Python
nodemode-ai Dec 5, 2026
0d53ca7
fix(python): read the flat node list in the dress-by-name example
nodemode-ai Dec 5, 2026
176af1c
docs(readme): add the agents layer to features, the table and the age…
nodemode-ai Dec 5, 2026
b2eb30d
feat(i18n): translate the console and plugins into Japanese
nodemode-ai Dec 5, 2026
3208864
feat(i18n): translate the console and plugins into Swedish
nodemode-ai Dec 5, 2026
cf23863
fix(i18n): use plain plural forms of plugin in the Danish plugins table
nodemode-ai Dec 5, 2026
4f40fa3
feat(i18n): translate the console and plugins into Russian
nodemode-ai Dec 5, 2026
9fec3f0
feat(i18n): translate the console and plugins into Korean
nodemode-ai Dec 5, 2026
7bcb23d
docs: log the lead's P18 fixes and the real-stack smoke run
nodemode-ai Dec 5, 2026
9e40623
fix(agents): give no window key in a headless service
nodemode-ai Dec 5, 2026
ca00d91
feat(ui): reserve the farm module
nodemode-ai Dec 5, 2026
372a02b
feat(farm): seal farm connections and keep the farm token
nodemode-ai Dec 5, 2026
cdf5f6e
refactor(farm): move the stall timeout's note into the log
nodemode-ai Dec 5, 2026
663d121
docs(notice): list the farm's crypto crates and log the wire
nodemode-ai Dec 5, 2026
24423aa
docs(ui): log the render farm window and what ran
nodemode-ai Dec 5, 2026
2bbfc49
feat(farm): pack projects into bundles and unpack them into a cache
nodemode-ai Dec 5, 2026
e62ddcb
feat(cli): formshot-engine worker over render's own setups
nodemode-ai Dec 5, 2026
1dc03b3
docs(logs): log the farm worker and what ran on stand-ins
nodemode-ai Dec 5, 2026
da8b7d8
feat(ui): add the Render Farm window and the Render on farm section
nodemode-ai Dec 5, 2026
eeaa139
docs(farm): describe bundles and log the bundle work
nodemode-ai Dec 5, 2026
f2af510
feat(farm): serve dispatchers from the farm worker
nodemode-ai Dec 5, 2026
f9d0de0
fix(farm): clear keys inside the cipher and HMAC crates
nodemode-ai Dec 5, 2026
cbdd9a3
fix(farm): take at most 32 connections at once on a worker
nodemode-ai Dec 5, 2026
319bfc0
docs(cli): list the worker's options in the usage
nodemode-ai Dec 5, 2026
a3f8784
docs: log the lead's P19 fixes and separate the merged sections
nodemode-ai Dec 5, 2026
204424f
feat(farm): dispatch batches to workers with requeue and backoff
nodemode-ai Dec 5, 2026
7a9c84d
feat(farm): add the farm engine commands
nodemode-ai Dec 5, 2026
dd93aef
feat(cli): add formshot-engine farm token, workers and submit
nodemode-ai Dec 5, 2026
7864fc9
docs: start the dispatcher's log section after a blank line
nodemode-ai Dec 5, 2026
4f706c4
fix(plugins): ask for a plugin's code in one prompt only
nodemode-ai Dec 5, 2026
8ca2c4c
fix(agents): fill default targets inside formshot_run and formshot_batch
nodemode-ai Dec 5, 2026
a7431a2
fix(plugins): make the agent output folder private in render-cameras
nodemode-ai Dec 5, 2026
0aeabdb
docs: say who the headless rules cover and what link connected means
nodemode-ai Dec 5, 2026
a7fa17e
docs(changelog): describe 0.13.0
nodemode-ai Dec 5, 2026
b1d5bb7
feat(i18n): translate the render farm into Spanish
nodemode-ai Dec 5, 2026
98701a7
feat(i18n): translate the render farm into Polish
nodemode-ai Dec 5, 2026
e178104
feat(i18n): translate the render farm into Mexican Spanish
nodemode-ai Dec 5, 2026
ab15646
feat(i18n): translate the render farm into Czech
nodemode-ai Dec 5, 2026
72dee43
feat(i18n): translate the render farm into Brazilian Portuguese
nodemode-ai Dec 5, 2026
7159c0e
feat(i18n): translate the render farm into Hungarian
nodemode-ai Dec 5, 2026
a8950fb
feat(i18n): translate the render farm into French
nodemode-ai Dec 5, 2026
8c7a850
feat(i18n): translate the render farm into Canadian French
nodemode-ai Dec 5, 2026
70e35f0
feat(i18n): translate the render farm into Ukrainian
nodemode-ai Dec 5, 2026
368e6c6
feat(i18n): translate the render farm into German
nodemode-ai Dec 5, 2026
6c01293
feat(i18n): translate the render farm into Italian
nodemode-ai Dec 5, 2026
6d431f3
feat(i18n): translate the render farm into Dutch
nodemode-ai Dec 5, 2026
287ec57
feat(i18n): translate the render farm into Danish
nodemode-ai Dec 5, 2026
697ead6
feat(i18n): translate the render farm into Thai
nodemode-ai Dec 5, 2026
454413c
feat(i18n): translate the render farm into Finnish
nodemode-ai Dec 5, 2026
68dbc46
feat(i18n): translate the render farm into Vietnamese
nodemode-ai Dec 5, 2026
40387da
feat(i18n): translate the render farm into Norwegian Bokmal
nodemode-ai Dec 5, 2026
4078789
feat(i18n): translate the render farm into Swedish
nodemode-ai Dec 5, 2026
6f99aab
feat(i18n): translate the render farm into Russian
nodemode-ai Dec 5, 2026
ff24ec1
feat(i18n): translate the render farm into Simplified Chinese
nodemode-ai Dec 5, 2026
63b9849
feat(i18n): translate the render farm into Traditional Chinese
nodemode-ai Dec 5, 2026
f9cebf4
feat(i18n): translate the render farm into Japanese
nodemode-ai Dec 5, 2026
d17f9e0
feat(i18n): translate the render farm into Korean
nodemode-ai Dec 5, 2026
4f796e5
chore(release): 0.13.0
nodemode-ai Dec 5, 2026
820d76a
feat(farm): reserve the fsh-farm crate, the farm commands and the CLI…
nodemode-ai Dec 5, 2026
0f5df5e
feat(i18n): translate the render farm into Turkish
nodemode-ai Dec 5, 2026
8d8dd0c
feat(i18n): translate the render farm into Indonesian
nodemode-ai Dec 5, 2026
d273031
docs(farm): write the render farm page
nodemode-ai Dec 5, 2026
2dddb64
docs(cli): describe the worker and farm subcommands
nodemode-ai Dec 5, 2026
abb3b2e
docs(architecture): add the farm crate, group and data flow
nodemode-ai Dec 5, 2026
109a239
docs(security): name the farm worker as the one socket off loopback
nodemode-ai Dec 5, 2026
45a62cd
docs(readme): put the render farm in the box
nodemode-ai Dec 5, 2026
3ac871e
docs(wiki): add the Render Farm page
nodemode-ai Dec 5, 2026
e08f791
docs(agents): note the farm crate, group and window module
nodemode-ai Dec 5, 2026
d1de7b3
docs(farm): record the run of the real parts together
nodemode-ai Dec 5, 2026
8cf91e7
docs(skills): add the render farm to the harness
nodemode-ai Dec 5, 2026
153789b
docs(agents): add the farm to the rendering skill and sync the kit
nodemode-ai Dec 5, 2026
43228d0
fix(agents): let agents read only the farm token's status
nodemode-ai Dec 5, 2026
1c9c079
docs(farm): say that agents cannot create, import or export the token
nodemode-ai Dec 5, 2026
f27c5b5
fix(ui): send the open document's settings to the farm
nodemode-ai Dec 5, 2026
fa7e7ff
fix(farm): make a new .formshot private and farm pictures readable
nodemode-ai Dec 5, 2026
c841656
fix(farm): log the connections a crowded worker turns away
nodemode-ai Dec 5, 2026
51270e0
docs(farm): list the QA's limits and log the fixes and the QA run
nodemode-ai Dec 5, 2026
e5aa467
docs(changelog): describe 0.14.0
nodemode-ai Dec 5, 2026
8134ec0
fix(setup): write notices without an em dash
nodemode-ai Dec 5, 2026
c9da00b
chore(release): 0.14.0
nodemode-ai Dec 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 23 additions & 4 deletions .agents/skills/formshot-rendering/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ description: Set up, dress, light and render 3D product scenes in formshot, the

# Rendering in formshot

formshot's engine holds one document on this computer: a tree of groups, parts, lights and cutaways over shared meshes and materials, with cameras, an environment, a ground, an image style and render settings. The tools are the engine's commands; the formshot window, when it is open, shows each change. Reading tools work with no window; a changing tool needs the person's yes, given once in the formshot window, and with no window open it is refused unless they allowed agents earlier. Every change is one undoable step.
formshot's engine holds one document on this computer: a tree of groups, parts, lights and cutaways over shared meshes and materials, with cameras, an environment, a ground, an image style and render settings. The tools are the engine's commands; the formshot window, when it is open, shows each change. Reading tools work with no window; a changing tool needs the person's yes, given once in the formshot window, and with no window open it is refused unless they allowed agents earlier. Every change is one undoable step. When the MCP server finds no running formshot it starts one without a window (headless): there no prompt is possible, so the person's setting decides (changes are allowed unless they chose to refuse), and files are read and written only in the projects folder, the temporary folder, the agent output folder (`~/.formshot/agent-output`, where a render or export with no path goes) and any folder the person added. A refusal that names those folders means the path is outside them.

The tool list comes from the engine's catalogue. `references/tools.md`, when present, is generated from it by `./formshot agents sync`; otherwise call `tools/list` and read each tool's description and input schema. Never guess a tool name: use the names the catalogue gives.
Read the agent guide first, before the first change: call `formshot_guide` (or the engine command `help.guide`, or `formshot-engine guide` in a shell). With no page it lists the pages and with `{page}` it gives one with examples; `references/guide/` holds the same pages. Start with `index` and `rules`.

## Which tools you have

Outside agents get the `standard` MCP profile by default. In it you see the curated `formshot_*` tools (`formshot_scene`, `formshot_library_apply`, `formshot_studio_apply`, `formshot_camera_set`, `formshot_look`, `formshot_render`, `formshot_batch`, `formshot_undo` and the rest) and every read-only catalogue command as a dotted tool (`scene.summary`, `library.list`). Commands that change the scene are not dotted tools there: reach them through the `formshot_*` tool that fits, or through `formshot_run {name, args}`, which runs any catalogue command by name, and `formshot_batch {label, commands}`, which runs several as one undo step. A call to a dotted tool the profile does not list answers "No tool named ... in the standard MCP profile": use `formshot_run`. `formshot_command_help {name}` gives one command's schema; never guess a field. In this skill a command written as `material.assign {ids, material}` is run as `formshot_run {"name": "material.assign", "args": {"ids": [...], "material": 3}}` in the `standard` profile.

Other profiles: `full` (agent tabs in the window, or when the person sets it) lists every command as a dotted tool too, and `restricted` removes `formshot_run`, `formshot_import`, `formshot_save_as`, `formshot_export` and every path you would choose (renders go to the agent output folder). The person sets the default in Preferences > Agents and Scripting; a client can ask for one with the header `x-formshot-mcp-profile`.

`references/tools.md`, when present, is generated from the catalogue by `./formshot agents sync` and lists every command with its arguments; otherwise call `tools/list` and `formshot_command_help`. Never guess a command name: use the names the catalogue gives.

## Conventions

Expand Down Expand Up @@ -39,7 +47,7 @@ The tool list comes from the engine's catalogue. `references/tools.md`, when pre
## Workflow 3: render

1. `render.set_settings` sets `width`, `height`, `samples`, `max_bounces`, `seed` and `denoise`.
2. Start the render with the render tools the catalogue offers, read their status until the samples are reached, then fetch the frame.
2. To check your work, call `formshot_look` (a quick picture of the active camera, at most 768 pixels, returned as an image). For a final picture call `formshot_render`: it queues the render, waits up to its timeout and returns the file's path and a downscaled image; with no path it writes into the agent output folder. Otherwise start the render with the render commands through `formshot_run`, read their status until the samples are reached, then fetch the frame.
3. From a shell, `./formshot render model.glb out.png --samples 256` renders a file without the window; add `--device gpu` to use the graphics card.
4. `render.devices` lists `cpu` and each `gpu:<n>` with whether it can render; `render.set_device {id}` chooses (`cpu`, `gpu` or `gpu:<n>`). When the graphics card cannot render the scene or fails, the processor renders instead and `render.status` carries a `note` saying why: report that note to the person rather than retrying.
5. To frame the product, `view.frame` with `{nodes}` (or nothing, for everything) moves the active camera; `view.bounds` gives the scene's size and centre.
Expand Down Expand Up @@ -93,11 +101,22 @@ The tool list comes from the engine's catalogue. `references/tools.md`, when pre
4. `material.probe_import {path}` reads a MaterialX document, a folder or ZIP of PBR maps without changing the document. Then `material.import_mtlx {path, materials}` adds the materials of a `.mtlx`, or `material.import_maps {path, name, projection}` adds one material per texture set, each in one undo step; neither assigns the new materials, so `material.assign` does.
5. `file.import {path, native: false}` reads a FormShot GLB or USD with its plain materials only; USD, USDZ, 3DM and IFC files open like any other model.

## Workflow 11: the render farm

When the person has set up workers (other machines running `formshot-engine worker` that share one farm token), a batch can be rendered on them instead of on this computer.

1. `farm.workers` (read only) lists the workers with their state (`ready`, `busy`, `connecting`, `unreachable`, `refused`), cores and devices; `farm.token {action: "status"}` says whether this machine has a token and its fingerprint. You never see the token: no reply carries it. Creating, importing, exporting or replacing it and adding or removing workers are the person's to do, in the Render Farm window or the command line; FormShot refuses `farm.token` with `create`, `import` or `export` from an agent, so do not try; do not run `farm.add_worker` or `farm.remove_worker` unless they ask.
2. `farm.submit {jobs, folder, ...}` saves a copy of the open document, packs it and queues one picture per shot (`jobs: "shots"`), per valid configuration (`"configs"`), per frame of the animation (`"frames"`, with `frames: "1-48"` and `step`) or the current view (`"current"`); the document and its saved state do not change. `folder` is an absolute folder you are allowed to write; `width`, `height`, `samples`, `format` (`png`, `jpeg` or `exr`), `seed`, `name` (a file name template with `{name}`, `{shot}`, `{config}` and `{frame}`) and `skip_existing` are optional. It answers a batch id; with no workers it refuses and says so.
3. `farm.status {batch}` (read only) answers the batch's state (`running`, `done`, `failed`, `cancelled`), the counts and each job's state, worker, progress, tries and file; poll it about once a second. A job whose worker drops is queued again up to 3 tries. `farm.cancel {batch}` stops it and leaves finished pictures in the folder.
4. A worker shown `refused` holds another token or speaks another protocol, and `unreachable` is retried on its own: report either to the person rather than working around it. The farm writes PNG, JPEG and OpenEXR stills only; for passes, TIFF, PSD or a movie use the render queue.

## When something fails

- "locked": the node or a group above it is locked; `scene.set_locked` unlocks it.
- An `invalid ...` message names the field and its allowed range; fix that one field.
- "unknown command": the name is not in the catalogue; read `tools/list` again.
- "unknown command": the name is not in the catalogue; read `tools/list` again or ask `formshot_command_help` for close names.
- "No tool named ... in the standard MCP profile": the command is not a dotted tool there; call it through `formshot_run`. If `formshot_run` itself is missing, the profile is `restricted`: say so rather than looking for another way to write a file.
- A refusal that asks for the window: the person must open formshot and allow agents there. Say so instead of retrying.
- A refusal that says to ask the person (headless, changes refused) or that names the folders agents may use: the person's setting or the folder list is the cause. Use a folder it names, or tell the person to add one to `FORMSHOT_AGENT_PATHS`; do not retry with another route to the same path.
- To take a step back, use the undo tool the catalogue offers; never rebuild the scene by hand.
- After a crash, `file.recover_list` lists the sessions the engine journaled and `file.recover {session}` restores one with its undo history; ask the person before recovering over their open document.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Camera and lens

Place the camera, choose the lens and focus, using the saved cameras of the document.

- `camera.get {index}` reads one camera with every lens field and what follows from them (coverage angles, aperture, focus in force); without `index`, the active camera.
- `camera.set {index, values}` changes only the fields given: `position`, `target`, `up` (metres, Y up), `focal_length_mm`, `sensor_width_mm`, `f_number`, `focus_distance`, `depth_of_field`, `projection` and the projection's own fields (`camera.lens_kinds` lists which projection reads which).
- `view.frame {nodes, fill}` fits the product after a lens change, keeping the direction. Change the lens first, then frame.
- `camera.add {camera, activate}` keeps another view; `camera.set_active {index}` chooses the camera that renders. A camera looking straight down needs an `up` that is not vertical.
- Depth of field: `depth_of_field: true` with an `f_number`; `camera.pick_focus {x, y}` focuses on the part under a point of the picture (fractions, 0 at the top left).
- Product lenses: 50 to 100 mm for a natural look, 100 mm and longer for a flat, catalogue look; wide lenses distort small products.

```json
{"name": "camera.get", "args": {}}
{"name": "camera.set", "args": {"index": 0, "values": {"focal_length_mm": 85}}}
{"name": "view.frame", "args": {"nodes": [7], "fill": 0.75}}
{"name": "camera.add", "args": {"camera": {"name": "Top down", "position": [0, 1.2, 0], "target": [0, 0.12, 0], "up": [0, 0, -1], "focal_length_mm": 70}, "activate": true}}
{"name": "view.frame", "args": {"nodes": [7]}}
{"name": "camera.set_active", "args": {"index": 0}}
{"name": "camera.set", "args": {"index": 0, "values": {"depth_of_field": true, "f_number": 2.8}}}
{"name": "camera.pick_focus", "args": {"x": 0.5, "y": 0.5}}
{"name": "camera.lens_kinds", "args": {}}
```

Check: `camera.get` `coverage_deg` and a settled look; the product is whole in the frame with room around it.
25 changes: 25 additions & 0 deletions .agents/skills/formshot-rendering/references/guide/dress-parts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Dress parts with library materials

Find a library preset, apply it to parts, and tint it when the colour is not in the library.

1. Search: `library.list {query}` ranks presets by name, tags, category and type (`limit`, `category`, `shelf` narrow it). Ids look like `metal/aluminium-brushed`; never invent one.
2. Read: `library.get {id}` shows the preset and the material it makes.
3. Apply: `library.apply {id, nodes}` builds the material (or reuses an identical one) and puts it on the parts under `nodes`, one undo step. `scope` widens it: `group` (every part of the parent group) or `same_material` (every part wearing the same material as the given part). The reply's `material` is the new key.
4. Tint: for a colour the library lacks, apply the nearest preset of the right substance and finish, then `material.set_params {key, values: {base_color}}` on the key it answered. Colours are scene-linear ACEScg triples. Leave roughness, metalness and the rest as the preset set them.
5. Share: `material.assign {ids, material}` puts an existing material on more parts.
6. Many parts at once: `template.list`, then `template.preview {id}` and `template.apply {id}` dress parts by their names and imported material names.

```json
{"name": "library.list", "args": {"query": "aluminium", "limit": 5}}
{"name": "library.get", "args": {"id": "metal/aluminium-brushed"}}
{"name": "library.apply", "args": {"id": "metal/aluminium-brushed", "nodes": [8, 9]}}
{"name": "library.list", "args": {"query": "gloss black", "limit": 5}}
{"name": "library.apply", "args": {"id": "plastic/abs-black-gloss", "nodes": [10]}}
{"name": "library.apply", "args": {"id": "paint/matte-white", "nodes": [11]}}
{"name": "material.get", "args": {"key": 14}}
{"name": "material.set_params", "args": {"key": 14, "values": {"base_color": [0.62, 0.05, 0.04]}}}
{"name": "material.assign", "args": {"ids": [10], "material": 12}}
{"name": "template.preview", "args": {"id": "colour-plastics"}}
```

Check: `scene.summary` shows each part with the material you meant, then take a settled look (`render-and-output`).
21 changes: 21 additions & 0 deletions .agents/skills/formshot-rendering/references/guide/export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Export

Save the project, export the model to other programs, and write a web configurator or a spin viewer.

- `file.save {path}` writes the `.fshot` project (everything, textures included); without `path` it saves where the document came from. Saving a model opened from a GLB needs a `path`.
- `export.formats` lists the model formats with what each carries and the options it reads. `export.model {path}` writes glb, obj, stl, ply, usda, usdc or usdz by the extension; `bake: true` turns materials a format cannot carry into pictures, `native: true` (glb) lets FormShot reopen its own materials exactly, `selection_only` exports the selection. Read the reply's `warnings`: they list what the format dropped.
- `export.web {folder, mode}` writes a page that opens from disk: `3d` an interactive viewer with one variant per configuration, `images` one rendered picture per configuration (poll `export.web_status {folder}`), `both`.
- `export.spin {folder, columns, rows}` renders views around the product and writes a page that turns it by dragging; poll `export.spin_status` until `done`.
- `render.queue_add` writes pictures; see `render-and-output`.

```json
{"name": "file.save", "args": {"path": "/tmp/formshot-bottle.fshot"}}
{"name": "export.formats", "args": {}}
{"name": "export.model", "args": {"path": "/tmp/formshot-bottle-out.glb", "native": true}}
{"name": "export.model", "args": {"path": "/tmp/formshot-bottle.usdz"}}
{"name": "export.web", "args": {"folder": "/tmp/formshot-web", "mode": "3d"}}
{"name": "export.spin", "args": {"folder": "/tmp/formshot-spin", "columns": 12, "width": 240, "height": 300, "samples": 8}}
{"name": "export.spin_status", "args": {}}
```

Check: the reply's `path` or `files`, its `warnings`, and for pages, that `index.html` is in the folder.
34 changes: 34 additions & 0 deletions .agents/skills/formshot-rendering/references/guide/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# FormShot agent guide

How to drive FormShot as an agent: read `rules` first, then the page for your task.

FormShot holds one document: a tree of groups and parts over shared meshes and materials, with cameras, an environment, a ground, an image style and render settings. Every change is a command from the engine's catalogue and one undo step. These pages say which commands to use, in what order, and how to check the result.

| Page | Read it to |
| --- | --- |
| `rules` | work safely: the rules every session follows |
| `practice` | build the practice bottle every example runs on |
| `open-and-frame` | open or import a model, read it, frame it |
| `dress-parts` | put library materials on parts and tint them |
| `studio-and-lights` | light the product with a studio preset, the environment, the ground and lights |
| `camera-and-lens` | place the camera, choose a lens, focus |
| `render-and-output` | look at the picture, render stills and queued files |
| `shots-and-configurator` | keep named shots, material variants and configurations, render them all |
| `export` | save the project, export models, a web configurator and a spin viewer |
| `live-links-and-scripting` | drive FormShot from a script or another program |
| `plugins` | what plugins are and what they may send |

## Examples

Each example is one JSON line, `{"name": <command>, "args": {...}}`. The same line works everywhere:

- MCP: call the tool named like the command with `args` as its arguments (in the `standard` profile, `formshot_run` runs any command by name).
- The scripting channel: the `command` op with `name` and `args`.
- A shell: `formshot-engine dispatch` reads one such line per request, with an `"id"` added.

Ids in examples (`7` the bottle group, `8` to `11` its parts, material keys from `12`) are the practice bottle's after `file.open`. Yours come from `scene.summary`: never copy an id from this guide.

```json
{"name": "help.guide", "args": {}}
{"name": "help.guide", "args": {"page": "rules"}}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Live links and scripting

Drive FormShot from a script or keep another program's scene in step with it.

## The scripting channel

A running FormShot service writes `<home>/.formshot/scripting.json` (`port`, `token`, `version`, `headless`). Connect to `127.0.0.1:<port>` and send one JSON object per line; every request carries `id` and `token`, and replies carry the same `id` with `result` or `error {code, message}`. Replies may come out of order. The token is a secret: never print or log it.

```text
{"id": 1, "token": "<token>", "op": "hello", "client": "my-script", "capabilities": []}
{"id": 2, "token": "<token>", "op": "command", "name": "scene.summary", "args": {}}
{"id": 3, "token": "<token>", "op": "batch", "label": "Dress the bottle", "commands": [{"name": "library.apply", "args": {"id": "metal/aluminium-brushed", "nodes": [8, 9]}}]}
{"id": 4, "token": "<token>", "op": "guide", "page": "rules"}
{"id": 5, "token": "<token>", "op": "events", "subscribe": ["selection", "render_finished"]}
```

`batch` runs its commands as one undo step; the first failure undoes the rest and answers its index. `./formshot script file.py` runs a Python script with FormShot's client on its path (`docs/PYTHON.md`). Every command a script sends shows in the window's console.

## Live links

A modelling program links its scene with `link.hello`, then sends `link.sync` with the objects that changed (`key`, `name`, `parent`, a column-major `matrix` in metres with Y up, optional `mesh` as base64 arrays and a first-arrival `material`), and `link.camera` to mirror its view. Each sync is one undo step under a group of its own; FormShot keeps the materials, labels and visibility a person sets on linked parts, and the link owns geometry and placement. `link.status` and `link.forget` manage links. The protocol is in `docs/LIVE-LINK.md`.

## Commands scripts use most

The examples below run as they are on the practice bottle: a labelled group of edits, a check of the revision counters, and the version.

```json
{"name": "app.version", "args": {}}
{"name": "history.begin_group", "args": {"label": "Script: dress the bottle"}}
{"name": "library.apply", "args": {"id": "metal/aluminium-brushed", "nodes": [8, 9]}}
{"name": "scene.set_metadata", "args": {"id": 8, "key": "script.dressed", "value": "yes"}}
{"name": "history.end_group", "args": {}}
{"name": "scene.summary", "args": {}}
```

Every dispatch reply carries `meta {revision, content_revision}`: compare them with the last values to notice changes others made, instead of reading the whole summary again.
Loading