| name | opencut-dev |
| description | Develop or contribute to the OpenCut ground-up rewrite monorepo (github.com/OpenCut-app/OpenCut) — a moon + proto + bun workspace with a TanStack Start web app, an Elysia/Cloudflare Worker API, and a Rust/GPUI desktop app, plus a shared rust/ core. Use when the task is "run/build/dev OpenCut", "add a route/component/API endpoint to OpenCut", "OpenCut monorepo setup", "moon run web:dev", "proto use", "why won't OpenCut build", "OpenCut 개발/기여", "오픈컷 빌드/실행", "오픈컷 모노레포". Do NOT use for the OpenCut classic editor's project/timeline data format (use opencut-project), for generic video editing or rendering (use video-producer / ffmpeg-toolkit / hyperframes), or for generic codebase spelunking (use codebase-archaeologist). |
OpenCut Dev (rewrite monorepo)
Author, run, and debug the OpenCut rewrite — an early-stage, plugin-first
rewrite that is NOT the full editor yet. The web app is currently a TanStack
Start + shadcn/ui scaffold (<p>hello world!</p> home route); api and desktop
are stubs. The functional editor is the classic repo (see opencut-project).
Reality gate: if the user expects a working timeline/export UI in this
repo, tell them it doesn't exist yet here — point to opencut-app/opencut-classic.
Do not invent features from the README roadmap (Editor API, MCP server,
headless render — all unbuilt).
Non-negotiable architecture rule (AGENTS.md)
Business logic lives in rust/. Each apps/* is a replaceable UI shell —
rendering, interaction, platform concerns only, never logic. Never duplicate
logic across web / desktop. When shared crates land, they go under crates/
(add crates/* to .moon/workspace.yml).
Step 1: Detect toolchain + repo (run first)
command -v proto || echo "NO_PROTO"
command -v moon || echo "NO_MOON"
command -v bun || echo "NO_BUN"
test -f .prototools && cat .prototools || echo "NOT_OPENCUT_ROOT"
Decision tree:
NO_PROTO → install proto: bash <(curl -fsSL https://moonrepo.dev/install/proto.sh), then proto use.
proto present but NO_MOON/NO_BUN → run proto use at repo root (installs the exact pins).
NOT_OPENCUT_ROOT → you are not at the repo root; cd to the dir holding .prototools + .moon/.
Pinned versions (.prototools, do not float): moon 2.3.3, bun 1.3.11, rust 1.97.0.
bunfig.toml sets minimumReleaseAge = 604800 (7-day supply-chain delay) — new deps may refuse to install until 7 days old; that is intentional, not a bug.
Step 2: Run the right task via moon (never call vite/cargo directly)
moon owns caching, inputs, and CI gating. Use moon run <project>:<task>:
| Goal | Command | Notes |
|---|
| Web dev server | moon run web:dev | vite, localhost:5173 |
| API dev server | moon run api:dev | Elysia on Cloudflare Worker, localhost:8787 |
| Desktop dev | moon run desktop:dev | cargo run, GPUI window |
| Build web | moon run web:build | vite build → dist/ |
| Test web | moon run web:test | vitest |
| Type/compile check desktop | moon run desktop:check | cargo check |
| Deploy web/api | moon run web:deploy / api:deploy | wrangler deploy (Cloudflare) |
⛔ Common agent mistakes this prevents: reaching for npm/pnpm/yarn (wrong — it's bun); running vite/cargo directly (bypasses moon cache + inputs); skipping proto use so versions drift.
Step 3: Make the change (per-app conventions)
Route to the app, then read references/conventions.md for the detail:
- web (
apps/web, TanStack Start + shadcn + Tailwind v4 + Cloudflare):
file-based routes in src/routes/ via createFileRoute; src/routeTree.gen.ts is codegen — never hand-edit (the router plugin regenerates it). shadcn components live in src/components/ui/ — read a component before using it; it may already apply classes you'd otherwise double up.
- api (
apps/api, Elysia + Cloudflare adapter): chain routes on the exported Elysia; keep the trailing .compile() (AoT). Config in wrangler.jsonc.
- desktop (
apps/desktop, Rust + gpui 0.2.2): impl Render for <View>; UI only — logic belongs in rust/. edition = "2024".
Keep changes minimal and grounded in existing patterns ([[coding-style]] KISS/YAGNI). If the change is logic, put it in rust/, not an app.
Step 4: Verify before declaring done
Run the app's own gate — do not self-report success ([[evaluator-must-act]]):
- web:
moon run web:test (vitest) and, for UI, actually load localhost:5173.
- desktop:
moon run desktop:check.
- api: hit
/health on localhost:8787.
Output template
- What changed — files touched (app-scoped), one line each.
- How to run — the exact
moon run …:… command(s).
- Verification — gate run + result (test/check/manual load).
- Architecture note — if any logic was added, confirm it went to
rust/ not apps/.
Reference Files
references/conventions.md — per-app conventions (TanStack Start routing, shadcn usage, Elysia, GPUI), moon task authoring, and gotchas.