stillmade-sdk 0.1.8 → 0.1.10

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 (54) hide show
  1. package/.stillmade/sdk-baseline.json +1 -1
  2. package/AGENTS.md +8 -2
  3. package/DESKTOP_CAPABILITIES.md +1 -1
  4. package/INTERFACE_DESIGN.md +167 -83
  5. package/MODULES.md +1 -1
  6. package/NATIVE_MCP.md +1 -1
  7. package/PASTE_TO_LLM.md +151 -12
  8. package/README.md +5 -2
  9. package/SDK.md +510 -115
  10. package/UI_AESTHETIC.md +64 -0
  11. package/blocks/native/sm.export-video/versions/2.1.0/package.js +580 -0
  12. package/blocks/native/sm.panel-strip/versions/2.4.0/package.js +1176 -0
  13. package/blocks/native/sm.panel-strip/versions/2.4.1/package.js +1316 -0
  14. package/blocks/native/sm.shot-plan/versions/2.2.0/package.js +800 -0
  15. package/blocks/native/sm.shot-plan/versions/2.2.1/package.js +920 -0
  16. package/examples/README.md +10 -0
  17. package/examples/custom-interface.stillmade.json +3 -3
  18. package/package.json +7 -1
  19. package/packages/block-cli/dev-host/assets/host.js +219 -26
  20. package/packages/block-cli/dev-host/assets/index.css +1 -1
  21. package/packages/block-cli/format.js +1 -1
  22. package/packages/block-cli/templates.js +53 -22
  23. package/packages/block-platform/block-readiness.js +5 -0
  24. package/packages/block-platform/brief-ports.js +29 -0
  25. package/packages/block-platform/catalog.js +32 -9
  26. package/packages/block-platform/current-semantic-source.js +7 -3
  27. package/packages/block-platform/flow-inspection.js +14 -4
  28. package/packages/block-platform/plain-descriptions.js +1 -1
  29. package/packages/block-platform/project-context.js +7 -0
  30. package/packages/block-platform/project-input-samples.js +3 -1
  31. package/packages/block-platform/project-inputs.js +11 -2
  32. package/packages/block-platform/project-start-input.js +46 -0
  33. package/packages/block-platform/segment-runner.js +4 -2
  34. package/packages/block-platform/step-groups.js +4 -0
  35. package/packages/block-platform/steps.js +55 -4
  36. package/packages/block-platform/type-preview.js +19 -3
  37. package/packages/block-platform/workspace-input-readset.js +6 -1
  38. package/packages/block-sdk/builder-contract.js +11 -5
  39. package/packages/block-sdk/collaboration-admission.js +4 -2
  40. package/packages/block-sdk/connection-adapters.js +35 -2
  41. package/packages/block-sdk/contracts.js +5 -2
  42. package/packages/block-sdk/examples.js +3 -3
  43. package/packages/block-sdk/first-party-identities.js +190 -0
  44. package/packages/block-sdk/first-party-packages.js +6 -1
  45. package/packages/block-sdk/index.d.ts +2 -0
  46. package/packages/block-sdk/index.js +1 -1
  47. package/packages/block-sdk/javascript.js +5 -1
  48. package/packages/block-sdk/platform-checks.js +13 -2
  49. package/packages/block-sdk/shared-agent-controls.js +5 -4
  50. package/packages/block-sdk/shared-controls.js +13 -9
  51. package/packages/block-sdk/view-design.js +104 -27
  52. package/packages/block-sdk/view.js +4 -2
  53. package/packages/design-system/block-kit.css +184 -0
  54. package/packages/design-system/block-kit.html +187 -0
@@ -9,7 +9,7 @@
9
9
  "examples/clean-text.stillmade.json": "1d0ab95c652b201540fec45918651cdcffa7a70ea7909a17f8c1ad80345797e2",
10
10
  "examples/comfy-invert.stillmade.json": "126bd3a8a88e14c08ae11c62a441ed099d83e16830e2062f936e14e56cb297eb",
11
11
  "examples/comfy-text-to-image.stillmade.json": "957a616887115984c1888cf9c0eee2fe771dcbf041166ad112fb6c3feb7ad4dd",
12
- "examples/custom-interface.stillmade.json": "e824f14f61b21d747a668faae55ad4f8afca9c2942a48436baefaa6925eb5a1b",
12
+ "examples/custom-interface.stillmade.json": "6177c63be4d47739461d9657defef6cc701fc90556905de79d65d187840a01d7",
13
13
  "examples/describe-image.stillmade.json": "1cf5985eaf7c27150815887c2f4550b3c5c716e9f2badda22ace606c082ac7cd",
14
14
  "examples/docs-only-campfire-narrator.stillmade.json": "87c6a3b643b1ee007487e162aeced6f6302648f4c4a58b015e7df2ab9f2959be",
15
15
  "examples/docs-only-custom-ui.stillmade.json": "4602fd6b9576d364e16b79d2f08b196a251a8e98cf3149576686a96680a5dfe6",
package/AGENTS.md CHANGED
@@ -6,7 +6,7 @@ This folder is the StillMade Block SDK. Read this file before writing code; it i
6
6
 
7
7
  Do not tell the user a Block is ready, done or working until `node packages/block-cli/cli.js gate .` passes after your last edit, and report the exact status it prints. In this folder Claude Code (`.claude/settings.json`) and Cursor (`.cursor/hooks.json`) run the gate when you finish a turn and send any failures back to you, but only in a session started in this folder: if you downloaded the SDK during the current session, run the gate yourself. Other agents must also run it themselves. If you cannot fix a failure, say plainly that the Block is not ready and list the failing checks.
8
8
 
9
- Contract `stillmade.block-builder@1.3.0`. Humans, coding agents, imported source, GitHub repositories and generated code all adapt to the Block platform; anything that becomes a StillMade Block obeys this contract.
9
+ Contract `stillmade.block-builder@1.5.1`. Humans, coding agents, imported source, GitHub repositories and generated code all adapt to the Block platform; anything that becomes a StillMade Block obeys this contract.
10
10
 
11
11
  ## Source of truth
12
12
 
@@ -24,6 +24,8 @@ A Step is one job: the work between two moments where a person or the outside wo
24
24
  2. **Finding new things turns into handling each one**: the trigger (a schedule or an app event), the app read, its filter and "only new" are the first job; what is done with each item is the next job. A trigger is a setting of the first job, never a Step of its own.
25
25
  3. **The result leaves StillMade**: it is sent, posted, published, paid or written into another app. Consecutive writes to the same app, with the glue that shapes data for them, are one job.
26
26
 
27
+ In a production the Steps are the workspaces a person opens: work feeding the next workspace is its part, else it joins the one before; neighbouring workspaces with one main result type are one Step unless another part feeds the second. A video ends in the Editor (1.0), which has captions and export built in, so Export video is never a Step beside it.
28
+
27
29
  A part that only runs in the desktop app cannot share a Step with cloud parts. Before adding a Step, name which of the three reasons makes it separate; if none applies, make it a part of a neighbor. A Step nobody would ever open must not exist on its own. Prefer an app task's own filter (a Gmail query such as `has:attachment filename:png`) to an AI check, and use AI decide only for judgement.
28
30
 
29
31
  Inside one job, each capability stays its own part: a capability Block performs exactly one hosted operation and a connector one app task, so every part keeps its own permission, approval and credit rules, and StillMade groups the parts of one job into one Step (`groups` in the Project Type). Never invent a combined runtime. When one Block can do the whole job with documented primitives (a JavaScript Block doing several local transforms, a workspace owning its whole document), build it as one Block.
@@ -52,7 +54,7 @@ Give the Block a short, plain name of 40 characters or fewer that says what it d
52
54
 
53
55
  ## Interface
54
56
 
55
- If the capability needs UI, use the Block UI SDK: generated `manifest.ui` controls first; a sandboxed custom view (`view.html`/`view.css`/`view.js`) only when the core interaction genuinely needs one. Expose the capability, not the implementation: meaningful controls, sensible defaults, preview, direct manipulation, progress, clear errors and visible outputs. Do not show raw JSON, internal IDs, filesystem details, provider terminology or developer settings unless the Block is itself a developer tool. When a person chooses among options they need to hear or see (voices, music, sounds, fonts, looks, colors, templates or images), let them preview each option before choosing: a sample to play or a thumbnail, from the Block's own files or the host's free samples, never a paid generation. Leave previews out only when the builder states there is nothing to preview. Choices StillMade owns, such as voices and models in the run review, already show their samples. Follow the host appearance (Light, Dark and White) and the mobile layout contract: one interface for every screen size that fits a 320 CSS-pixel phone without horizontal scrolling.
57
+ If the capability needs UI, use the Block UI SDK: generated `manifest.ui` controls first; a sandboxed custom view (`view.html`/`view.css`/`view.js`) only when the core interaction genuinely needs one. Build custom views from the Block kit the host injects (`block-kit.css`): the result in `sm-stage`, picks as pictures in `sm-choices`, one `sm-primary` naming the action (Write, Generate; never "Run") and no price (StillMade's run button adds it), extras in a closed `sm-more`; a look the person names wins. Fit one laptop screen without scrolling: label beside control, status in a few words, files as tiles, rare tools as icons. Drop words nobody needs; put helpful ones in a closed `sm-hint`. Expose the capability, not the implementation: meaningful controls, sensible defaults, preview, direct manipulation, progress, clear errors and visible outputs. Do not show raw JSON, internal IDs, filesystem details, provider terminology or developer settings unless the Block is itself a developer tool. When a person chooses among options they need to hear or see (voices, music, sounds, fonts, looks, colors, templates or images), let them preview each option before choosing: a sample to play or a thumbnail, from the Block's own files or the host's free samples, never a paid generation. Leave previews out only when the builder states there is nothing to preview. Choices StillMade owns, such as voices and models in the run review, already show their samples. Follow the host appearance (Light, Dark and White) and the mobile layout contract: one interface for every screen size that fits a 320 CSS-pixel phone without horizontal scrolling.
56
58
 
57
59
  ## Shared editing
58
60
 
@@ -78,6 +80,10 @@ A successful run means more than a returned value. Validate inputs before work;
78
80
 
79
81
  Errors must say what failed, why it likely failed, whether a retry makes sense and what the user can do, so the native project chat and controller can troubleshoot. In JavaScript, throw an `Error` with that message: the host reports it as a `JAVASCRIPT` run failure carrying your message (guest code cannot set its own error code). Reject invalid or oversized input up front with a message naming the input and the limit. Never reduce a failure to "Something went wrong".
80
82
 
83
+ ## Only supplied facts
84
+
85
+ A text Block that writes from supplied facts must not let its prompt template outrank its own "never invent" rule. Every section that needs a specific fact (phone, website, address, price, inspection, certification, warranty, features) is written only when the input supplies that fact; otherwise the section is left out or replaced by a generic line that asserts nothing (for example "Call us today to schedule your test drive."). Never default to "inspected", "certified", invented features or placeholder contact details such as 555 numbers or example websites. Prefer extract-then-generate: first list the facts the input actually contains, then write using only that list. Add a check after generation that rejects or removes sentences naming a claim, number or address not present in the input. Include fixtures with the facts omitted and with them supplied.
86
+
81
87
  ## Adapt to the platform
82
88
 
83
89
  Do not modify StillMade core because a request does not fit immediately. First implement the capability entirely through documented SDK and platform primitives. If that is impossible, classify why: A Block implementation problem (fix it), B missing SDK exposure of an existing host capability, C missing generic platform primitive, D security or permission restriction, E runtime or language incompatibility, F fundamentally incompatible capability. For B or C, name the smallest general primitive that would serve this Block and a meaningful class of future Blocks (shaped like `files.watch()` or `media.transform()`, never `supportThisSpecificBlock()`). Return `{"unsupported":"exact reason","gapClass":"B|C|D|E|F","primitive":"..."}` instead of a package that pretends to work.
@@ -72,7 +72,7 @@ stop.addEventListener('click', async () => {
72
72
  });
73
73
  ```
74
74
 
75
- `record.stop` returns `{asset,cursor,displays,coordinates}`. `asset` is a canonical media reference with `assetId`, `versionId`, `kind`, `mime`, and a device-local `sm-media:` URL. Cursor samples contain `{x,y,time}`: global device-independent screen coordinates and milliseconds relative to recording start. Multiple monitors can have negative coordinates. These are not automatically converted into cropped-window video coordinates. Share/upload media through the existing host media flow before teammates on other devices can use it.
75
+ `record.stop` returns `{asset,cursor,displays,coordinates}`. `asset` is a canonical media reference with `assetId`, `versionId`, `kind`, `mime`, and a device-local `sm-media:` URL. Cursor samples contain `{x,y,time}`: global device-independent screen coordinates and milliseconds relative to recording start. Multiple monitors can have negative coordinates. These are not automatically converted into cropped-window video coordinates. Share/upload media through the existing host media flow before teammates on other devices can use it. By default that flow uploads a 1080p working copy of large video (the account's media setting); the original stays in the desktop media library.
76
76
 
77
77
  `record.cancel` discards an active capture. `session.close` revokes all access and cancels capture. StillMade also renders a host-owned cancel/revoke control outside the Block iframe. Screen source selection happens for every recording. No preview can bypass consent or access the native bridge directly.
78
78
 
@@ -1,85 +1,169 @@
1
1
  # Block interface design
2
2
 
3
- Simplicity first: show the work and the next useful action. The app owns project navigation; a Block owns its production surface. Neither needs a second shell.
4
-
5
- ## Mandatory authoring rules — for LLMs and creators
6
-
7
- These are requirements, not optional conventions. Authors must follow them;
8
- they are not all machine-enforced. Explicit user requests may authorize the
9
- named exception, but do not authorize unrelated technical UI.
10
-
11
- - Do not add Technical result, Result details, JSON dumps, source editors,
12
- manifests, debug consoles, or diagnostic panels to a production workspace
13
- unless the user explicitly requests that surface or the stated task is
14
- source/debug inspection. A collapsed disclosure is still an added surface.
15
- - Do not nest decorative cards, bordered panels, or modal shells around the
16
- same work area. Use one workspace with spacing and labels. Nested containers
17
- needed for layout are fine; repeated visible framing is not.
18
- - Do not duplicate the host's step navigation, counters, or workspace identity.
19
- - Do not append a generic Workflow tools menu to production Blocks. Batch,
20
- loop, schedule, memory, migration, and diagnostic tools are not default
21
- workspace chrome; add a specific surface only when explicitly requested.
22
- - Show the useful output itself, not a technical representation of the output.
23
- - Keep required approvals, errors, progress, and stale-input warnings visible.
24
- These are operational feedback, not optional diagnostic panels.
25
- - Do not lock page scrolling or introduce sticky headers unless the task
26
- explicitly needs them. A production page must keep all controls reachable.
27
- The host owns page scrolling; embedded workspaces may scroll their own
28
- content, but must not trap scrolling or clip controls below the viewport.
29
- - Do not keep media galleries, asset inputs, or control strips sticky by default.
30
- They belong to the same scrolling task surface. A fixed timeline/inspector is
31
- appropriate only when the actual editing task requires that layout, with all
32
- controls still reachable; it is not a default for every Block.
33
- - Do not add an ambiguous settings gear for task actions. Show the immediate
34
- action directly; label secondary task controls by purpose. Do not disguise
35
- source, wiring, or debug controls as ordinary production settings.
36
-
37
- For an existing Block, apply the [SDK update procedure](/block-sdk/PASTE_TO_LLM.md#updating-existing-blocks-through-the-sdk)
38
- to the actual owned source and a new release/remix. These requirements do not
39
- authorize rewriting published packages or silently repinning saved projects.
40
-
41
- ## Rules — implemented enforcement
42
-
43
- These are implementation facts, not aesthetic suggestions.
44
-
45
- - The host supplies the Project Type step bar. Production workspaces do not add another step counter or Back/Next bar.
46
- - For custom views the host omits its duplicate title and outer frame border. Sandbox isolation remains enabled.
47
- - The host does not append a generic Technical result disclosure to custom workspaces. Stored outputs and required approval actions are preserved.
48
- - Shared form containment wraps adjacent labeled controls and keeps checkboxes compact.
49
- - Admission rejects a primary textarea with 12 or more rows when no task presentation is detected. This is a narrow heuristic, not proof of a usable visual workspace: `StillMade.render` can render text cards.
50
- - HTML, JavaScript, permission, and appearance validation remain separate checks. Simplicity never bypasses safety or approval.
51
-
52
- The SDK exports `INTERFACE_DESIGN_RULES` separately from `INTERFACE_DESIGN_CONVENTIONS`. The older `INTERFACE_DESIGN_PRINCIPLES` export is a compatibility alias for conventions, not enforced guarantees.
53
-
54
- ## Conventions — design guidance
55
-
56
- Static review warns about more than eight visible controls, ungrouped large option sets, and multiple primary headings. Warnings are not hard failures. The following guidance requires design review; it is not automatically enforced.
57
-
58
- ### Do not
59
-
60
- - Repeat the Block name, step number, or workflow navigation in nested panels.
61
- - Place a workspace in a card inside another card merely to create hierarchy.
62
- - Use dialogs as permanent page layout or put a dialog inside another dialog.
63
- - Give every section a border. Use spacing and short labels.
64
- - Put twenty controls in the initial view, even if they wrap.
65
- - Show camera, timing, patch, variant, and export settings before they are needed.
66
- - Make users read a technical plan to reach the actual work.
67
- - Call text scene descriptions a visual storyboard, frame review, or motion preview.
68
- - Present placeholder imagery as the actual approved assets.
69
- - Lead with JSON, manifests, MCP, transport details, or diagnostics.
70
- - Add decorative circles around icons, emoji controls, or unlabeled icon buttons.
71
- - Claim approval, rendering, or successful testing without the actual result.
72
- - Hide spending approvals, failures, or stale-source warnings for neatness.
73
- - Discard drafts or selections when collapsing controls or changing layout.
74
-
75
- ### Prefer
76
-
77
- One obvious primary action, strong defaults, and the controls needed for the current decision. Group advanced adjustments behind labeled disclosures. Use recognizable line icons with accessible names, tooltips, keyboard focus, and generous hit areas; keep text when an icon is ambiguous.
78
-
79
- Use StillMade theme tokens, typography, and spacing. Give the preview, timeline, images, or other task object the main surface. Only include source or diagnostic surfaces when authorized under the mandatory authoring rules above; do not add them automatically, even collapsed.
80
-
81
- Motion workflows distinguish planning notes from actual frame approval. Frame Review should display the exact images being approved before Motion Designer uses them. Motion preview should display the composition, not just its layer descriptions. These are product acceptance requirements to verify, not guarantees established by static admission.
82
-
83
- ## Known coverage gap
84
-
85
- Existing pinned Blocks can still contain excessive nested panels and text-only plans. Host containment does not redesign their interfaces. Correct those through new versioned Block releases and explicit upgrades; do not rewrite immutable releases or silently change a saved workflow's pins.
3
+ A Block page should work at a glance: the thing being made is the biggest
4
+ thing on the page, there is one obvious next action, choices are pictures, and
5
+ words appear only when someone needs them. The app owns project navigation;
6
+ a Block owns its production surface. Neither needs a second shell.
7
+
8
+ Most Blocks need no custom view: generated `manifest.ui` controls already
9
+ follow these rules. Write a custom view only when the core interaction needs
10
+ one, and start it from the Block kit.
11
+
12
+ ## 1. Start from the Block kit
13
+
14
+ StillMade adds the Block kit stylesheet (`packages/design-system/block-kit.css`)
15
+ to every Block view, standard and frame. Use its classes and ship little or no
16
+ CSS of your own. Every kit rule has zero specificity, so your own CSS always
17
+ wins. Open `packages/design-system/block-kit.html` in a browser to see every
18
+ piece in Light, Dark and White.
19
+
20
+ ```html
21
+ <main class="sm-block" data-layout="split">
22
+ <section class="sm-stage" id="stage" data-ratio="16:9" aria-live="polite">
23
+ <div class="sm-empty" id="empty">
24
+ <span class="sm-glyph" data-glyph="video" aria-hidden="true"></span>
25
+ <p>Drop a clip</p>
26
+ </div>
27
+ </section>
28
+
29
+ <fieldset class="sm-choices" id="look" data-stillmade-share="look" data-ratio="16:9">
30
+ <legend>Look</legend>
31
+ <label><input type="radio" name="look" value="warm" checked><img src="data:..." alt=""><span>Warm</span></label>
32
+ <label><input type="radio" name="look" value="cool"><img src="data:..." alt=""><span>Cool</span></label>
33
+ </fieldset>
34
+
35
+ <div class="sm-field">
36
+ <div class="sm-label">
37
+ <label for="caption">Caption</label>
38
+ <details class="sm-hint"><summary aria-label="About captions" title="About captions"></summary><p>Shown over the first two seconds.</p></details>
39
+ </div>
40
+ <input id="caption" data-stillmade-input="caption" placeholder="Optional">
41
+ </div>
42
+
43
+ <div class="sm-actions">
44
+ <button type="button" class="sm-primary" id="run" data-stillmade-action="run">Make it</button>
45
+ <p class="sm-status" id="status" role="status"></p>
46
+ </div>
47
+
48
+ <details class="sm-more">
49
+ <summary>More</summary>
50
+ <div class="sm-fields"><!-- secondary settings --></div>
51
+ </details>
52
+ </main>
53
+ ```
54
+
55
+ | Class | Use it for |
56
+ | --- | --- |
57
+ | `sm-block` | The one workspace. `data-layout="split"` puts the stage beside the controls on wide screens. |
58
+ | `sm-stage` | The thing being made: preview, media or result. `data-ratio="16:9"`, `"9:16"` or `"1:1"`. |
59
+ | `sm-empty` | An empty stage: a glyph, at most five words, one action. |
60
+ | `sm-choices` | Picks shown as pictures (`img`, `.sm-swatch`, `.sm-glyph`) and one or two words. `data-compact` for short text chips. Give the `fieldset` an `id` and `data-stillmade-share` so teammates see the same pick. |
61
+ | `sm-field`, `sm-fields` | A short label above one control; a responsive group of them. |
62
+ | `sm-actions` | One `sm-primary`, then `sm-quiet` buttons and `sm-icon` buttons (each with `aria-label` and `title`). |
63
+ | `sm-status` | Live state beside the action: `data-state="loading"`, `"success"`, `"waiting"` or `"error"`. |
64
+ | `sm-more` | A closed `<details>` for secondary settings. |
65
+ | `sm-hint` | A closed `<details>` info toggle for an explanation that might help. |
66
+ | `sm-gallery` | A grid of results or media. |
67
+ | `sm-glyph` | A small icon in `currentColor`: `play`, `pause`, `plus`, `close`, `check`, `chevron`, `upload`, `image`, `video`, `audio`, `text`, `spark`, `info`, `warning`, `spinner`. Works in standard views, which cannot use SVG. |
68
+
69
+ **Function first.** When the person building a Block does not ask for a look,
70
+ use the kit as is: they want it to work and be easy to use. When they name a
71
+ design direction, follow it; the kit is the default, not a ceiling. Original
72
+ designs keep `appearance: "original"`.
73
+
74
+ ## 2. Decide every sentence
75
+
76
+ | If the words… | Then |
77
+ | --- | --- |
78
+ | aren't needed to finish the task (an intro, "how it works", the Block name again, a description of what is already visible) | Drop them. |
79
+ | say what a glyph, thumbnail, swatch or sample can show | Show the picture. Keep one or two words under it. |
80
+ | might help some people (what a setting does, a format limit) | Put them in a closed `sm-hint`, or secondary settings in a closed `sm-more`. |
81
+ | report an error, a spending approval, a stale input or a destructive step | Keep them visible, in few words. Say what to do next. |
82
+
83
+ Buttons say the action in one to three words ("Make it", "Export"). Status says
84
+ the state in one to four words ("Making", "Ready", "Needs approval").
85
+
86
+ The button that makes something names what it makes ("Write", "Generate image",
87
+ "Make video"), never "Run", "Run step", "Submit" or "Review cost", and says the
88
+ progress word while it works ("Writing…").
89
+
90
+ Credit prices come from StillMade, never from the Block. On a Step, StillMade's
91
+ run button carries the price beside the verb ("Write · 1 credit"), with a chip
92
+ before it when the model, quality or count can change; each choice there shows
93
+ its own price. When a custom view starts paid work, StillMade's run review shows
94
+ the same single priced button. Pressing a priced button runs at that price; a
95
+ confirmation appears only when the server's price is higher than the one shown.
96
+ Do not write credit numbers in the Block.
97
+
98
+ ## 3. Rules
99
+
100
+ These are requirements for every author, person or model. Not all are checked
101
+ automatically. An explicit request from the person can authorize a named
102
+ exception, never unrelated technical UI.
103
+
104
+ 1. Show the thing being made, not a technical representation of it. No JSON
105
+ dumps, source editors, manifests, debug consoles or "Technical result"
106
+ panels unless the task is about source. A collapsed disclosure is still an
107
+ added surface.
108
+ 2. One obvious next action. Seven or fewer choices in view; strong defaults.
109
+ 3. Choices people see or hear (voices, music, sounds, fonts, looks, colors,
110
+ templates, images) show a preview of each option: a thumbnail or a sample
111
+ to play, never a paid generation.
112
+ 4. One workspace. No cards inside cards, no dialogs as page layout, no second
113
+ title, step counter, Back/Next bar or generic "Workflow tools" menu.
114
+ 5. Keep the page in normal scroll flow. No sticky media, headers or control
115
+ strips unless the editing task needs a fixed timeline or inspector.
116
+ 6. Name secondary controls by purpose; no ambiguous settings gear.
117
+ 7. Icons come from the kit glyphs or your own files, with an accessible name
118
+ and tooltip. Never emoji, never a circle around an icon.
119
+ 8. Never hide spending approvals, failures or stale-source warnings for
120
+ neatness, and never discard drafts when collapsing controls.
121
+ 9. Text scene descriptions are planning notes, never a storyboard, frame review
122
+ or motion preview. Frame Review shows the exact images being approved.
123
+ 10. Compact: the whole Block fits one laptop screen (about 720 px tall)
124
+ without scrolling, and a 320 px phone without sideways scrolling. If it
125
+ does not fit, fold, shrink or move something; never add a section below.
126
+ 11. A short setting is one row, its label beside the control (the kit's
127
+ `sm-field` does this on any view wider than a phone). No card around a
128
+ single control.
129
+ 12. Status is a dot or a few words ("No narration yet"), never a paragraph.
130
+ The reason sits behind an `sm-hint`.
131
+ 13. Files are tiles: a saved file is a thumbnail or chip, and adding one is a
132
+ + tile (a `label` around a hidden file input). Never the browser's bare
133
+ "Choose File / No file chosen" picker, and no size limits in view until
134
+ a file is too big.
135
+ 14. Rare tools (update, schedule, history, reload) are named icon buttons
136
+ beside the action, never sections under the work.
137
+
138
+ ## 4. What StillMade checks
139
+
140
+ - Admission rejects a primary textarea of 12 or more rows when no task
141
+ presentation (stage, media, list or `StillMade.render`) is detected
142
+ (`INTERFACE_DESIGN_RULES`).
143
+ - Admission warns about more than eight visible controls, more than seven
144
+ ungrouped options, more than one `h1`, a visible paragraph over twenty words,
145
+ a word dropdown for something people see or hear, a bare browser file
146
+ picker, and a size limit printed in view.
147
+ - Admission also warns, and `stillmade-block ready` fails the "UI works" check
148
+ (DOD-15), when a button says "Run", "Run step" or "Submit", when the
149
+ interface shows a credit price, or when it has a page heading
150
+ (`blockKitProblems`; the failing rules are `BLOCK_KIT_READINESS_RULES`). StillMade's own Block builder also sends back a custom
151
+ view that is not built from `sm-block`, unless the person asked for their
152
+ own look (`appearance: "original"`).
153
+ - The host supplies the Project Type step bar and omits its own title and frame
154
+ around custom views, and does not add a "Technical result" disclosure.
155
+ - HTML, JavaScript, permission and appearance validation are separate checks.
156
+ Simplicity never bypasses safety or approval.
157
+
158
+ The SDK exports the ordered principles as `BLOCK_INTERFACE_PRINCIPLES` and the
159
+ kit vocabulary as `BLOCK_KIT_CLASSES`. `INTERFACE_DESIGN_CONVENTIONS`,
160
+ `INTERFACE_DESIGN_PRINCIPLES` and `INTERFACE_AUTHORING_RULES` remain as
161
+ compatibility names for the same list.
162
+
163
+ ## Existing Blocks
164
+
165
+ Pinned Blocks can still contain nested panels and text-only plans; the kit does
166
+ not redesign them. Move a Block to the kit through a new versioned release and
167
+ an explicit upgrade, following the
168
+ [SDK update procedure](/block-sdk/PASTE_TO_LLM.md#updating-existing-blocks-through-the-sdk).
169
+ Never rewrite immutable releases or silently change a saved workflow's pins.
package/MODULES.md CHANGED
@@ -49,7 +49,7 @@ against the manifest's port types.
49
49
  | `progress(value, label)` | Reports progress from 0 to 1 with a short label. Each report extends the run limit. |
50
50
  | `log(...values)` | Adds a line to the run log (up to 500 lines). |
51
51
  | `asset(path)` | A copy of one of the module's own files, such as a `.wasm` build, as an `ArrayBuffer`. |
52
- | `files.read(ref)` | The bytes of a saved image, video, audio or asset the Block received as input, or that StillMade made in this run: files it wrote, transform results and generated media. Other files cannot be read, and transforms, hosted calls and actions accept only these references too. |
52
+ | `files.read(ref)` | The bytes of a saved image, video, audio or asset the Block received as input, or that StillMade made in this run: files it wrote, transform results and generated media. Media the person kept on their device (a `sm-media://device/...` address in a project Step) reads the same way, without leaving the device. Other files cannot be read, and transforms, hosted calls and actions accept only these references too; a hosted call or action gets a cloud copy of device media, made once per version. |
53
53
  | `files.write(data, {mediaType, name})` | Saves PNG, JPEG, WebP, GIF, MP4, WebM, MP3, WAV, M4A or OGG to the runner's library and returns a reference you can return as an output. At most 64 files per run. |
54
54
  | `media.transform(request)` | On-device media work done by StillMade: decode audio to samples, extract or loudness-normalise audio, cut, join or re-encode video, and take thumbnails. Results are saved like `files.write`. See [Media processing](#media-processing). |
55
55
  | `actions.run(action)` | Runs a declared portable action. `media.generate` asks the person to approve one StillMade credit maximum for the batch; `stock.search` runs directly. |
package/NATIVE_MCP.md CHANGED
@@ -208,7 +208,7 @@ expose the former live-tab control bridge. The remote MCP adapter remains availa
208
208
  for the catalog, creation, saved-project, and run-inspection tools listed above,
209
209
  but it cannot control an open StillMade tab.
210
210
 
211
- Supported saved-project workflow edits: `begin_project_block_remix` starts a private Create draft from the exact pinned Block source. After `get_creation` / `save_creation` edits, `preview_project_workflow_edit` and `apply_project_workflow_edit` add, replace, move or remove a Block in the Project Type. Add/replace require a complete saved Block creation draft and `creations:read`; the Block passes static SDK admission and a remix must identify the exact current parent. Apply requires `projects:read`, `projects:write`, the three preview digests and a unique request ID. It commits the Type and Canvas together, pins the exact package, and archives affected results. The call does not run a Block. `prepare_project_type_draft` copies the current exact project workflow and embedded Block code to Create for listing review; only the project owner can do this, with `projects:read` and `creations:write`. It returns whether the project stayed current during the handoff. It does not publish.
211
+ Supported saved-project workflow edits: `begin_project_block_remix` starts a private Create draft from the exact pinned Block source. After `get_creation` / `save_creation` edits, `preview_project_workflow_edit` and `apply_project_workflow_edit` add, replace, move or remove a Block in the Project Type. Add/replace require a complete saved Block creation draft and `creations:read`; the Block passes static SDK admission and a remix must identify the exact current parent. Apply requires `projects:read`, `projects:write`, the three preview digests and a unique request ID. It commits the Type and Canvas together, pins the exact package, and archives affected results. The call does not run a Block. `prepare_project_type_draft` copies the current exact project workflow and embedded Block code to Create for listing review; only the project owner can do this, with `projects:read` and `creations:write`. It returns whether the project stayed current during the handoff. When the account already has a Project Type with the same name and no `entityId` is given, it saves nothing and names that Project Type (`AGENT_CONFLICT`): ask the person, then pass its `entityId` and revision to update it, or `separateCopy: true` for a new copy. It does not publish.
212
212
 
213
213
  Local verification on September 27, 2026: focused PGlite workflow mutation and MCP capability tests covered exact Block draft replacement, move replay, remix ancestry, and listing draft source/version handoff; project workflow and Create-draft tests passed; the client production build completed. These checks do not establish a live account or production deployment acceptance.
214
214