Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7636269
[feat] Improve the character replacement workflow
FayeSpica Nov 29, 2026
7fabf3e
docs: add Goodnight character replacement screenshot
FayeSpica Nov 29, 2026
97f3204
[fix] Preserve source identity and framing in replacement prompts
FayeSpica Nov 29, 2026
5144bef
[refactor] Keep the PR focused on character replacement
FayeSpica Nov 29, 2026
d9eb788
[test] Wait for real saves and decoded subject images in Nightly (#597)
wangtiance Nov 30, 2026
c3999f9
Merge main into character replacement workflow
FayeSpica Nov 30, 2026
d0e7f6f
[feat] agent: improve character replacement planning and prompts
FayeSpica Nov 30, 2026
dbb36f0
[bugfix] canvas: stop jobs that block applying node versions (#600)
wangtiance Nov 30, 2026
561c3d4
Add chat and canvas creation modes (#380)
congw729 Nov 30, 2026
7685c83
[docs] repo: require independent AI PR pre-review (#605)
david6666666 Nov 30, 2026
04a770c
[bugfix] storage: preserve saved canvas fingerprints (#601)
wangtiance Nov 30, 2026
7937a86
[bugfix] agent: detach stdin for OpenCode git init on Windows (#603)
Hniii98 Dec 1, 2026
2f16cd4
[docs] readme: replace the expired WeChat group QR code (#607)
princepride Dec 1, 2026
3ac0ce3
[docs] repo: require author self-review before PR submission (#610)
wangtiance Dec 1, 2026
68f1d53
[feat] provider: continuation, masked editing and keyframes for FastH…
princepride Dec 1, 2026
f85e5bf
[bugfix] canvas: name a material node after its asset when no title i…
princepride Dec 1, 2026
d819c15
[feat] harness: add Antigravity CLI runtime (#598)
Redivesue Dec 1, 2026
cf566d4
[bugfix] cli: take editing over from another window with --take-over …
princepride Dec 1, 2026
e3453a2
[feat] workflow: integrate local character replacement work
Dec 1, 2026
3d380e3
[feat] workflow: merge local work into character replacement PR
Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .agents/skills/opendirector-agent-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Read the upstream files at the revisions pinned by OpenDirector. If a matching c
- **Changes to Agent behavior or reliability** → [eval-harness](../../upstream/ecc/skills/eval-harness/SKILL.md#eval-types). Use **Eval Types** and the grader and repeat-run guidance in **Product Evals**. Grade observable effects through OpenDirector's test entry points and apply the project’s acceptance criteria.
- **Tool scope, workspace isolation, or sensitive trace output** → [agent-security-hardening](../../upstream/ecc/skills/agent-security-hardening/SKILL.md#hardening-workflow). Use **Map Trust Boundaries** and **Bound and Sanitize Tool Output** when reviewing the affected boundary.
- **Formal pull request review** → [opendirector-review](../opendirector-review/SKILL.md) for the review procedure. Apply the matching development references and the constraints below to the Agent change.
- **Submitting an AI-authored pull request** → Complete the [independent scoring step](../../../AGENTS.md#ai-authored-pr-submission) before opening the PR, updating its head, or marking it ready.

## OpenDirector constraints

Expand Down
15 changes: 14 additions & 1 deletion .agents/skills/opendirector-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: opendirector-review
description: Review one OpenDirector pull request tip, verify evidence, and report PASS, WITHHOLD, or REQUEST CHANGES. Use when asked to review or score an OpenDirector PR or tip.
description: Review one OpenDirector pull request tip, verify evidence, and report PASS, WITHHOLD, or REQUEST CHANGES. Use to review or score an OpenDirector PR or to score a committed candidate before submission.
---

# OpenDirector review
Expand Down Expand Up @@ -45,6 +45,19 @@ architecture pages indexed from [docs/README.md](../../../docs/README.md).
Review the tip against the fetched default branch. If the tip is itself
the rule change, say so and review that change.

## Score an unpublished candidate

For author-delegated pre-review, read the review guidance at the pinned
target base. Review the committed diff between the supplied base and head,
the draft PR body, any linked Issue, and the test and artifact evidence.
Apply the issue-fit, architecture, test, and evidence criteria below.
List applicable PR-triggered checks that have yet to run.

Keep this review read-only. Return findings and the
[advisory score](#advisory-score) to the author for the supplied SHAs.
Withhold the total on a stale or materially incomplete snapshot. Use
the live PR workflow and its verdicts below for formal PR review.

## Establish the tip

Record these from the remote before reading the narrative:
Expand Down
1 change: 1 addition & 0 deletions .agents/upstream/minimax-h3
Submodule minimax-h3 added at 199b7d
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Say what you ran locally and what you left to Release checks. Name checks you co

- Local:
- Left to CI:
- For AI-authored PRs, include the independent pre-review score, reviewed base and head, and any material validation gaps.

## Evidence that it works

Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
path = .agents/upstream/agents-best-practices
url = https://github.com/DenisSergeevitch/agents-best-practices.git
shallow = true
[submodule "minimax-h3"]
path = .agents/upstream/minimax-h3
url = https://github.com/MiniMax-AI/MiniMax-H3.git
shallow = true
26 changes: 26 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,32 @@ Acceptance focuses on output that actually meets creative requirements, recovera
- Production studios, complete scriptwriting and full-series delivery systems, additional model capabilities, and background rendering engines require explicit requirements; do not expand scope automatically because of the unified project model.
- When adding or changing user-visible content, follow the new-feature checklist in [Bilingual interface](docs/development/i18n.md) and run `npm run check:i18n`. Automated checks alone are insufficient; switch between both languages and inspect the new flow.

## AI-authored PR submission

Before opening an AI-authored PR, updating its head, or marking a draft
ready, the author first runs the
[OpenDirector review skill in candidate review mode](.agents/skills/opendirector-review/SKILL.md#score-an-unpublished-candidate)
on the committed diff against the full target base SHA. Use the intended
PR body and available check and artifact evidence to score the candidate
against the skill's rubric. Address findings, fill evidence gaps, and
rerun the self-review on the revised candidate before requesting
independent review.

Then start a separate subagent that did not contribute to the change.
Give it the full base and committed candidate head SHAs, the intended PR body,
and check and artifact evidence. Ask it to use the same candidate review
mode and return findings and a score.

Proceed when the subagent scores the candidate **at least 80/100** and
blocking findings are resolved. Address a lower or withheld score with
fixes or evidence, then request a fresh review. Before submission, confirm
the current target base and outgoing head still match the review. Rescore
if either SHA or any material claim or evidence changes. When no subagent
is available, keep submission pending and report the blocker.

Record the independent score, reviewed base and head, and material validation gaps
in the PR body. Follow the existing PR review and Release checks process.

## Documentation maintenance

Update this document when architectural principles or development direction change; do not maintain implementation progress here. The [documentation index and maintenance rules](docs/README.md) index the formal documentation, which is delivered with the code through Git.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Labels are short, English and prefixed by dimension, so issues and PRs can be fi
| --- | --- |
| `area:canvas` | Canvas, nodes, direct manipulation |
| `area:agent` | Agent runtime, assistant chat, tools |
| `area:harness` | Harness and skill integration (Default, OpenCode, Codex, Claude Code, JiuwenSwarm, DSH, Pi) |
| `area:harness` | Harness and skill integration (Default, OpenCode, Codex, Claude Code, JiuwenSwarm, DSH, Pi, Antigravity) |
| `area:provider` | Model providers and generation protocols |
| `area:assets` | Assets, library, reference inputs |
| `area:timeline` | Timeline, subtitles, export |
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ Use Chrome or Edge for MP4 export, and keep the page and editor open while rende

## Community

Join the **OpenDirector with vLLM-Omni (2)** WeChat group to discuss OpenDirector and share your creations. Scan the QR code below in WeChat, or click the image to view it at full resolution.
Join the **OpenDirector with vLLM-Omni (3)** WeChat group to discuss OpenDirector and share your creations. Scan the QR code below in WeChat, or click the image to view it at full resolution.

<p align="center">
<a href="docs/guides/assets/opendirector-wechat-group-2.png">
<img src="docs/guides/assets/opendirector-wechat-group-2.png" alt="QR code for the OpenDirector with vLLM-Omni (2) WeChat group" width="360" />
<a href="docs/guides/assets/opendirector-wechat-group-3.png">
<img src="docs/guides/assets/opendirector-wechat-group-3.png" alt="QR code for the OpenDirector with vLLM-Omni (3) WeChat group" width="360" />
</a>
</p>

Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ opendirector serve
欢迎加入 **OpenDirector** 交流群,交流 OpenDirector 的使用经验、分享创作。使用微信扫描下方二维码入群,点击图片可查看完整分辨率。

<p align="center">
<a href="docs/guides/assets/opendirector-wechat-group-2.png">
<img src="docs/guides/assets/opendirector-wechat-group-2.png" alt="OpenDirector with vLLM-Omni (2) 微信群二维码" width="360" />
<a href="docs/guides/assets/opendirector-wechat-group-3.png">
<img src="docs/guides/assets/opendirector-wechat-group-3.png" alt="OpenDirector with vLLM-Omni (3) 微信群二维码" width="360" />
</a>
</p>

Expand Down
58 changes: 58 additions & 0 deletions RFC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# RFC: Benchmark TTFA and TTC and Reduce Agent Tool Overhead

Draft for discussion

## Problem

In a face-replacement run, the execution record showed 1,224 calls, 1,209 completed and 15 failed. The Agent reported publishing an editable timeline and a finished video. Users have to open the trace to tell whether the Agent changed the project, is still waiting for generation, or hit an error that needs attention.

![The execution record in AI chat after a face-replacement task.](feature-assets/agent-perf/execution-record.png)

Six Bash calls waiting on 15 generation jobs produced 968 `job wait` requests (91.9% of CLI traffic). These included 954 status queries and 14 project snapshot reads. Of the status queries, 939 returned `queued` or `running`. All 939 counted as completed calls while their jobs were still in progress. [Polling loop](packages/core/src/opendirector/cli.py#L679)

Some errors led to avoidable retries. Five of 20 `generation submit` attempts failed. The gateway rejected two of those attempts because the Agent changed the input and reused the original call ID. The panel keeps the latest status per ID, so it showed 14 failed CLI records and one failed DeepSeek record. The CLI trace had 16 failed attempts out of 1,053. The 1,224 panel records came from 173 DeepSeek tool IDs and 1,051 CLI call IDs. Of the 15 generation jobs, 14 succeeded and one failed after the provider returned HTTP 500 during a status check. [Local trace](http://127.0.0.1:18000/?traceProject=4e200d00-f9e6-4b45-9f2f-50bf39cdb67c&turn=3f68aec5-8fc4-481b-914a-69e5de2f1078&runtime=deepseek) · [Panel summary](src/canvas/AssistantReply.tsx#L151) · [Tool updates](src/canvas/useAssistantChat.ts#L563) · [Call ID validation](packages/core/src/opendirector/agent/gateway.py#L48)

After sending an image prompt, users wait for an editable node to appear. The node can be visible while the image is still generating. The single-image benchmark times both waits from Send so we can see where users spend their time.

## Latency metrics

Both timers start when the user submits the prompt in AI chat. The browser benchmark uses the same Send click and monotonic clock for both. It requests one 2048 × 2048 PNG in an empty project. A fresh baseline with real models is pending. [Benchmark guide](docs/development/agent-image-benchmark.md)

| Metric | End event | Single-image benchmark |
| --- | --- | --- |
| TTFA (Time to First Action) | The first frame that shows a canvas change in the viewport from this turn's committed project state. | The new editable image node appears in the viewport. |
| TTC (Time to Completion) | The first frame that shows the requested result ready for use on the canvas. | The decoded image appears in the node. Verify that this turn's successful job produced the image and the preview matches the persisted asset adopted by the project. |

Use the same benchmark definition for baseline and candidate runs. Pin the following inputs for each case.

- The exact user prompt, any reference assets, and the starting project state.
- The Agent harness, including the resolved runtime and version and its tool and skill settings.
- The Agent model and image model, including their providers, model IDs, versions where available, and effective settings. Record settings such as the Agent's reasoning level and the image's generation size and output format.

Report P50 and P90 for both metrics and include sample counts, failures, and timeouts. Keep the TTFA sample if the node appears and generation later fails. The TTFA budget for an explicit single-image request is 3 seconds. Report the share of runs within 3 seconds and the share over 8 seconds. Set the TTC target after collecting the baseline. [Interaction budgets](docs/development/ui-performance.md#interaction-budgets) · [Browser benchmark](tests/browser/agent_image_latency.mjs)

## Tool calls and failures

- Count runtime tool calls, CLI attempts, and internal polling separately for each turn. Link requests to the parent tool call where the trace records that relationship. Use project receipts and subsequent actions to mark calls that advanced the task, necessary reads or waits, avoidable repeats, and calls with unclear purpose. Review a sample before automating the labels. For repeated reads, check the revision and whether the Agent used the result.
- Report failures as a share of attempts in each layer. Include error codes, retry outcomes, and generation job status. Start with reproducible parameter, contract, revision, and call ID errors.

## Parallel work items

T1 and T2 can start with the DeepSeek video trace. T3 and T4 can profile the existing single-image case while T5 defines the shared benchmark for final comparisons.

| Task | Work | Acceptance |
| --- | --- | --- |
| T1. Explain and reduce avoidable calls | Reconcile the execution record with the trace. Label sample calls and propose ways to reduce redundant reads or polling and improve the breakdown shown in the panel. | Reproduce the panel count of 1,224. For candidate changes, check actual request counts, how quickly status updates appear, and which changes the project records. |
| T2. Reduce tool failures | Reproduce the parameter, revision, and call ID errors. Propose changes to tool contracts, error messages, or retry behavior. Look up the original operation if its submission outcome is unknown. | Rank preventable errors by code. Compare failure and recovery rates on the same cases and verify that recovery preserves receipts and avoids duplicate writes. |
| T3. Reduce TTFA | Measure draft save, turn admission, runtime startup, node commit, project sync, and the first visible frame. | Propose a change based on the measured delay and compare TTFA. Match the visible node to its project commit and verify that selection, viewport, and unsaved input are preserved. |
| T4. Reduce TTC | Measure from job submission through provider execution, asset registration, adoption, and preview decoding. Use those timings to locate the critical path from Send to completion. | Propose a change and compare TTC, success rate, and duplicate submissions. Check that the displayed image matches the adopted asset and meets the requested dimensions and format. |
| T5. Define the reference benchmark | Turn the existing single-image case into a versioned benchmark. Fix the prompt, Agent harness, and model settings. Document the runner command, browser version, warmup and sample counts, concurrency, timeout, and output checks. | A second contributor can reproduce the setup and run it to collect TTFA and TTC from the same Send click. Publish a real-model baseline with the effective configuration, raw per-run results, and failures. |

Measure cold and warm runs separately. Correlate stages by turn, call, and job IDs and the project event cursor. Rerun both metrics on the shared benchmark after combining changes. The shared business services continue to enforce authorization, revisions, locks, and adoption rules. Check execution-record changes in English and Chinese.

## Decisions for discussion

1. What should the execution record show by default, and which labels can we support with trace evidence?
2. Which percentile and sample size should we use for the TTFA budget? Do cold starts or large projects need separate budgets? What progress should users see after 8 seconds?
3. Which proposals should we pursue based on the baselines? What TTC target is realistic once we know the provider time and the time OpenDirector can reduce?
4. Which Agent harness and models should the first benchmark pin? When should we add other runtimes or requests that use reference images?
Loading
Loading