@topy-ai/maggie 0.8.6 → 0.8.8
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/README-zh-TW.md +1 -1
- package/README.md +2 -2
- package/bundled-references/ffmpeg-recipes.md +125 -0
- package/bundled-references/programmatic-video.md +80 -0
- package/bundled-references/redesign-audit.md +144 -0
- package/bundled-references/video-timeline-model.md +110 -0
- package/bundled-skills/catalog.json +5 -1
- package/bundled-skills/maggie-design/SKILL.md +18 -2
- package/bundled-skills/maggie-video/SKILL.md +129 -0
- package/bundled-tools/clis/maggie_video.py +215 -0
- package/package.json +1 -1
- package/references/ffmpeg-recipes.md +125 -0
- package/references/programmatic-video.md +80 -0
- package/references/redesign-audit.md +144 -0
- package/references/video-timeline-model.md +110 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Redesign audit (existing sites)
|
|
2
|
+
|
|
3
|
+
A diagnostic checklist for upgrading an **existing** site or app to premium quality:
|
|
4
|
+
find the generic AI-design patterns, weak states, and sloppy code, then fix them
|
|
5
|
+
**in place** without breaking functionality or migrating frameworks. Used by the `maggie-design` skill - run the
|
|
6
|
+
audit to decide *what* to change, then apply the changes through maggie-design's
|
|
7
|
+
`in-place` / `section` / `verify` flow (small, reviewable, evidence-backed edits),
|
|
8
|
+
never a rewrite.
|
|
9
|
+
|
|
10
|
+
Concrete values (fonts, dark colours, spacing, type scale, radius, icons, motion)
|
|
11
|
+
come from [landing-page visual defaults](landing-page-visual-defaults.md); they are
|
|
12
|
+
**defaults** that the project's own DESIGN.md/tokens override. Never invent a value
|
|
13
|
+
that is in neither place - ask. Adapted from `elayadesign/redesign-skill`
|
|
14
|
+
`redesign-existing-projects` (MIT; from `Leonxlnx/taste-skill`); see Credits.
|
|
15
|
+
|
|
16
|
+
## How to run it
|
|
17
|
+
|
|
18
|
+
1. **Scan** - read the codebase; identify framework, styling method (Tailwind v3/v4,
|
|
19
|
+
vanilla CSS, styled-components, CSS modules), and the current patterns.
|
|
20
|
+
2. **Diagnose** - go through the audit below; list every generic pattern, weak
|
|
21
|
+
point, and missing state. **Report before fixing; let the user veto items.**
|
|
22
|
+
3. **Fix** - apply targeted upgrades inside the existing stack, in the Fix-priority
|
|
23
|
+
order, through maggie-design (test after each; keep diffs reviewable).
|
|
24
|
+
|
|
25
|
+
## Audit
|
|
26
|
+
|
|
27
|
+
### Typography
|
|
28
|
+
Browser-default or Inter/Roboto/Arial/Open Sans/Helvetica fonts; two typefaces on
|
|
29
|
+
one site; any italics; ultra-bold (800/900); only 400+700 in use (add 500/600);
|
|
30
|
+
headlines lacking presence (more display size, tighter tracking); body wider than
|
|
31
|
+
~65 characters; proportional numerals in data UI (use `tabular-nums`); missing
|
|
32
|
+
letter-spacing (negative on big headers, positive on small caps); all-caps
|
|
33
|
+
subheaders everywhere; orphaned words (`text-wrap: balance`/`pretty`); hyphens in
|
|
34
|
+
copy; off-scale font sizes (snap to the type scale, closest step below); off-scale
|
|
35
|
+
button type (main `text-base` semibold, header `text-sm` semibold).
|
|
36
|
+
|
|
37
|
+
### Colour and surfaces
|
|
38
|
+
Backgrounds outside the approved dark palette (snap to it; not `#0a0a0a`/`#121212`/
|
|
39
|
+
tinted navy); **any background gradient** (flat only; the one exception is hero
|
|
40
|
+
heading text); flat hero heading colour (apply the approved text gradient); **the
|
|
41
|
+
purple/blue "AI gradient" - the single most common AI fingerprint** (flat neutral
|
|
42
|
+
base + one accent); oversaturated accents (keep under ~80%); more than one accent;
|
|
43
|
+
mixing warm and cool grays; generic pure-black `box-shadow` (tint toward the
|
|
44
|
+
background hue); zero-texture flatness (subtle noise/grain, never a gradient);
|
|
45
|
+
inconsistent lighting direction (one light source); a random dark section in a light
|
|
46
|
+
page or vice versa; empty sections with no depth (masked low-opacity imagery or a
|
|
47
|
+
pattern; `https://picsum.photos/seed/{name}/1920/1080` as a placeholder, never an
|
|
48
|
+
ambient gradient).
|
|
49
|
+
|
|
50
|
+
### Layout
|
|
51
|
+
Everything centred/symmetrical (break it); three equal card columns as the feature
|
|
52
|
+
row (keep 3-5 benefits as content, but zig-zag/asymmetric/scroll/masonry as layout);
|
|
53
|
+
`height: 100vh` (use `min-height: 100dvh`); complex flexbox percentage math (CSS
|
|
54
|
+
Grid); no max-width container (~1200-1440px; hero capped ~680px); flexbox-forced
|
|
55
|
+
equal card heights (allow variable/masonry); radius by feel (token scale +
|
|
56
|
+
nested-radius formula); ad-hoc spacing (the spacing scale); no overlap/depth
|
|
57
|
+
(negative margins to layer); symmetrical vertical padding (optical, usually more at
|
|
58
|
+
the bottom); dashboard always a left sidebar (try top nav / command menu /
|
|
59
|
+
collapsible); missing whitespace; CTAs not bottom-aligned in card groups; pricing/
|
|
60
|
+
comparison list items starting at different Y (fixed-height title/price blocks);
|
|
61
|
+
misaligned baselines across side-by-side elements; mathematically-but-not-optically
|
|
62
|
+
aligned icons/text.
|
|
63
|
+
|
|
64
|
+
### Interactivity and states
|
|
65
|
+
Default easing (`ease`/`linear`/`ease-in-out` -> the base curve, 500ms movement /
|
|
66
|
+
300ms colour-opacity, never under 200ms); content just "there" on scroll (rise+fade
|
|
67
|
+
once, 600-800ms); scroll listeners (use `IntersectionObserver`/`whileInView`); nav
|
|
68
|
+
welded to the top edge (float it, translucent blur); instant menu-icon swap (animate
|
|
69
|
+
it); cramped mobile dropdown (full-height panel, links staggered ~60ms, under 400ms);
|
|
70
|
+
no reduced-motion handling (swap movement for a fade); no hover state; no active/
|
|
71
|
+
pressed feedback (`scale(0.98)`/`translateY(1px)`); missing focus ring; no loading
|
|
72
|
+
states (skeletons, not spinners); no empty states (a composed getting-started view);
|
|
73
|
+
no error states (inline, specific, never `alert()`); dead `#` links; no current-page
|
|
74
|
+
nav indicator; scroll jumping (`scroll-behavior: smooth`); animating `top`/`left`/
|
|
75
|
+
`width`/`height` (use `transform`/`opacity`).
|
|
76
|
+
|
|
77
|
+
### Content
|
|
78
|
+
Placeholder/stock people and repeated faces; suspiciously round numbers; generic
|
|
79
|
+
brand names; filler words ("revolutionize", "supercharge", "cutting edge",
|
|
80
|
+
"effortless", "transform your workflow", "world class"); vague value props
|
|
81
|
+
("streamline"/"optimize" -> a measurable outcome); features with no outcome; weak
|
|
82
|
+
CTAs ("Learn more"/"Submit" -> verb + what they get); competing CTAs above the fold;
|
|
83
|
+
proof buried at the bottom; no risk reversal; loud/cute system messages (calm and
|
|
84
|
+
specific); passive voice; placeholder/Latin text (a blocker); Title Case (use
|
|
85
|
+
sentence case).
|
|
86
|
+
|
|
87
|
+
### Component patterns
|
|
88
|
+
Generic card (border + shadow + white bg -> background or spacing alone; cards only
|
|
89
|
+
where elevation means hierarchy); single-side card border (all around or none);
|
|
90
|
+
always one filled + one ghost button (add text/tertiary); pill "New"/"Beta" badges
|
|
91
|
+
(square/flag/plain); accordion FAQ (keep 6-12 Q&A, change the pattern); three-card
|
|
92
|
+
carousel testimonials with dots; three-tower pricing (emphasise the recommended tier
|
|
93
|
+
by colour/weight, not height); modals for everything (inline/slide-over/expand);
|
|
94
|
+
avatar circles only (squircles); sun/moon theme toggle (dropdown/system/settings);
|
|
95
|
+
four-column footer link farm (main paths + legal only).
|
|
96
|
+
|
|
97
|
+
### Iconography and imagery
|
|
98
|
+
Lucide/Feather/Material icons (-> the approved set); cliche metaphors (rocket for
|
|
99
|
+
"launch", shield for "security" -> bolt, fingerprint, spark, vault); inconsistent
|
|
100
|
+
stroke widths; missing favicon; stock "diverse team" photos.
|
|
101
|
+
|
|
102
|
+
### Code quality
|
|
103
|
+
Div soup (semantic HTML); inline styles mixed with classes; hardcoded pixel widths
|
|
104
|
+
(`%`/`rem`/`em`/`max-width`); missing/`alt="image"` alt text; arbitrary z-index like
|
|
105
|
+
`9999` (a scale); commented-out dead code; **import hallucinations** (verify every
|
|
106
|
+
import exists in the dependency file); missing meta tags (`<title>`, description,
|
|
107
|
+
`og:image`, social).
|
|
108
|
+
|
|
109
|
+
### Strategic omissions (what AI builds forgets)
|
|
110
|
+
Legal links; back navigation; a custom 404; form validation; a skip-to-content link;
|
|
111
|
+
cookie consent where required (see `maggie-legal`); landing-page indexing not
|
|
112
|
+
considered (`noindex` ad-only/time-bound, real title/meta/internal-links/AEO FAQ for
|
|
113
|
+
evergreen - hand SEO specifics to `maggie-seo-geo`).
|
|
114
|
+
|
|
115
|
+
## Fix priority (max impact, min risk)
|
|
116
|
+
|
|
117
|
+
1. Font swap - biggest instant win, lowest risk.
|
|
118
|
+
2. Colour and surface cleanup - snap to the palette, remove background gradients.
|
|
119
|
+
3. Hover / active / focus states - makes it feel alive.
|
|
120
|
+
4. Layout and spacing - grid, max-width, spacing scale, nested-radius formula.
|
|
121
|
+
5. Motion pass - base curve, IntersectionObserver reveals, floating nav, mobile menu.
|
|
122
|
+
6. Replace generic components - swap cliche patterns for the alternatives above.
|
|
123
|
+
7. Loading / empty / error states - makes it feel finished.
|
|
124
|
+
8. Copy pass - cut cliches, add specificity, fix CTAs.
|
|
125
|
+
9. Type-scale polish - the premium final touch.
|
|
126
|
+
|
|
127
|
+
## Rules
|
|
128
|
+
|
|
129
|
+
- Work with the existing stack; do not migrate frameworks or styling libraries.
|
|
130
|
+
- Do not break functionality; test after every change (maggie-design's verify/QA).
|
|
131
|
+
- Report the diagnosis before fixing; let the user veto items.
|
|
132
|
+
- Check the dependency file before importing any library; check Tailwind v3 vs v4
|
|
133
|
+
before touching config; no framework -> vanilla CSS.
|
|
134
|
+
- Small, targeted, reviewable changes over big rewrites.
|
|
135
|
+
- Never invent a design value; if it is in neither this audit nor the visual
|
|
136
|
+
defaults nor the project's system, ask.
|
|
137
|
+
|
|
138
|
+
## Credits
|
|
139
|
+
|
|
140
|
+
Adapted (not transcribed) from
|
|
141
|
+
[`elayadesign/redesign-skill`](https://github.com/elayadesign/redesign-skill)
|
|
142
|
+
`redesign-existing-projects` by Elaya (MIT), which adapts audit structure and
|
|
143
|
+
content-realism checks from [`Leonxlnx/taste-skill`](https://github.com/Leonxlnx/taste-skill)
|
|
144
|
+
by Leon Lin (MIT).
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Marketing-video timeline model
|
|
2
|
+
|
|
3
|
+
An engine-neutral, provider-neutral data shape for "assemble these clips, images,
|
|
4
|
+
text, captions and audio into a video", distilled from the open NLEs (MLT /
|
|
5
|
+
Shotcut / Kdenlive, OpenShot, Olive). Used by `maggie-video`. We adopt the **data
|
|
6
|
+
shape** (an uncopyrightable idea), never their code - MLT/Shotcut/Kdenlive/OpenShot/
|
|
7
|
+
Olive are LGPL/GPL. It renders through the **ffmpeg binary** (the common
|
|
8
|
+
denominator, arm's-length), or optionally through `melt` as a GPL external tool.
|
|
9
|
+
|
|
10
|
+
## Conventions (chosen for LLM-friendliness)
|
|
11
|
+
|
|
12
|
+
- **Seconds** (floats) at the authoring layer, not frames (OpenShot-style).
|
|
13
|
+
- **`position`** = where a clip starts on the timeline; **`start`/`end`** = the trim
|
|
14
|
+
within its source (OpenShot's split; MLT calls the trim `in`/`out`).
|
|
15
|
+
- **`z`** = track stacking; higher is on top (mirrors MLT `b_track` over `a_track`,
|
|
16
|
+
OpenShot's higher layer number).
|
|
17
|
+
- **Keyframes** as `{t, v, ease}` arrays, ease in `linear | hold | smooth | bezier`
|
|
18
|
+
(MLT's linear/discrete/smooth + OpenShot's Linear/Constant/Bezier).
|
|
19
|
+
- **Relative positions/sizes** (`"80%"`, 0..1) + named anchors, so it is
|
|
20
|
+
resolution-independent.
|
|
21
|
+
|
|
22
|
+
## The model
|
|
23
|
+
|
|
24
|
+
```jsonc
|
|
25
|
+
{
|
|
26
|
+
"output": { "width": 1080, "height": 1920, "fps": 30, "format": "mp4",
|
|
27
|
+
"vcodec": "h264", "acodec": "aac", "duration": "auto" },
|
|
28
|
+
"assets": {
|
|
29
|
+
"shot1": { "type": "video", "src": "footage/a.mp4" },
|
|
30
|
+
"product": { "type": "image", "src": "footage/product.jpg" },
|
|
31
|
+
"logo": { "type": "image", "src": "brand/logo.png" },
|
|
32
|
+
"vo": { "type": "audio", "src": "audio/vo.mp3" },
|
|
33
|
+
"music": { "type": "audio", "src": "audio/track.mp3" }
|
|
34
|
+
},
|
|
35
|
+
"tracks": [
|
|
36
|
+
{ "id": "main", "kind": "video", "z": 0, "clips": [
|
|
37
|
+
{ "asset": "shot1", "start": 2.0, "end": 7.0, "position": 0.0, "fit": "cover",
|
|
38
|
+
"effects": [ { "type": "zoom", "keyframes": [
|
|
39
|
+
{"t":0.0,"v":1.0,"ease":"linear"}, {"t":5.0,"v":1.12,"ease":"smooth"} ] } ] },
|
|
40
|
+
{ "asset": "product", "position": 5.0, "duration": 4.0, "fit": "cover" }
|
|
41
|
+
] },
|
|
42
|
+
{ "id": "overlay", "kind": "video", "z": 10, "clips": [
|
|
43
|
+
{ "type": "text", "text": "50% OFF TODAY", "position": 1.0, "duration": 3.0,
|
|
44
|
+
"style": { "font": "Inter-Bold", "size": 96, "color": "#FFFFFF", "box": "#E11D48", "align": "center" },
|
|
45
|
+
"rect": { "x": "10%", "y": "70%", "w": "80%", "h": "15%" },
|
|
46
|
+
"effects": [ { "type": "opacity", "keyframes": [
|
|
47
|
+
{"t":0,"v":0}, {"t":0.4,"v":1}, {"t":2.6,"v":1}, {"t":3.0,"v":0} ] } ] },
|
|
48
|
+
{ "asset": "logo", "position": 0.0, "duration": 9.0,
|
|
49
|
+
"rect": { "x": "80%", "y": "5%", "w": "15%", "h": "auto" } },
|
|
50
|
+
{ "type": "captions", "src": "audio/vo.srt" }
|
|
51
|
+
] }
|
|
52
|
+
],
|
|
53
|
+
"transitions": [ { "type": "crossfade", "between": ["shot1","product"], "position": 5.0, "duration": 0.5 } ],
|
|
54
|
+
"audio": [
|
|
55
|
+
{ "asset": "vo", "position": 0.5, "gain": 0 },
|
|
56
|
+
{ "asset": "music", "position": 0.0, "gain": -18, "ducking": { "under": "vo", "amount": -12 },
|
|
57
|
+
"fade_out": { "at": 8.5, "duration": 0.5 } }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Minimal required: `output{width,height,fps,format}`, `assets{}`, one video track of
|
|
63
|
+
`clips[]` each with `asset`+`position`+(`duration` or `start`/`end`). Everything
|
|
64
|
+
else is additive.
|
|
65
|
+
|
|
66
|
+
## Field crosswalk (stay compatible with any backend)
|
|
67
|
+
|
|
68
|
+
| this model | MLT | OpenShot | Olive |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| asset `src` | producer `resource` | `files[].path` | footage node |
|
|
71
|
+
| `start`/`end` (trim) | `in`/`out` (frames) | `start`/`end` (sec) | `kMediaInInput` |
|
|
72
|
+
| `position` (timeline) | playlist order + `blank` | `position` (sec) | `ClipBlock.in()` |
|
|
73
|
+
| track / `z` | playlist in multitrack | `layer` number | block in sequence |
|
|
74
|
+
| overlay | `composite` transition | higher layer | graph edge |
|
|
75
|
+
| keyframe ease | `linear`/`discrete`(`|`)/`smooth`(`~`) | Linear/Constant/Bezier | kLinear/kHold/kBezier |
|
|
76
|
+
| time base | frames | seconds | rational |
|
|
77
|
+
|
|
78
|
+
## Rendering through ffmpeg (default, no GPL linking)
|
|
79
|
+
|
|
80
|
+
Compile the model to one `filter_complex`:
|
|
81
|
+
|
|
82
|
+
- **trim / in-out:** `-ss start -t dur -i a.mp4`, or `trim=start=..:end=..,setpts=PTS-STARTPTS`.
|
|
83
|
+
- **fit to canvas:** `"cover"` = `scale=W:H:force_original_aspect_ratio=increase,crop=W:H`;
|
|
84
|
+
`"contain"` = `...decrease,pad=...` (see [ffmpeg recipes](ffmpeg-recipes.md)).
|
|
85
|
+
- **sequence:** `concat` back-to-back; `overlay=enable='between(t,P,P+D)'` for timed overlays.
|
|
86
|
+
- **crossfade:** `xfade=transition=fade:duration=0.5:offset=5.0`; audio `acrossfade`.
|
|
87
|
+
- **text / lower-thirds:** `drawtext=...:enable='between(t,1,4)'`; animate via `x=`/`alpha=` expressions in `t`.
|
|
88
|
+
- **logo:** `overlay=W*0.8:H*0.05`. **captions:** `subtitles=vo.srt`.
|
|
89
|
+
- **audio mix + ducking:** `amix`, `volume`, `sidechaincompress` (music under VO), `afade`.
|
|
90
|
+
- **keyframes:** ffmpeg `t`-expressions (`alpha='if(lt(t,0.4),t/0.4,1)'`) or `zoompan`; for rich curves precompute per-frame values from the `{t,v,ease}` arrays.
|
|
91
|
+
- **output:** `-c:v libx264 -r fps -pix_fmt yuv420p -c:a aac out.mp4`.
|
|
92
|
+
|
|
93
|
+
`mifi/editly` (MIT) and `Zulko/moviepy` (MIT) are working prior art that this JSON
|
|
94
|
+
shape renders through ffmpeg without any GPL engine.
|
|
95
|
+
|
|
96
|
+
## Optional higher-fidelity backend: melt (GPL, external)
|
|
97
|
+
|
|
98
|
+
The same model can emit **MLT XML** and render with
|
|
99
|
+
`melt project.mlt -consumer avformat:out.mp4` - keyframes map to MLT's
|
|
100
|
+
`frame=value` animation strings and `composite`/`luma` transitions. Treat `melt` as
|
|
101
|
+
an optional external tool behind a provider-adapter boundary (see
|
|
102
|
+
[provider adapter contract](provider-adapter-contract.md)); it is GPL, invoked at
|
|
103
|
+
arm's length, never linked or vendored.
|
|
104
|
+
|
|
105
|
+
## What belongs where
|
|
106
|
+
|
|
107
|
+
- **This reference:** the data model, the crosswalk, the ffmpeg compilation map, the
|
|
108
|
+
keyframe/ease vocabulary, the licensing note - stable and engine-neutral.
|
|
109
|
+
- **`maggie-video` skill:** channel presets, caption/CTA safe-areas, the operational
|
|
110
|
+
ffmpeg command layer (via `maggie_video.py`), and tool wiring.
|