diff --git a/.agents/rules/edit-mode-architecture.md b/.agents/rules/edit-mode-architecture.md index 40748b0..0f446bb 100644 --- a/.agents/rules/edit-mode-architecture.md +++ b/.agents/rules/edit-mode-architecture.md @@ -199,14 +199,14 @@ When developing, refactoring, or adding features to Edit mode in SceneFlow, stri - The raw cues modal provides a comprehensive 2-column workstation (`RawCuesModal.tsx`): - **Left Column**: Live schema reference with essential fields (`startTime`, `endTime`, `selectedText`, `type`), collapsible optional/auto-calculated fields, and quick copyable example snippet with 1-click insertion. - **Right Column**: Dual-tab workspace housing the `{ } JSON Data` editor and `🤖 Sync Prompt & Schema` AI integration deck. -- **Minimal Canonical Schema Contract (`cues.schema.json`, `public/schema.json`)**: - - JSON schema must remain strictly a structural data contract (types, enums, required fields). - - Avoid verbose descriptions inside schema properties, as excessive natural language degrades token sampling quality during LLM constrained decoding. - - Business logic—such as verbatim `` excerpt copying and `(minutes * 60) + seconds` timecode math—is enforced within `cues.prompt.ts` (`public/sync-prompt.txt`). +- **Minimal Canonical Schema & Prompt SSOT (`src/schemas/cues.schema.json`, `src/schemas/cues.prompt.ts`, `vite.config.ts`)**: + - `src/schemas/` is the Single Source of Truth (SSOT); `cuesAssetsPlugin` in `vite.config.ts` serves `/sync-prompt.txt` and `/schema.json` in dev and emits them to `dist/` at build time without maintaining duplicate files in `public/`. + - `cues.schema.json` must remain strictly a Gemini-compatible structural data contract (types, enums, nullable `speaker`, required fields: `id`, `type`, `speaker`, `selectedText`, `startTime`, `endTime`) without `$schema` or verbose natural-language bloat. + - Business logic—such as verbatim `` excerpt copying, `[[STAGING]]` block exclusion, chronological sorting, `endTime > startTime`, speaker extension stripping, `(minutes * 60) + seconds` timecode math, and the 8 cue `type` definitions—is enforced within `cues.prompt.ts`. - **Draft Baseline UI Separation**: - Guidance indicating that prompts provide a draft baseline for user customization must reside cleanly outside the markdown prompt text in the UI to keep copied prompts ready for Gemini/LLM system instructions. - **Segmented Sub-View Switcher (`prompt` | `schema` | `split`)**: - - Supports switching between full-width views (`prompt` or `schema`) to ensure zero horizontal scrollbars on JSON schema lines, while preserving a `split` option for side-by-side comparison on wide screens. + - Supports switching between full-width views (`prompt` or `schema`) to ensure zero horizontal scrollbars on JSON schema lines, while preserving a `split` option for side-by-side comparison on wide screens. Each panel header owns a single Copy action (no duplicate toolbar copy buttons or redundant top-right `Edit JSON` tab switches). - **Context-Aware Footer & Wrap-Resistant Buttons**: - Footers adapt actions dynamically per tab: `Cancel` and `Apply Cues (N)` on JSON Data; `Close` and `Go to JSON Data →` on Sync Prompt & Schema. - Buttons must declare `whitespace-nowrap`, matching vertical padding (`py-2`), and Title Case labels to eliminate multi-line wrapping and container height distortion. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..576cf61 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [main, dev] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Typecheck + run: npm run lint + + - name: Build + run: npm run build diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dfc82c..2753f92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.6.0] - 2026-11-14 + +### Refactored +- **Sync Prompt & Schema Single Source of Truth (`src/schemas/`, `vite.config.ts`)**: + - Removed duplicate `public/sync-prompt.txt` and `public/schema.json` static files. + - Added `cuesAssetsPlugin` in `vite.config.ts` to serve `/sync-prompt.txt` and `/schema.json` in dev middleware and emit them into `dist/` during production builds directly from `src/schemas/cues.prompt.ts` and `src/schemas/cues.schema.json`. +- **Cues JSON Editor UI Cleanup (`src/components/RawCuesModal.tsx`)**: + - Removed duplicate copy buttons from the `Sync Prompt & Schema` sub-view toolbar (retaining the single contextual Copy button in each panel header) and removed the redundant top-right `Edit JSON →` tab-switch button. + +### Changed +- **Sync Prompt & Gemini Schema Refinement (`src/schemas/cues.prompt.ts`, `src/schemas/cues.schema.json`)**: + - Updated `CUES_SYNC_PROMPT` to preserve casing, ignore `[[STAGING]]` blocks, enforce chronological sorting and `endTime > startTime` (minimum `0.5s` for instantaneous transitions/shots), strip `(V.O.)`/`(O.S.)`/`(CONT'D)` extensions from `speaker`, and define all 8 cue `type` categories. + - Updated `cues.schema.json` to mark `speaker` as `required` with `nullable: true` (`"Explicitly null if non-dialogue."`) and stripped non-Gemini `$schema` metadata. + ### Added +- **7 New AI Scenes Examples (`src/examples.ts`, `SCENEFLOW_CATALOGUE.md`)**: + - Added `scene_screaming_amber_wood.json` (**Screaming Amber Wood**, Seedance 2.5), `scene_coordinates_for_three.json` (**Coordinates for Three**, Seedance 2.5), `scene_pineapple.json` (**Pineapple**, Seedance 2.0), `scene_what_the_glacier_keeps.json` (**What the Glacier Keeps**, Seedance 2.0), `scene_paperweight.json` (**Paperweight**, Seedance 2.0), `scene_the_unresolved_variable.json` (**The Unresolved Variable**, Seedance 2.0), and `scene_the_event_boundary.json` (**The Event Boundary**, Seedance 2.0) under `public/examples/scenes/`. + - Registered all 7 projects under **AI Scenes** in `src/examples.ts` with `auteur script` and Seedance tags, loglines/release dates from `vector-film`, and updated `SCENEFLOW_CATALOGUE.md` (24 total AI Scenes). +- **Local Video File Playback ([#19](https://github.com/taruma/SceneFlow/pull/19))**: + - Added a **Local File** picker in the Edit-mode source bar to play local `.mp4`, `.webm`, and `.mov` files via an HTML `