Commit graph

12 commits

Author SHA1 Message Date
Sid
8bcd96f5e5
fix(frames): resolve relative screen= against embedder URL (#2316)
Shared device frames serve at /frames/<name>.html and previously
assigned the raw ?screen= value to the inner iframe.src. A
project-relative value like screen=screens/foo.html resolved against
/frames/, producing /frames/screens/foo.html (404), instead of the
embedding project's /api/projects/:id/raw/screens/foo.html.

The five frame HTML files now resolve relative ?screen= values
against document.referrer when present (the embedding project
preview), falling back to location.href so standalone /frames/*
loads keep working. Absolute and root-relative paths are passed
through unchanged.

Adds an e2e Vitest spec that evaluates each frame's inline <script>
in a Node vm and asserts iframe.src under five scenarios per file
(25 cases total): project-relative against referrer, root-relative
pass-through, absolute pass-through, empty referrer fallback, and
missing ?screen= no-op.

Fixes #2234
2026-05-20 10:03:01 +08:00
mar2181
1456cc4c14
feat(community-pets): add dentist mascot (#1924)
A friendly stylized chibi dentist in white scrubs and surgical mask.
8x9 atlas (1536x1872 webp) covering idle, run-left/right, waving,
jumping, failed, waiting, running, review states.
2026-05-17 20:45:53 +08:00
Nicholas-Xiong
31f89f74fd
fix: remove Trump pet from bundled community pets (#1103)
Fixes #1042

Problem:
The Trump pet was included in the bundled community pets catalog, which
appeared in the Built-in pet adoption picker. This raised concerns about
keeping politically-charged content in the default pet selection.

Solution:
- Removed the trump pet directory from assets/community-pets/
- Removed 'trump' from the BUNDLED_PETS list in bake-community-pets.ts

The pet is still available on Codex Pet Share for users who want to
download it manually, but it no longer ships as a built-in option.

Impact:
- Trump pet no longer appears in the default pet adoption picker
- Users can still access it via "Download community pets" if desired
- Keeps the built-in pet selection neutral and welcoming

Related:
- PR #850 (previous attempt that was closed without merging)
2026-05-10 12:11:00 +08:00
Tom Huang
6fa2077651
feat(web): add pet companion with Codex hatch-pet integration (#296)
* feat(web): add pet companion with Codex hatch-pet integration

Introduces a customizable floating pet companion (overlay + entry-view rail
+ composer menu + dedicated Settings → Pets section) that supports built-in
pets, user customization (glyph/image/spritesheet), and one-click adoption
of pets packaged by the upstream Codex `hatch-pet` skill via a new
`/api/codex-pets` daemon endpoint. Vendors the unmodified `hatch-pet`
skill under `skills/hatch-pet/` and adds i18n strings across all locales.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(scripts): sync community Codex pets from public catalogs

Adds `pnpm sync:community-pets` which fetches all pets from
codex-pet-share.pages.dev (paginated Supabase Functions API) and
j20.nz/hatchery (single-shot JSON), then writes each one as
`<id>/pet.json` + `<id>/spritesheet.webp` under
`\${CODEX_HOME:-\$HOME/.codex}/pets/`. The existing daemon
`codex-pets` registry already scans that folder, so synced pets
appear under Settings → Pets → Recently hatched and adopt with one
click — no manual upload. Supports --source/--out/--force/--limit
flags and validates magic bytes so HTML error pages never end up
masquerading as `.webp` files.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(daemon): tighten codex-pets validation and document vendoring

- sanitizeId now rejects ids that still contain `..` after collapsing,
  closing a defensive gap on the path-traversal guard for the
  `/api/codex-pets/:id/spritesheet` route.
- listCodexPets emits the sanitised folder name as the public id so the
  download route resolves directly against the on-disk folder, even when
  `manifest.id` differs (manual drops, sanitiser-touched manifests).
- Drop `@ts-nocheck` from `codex-pets.ts`; module is now strict-typed
  with explicit interfaces, an unknown-narrowed JSON.parse path, and a
  `pickString` helper guarding manifest fields one by one.
- Restrict the spritesheet response CORS header to sandboxed-iframe
  callers (Origin: null) instead of unconditional `*`, matching the
  existing raw-file route pattern. Same-origin web traffic does not
  need the header (web proxies `/api/*` through the daemon).
- Add `skills/hatch-pet/README.md` explaining the vendoring trade-off,
  provenance, and re-sync procedure.
- Add `docs/codex-pets.md` covering where pets live, how to populate the
  registry without Codex installed, and the manifest contract.

Generated-By: looper 0.4.0 (runner=fixer, agent=claude-code)

* fix(i18n): add pet.* keys to Hungarian locale

Hungarian locale was added on main after this branch diverged, so the new
pet.* dictionary keys never landed there and tsc -b reports hu's Dict as
incomplete once main is merged in.

Generated-By: looper 0.4.0 (runner=fixer, agent=claude-code)

* feat(web): atlas-driven pet animations + bundled community pets

Builds on the existing pet companion (#296) with a richer animation
loop, a curated set of community pets that ship with the repo, and a
one-click sync into ~/.codex/pets/.

- Atlas-mode rendering: PetSpriteFace can now play the full Codex 8x9
  sprite atlas and swap rows from a JS-driven frame index. PetOverlay
  classifies pointer interactions (idle / hover / drag-direction /
  long-idle waiting) and maps them to the matching atlas row, so the
  pet waves on hover, runs on drag, and falls into a waiting pose
  after 6s of stillness. Single-strip pets keep their existing CSS
  steps() animation, with the steps timing fixed to jump-none so frame
  cells line up on cell boundaries.
- Atlas adoption: PetSettings exposes both "Use full atlas (animated)"
  and "Freeze to this row" — full mode keeps every row for the
  interaction state machine, single-row mode crops one strip via the
  existing canvas helper. New prepareCodexAtlas downscales the atlas
  to a localStorage-friendly PNG while preserving the grid layout.
- Settings tabs: pet sources are now split into Built-in / Custom /
  Community tabs so each origin gets its own dedicated surface.
- Bundled pets: scripts/bake-community-pets.ts seeds a curated set
  (clippit, dario, nyako-shigure, slavik, trump, tux, yelling-dario,
  yorha-sit-2b) into assets/community-pets/. The daemon scans this
  alongside the user's ~/.codex/pets/ root, with user pets winning
  when ids collide. CodexPetSummary gains a `bundled` flag so the UI
  can tag those cards with a "Bundled" pill.
- One-click community sync: daemon-side port of sync-community-pets
  exposed via POST /api/codex-pets/sync. Returns the same
  wrote/skipped/failed/total summary the CLI prints. Web Pet settings
  surface this as a "Download community pets" button under the
  Community tab.
- Avatar dropdown + hide rail: EntryView's avatar button is now a
  small menu (mirrors the project-view AvatarMenu) with toggles for
  hiding/showing the pet rail and opening Settings. PetRail gets a
  matching × button for the same hide flow.
- Locales: 7 new pet.* keys for tabs, sync, hide/show, atlas full
  mode, and the Bundled pill — translated into all 13 supported
  locales.

Typechecks pass across all workspace packages; daemon + web vitest
suites stay green.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(web): bundled-pets built-in tab, ambient atlas animations, and community sync button

The Built-in tab now sources its catalog from the bundled spritesheets
at `assets/community-pets/` instead of the eight emoji placeholders that
felt boring next to the Codex hatch-pet atlases.

- Daemon: `listCodexPets` flags `bundled: true` by curated-set membership
  in `assets/community-pets/`, not by which folder the sprite happened to
  be read from. Previously a fully-synced user inbox preempted every
  bundled id and left the tab empty.
- Settings → Pets → Built-in renders the same sprite-card grid as
  Community, filtered by `bundled: true`, and reuses the existing
  `adoptCodexPet` flow. Community tab filters to non-bundled so the
  curated set never appears twice.
- Community tab gains the long-promised "Download community pets"
  trigger that calls `/api/codex-pets/sync` and shows an inline status
  line for the run summary. Strings already existed in every locale; we
  just plumbed the button.
- `PetOverlay` gets ambient atlas-row choreography — while idle, the
  overlay occasionally swaps `idle` for a random non-idle row (wave /
  hop / look) so the pet doesn't feel frozen. User gestures cancel the
  beat and take over instantly. `pickAmbientRow` lives next to
  `pickAtlasRow` so both row pickers share the fallback discipline.
- One-shot `migrateCustomPetAtlas` heals configs adopted before the
  overlay learned row switching by re-downloading the full spritesheet
  so hover / drag / ambient variety light up on next launch.
- `BUILT_IN_PETS` is now an empty array (the type stays for backwards
  compat); legacy configs whose `petId` still points at an emoji id
  (`mochi`, `pixel`, …) fall back to the user's custom slot in
  `resolveActivePet` so the overlay never renders blank.
- i18n: refresh `pet.tabBuiltInHint` (drop "emoji companions") and add
  `pet.builtInEmpty` across all locales.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-02 23:45:39 +08:00
Joey-nexu
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>
2026-05-02 22:05:19 +08:00
Tuola-waj
0e2085e361
feat(prompt-templates): add three Three Kingdoms ARPG Seedance 2.0 video templates (#212)
Adds three curated first-party video prompt templates to
`prompt-templates/video/`, each with a matching MP4 preview and a
first-frame poster JPG under `assets/prompt-templates/video/`.

These are the direct video companions to the three image templates
opened in PR #207 (Three Kingdoms ARPG screenshot set). Each video
clip is a ~10-12s in-engine cinematic action beat that brings the
corresponding still to life; the two surfaces can be served as a
pair (still → video).

### New templates

1. `video-seedance-three-kingdoms-lyubu-yuanmen-archery.json`
   ~10s. Lyu Bu (吕布) at the yuanmen between two armies — draws,
   holds, releases one gold-qi arrow toward a distant halberd.
   Companion to image template
   `game-screenshot-three-kingdoms-lyubu-yuanmen-archery`.

2. `video-seedance-three-kingdoms-guanyu-slaying-yanliang.json`
   ~10s. Guan Yu (关羽) on Red Hare — charges, raises the Green
   Dragon Crescent Blade, executes a single clean diagonal cleave
   past Yan Liang. No blood on-screen (the strike is implied by a
   short gold-into-jade qi flash). Companion to image template
   `game-screenshot-three-kingdoms-guanyu-slaying-yanliang`.

3. `video-seedance-three-kingdoms-zhaoyun-cradle-escape.json`
   ~12s. Zhao Yun (赵云) at Changban — rides with the infant A Dou
   cradled in a red silk sling on his chest, parries one incoming
   saber with a clean PERFECT DODGE, vaults a fallen war-chariot
   and clears a path. Hard safety rail in the prompt: the infant
   must stay visible, peaceful and obviously unharmed in every
   frame. Companion to image template
   `game-screenshot-three-kingdoms-zhaoyun-cradle-escape`.

Each template is tuned for `seedance-2.0`, aspect `16:9`, category
`Cinematic` (reuses the existing category — 17 templates already
live there). Every prompt is explicitly in-engine camera-disciplined
(single continuous beat, no cuts, no slow-motion ramps, no whip pans)
and HUD-free (the companion image template carries the HUD), so
reviewers and downstream users can treat the still + clip as a matched
production pair.

Each template exposes 5-7 `{argument}` slots (reference_image /
environment / hero / weapon / target / mount / qi_color / parry_color
/ infant / attacker as appropriate) so users can restyle the same
shot scaffold for any Three Kingdoms (or, with heavier edits, any
historical battlefield) scene.

### Assets

| File | Size |
| --- | --- |
| `video-seedance-three-kingdoms-lyubu-yuanmen-archery.mp4` | 7.6 MB |
| `video-seedance-three-kingdoms-guanyu-slaying-yanliang.mp4` | 10.3 MB |
| `video-seedance-three-kingdoms-zhaoyun-cradle-escape.mp4` | 11.7 MB |
| 3 × first-frame `-poster.jpg` | 445-527 KB each |

Total: ~30 MB across 3 MP4s, each well under GitHub's 100 MB
single-file limit. Hosted in-repo on `raw.githubusercontent.com`
for a fully self-contained first-party contribution — no external
CDN dependency.

### Verification

- `node -e "JSON.parse(...)"` passes on all three new templates.
- Slugs do not collide with any existing video template on `main`.
- `previewImageUrl` (poster) and `previewVideoUrl` (mp4) both point
  at the new in-repo asset paths.
- `source.repo = nexu-io/open-design`, `license = Apache-2.0`,
  `author = open-design contributors`, so the first-party guard in
  `scripts/import-prompt-templates.mjs` (added in #187) preserves
  these across importer re-runs.

### Why

The companion image PR (#207) gives users a beautiful Three
Kingdoms ARPG still they can generate via gpt-image-2; this PR
closes the loop by letting them turn that still into a believable
~10s in-engine clip via seedance-2.0 — the exact production flow
behind the Black-Myth-Wukong-style ARPG demo reel this workstream
is pitching. Paired still + video templates also double as a clean
reference for how first-party `open-design` contributors should
structure a matched set across the two surfaces (same slug suffix,
`companion-to-image` tag, cross-referenced `reference_image` argument,
same hero / environment language, no HUD in the video so HUD can be
sourced from the still).

Co-authored-by: Tuola Ge <gexingli@refly.ai>
2026-05-01 22:27:38 +08:00
Tuola-waj
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>
2026-05-01 22:27:07 +08:00
Tuola-waj
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>
2026-05-01 22:26:28 +08:00
Tuola-waj
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>
2026-05-01 22:22:11 +08:00
Joey-nexu
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>
2026-05-01 17:30:02 +08:00
Tom Huang
6f6bf31dd2
Refactor project name from "Open Claude Design" to "Open Design" (#1)
* Refactor project name from "Open Claude Design" to "Open Design"

- Updated project name in package.json, package-lock.json, and README files.
- Changed CLI commands and references from "ocd" to "od".
- Adjusted file structure references in documentation and code to reflect new naming conventions.
- Enhanced .gitignore to include new runtime data files.
- Updated metadata in LICENSE file to match new project name.

* Add contributing guidelines in English and Chinese

- Introduced CONTRIBUTING.md and CONTRIBUTING.zh-CN.md to provide clear instructions for contributors.
- Outlined contribution types, local setup instructions, and merging criteria for skills and design systems.
- Enhanced README files to reference the new contributing guidelines.
2026-04-28 16:03:35 +08:00
pftom
a98096a042 Add initial project structure with essential files
- Created .gitignore to exclude build artifacts and dependencies.
- Added index.html as the main entry point for the application.
- Included LICENSE file with Apache 2.0 terms.
- Initialized package.json and package-lock.json for project dependencies.
- Added pnpm-lock.yaml for package management.
- Created QUICKSTART.md for setup instructions.
- Added README.md and README.zh-CN.md for project documentation in English and Chinese.
2026-04-28 12:25:59 +08:00