// Name: 4-Minute Script: We'll Always Have Summer // Description: Generates a ~4-minute original screenplay scene inspired by Book 3 of “The Summer I Turned Pretty”. // Author: cothranshyanne0-ui // GitHub: cothranshyanne0-ui import "@johnlindquist/kit" const systemPrompt = ` You are a professional screenwriter. Write an ORIGINAL, SPOILER-LIGHT screenplay scene of approximately 4 minutes (roughly 4 pages) inspired by Book 3 of “The Summer I Turned Pretty” (“We’ll Always Have Summer”). Follow these rules: - Do NOT quote or closely paraphrase the book. - You MAY include character names (e.g., Belly, Conrad, Jeremiah), but create fresh, original dialogue and action that does not replicate specific scenes from the book. - Keep the piece self-contained and readable as a single scene. - Evoke key themes: late-summer nostalgia, growth and choice, tenderness vs. tension, seaside atmosphere. - PG-13 tone, grounded, contemporary. - Use standard screenplay format: scene headings (INT./EXT.), action lines, and CHARACTER dialogue. - Target crisp pacing and emotional clarity suitable for ~4 minutes on screen. - Keep it concise: about 650–900 words (not exact, but close). - Do NOT include analysis or explanation—only the screenplay content. ` const defaultDirection = ` Write a single scene set at dusk on a quiet beach near the end of summer. Focus on Belly, Conrad, and Jeremiah as lingering feelings surface and a decision point emerges. Include ambient seaside detail (wind, surf, distant boardwalk sounds). End on a meaningful visual that suggests change without resolving every thread. `.trim() let extraDirection = await micro({ placeholder: "Optional: Add any tone, setting, or moment to emphasize (or press Enter to skip)", strict: false, }) const generator = ai(systemPrompt) let screenplay = "" try { screenplay = await generator(`${defaultDirection}\n\nEmphasize: ${extraDirection || "leave as is"}`) } catch (err) { screenplay = ` EXT. QUIET BEACH - DUSK Waves roll in with a soft hush. The sky bleeds gold into blue. A BOARDWALK hums faintly in the distance — laughter, a gull’s cry, the clack of a loose sign. BELLY stands where foam kisses the shore, sneakers dangling from one hand. Wind teases her hair. She watches the horizon as if it might answer a question she hasn't asked aloud. CONRAD approaches from up-beach, hands in his pockets, cautious. A beat later, JEREMIAH appears from the boardwalk side, a beach towel over his shoulder, trying to mask nerves with a grin. JEREMIAH You always find the good light. BELLY I wasn’t looking for it. Conrad stops a few paces behind Belly, measuring the distance like it matters. CONRAD Tide’s turning. BELLY Everything is. A silence lands. Jeremiah shifts, ready to break it, then doesn’t. JEREMIAH Boardwalk’s closing early. End-of-season, I guess. BELLY I know. Jeremiah steps closer, playful — gentle. JEREMIAH Last chance to win a stuffed shark. I’ll even let you name it. Belly smiles — fleeting. BELLY You’d name it for me anyway. Conrad watches the exchange, something tender and uncertain flickering behind his eyes. CONRAD We should talk. Belly finally turns to face them both. The surf reaches, retreats. BELLY I’ve been trying to talk all summer. JEREMIAH Then say it, Bells. A distant bell from the boardwalk. The world seems to wait. BELLY I kept hoping the ocean would tell me what to do. (beat) It didn’t. Jeremiah’s softness holds. Conrad doesn’t move. CONRAD No one can tell you. Not me. Not him. Not the water. Belly looks to the horizon again — the line where the sun slides away. BELLY I used to think if I stood here long enough, everything would make sense. But it’s not about standing still. Her toes press deeper into the sand. JEREMIAH We’ll move with you. However you need. CONRAD Or we’ll step back. If that’s what you want. A breath she didn’t know she was holding slips out. BELLY I don’t want a fight. I don’t want to break anything that already matters. JEREMIAH Then don’t. Just choose what makes you... you. CONRAD Whatever you pick, it won’t erase this place. Or us. Wind skims the water. The last light smolders across their faces. BELLY This summer... it changed me. Not because it told me who to be — it asked me to be brave enough to find out. She looks between them, steady now. BELLY (CONT’D) I’m not going to run from what I feel. But I won’t hurt the parts of me I just found either. Jeremiah nods, swallowing. Conrad’s jaw eases, almost a relief. JEREMIAH So... what now? Belly crouches, sets her sneakers in the sand. Lets the tide reach her ankles. BELLY Now I choose. Day by day. Not because I’m supposed to. Because I mean it. She straightens, lifting her face to the wind. BELLY (CONT’D) And tonight... I want to watch the ocean till the lights go out. Conrad steps to her right. Jeremiah to her left. No one touches. The space between them is careful and honest. CONRAD Okay. JEREMIAH Okay. They stand, three silhouettes etched against the last gold seam of the sky. The BOARDWALK LIGHTS blink off in sections, one by one. Night folds in, gentle as a tide. The surf keeps speaking, even when none of them do. FADE OUT. `.trim() } await editor({ value: screenplay.trim(), language: "markdown", shortcuts: [ { name: "Copy", key: `${cmd}+c`, bar: "right", onPress: async input => { await copy(input) await toast("Script copied to clipboard") }, }, { name: "Save As...", key: `${cmd}+s`, bar: "right", onPress: async input => { const outPath = await path({ hint: "Choose where to save your screenplay (e.g., cousins-beach-scene.fdx or .txt)", }) await writeFile(outPath, input) await revealFile(outPath) }, }, ], }) await notify("4-minute screenplay scene ready")