Prompts and provenance
Récit does not generate images. It describes them, and it keeps track of where each one comes from.
A prompt is an entry
Markdown
subject, set, shot, pose, expression and style name entries and ids of the bible; the
body is the action of the image. The text given to an image tool is built from the bible: the style
identity, the character identity word for word, the set, the shot, the pose, the action, then the
avoid list. Text in an image is always avoided, so a scene's words stay text and translate.
Consistency
A seed gives weak consistency and does not survive a change of model; reference images give strong consistency. Attach the canonical reference to every prompt, keep the identity block unchanged, and ask for a turnaround sheet (front, three-quarter, side, back) when you can.
Provenance
Next to every image, a JSON file with the same name plus .json (cover.) says where the
image comes from:
JSON
originishuman,aiormixed;aiGeneratedsays the same thing for other tools.mediaTypeis the optional MIME type of the file (image/png,video/mp4,audio/wav).durationis the optional duration of a video or audio file, in seconds.speechVoiceis the optional synthetic voice id, distinct from a character'svoicetrait.timingsis the optional list of characters of a voice and when each is heard (text,startandend, in seconds), as the speech provider timed it;recit renderreads it to cut the subtitles of a scene whoseaudio=is that voice into one cue per phrase.- An image marked
aiGenerated:carries the "AI-generated" mention in its metadata and its visible credits.true - A C2PA manifest present in an input image is never stripped.
The generation request
When a plugin runs a media job (AI jobs), recit ai represents
each call as a serialised generation request validated by ai-
(AiGenerationRequestSchema of @recit/, recit schema ai-, preview): it hashes
and caches every request under .recit/: an image, speech or sound output as it
comes, a video once its poll is done, and an identical video request then never reaches the
provider. Raw input bytes never enter the request: every input media file is recorded by its SHA-256
digest and MIME type. Its four oneOf branches are discriminated by modality ("image",
"speech", "video" and "sound"): width, height and references belong to the image
request, edit (edit.image and optional edit.mask) is added on that image request only when
editing an existing image, text, voice, style and language belong to speech, and top-level
image is the optional first frame of a video request:
| Key | Branch | Description |
|---|---|---|
modality | all | "image", "speech", "video" or "sound" (required) |
provider | all | Non-empty id of the media provider, such as "gemini" (required) |
model | all | Non-empty model id (required) |
prompt | image, video, sound | Prompt text sent to the provider (required) |
aspect | image, video | Optional aspect ratio string ("16:9", "1:1"…) when the provider takes one |
width | image | Optional output width in pixels (positive integer, image request) |
height | image | Optional output height in pixels (positive integer, image request) |
seed | image, video, sound | Optional integer seed |
references | image | Optional array of reference images the output must follow (image request) |
references. | image | 64-character lowercase hex SHA-256 of a reference image (required on each item) |
references. | image | Non-empty MIME type of a reference image (required on each item) |
edit | image (edit) | Optional edit payload on an image request when editing an existing image |
edit.image | image (edit) | Source image to edit (required when edit is present) |
edit. | image (edit) | 64-character lowercase hex SHA-256 of edit.image (required) |
edit. | image (edit) | Non-empty MIME type of edit.image (required) |
edit.mask | image (edit) | Optional mask image for the edit |
edit. | image (edit) | 64-character lowercase hex SHA-256 of edit.mask (required when edit.mask is present) |
edit. | image (edit) | Non-empty MIME type of edit.mask (required when edit.mask is present) |
text | speech | Text synthesised to speech (required on speech) |
voice | speech | Optional provider voice id |
style | speech | Optional style direction when the speech provider accepts one |
language | speech | Optional BCP 47 language tag |
duration | video, sound | Optional positive duration in seconds |
image | video | Optional first-frame image when the video provider takes one |
image.sha256 | video | 64-character lowercase hex SHA-256 of the first-frame image (required when present) |
image. | video | Non-empty MIME type of the first-frame image (required when present) |
Registering an image
Shell
The command (recit assets register <file> --, with --origin, --tool, --seed…)
writes cast/, with promptHash, the fingerprint of the prompt text when the
image was registered. When the bible changes that prompt, recit validate warns that the image is
stale. An image next to the bible with no provenance file is a warning, an error with --strict.
Both checks run when recit validate reads a story that declares cast:; validating the bible
alone (recit validate cast.md) does not run them.
With --strict, a file whose provenance says origin: ai or mixed also needs a license:
without one, recit validate -- on a story that declares cast: fails with
scenario- and names the provenance file to complete (validating the bible alone,
recit validate --, does not run this check). The check reads the images next to the
bible and its audio and video files (.wav, .mp3, .ogg, .m4a, .mp4, .webm).
The register of the assets
Shell
recit assets report <bible|story> lists the images beside the bible, one row each, and one row per
prompt that has no image yet. Each row says its file, its prompt, its status (present, stale
when the prompt changed since, registered with a provenance but no prompt of the bible,
unregistered without a provenance file, missing), and what the provenance says: origin, ai
(yes when a model made or helped make it), tool, model, author, license and date. It is
the review sheet of a story world, and the list a publisher needs for the AI Act.
The rows go to data/ beside the report, rewritten at each run. The report itself,
assets. beside the bible (-o to put it elsewhere), is a format: story that
reads them: key figures (images made with AI, stale, missing, without provenance), then the table.
It is written once and never overwritten, so you can edit it; --lang fr writes it in French (the
language of the bible by default), --title names it.
Building the prompts
recit prompts build cast.md writes one <id>.txt and a prompts.json in prompts/; with
--placeholders it also writes a <id>. for each prompt with no image, and
--template <name> picks one of the scenario. of recit..
Image by image (preview)
A prompt whose subject is a described character can name one of its animations (animation=):
recit prompts build -- then writes one prompt and one pose guide per key of it, and
recit assets register <folder> registers the images that come back by their names. The whole path
is in Images of an animation.
Placeholders
Until an image exists, the story renders anyway. In examples/ the placeholders are
```pixel sprites of the character, with a caption naming the prompt they stand for.