mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
8 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
48f3404051 | fix home example prompt presets | ||
|
|
7ce4eb4e82
|
feat(prompt-templates): add Notion-style team dashboard (Live Artifact) (#799)
* feat(prompt-templates): add Notion-style team dashboard (Live Artifact)
Adds a single image prompt template under the Live Artifact category — a
Notion-native team dashboard mockup with KPI grid, 7-day sparkline,
activity feed, and linked-database task table.
This is the first prompt template to use the curated Live Artifact
category, whose de/fr/ru localization slots were already reserved in
apps/web/src/i18n/content{,.fr,.ru}.ts. Only the new tag 'live-artifact'
is added to each locale's PROMPT_TEMPLATE_TAGS map (+1 line each) so the
arrayContaining check in e2e/tests/localized-content.test.ts continues
to pass.
Template-level only: no new surface, no loader changes, no schema or
TypeScript type changes.
* fix(prompt-templates,i18n): register 'Live Artifact' category and template ID fallback for de/fr/ru
CI's e2e/localized-content.test.ts enumerates LOCALIZED_CONTENT_IDS from
apps/web/src/i18n/content.ts and asserts:
- ids.promptTemplates === sorted(all template ids in prompt-templates/)
- ids.promptTemplateCategories ⊇ all categories actually used by templates
- ids.promptTemplateTags ⊇ all tags actually used by templates
The new notion-team-dashboard-live-artifact template introduced both
the first 'Live Artifact' category and the first prompt-template id
without a copy translation, so each locale needs:
- 'Live Artifact' added to *_PROMPT_TEMPLATE_CATEGORIES (currently
consumed via arrayContaining; order doesn't matter)
- 'notion-team-dashboard-live-artifact' listed in
*_PROMPT_TEMPLATE_IDS_WITH_EN_FALLBACK so it joins ids.prommplates
via the EN-fallback path (no per-locale title/summary copy needed)
The 'live-artifact' tag was already added to *_PROMPT_TEMPLATE_TAGS in
the previous commit on this branch.
3 files changed, +6 / -3.
* fix(i18n): register Live Artifact category + template id fallback (CI repair on #799)
* fix(i18n): register Live Artifact category + template id fallback (CI repair on #799)
* fix(i18n): register Live Artifact category + template id fallback (CI repair on #799)
* fix(prompt-templates): scrub live/connector affordances from notion-team-dashboard prompt (#799 review)
Reviewers (mrcfps, lefarcen) flagged that even with the amber "Sample
data — design preview" banner and the "(sample data)" footer, the inner
prompt blob still asked the model to render UI affordances claiming a
real Notion / Composio connector binding ("Live · synced" pill, "Last
refreshed just now", "Refresh from Notion" blue button, callout saying
numbers are "pulled from your {workspace} Notion workspace via the
Composio connector"). That contradicts the prompt-only contract and
reintroduces the #778 mock-honesty concern.
Rewrite the prompt blob so every UI element is consistently presented
as seeded sample data:
- topbar.preview_pill (was live_pill):ample · design preview' pill
with explicit negative instruction no to render any live/sync pill
- page_header.meta_row: drop 'Last refreshed', 'Auto' toggle, and the
'Refresh from Notion' blue button; explicit DO NOT instructions
- callout: 'prompt-only design preview ... seeded sample data ... not
pulled from a real Notion workspace and not refreshed via the
Composio connector. For real refreshable / connector-backed Live
Artifacts, use the live-artifact skill.' Also removes the bare
'{workspace}' placeholder that was not using {argument ...} syntax
(P2 nit from lefarcen).
- activity_feed_card.subtitle: 'Notion-style seeded activity for
design preview' (was 'From Notion')
- linked_database.title/subtitle: marked '(sample)' / 'seeded sample
rows · no live connector binding'
- linked_database.row_styles: explicit negative instruction not to
render an 'Updated ↻' refresh badge
- footer: 'Notion-style sample data · seeded design preview, not bound
to any Notion workspace or Composio connector'
- honesty_rule: enumerates all live/sync/refresh affordanche
generator must NOT render
Top-level metadata (id, title, summary, category, tags, model, aspect,
previewImageUrl, source) is unchanged. Preview PNG already shows the
amber banner and a layout without a Refresh button, so it matches the
new in-prompt language.
* fix(prompt-templates): scrub live/connector affordances from notion-team-dashboard prompt (#799 review)
Reviewers (mrcfps, lefarcen) flagged that even with the amber "Sample data — design preview" banner and the "(sample data)" footer, the inner prompt blob still asked the model to render UI affordances claiming a real Notion / Composio connector binding ("Live · synced" pill, "Last refreshed just now", "Refresh from Notion" blue button, callout saying numbers are "pulled from your {workspace} Notion workspace via the Composio connector"). That contradicts the prompt-only contract and reintroduces the #778 mock-honesty concern.
Rewrite the prompt blob so every UI element is consistently presented as seeded sample data:
- topbar.preview_pill (was live_pill): 'Sample · design preview' pill with explicit negative instruction not to render any live/sync pill.
- page_header.meta_row: drop 'Last refreshed', 'Auto' toggle, and the 'Refresh from Notion' blue button; explicit DO NOT instructions for all three.
- callout: 'prompt-only design preview ... seeded sample data ... not pulled from a real Notion workspace and not refreshed via the Composio connector. For real refreshable / connector-backed Live Artifacts, use the live-artifact skill.' Also removes the bare '{workspace}' placeholder that was not using {argument ...} syntax (P2 nit from lefarcen).
- activity_feed_card.subtitle: 'Notion-style seeded activity for design preview' (was 'From Notion').
- linked_database.title/subtitle: marked '(sample)' / 'seeded sample rows · no live connector binding'.
- linked_database.row_styles: explicit negative instruction not to render an 'Updated ↻' refresh badge.
- footer: 'Notion-style sample data · seeded design preview, not bound to any Notion workspace or Composio connector'.
- honesty_rule: enumerates all live/sync/refresh affordances the generator must NOT render.
Top-level metadata (id, title, summary, category, tags, model, aspect, previewImageUrl, source) is unchanged. Preview PNG already shows the amber banner and a layout without a Refresh button, so it matches the new in-prompt language.
* fix(prompt-templates): scrub live/connector affordances from notion-team-dashboard prompt (#799 review)
Reviewers (mrcfps, lefarcen) flagged that even with the amber "Sample data — design preview" banner and the "(sample data)" footer, the inner prompt blob still asked the model to render UI affordances claiming a real Notion / Composio connector binding ("Live · synced" pill, "Last refreshed just now", "Refresh from Notion" blue button, callout saying numbers are "pulled from your {workspace} Notion workspace via the Composio connector"). That contradicts the prompt-only contract and reintroduces the #778 mock-honesty concern.
Rewrite the prompt blob so every UI element is consistently presented as seeded sample data:
- topbar.preview_pill (was live_pill): 'Sample · design preview' pill with explicit negative instruction not to render any live/sync pill.
- page_header.meta_row: drop 'Last refreshed', 'Auto' toggle, and the 'Refresh from Notion' blue button; explicit DO NOT instructions for all three.
- callout: 'prompt-only design preview ... seeded sample data ... not pulled from a real Notion workspace and not refreshed via the Composio connector. For real refreshable / connector-backed Live Artifacts, use the live-artifact skill.' Also removes the bare '{workspace}' placeholder that was not using {argument ...} syntax (P2 nit from lefarcen).
- activity_feed_card.subtitle: 'Notion-style seeded activity for design preview' (was 'From Notion').
- linked_database.title/subtitle: marked '(sample)' / 'seeded sample rows · no live connector binding'.
- linked_database.row_styles: explicit negative instruction not to render an 'Updated ↻' refresh badge.
- footer: 'Notion-style sample data · seeded design preview, not bound to any Notion workspace or Composio connector'.
- honesty_rule: enumerates all live/sync/refresh affordances the generator must NOT render.
Top-level metadata (id, title, summary, category, tags, model, aspect, previewImageUrl, source) is unchanged. Preview PNG already shows the amber banner and a layout without a Refresh button, so it matches the new in-prompt language.
---------
Co-authored-by: joeylee12629-star <joeylee12629-star@users.noreply.github.com>
|
||
|
|
569f280a0d
|
feat(prompt-templates): add crayon kid-drawing style-transfer template (#295)
* feat(prompt-templates): add crayon kid-drawing style-transfer template - illustration-crayon-kid-drawing-rework: an image-to-image prompt that reworks any reference image into a hand-drawn crayon illustration with childlike whimsy (castles, candy, stars, clouds, rainbows) on clean white paper. Tuned for gpt-image-2 edits and works across product shots, portraits, and screenshots. - Ships with a cover preview rendered from the Open Design X profile screenshot via the template's own prompt, downscaled to 1536x1024 JPEG. - Category reuses existing 'Illustration' enum value. * fix(prompt-templates): address crayon template review feedback (#295) - aspect: switch from unsupported 3:2 to 4:3 (per @mrcfps). The app contract only recognizes 1:1 / 16:9 / 9:16 / 4:3 / 3:4 (MediaAspect in packages/contracts and MEDIA_ASPECTS in apps/daemon/src/media-models.ts); gpt-image-* silently falls back to 1024x1024 for unknown aspects, which would have made this template generate square images instead of landscape. - Cover preview re-cropped from 1536x1024 to 1365x1024 (4:3) so the thumbnail matches the declared aspect. Content preserved (center crop). - prompt: add 'Preserve the general layout and spatial relationships of the original image — transform the style first, embellish second' so small UI elements, faces, and logos don't get overwhelmed by castles/candy/stars decoration (per @lefarcen). - tags: add 'rework' and 'transform' to improve discoverability for users searching 'rework my photo' / 'transform screenshot' (per @lefarcen). - summary: clarify that this is an image-to-image edit requiring a reference image upload, not a pure text-to-image generation prompt (per @lefarcen). * fix(i18n): register German content for new templates and their tags The 'Validate workspace' CI job (apps/web i18n/content.test.ts) enforces that every template slug, category, and tag that appears in a shipped JSON template also has a German translation in apps/web/src/i18n/content.ts. This PR's new template plus two previously merged first-party templates (#187: game-ui-ancient-china-open-world-mmo-hud and social-media-post-sensational-girl-dance-storyboard-8-shots) were missing from the German dictionaries, so the suite was red. Changes: - DE_PROMPT_TEMPLATE_CATEGORIES: add 'Game UI' -> 'Spiel-UI'. - DE_PROMPT_TEMPLATE_TAGS: add 11 tags used by the three templates (ancient-china, childlike, crayon, dance, fashion, game-ui, hand-drawn, hud, illustration, image-to-image, mmo, open-world, rework, sequence, storyboard, style-transfer, transform, wuxia) with German equivalents. - DE_PROMPT_TEMPLATE_COPY: add German title + summary for game-ui-ancient-china-open-world-mmo-hud, illustration-crayon-kid-drawing-rework, and social-media-post-sensational-girl-dance-storyboard-8-shots. Local verification: apps/web vitest suite (14 files, 68 tests) passes. --------- Co-authored-by: Joey <joey@open-design.local> |
||
|
|
04bf930880
|
feat(prompt-templates): add otaku-dance choreography breakdown infographic (#209)
Adds one curated first-party image prompt template to
`prompt-templates/image/`, with a matching preview JPG under
`assets/prompt-templates/image/`.
### New template
**`infographic-otaku-dance-choreography-breakdown-gokurakujodo-16-panels.json`**
— A single vertical 2:3 poster composed as a 4x4 grid of 16 connected
square panels, forming a full choreography breakdown chart for the
famous Japanese otaku dance song 極楽浄土 (Gokuraku Jodo).
Each panel shows the same cute half-realistic anime idol girl (pink
twin-tails, sailor-collar school-idol uniform, vivid turquoise eyes)
performing one signature pose from the dance, full-body, on a pastel
pink background with:
- a small Japanese caption strip at the bottom ("両手広げ", "指さし天井",
"ハート手", … "フィナーレ"),
- a numbered circle (1–16) at the top-left corner,
- a clean 4x4 grid with thin black separators,
- an overall header reading "極楽浄土 振り付け 16連動" at the top.
The template is explicitly engineered as a POSE REFERENCE SHEET for
downstream AI video generation — every silhouette is crisp and
unambiguous, no motion lines or background clutter, identical
character across all 16 cells.
Five `{argument}` slots expose song title, romaji, character design,
background color and header text so the same chart can be restyled
for any choreographed dance song while keeping the 16-pose grid
scaffold unchanged. Tuned for `gpt-image-2`, aspect `2:3`. Category:
`Infographic` (reuses the existing enum value; no new enum).
Carries `source.repo = nexu-io/open-design`, Apache-2.0, author
`open-design contributors`.
### Verification
- `node -e "JSON.parse(require('fs').readFileSync('prompt-templates/image/<file>.json','utf8'))"` passes on the new template.
- Slug does not collide with any existing template on `main`, in the
companion Three Kingdoms PR (#207), or in the companion anime
fighting-game PR (#208).
- Preview JPG is 396 KB, comparable to the previews landed in #187.
- `aspect = 2:3` matches the underlying 1024x1536 source render and
the reference-chart layout.
### Why
The existing `Infographic` category has strong timeline/evolution
content (e.g. `3d-stone-staircase-evolution-infographic`) but no
entries aimed at **motion reference** — the one niche where a static
infographic is essentially a production tool for video/animation work.
This template plugs that gap. The 4x4 grid of pose-cells is a
genre-defining layout for dance choreography sheets (used widely for
idol dance covers on Bilibili / YouTube / TikTok) and, because every
cell is a clean, identical-character full-body silhouette on a flat
background, the sheet doubles as a **ready-to-use pose reference**
for AI video pipelines (image-to-video, pose-guided control, keyframe
choreography). One template, two jobs: a pretty poster and a working
production asset.
Co-authored-by: Tuola Ge <gexingli@refly.ai>
|
||
|
|
26150c60af
|
feat(prompt-templates): add anime fighting game screenshot template (#208)
Adds one curated first-party image prompt template to
`prompt-templates/image/`, with a matching preview JPG under
`assets/prompt-templates/image/`.
### New template
**`game-screenshot-anime-fighting-game-captain-ryuuga-vs-kaze-renshin.json`** —
A cinematic anime fighting-game key-visual / combat screenshot in the
style of *Street Fighter 6* or *Tekken 8* intro art. Two original
anime-styled male warriors face off at the center of a nighttime
Chinese temple courtyard:
- **Captain Ryuuga (P1)** — shirtless straw-hat pirate with a red
battle-scar, shark-tooth necklace, skull-pattern sash and a warm
orange-red fire aura.
- **Kaze Renshin (P2)** — spiky jet-black hair, orange martial-arts gi
with a single black kanji, charging a crackling blue lightning energy
sphere between his hands.
The background, lighting and warm-vs-cool color grading follow the
rival-fighter convention of the genre (orange left half, blue right
half). The template ships with a complete fighting-game HUD exposed as
slot-filled `{argument}` placeholders:
- Two horizontal health bars with round central round-timer and
`ROUND N` label, per-side HP-percent numerals.
- P1 / P2 portrait panels with character name + subtitle + emblem.
- Per-side `HITS COMBO` counters and max gauges (orange-left,
blue-right).
Ten `{argument}` slots in total make it easy to restyle the matchup
(swap the fighters, backdrop, round number, HP percents, combo counts,
names, titles and emblems) without rebuilding the HUD-and-render
boilerplate. Tuned for `gpt-image-2`, aspect `16:9`. Category: `Game UI`
(reuses the existing enum value introduced in #187; no new enum).
Carries `source.repo = nexu-io/open-design`, Apache-2.0, author
`open-design contributors`.
### Verification
- `node -e "JSON.parse(require('fs').readFileSync('prompt-templates/image/<file>.json','utf8'))"` passes on the new template.
- Slug does not collide with any existing template on `main` or in the
companion Three Kingdoms screenshot PR.
- Preview JPG is 679 KB, comparable to the previews landed in #187.
- `aspect = 16:9` matches the underlying 1792x1024 source render.
### Why
#187 anchored the `Game UI` category with a Chinese MMO HUD mockup.
The companion Three Kingdoms PR extends the category with AAA ARPG
combat-moment screenshots in the Black Myth: Wukong style. This PR
adds a third flavor — an **anime fighting game VS screen** — completing
a compact but representative seed set for the category:
- MMO HUD (UI-heavy scenic moment)
- AAA ARPG (character-driven cinematic combat)
- Anime fighting game (head-to-head VS key visual)
Together these cover three very different HUD conventions and three
different render styles, so downstream users approaching the Game UI
category have a real breadth of starting points to remix from — not
just one aesthetic.
Co-authored-by: Tuola Ge <gexingli@refly.ai>
|
||
|
|
975c795827
|
feat(prompt-templates): add three Three Kingdoms ARPG gameplay screenshot templates (#207)
Adds three curated first-party image prompt templates to
`prompt-templates/image/`, each with a matching preview JPG under
`assets/prompt-templates/image/`.
### New templates
1. **`game-screenshot-three-kingdoms-lyubu-yuanmen-archery.json`** —
Lü Bu drawing a massive recurved warbow at Yuanmen gate to shoot
down a distant halberd at ~150 paces. Over-the-shoulder gameplay
framing with a locked-on target marker and distance readout in the
HUD. Three `{argument}` slots: character, qi_color, setting.
2. **`game-screenshot-three-kingdoms-guanyu-slaying-yanliang.json`** —
Guan Yu riding the Red Hare warhorse through a torrential-rain
battlefield, Blue Dragon Crescent Glaive raised, boss-fight HUD with
a crimson Elite HP bar over the distant enemy general. Four
`{argument}` slots: character, mount, weapon, setting.
3. **`game-screenshot-three-kingdoms-zhaoyun-cradle-escape.json`** —
Zhao Yun at Changbanpo cradling the swaddled infant Liu Chan in his
left arm and sweeping enemies back with a spear in his right, with
a dedicated ESCORT protection bar in the HUD and a visible combo
counter. Four `{argument}` slots: character, child_protected,
weapon, setting.
All three follow the same in-game screenshot recipe: AAA next-gen ARPG
in the cinematic photoreal style of Black Myth: Wukong (with Elden Ring
for the Zhao Yun piece), Unreal Engine 5 Nanite/Lumen rendering, third
person over-the-shoulder camera, and a complete semi-transparent HUD
(portrait + HP/qi bars, minimap, skill hotbar, stamina ring, lock-on /
boss / escort widgets as appropriate). Each ships with a negative
prompt block tuned for this genre — no watermark, no gibberish glyphs,
no cutscene framing, no first-person view, no modern clothing.
All JSONs carry `source.repo = nexu-io/open-design`, Apache-2.0, author
`open-design contributors`, and follow the shape introduced in #187 so
the importer's first-party preservation logic applies unchanged.
Category: `Game UI` (reuses the existing enum value from #187; no new
enum introduced).
### Verification
- `node -e "JSON.parse(require('fs').readFileSync('prompt-templates/image/<file>.json','utf8'))"` passes on all three new templates.
- Slugs do not collide with any existing template on `main`.
- Preview JPGs are 445-527 KB each, comparable to the previews landed in #187.
- `aspect = 16:9` matches the underlying 1536x1024 source renders.
### Why
#187 established `Game UI` as a category with a single HUD-heavy MMO
mockup of a female swordswoman in a scenic shrine. This PR extends the
category with three **combat-moment** screenshots centered on specific
Three Kingdoms heroes in their most iconic scenes — giving the library
a clear complement (character-driven action beats) to the existing
HUD-demo anchor. The Three Kingdoms theme also opens a reusable
narrative scaffold: the `{character}` / `{weapon}` / `{setting}` slot
pattern lets downstream users regenerate the same HUD-accurate gameplay
framing for other Chinese historical figures (e.g. Yue Fei, Huo Qubing)
or wholly custom warriors, without having to rebuild the HUD-and-render
boilerplate from scratch.
Co-authored-by: Tuola Ge <gexingli@refly.ai>
|
||
|
|
6789dd4c11
|
feat(prompt-templates): add dance storyboard and ancient-china MMO HUD templates (#187)
* feat(prompt-templates): add dance storyboard and ancient-china MMO HUD templates - social-media-post-sensational-girl-dance-storyboard-8-shots: 8-shot storyboard prompt set with shared global style tokens, negative prompt, and character lock, tuned for GPT-Image-2. Produces a continuous dance choreography as a coherent 8-frame sequence. - game-ui-ancient-china-open-world-mmo-hud: HUD mockup for a Black Myth: Wukong style ancient-China open-world MMO, centered on a female swordswoman protagonist. Covers character panel, minimap with bagua frame, skill hotbar, quest tracker, chat window, and world-space nameplates with Chinese typography rules. - scripts/import-prompt-templates.mjs: preserve hand-authored templates on re-run by keeping any JSON whose source.repo is not the upstream CC-BY corpus. Previously clearDir wiped the whole directory, which would delete first-party curated prompts on the next import. Both templates carry source attribution to nexu-io/open-design under Apache-2.0. Categories reuse the existing 'Social Media Post' and 'Game UI' enum values already present in the gallery. * feat(prompt-templates): add preview images for dance and MMO HUD templates - assets/prompt-templates/image/social-media-post-sensational-girl-dance-storyboard-8-shots.jpg: an 8-panel storyboard render produced from the template itself, downscaled to 1024x1536 JPEG for gallery thumbnails. - assets/prompt-templates/image/game-ui-ancient-china-open-world-mmo-hud.jpg: a reference HUD screenshot rendered from the template prompt via gpt-image-2, downscaled to 1536x1024 JPEG. - Both templates now reference these previews via a raw.githubusercontent.com URL pointing at nexu-io/open-design main, matching the pattern used by the existing YouMind-sourced seeds (cms-assets.youmind.com) so every card in the Prompt Gallery carries a thumbnail once the PR merges. --------- Co-authored-by: Joey <joey@open-design.local> |
||
|
|
3f266103b0
|
feat(media): port generation workflow onto main (#12)
Co-authored-by: Elian <elian@EliandeMacBook-Pro.local> |