Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

chore: simplify contributor validation and test environment setup

罗高2ce2f8caba67
diff --git a/AGENTS.md b/AGENTS.md
index 6fc0c34d..e855f3e6 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -2,7 +2,15 @@
OpenMotion is a standalone npm application at the repository root. 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](docs/repository-migration.md), keep user data and credentials outside the checkout, and preserve third-party licenses.
-Before publishing a branch, run `npm ci`, `npm run check`, `npm run typecheck:studio`, `npm run build:studio`, affected deterministic tests and the applicable packaging/installation checks. Distinguish CI, target-machine installation, model creation and human content acceptance. This feature migration must not merge or publish packages unless separately authorized.
+## 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:studio` and 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.
+
+Local check selection does not change the full PR CI gate. 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
diff --git a/CLAUDE.md b/CLAUDE.md
index 03d1fec2..8ae6ef90 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -1,15 +1,3 @@
-# OpenDesign · Claude Code
+# Claude Code
-开始本仓库的工作前,读取并遵循 [AGENTS.md](AGENTS.md)。它是与 Codex 及其他 Agent 共用的仓库准则。
-
-## Repository collaboration instructions
-
-Follow the [shared repository collaboration instructions](AGENTS.md#repository-collaboration-instructions). All commit messages, including subjects and bodies, must be in English. All issue and pull request titles and descriptions, comments, review summaries, discussions, and release notes you create or update must also be in English, regardless of the user's request language. Verify this before committing or submitting. Keep persistent repository instructions in `AGENTS.md` and keep this entry aligned.
-
-## Product documentation
-
-Follow the [shared product architecture review guidance](AGENTS.md#product-architecture-review). For every change, review the entire [product architecture](docs/product/architecture.md) and assess whether it remains accurate and consistent. Update it only when needed, keeping related sections and supporting docs consistent. If it remains accurate, leave it unchanged; there is no automatic documentation update or mandatory per-change record. Use the [documentation index](docs/README.md) for related topics and verify links when editing.
-
-制作影片时按 AGENTS.md 根据本轮意图直接选择入口;原创/局部动作与声音重新设计、创作审片由 director 承接,既定决定下的工程操作由 production 承接。专业入口复用共享上下文,无需前置 production。模板路线已接入 motion-template-to-video,motion-recreate 已接入实际复刻流程及其自带的参考、测量脚本,边界与 MCP 调用见 [Skill 路由](docs/skills.md)。共享工程和成片验证继续适用。仓库代码与文档维护不需要启动影片制作问卷。
-
-视频转可复用模板单独进入 motion-video-to-template;两条模板入口的边界见 AGENTS.md 的 Template production and reuse。
+Read and follow [AGENTS.md](AGENTS.md) before working in this repository. It is the shared source of instructions for all Agents.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 63d9c60b..9b2265f1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,11 +2,11 @@
[简体中文](CONTRIBUTING.zh-CN.md)
-Work from the repository root; read [AGENTS.md](AGENTS.md) and the [architecture](docs/product/architecture.md). Use the pinned CI Node version and `npm ci`. Keep `package-lock.json` and `scripts/runtime-lock.json` in sync with any intentional dependency change.
+Work from the repository root; read [AGENTS.md](AGENTS.md) and the [architecture](docs/product/architecture.md). Use the pinned CI Node version. Keep `package-lock.json` and `scripts/runtime-lock.json` in sync with any intentional dependency change.
-Before opening a PR, run `npm run check`, `npm run typecheck:studio`, `npm run build:studio` and focused deterministic tests for the changed boundary. Studio unit tests use `npm run test:studio`. Model creation and visual acceptance require separate evidence. Do not overwrite real user data or host configuration to test an installer.
+Before opening a PR, follow the [local validation guidance](AGENTS.md#local-validation) and report the checks you actually ran. Studio unit tests use `npm run test:studio`. Model creation and visual acceptance require separate evidence. Do not overwrite real user data or host configuration to test an installer.
-Keep PRs focused and describe the user-visible behavior and actual validation. Open an issue first for substantial changes. Review the entire product architecture for each change and update it only when needed, following the [shared guidance](AGENTS.md#product-architecture-review); documentation edits are not required in every PR. Preserve existing Git history and push follow-up commits during review; do not force-push a shared branch.
+Keep PRs focused and describe the user-visible behavior and actual validation. Discuss substantial changes in an existing issue, requirement or PR description; a separate issue is not required when the work is already defined. Review the entire product architecture for each change and update it only when needed, following the [shared guidance](AGENTS.md#product-architecture-review); documentation edits are not required in every PR. Preserve existing Git history and push follow-up commits during review; do not force-push a shared branch.
Only deliberately public documentation belongs here. Do not commit credentials, internal links, private plans, workstation paths or user projects. Distribution uses the positive list in `scripts/distribution.ts`; newly shipped files require an explicit decision. Preserve all upstream attribution and license notices. Do not add telemetry or publish a package without a separate decision.
diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md
index afe6274c..3339d88b 100644
--- a/CONTRIBUTING.zh-CN.md
+++ b/CONTRIBUTING.zh-CN.md
@@ -2,11 +2,11 @@
[English](CONTRIBUTING.md)
-从仓库根目录开发,先读 [AGENTS.md](AGENTS.md)、[产品架构](docs/product/architecture.md) 和相关专题。使用 CI 固定的 Node 版本及 `npm ci`;依赖变更需同步维护 `package-lock.json` 与 `scripts/runtime-lock.json`。
+从仓库根目录开发,先读 [AGENTS.md](AGENTS.md)、[产品架构](docs/product/architecture.md) 和相关专题。使用 CI 固定的 Node 版本;依赖变更需同步维护 `package-lock.json` 与 `scripts/runtime-lock.json`。
-提交 PR 前运行 `npm run check`、`npm run typecheck:studio`、`npm run build:studio` 与受影响的确定性测试。Studio 单测用 `npm run test:studio`。模型创作与人工视觉验收单独记录,不覆盖真实工程或日常宿主配置。
+提交 PR 前按[本地验证指引](AGENTS.md#local-validation)选择检查,并说明实际运行的检查。Studio 单测用 `npm run test:studio`。模型创作与人工视觉验收单独记录,不覆盖真实工程或日常宿主配置。
-PR 聚焦一个问题,说明实际变化和验证结果,较大改动先建 issue。每次变更整体审视产品架构,按[共同准则](AGENTS.md#product-architecture-review)判断是否需要更新,不要求每个 PR 修改文档。保留历史,用后续提交响应评审,不强推共享分支。
+PR 聚焦一个问题,说明实际变化和验证结果。较大改动可在已有 issue、需求单或 PR 描述中讨论;工作范围已明确时,无需另建 issue。每次变更整体审视产品架构,按[共同准则](AGENTS.md#product-architecture-review)判断是否需要更新,不要求每个 PR 修改文档。保留历史,用后续提交响应评审,不强推共享分支。
不提交凭据、内部链接、私有计划、机器路径或用户工程。打包只使用 `scripts/distribution.ts` 的正向清单;新增分发文件需明确批准。保留上游许可与署名,不自行增加遥测或发布包。
diff --git a/scripts/smoke-npm-package.mjs b/scripts/smoke-npm-package.mjs
index 43474149..dcac23f7 100644
--- a/scripts/smoke-npm-package.mjs
+++ b/scripts/smoke-npm-package.mjs
@@ -21,7 +21,7 @@ export async function smokeNpm(filename, codexJS) {
const profile = path.join(out, 'codex'), project = path.join(out, 'project'), skills = path.join(project, '.agents/skills');
await mkdir(profile); await mkdir(project);
await writeFile(path.join(profile, 'config.toml'), 'cli_auth_credentials_store = "file"\nmcp_oauth_credentials_store = "file"\n[mcp_servers.unrelated]\ncommand = "keep-this-server"\n');
- const env = { ...process.env, CODEX_HOME: profile, PORT: process.env.D4_LANE_PORT_RANGE?.split('-')[0] || process.env.SEATS_PORT || process.env.PORT || String(await testPort()) };
+ const env = { ...process.env, CODEX_HOME: profile, PORT: process.env.PORT || String(await testPort()) };
for (const key of ['HYPERFRAMES_FFMPEG_PATH', 'HYPERFRAMES_FFPROBE_PATH', 'HYPERFRAMES_BROWSER_PATH', 'FFMPEG_PATH', 'FFPROBE_PATH', 'MOTION_BROWSER_PATH']) delete env[key];
const npm = process.env.npm_execpath || path.join(path.dirname(process.execPath), process.platform === 'win32' ? 'node_modules/npm/bin/npm-cli.js' : '../lib/node_modules/npm/bin/npm-cli.js');
const setup = [npm, 'exec', '--yes', '--package', installer, '--', 'openmotion', 'setup', '--host', 'codex', '--manifest', filename, '--home', home, '--data-dir', data, '--skills-dir', skills, '--codex', codexJS];
diff --git a/scripts/smoke-test-package.mjs b/scripts/smoke-test-package.mjs
index af53bd2c..a160e292 100644
--- a/scripts/smoke-test-package.mjs
+++ b/scripts/smoke-test-package.mjs
@@ -39,7 +39,7 @@ export async function smoke(archive, codexJS, preparedBundle) {
const data = path.join(out, 'user-projects'), profile = path.join(out, 'isolated-codex');
await mkdir(profile, { recursive: true });
await writeFile(path.join(profile, 'config.toml'), 'cli_auth_credentials_store = "file"\nmcp_oauth_credentials_store = "file"\n');
- const env = { ...process.env, CODEX_HOME: profile, MOTION_DATA_DIR: data, PORT: process.env.D4_LANE_PORT_RANGE?.split('-')[0] || process.env.SEATS_PORT || process.env.PORT || String(await testPort()) };
+ const env = { ...process.env, CODEX_HOME: profile, MOTION_DATA_DIR: data, PORT: process.env.PORT || String(await testPort()) };
await run(node, ['--import', './bootstrap.mjs', '-e', 'console.log("Bundled runtime ready")'], { cwd: bundle, env });
await run(node, ['scripts/configure-plugin.mjs'], { cwd: bundle, env });
const timings = {};
diff --git a/tracking/INTEGRATION.md b/tracking/INTEGRATION.md
index 0dc74742..b43fa600 100644
--- a/tracking/INTEGRATION.md
+++ b/tracking/INTEGRATION.md
@@ -248,9 +248,9 @@ node --experimental-strip-types --test tests/tracking.test.ts
npm run test:studio -- studio/src/motion/tracking.test.ts
```
-Before branch publication, also complete the install and affected packaging checks
-required by `AGENTS.md`; the list above is not a replacement. Browser checks use
-the existing shared browser-lock lanes. Documentation-only edits need link/content
+Before branch publication, follow the [local validation guidance](../AGENTS.md#local-validation),
+including affected install and packaging checks. The list above covers tracking
+changes, not every documentation edit. Documentation-only edits need link/content
checks and applicable repository gates, not invented product events.
## Read back a marked live run