@prismer/runtime 2.0.8 → 2.2.55
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.
- package/CHANGELOG.md +3430 -0
- package/README.md +34 -12
- package/apc/skills/FIELD-DICTIONARY.md +111 -0
- package/apc/skills/bug-reproduce/SKILL.md +150 -0
- package/apc/skills/bug-reproduce/skill.json +96 -0
- package/apc/skills/code-review/SKILL.md +198 -0
- package/apc/skills/code-review/skill.json +124 -0
- package/apc/skills/design-review/SKILL.md +122 -0
- package/apc/skills/design-review/skill.json +88 -0
- package/apc/skills/doc-sync/SKILL.md +168 -0
- package/apc/skills/doc-sync/skill.json +81 -0
- package/apc/skills/env-doctor/SKILL.md +194 -0
- package/apc/skills/env-doctor/skill.json +209 -0
- package/apc/skills/git-ops/SKILL.md +189 -0
- package/apc/skills/git-ops/skill.json +94 -0
- package/apc/skills/impact-trace/SKILL.md +168 -0
- package/apc/skills/impact-trace/skill.json +104 -0
- package/apc/skills/observability/SKILL.md +195 -0
- package/apc/skills/observability/skill.json +116 -0
- package/apc/skills/release-db-config-sync/SKILL.md +186 -0
- package/apc/skills/release-db-config-sync/skill.json +109 -0
- package/apc/skills/release-ota-promote/SKILL.md +195 -0
- package/apc/skills/release-ota-promote/skill.json +176 -0
- package/apc/skills/release-preflight/SKILL.md +174 -0
- package/apc/skills/release-preflight/skill.json +175 -0
- package/apc/skills/release-rollback/SKILL.md +214 -0
- package/apc/skills/release-rollback/skill.json +230 -0
- package/apc/skills/release-tag/SKILL.md +194 -0
- package/apc/skills/release-tag/skill.json +94 -0
- package/apc/skills/releasing-prod/SKILL.md +49 -0
- package/apc/skills/releasing-test/SKILL.md +135 -0
- package/apc/skills/sdk-release/SKILL.md +200 -0
- package/apc/skills/spec-intake/SKILL.md +169 -0
- package/apc/skills/spec-intake/skill.json +93 -0
- package/apc/skills/test-result-feedback/SKILL.md +239 -0
- package/apc/skills/test-result-feedback/skill.json +193 -0
- package/apc/skills/test-runner/SKILL.md +169 -0
- package/apc/skills/test-runner/skill.json +103 -0
- package/apc/skills/ui-align/SKILL.md +209 -0
- package/apc/skills/ui-align/skill.json +114 -0
- package/apc/skills/ui-canvas/SKILL.md +148 -0
- package/apc/skills/ui-canvas/skill.json +127 -0
- package/built-in-skills/agent-coordination/SKILL.md +59 -37
- package/built-in-skills/agent-meta/SKILL.md +1 -0
- package/built-in-skills/assets/SKILL.md +8 -6
- package/built-in-skills/browser-use/SKILL.md +93 -0
- package/built-in-skills/canvas-design/SKILL.md +1 -0
- package/built-in-skills/claim-agent-ownership/SKILL.md +3 -2
- package/built-in-skills/claude-api/SKILL.md +1 -0
- package/built-in-skills/codebase-design/DEEPENING.md +37 -0
- package/built-in-skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/built-in-skills/codebase-design/LICENSE +21 -0
- package/built-in-skills/codebase-design/SKILL.md +116 -0
- package/built-in-skills/conversation-compaction/SKILL.md +114 -0
- package/built-in-skills/council-creator/SKILL.md +426 -0
- package/built-in-skills/diagnosing-bugs/LICENSE +21 -0
- package/built-in-skills/diagnosing-bugs/SKILL.md +136 -0
- package/built-in-skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
- package/built-in-skills/doc-coauthoring/SKILL.md +1 -0
- package/built-in-skills/document-generation/SKILL.md +105 -0
- package/built-in-skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/built-in-skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/built-in-skills/domain-modeling/LICENSE +21 -0
- package/built-in-skills/domain-modeling/SKILL.md +76 -0
- package/built-in-skills/frontend-design/SKILL.md +1 -0
- package/built-in-skills/human-approval/SKILL.md +17 -2
- package/built-in-skills/image-generate/SKILL.md +103 -302
- package/built-in-skills/image-generate/scripts/generate-and-deliver.mjs +289 -0
- package/built-in-skills/ingest/SKILL.md +13 -45
- package/built-in-skills/internal-comms/SKILL.md +1 -0
- package/built-in-skills/liteparse/SKILL.md +130 -110
- package/built-in-skills/mcp-builder/SKILL.md +1 -0
- package/built-in-skills/memory/SKILL.md +420 -55
- package/built-in-skills/memory-dream/SKILL.md +339 -0
- package/built-in-skills/office-artifacts/SKILL.md +17 -4
- package/built-in-skills/okr/SKILL.md +154 -0
- package/built-in-skills/persona/SKILL.md +81 -0
- package/built-in-skills/persona-generator/SKILL.md +296 -0
- package/built-in-skills/pkf-svg/SKILL.md +253 -0
- package/built-in-skills/pkf-writing/SKILL.md +236 -0
- package/built-in-skills/prismer-im-collab/SKILL.md +26 -6
- package/built-in-skills/proactivity/SKILL.md +84 -0
- package/built-in-skills/remotion/SKILL.md +431 -0
- package/built-in-skills/role-builder/SKILL.md +203 -0
- package/built-in-skills/role-builder/scripts/author-role.mjs +334 -0
- package/built-in-skills/role-builder/scripts/ingest-role.mjs +223 -0
- package/built-in-skills/role-builder/scripts/instantiate-and-run.mjs +290 -0
- package/built-in-skills/role-builder/scripts/operation-harness.mjs +267 -0
- package/built-in-skills/skill-authoring/SKILL.md +110 -100
- package/built-in-skills/skill-authoring/skill.json +3 -3
- package/built-in-skills/skill-builder/SKILL.md +171 -0
- package/built-in-skills/skill-builder/scripts/ingest.mjs +265 -0
- package/built-in-skills/skill-creator/SKILL.md +165 -423
- package/built-in-skills/skill-creator/references/external-library-import.md +110 -0
- package/built-in-skills/skill-creator/scripts/import-library.mjs +475 -0
- package/built-in-skills/slack-gif-creator/SKILL.md +20 -0
- package/built-in-skills/tasks/SKILL.md +38 -23
- package/built-in-skills/tdd/LICENSE +21 -0
- package/built-in-skills/tdd/SKILL.md +110 -0
- package/built-in-skills/tdd/mocking.md +59 -0
- package/built-in-skills/tdd/refactoring.md +10 -0
- package/built-in-skills/tdd/tests.md +61 -0
- package/built-in-skills/team/SKILL.md +2 -1
- package/built-in-skills/web-artifacts-builder/SKILL.md +1 -0
- package/built-in-skills/webapp-testing/SKILL.md +1 -0
- package/built-in-skills/wechat-pay/SKILL.md +59 -0
- package/dist/cli.cjs +71872 -19960
- package/dist/cli.js +71803 -19846
- package/dist/index.cjs +72010 -19966
- package/dist/index.d.cts +4258 -712
- package/dist/index.d.ts +4258 -712
- package/dist/index.js +72156 -20118
- package/package.json +37 -6
- package/plugins/memory/prismer/__init__.py +1211 -0
- package/plugins/memory/prismer/plugin.yaml +8 -0
- package/plugins/memory/prismer/tool-schemas.generated.json +249 -0
- package/plugins/tools/prismer-recall/__init__.py +282 -0
- package/plugins/tools/prismer-recall/plugin.yaml +15 -0
- package/built-in-skills/memory-curation/SKILL.md +0 -135
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remotion
|
|
3
|
+
scope: common
|
|
4
|
+
description: Use when a task involves Remotion compositions, Studio, Player, @remotion packages, programmatic video rendering, captions, media processing, maps, or Remotion and Mediabunny upgrades.
|
|
5
|
+
requires:
|
|
6
|
+
- assets
|
|
7
|
+
metadata:
|
|
8
|
+
aliases:
|
|
9
|
+
- remotion-best-practices
|
|
10
|
+
- remotion-captions
|
|
11
|
+
- remotion-create
|
|
12
|
+
- remotion-docs
|
|
13
|
+
- remotion-interactivity
|
|
14
|
+
- remotion-maps
|
|
15
|
+
- remotion-markup
|
|
16
|
+
- remotion-multimedia
|
|
17
|
+
- remotion-render
|
|
18
|
+
- remotion-saas
|
|
19
|
+
- remotion-studio
|
|
20
|
+
- remotion-upgrade
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Remotion
|
|
24
|
+
|
|
25
|
+
Build and maintain Remotion projects while preserving user changes. If a file
|
|
26
|
+
changed unexpectedly, treat it as intentional unless the user confirms otherwise.
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
1. Inspect `package.json`, the lockfile, existing compositions, the current
|
|
31
|
+
diff, and `npx remotion versions`. Reuse the package manager and project
|
|
32
|
+
shape; keep every `remotion` / `@remotion/*` package on one exact version.
|
|
33
|
+
2. Confirm the requested output: composition/source changes, Studio preview,
|
|
34
|
+
rendered media, an embedded Player, or a rendering service.
|
|
35
|
+
3. Implement deterministic, frame-driven visuals and keep render inputs
|
|
36
|
+
serializable.
|
|
37
|
+
4. Preview in Studio. Render only when the user requests a media file.
|
|
38
|
+
5. Verify rendered media with `ffprobe` and inspect representative frames.
|
|
39
|
+
6. Report changed files, preview/render evidence, and the delivery receipt. In
|
|
40
|
+
Prismer, a loose sandbox path is not a delivered result.
|
|
41
|
+
|
|
42
|
+
## Prismer artifact and delivery contract
|
|
43
|
+
|
|
44
|
+
When the user requests rendered media, write the final file under
|
|
45
|
+
`$PRISMER_ARTIFACTS_DIR` (the dispatch `<artifacts_dir>`). Put project scaffolds,
|
|
46
|
+
frames, probes, and other intermediates under `$PRISMER_SCRATCH_DIR` or the
|
|
47
|
+
existing project tree. Then deliver each requested final file exactly once:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cloud deliver "$PRISMER_ARTIFACTS_DIR/launch-video.mp4"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Writing or rendering a file does not attach it. A successful `cloud deliver`
|
|
54
|
+
receipt is the delivery oracle. Do not deliver preview frames, temporary audio,
|
|
55
|
+
or duplicate encodes unless the user requested them. If no dispatch artifact
|
|
56
|
+
directory exists, keep the result in the user-approved project output path and
|
|
57
|
+
report that delivery was unavailable rather than inventing a receipt.
|
|
58
|
+
|
|
59
|
+
## Project creation and compositions
|
|
60
|
+
|
|
61
|
+
Do not scaffold over a non-empty project. When no suitable project exists,
|
|
62
|
+
confirm Node.js and Git are available, then run:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx create-video@latest --yes --blank --no-tailwind my-video
|
|
66
|
+
cd my-video
|
|
67
|
+
npm install
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Use a meaningful directory name. Add Tailwind only when the user asks for it or
|
|
71
|
+
the project already uses it. Inspect the generated manifest, config, and global
|
|
72
|
+
CSS before continuing: generator releases can still emit Tailwind dependencies
|
|
73
|
+
and imports when `--no-tailwind` was requested. Remove those only when the
|
|
74
|
+
project does not use them, and keep the Remotion package versions aligned.
|
|
75
|
+
|
|
76
|
+
In Prismer sandbox images, use a command-scoped writable npm cache for every
|
|
77
|
+
command that may install or invoke a missing package, including scaffolding,
|
|
78
|
+
`npm ci`, `remotion add`, probes, and renders:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm_config_cache="${PRISMER_SCRATCH_DIR:-/tmp}/npm-cache" npm ci
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Do not change the user's global npm configuration to work around a sandbox
|
|
85
|
+
ownership mismatch.
|
|
86
|
+
|
|
87
|
+
Keep static composition metadata inline:
|
|
88
|
+
|
|
89
|
+
```tsx
|
|
90
|
+
<Composition
|
|
91
|
+
id="LaunchVideo"
|
|
92
|
+
component={LaunchVideo}
|
|
93
|
+
durationInFrames={300}
|
|
94
|
+
fps={30}
|
|
95
|
+
width={1920}
|
|
96
|
+
height={1080}
|
|
97
|
+
defaultProps={{title: 'Launch day'}}
|
|
98
|
+
/>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use `calculateMetadata()` only when duration, dimensions, or props genuinely
|
|
102
|
+
depend on inputs, remote data, or media inspection. Keep `defaultProps` inline
|
|
103
|
+
so Studio can save prop edits back to code. For multi-scene videos, use named
|
|
104
|
+
`<Sequence>` boundaries and derive all timing from one fps-aware plan.
|
|
105
|
+
|
|
106
|
+
## Frame-driven animation
|
|
107
|
+
|
|
108
|
+
Drive rendered animation from `useCurrentFrame()`, `interpolate()`, springs, or
|
|
109
|
+
easing. Do not use CSS transitions, CSS animations, wall-clock timers, or
|
|
110
|
+
Tailwind animation utilities; they are not deterministic renders.
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
import {
|
|
114
|
+
AbsoluteFill,
|
|
115
|
+
Easing,
|
|
116
|
+
Interactive,
|
|
117
|
+
interpolate,
|
|
118
|
+
useCurrentFrame,
|
|
119
|
+
useVideoConfig,
|
|
120
|
+
} from 'remotion';
|
|
121
|
+
|
|
122
|
+
export const Hero = () => {
|
|
123
|
+
const frame = useCurrentFrame();
|
|
124
|
+
const {fps} = useVideoConfig();
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<AbsoluteFill style={{justifyContent: 'center', alignItems: 'center'}}>
|
|
128
|
+
<Interactive.Div
|
|
129
|
+
name="Hero title"
|
|
130
|
+
style={{
|
|
131
|
+
opacity: interpolate(frame, [0, fps], [0, 1], {
|
|
132
|
+
extrapolateLeft: 'clamp',
|
|
133
|
+
extrapolateRight: 'clamp',
|
|
134
|
+
easing: Easing.bezier(0.16, 1, 0.3, 1),
|
|
135
|
+
}),
|
|
136
|
+
scale: interpolate(frame, [0, fps], [0.9, 1], {
|
|
137
|
+
extrapolateLeft: 'clamp',
|
|
138
|
+
extrapolateRight: 'clamp',
|
|
139
|
+
easing: Easing.spring({damping: 200}),
|
|
140
|
+
output: 'perceptual-scale',
|
|
141
|
+
}),
|
|
142
|
+
fontSize: 88,
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
Launch day
|
|
146
|
+
</Interactive.Div>
|
|
147
|
+
</AbsoluteFill>
|
|
148
|
+
);
|
|
149
|
+
};
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Prefer the individual `scale`, `translate`, and `rotate` CSS properties over a
|
|
153
|
+
composed `transform` string. Clamp both ends of finite animations unless
|
|
154
|
+
extrapolation is intentional.
|
|
155
|
+
|
|
156
|
+
## Studio-editable markup
|
|
157
|
+
|
|
158
|
+
Use `Interactive.*` for HTML and SVG elements that should be selectable,
|
|
159
|
+
draggable, resized, rotated, styled, or keyframed in Studio. `<Img>` is already
|
|
160
|
+
interactive.
|
|
161
|
+
|
|
162
|
+
- Give each interactive element a short, hard-coded, descriptive `name`.
|
|
163
|
+
- Keep one-off text directly inside the element.
|
|
164
|
+
- Keep style objects, `interpolate()` ranges, outputs, easing, and extrapolation
|
|
165
|
+
inline when Studio write-back matters.
|
|
166
|
+
- Destructure only supported values such as `fps`, `width`, `height`, and
|
|
167
|
+
`durationInFrames` from `useVideoConfig()`.
|
|
168
|
+
- Avoid extracted style constants, object spreading, computed effect arrays,
|
|
169
|
+
and arbitrary variables inside editable keyframe ranges.
|
|
170
|
+
|
|
171
|
+
For custom components, look up the current `make-component-interactive` API in
|
|
172
|
+
the official Remotion documentation before implementing it.
|
|
173
|
+
|
|
174
|
+
## Assets, media, and timing
|
|
175
|
+
|
|
176
|
+
Put local assets in `public/` and reference them with `staticFile()`:
|
|
177
|
+
|
|
178
|
+
```tsx
|
|
179
|
+
import {Audio, Video} from '@remotion/media';
|
|
180
|
+
import {AnimatedImage, CanvasImage, staticFile} from 'remotion';
|
|
181
|
+
|
|
182
|
+
export const MediaLayer = () => (
|
|
183
|
+
<>
|
|
184
|
+
<Video src={staticFile('clip.mp4')} />
|
|
185
|
+
<Audio src={staticFile('music.mp3')} />
|
|
186
|
+
<CanvasImage src={staticFile('logo.png')} />
|
|
187
|
+
<AnimatedImage src={staticFile('sticker.gif')} />
|
|
188
|
+
</>
|
|
189
|
+
);
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Use `@remotion/gif` when the Chrome-backed animated-image path is unsuitable.
|
|
193
|
+
Install ecosystem packages with `npx remotion add <package>` so Remotion package
|
|
194
|
+
versions stay aligned.
|
|
195
|
+
|
|
196
|
+
Prefer local or content-addressed media for reproducible sandbox renders. Do
|
|
197
|
+
not bake cookies, bearer tokens, signed URLs, or map credentials into source or
|
|
198
|
+
composition props. For asynchronous assets, fonts, captions, and map tiles,
|
|
199
|
+
pair `delayRender()` / `continueRender()` with `cancelRender()` on failure so a
|
|
200
|
+
missing dependency fails explicitly instead of hanging until timeout.
|
|
201
|
+
|
|
202
|
+
Use `from`, `durationInFrames`, and `trimBefore` on supported components. Wrap
|
|
203
|
+
unsupported components in `<Sequence>`:
|
|
204
|
+
|
|
205
|
+
```tsx
|
|
206
|
+
<Sequence name="Product demo" from={2 * fps} durationInFrames={6 * fps}>
|
|
207
|
+
<Video src={staticFile('demo.mp4')} trimBefore={1 * fps} />
|
|
208
|
+
</Sequence>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Match media duration to the intended usable segment. Keep scene timing in one
|
|
212
|
+
plan so transitions neither overlap accidentally nor leave blank frames.
|
|
213
|
+
|
|
214
|
+
For effects, use the least complex technique that produces the shot:
|
|
215
|
+
|
|
216
|
+
1. HTML, SVG, and CSS.
|
|
217
|
+
2. A Remotion effect on the element or an `HtmlInCanvas` wrapper.
|
|
218
|
+
3. A custom effect or shader only when the first two cannot produce it.
|
|
219
|
+
|
|
220
|
+
Keep effect arrays stable. Render separate elements instead of conditionally
|
|
221
|
+
changing an effect array's shape.
|
|
222
|
+
|
|
223
|
+
## Captions and multimedia inspection
|
|
224
|
+
|
|
225
|
+
Normalize captions to Remotion's `Caption[]` shape and keep ingestion timestamps
|
|
226
|
+
in milliseconds:
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
import type {Caption} from '@remotion/captions';
|
|
230
|
+
|
|
231
|
+
const caption: Caption = {
|
|
232
|
+
text: 'Hello',
|
|
233
|
+
startMs: 0,
|
|
234
|
+
endMs: 800,
|
|
235
|
+
timestampMs: null,
|
|
236
|
+
confidence: null,
|
|
237
|
+
};
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Convert milliseconds to frames only at the composition boundary using the
|
|
241
|
+
composition fps. Preserve word timing when available, group captions into
|
|
242
|
+
readable pages, animate from the frame clock, and verify wrapping and safe areas
|
|
243
|
+
at the actual output dimensions.
|
|
244
|
+
|
|
245
|
+
Use the current `@remotion/captions` parser for SRT rather than writing a
|
|
246
|
+
timestamp parser. Before implementing captions, confirm the current APIs for
|
|
247
|
+
`parse-srt`, `createTikTokStyleCaptions`, and the chosen transcription provider.
|
|
248
|
+
|
|
249
|
+
For audio visualization, use `@remotion/media-utils` with frame-windowed audio
|
|
250
|
+
data; never drive bars or waveforms from a realtime analyser. For charts and
|
|
251
|
+
text animation, compute the final geometry first and reveal it with frame-based
|
|
252
|
+
clipping, opacity, or transforms so bars, labels, and glyph layout stay stable.
|
|
253
|
+
|
|
254
|
+
Use Mediabunny for browser-side duration, dimensions, trimming, cropping,
|
|
255
|
+
metadata, and container handling. Read <https://mediabunny.dev/llms.txt> before
|
|
256
|
+
using unfamiliar APIs. Keep `mediabunny` and `@mediabunny/*` versions compatible
|
|
257
|
+
with the project's Remotion version.
|
|
258
|
+
|
|
259
|
+
## Maps
|
|
260
|
+
|
|
261
|
+
Choose one technique for the shot:
|
|
262
|
+
|
|
263
|
+
| Technique | Use when |
|
|
264
|
+
| --- | --- |
|
|
265
|
+
| Prepared raster | Deterministic static/satellite imagery with animated overlays is enough. |
|
|
266
|
+
| Mapbox | Polished styles, globe rendering, or 3D buildings are required. |
|
|
267
|
+
| MapLibre | An open-source vector runtime without a Mapbox API key is preferred. |
|
|
268
|
+
| MapTiler | Hosted styles or geographic annotations fit the project. |
|
|
269
|
+
| CesiumJS | Terrain, globe-scale 3D, or flight-camera motion is required. |
|
|
270
|
+
|
|
271
|
+
Never commit map credentials. Confirm licensing and attribution for imagery,
|
|
272
|
+
tiles, and styles. Before frame capture, wait for tiles, imagery, fonts, and
|
|
273
|
+
camera initialization. Drive camera movement from the Remotion frame clock,
|
|
274
|
+
keep geographic inputs local or content-addressed when repeatability matters,
|
|
275
|
+
and verify headless Chromium/WebGL in the actual render environment.
|
|
276
|
+
|
|
277
|
+
## Studio, render, and verification
|
|
278
|
+
|
|
279
|
+
Start Studio without opening an external browser:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
npx remotion studio --no-open
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Use the printed URL. Open a composition directly at `/<composition-id>`, for
|
|
286
|
+
example `http://localhost:3000/LaunchVideo`.
|
|
287
|
+
|
|
288
|
+
Useful Studio flags:
|
|
289
|
+
|
|
290
|
+
| Argument | Purpose |
|
|
291
|
+
| --- | --- |
|
|
292
|
+
| `--log=<level>` | Set `error`, `warn`, `info`, or `verbose`. |
|
|
293
|
+
| `--port=<number>` | Request a specific port. |
|
|
294
|
+
| `--force-new` | Start another instance for the same project and port. |
|
|
295
|
+
|
|
296
|
+
For a quick deterministic layout check, render one frame:
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
npx remotion still LaunchVideo out.png --scale=0.25 --frame=30
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
At 30 fps, frame 30 is one second. Skip this when an existing visual test
|
|
303
|
+
already provides sufficient evidence.
|
|
304
|
+
|
|
305
|
+
Before rendering, verify the CLI sees the intended composition:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
npx remotion versions
|
|
309
|
+
npx remotion compositions
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Let Remotion manage its compatible browser by default. A Prismer image may also
|
|
313
|
+
carry a Playwright browser, but its presence is not a compatibility guarantee:
|
|
314
|
+
the full Chrome binary can fail under sandbox crashpad policy, while a newer
|
|
315
|
+
Headless Shell can pass a still render yet fail a multi-frame render. Pass
|
|
316
|
+
`--browser-executable` only for an image-owned, version-paired executable that
|
|
317
|
+
has passed an adjacent-frame render test. Never search the whole filesystem for
|
|
318
|
+
a browser or treat a successful launch as compatibility evidence.
|
|
319
|
+
|
|
320
|
+
Render only when the user asks for a media file:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
npx remotion render LaunchVideo out.mp4 --codec=h264
|
|
324
|
+
npx remotion still LaunchVideo out.png --frame=0
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
The Prismer sandbox provides Node and FFmpeg, and Remotion manages a compatible
|
|
328
|
+
browser in the project cache. Prefer H.264 video plus AAC audio in MP4 for broad
|
|
329
|
+
playback unless transparency or lossless output is required. Keep the writable
|
|
330
|
+
npm-cache override scoped to each command:
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
npm_config_cache=/tmp/npm-cache npx remotion render LaunchVideo out.mp4 --codec=h264
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
For CJK content, explicitly load and await a pinned font; do not rely only on a
|
|
337
|
+
system fallback family being present. Inspect adjacent encoded frames as well as
|
|
338
|
+
isolated stills: a headless renderer may produce a correct still while a
|
|
339
|
+
fallback font run flickers or loses glyphs during a full render.
|
|
340
|
+
|
|
341
|
+
Treat media inspection as the delivery oracle:
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
ffprobe -v error \
|
|
345
|
+
-show_entries format=duration:stream=codec_name,width,height \
|
|
346
|
+
-of compact out.mp4
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
Confirm duration, dimensions, codecs, and the expected audio stream. Inspect
|
|
350
|
+
representative frames, including several adjacent frames in animated or
|
|
351
|
+
text-heavy sections, or play the result when possible. A successful render
|
|
352
|
+
command alone is not delivery evidence. If isolated stills are correct but the
|
|
353
|
+
encoded render has partial or flickering frames, use the programmatic
|
|
354
|
+
`renderStill()` API with one bundled serve URL and one browser instance to emit
|
|
355
|
+
the verified frame sequence, then assemble it with the sandbox FFmpeg. Do not
|
|
356
|
+
loop the CLI and rebundle once per frame; report the fallback and probe the
|
|
357
|
+
assembled file again.
|
|
358
|
+
|
|
359
|
+
## Players, editors, and rendering services
|
|
360
|
+
|
|
361
|
+
Use Remotion's `<Player>` for an interactive React preview. Keep the composition
|
|
362
|
+
usable by both Player and render paths; do not fork visual logic.
|
|
363
|
+
|
|
364
|
+
Choose rendering architecture by workload:
|
|
365
|
+
|
|
366
|
+
- Browser/client rendering for bounded, user-local work.
|
|
367
|
+
- A Node worker and queue for a controlled server.
|
|
368
|
+
- Remotion Lambda for AWS-native elastic rendering.
|
|
369
|
+
- The current official Vercel or Cloudflare integration when it matches the
|
|
370
|
+
hosting platform and installed Remotion version.
|
|
371
|
+
|
|
372
|
+
Non-trivial rendering should be asynchronous: return a job ID, expose progress
|
|
373
|
+
and failure, store output durably, and make retries idempotent.
|
|
374
|
+
|
|
375
|
+
For editors, model composition props and timeline state explicitly. Keep render
|
|
376
|
+
inputs serializable and versioned, validate untrusted props, bound remote asset
|
|
377
|
+
access, and separate preview state from durable project state.
|
|
378
|
+
|
|
379
|
+
Remotion's rendering surface is React. For Vue, Angular, or Svelte hosts, use
|
|
380
|
+
the current official integration and keep the React composition boundary
|
|
381
|
+
explicit rather than relying on a memorized starter.
|
|
382
|
+
|
|
383
|
+
## Current documentation and upgrades
|
|
384
|
+
|
|
385
|
+
Prefer current official documentation over memorized APIs. Append `.md` to a
|
|
386
|
+
Remotion docs URL to fetch Markdown, for example:
|
|
387
|
+
|
|
388
|
+
```text
|
|
389
|
+
https://www.remotion.dev/docs/sequence.md
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
The Remotion docs search can also be queried through its Algolia index:
|
|
393
|
+
|
|
394
|
+
```http
|
|
395
|
+
POST https://plsduol1ca-dsn.algolia.net/1/indexes/*/queries?x-algolia-api-key=3e42dbd4f895fe93ff5cf40d860c4a85&x-algolia-application-id=PLSDUOL1CA
|
|
396
|
+
Content-Type: application/json
|
|
397
|
+
|
|
398
|
+
{
|
|
399
|
+
"requests": [{
|
|
400
|
+
"query": "<concept or API>",
|
|
401
|
+
"indexName": "remotion",
|
|
402
|
+
"params": "attributesToRetrieve=[\"hierarchy.lvl0\",\"hierarchy.lvl1\",\"hierarchy.lvl2\",\"url\"]&hitsPerPage=10"
|
|
403
|
+
}]
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
For upgrades:
|
|
408
|
+
|
|
409
|
+
1. Inspect every manifest and the lockfile; preserve unrelated changes.
|
|
410
|
+
2. Run `npx remotion upgrade` when the local CLI supports it.
|
|
411
|
+
3. Otherwise, update every `remotion` and `@remotion/*` package to the same
|
|
412
|
+
exact stable version.
|
|
413
|
+
4. Check <https://www.remotion.dev/docs/mediabunny/version> and align all
|
|
414
|
+
Mediabunny packages.
|
|
415
|
+
5. Update the lockfile with the project's package manager.
|
|
416
|
+
6. Run `npx remotion versions`, typecheck/tests, Studio preview, and a
|
|
417
|
+
representative still or short render when rendering behavior changed.
|
|
418
|
+
7. Review <https://github.com/remotion-dev/remotion/releases> for relevant
|
|
419
|
+
breaking changes.
|
|
420
|
+
|
|
421
|
+
Do not modify Prismer's bundled Remotion skill while upgrading an application;
|
|
422
|
+
the skill is delivered by Runtime catalog/OTA and is not owned by that project.
|
|
423
|
+
|
|
424
|
+
## Completion checklist
|
|
425
|
+
|
|
426
|
+
- Existing project structure, package manager, versions, and user diff inspected.
|
|
427
|
+
- Animation is frame-driven and finite interpolation is clamped intentionally.
|
|
428
|
+
- Assets use `public/` plus `staticFile()` and ecosystem package versions align.
|
|
429
|
+
- Studio preview or existing visual evidence covers interaction and timing.
|
|
430
|
+
- Requested renders pass `ffprobe` and representative visual inspection.
|
|
431
|
+
- Final media is attached through the workspace asset flow when running in Prismer.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: role-builder
|
|
3
|
+
scope: common
|
|
4
|
+
category: authoring
|
|
5
|
+
description: Create or update a Prismer SS-02 role template from a persona, SOP, job description, or operating brief; instantiate an existing role as a new working agent and run its first task through the bundled one-command harness. Use for "create a role template", "make this role into an agent", "create an agent from this role", or "let this role handle a task". Route standardized instantiate-and-run requests to the script instead of discovering and composing low-level CLI commands.
|
|
6
|
+
license: MIT
|
|
7
|
+
compatibility:
|
|
8
|
+
- prismer-sdk
|
|
9
|
+
- hermes
|
|
10
|
+
- claude-code
|
|
11
|
+
- codex
|
|
12
|
+
- openclaw
|
|
13
|
+
metadata:
|
|
14
|
+
category: authoring
|
|
15
|
+
allowed-tools:
|
|
16
|
+
- Read
|
|
17
|
+
- Write
|
|
18
|
+
- Bash
|
|
19
|
+
- WebFetch
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Role Builder
|
|
23
|
+
|
|
24
|
+
Choose exactly one path from the requested outcome. Do not inspect `cloud
|
|
25
|
+
--help`, create probe assets, or compose low-level commands first.
|
|
26
|
+
|
|
27
|
+
## A. Existing role → new working agent → first task
|
|
28
|
+
|
|
29
|
+
Run the bundled harness directly:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
node scripts/instantiate-and-run.mjs --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Required environment:
|
|
36
|
+
|
|
37
|
+
- `PRISMER_API_KEY`
|
|
38
|
+
- `PRISMER_CLOUD_BASE`
|
|
39
|
+
- `PRISMER_ROLE_SLUG`
|
|
40
|
+
- `PRISMER_WORKSPACE_ID`
|
|
41
|
+
- `PRISMER_TASK`
|
|
42
|
+
|
|
43
|
+
Optional environment:
|
|
44
|
+
|
|
45
|
+
- `PRISMER_AGENT_HANDLE`, `PRISMER_AGENT_DISPLAY_NAME`,
|
|
46
|
+
`PRISMER_AGENT_ADAPTER`, `PRISMER_TARGET_DAEMON_ID`
|
|
47
|
+
- `PRISMER_REQUEST_ID`, `PRISMER_OPERATION_LEDGER`
|
|
48
|
+
- `PRISMER_WORKFLOW_TIMEOUT_MS`, `PRISMER_WORKFLOW_POLL_MS`
|
|
49
|
+
- `PRISMER_ALLOW_REMOTE_WRITE=1` for an explicitly confirmed non-local target
|
|
50
|
+
|
|
51
|
+
The runtime must inject these variables before the turn. Never ask the user to
|
|
52
|
+
paste a credential into chat and never pass one as a command-line flag.
|
|
53
|
+
|
|
54
|
+
The harness validates locally, performs server preflight, creates/resumes the
|
|
55
|
+
role-backed agent, waits for its exact daemon binding, creates one idempotent
|
|
56
|
+
task, and waits for the canonical result. `--no-wait` skips only the final task
|
|
57
|
+
result wait. `--preflight-only` performs no mutation.
|
|
58
|
+
|
|
59
|
+
If it returns `ROLE_CONFIG_REQUIRED`, report the missing level, target, and key
|
|
60
|
+
names exactly. Do not guess values:
|
|
61
|
+
|
|
62
|
+
- `level=skill` or `level=role`, user-owned key: the owner supplies it through
|
|
63
|
+
Studio or `POST /api/im/user-skill-config`; values are sealed and never enter
|
|
64
|
+
the model prompt.
|
|
65
|
+
- role default: edit the role's `parameters[]` declaration/default.
|
|
66
|
+
- global-only Skill key: inject it into the daemon/deployment environment.
|
|
67
|
+
- workspace/runtime issue: repair the named workspace or daemon; do not create
|
|
68
|
+
a different workspace as a workaround.
|
|
69
|
+
|
|
70
|
+
## B. Material → role template
|
|
71
|
+
|
|
72
|
+
Create a directory with exactly the role definition and persona:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
<role-slug>/
|
|
76
|
+
├── role.json
|
|
77
|
+
└── SOUL.md
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`role.json` is the SS-02 governance manifest. `SOUL.md` is persona only; do
|
|
81
|
+
not put credentials, per-run instructions, or an `AGENTS.md` in the role bundle.
|
|
82
|
+
|
|
83
|
+
Minimum useful `role.json`:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"slug": "legal-expert",
|
|
88
|
+
"version": "1.0.0",
|
|
89
|
+
"name": { "en": "Legal Expert", "zh": "法学专家" },
|
|
90
|
+
"description": { "en": "Analyzes legal matters.", "zh": "分析法律事项。" },
|
|
91
|
+
"agentType": "specialist",
|
|
92
|
+
"requiredSkills": [{ "skillSlug": "legal-article-retrieval", "required": true }],
|
|
93
|
+
"taskAuthority": "executor",
|
|
94
|
+
"approvalPolicy": "auto-low-risk",
|
|
95
|
+
"parameters": [],
|
|
96
|
+
"adapters": { "hermes": {} },
|
|
97
|
+
"source": "community",
|
|
98
|
+
"curatedQuality": "review"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Use catalog slugs returned by the Skill create/import result. Never derive a
|
|
103
|
+
slug from a directory name, case-normalize it after creation, or invent one.
|
|
104
|
+
Build missing skills with `skill-creator` first.
|
|
105
|
+
|
|
106
|
+
Declare only role-specific business skills in `requiredSkills`. The active
|
|
107
|
+
Admin Built-in Skill baseline is injected automatically at template creation
|
|
108
|
+
and re-resolved when an Agent is instantiated. Do not copy system skills into
|
|
109
|
+
the role manifest and do not attempt to remove an injected skill. Readback
|
|
110
|
+
separates `requiredSkills`, `injectedSkills`, and `effectiveSkills`, plus the
|
|
111
|
+
`baselinePolicyVersion` used for the snapshot.
|
|
112
|
+
|
|
113
|
+
Put the bundle path in `PRISMER_ROLE_BUNDLE`, then run the fixed authoring
|
|
114
|
+
closure as one command:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
node scripts/author-role.mjs --json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Optional environment: `PRISMER_ROLE_PUBLISH=1` for an explicitly requested
|
|
121
|
+
Marketplace publish, `PRISMER_ROLE_AUTHORING_LEDGER`, `PRISMER_CLOUD_BIN`,
|
|
122
|
+
`PRISMER_CLOUD_BASE`, and `PRISMER_ALLOW_REMOTE_WRITE=1` for a confirmed
|
|
123
|
+
non-local target. The harness performs local validation, read-only required
|
|
124
|
+
Skill preflight, private create/owner-update, and owner readback. It resumes a
|
|
125
|
+
completed same-revision ledger without pushing another role version. Report the
|
|
126
|
+
returned slug/version; do not use `role apply` as a test.
|
|
127
|
+
|
|
128
|
+
The clean lower-level primitives remain available for diagnosis:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
cloud role validate ./<role-slug> --json
|
|
132
|
+
cloud role test ./<role-slug> --json
|
|
133
|
+
cloud role create ./<role-slug> --mine --json
|
|
134
|
+
cloud role show <returned-slug-or-id> --json
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
For a zero-dependency ingest client after the files are authored and validated:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
node scripts/ingest-role.mjs ./<role-slug> --mine
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
It reads `PRISMER_API_KEY` and `PRISMER_CLOUD_BASE` from the already-injected
|
|
144
|
+
environment. Do not write literal secrets in the command, bundle, or ledger.
|
|
145
|
+
|
|
146
|
+
## C. Change an existing agent's role
|
|
147
|
+
|
|
148
|
+
Only when the user explicitly identifies an existing target:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
cloud role apply <role-slug> --agent <imUserId> --workspace-id <workspaceId>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Never apply a role to the currently executing agent as a probe. Template
|
|
155
|
+
creation is complete after validation, dependency test, ingest, and readback;
|
|
156
|
+
it does not require mutating a live agent.
|
|
157
|
+
|
|
158
|
+
## Configuration ownership
|
|
159
|
+
|
|
160
|
+
Declare each value once at the level that owns it:
|
|
161
|
+
|
|
162
|
+
| Need | Owner/declaration | Delivery |
|
|
163
|
+
| --------------------------------- | ------------------------------------------------- | -------------------------------- |
|
|
164
|
+
| reusable Skill config | Skill frontmatter `config:` | Skill subprocess env |
|
|
165
|
+
| role behavior/default | role `parameters[]`, `kind:"default"` | structured `roleParams` |
|
|
166
|
+
| per-account role secret | role `parameters[]`, `kind:"user", type:"secret"` | environment-only `roleParamsEnv` |
|
|
167
|
+
| role default for a required Skill | role `skillConfig[skillSlug]` | resolved Skill env |
|
|
168
|
+
| workspace identity/policy | workspace fields and policy APIs | server/runtime bootstrap |
|
|
169
|
+
| workspace runtime secret | daemon/deployment env | child process env only |
|
|
170
|
+
| invocation target/recovery | `PRISMER_WORKSPACE_ID`, daemon/request/ledger env | harness request only |
|
|
171
|
+
|
|
172
|
+
Do not duplicate values across Skill prose, role persona, workspace metadata,
|
|
173
|
+
and workflow flags. Workspace metadata is not a secret store.
|
|
174
|
+
|
|
175
|
+
## Harness negative-control contract
|
|
176
|
+
|
|
177
|
+
The bundled mutation harness must keep these guarantees:
|
|
178
|
+
|
|
179
|
+
1. Secret-bearing flags, missing/invalid local input, and unconfirmed remote
|
|
180
|
+
writes fail locally before any fetch.
|
|
181
|
+
2. Server preflight rejects inaccessible/non-deployable roles, missing config,
|
|
182
|
+
handle collisions, and absent runtime before creating an operation or agent.
|
|
183
|
+
3. Instance and task writes carry durable idempotency keys. Instance retries
|
|
184
|
+
return the same operation and reject changed instance input with 409; task
|
|
185
|
+
retries return the first committed task and reject changed task input with 409. Derived task keys are fixed-length hashes, so a 191-character instance
|
|
186
|
+
request ID cannot overflow the task contract. A new invocation gets a fresh
|
|
187
|
+
request ID; set `PRISMER_REQUEST_ID` only to resume that same invocation.
|
|
188
|
+
4. A secret-free ledger is written atomically before mutation. Output contains
|
|
189
|
+
stage, code, retryability, and recovery path—never credentials. Reusing the
|
|
190
|
+
ledger path with a different invocation hash is rejected before fetch.
|
|
191
|
+
5. Provisioning failure compensates the newly created agent. Incomplete cleanup
|
|
192
|
+
remains `cleanupStatus=pending` with the Agent pointer retained and retryable;
|
|
193
|
+
it must never be reported as cleaned. Task failure keeps a valid agent for
|
|
194
|
+
diagnosis/retry.
|
|
195
|
+
6. `ready` means the Agent is bound to the exact requested daemon. A
|
|
196
|
+
`wrong_daemon` binding fails explicitly and cannot advance to task creation.
|
|
197
|
+
|
|
198
|
+
## Sources of truth
|
|
199
|
+
|
|
200
|
+
- Role standard: `public/docs/Standardization/02-role-template-standard.md`
|
|
201
|
+
- Harness standard: `public/docs/Standardization/16-automation-harness-standard.md`
|
|
202
|
+
- Complete catalog example: `sdk/cloud/catalog/roles/team-manager.json`
|
|
203
|
+
- Skill authoring/import: `sdk/cloud/catalog/skills/skill-creator/SKILL.md`
|