Auteur Script Editor & Scene Blueprint
Repo taruma/ScriptFlow, read from GitHub 15 min ago. taruma has not joined Take My Repo.
ScriptFlow is a local-first, Plain-Text-as-Truth editor and Scene Blueprint studio for authoring, visualizing, auditing, and exporting Auteur Script (v0.4.0)—a 100% platform- and model-agnostic canonical inline screenplay grammar designed for spatial, optical, temporal, and acoustic precision.
Rather than maintaining a parallel rich-text model that can drift out of sync with your script, every ScriptFlow view—Live Mode, Graph View, Source Mode, deterministic Script Supervisor diagnostics, clipboard/file exports, and programmatic JSON IR—derives synchronously from a single canonical plain-text buffer.
40/60 Live Mode & Source ModeS0) on the left (40%) and Phase 2 — Execution (S1 → SN) on the right (60%) with a draggable center divider (25%–60%, double-click or Settings → Column layout → Reset to restore 40/60), collapsible Staging cards & Execution Macro-States (Collapse all / Expand all), hover + insertion seams, and @dnd-kit drag-and-drop reordering.[AESTHETIC] Lookbook (AestheticBlockEditor): Pluggable 2-column live-highlighted Key: Value editor with hanging-indent token highlighting and collapsed key counts.↳ Waterfall Sub-State Editing: Live -> / → / Enter Sub-State splitting, Backspace-at-start merging, ArrowUp/ArrowDown boundary navigation, Alt+↑/Alt+↓ keyboard reordering with caret preservation, toggleable 1-based S#.# Sub-State ID badges, and camera continuity rails vs. cut / cut · recall dividers.~820px, JetBrains Mono): Collapsible Find & Replace (case-sensitive Aa, whole-word W, JavaScript Regex .* with $1/$2/$& backreferences, and All/Staging/Execution scope), Safe Symbol Rename (characters, @refs, [AESTHETIC] tokens, and [CAM ##] slots with collision blocking), direct .txt/.md/.json file drop, and non-destructive Format Script.Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z / Ctrl+Y), and standardized YYYYMMDD-HHMMSS-<hash8> filenames for Canonical .txt, Tagless .txt, JSON Envelope, Library Backup, and Agent Context Pack exports.< 640px): Shifts phones and narrow split windows into a clean read-only Live Mode reader with the compact clapboard mark, 1-tap Canonical Copy, compact section headers, and browse-only Script Library.[ Live | Graph | Source ])@xyflow/react pan-anywhere canvas (>= 640px, strictly locked cards for smooth desktop scroll-zoom/pan and 1-finger touch pan + 2-finger pinch).L → R horizontal overview starts folded; T ↓ B 90° 3-column vertical deep-dive starts unfolded into sculpted Sub-State cards (Dialogue micro-blocks, Foley waveforms, Score cues, framed serif Title Cards) and [AESTHETIC] Key–Value lookbook swatch cards with Keys/Fold and opposite-side Source (</>) branches.RECALL Lanes: Enforces strict tier boundaries (zero Tier 1 → Tier 3 bypasses), wraps consecutive HOLD runs in Shot Chambers, keeps recalls quiet on the spine (RECALL CAM ##) at rest, and reveals stepped cascading RECALL subway lanes on demand.L → R | T ↓ B, Split/Fold, Source, Threads, always-ready Reset, and dot-badged dimension isolator chips with Ghost / Compact + gliding SVG pulse-dot animation), bottom-right Zoom / Fit / Map / ? Help popover, and top-right read-only Object Inspector with Call Site fitView focus.v0.4.0 Grammar, Script Supervisor Linter & 6 Worked Examplessrc/core/): Pure TypeScript v0.4.0 parser (parseDialogueModifiers()), character-for-character lossless lexical & clause-underline tokenizer (src/core/highlighter.ts), and metadata/topology extractor (src/core/extractor.ts).LINT_RULE_REGISTRY): Covers Lens 1, Lens 4, and Lens 5 (viewport-coordinate-purity, camera-redefinition-guard, macro-state-resolution, multimodal-reference-isolation, frozen-first-frame-purity) with persisted 'off' | 'warning' | 'error' per-rule overrides in Settings → Supervisor rules and zero-shift DiagnosticDot popovers.@video1 continuation series Three Years Late and Frequency Over Force—all read-only with one-click Fork to Edit.v2 Persistence & Recovery: Stores scripts and snapshots locally with stale-connection retry, localStorage fallback & mid-session reconciliation, crash-recovery mirror, and debounced + immediate structural/unload flushes.ScriptLibraryModal): Full-text search (auto-surfacing matching child branches), All / My Scripts / Examples tabs, Recent ▾ sorting, compact Filter ▾ popover (tab-scoped folders & frequency-sorted #tags with counts, inline search, and clickable preview pills), collapsible root-family rows, live [ Preview | Source | Lineage ] pane with theme-aware LibraryFolderCombobox, opt-in bulk Select (export/delete with lineage repair), and Clear Library confirmation with inline backup download.ScriptImportModal): Whole-modal drag-and-drop inspector for .txt, .md, .markdown, and .json (AuteurEnvelope, AuteurScriptIR, AuteurScriptDraft, auteur-script-library-backup) evaluating v0.4.0 fit, lint diagnostics, and #snapshotHash duplicates before saving, supporting Import as New Script and undoable Replace Current Script.VersionHistoryModal): Clickable Scene Title pill (with <GitFork /> N family badge) opens Snapshots (automatic before/after AI & Pre-Restore checkpoints + permanent manual Milestones, diff viewer, undoable restore, snapshot branching) and Lineage Map (ScriptLineageTree with branchNote tracking, Switch to Script, and Branch from Here).AiAssistantSidebar): Lazy-loaded resizable right-side panel using browser-direct @google/genai streaming (previous_interaction_id, 8-round tool loop, AbortSignal) across Gemini 4 (gemini-4-hydrogen, gemini-4-neon, gemini-4-carbon), gemini-3.8-flash, and gemini-3.5-flash-lite with Low/Medium/High reasoning and localStorage / sessionStorage BYOK API key management.Auto / Draft / Refine / Audit) & 10 Local Tools: Editor-state-aware tool pruning, recent-edit diff injection, 10 strictly read-only/staging tools (get_script_overview, get_script_source, inspect_lens_slice, propose_script_patch, propose_text_replace, propose_script_title, propose_script_draft, report_audit_review, load_auteur_skill, opt-in ask_question via Ask First), and suggestions-first review cards (including smart sibling Audit Fix rebasing and transactional Apply All).gemini-decision-1 on v1beta) with Strict/Balanced/Lenient sensitivity across 15 AST-filtered atomic rules (QUICK_SCAN_RULES_VERSION = "0.4.0-qs2"), QuickScanCard, and 1-click Deep Audit escalation.AiBriefModal (local images/text, Gemini Files API batch upload & 48h cloud browser, YouTube URLs with Static/Agentic toggle), 5-tab AiContextInspectorModal (Live Prompt Preview, Foundational Craft, Skills & Extensions, Function Tools, Quick Scan Rules, plus unified JSON Export & selective Merge/Replace Import), Live Mode hover-to-diff margin indicators (AiPatchIndicator, AiQuickScanIndicator), USD cost tracking, and opt-in sanitized AiTraceModal.AuteurScriptIR, AuteurEnvelope, toAuteurIR() / fromAuteurIR(), compileAuteurDraft(), transactional applyAuteurPatch(), projectAuteurPatchPreview(), Composable Lens Slicer (AUDIT_LENS_PRESETS), validateAuteurReview(), getAuteurJsonSchemas(), and lazy-loaded 5-tab JsonIrDebugDrawer.13px–16px), toggleable clause underlines and S#.# IDs, ConfirmDialog, ErrorBoundary crash recovery, and aria-modal="true" / data-native-undo="true" isolation.| Shortcut | Action | Description |
|---|---|---|
⌘Z / Ctrl+Z |
Undo | Undo document edit across Live & Source modes |
⇧⌘Z / Ctrl+Y |
Redo | Redo document edit across Live & Source modes |
-> / Enter |
Chain Sub-State | Split/chain next ↳ Sub-State in Live Execution |
Alt + ↑ / ↓ |
Move Sub-State | Reorder focused Sub-State inside its Macro-State |
Backspace |
Merge Sub-State | Merge indented ↳ Sub-State back at column 0 |
Esc |
Close / Blur | Close active modal/popover, clear Graph trace, or blur Sub-State |
# 1. Clone the repository git clone https://github.com/taruma/ScriptFlow.git cd ScriptFlow # 2. Install dependencies npm install # 3. Start local development studio (http://localhost:3000) npm run dev
347 deterministic tests passing across 30 Vitest files (npm test).tsc --noEmit (npm run lint) and Vite production bundling (npm run build) exit 0.v1.0.0).v0.4.0 inline syntax regexes, Tagless export, and linter rules.AuteurScriptIR, AuteurEnvelope, AuteurPatch, and AUDIT_LENS_PRESETS.