* feat(game-static-play): add 274-template R2 zip packaging, cookieless static play deploy, and verification pipeline * feat(game-skill): port 21-section OpenGame skill with dual-mode workflow and fast-play path * feat(onboarding): upgrade Cloud MCP install guide and add shared OpenGame prompt builders * feat(game-catalog): sync 274 official templates, 4 kits, downloads manifest, and game contract * feat(cloud-mcp): add read-only game catalog, free asset search, guest catalog API, redirects, and Docker packaging * feat(opengame): enable Stage 1 Game Studio routing, feature flags, and analytics * feat(opengame): add Stage 1 market, multi-client modal, Cursor HTTP fix, SuperAgent prompt, and i18n * fix(opengame): align nullable GameCardWithMeta fields and add opengame-catalog MCP capability * test(mcp-onboarding): update registered public tool count from 22 to 24 for Stage 1 game tools * chore(game-catalog): register 26 verified live R2 in-repo template bundles in game-downloads.json * fix(opengame): address Stage 1 review feedback and failing CI lanes - Send no play URL when GAME_PLAY_PUBLIC_ORIGIN is unset instead of a main-site path that no route serves; Studio falls back to bundled in-repo templates - Keep legacy-host 301 redirects on the configured origin for network-path inputs - Correct the BlenderKit page host in the asset search allowlist - Reuse the shared withdrawn list, TOP earning tag, curated order and comparator in Studio - Remove the unused shared prompt module; the shipped builders stay covered by Studio tests - Drop the blurred launch backdrop and the in-dialog copy notices in favour of Toasts - Describe the shipped read-only Game Studio boundary and 24-tool MCP contract in the architecture - Schedule the game skill and static play suites in CI and budget the three OpenGame events * fix(game-static-play): retry stalled template bundle downloads before failing the run * fix(game-asset-search): size the pagination cursor limit for every supported query A 200-unit query with non-ASCII, control or lone-surrogate characters produced a cursor longer than the 512-character limit, so nextCursor was rejected by both the decoder and the public schema. Share one limit derived from the worst-case JSON/base64url expansion and add a round-trip test for maximum-length queries. * fix(game-asset-search): accept BlenderKit pages on www.blendkit.com and guide licence checks www.blenderkit.com now redirects to www.blendkit.com and the upstream catalog returns that host, so requiring www.blenderkit.com dropped every BlenderKit result. Restore the live host, pin a real upstream row in tests, and tell Agents to confirm the licence on the source page when a source omits it. * fix(deploy): forward game play origin and legacy redirect hosts to the API deploy/.env.example and deploy/k8s/configmap.yaml declared GAME_PLAY_PUBLIC_ORIGIN and APP_REDIRECT_FROM_HOSTS, but neither the compose api service nor the reference api Deployment passed them to the process. Wire both and assert that every reference ConfigMap key is read by a workload. * Address review: keep legacy-host writes, enforce play-origin isolation, share catalog constants - Legacy-host redirects answer GET/HEAD with 301 and every other method with 308, so MCP and API writes keep their method and body. - parseConfig rejects a GAME_PLAY_PUBLIC_ORIGIN that is not https (loopback http excepted), carries a path, or shares or sits under the APP_PUBLIC_ORIGIN host. - The template id pattern, bundle key prefix, withdrawn set and TOP tag predicate live in shared/game-contract.ts; static play, deploy/verify scripts and the catalog service reuse them and the shared bundle URL builder. - Remove unused game-contract and model-catalog exports. - Update the MCP contract, AGENTS.md, README and docs to the 24-name phase-one surface and document the read-only OpenGame tools and guest catalog routes. * fix(game-static-play): make the full play-site upload resumable Upload through the S3 SDK instead of one aws CLI process per file, skip objects whose ETag already matches the local MD5, retry each request with backoff, and write assets before entry pages and the manifest. Give large bundle downloads time for a slow link. Record the provisioned bucket, domain and remaining header rule in the runbook. * feat(game-static-play): harden live play verification and add manual R2 publish workflow * fix(opengame): raise prompt/remix maxLength for >4k OG-13 test and reset notes on target change * fix(mcp): register resources/templates/list handler for Codex MCP compliance * chore(game-catalog): register uploaded tidebreaker bundle for 274/274 R2 CDN parity --------- Co-authored-by: heggria <bshengtao@gmail.com>
39 KiB
OpenMotion repository guidelines
OpenMotion is a standalone container-first application at the repository root (stateless Hono API server src/entrypoints/api.ts, workload-split api / worker-media / worker-render / catalog-sync services backed by PostgreSQL, Redis/BullMQ, and S3 content-addressed storage, plus the diskless Studio SPA). Run commands here with the Node version pinned in .github/workflows/ci.yml. Preserve package-lock.json and scripts/runtime-lock.json; do not introduce workspace-only dependencies. Follow the migration guide, keep user data and credentials outside the checkout, and preserve third-party licenses.
Project editing
Follow the project editing contract for changes to persisted edits. Hosted Studio runs edit-core locally and submits prepared changes through the ordered project queue. Keep subsequent edits responsive while earlier receipts are outstanding. Remote MCP can run the same edit-core in the cloud. Verify identical saved results and project undo behavior.
Local validation
Before publishing a branch, select local checks for the changed boundary. Run npm ci when dependencies or lockfiles change, or installed dependencies are missing or stale; otherwise reuse the existing installation.
- Runtime or Studio changes: run
npm run check,npm run typecheck:studio,npm run build:studioand affected deterministic tests. - Skill, contract, installer or distribution changes: run the affected deterministic and packaging/installation checks.
- Prose-only changes that do not alter those boundaries: check links and run
git diff --check; no dependency reinstall or Studio build is required.
PR CI keeps repository policy, source scanning and release controls for every change. Only the explicit presentation-document allowlist skips Studio, rendering and package checks when installation sections and code blocks are unchanged; Skills, installation guides, examples and unknown paths retain the full gate. Maintainability analysis runs for code and configuration changes. Distinguish CI, target-machine installation, model creation and human content acceptance. This feature migration must not merge or publish packages unless separately authorized.
Repository collaboration instructions
Keep persistent user instructions for repository work in this file, and keep CLAUDE.md aligned with this shared source so every Agent follows the same rules.
- All commit messages must be in English, including both the subject and body, as well as merge and revert messages.
- All repository collaboration content you create or update must be in English: issue and pull request titles and descriptions, comments, review summaries, discussions, and release notes. This applies even when the user's request is in another language.
- Before committing or submitting repository content, verify that it follows these English-language requirements.
- Branch new work from the latest
mainand target all pull requests atmain. Merge reviewed changes directly intomainwhen authorized; do not usefeature/motionas an intermediate integration branch.
Repository PR review follow-up
For repository PR work, follow the contributor review checklist. Creating a PR or pushing a fix does not finish an active review task.
- Read the live PR head, unresolved threads, latest reviews, CI and mergeability before acting. Do not rely on a previous commit's status.
- Verify each review claim. Fix real issues, run boundary-appropriate validation and push follow-up commits while preserving shared history. For incorrect feedback, reply with concrete code or reproduction evidence.
- Reply to each addressed thread with the commit and checks, then resolve it when permitted. Keep unanswered or disputed feedback visible and report what remains; do not dismiss change requests or close discussions merely to unblock merging.
- Address failing required CI and conflicts. Use an isolated worktree when the active checkout contains unrelated work. After a fix push, re-request prior reviewers who have not reviewed the new head when permitted; otherwise report pending re-review. Do not add or ping unrelated people to solicit a merge.
- Re-read the live state before reporting. Summarize what was fixed, unresolved threads, CI and conflicts, including pending re-review or an external blocker. When waiting, state what is pending rather than claiming completion.
Merge and publication authorization remain separate from review cleanup. These steps do not grant permission to merge, bypass required checks or publish a package.
Automatic waiting during PR follow-up
During an ongoing PR follow-up task, use the current client's available monitoring or waiting tools to continue when CI or reviews change:
- Claude Code: when this session exposes
Monitor, prefer it to watch the PR and resume the review loop on relevant changes. Use persistent monitoring only as supported by the actual tool; inspect its schema rather than assuming every client/version has it. - Codex, OpenCode and other clients: prefer a native monitor/wait capability when exposed. Otherwise keep a lightweight shell wait active in the current agent session, sampling PR metadata about every 30 seconds and returning when the state changes or its wait deadline is reached. Re-arm the wait while follow-up remains active.
- Compare the head/base commits, review threads (including replies/edits and resolution), latest reviews and mergeability. Fold checks into one CI phase (
pending,passed,failedormissing) so each individual green job does not restart the review pass. Wake the Agent for a changed state, then verify the actual feedback/check before acting. - Stop when the requested follow-up is complete, the PR closes/merges, the user stops it or an external blocker needs the user. Report the exact remaining state. An approved PR with required checks green still needs existing merge authorization.
- A session wait does not survive closing the client. Only promise unattended follow-up after session closure when a durable runner has actually been configured for that scope; otherwise leave the PR URL, head, pending items and resume instructions for the next session.
Repository contribution Skills
Source-checkout contributor Skills live under .agents/skills/. When adding or maintaining a built-in BYOK media provider, read .agents/skills/add-byok-provider/SKILL.md in this checkout. It covers provider research, implementation, references and verification. These repository-local Skills are excluded from application/plugin distribution and host installation; root skills/ continues to hold product workflows. Installed product copies may not contain .agents/skills/. Other Agents following CLAUDE.md use this same source-checkout guidance.
When applying or migrating an existing shared control in Studio, follow the ODUI apply Skill. For Open Design UI work, choose the repository-local Skill by intent. Use odui-dev for the local catalogue and live preview, odui-build to create or evolve a component, odui-apply to adopt an existing component in Studio, and odui-check before review. The component registry and component guide remain the shared source of truth. For OpenMotion / OpenDesign Next desktop client work (Electron thin shell, universal host bridge, local atomic capabilities, Web Connect Script, two-tier signed config, environment switching, auto-update, or desktop release workflows), follow the desktop client development Skill.
Shared design system — required for every Agent
All Agents must use packages/design-system for interface styling. Read that package's integration and change rules before creating or changing CSS, component appearance, themes, icons, fonts, loading states or brand assets. docs/design-system.md describes the product integration; brand guidance governs public brand material.
- One maintained source. Define shared visual decisions in
packages/design-system:tokens.jsonowns theme values and Studio aliases; package styles own reusable controls, materials and states; package assets own icons, fonts and brand artwork. Never create a second palette, font stack or copied component recipe inside a feature module. - Reference, do not duplicate. Application modules consume the package's CSS entry points, semantic variables, generated utilities and asset exports. Use existing roles for colors, typography, spacing, radii, shadows and motion. If a needed reusable role or recipe is missing, extend the design system first and then reference it from consumers. Do not introduce literal interface colors, fallback palettes or arbitrary visual values to bypass it.
- Keep the boundary useful. Features retain their layout, content, interactions and measured geometry. Domain values such as timeline coordinates, user-selected artwork colors, image pixels and authored video styles are not application-theme tokens. Do not theme project iframes, templates or third-party artwork as a side effect of changing the editor.
- Change the source, then generate. Run
npm run design:tokensafter changing token values or mirrored brand assets. Do not hand-edit generated CSS or compatibility mirrors. Old entry paths may forward to the package but must not become independent implementations. Preserve upstream attribution and font licenses. - Verify propagation. For shared visual changes, check the affected surfaces together, including both themes, startup/loading, controls and dialogs, template browsing and narrow layouts where applicable. Run
npm run design:checkand the boundary-appropriate validation above. Keep automated checks, browser inspection and human visual acceptance distinct. - Keep the visual workbench independent.
npm run design:devlaunches only the package-owned workbench. Its UI and Node service may depend on design-system sources and Node built-ins, never Studio, application services, project data or business modules. UI saves and Agent edits sharetokens.json; downstream modules consume the generated system through their normal build/refresh. Runnpm run design:testfor workbench changes. - Keep every Agent aligned.
AGENTS.mdis authoritative;CLAUDE.mdpoints to this section. Include this requirement in delegated task context and code reviews. A feature-local style exception must have a concrete domain reason; an older hard-coded value elsewhere is not permission to add another one.
The package is a local source module within the standalone root npm application. Do not add workspace-only dependencies or publish it without separate authorization.
README writing and acknowledgements
When creating or updating any README, including alternative drafts and translations, describe OpenMotion's own capabilities, workflows and the meaning of each example. Do not introduce other products as comparisons, inspiration or source labels in the main narrative, headings, feature descriptions or showcase copy. Avoid wording such as "From MotionGit", "inspired by Hypit" or "the alternative to ...".
Consolidate references to other products, upstream origins, comparisons and source acknowledgements in the final Acknowledgements section. Preserve required licenses, copyright notices and detailed provenance in their source files, and link them from that section. Describe external examples accurately without presenting them as OpenMotion-generated results.
Keep technical identifiers needed for setup, supported agent/model names and explicitly requested example brand names accurate; these factual labels are not invitations to add product comparisons or inspiration commentary. Before finishing a README edit, check that product-reference commentary appears only in the final acknowledgements.
UI design system and interaction feedback
Check the component library registry and contribution guide before adding a shared Studio control. Use the listed source import and update the live example when its recommended usage or behavior changes.
Record an exercised Studio consumer and an explicit adoption decision for each registered control. Follow the contribution steps when deciding whether to enforce reuse.
Use the shared Button, IconButton or Slider for new Studio actions and range controls. The design check blocks native <button> and <input type="range"> above the per-file legacy baseline. Lower the baseline when migrating a legacy control.
Follow the shared design system for all new or changed product UI. Reuse its components and semantic tokens in both light and dark themes; do not introduce page-specific palettes or native-looking replacement controls.
- Transient action feedback, including copy, download, save and failure notices, must use floating Toasts through the shared feedback layer. Never insert these messages below buttons or into normal document flow: showing or dismissing feedback must not move content or consume layout space.
- Reuse
useToastandStudioToastViewport; native dialogs must not cover or make the feedback inert. Notices must not steal focus, block the page or create another modal. Coalesce repeated feedback and respect reduced motion. - Use anchored, non-modal dropdowns for filtering and sorting, with immediate quick filters, or grouped draft selections using category tabs, a live match count and an in-panel Apply action. Preserve individually removable selections and clear-current/clear-all actions. Do not add a confirmation dialog for routine filtering or copying an Agent instruction.
- Keep hover surfaces rounded and inset with consistent padding, align icons and chevrons, and use one focus treatment per composite control while preserving visible keyboard focus.
- Use opaque, solid theme surfaces for product UI, including menus, Popovers, tooltips, dialogs and floating controls. Match the existing shared controls; do not add frosted glass, translucent content backgrounds or background blur (
backdrop-filter). Fix shared material recipes inpackages/design-systemrather than adding feature-local overrides. A modal scrim may dim the page with a uniform tint without blur; authored video and imported artwork remain independent content. - Reserve geometry for slow content with shared Skeletons and poster fallbacks. Resource errors replace their reserved content and provide recovery; do not leave indefinite loading after a known failure. Stop offscreen/background video work.
- Verify actual opened menus, Toasts, loading/error states and narrow layouts in both themes. A component rendered in source is not evidence that it layers or behaves correctly in the browser.
Workflows and guided UX
When building Workflows, Topic/Campaign/Role hubs, or any multi-step creation flow, make both manual execution and Agent handoff effortless, intuitive and approachable so users can complete the entire production smoothly without guesswork or form fatigue:
- Minimize cognitive load and form intimidation. Never greet users with a tall grid of raw fields. Prefer a single natural-language composer with inline or expandable parameter slots, clear example hints, sensible defaults carried from upstream steps, and one-click example presets (
Try:/ Clear). Keep secondary parameters tucked behind progressive disclosure toggles (such as More parameters / Hide parameters or All fields). - Support dual-mode workspaces cleanly (
Step by stepandAgent mode). In Step by step manual mode, keep step navigation non-linear alongside a collapsible Assets panel, natural prompt inputs, and one obvious primary action per step. In Agent mode (?mode=agent), place shared Assets inline at the top left above a single Prompt & parameters composer (Prompttextarea, primary parameters, and expandable secondary fields), and pair it on the right with a concise Copy for Agent primary CTA (copying compact workflow/run metadata, attached Assets references, andlibrary:*/resource:*Skills rather than repeating multi-paragraph step manuals), Preview prompt / Hide prompt toggle, and a grouped Skills workflow pipeline showing each step's Skills (openmotion_get_skillandopenmotion://workflow/*) with quick jumps into step-by-step mode. - Keep templates scenario-relevant and secondary. Surface only layouts that match the active workflow by default, and place broader template catalogs or link-existing-project pickers behind progressive disclosures (
Or reuse an existing Design page/Or link an existing Motion project) rather than mixing unrelated templates into a workflow. - Use calm guidance for normal progress. Unstarted steps and an empty Assets panel in a fresh draft are normal states, not errors. Hide empty zero-count filter chips until items exist, and use neutral inline hints with direct jump actions instead of stacked warning or alert banners.
- Speak plain, natural product language. Keep visible workflow titles, steps, buttons and hints free of technical or engineering jargon (such as "full chain", "pool", "shared pool assets", "handoff", "manifest", "bundle", "revision", "offline" or "downstream"). Name actions and outcomes in clear consumer-product terms (e.g., Workflows, Step by step, Agent mode, Skills workflow, Export, Assets, Copy for Agent, Start workflow).
- Keep visual hierarchy flat and clean. Avoid nested boxes inside boxes (
box-in-box) or repetitive borders on static headers, badges, step counters and checklist items. Group overview cards cleanly on the open canvas, reserve clear single-level borders for primary interactive cards, use subtle tonal fills and semantic step icons/colors, and avoid cluttering unstarted steps with empty status circles. - Support dual-track direct models and step-bound MCP write-back. Give every step direct multimodal generation (image, video, and audio via Generate media or native step controls) that places results straight into Assets, alongside Agent-mode Copy for Agent and step-scoped Copy MCP prompt (
runId,stepId,expectedRevision), a direct link to the MCP · Connect Agent guide, and Sync / focus-visibility refresh so external Agents can write generated, edited, or linked deliverables directly back into the active step, version history (recordIteration=true), and Assets.
AGENTS.md owns this requirement; CLAUDE.md links here. Apply it when designing, implementing and reviewing any workflow-oriented UI.
Core capabilities and shared APIs
Every new or extended core product capability must be callable by external Agents through the public MCP contract. This includes asset creation and management, model execution, references and versions, project import and editing, preview and export. Keep operations usable independently so external Agents can compose them into their own workflows.
- One capability implementation. Define atomic operations in shared domain services with maintained inputs, outputs and error semantics. MCP adapters and application API routes call that same implementation and use the same persisted data, jobs and provider integrations.
- Product interfaces compose the same operations. Build controls, workflows and in-app Agent experiences around developer and user needs. They invoke the same API or MCP capabilities exposed to external callers. HTTP and MCP may use different transport adapters, including browser file upload, while converging on the same validation and business execution. Keep presentation state in the UI and business rules in the shared service.
- Preserve operation semantics across entry points. Carry explicit workspace/project/asset identities, pinned references and versions, request deduplication, conflict protection, job status and cancellation through each applicable entry point. Reuse the existing credential boundary and native editing/save authority; do not create parallel state or execution paths for interface actions.
- Maintain both access paths together. When adding or changing a capability, update its public schema/discovery, applicable UI consumer, MCP onboarding and documentation in the same change. Verify equivalent results and relevant failure/conflict behavior through the affected adapters. Distinguish implemented coverage from planned capabilities and document any remaining gap explicitly.
AGENTS.md owns this requirement; CLAUDE.md links here. Apply it when designing, implementing and reviewing product capabilities.
Studio routing and shell boundaries
Follow Studio routing and lazy-loading architecture whenever adding, moving or modifying a Studio page or App Shell import.
- Keep
WorkspaceFrame.tsxa pure App Shell. Register every workspace page and overlay lazily instudio/src/router/lazyPages.ts(usinglazyWithChunkReloadand listing its module path inLAZY_PAGE_MODULE_PATHS), declare route metadata instudio/src/router/routeRegistry.ts, and render it throughRouteViewport.tsxorOverlayLayer.tsx. Never add static imports of feature pages back intoWorkspaceFrame.tsxorstudio/src/main.tsx. - Use canonical semantic path URLs and keep route registries aligned. Add new destinations as semantic paths across
shared/spa-routes.ts,studio/src/router/createAppRouter.tsx,studio/src/router/routeRegistry.ts, andstudio/src/motion/workspacePageRouting.tstogether. Do not introduce new/?page=...query routes; keepLegacyQueryRedirect.tsxstrictly for backward-compatible bookmarks and preserve orthogonal overlay/embed query parameters (?templates=1,?embed=1,?hostChrome=1,?tracking_context=). - Preserve shell dependency isolation. Never pull
@hyperframes/parsers(barrel entry),studio/src/utils/sourcePatcher.ts,studio/src/utils/studioHelpers.ts, lazy page modules, or raw Studio locale JSON into the static import graph ofstudio/src/main.tsx. Extract lightweight shared constants/helpers (such assettingsMeta.ts,regex.ts,historyShortcuts.ts) instead of importing page or editor modules from shell chrome. - Protect reserved backend and cloud prefixes. Keep frontend routes away from
/api,/motion-api,/design-api,/mcp,/mcp-ui,/connect,/sessions,/editor-assets,/guide-assets,/design-system,/web,/.well-knownand/__hyperframes_config, and keep asset/API paths root-relative (/). - Verify boundary regressions. Run
npm run check(scripts/check-routing.ts),studio/src/shellBoundary.test.ts,tests/spa-routes.test.ts, andnpm run build:studiowhen touching routes or shell imports; do not weaken boundary checks to silence a leak.
AGENTS.md owns this requirement; CLAUDE.md links here. Apply it to all Studio routing and shell work.
Desktop and viewport layout contract
Follow Desktop & Responsive Layout Contract whenever modifying Studio shells, overlays, dialogs, drawers, or desktop window chrome.
- Consume shared desktop safe-area variables. Default variables live in
packages/design-system/base.css(--om-desktop-safe-top,--om-desktop-inset-left,--om-desktop-inset-right,--om-desktop-titlebar-height) and--om-workspace-topis maintained byWorkspaceFrame.tsx. Never addposition: fixedfull-viewport overlays (inset: 0,top: 0) or centered modals (top: 50%) without--om-desktop-safe-top/--om-workspace-topclearance anddvhbounds. - Keep
.om-applicationa flex column. Never replace it with hardcodedgrid-template-rowscounts; optional banners (promo, auth recovery, status) must stack cleanly below.om-app-headerin desktop windowed mode. - Preserve platform & zoom invariants. In-flow Linux custom window controls keep
insetRight: 0; OS-overlaid insets (macOS traffic lights, WindowstitleBarOverlay) scale inversely withzoomFactor; never target a size container directly inside its own@containerrule. - Verify layout regressions. Run
npm run check(scripts/check-layout.ts) after any layout, modal, drawer, or desktop chrome edit; do not bypass or weaken the guard.
AGENTS.md owns this requirement; CLAUDE.md links here. Apply it to all Studio and desktop layout work.
Studio internationalization (i18n)
Follow Studio internationalization architecture and developer guide whenever adding or changing Studio copy or localization files.
- Author by module, bundle by locale. Keep translations organized by feature under
studio/src/i18n/*-ui.jsonand register every new module file instudio/src/i18n/manifest.ts(I18N_EXTENSION_SOURCES).studio/vite-i18n-plugin.tstransposes them at build time into 10 independent lazy locale chunks (enstays 0 KB). - Never statically import Studio locale JSON in runtime code. Production modules must consume translations through
useI18n()ortranslate()and must never statically importstudio/src/i18n/*.json,skill-library/*, orsourceCatalog.ts.studio/src/shellBoundary.test.tsenforces this boundary. - Complete translations, exact placeholders, no hardcoded bilingual branches. Provide all 10 non-English locales for every new UI JSON module, keep
{var}placeholders intact, avoid redefining existing keys with conflicting translations across files, and do not add newlocale === 'zh-CN'UI copy branches. - Verify i18n gates. Run
npm run check(scripts/check-i18n.ts),studio/src/shellBoundary.test.ts, and affectedstudio/src/i18n/*.test.*suites before finishing.
AGENTS.md owns this requirement; CLAUDE.md links here. Apply it to all Studio localization work.
Product architecture review
For every change, review the entire product architecture and decide whether it still accurately describes the product. Consider positioning, core user flows, module responsibilities, dependencies, data and API boundaries, implemented capabilities, and current limitations together.
Update the architecture only when the change makes it incomplete, inaccurate, or internally inconsistent. Keep the document coherent as a whole, and adjust related usage or technical documentation only where needed for consistency. If the architecture remains accurate, leave it unchanged; documentation edits and per-change records are not required for every commit or PR.
Use the documentation index for related topics. Distinguish implemented behavior, confirmed direction, hypotheses, and candidate designs. Preserve useful rationale and verification boundaries without inventing evidence. Check links and source references when editing documentation.
AGENTS.md is the shared source for all Agents; keep the CLAUDE.md entry aligned when these guidelines change. Distributable plugins include both entries and the approved documentation.
Video production entry points
Choose the entry for the current intent directly. Each Skill's description states its scope, and Skill routing summarises the five entries. openmotion-production handles scoped engineering under established creative decisions, preview, technical checks, troubleshooting and export; its start resource keeps short navigation and is not a mandatory router.
A directly selected specialist reads shared context and continues; do not bounce back to the production start. Small edits, audio-only changes, review-only and export-only requests resume their affected scope. Keep existing decisions and locked content. Repository development and documentation do not trigger video production.
Phase one retains twenty-four registered domain openmotion_ names (eighteen video/workspace names including the openmotion_assets compatibility alias, the two read-only OpenGame tools openmotion_game_catalog and openmotion_game_asset_search, plus four openmotion_design_* tools retained for Design Studio HTML projects, which return 501 FEATURE_DEFERRED_P2 in Cloud Phase 1) for non-App clients; negotiated MCP Apps connections additionally discover the read-only final-video presentation Tool (template recommendations remain an independent optional extension), defined in the contract. MCP clients connect over Streamable HTTP /mcp (OAuth 2.1 or workspace Personal Access Token; never browser session cookies) and read the same workflow guidance through resources/list and resources/read, beginning at openmotion://workflow/production/start or the already-selected specialist. The pinned engine guide is openmotion://engine/SKILL.md. The workflow-reading Tool is internal compatibility only. Media generation routes through the unified OpenDesign Model Gateway (MODEL_GATEWAY_MODE=opendesign, or MODEL_GATEWAY_MODE=mock for deterministic local fixtures) without workspace BYOK API-key forms; the supporting openmotion-media Skill (openmotion://workflow/media/start) and openmotion-design (openmotion://workflow/design/start) remain aligned with the five creative video routes. Follow conditional references and reuse complete document bodies. Native authoring belongs to the shared production/native guide. Technical export verification, visual quality and actual playback remain separate. See Skill routing.
MCP onboarding and capability maintenance
The Studio MCP · Connect Agent page is the maintained product entry for connecting external Agents over Streamable HTTP /mcp (http://127.0.0.1:4173/mcp for local Docker Compose, https://<domain>/mcp for cloud deployments) and discovering OpenMotion capabilities. Its plug icon is distinct from the model-gateway brain icon. Keep studio/src/motion/McpConnectionPage.tsx, mcpCapabilities.ts, mcpClients.ts, useIntegrationInfo.ts, their interface translations and shared/integration.ts aligned with the actual public contract and deployment.
When changing MCP tools, Streamable HTTP transport/auth (OAuth 2.1, PAT, AUTH_MODE=dev), unified OpenDesign Model Gateway capabilities, 3-way cloud asset import (prepare_upload + upload_ticket, SSRF-checked HTTPS url, zero-copy library_asset), production Skills, host adapters, template handoff, optional MCP Apps presentation or P1/P2 capability boundaries, review and update this page in the same change. Cover the affected setup steps, example prompts, template actions, capability descriptions, client compatibility (including ChatGPT Cloud on public HTTPS + OAuth 2.1), limits and FAQ. Use the deployment's actual /mcp endpoint and shared template catalogue; do not invent universal model access, free quota, BYOK key forms, legacy docker exec stdio flows or verified Agent connections. Distinguish twenty-four registered domain names (one compatibility alias, two read-only OpenGame tools, four Phase 2 Design Studio HTML tools) from negotiated presentation extensions.
The MCP main page is the product-wide capability and usage handbook. Every new or changed MCP capability, and every user-facing scenario composed from existing MCP operations, must appear there in the same change—even when no tool is added. Maintain the entry point, purpose, copyable example, prerequisites, recovery guidance and actual limitations alongside the implementation. Reuse shared instruction builders between feature entry points and the handbook so project identity, revision protection and delivery requirements cannot drift. Keep atomic tool discovery distinct from scenario examples; add coverage for both. For platform export, maintain the Export panel and handbook together, including independent-copy editing, host-dependent content analysis, verified export and manual platform upload.
Run tests/mcp-onboarding.test.ts to verify public-tool coverage and the affected Studio connection/model tests. Check opened client tabs, copy Toasts, manual configuration, loading/recovery, template handoff and narrow layouts in both themes. Workspace reachability, native host connection, paid media generation and human visual acceptance remain separate evidence. CLAUDE.md points to these shared requirements.
Template production and reuse
For changes under library/templates/catalog/, follow the contributor workflow. Commit editable project source under the template's source/ directory, refresh source/manifest.json, and keep template.json.entry.files paths, byte lengths and SHA-256 hashes aligned. Repository and hosted project files do not require r.open-design.ai URLs, a ZIP upload or a new sourceArchive; do not make those a contribution or test prerequisite. Existing CMS URLs remain migration inputs, and CMS-mode tests retain their separate download contract.
Local Studio/MCP read registered source files from the checkout; fetch optional LFS bytes for local validation. After final review, maintainers use Prepare and merge PR for media transfer and merge. After merging, the main catalog workflow publishes source objects and metadata to R2 automatically. Website CMS publication is a separate internal operation, only performed when explicitly requested. Do not ask contributors to upload revised project files or ZIPs to the old CMS service to complete a repository PR.
openmotion-template-to-video implements the default template route and reuses shared context/edit and managed-project revision protection. Unchanged requests are delivered by opening the template in the editor; edited content is checked by playing it in the editor preview, with native snapshots only for layout; completed video creation/content edits follow the shared final-video delivery flow; unchanged template opening and explicit draft, editor-only or review-only work do not render unless requested. openmotion-video-to-template separately produces a portable reusable template from a video; it does not replace ordinary video recreation. Visual acceptance belongs to the user. Repository work does not invoke production Skills.
Candidate and publication controls
New Agent connections default to the hosted Cloud MCP guide in docs/install.md (Streamable HTTP /mcp + OAuth 2.1). Legacy local source/stdio installation and the published npm guide template are archived in docs/templates/legacy-npm-install.md (consumed by scripts/install-guide.mjs and scripts/install-onboarding.mjs); only use legacy npm or local source installation when explicitly selected. Never silently mix cloud, local source and npm installations. Preserve existing installations, projects, credentials and unrelated host settings. npm remains the repository dependency/build tool.
Follow the release workflow manual: one manually dispatched Motion package and release entry with prepublish and publish modes, plus snapshot-only recovery. Select main for all entries; other execution refs are rejected for new release work. Select test (default, DEV templates) or stable (prod templates). Blank test versions use short workflow-counter test.N numbering; stable requires an explicit new MAJOR.MINOR.PATCH. Keep full run/source identities in the records. Use candidate-install.md for local testing and keep results private. Publishing requires the explicit publish mode. Reuse an existing candidate with its exact version and run ID, or build and validate within the publishing run. Public candidates must use an exact reviewed source SHA integrated into main. Scan tracked source plus the outer npm tgz and inner application; preserve the positive distribution list and licenses. Keep candidate, native registry installation, real Agent creation and human acceptance evidence separate.
Publication ordering reserves the historical 0.6.x namespace and starts the active series at 0.0.1. Use the shared publication comparator for npm channel protection, guide promotion, automatic test baselines and Notes history; retain standard SemVer comparison separately. Historical versions/snapshots remain immutable, and stale historical candidates must not replace active versions. Source 0.0.1 automatically builds 0.0.2-test.N when test version is empty. Existing range dependencies/lockfiles require explicit migration; no live tags or guides change until separately authorized publication. Start new publication/recovery dispatches from the latest main after cutover; do not rerun historical control snapshots that predate this ordering policy.
Stable release descriptions follow the changelog authoring guide. Maintain English and Chinese Unreleased drafts, then archive the selected exact stable version before building. Candidate preparation reads only that frozen source SHA; missing copy warns and retains an automatic draft, while malformed supplied copy fails. Publication reuses sealed Notes and preserves published maintainer edits. Changelog sources stay outside application/npm/plugin distribution; never rewrite a retained candidate to add copy or infer publication from a draft.
Each publication uses its exact sealed candidate bytes. Require both macOS and Windows candidate installs and a prepared immutable template snapshot before publishing npm. Test uploads under candidate and stable under stage; both tags are public. Verify the public tarball hash before advancing test or latest, then finalize the guide, catalog and Release. The existing motion-publish-test.yml filename remains the npm Trusted Publisher identity for both channels. npm publication and release snapshot recovery require separate manual authorization. Main-branch template synchronization is explicitly authorized to run automatically using the existing R2 release-bucket credentials, scoped in the workflow to the final upload step; it does not publish npm, move tags or update installation guides. These are shared bucket credentials, not template-only credentials. Consumer jobs receive neither npm OIDC nor R2 credentials. Archive-only work must not publish npm, move tags or access default entries. The read-only Motion installation check can recheck an exact public test or stable version independently. Never overwrite published versions, put private template payloads/internal acceptance material into public artifacts, or infer merge/publication authorization from green CI. Real prod template, Agent and audiovisual acceptance remain release responsibilities; hosted installation checks do not establish them. Skills marketplace publication, main registration, npm trust, main cutover and repository rename remain separate operations.