story_development_run
Generate whole outlines, scene lists, sequences, treatments, trailers, episodes, weave plans, or original/adapted Novels. Novel manuscript generation WRITES empty Chapters or REWRITES existing Chapter prose into revision-checked review candidates. For raw ideas, use `story_bootstrap` readiness to inspect styles and inputs. Quote before starting Bootstrap, Beat, Scene, Episode, Sequence, Treatment, Trailer or Weave; retain scope/model and pass accepted `billing_quote_id` and `billing_request_id`. Bootstrap owns and auto-applies its outline chain. Poll `job_get`; call `phase=finalize` when it reports `finalize_required`. `target_scene_count` is a pacing hint rather than a hard guarantee, and quoted Scene Wizard runs replace the scene list. Novel source_import is Start-only: pass ChatGPT attachments in top-level screenplay_file or story_outline_file, using their verified mounted file paths; ChatGPT supplies download objects. Never use file IDs as paths or fabricate URLs. Include payload.target_name. Text/base64 inputs remain in payload.
When to use
- Import an author's manuscript with workflow=novel_adaptation, payload.novel_operation=manuscript_import. Readiness previews DOCX/Markdown Chapters without saving; start imports the reviewed source_sha256 and import_chapters (start_block/title). Use manuscript_file for a host attachment or payload.manuscript_text for Markdown. Omit project_id and supply target_name to create an original; existing books require base_outline_revision and append only. This operation is free.
- Use to generate an initial outline or explicitly regenerate a whole scene list. Adding one developed scene to an existing list uses `story_mutate(entity_type=scene, operation=create)`; generating structural changes to an existing list uses `story_revision_run(workflow=scene_list_revision)`.
- Use for beat, scene, sequence, treatment, trailer, episode, and weave development flows.
- Use `workflow=novel_adaptation` with `payload.novel_operation` for source creation/import, Blueprint, Chapter Outline, Voice Lab, manuscript generation, or candidate review. Manuscript uses readiness, then quote for the whole operation; Start requires accepted `billing_quote_id` and stable `billing_request_id` UUIDs with the same scope, model and instructions. Existing Chapters become editable candidates; accept or reject resumes the same parent without a separate charge. Settlement rounds once for the whole operation within the accepted allowance. Accept with exact `expected_revisions` and optional complete edited `candidate_plain_texts`, or reject to leave canon unchanged.
- For source-project readiness, include the intended `target_name`; readiness returns an executable start action locked to that name and the inspected source revision.
- Poll Novel parent jobs through `job_get`. Completed Blueprint and Chapter Outline parents already saved their artifacts; completed Writer and Audit parents point to manuscript/candidate or audit reads. Completed Voice parents return the proposal resource and revision-current profile apply actions.
- Use `story_bootstrap` when the caller has a raw idea and wants BeatBandit to turn it into initial story structure plus the template's canonical outline with sane defaults.
- For `story_bootstrap`, call `phase=readiness`, then `phase=quote`, and accept its quote/request UUIDs at `start`; readiness returns `available_beat_styles`, `default_beat_style_id`, optional `suggested_beat_style_id`, `estimated_credits`, and a `start_payload_template`.
- Treat `suggested_beat_style_id` as advisory. `start` uses the default style unless the caller explicitly passes `payload.options.style_template_id`.
- For `treatment_wizard`, readiness discovers templates; quote with `template_id`, options and model, then start with the same payload plus accepted `billing_quote_id` and `billing_request_id` UUIDs.
- For `one_scene` projects, `story_bootstrap` routes through Beat Wizard because the template already owns exactly one scene; Scene Wizard is not needed.
- For episodic templates, use `episode_wizard` readiness to discover `available_approaches`, `default_approach_id`, valid episode counts, and a quote payload before generating episode lists. Accept that quote and pass billing_quote_id and billing_request_id at Start.
- `beat_wizard` is always ready. Use `phase=readiness` to discover the default `template_id` and required placeholders such as `FULL_TEXT`.
- For `beat_wizard` with the `free_text` template, callers may provide `payload.idea`; MCP will normalize it into `filled_text` and `placeholder_values.FULL_TEXT`.
When not to use
- Exact Novel Chapter structure, manuscript/private-note and manual Voice saves use `novel_mutate`.
- Do not use to add a single scene developed in conversation. Read placement with `story_entity_query`, then use `story_mutate(entity_type=scene, operation=create)` with the agreed scene data. Scene Wizard replaces the whole scene list and has no append option.
- Do not use for screenplay document reads or direct story mutations.
- Do not start with low-level card/scene mutation when the real intent is concept-to-outline development.
- Do not manually drive the internal beat->outline chain once `story_bootstrap` is running; use `job_get` until the parent bootstrap job completes.
- Do not skip `story_bootstrap` readiness before a paid bootstrap run; use readiness to choose or confirm the beat style and estimate credits.
- Use `story_revision_run(workflow=scene_list_revision)` to develop additions, merges or other changes within an existing scene list, including dependent pages. Use `change_wizard` for broad story changes and `polish_wizard` for screenplay polish.
- Do not use to **get editorial feedback** on existing material — use `story_review_run` (room_review, analysis_wizard, continuity_audit) instead.
- Do not use to **write actual screenplay prose** from an existing outline — use `screenplay_generation_run` (screenplay_writer, episode_screenplay, scene_screenplay) instead.
- Do not use Novel operations to overwrite canonical Chapter prose directly; manuscript generation produces revision-checked candidates.
Examples
- “Run a sequence wizard for this project.”
- “Generate a new scene list for this project with the scene wizard.”
- “Run the episode wizard on this project.”
- “Run weave planning for this episodic project. After finalizing a preview, use phase=apply with payload.weave_run_id to apply the saved result without another charge.”
- “Bootstrap a short-movie project from one idea into initial story structure and a tight scene outline.”
- “Bootstrap a micro-drama project from one idea into series cards and a template-native episode outline.”
- “Bootstrap a one-scene short from a raw idea; BeatBandit will use Beat Wizard to populate the story cards and the single scene outline.”
- “Start one-scene Beat Wizard with `payload={"idea":"..."}` or with `payload={"template_id":"free_text","placeholder_values":{"FULL_TEXT":"..."}}`.”
- “Boundary - "Generate a fresh scene outline for this project." Use `scene_wizard` here because the scenes do not exist yet; this is BUILD, not CHANGE.”
- “Boundary - "Bootstrap a movie project from one concept." Use `story_bootstrap` here because the caller wants structured outline first, not screenplay prose.”
- “Check Story Bootstrap readiness with `workflow=story_bootstrap`, `phase=readiness`, and `payload.idea`; review `available_beat_styles`, then quote the returned payload and accept before Start.”
- “For Novel Blueprint use readiness, quote, then start with accepted billing quote/request UUIDs and the same wizard settings.”
- “Start Novel Wizard or Chapter Wizard with the exact typed `payload.wizard_settings` returned by readiness, changing only the author-directed fields requested for that run.”
- “Novel Wizard uses shared creative direction. Original settings have `adaptation=null`; adaptations carry `adaptation.brief` and `adaptation.fidelity`. Original runs generate Foundation, Direction, Characters and Threads without a source diagnosis or Adaptation Map.”
- “For an original Novel, first use `project_mutate(operation=create, mode=novel)` with an optional `development_brief`; then use the same `workflow=novel_adaptation` operations. This workflow identifier covers both origins. Source-project/import creation is only for adaptations.”
- “After a Novel Wizard or Chapter Wizard job completes, follow `job_get` to the saved Blueprint or Chapter artifacts; no caller finalize is required.”
- “Rewrite one existing Novel Chapter with `novel_operation=manuscript_generation`, quoting the Chapter scope, model and instructions checked by readiness, then passing the accepted quote and request UUIDs into Start; poll `job_get`, then inspect candidates with `project_query(mode=novel, novel_mode=candidates)` when author review is required.”
- “Accept an edited Novel candidate with `phase=accept`, `novel_operation=candidate_review`, its `child_job_id`, exact `expected_revisions`, and `candidate_plain_texts` keyed by Chapter card id; continue polling the returned parent job when the response is async.”
Anti-examples
- "Add the UFO scene we just discussed after the control-room scene." Use `story_mutate(entity_type=scene, operation=create)`; do not regenerate the scene list.
- List my projects.
- Polishing dialogue rhythm in an existing scene — that is `story_revision_run` with `polish_wizard`.
- Generating screenplay prose from an already-finished outline — that is `screenplay_generation_run` with `screenplay_writer`.
- Asking for editorial scores or notes on the current story without changing it — that is `story_review_run` with `analysis_wizard` or `room_review`.
Workflows
Switch behavior by setting the workflow input field.
| Workflow | Phases | Calls |
|---|---|---|
story_bootstrap | readiness, quote, start | beat_wizard.run, scene_wizard.run, episode_wizard.run |
beat_wizard | readiness, quote, start, finalize | beat_wizard.run, beat_wizard.quote |
scene_wizard | readiness, quote, start, finalize | scene_wizard.run, scene_wizard.quote |
sequence_wizard | quote, start, finalize | sequence_wizard.run, sequence_wizard.quote |
treatment_wizard | readiness, quote, start, finalize | treatment_wizard.run, treatment_wizard.quote |
trailer_wizard | readiness, quote, start, finalize | trailer_wizard.run, trailer_wizard.quote |
episode_wizard | readiness, quote, start, finalize | episode_wizard.run, episode_wizard.quote |
weave | readiness, quote, start, finalize, apply | weave.run, weave.quote, weave.apply |
novel_adaptation | readiness, quote, start, finalize, apply, accept, reject | novel.adaptation.run, novel.writing.run |
Linked resources
Tool calls may return resource_links pointing at these resource families.
Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"workflow",
"phase"
],
"properties": {
"workflow": {
"type": "string",
"enum": [
"beat_wizard",
"scene_wizard",
"sequence_wizard",
"treatment_wizard",
"trailer_wizard",
"episode_wizard",
"weave",
"story_bootstrap",
"novel_adaptation"
]
},
"phase": {
"type": "string",
"enum": [
"readiness",
"quote",
"start",
"finalize",
"apply",
"accept",
"reject"
],
"description": "For story_bootstrap, use readiness, then quote before start; start still requires payload.idea."
},
"project_id": {
"type": "integer"
},
"job_id": {
"type": "string"
},
"reservation_id": {
"type": "string"
},
"manuscript_file": {
"type": "object",
"properties": {
"download_url": {
"type": "string",
"minLength": 1,
"maxLength": 8192
},
"file_id": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"mime_type": {
"type": "string",
"maxLength": 255
},
"file_name": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"download_url",
"file_id"
],
"additionalProperties": false
},
"screenplay_file": {
"type": "object",
"properties": {
"download_url": {
"type": "string",
"minLength": 1,
"maxLength": 8192
},
"file_id": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"mime_type": {
"type": "string",
"maxLength": 255
},
"file_name": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"download_url",
"file_id"
],
"additionalProperties": false
},
"story_outline_file": {
"type": "object",
"properties": {
"download_url": {
"type": "string",
"minLength": 1,
"maxLength": 8192
},
"file_id": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"mime_type": {
"type": "string",
"maxLength": 255
},
"file_name": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
},
"required": [
"download_url",
"file_id"
],
"additionalProperties": false
},
"payload": {
"type": "object",
"properties": {
"billing_quote_id": {
"type": "string",
"format": "uuid"
},
"billing_request_id": {
"type": "string",
"format": "uuid"
},
"weave_run_id": {
"type": "string",
"format": "uuid"
},
"idea": {
"type": "string",
"description": "Raw story idea. Required for story_bootstrap start. For beat_wizard start, MCP normalizes this into the template's required placeholder values when possible."
},
"template_id": {
"type": "string",
"description": "Template id for template-driven workflows. Use phase=readiness to discover available treatment templates and defaults."
},
"filled_text": {
"type": "string",
"description": "Filled text passed to the wizard. For free_text beat_wizard templates, this can be the same story idea text used for placeholder_values.FULL_TEXT."
},
"placeholder_values": {
"type": "object",
"description": "Placeholder values required by the selected wizard template. For one_scene/free_text Beat Wizard, provide FULL_TEXT; if omitted, MCP can derive it from payload.idea or payload.filled_text.",
"additionalProperties": {
"type": "string"
}
},
"include_context": {
"type": "boolean"
},
"options": {
"type": "object",
"description": "Workflow-specific options. For story_bootstrap start, set options.style_template_id only after choosing from available_beat_styles returned by readiness."
},
"llm_identifier": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Optional provider/model override for this run, for example openai/gpt-5.6-sol. Uses the caller's saved default when omitted."
},
"approach_id": {
"type": "string"
},
"custom_prompt": {
"type": "string"
},
"target_scene_count": {
"type": "integer",
"description": "Preferred scene-count target for scene-oriented workflows. This is a pacing hint, not a strict requirement."
},
"target_episode_count": {
"type": "integer"
},
"episode_count": {
"type": "integer"
},
"sequence_numbers": {
"type": "array",
"items": {
"type": "integer"
}
},
"locked_episode_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"mode": {
"type": "string"
},
"target_episode_id": {
"type": "string"
},
"preview": {
"type": "boolean"
},
"idempotency_key": {
"type": "string"
},
"novel_operation": {
"type": "string",
"enum": [
"source_project",
"source_import",
"manuscript_import",
"blueprint",
"chapter_outline",
"voice_lab",
"manuscript_generation",
"candidate_review"
]
},
"manuscript_text": {
"type": "string",
"maxLength": 1000000
},
"source_sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}quot;
},
"base_outline_revision": {
"type": "string",
"pattern": "^[0-9a-f]{64}quot;
},
"import_chapters": {
"type": "array",
"minItems": 1,
"maxItems": 500,
"items": {
"type": "object",
"required": [
"start_block",
"title"
],
"properties": {
"start_block": {
"type": "integer",
"minimum": 0
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 240
}
},
"additionalProperties": false
}
},
"target_name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"source_revision": {
"type": "string",
"pattern": "^[0-9a-f]{64}quot;
},
"template_settings": {
"type": "object"
},
"wizard_settings": {
"description": "Typed pre-generation direction for Novel Wizard or Chapter Wizard.",
"oneOf": [
{
"type": "object",
"required": [
"creative_brief",
"adaptation",
"novel_genre",
"prose_style",
"target_category",
"target_word_count",
"pov_approach",
"tense"
],
"properties": {
"creative_brief": {
"type": "string",
"maxLength": 6000
},
"adaptation": {
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"required": [
"brief",
"fidelity"
],
"properties": {
"brief": {
"type": "string",
"maxLength": 6000
},
"fidelity": {
"type": "string",
"enum": [
"wizard_decide",
"faithful",
"balanced",
"transformative"
]
}
},
"additionalProperties": false
}
]
},
"novel_genre": {
"type": "string",
"enum": [
"inherit_source",
"contemporary_drama",
"mystery_crime",
"thriller_suspense",
"romance",
"horror",
"fantasy",
"science_fiction",
"historical",
"adventure",
"comic_satirical"
]
},
"prose_style": {
"type": "string",
"enum": [
"balanced",
"propulsive",
"intimate",
"spare_precise",
"lyrical",
"atmospheric",
"comic"
]
},
"target_category": {
"type": "string",
"enum": [
"adult",
"young_adult",
"middle_grade"
]
},
"target_word_count": {
"type": "integer",
"enum": [
45000,
60000,
75000,
90000,
105000
]
},
"pov_approach": {
"type": "string",
"enum": [
"wizard_decide",
"single_character",
"multiple_character",
"omniscient"
]
},
"tense": {
"type": "string",
"enum": [
"wizard_decide",
"past",
"present"
]
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"planning_guidance",
"chapter_rhythm"
],
"properties": {
"planning_guidance": {
"type": "string",
"maxLength": 6000
},
"chapter_rhythm": {
"type": "string",
"enum": [
"story_led",
"shorter_propulsive",
"longer_immersive"
]
},
"selected_chapter_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"addition": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"required": [
"position"
],
"properties": {
"position": {
"type": "integer",
"minimum": 0
},
"count": {
"anyOf": [
{
"type": "null"
},
{
"type": "integer",
"minimum": 1
}
]
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false
}
]
},
"screenplay_text": {
"type": "string",
"maxLength": 1500000
},
"story_outline_text": {
"type": "string",
"maxLength": 1500000
},
"screenplay_filename": {
"type": "string",
"maxLength": 240
},
"story_outline_filename": {
"type": "string",
"maxLength": 240
},
"screenplay_file": {
"type": "object",
"required": [
"filename",
"media_type",
"base64"
],
"properties": {
"filename": {
"type": "string"
},
"media_type": {
"type": "string"
},
"base64": {
"type": "string",
"maxLength": 20000000
}
},
"additionalProperties": false
},
"story_outline_file": {
"type": "object",
"required": [
"filename",
"media_type",
"base64"
],
"properties": {
"filename": {
"type": "string"
},
"media_type": {
"type": "string"
},
"base64": {
"type": "string",
"maxLength": 20000000
}
},
"additionalProperties": false
},
"representative_chapter_ids": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"profile_id": {
"type": "string"
},
"expected_contract_revision": {
"type": "integer",
"minimum": 0
},
"expected_proof_revision": {
"type": "integer",
"minimum": 0
},
"scope_kind": {
"type": "string",
"enum": [
"chapter",
"range",
"full"
]
},
"start_chapter_card_id": {
"type": "integer",
"minimum": 1
},
"end_chapter_card_id": {
"type": "integer",
"minimum": 1
},
"instructions": {
"type": "string",
"maxLength": 10000,
"description": "Run-specific direction for Novel manuscript generation. Readiness, quote and start must receive the same value."
},
"child_job_id": {
"type": "string"
},
"expected_revisions": {
"type": "object",
"description": "Current manuscript revisions keyed by Chapter card id. Required when accepting a Novel manuscript candidate.",
"propertyNames": {
"pattern": "^[1-9][0-9]*quot;
},
"additionalProperties": {
"type": "integer",
"minimum": 0
}
},
"candidate_plain_texts": {
"type": "object",
"description": "Optional edited Chapter prose keyed by Chapter card id. Send the complete proposed prose for every edited Chapter when accepting a candidate; BeatBandit materializes the canonical manuscript document.",
"minProperties": 1,
"propertyNames": {
"pattern": "^[1-9][0-9]*quot;
},
"additionalProperties": {
"type": "string",
"minLength": 1,
"maxLength": 1000000
}
}
},
"additionalProperties": false
}
},
"allOf": [
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"const": "manuscript_import"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"payload"
]
},
"then": {
"properties": {
"phase": {
"enum": [
"readiness",
"start"
]
}
},
"oneOf": [
{
"required": [
"manuscript_file"
]
},
{
"properties": {
"payload": {
"required": [
"manuscript_text"
]
}
}
}
],
"allOf": [
{
"if": {
"required": [
"project_id"
]
},
"then": {
"properties": {
"payload": {
"not": {
"anyOf": [
{
"required": [
"target_name"
]
},
{
"required": [
"template_settings"
]
}
]
}
}
}
}
},
{
"if": {
"properties": {
"phase": {
"const": "start"
}
}
},
"then": {
"properties": {
"payload": {
"required": [
"source_sha256",
"import_chapters"
]
}
},
"anyOf": [
{
"required": [
"project_id"
],
"properties": {
"payload": {
"required": [
"base_outline_revision"
]
}
}
},
{
"not": {
"required": [
"project_id"
]
},
"properties": {
"payload": {
"required": [
"target_name"
]
}
}
}
]
}
}
]
}
},
{
"if": {
"properties": {
"workflow": {
"const": "weave"
}
}
},
"then": {
"properties": {
"phase": {
"enum": [
"readiness",
"quote",
"start",
"finalize",
"apply"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "weave"
},
"phase": {
"const": "apply"
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"weave_run_id"
],
"propertyNames": {
"enum": [
"weave_run_id"
]
}
}
}
},
"else": {
"properties": {
"payload": {
"not": {
"required": [
"weave_run_id"
]
}
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "weave"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"episode_count"
],
"propertyNames": {
"enum": [
"episode_count",
"locked_episode_ids",
"mode",
"target_episode_id",
"preview",
"idempotency_key",
"approach_id",
"custom_prompt",
"billing_quote_id",
"billing_request_id"
]
}
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "episode_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"approach_id",
"custom_prompt"
],
"propertyNames": {
"enum": [
"approach_id",
"custom_prompt",
"target_episode_count",
"llm_identifier",
"billing_quote_id",
"billing_request_id"
]
}
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "scene_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"approach_id",
"custom_prompt"
],
"propertyNames": {
"enum": [
"approach_id",
"custom_prompt",
"target_scene_count",
"llm_identifier",
"billing_quote_id",
"billing_request_id"
]
}
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "beat_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"propertyNames": {
"enum": [
"idea",
"template_id",
"filled_text",
"placeholder_values",
"include_context",
"options",
"llm_identifier",
"billing_quote_id",
"billing_request_id"
]
}
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "treatment_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"template_id"
],
"propertyNames": {
"enum": [
"template_id",
"options",
"llm_identifier",
"billing_quote_id",
"billing_request_id"
]
}
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "trailer_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"template_id"
],
"propertyNames": {
"enum": [
"template_id",
"options",
"billing_quote_id",
"billing_request_id"
]
}
}
}
}
},
{
"if": {
"properties": {
"phase": {
"const": "quote"
}
}
},
"then": {
"anyOf": [
{
"properties": {
"workflow": {
"enum": [
"sequence_wizard",
"treatment_wizard",
"trailer_wizard",
"beat_wizard",
"scene_wizard",
"episode_wizard",
"story_bootstrap",
"weave"
]
}
}
},
{
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"enum": [
"blueprint",
"chapter_outline"
]
}
},
"required": [
"novel_operation",
"wizard_settings"
]
}
},
"required": [
"payload"
]
},
{
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"const": "voice_lab"
}
},
"required": [
"novel_operation",
"representative_chapter_ids"
]
}
},
"required": [
"payload"
]
},
{
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"const": "manuscript_generation"
}
},
"required": [
"novel_operation",
"scope_kind"
]
}
},
"required": [
"payload"
]
}
]
}
},
{
"if": {
"allOf": [
{
"properties": {
"phase": {
"const": "start"
}
}
},
{
"anyOf": [
{
"properties": {
"workflow": {
"enum": [
"sequence_wizard",
"treatment_wizard",
"trailer_wizard",
"beat_wizard",
"scene_wizard",
"episode_wizard",
"story_bootstrap",
"weave"
]
}
}
},
{
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"enum": [
"blueprint",
"chapter_outline",
"voice_lab",
"manuscript_generation"
]
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"payload"
]
}
]
}
]
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"billing_quote_id",
"billing_request_id"
]
}
}
},
"else": {
"properties": {
"payload": {
"not": {
"anyOf": [
{
"required": [
"billing_quote_id"
]
},
{
"required": [
"billing_request_id"
]
}
]
}
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "sequence_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"properties": {
"payload": {
"propertyNames": {
"enum": [
"sequence_numbers",
"llm_identifier",
"billing_quote_id",
"billing_request_id"
]
}
}
}
}
},
{
"if": {
"not": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"enum": [
"source_import",
"manuscript_import"
]
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"payload"
]
}
},
"then": {
"required": [
"project_id"
]
}
},
{
"if": {
"properties": {
"workflow": {
"const": "story_bootstrap"
}
}
},
"then": {
"properties": {
"phase": {
"enum": [
"readiness",
"quote",
"start"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "story_bootstrap"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"phase": {
"enum": [
"readiness",
"quote",
"start"
]
},
"payload": {
"type": "object",
"required": [
"idea"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "sequence_wizard"
}
}
},
"then": {
"properties": {
"phase": {
"enum": [
"quote",
"start",
"finalize"
],
"description": "Quote scope/model; start with accepted quote/request UUIDs; observe/finalize."
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
}
},
"required": [
"workflow"
]
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"novel_operation"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"const": "source_project"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"payload"
]
},
"then": {
"required": [
"project_id",
"payload"
],
"properties": {
"payload": {
"required": [
"target_name"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"const": "start"
},
"payload": {
"properties": {
"novel_operation": {
"const": "source_project"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"properties": {
"payload": {
"required": [
"source_revision"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"const": "source_import"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"payload"
]
},
"then": {
"properties": {
"phase": {
"const": "start"
},
"payload": {
"required": [
"target_name"
],
"allOf": [
{
"not": {
"required": [
"screenplay_text",
"screenplay_file"
]
}
},
{
"not": {
"required": [
"story_outline_text",
"story_outline_file"
]
}
}
]
}
},
"anyOf": [
{
"properties": {
"payload": {
"required": [
"screenplay_text"
]
}
}
},
{
"properties": {
"payload": {
"required": [
"story_outline_text"
]
}
}
},
{
"properties": {
"payload": {
"required": [
"screenplay_file"
]
}
}
},
{
"properties": {
"payload": {
"required": [
"story_outline_file"
]
}
}
},
{
"required": [
"screenplay_file"
]
},
{
"required": [
"story_outline_file"
]
}
],
"allOf": [
{
"not": {
"allOf": [
{
"required": [
"screenplay_file"
]
},
{
"properties": {
"payload": {
"anyOf": [
{
"required": [
"screenplay_text"
]
},
{
"required": [
"screenplay_file"
]
}
]
}
}
}
]
}
},
{
"not": {
"allOf": [
{
"required": [
"story_outline_file"
]
},
{
"properties": {
"payload": {
"anyOf": [
{
"required": [
"story_outline_text"
]
},
{
"required": [
"story_outline_file"
]
}
]
}
}
}
]
}
}
]
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"enum": [
"quote",
"start"
]
},
"payload": {
"properties": {
"novel_operation": {
"const": "voice_lab"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"required": [
"project_id",
"payload"
],
"properties": {
"payload": {
"required": [
"representative_chapter_ids"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"const": "start"
},
"payload": {
"properties": {
"novel_operation": {
"enum": [
"blueprint",
"chapter_outline"
]
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"required": [
"project_id",
"payload"
],
"properties": {
"payload": {
"required": [
"wizard_settings"
]
}
}
}
},
{
"not": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"const": "apply"
},
"payload": {
"properties": {
"novel_operation": {
"enum": [
"blueprint",
"chapter_outline"
]
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"const": "apply"
},
"payload": {
"properties": {
"novel_operation": {
"const": "voice_lab"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"required": [
"project_id",
"job_id",
"payload"
],
"properties": {
"payload": {
"required": [
"profile_id",
"expected_contract_revision",
"expected_proof_revision"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"enum": [
"readiness",
"quote",
"start"
]
},
"payload": {
"properties": {
"novel_operation": {
"const": "manuscript_generation"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"required": [
"project_id",
"payload"
],
"properties": {
"payload": {
"required": [
"scope_kind"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"enum": [
"readiness",
"quote",
"start"
]
},
"payload": {
"properties": {
"novel_operation": {
"const": "manuscript_generation"
},
"scope_kind": {
"enum": [
"chapter",
"range"
]
}
},
"required": [
"novel_operation",
"scope_kind"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"properties": {
"payload": {
"required": [
"start_chapter_card_id"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"enum": [
"readiness",
"quote",
"start"
]
},
"payload": {
"properties": {
"novel_operation": {
"const": "manuscript_generation"
},
"scope_kind": {
"const": "range"
}
},
"required": [
"novel_operation",
"scope_kind"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"properties": {
"payload": {
"required": [
"end_chapter_card_id"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"const": "candidate_review"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"payload"
]
},
"then": {
"required": [
"project_id",
"payload"
],
"properties": {
"phase": {
"enum": [
"accept",
"reject"
]
},
"payload": {
"required": [
"child_job_id"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"const": "accept"
},
"payload": {
"properties": {
"novel_operation": {
"const": "candidate_review"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"properties": {
"payload": {
"required": [
"expected_revisions"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"phase": {
"const": "finalize"
},
"payload": {
"properties": {
"novel_operation": {
"enum": [
"blueprint",
"chapter_outline",
"voice_lab",
"manuscript_generation"
]
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"phase",
"payload"
]
},
"then": {
"required": [
"project_id",
"job_id"
]
}
},
{
"if": {
"properties": {
"phase": {
"const": "finalize"
}
}
},
"then": {
"required": [
"job_id"
]
}
},
{
"if": {
"not": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"const": "source_import"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"workflow",
"payload"
]
}
},
"then": {
"not": {
"anyOf": [
{
"required": [
"screenplay_file"
]
},
{
"required": [
"story_outline_file"
]
}
]
}
}
}
],
"additionalProperties": false,
"dependentSchemas": {
"manuscript_file": {
"properties": {
"workflow": {
"const": "novel_adaptation"
},
"payload": {
"properties": {
"novel_operation": {
"const": "manuscript_import"
}
},
"required": [
"novel_operation"
]
}
},
"required": [
"payload"
]
}
}
}Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"workflow",
"phase"
],
"properties": {
"workflow": {
"type": "string"
},
"phase": {
"type": "string"
},
"async": {
"type": "boolean"
},
"job_id": {
"type": "string"
},
"reservation_id": {
"type": "string"
},
"bootstrap_stage": {
"type": "string"
},
"project_id": {
"type": "integer"
},
"project_name": {
"type": "string"
},
"project_mode": {
"type": "string"
},
"append_supported": {
"type": "boolean"
},
"actual_scene_count": {
"type": "integer"
},
"bootstrap_context": {
"type": "object"
},
"readiness": {
"type": "object"
},
"result": {
"type": "object"
},
"resource_links": {
"type": "array",
"items": {
"type": "object"
}
},
"pipeline_state": {
"$ref": "./_common/pipeline_state.schema.json"
},
"next_actions": {
"type": "array",
"items": {
"$ref": "./_common/next_action.schema.json"
}
},
"credits_charged": {
"type": "number",
"minimum": 0
},
"credits_previously_committed": {
"type": "number",
"minimum": 0
},
"credit_status": {
"type": "string",
"enum": [
"quoted",
"reserved",
"committed",
"refunded",
"not_metered",
"unavailable"
]
},
"credits_quoted": {
"type": "number",
"minimum": 0
},
"credits_reserved": {
"type": "number",
"minimum": 0
},
"credits_refunded": {
"type": "number",
"minimum": 0
},
"credits_skipped_reason": {
"type": "string"
}
},
"additionalProperties": true
}