@warpgogol/forge 0.13.0 → 0.15.0
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/AGENTS.md +4 -3
- package/README.md +58 -5
- package/dist/bin/cli.js +0 -0
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +10 -0
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/rfc/handlers/shared.d.ts.map +1 -1
- package/dist/os/rfc/handlers/shared.js +12 -6
- package/dist/os/rfc/handlers/shared.js.map +1 -1
- package/dist/os/rfc/index.d.ts +1 -1
- package/dist/os/rfc/index.d.ts.map +1 -1
- package/dist/os/rfc/index.js +1 -1
- package/dist/os/rfc/index.js.map +1 -1
- package/dist/os/rfc/types.d.ts +2 -1
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +2 -1
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/spec/spec-materialize.d.ts.map +1 -1
- package/dist/os/spec/spec-materialize.js +4 -10
- package/dist/os/spec/spec-materialize.js.map +1 -1
- package/dist/src/onboarding/create.d.ts.map +1 -1
- package/dist/src/onboarding/create.js +5 -2
- package/dist/src/onboarding/create.js.map +1 -1
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +38 -0
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/invariant-engine.d.ts.map +1 -1
- package/dist/src/onboarding/invariant-engine.js +52 -1
- package/dist/src/onboarding/invariant-engine.js.map +1 -1
- package/dist/src/onboarding/scaffold-project.d.ts.map +1 -1
- package/dist/src/onboarding/scaffold-project.js +25 -5
- package/dist/src/onboarding/scaffold-project.js.map +1 -1
- package/dist/src/profiles/profile-schema.d.ts +77 -1
- package/dist/src/profiles/profile-schema.d.ts.map +1 -1
- package/dist/src/profiles/profile-schema.js +39 -2
- package/dist/src/profiles/profile-schema.js.map +1 -1
- package/dist/src/profiles/stack-profile.d.ts +27 -0
- package/dist/src/profiles/stack-profile.d.ts.map +1 -1
- package/dist/src/profiles/stack-profile.js +4 -0
- package/dist/src/profiles/stack-profile.js.map +1 -1
- package/package.json +162 -60
- package/profiles/editframe-templates/composition-agents.md +70 -0
- package/profiles/editframe-templates/composition.tsx +33 -0
- package/profiles/editframe-templates/html-composition-agents.md +62 -0
- package/profiles/{editframe-html.yaml → editframe.yaml} +203 -38
- package/skills/fo/ef-brand-video-generator/SKILL.md +101 -0
- package/skills/fo/ef-composition/SKILL.md +147 -0
- package/skills/fo/ef-composition-review/SKILL.md +66 -0
- package/skills/fo/ef-dev-server/SKILL.md +107 -0
- package/skills/fo/ef-editor-gui/SKILL.md +131 -0
- package/skills/fo/ef-motion-design/SKILL.md +118 -0
- package/skills/fo/ef-onboard/SKILL.md +77 -0
- package/skills/fo/ef-render-verify/SKILL.md +56 -0
- package/skills/fo/ef-webhooks/SKILL.md +95 -0
- package/skills/fo/fo-session-retro/SKILL.md +2 -2
- package/profiles/editframe-html-templates/composition-agents.md +0 -34
- package/profiles/editframe-html-templates/composition.html +0 -32
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ef-composition
|
|
3
|
+
description: "Guide creating a video composition with Editframe React components — time model, media elements, rendering. Use when the operator asks to create or build a video composition."
|
|
4
|
+
invocation: user
|
|
5
|
+
category: fo
|
|
6
|
+
concerns: content-mutation
|
|
7
|
+
dependsOn: []
|
|
8
|
+
languagePolicy: ref(PREFERENCES.md)
|
|
9
|
+
triggers:
|
|
10
|
+
- "create a video composition"
|
|
11
|
+
- "build a video with editframe"
|
|
12
|
+
- "create a composition"
|
|
13
|
+
- "add a scene to my video"
|
|
14
|
+
source: https://editframe.com/skills/composition.md
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<!-- skill-lint-disable SKILL-17 -->
|
|
18
|
+
|
|
19
|
+
Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
|
|
20
|
+
|
|
21
|
+
# Video Composition
|
|
22
|
+
|
|
23
|
+
Build video scenes with React components from `@editframe/react`, for example `<Timegroup>` and `<Video>`. Both HTML web component syntax (`<ef-timegroup>`) and React syntax (`<Timegroup>`) share the same composition model and rendering pipeline.
|
|
24
|
+
|
|
25
|
+
Web component attributes use kebab-case (`file-id`, `api-host`). React props use camelCase (`fileId`, `apiHost`). Four attributes break this pattern: `sourcein`, `sourceout`, `trimstart`, `trimend` — same lowercase string in both forms.
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import { TimelineRoot, Timegroup, Video, Text, Audio, Captions } from "@editframe/react";
|
|
31
|
+
|
|
32
|
+
export default function Composition() {
|
|
33
|
+
return (
|
|
34
|
+
<TimelineRoot>
|
|
35
|
+
<Timegroup duration="10s">
|
|
36
|
+
<Video src="assets/background.mp4" fit="contain" duration="10s" />
|
|
37
|
+
<Text text="Hello, Editframe!" x="50%" y="50%" fontSize="48px" color="white" duration="5s" />
|
|
38
|
+
<Audio src="assets/narration.mp3" />
|
|
39
|
+
<Captions src="assets/captions.vtt" />
|
|
40
|
+
</Timegroup>
|
|
41
|
+
</TimelineRoot>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Run `ref(forge.yaml bindings.commands.devServer)` to preview. Run `ref(forge.yaml bindings.commands.build)` to render.
|
|
47
|
+
|
|
48
|
+
## Duration units
|
|
49
|
+
|
|
50
|
+
- `5s` — seconds
|
|
51
|
+
- `500ms` — milliseconds
|
|
52
|
+
- `2.5s` — fractional seconds
|
|
53
|
+
|
|
54
|
+
## Core concepts
|
|
55
|
+
|
|
56
|
+
### Time model
|
|
57
|
+
|
|
58
|
+
A composition is a tree of `Timegroup` elements. The root `Timegroup` defines the composition's total duration. Child elements inherit timing context from their parent.
|
|
59
|
+
|
|
60
|
+
### Timegroups and sequencing
|
|
61
|
+
|
|
62
|
+
- **`mode="sequence"`** — children play one after another
|
|
63
|
+
- **`mode="fixed"`** — children play at absolute offsets
|
|
64
|
+
- **`mode="contain"`** (default) — children fit within parent duration
|
|
65
|
+
- **`mode="fit"`** — children scale to fit
|
|
66
|
+
|
|
67
|
+
### Transitions
|
|
68
|
+
|
|
69
|
+
Use `ef-transition` or the `transition` prop to declare CSS-like transitions between scenes.
|
|
70
|
+
|
|
71
|
+
### Scripting
|
|
72
|
+
|
|
73
|
+
Compositions support inline scripting via `ef-script` or the `script` prop for dynamic behavior during rendering.
|
|
74
|
+
|
|
75
|
+
## Media elements
|
|
76
|
+
|
|
77
|
+
- **`Video`** (`ef-video`) — video source with `fit` mode (`contain`, `cover`, `fill`)
|
|
78
|
+
- **`Audio`** (`ef-audio`) — audio source with FFT analysis (`fftSize`, `fftGain`, `fftDecay`)
|
|
79
|
+
- **`Image`** (`ef-image`) — image source
|
|
80
|
+
- **`Text`** (`ef-text`) — text overlay with positioning. Splits text into `ef-text-segment` children (`split="word"`, `split="char"`, `split="line"`). Set `stagger` to delay each segment's start. Segments render in light DOM with `data-active` attribute and `--ef-index`, `--ef-word-index`, `--ef-stagger-offset`, `--ef-seed` custom properties.
|
|
81
|
+
- **`Captions`** (`ef-captions`) — synchronized captions with word-level highlighting. Accepts caption data via `captionsSrc` (URL to JSON), `captionsScript` (inline script id), or `captionsData` (JS property). JSON uses `segments` or `word_segments` shape with `start`/`end` times.
|
|
82
|
+
- **`Waveform`** (`ef-waveform`) — visualizes an `ef-audio` or `ef-video` `target`. Modes: `bars`, `line`, `curve`, `bricks`, `pixel`, `wave`, `spikes`, `roundBars`.
|
|
83
|
+
- **`Surface`** (`ef-surface`) — mirrors another element's pixels onto its own canvas. Set `target` to a canvas or any `HTMLElement` to reuse a video's decoded frames without re-decoding.
|
|
84
|
+
- **`PanZoom`** (`ef-pan-zoom`) — pan and zoom control for video/image elements.
|
|
85
|
+
- **`MotionBlur`** (`ef-motionblur`) — motion blur effect.
|
|
86
|
+
- **`Configuration`** (`ef-configuration`) — opt-in element for API authentication. Add when deploying against the Editframe API: `apiHost` and `signingUrl` for signed-URL auth on cross-origin media, `imageProxy` for cross-origin image proxying. Skip for compositions using only local files.
|
|
87
|
+
|
|
88
|
+
## Rendering
|
|
89
|
+
|
|
90
|
+
**Browser export.** Call `renderTimegroupToVideo(timegroup, options)` from `@editframe/elements` to encode a live `ef-timegroup` to a video file. Uses WebCodecs. Key options: `width`/`height`/`fps`, `from`/`to` (export range in seconds), `videoCodec`/`audioCodec`/`videoBitrate`/`audioBitrate`, `target` (mediabunny output target), `signal` (AbortSignal), `onProgress`.
|
|
91
|
+
|
|
92
|
+
For in-app export from an interactive preview, use `ef-workbench`'s `exportVideo()` method (see the `ef-editor-gui` skill). For CLI/cloud rendering (`editframe render`), the `window.EF_RENDER` path handles offscreen cloning automatically.
|
|
93
|
+
|
|
94
|
+
**Custom render data.** A CLI or Playwright host can inject arbitrary JSON into `window.EF_RENDER_DATA` before running the composition. Read it with `getRenderData<T>()` (module-level function) or `useRenderData<T>()` (React hook). Use this to parameterize a render without templating the composition.
|
|
95
|
+
|
|
96
|
+
Run `ref(forge.yaml bindings.commands.build)` to produce the final video output. Use `ref(forge.yaml bindings.commands.validate)` to check composition structure before rendering.
|
|
97
|
+
|
|
98
|
+
## React
|
|
99
|
+
|
|
100
|
+
Import components from `@editframe/react`. React props use camelCase. The composition is a standard React component that returns JSX.
|
|
101
|
+
|
|
102
|
+
### React Three Fiber
|
|
103
|
+
|
|
104
|
+
Wrap a `<Timegroup>` child in `<CompositionCanvas>` from `@editframe/react/r3f` to get an R3F `<Canvas>` synced to composition time. Read the clock with `useCompositionTime()` which returns `{ time, duration }` in seconds.
|
|
105
|
+
|
|
106
|
+
```tsx
|
|
107
|
+
<Timegroup mode="fixed" duration="14s">
|
|
108
|
+
<CompositionCanvas shadows>
|
|
109
|
+
<MyScene />
|
|
110
|
+
</CompositionCanvas>
|
|
111
|
+
</Timegroup>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
For 3D in a Web Worker, use `OffscreenCompositionCanvas` with `@react-three/offscreen`.
|
|
115
|
+
|
|
116
|
+
### Server-side rendering
|
|
117
|
+
|
|
118
|
+
`@editframe/react/server` and `@editframe/elements/server` export composition components and types only — no custom-element registration, no DOM, canvas, or WebCodecs code. Import safely in Next.js or Remix server code. These server entry points do not include GUI components or hooks — render those on the client with `dynamic(() => import("@editframe/react"), { ssr: false })`.
|
|
119
|
+
|
|
120
|
+
### Package entry points
|
|
121
|
+
|
|
122
|
+
| Import | Environment | Contains |
|
|
123
|
+
| --- | --- | --- |
|
|
124
|
+
| `@editframe/elements` | Browser | All custom elements, canvas/WebCodecs rendering |
|
|
125
|
+
| `@editframe/elements/server` | Browser, Node, SSR | Types only, plus `getRenderInfo()` (browser-only at runtime) |
|
|
126
|
+
| `@editframe/elements/gui` | Browser | Editor GUI custom elements (timeline, scrubber, handles) |
|
|
127
|
+
| `@editframe/elements/styles.css` | Browser | Base + theme styles |
|
|
128
|
+
| `@editframe/react` | Browser | React composition + GUI components, hooks |
|
|
129
|
+
| `@editframe/react/server` | Browser, Node, SSR | Composition components only, no hooks/GUI |
|
|
130
|
+
| `@editframe/react/r3f` | Browser | `CompositionCanvas`, `OffscreenCompositionCanvas`, `useCompositionTime` |
|
|
131
|
+
|
|
132
|
+
## Element reference
|
|
133
|
+
|
|
134
|
+
| Element | React component | Key props |
|
|
135
|
+
| --- | --- | --- |
|
|
136
|
+
| `ef-timegroup` | `Timegroup` | `duration`, `mode`, `fps`, `offset`, `loop` |
|
|
137
|
+
| `ef-video` | `Video` | `src`, `fit`, `duration`, `fileId`, `sourcein`, `sourceout`, `trimstart`, `trimend` |
|
|
138
|
+
| `ef-audio` | `Audio` | `src`, `duration`, `volume`, `mute`, `loop`, `fftSize`, `fftGain` |
|
|
139
|
+
| `ef-text` | `Text` | `text`, `x`, `y`, `fontSize`, `color`, `textAlign`, `duration`, `split`, `stagger` |
|
|
140
|
+
| `ef-captions` | `Captions` | `captionsSrc`, `captionsScript`, `target`, `wordStyle`, `duration` |
|
|
141
|
+
| `ef-image` | `Image` | `src`, `fit`, `duration`, `fileId` |
|
|
142
|
+
| `ef-waveform` | `Waveform` | `target`, `mode`, `color` |
|
|
143
|
+
| `ef-surface` | `Surface` | `target` |
|
|
144
|
+
| `ef-pan-zoom` | `PanZoom` | `target`, `pan`, `zoom` |
|
|
145
|
+
| `ef-configuration` | `Configuration` | `apiHost`, `signingUrl`, `imageProxy` |
|
|
146
|
+
| `ef-transition` | `Transition` | `type`, `duration` |
|
|
147
|
+
| `ef-script` | `Script` | `src`, `inline` |
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ef-composition-review
|
|
3
|
+
description: Review an Editframe React composition for time model correctness, accessibility, and best practices
|
|
4
|
+
invocation: user
|
|
5
|
+
category: fo
|
|
6
|
+
concerns: read-only
|
|
7
|
+
dependsOn: []
|
|
8
|
+
languagePolicy: ref(PREFERENCES.md)
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<!-- skill-lint-disable SKILL-17 -->
|
|
12
|
+
|
|
13
|
+
# ef-composition-review
|
|
14
|
+
|
|
15
|
+
Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
|
|
16
|
+
|
|
17
|
+
A read-only review of an Editframe React composition file. The skill checks time model correctness, accessibility, asset references, automated invariants, and manual best practices. It does **not** modify any file — it produces a structured report and stops.
|
|
18
|
+
|
|
19
|
+
## Scope
|
|
20
|
+
|
|
21
|
+
This skill reviews `.tsx` composition files that use `@editframe/react` components (`TimelineRoot`, `Timegroup`, `Video`, `Audio`, `Text`, `Captions`). It is designed for projects using the `editframe` stack profile.
|
|
22
|
+
|
|
23
|
+
## Process
|
|
24
|
+
|
|
25
|
+
### 1. Empty state check
|
|
26
|
+
|
|
27
|
+
Scan the `compositions/` directory for `.tsx` files. If no compositions are found, report "No compositions found — nothing to review" and stop. Do not report false positives on an empty project.
|
|
28
|
+
|
|
29
|
+
### 2. Time model review
|
|
30
|
+
|
|
31
|
+
For each composition file:
|
|
32
|
+
|
|
33
|
+
- Check that the root `Timegroup` declares a `duration` prop or uses `mode="contain"` / `mode="fit"`.
|
|
34
|
+
- Check that all `duration` and `offset` values are valid CSS time strings (e.g. `5s`, `300ms`, `2.5s`).
|
|
35
|
+
- Check that `mode` values are one of: `sequence`, `fixed`, `contain`, `fit`.
|
|
36
|
+
- Check that `fps` is a positive integer (e.g. `30`, `60`).
|
|
37
|
+
- Check that `loop` is only present on the root `Timegroup` — nested Timegroups should not loop.
|
|
38
|
+
|
|
39
|
+
### 3. Accessibility review
|
|
40
|
+
|
|
41
|
+
- Check that all `Audio` components with speech content have corresponding `Captions` components.
|
|
42
|
+
- Check that `Text` components have sufficient contrast between foreground and background colors (if declared via inline styles or CSS classes).
|
|
43
|
+
|
|
44
|
+
### 4. Asset reference review
|
|
45
|
+
|
|
46
|
+
- Check that all `src` props in `Video`, `Audio`, and `Image` components point to files that exist in the `assets/` directory.
|
|
47
|
+
- Check that asset filenames use kebab-case (lowercase letters, digits, hyphens only).
|
|
48
|
+
|
|
49
|
+
### 5. Invariant check
|
|
50
|
+
|
|
51
|
+
Run `forge doctor` to check all profile invariants automatically. For the `editframe` profile, this covers VIDEO-01 through VIDEO-09 (filename conventions, scene fit modes, captions, and time model invariants). Review the output and include any violations in the report.
|
|
52
|
+
|
|
53
|
+
### 6. Manual best practices
|
|
54
|
+
|
|
55
|
+
Review aspects not covered by automated invariants:
|
|
56
|
+
|
|
57
|
+
- Scene composition quality — are scenes well-structured with clear transitions?
|
|
58
|
+
- Narrative pacing — does the timing flow naturally?
|
|
59
|
+
- Visual hierarchy — are text elements readable and well-positioned?
|
|
60
|
+
- Asset reuse — are assets reused efficiently across scenes?
|
|
61
|
+
|
|
62
|
+
Do not duplicate checks that `forge doctor` already performs.
|
|
63
|
+
|
|
64
|
+
### 7. Report
|
|
65
|
+
|
|
66
|
+
Summarize findings organized by category (time model, accessibility, assets, invariants, best practices). For each finding, include the file path, line number (if applicable), severity (error / warning / info), and a specific recommendation.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ef-dev-server
|
|
3
|
+
description: "Set up and manage the Editframe dev server for live preview and local asset serving. Use when the operator asks to set up or configure the Editframe dev server."
|
|
4
|
+
invocation: user
|
|
5
|
+
category: fo
|
|
6
|
+
concerns: read-only
|
|
7
|
+
dependsOn: []
|
|
8
|
+
languagePolicy: ref(PREFERENCES.md)
|
|
9
|
+
triggers:
|
|
10
|
+
- "set up editframe dev server"
|
|
11
|
+
- "configure editframe preview"
|
|
12
|
+
- "local asset serving"
|
|
13
|
+
- "dev server not working"
|
|
14
|
+
source: https://editframe.com/skills/dev-server.md
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<!-- skill-lint-disable SKILL-17 -->
|
|
18
|
+
|
|
19
|
+
Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
|
|
20
|
+
|
|
21
|
+
# Dev Server
|
|
22
|
+
|
|
23
|
+
The Editframe dev server provides JIT video transcoding, local image and caption serving, and a local files API that mirrors the production files API. It integrates with Vite, Next.js, or any framework-agnostic setup.
|
|
24
|
+
|
|
25
|
+
## Vite setup
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
// vite.config.ts
|
|
29
|
+
import { defineConfig } from "vite";
|
|
30
|
+
import { vitePluginEditframe } from "@editframe/vite-plugin";
|
|
31
|
+
|
|
32
|
+
export default defineConfig({
|
|
33
|
+
plugins: [
|
|
34
|
+
vitePluginEditframe({
|
|
35
|
+
root: "./src",
|
|
36
|
+
cacheRoot: "./cache",
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The plugin mounts onto Vite's own dev server. Compositions make same-origin requests. No separate port and no CORS setup are necessary.
|
|
43
|
+
|
|
44
|
+
## Next.js setup
|
|
45
|
+
|
|
46
|
+
```javascript
|
|
47
|
+
// next.config.mjs
|
|
48
|
+
import { withEditframe } from "@editframe/nextjs-plugin";
|
|
49
|
+
|
|
50
|
+
export default withEditframe(
|
|
51
|
+
{ root: "./src", cacheRoot: "./cache" },
|
|
52
|
+
{
|
|
53
|
+
// your existing Next.js config
|
|
54
|
+
},
|
|
55
|
+
);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`withEditframe` starts a sidecar HTTP server next to `next dev`, on port 3099 by default. Override the port with a `port` option. It also adds `rewrites()` rules that proxy Editframe's requests to that sidecar, so compositions still make same-origin requests. Run `next dev` as usual. No other setup is necessary.
|
|
59
|
+
|
|
60
|
+
The sidecar does not start in production. Deploy against real media (cloud renders, uploaded files) instead.
|
|
61
|
+
|
|
62
|
+
## Framework-agnostic setup
|
|
63
|
+
|
|
64
|
+
For a toolchain with no Vite or Next.js integration, call `@editframe/dev-server` directly:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { createEditframeDevServer, createProdEfHandlers } from "@editframe/dev-server";
|
|
68
|
+
import {
|
|
69
|
+
generateTrack,
|
|
70
|
+
generateScrubTrack,
|
|
71
|
+
generateTrackFragmentIndex,
|
|
72
|
+
cacheImage,
|
|
73
|
+
findOrCreateCaptions,
|
|
74
|
+
md5FilePath,
|
|
75
|
+
} from "@editframe/assets";
|
|
76
|
+
import { Client, createURLToken } from "@editframe/api";
|
|
77
|
+
|
|
78
|
+
const server = createEditframeDevServer(
|
|
79
|
+
{ root: "./src", cacheRoot: "./cache" },
|
|
80
|
+
{ generateTrack, generateScrubTrack, generateTrackFragmentIndex, cacheImage, findOrCreateCaptions, md5FilePath },
|
|
81
|
+
createProdEfHandlers({
|
|
82
|
+
createURLToken,
|
|
83
|
+
getClient: () => new Client(process.env.EF_TOKEN),
|
|
84
|
+
}),
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
server.listen(3001, () => console.log("Editframe dev server running on http://localhost:3001"));
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## What it enables
|
|
91
|
+
|
|
92
|
+
- **JIT video transcoding** — reference a local video file directly (`<Video src="clip.mp4" />`). The dev server transcodes it into streamable segments on first request, then serves cached segments.
|
|
93
|
+
- **Local image and caption serving** — `<Image>` and caption generation work against local files.
|
|
94
|
+
- **A local files API** that mirrors the shape of the production files API.
|
|
95
|
+
- **URL signing** — `ef-configuration`'s default `signing-url` forwards to the real Editframe cloud API. Set `EF_TOKEN` before starting the dev server. Set `EF_HOST` to point at a non-default API host.
|
|
96
|
+
|
|
97
|
+
## Framework-agnostic middleware integration
|
|
98
|
+
|
|
99
|
+
If your toolchain already exposes a Connect-compatible middleware stack (Express, Connect, or a custom Vite integration), call `createEditframeRouter(...)` with the same three arguments instead. Mount the result with `.use()`. `createEditframeDevServer` wraps that same router in its own standalone `http.Server`, for toolchains with no middleware stack of their own.
|
|
100
|
+
|
|
101
|
+
## Visual regression testing (Vite only)
|
|
102
|
+
|
|
103
|
+
The Vite plugin supports visual regression testing. Configure snapshot directories and thresholds in the plugin options.
|
|
104
|
+
|
|
105
|
+
## Debug logging
|
|
106
|
+
|
|
107
|
+
Set `DEBUG=editframe:*` to enable verbose logging from the dev server and plugin.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ef-editor-gui
|
|
3
|
+
description: "Configure the Editframe editor GUI for visual composition editing — timeline, scrubber, canvas, preview controls. Use when the operator asks to set up or use the Editframe editor."
|
|
4
|
+
invocation: user
|
|
5
|
+
category: fo
|
|
6
|
+
concerns: read-only
|
|
7
|
+
dependsOn: []
|
|
8
|
+
languagePolicy: ref(PREFERENCES.md)
|
|
9
|
+
triggers:
|
|
10
|
+
- "open editframe editor"
|
|
11
|
+
- "set up editor gui"
|
|
12
|
+
- "add timeline controls"
|
|
13
|
+
- "visual editing"
|
|
14
|
+
source: https://editframe.com/skills/editor-gui.md
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<!-- skill-lint-disable SKILL-17 -->
|
|
18
|
+
|
|
19
|
+
Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
|
|
20
|
+
|
|
21
|
+
# Editor Toolkit
|
|
22
|
+
|
|
23
|
+
The Editframe editor toolkit provides visual composition editing controls: timeline, scrubber, canvas, preview, playback, and transformation.
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
```html
|
|
28
|
+
<ef-timegroup id="my-video">
|
|
29
|
+
<ef-video src="/video.mp4"></ef-video>
|
|
30
|
+
</ef-timegroup>
|
|
31
|
+
|
|
32
|
+
<ef-controls target="my-video">
|
|
33
|
+
<ef-toggle-play></ef-toggle-play>
|
|
34
|
+
<ef-scrubber></ef-scrubber>
|
|
35
|
+
<ef-time-display></ef-time-display>
|
|
36
|
+
</ef-controls>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Core concepts: target and bridge
|
|
40
|
+
|
|
41
|
+
Each playback control (`ef-play`, `ef-pause`, `ef-toggle-play`, `ef-toggle-loop`, `ef-volume`, `ef-mute`, `ef-scrubber`, `ef-time-display`) resolves the composition it drives in this order:
|
|
42
|
+
|
|
43
|
+
1. Its own `target="id-or-selector"` attribute, if set.
|
|
44
|
+
2. Walks up through ancestor `ef-controls`, `ef-preview`, and `ef-configuration` elements. An ancestor with its own `target` resolves there. A bare `ef-configuration` ancestor resolves to itself.
|
|
45
|
+
3. As a last resort, resolves to the nearest enclosing temporal root.
|
|
46
|
+
|
|
47
|
+
`ef-controls` is a pure proxy — it renders nothing itself but gives descendant controls a shared `target`.
|
|
48
|
+
|
|
49
|
+
## Preview and canvas
|
|
50
|
+
|
|
51
|
+
- **`ef-preview`** — renders a live preview of the composition
|
|
52
|
+
- **`ef-canvas`** — interactive canvas with selection state
|
|
53
|
+
|
|
54
|
+
## Playback and display controls
|
|
55
|
+
|
|
56
|
+
- **`ef-play`** / **`ef-pause`** / **`ef-toggle-play`** — playback controls
|
|
57
|
+
- **`ef-toggle-loop`** — toggle loop mode
|
|
58
|
+
- **`ef-volume`** / **`ef-mute`** — audio controls
|
|
59
|
+
- **`ef-time-display`** — current time / total time display
|
|
60
|
+
- **`ef-scrubber`** — seekable timeline scrubber
|
|
61
|
+
- **`ef-fullscreen`** — fullscreen toggle
|
|
62
|
+
- **`ef-pip`** — picture-in-picture toggle
|
|
63
|
+
|
|
64
|
+
## Timeline
|
|
65
|
+
|
|
66
|
+
- **`ef-timeline`** — timeline container with rows
|
|
67
|
+
- **`ef-timeline-row`** — a single track row
|
|
68
|
+
- **`ef-timeline-ruler`** — time ruler with markers
|
|
69
|
+
- **`ef-composition-thumbnail-strip`** — thumbnail overview of the composition
|
|
70
|
+
|
|
71
|
+
## Transform and manipulation
|
|
72
|
+
|
|
73
|
+
- **`ef-transform-handles`** — drag, resize, rotate handles for elements
|
|
74
|
+
- **`ef-trim-handles`** — trim start/end of video clips
|
|
75
|
+
- **`ef-fit-scale`** — fit or scale the canvas to the viewport
|
|
76
|
+
|
|
77
|
+
## Overlay system
|
|
78
|
+
|
|
79
|
+
- **`ef-overlay-layer`** — overlay container
|
|
80
|
+
- **`ef-overlay-item`** — individual overlay panel
|
|
81
|
+
|
|
82
|
+
## Editor shells
|
|
83
|
+
|
|
84
|
+
- **`ef-workbench`** — full editor layout with panels
|
|
85
|
+
- **`ef-tree`** / **`ef-tree-item`** — hierarchy tree of composition elements
|
|
86
|
+
- **`ef-hierarchy`** / **`ef-hierarchy-item`** — alternative hierarchy view with selection bridge
|
|
87
|
+
|
|
88
|
+
## Element reference
|
|
89
|
+
|
|
90
|
+
| Element | Purpose |
|
|
91
|
+
| -------------------------------- | ------------------------------------------------ |
|
|
92
|
+
| `ef-canvas` | Interactive composition canvas |
|
|
93
|
+
| `ef-canvas-selection-box` | Selection rectangle overlay on canvas |
|
|
94
|
+
| `ef-composition-thumbnail-strip` | Thumbnail overview of the composition |
|
|
95
|
+
| `ef-controls` | Proxy container for shared target |
|
|
96
|
+
| `ef-dial` | Rotary dial control for parameters |
|
|
97
|
+
| `ef-fit-scale` | Fit or scale canvas to viewport |
|
|
98
|
+
| `ef-fullscreen` | Fullscreen toggle |
|
|
99
|
+
| `ef-hierarchy` | Alternative hierarchy view with selection bridge |
|
|
100
|
+
| `ef-hierarchy-item` | Item in hierarchy view |
|
|
101
|
+
| `ef-mute` | Mute toggle |
|
|
102
|
+
| `ef-overlay-item` | Individual overlay panel |
|
|
103
|
+
| `ef-overlay-layer` | Overlay container |
|
|
104
|
+
| `ef-pause` | Pause button |
|
|
105
|
+
| `ef-pip` | Picture-in-picture toggle |
|
|
106
|
+
| `ef-play` | Play button |
|
|
107
|
+
| `ef-preview` | Live composition preview |
|
|
108
|
+
| `ef-resolution` | Resolution selector |
|
|
109
|
+
| `ef-scrubber` | Seekable timeline scrubber |
|
|
110
|
+
| `ef-thumbnail-strip` | Thumbnail strip for timeline |
|
|
111
|
+
| `ef-time-display` | Time display |
|
|
112
|
+
| `ef-timeline` | Timeline container |
|
|
113
|
+
| `ef-timeline-row` | Single track row in timeline |
|
|
114
|
+
| `ef-timeline-ruler` | Time ruler with markers |
|
|
115
|
+
| `ef-toggle-loop` | Toggle loop mode |
|
|
116
|
+
| `ef-toggle-play` | Play/pause toggle |
|
|
117
|
+
| `ef-transform-handles` | Drag, resize, rotate handles for elements |
|
|
118
|
+
| `ef-tree` | Composition hierarchy tree |
|
|
119
|
+
| `ef-tree-item` | Item in hierarchy tree |
|
|
120
|
+
| `ef-trim-handles` | Trim start/end of video clips |
|
|
121
|
+
| `ef-volume` | Volume control |
|
|
122
|
+
| `ef-waveform-strip` | Audio waveform strip for timeline |
|
|
123
|
+
| `ef-workbench` | Full editor layout with panels |
|
|
124
|
+
|
|
125
|
+
### `ef-workbench`
|
|
126
|
+
|
|
127
|
+
Composes a hierarchy panel, a canvas and selection view, a timeline, and transport controls into one panel layout (DOM preview mode only).
|
|
128
|
+
|
|
129
|
+
**Attributes:** `rendering` (boolean, collapses to bare stage during native render), `resolution` (string, e.g. `"1920x1080"`).
|
|
130
|
+
|
|
131
|
+
**Methods:** `exportVideo(options?)` — renders the composition to an MP4 through an offscreen clone. Dispatches `export-start`, `export-progress`, `export-complete`, `export-error` events. Options: `width`, `height`, `fps`, `from`, `to`, `videoCodec`, `audioCodec`, `videoBitrate`, `audioBitrate`, `audioSampleRate`.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ef-motion-design
|
|
3
|
+
description: "Apply motion design patterns to Editframe compositions — transitions, animations, easing, kinetic typography. Use when the operator asks to add motion design or animation patterns."
|
|
4
|
+
invocation: user
|
|
5
|
+
category: fo
|
|
6
|
+
concerns: read-only
|
|
7
|
+
dependsOn: []
|
|
8
|
+
languagePolicy: ref(PREFERENCES.md)
|
|
9
|
+
triggers:
|
|
10
|
+
- "add motion design"
|
|
11
|
+
- "animate text"
|
|
12
|
+
- "kinetic typography"
|
|
13
|
+
- "transition between scenes"
|
|
14
|
+
source: domain-knowledge
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<!-- skill-lint-disable SKILL-17 -->
|
|
18
|
+
|
|
19
|
+
Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
|
|
20
|
+
|
|
21
|
+
# Motion Design
|
|
22
|
+
|
|
23
|
+
Motion design patterns for Editframe compositions: transitions, animations, easing, and kinetic typography. These patterns enhance video compositions with professional motion graphics.
|
|
24
|
+
|
|
25
|
+
## Transitions
|
|
26
|
+
|
|
27
|
+
Use `ef-transition` or the `transition` prop to declare CSS-like transitions between scenes:
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
<Timegroup mode="sequence">
|
|
31
|
+
<Video src="assets/scene1.mp4" duration="5s" transition="fade" />
|
|
32
|
+
<Video src="assets/scene2.mp4" duration="5s" transition="slide-left" />
|
|
33
|
+
</Timegroup>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Transition types
|
|
37
|
+
|
|
38
|
+
- **`fade`** — cross-fade between elements
|
|
39
|
+
- **`slide-left`** / **`slide-right`** — slide in from left/right
|
|
40
|
+
- **`slide-up`** / **`slide-down`** — slide in from top/bottom
|
|
41
|
+
- **`zoom-in`** / **`zoom-out`** — scale transition
|
|
42
|
+
- **`wipe`** — directional wipe
|
|
43
|
+
|
|
44
|
+
## Kinetic typography
|
|
45
|
+
|
|
46
|
+
Animate text with `ef-text` or the `Text` component using timing and positioning:
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
<Timegroup mode="sequence">
|
|
50
|
+
<Text text="First" x="50%" y="50%" fontSize="72px" duration="1s" />
|
|
51
|
+
<Text text="Second" x="50%" y="50%" fontSize="72px" duration="1s" />
|
|
52
|
+
<Text text="Third" x="50%" y="50%" fontSize="72px" duration="1s" />
|
|
53
|
+
</Timegroup>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Text animation patterns
|
|
57
|
+
|
|
58
|
+
- **Sequential reveal** — words appear one after another in a `mode="sequence"` Timegroup
|
|
59
|
+
- **Position animation** — animate `x`/`y` props across time
|
|
60
|
+
- **Scale animation** — animate `fontSize` across time
|
|
61
|
+
- **Color transitions** — animate `color` across time
|
|
62
|
+
|
|
63
|
+
## Easing
|
|
64
|
+
|
|
65
|
+
Editframe supports CSS easing functions for transitions and animations:
|
|
66
|
+
|
|
67
|
+
- `ease` (default)
|
|
68
|
+
- `ease-in`
|
|
69
|
+
- `ease-out`
|
|
70
|
+
- `ease-in-out`
|
|
71
|
+
- `linear`
|
|
72
|
+
- `cubic-bezier(x1, y1, x2, y2)` — custom bezier curve
|
|
73
|
+
|
|
74
|
+
## Pan and zoom
|
|
75
|
+
|
|
76
|
+
Use `ef-pan-zoom` or the `PanZoom` component for Ken Burns-style effects:
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
<PanZoom
|
|
80
|
+
src="assets/photo.jpg"
|
|
81
|
+
duration="5s"
|
|
82
|
+
startX="0%"
|
|
83
|
+
startY="0%"
|
|
84
|
+
endX="100%"
|
|
85
|
+
endY="100%"
|
|
86
|
+
startScale="1"
|
|
87
|
+
endScale="1.5"
|
|
88
|
+
/>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Motion blur
|
|
92
|
+
|
|
93
|
+
Apply motion blur to moving elements with `ef-motionblur` or the `MotionBlur` component:
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
<MotionBlur intensity="0.5">
|
|
97
|
+
<Video src="assets/fast-pan.mp4" duration="3s" />
|
|
98
|
+
</MotionBlur>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## CSS variables for time-based animation
|
|
102
|
+
|
|
103
|
+
Editframe compositions support CSS custom properties for time-based values, enabling complex animation sequences without JavaScript:
|
|
104
|
+
|
|
105
|
+
```css
|
|
106
|
+
:root {
|
|
107
|
+
--scene-duration: 5s;
|
|
108
|
+
--transition-duration: 0.5s;
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Best practices
|
|
113
|
+
|
|
114
|
+
- Keep transitions consistent within a composition — use 1-2 transition types
|
|
115
|
+
- Match transition duration to content pacing (fast cuts for energy, slow for drama)
|
|
116
|
+
- Use kinetic typography sparingly — it draws attention
|
|
117
|
+
- Preview with `ref(forge.yaml bindings.commands.devServer)` before rendering
|
|
118
|
+
- Run `ref(forge.yaml bindings.commands.validate)` to check composition structure
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ef-onboard
|
|
3
|
+
description: Onboard a new Editframe video project — check prerequisites, discover requirements, scaffold, and start preview. Use when the operator asks to create a new video project.
|
|
4
|
+
invocation: user
|
|
5
|
+
category: fo
|
|
6
|
+
concerns: content-mutation
|
|
7
|
+
dependsOn: []
|
|
8
|
+
languagePolicy: ref(PREFERENCES.md)
|
|
9
|
+
triggers:
|
|
10
|
+
- "create a new editframe project"
|
|
11
|
+
- "start a new video project"
|
|
12
|
+
- "build a video with editframe"
|
|
13
|
+
- "create a video composition"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<!-- skill-lint-disable SKILL-17 -->
|
|
17
|
+
|
|
18
|
+
# ef-onboard
|
|
19
|
+
|
|
20
|
+
Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
|
|
21
|
+
|
|
22
|
+
Guide the operator through creating a new Editframe video project within a Forge-managed workspace. The skill covers prerequisites check, discovery, scaffold, domain knowledge reading, and build + preview.
|
|
23
|
+
|
|
24
|
+
## Process
|
|
25
|
+
|
|
26
|
+
### 1. Prerequisites check
|
|
27
|
+
|
|
28
|
+
- **Node.js 18+**: Run `node --version`. If missing or below 18, direct the operator to `https://nodejs.org/en/download/` or install via the system package manager.
|
|
29
|
+
- **FFmpeg**: Run `ffmpeg -version`. If missing, direct the operator to `https://ffmpeg.org/download.html` or install via the system package manager (`apt install ffmpeg`, `brew install ffmpeg`).
|
|
30
|
+
- If either prerequisite is missing and cannot be installed automatically, stop and ask the operator to install it manually.
|
|
31
|
+
|
|
32
|
+
### 2. Discovery
|
|
33
|
+
|
|
34
|
+
Ask the operator:
|
|
35
|
+
|
|
36
|
+
1. **Project type**:
|
|
37
|
+
- Single video (product demo, social media video, personal project)
|
|
38
|
+
- Video template (reusable with different assets — birthday card, wedding announcement)
|
|
39
|
+
- Video editing tool (custom editor built with Editframe as the engine)
|
|
40
|
+
- Video workflow automation (script that generates videos from triggers)
|
|
41
|
+
- Something else (ask them to describe it)
|
|
42
|
+
|
|
43
|
+
2. **Existing assets**:
|
|
44
|
+
- Video clips, images, or audio files (file paths or URLs)
|
|
45
|
+
- Website URLs to use as content source — if provided, download and cache all relevant assets locally before building
|
|
46
|
+
- No existing assets — start from scratch
|
|
47
|
+
|
|
48
|
+
3. **Node.js/React libraries**: Ask if the operator has any libraries in mind (e.g. AnimeJS for animations, Tailwind for styling).
|
|
49
|
+
|
|
50
|
+
Prioritize getting all answers before starting to build. This minimizes wait time for the operator.
|
|
51
|
+
|
|
52
|
+
### 3. Scaffold
|
|
53
|
+
|
|
54
|
+
Run `forge create --profile editframe` to scaffold the project with Forge governance (invariants, AGENTS.md templates, forge skills). The `editframe` profile scaffolds a React + TypeScript + Vite project with `@editframe/react` pre-configured.
|
|
55
|
+
|
|
56
|
+
If `forge create` fails (missing profile, network error, permission issue), report the error to the operator and stop. Do not proceed to subsequent steps without a scaffolded project.
|
|
57
|
+
|
|
58
|
+
### 4. Read domain knowledge
|
|
59
|
+
|
|
60
|
+
Before building, the agent MUST read the vendored Editframe domain skills. These are bundled with `@warpgogol/forge` and available in `.agents/skills/`:
|
|
61
|
+
|
|
62
|
+
- **ef-composition** — time model, media elements, rendering pipeline
|
|
63
|
+
- **ef-dev-server** — Vite plugin setup, local asset serving
|
|
64
|
+
- **ef-editor-gui** — editor toolkit for visual composition editing
|
|
65
|
+
- **ef-webhooks** — webhook notifications for render completion
|
|
66
|
+
- **ef-brand-video-generator** — brand video generation templates
|
|
67
|
+
- **ef-motion-design** — motion design patterns, transitions, kinetic typography
|
|
68
|
+
|
|
69
|
+
The agent should also read **ef-composition-review** and **ef-render-verify** for quality assurance workflows.
|
|
70
|
+
|
|
71
|
+
### 5. Build and preview
|
|
72
|
+
|
|
73
|
+
1. Build the initial composition based on the operator's answers from Step 2. Use the discovery answers (project type, assets, libraries) to determine composition structure, asset placement, and optional dependencies.
|
|
74
|
+
2. Run `forge dev` to start the preview server (delegates to `editframe preview` per the `editframe` profile's `devServer.command`).
|
|
75
|
+
3. Report the localhost URL to the operator.
|
|
76
|
+
4. Run `forge doctor` to check all profile invariants on the initial composition. For the `editframe` profile, this covers VIDEO-01 through VIDEO-09.
|
|
77
|
+
5. Report any invariant violations and suggest fixes.
|