memento は何をしますか?
Operating Contract
- Treat invocation as natural language, including implicit requests that match the description.
- Keep all durable state in
memento/<slug>/memento.yamlso any stage can resume or be skipped. - Reference source photos in place by default; ask explicit consent before any copy into
sources/. - Ask explicit consent before sending selected photos to OpenAI image generation.
- State that Dreamina receives whatever the user later uploads there.
- Use the skill only for the user's own memories or consented participants.
- Preserve stated identity, wardrobe, props, relationships, and place facts unless the user changes them.
- Report platform or moderation refusals plainly; never silently swap facts to bypass a refusal.
- Generate English prompts and files unless the user explicitly asks otherwise.
- If a needed reference file is missing, report the exact path and avoid inventing its facts.
Reference Routing
- Read references/interview-guide.md when entering S2 or when the user asks to revise the interview/treatment.
- Read references/sheet-craft.md when entering S3, choosing raw photos vs rendered sheets, or writing sheet prompts.
- Read references/micro-edit-loop.md when entering S3.5, using Cowart, or running chat-based micro-edits.
- Read references/dreamina-video-craft.md when entering S4 or S5 prompt revision.
- Read references/dreamina-platform.md when choosing model, mode, reference counts, frame pins, ratio, duration, tags, caps, or moderation guidance.
State Shape
Use this shape as the minimal manifest; add compact notes only when needed.
memory:
title: ""
slug: ""
created_at: ""
current_stage: "S0"
status: "in_progress"
treatment_confirmed: false
privacy:
copy_sources_consent: false
render_upload_consent: null
interview:
treatment: ""
boundaries: ""
sources:
- id: "src01"
path: "/absolute/or/user-provided/path.jpg"
handling: "referenced"
notes: ""
assets:
- id: "asset01"
type: "raw_photo"
path: "/absolute/or/project/path.png"
role: "identity reference for..."
source_ids: ["src01"]
approval_state: "proposed"
dreamina_tag: ""
prompt_char_count: null
clips:
- id: "clip01"
title: ""
model: "Seedance 2.0"
ratio: "16:9"
duration: "15s"
spatial_law: ""
first_frame_asset: ""
last_frame_asset: ""
prompt_char_count: null
rendering:
capability_probe:
session_id: ""
status: "unknown"
checked_at: ""
notes: ""
Use approval_state: proposed | rendered | approved | rejected | skipped.
Use type: raw_photo | character_sheet | item_sheet | environment_sheet | base_frame | match_frame | micro_edit.
Record prompt character counts for sheet prompts when useful and for every Dreamina clip prompt.
S0 Start
- Determine whether to start a new memory or resume an existing
memento/<slug>/memento.yaml. - Slug the memory from the user's phrase, folder name, date, or concise title.
- Use lowercase ASCII, hyphen separators, and a numeric suffix on collision.
- Scaffold the project in the current workspace:
memento/<slug>/
memento.yaml
.gitignore
sources/
sheets/
- Create
.gitkeepfiles insidesources/andsheets/when needed. - Write
.gitignore:
sources/*
sheets/*
*.jpg
*.jpeg
*.png
*.heic
*.webp
*.mov
*.mp4
!sources/.gitkeep
!sheets/.gitkeep
!memento.yaml
!dreamina_prompts.md
- Record user-provided media paths in
memento.yamlwithhandling: referenced. - Copy source media into
sources/only after explicit consent, then updatehandling: copied. - Tell the user what was created, which source paths remain referenced in place, and which stage comes next.
S1 Look
- Load each source photo with the available visual inspection tool before describing it.
- Present an inventory table before proposing any generated asset.
| Kind | Candidate | Source evidence | Distinguishing anchors | Environment / light / mood | Proposed role | Raw photo vs render | Reason / risk |
|---|
- Include people, distinguishing anchors, key items, environments, light, mood, and continuity anchors.
- Propose raw photos as the default identity reference when identity and wardrobe already match.
- Propose rendered sheets only for a named control problem, user-requested stylization, or missing/entangled visual evidence.
- Ask the user to confirm or correct the inventory.
- Update
sources,assets, andmemory.current_stageinmemento.yaml.
S2 Interview
- Read references/interview-guide.md.
- Ask one numbered batch of at most five questions in chat.
- Skip anything the user already gave.
- Include recommendations or practical defaults in each question.
- Offer "surprise me" when the user wants delegated treatment.
- Cover only missing decisions: memory beats, intent, must-happen moments, emotional landing, clip count, model, duration, ratio, style anchor, audio direction, and safety/consent boundaries.
- Recommend scope from story shape: one beat usually means one clip; a journey, reveal, or location change usually means two or three clips chained by match frames.
- Summarize the proposed treatment and wait for confirmation or correction.
- Save decisions under
memory,clips,interview, andprivacyinmemento.yaml.
S3 Sheets
- Read references/sheet-craft.md.
- Open S3 with a once-per-session capability probe before promising rendered sheets.
- Record the probe under
rendering.capability_probewith a session identifier, timestamp, status, and notes. - Ask for render-upload consent unless already recorded.
- Load the relevant local photo into visual context with
view_imagebefore any edit or reference render. - Treat filesystem paths in prompts as unreliable input by themselves.
- Use the built-in image generation path as prompt-only: no exposed mask, seed, dimensions, model, or destination path.
- Do not name an image model; the current runtime does not surface one.
- Test one small reference-preserving render from a viewed photo when the user consents.
- Treat text-to-image and multi-image reference as available only after the current-session probe succeeds.
- For multi-image reference, load every source with
view_imageand label each image's role explicitly in the prompt. - Use prose aspect cues such as
wide 16:9 landscape framing; do not promise exact pixel dimensions. - Expect default text-to-image dimensions to vary; the verified runtime rendered about 1536x1024.
- If rendering is unavailable, fails, or the user declines upload consent, say so plainly and continue with raw photos as Dreamina references.
- Do not offer a Dreamina web-app fallback for sheet rendering.
- Choose each asset adaptively: raw photo, character sheet, item sheet, environment sheet, base frame, or match frame.
- Render only the smallest sheet or frame that solves the next continuity problem.
- Show every generated result in-session and ask for approval before downstream use.
- Move only proven outputs into
memento/<slug>/sheets/. - Update
assets, source ids, roles, approval state, accepted prompt count when relevant, andmemory.current_stage.
S3 Output Resolution
Use this procedure for every generated image output.
- Create a marker file immediately before the render, such as
memento/<slug>/.render-marker. - Run the render only after the marker timestamp exists.
- Search
${CODEX_HOME:-$HOME/.codex}/generated_images/withfind ... -newer <marker>. - Treat the directory as cumulative across requests and sessions.
- Prefer an explicit returned output path when the tool provides one, but still visually verify it.
- Inspect every candidate newer than the marker by dimensions and visual content.
- Never pick the newest file blindly.
- Ask the user only when candidates remain ambiguous after inspection.
- Move the confirmed output into
sheets/with a stable role/version name. - View the moved file before marking it
approvedor using it in a Dreamina upload table.
S3.5 Micro-Edit Loop
- Read references/micro-edit-loop.md.
- Probe Cowart before using it: callable
get_cowart_selection, callableinsert_cowart_image, and a reachable local canvas service. - If Cowart is present, place working images side by side and keep originals plus annotations visible.
- If Cowart is absent, offer the companion install described in the reference.
- If the user declines Cowart, run chat-based iteration with the same identity and continuity guards.
- Load the source or annotated screenshot into visual context with
view_imagebefore any edit render. - Set expectations before the first edit: the render can preserve composition, framing, and layout, but it re-renders the whole image generatively.
- Treat detail drift outside the requested region as normal for the current runtime.
- Compare source and revision side by side instead of promising surgical one-region edits.
- Iterate one specific visual change at a time when identity or continuity risk is high.
- Promote only user-approved clean revisions into
sheets/. - Update the relevant asset path, role, approval state, and Dreamina tag in
memento.yaml.
S4 Prompts
- Read references/dreamina-video-craft.md.
- Read references/dreamina-platform.md.
- Write
memento/<slug>/dreamina_prompts.md. - Render the full Markdown in-session with fenced prompt blocks.
- Include a header with title, concept line, shoot-order checklist, and settings line.
- Use this settings line shape:
model · All-in Reference · ratio · duration. - For each clip, include an upload table with
Tag -> File -> Role. - Include first-frame and last-frame pins in the upload table when used.
- Point upload table files only at approved
sheets/assets or recorded source paths. - Write exactly one fenced
textblock per clip. - Keep every clip prompt block at 1500 characters or fewer.
- Report each block's character count next to the block and record it in
memento.yaml. - Include Notes covering platform caps, the film's spatial law, and reroll guidance.
- Use references as anchors; write prompt prose for state increments, action, camera, atmosphere, and audio.
- Compress any overlong block before presenting it.
S5 Iterate
- Read the prompt and platform references again when changing Dreamina prompt content or upload strategy.
- Identify the smallest useful fix from the user's reported result.
- Prefer one targeted action: compress a block, adjust a reference role, regenerate one sheet or panel, re-pin a frame, or clarify the spatial law.
- Update
dreamina_prompts.mdandmemento.yamltogether. - Keep upload tables, asset roles, approval states, and character counts aligned.
- Report any Dreamina or image-generation refusal plainly.
- Revise with the user when moderation blocks a generation.
- Never silently change identity, wardrobe, props, relationships, or scene facts.
- Ask before rerunning broad stages.