story_revision_run
Use when an existing story needs structural changes, connected planning/page revisions, dialogue polish, alternative directions, or planning-to-pages comparison. Scene-list changes use scene_list_revision; connected card/page changes use planning_revision. Save exact agreed changes with story_mutate; request editorial feedback with story_review_run. Paid generation requires quote and acceptance before Start with payload.billing_quote_id and payload.billing_request_id; preserve both IDs and the quoted payload on retries. Follow job_get's completion/finalize actions, review proposals, and apply only approved choices. Dependent page and outline proposals must be applied with their parent revision.
When to use
- planning_revision uses create, readiness, quote, accepted Start, finalize, review and apply; create saves the revision request/scope without changing story content or spending credits.
- editing_comparison reads live or selected proposed planning/pages; readiness/quote/start use payload.revision_id with optional source_selection and page_proposal_ids. Review uses comparison_id; decide records retain/defer with finding_id and request_id, requiring an explanation for retain. It does not apply content.
- Inspect dependent pages with screenplay_generation_run scene_screenplay phase=source, then generate and review page candidates. Parent Apply selects page_proposal_ids alongside the exact structural operation_ids or planning choices; prerequisites come from the parent's saved receipts.
- After committing a plan, apply saved dependent drafts with operation_ids=[] for scene_list_revision or payload.choices=[] for planning_revision and selected page/outline proposal IDs. This records new draft decisions, not repeated planning decisions.
- Selected outline_proposal_ids must match the same story/page selection; parent Apply commits the outline and its prerequisites atomically. Outline proposals cannot be applied alone.
- outline_reconciliation proposes a scene outline from a saved comparison; readiness/quote/start use comparison_id and payload.revision_id/scene_id, finalize uses job_id and scene_id, and review uses proposal_id and scene_id. List uses revision_id, source_selection, optional page_proposal_ids, limit and offset. Apply through the parent planning_revision or scene_list_revision.
- Polish start accepts payload.revision_id to use an existing revision's scope, or payload.edit_scope to select scene/episode targets for a new revision. Never supply both; omit both for whole-project Polish.
- planning_revision status reads the current lifecycle checkpoint. Finish/reopen require its version and review key; finish only on writer request. Set aside remaining work only with explicit authorization. These phases never apply content or spend credits.
- Continue a saved Room Review note with planning_revision create and payload={request_id,note_ref:{review_id,note_id,decision}}. Decision is inspect, explore or propose; the server attaches original evidence. Inspect returns an existing comparison/decision flow; do not copy note text into a detached revision.
- Use `adaptive_revision` to develop a saved revision under an explicit credit allowance. Create the revision with `planning_revision` first, then use readiness/start. The run continues on the server; list/status inspect your own runs. Answer, scope and budget resume saved decisions with their current versions; recover and stop preserve submitted work. Starting never applies proposals.
- Shared editorial decisions use `adaptive_revision` phases `questions`, `question_answer` and `question_continue`. Questions lists pending shared questions, optionally filtered by proposal_id. Answer requires question_id plus payload request_id/answer; continue requires question_id and an empty payload to resume the saved answer after interruption. Current editors may answer; the original run keeps its own access and allowance. Neither phase accepts a run owner, budget or Apply permission. Execution internals stay private.
- The structured material already exists and you want to alter, refine, or explore alternatives — the verb is CHANGE.
- Use `change_wizard` to start a whole-story connected revision from a free-form direction. It returns shared revision_id and proposal_id identities; continue with `planning_revision` review/apply phases, including partial decisions and dependent page drafts.
- For Novel projects, `change_wizard` readiness/quote/start/finalize take payload.change_request and optional payload.novel_scope (whole_book default, from_chapter with chapter_card_id, or chapters with chapter_card_ids) and publish one shared manuscript proposal (planning cards, Chapter plans, Canon, prose of in-scope written Chapters, Chapter List changes only when asked). Quote rejects a scope too large for the model with context_too_large; choose fewer Chapters. Review and apply it with `story_review_run(workflow=novel_review, payload.novel_operation=change_proposal)`, deciding Chapter List units first and applying only with author approval.
- Use `planning_revision` for connected beat/card-field and screenplay revisions, including consequences beyond the initiating planning card. Scene-list additions, merges and reordering belong to `scene_list_revision` even when dependent pages need revision.
- Supply optional payload.instruction on `planning_revision` start to develop a chosen direction or redirect the next proposal. The generator retains the original revision request and scope; it does not see your conversation unless the direction is passed explicitly.
- Start `scene_list_revision` directly with readiness and payload.change_request plus optional scene_ids. It creates its own revision at accepted Start; do not call `planning_revision` create as a prerequisite. Supply revision_id only when intentionally continuing a saved revision.
- Use `scene_list_revision` to generate structural additions or changes within an existing scene list, including new scenes, scene order, merges, deletions, scene-to-beat links and dependent pages. Readiness, quote and approved Start produce a reviewable proposal; they do not replace the whole scene list.
- To develop an unapplied structural proposal, use `scene_list_revision` readiness/start with payload revision_id, source_selection, optional page_proposal_ids, and change_request for the next pass. It returns replacement operations with mapped native drafts; it never applies the source proposal.
- Use `polish_wizard` when refining existing scene-level dialogue and style without restructuring the story.
- Use `creative_canvas` when generating alternative directions or what-ifs for selected cards rather than committing changes immediately.
- Use `creative_canvas` review with proposal_id and payload.revision_id to inspect saved adaptive directions after the generation job expires. Review does not choose or apply a direction.
When not to use
- Do not use for direct point edits when screenplay tools fit better.
- For initial whole-outline generation or an explicitly requested whole-list replacement, use `story_development_run`. Creating new scenes inside an existing outline can be a structural revision; the fact that the new scene does not exist yet does not make it a Scene Wizard task.
- For an exact scene addition already developed in conversation, use `story_mutate(entity_type=scene, operation=create)` rather than generating a second version of the agreed scene.
- Do not use `change_wizard` to fill empty treatment sections; use `story_development_run` with `workflow=treatment_wizard`.
- Do not use to **get editorial feedback** without proposing changes — use `story_review_run` (room_review, analysis_wizard, continuity_audit) instead.
- For standalone surgical prose edits use `screenplay_edit_propose` / `screenplay_edit_apply`; use `planning_revision` when planning and screenplay consequences belong in one review.
- Do not use `change_wizard` for scene-list condensation or scene merges; use `scene_list_revision` so structural changes and dependent pages can be reviewed and applied together.
Examples
- “"Develop a new confrontation scene and adjust its surrounding scenes and dependent pages." Use `scene_list_revision`, preserving the rest of the outline for review.”
- “Run a change wizard over this project.”
- “Explore new directions in Creative Canvas for selected cards.”
- “Boundary - "Improve the existing scene list for better flow." Use `scene_list_revision` for structural changes; `polish_wizard` is for screenplay prose.”
- “Boundary - "Restructure act 2 around a betrayal beat." Use `change_wizard` here because the caller wants to commit changes, not just receive feedback.”
- “Boundary - "Merge these three procedural scenes into one sharper set piece." Use `scene_list_revision` because scene structure and dependent screenplay prose need a coordinated revision.”
Anti-examples
- Add the already-developed scene after an identified scene without changing surrounding scenes; use `story_mutate(entity_type=scene, operation=create)`.
- Show me template manifests.
- Generating a brand-new scene outline from an idea — that is `story_development_run` with `scene_wizard` or `story_bootstrap`.
- Fill treatment cards 50.10.10-50.10.40 from scratch — that is `story_development_run` with `treatment_wizard`.
- Asking for editorial scores or notes without applying any changes — that is `story_review_run` with `analysis_wizard` or `room_review`.
- Writing screenplay prose from the existing outline — that is `screenplay_generation_run` with `screenplay_writer`.
Workflows
Switch behavior by setting the workflow input field.
| Workflow | Phases | Calls |
|---|---|---|
outline_reconciliation | readiness, quote, start, finalize, review, list | outline_reconciliation.run |
editing_comparison | readiness, start, finalize, review, decide | editing_comparison.run |
planning_revision | status, finish, reopen, create, readiness, start, finalize, review, apply | planning_revision.run |
adaptive_revision | questions, question_answer, question_continue, readiness, start, list, status, answer, scope, budget, recover, stop | adaptive_revision.run |
change_wizard | readiness, start, finalize | change_wizard.run |
scene_list_revision | readiness, start, finalize, review, apply | scene_list_revision.run |
polish_wizard | readiness, start, finalize | polish_wizard.run |
creative_canvas | readiness, quote, start, finalize, review | creative_canvas.generate_directions |
Linked resources
Tool calls may return resource_links pointing at these resource families.
Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"oneOf": [
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id"
],
"properties": {
"workflow": {
"type": "string",
"enum": [
"change_wizard",
"scene_list_revision",
"polish_wizard",
"creative_canvas",
"planning_revision"
],
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"phase": {
"type": "string",
"enum": [
"readiness",
"start",
"finalize",
"apply",
"create",
"review",
"status",
"finish",
"reopen",
"quote"
],
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"project_id": {
"type": "integer"
},
"job_id": {
"type": "string"
},
"reservation_id": {
"type": "string"
},
"proposal_id": {
"type": "string",
"description": "Saved diff proposal id returned by scene_list_revision finalize; required for scene_list_revision apply."
},
"operation_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Exact selected scene_list_revision operations for parent Apply; dependencies are enforced server-side. Use [] with selected page/outline proposals after the plan is already committed."
},
"payload": {
"type": "object",
"properties": {
"change_request": {
"type": "string",
"description": "Free-form revision direction. Required for change_wizard and scene_list_revision start."
},
"scene_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Optional scene ids/codes to focus scene_list_revision context."
},
"sequence_numbers": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Optional sequence numbers to focus scene_list_revision context."
},
"constraints": {
"type": "object",
"description": "Scene List Revision constraints. preserve_beat_codes and preserve_scene_ids are enforced at finalize/apply; max_scene_deletions limits delete/merge absorption count.",
"properties": {
"preserve_beat_codes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Beat codes that must remain linked to a surviving scene after apply."
},
"preserve_scene_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Scene ids that must not be deleted or absorbed."
},
"max_scene_deletions": {
"type": "integer",
"description": "Maximum number of scenes that may be deleted or absorbed by merge operations."
}
},
"additionalProperties": true
},
"operation_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Exact selected scene_list_revision operations for parent Apply; dependencies are enforced server-side. Use [] with selected page/outline proposals after the plan is already committed."
},
"beat_changes": {
"type": "array",
"items": {
"type": "object"
}
},
"novel_scope": {
"type": "object",
"description": "Novel change_wizard quote/start only: Chapters whose prose is read and may change (default whole book). Chapter plan and prose changes stay inside it.",
"properties": {
"kind": {
"type": "string",
"enum": [
"whole_book",
"from_chapter",
"chapters"
]
},
"chapter_card_id": {
"type": "integer",
"minimum": 1,
"description": "First Chapter for kind=from_chapter."
},
"chapter_card_ids": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1
},
"minItems": 1,
"maxItems": 500,
"uniqueItems": true,
"description": "Chapters for kind=chapters."
}
},
"required": [
"kind"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "from_chapter"
}
}
},
"then": {
"required": [
"chapter_card_id"
],
"properties": {
"chapter_card_ids": false
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "chapters"
}
}
},
"then": {
"required": [
"chapter_card_ids"
],
"properties": {
"chapter_card_id": false
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "whole_book"
}
}
},
"then": {
"properties": {
"chapter_card_id": false,
"chapter_card_ids": false
}
}
}
]
},
"prompt": {
"type": "string"
},
"preset_id": {
"type": "string"
},
"model_hint": {
"type": "string"
},
"snapshot_rev": {
"type": "integer"
},
"selected_card_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"canon_excluded_card_codes": {
"type": "array",
"items": {
"type": "string"
}
},
"visible_group_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"refinement_text": {
"type": "string"
},
"discussion_turns": {
"type": "array",
"items": {
"type": "object"
}
},
"current_directions": {
"type": "array",
"items": {
"type": "object"
}
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"instruction": {
"type": "string",
"minLength": 1,
"maxLength": 8000
},
"read_scope": {
"type": "object",
"properties": {
"whole_project": {
"type": "boolean"
},
"entities": {
"type": "array",
"maxItems": 500,
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"kind",
"id"
],
"properties": {
"kind": {
"enum": [
"card",
"scene",
"episode"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [
"whole_project"
],
"properties": {
"whole_project": {
"const": true
}
}
},
"then": {
"properties": {
"entities": {
"maxItems": 0
}
}
}
}
]
},
"edit_scope": {
"type": "object",
"properties": {
"whole_project": {
"type": "boolean"
},
"entities": {
"type": "array",
"maxItems": 500,
"uniqueItems": true,
"items": {
"type": "object",
"required": [
"kind",
"id"
],
"properties": {
"kind": {
"enum": [
"card",
"scene",
"episode"
]
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [
"whole_project"
],
"properties": {
"whole_project": {
"const": true
}
}
},
"then": {
"properties": {
"entities": {
"maxItems": 0
}
}
}
}
]
},
"choices": {
"type": "array",
"minItems": 0,
"maxItems": 500,
"items": {
"type": "object",
"required": [
"suggestion_id",
"decision"
],
"properties": {
"suggestion_id": {
"type": "string",
"minLength": 1
},
"decision": {
"enum": [
"accept",
"reject"
]
}
},
"additionalProperties": false
},
"description": "planning_revision Apply decisions for exact suggestion IDs. Use [] with selected page/outline proposals after the plan is committed. Review before recording approved accept/reject decisions."
},
"source_selection": {
"type": "object",
"additionalProperties": false,
"required": [
"proposal_id",
"operation_ids"
],
"properties": {
"proposal_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"operation_ids": {
"type": "array",
"maxItems": 500,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 120
}
},
"edited_fields": {
"type": "object",
"maxProperties": 500,
"additionalProperties": {
"type": "object",
"additionalProperties": true
}
}
},
"description": "Saved parent proposal and selected operation/suggestion IDs for proposed-source comparison or development. Retain selection and any source page_proposal_ids through readiness, quote and Start."
},
"page_proposal_ids": {
"type": "array",
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": "Source page candidates for readiness/quote/Start with source_selection; retain exact IDs. Apply selected drafts using top-level page_proposal_ids."
},
"note_ref": {
"type": "object",
"required": [
"review_id",
"note_id",
"decision"
],
"properties": {
"review_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"note_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"decision": {
"enum": [
"inspect",
"explore",
"propose"
]
}
},
"additionalProperties": false
},
"expected_version": {
"type": "integer",
"minimum": 1
},
"expected_review_key": {
"type": "string",
"minLength": 64,
"maxLength": 64
},
"set_aside_pending": {
"type": "boolean"
},
"billing_quote_id": {
"type": "string",
"format": "uuid",
"description": "Accepted quote identity from the returned Start action; required on Start only. Reuse unchanged on retries."
},
"billing_request_id": {
"type": "string",
"format": "uuid",
"description": "Start request UUID from the accepted quote action; required on Start only. Reuse with the same quote and scope on retries."
}
},
"additionalProperties": false
},
"outline_proposal_ids": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": "Parent Apply only: reviewed outline follow-ups matching the selected story/pages. Applied atomically with prerequisites; never apply an outline proposal alone."
},
"page_proposal_ids": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": "On parent Apply, select reviewed dependent pages with their matching operation_ids or planning choices. Pages cannot be applied alone. After committing a plan, use operation_ids=[] or payload.choices=[] to decide saved drafts."
},
"edited_fields": {
"type": "object",
"maxProperties": 500,
"additionalProperties": {
"type": "object",
"additionalProperties": true
}
}
},
"allOf": [
{
"if": {
"properties": {
"phase": {
"const": "apply"
}
}
},
"then": {
"properties": {
"workflow": {
"enum": [
"scene_list_revision",
"planning_revision"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "scene_list_revision"
},
"phase": {
"const": "apply"
}
}
},
"then": {
"required": [
"proposal_id"
]
}
},
{
"if": {
"properties": {
"phase": {
"const": "finalize"
}
}
},
"then": {
"required": [
"job_id"
]
}
},
{
"if": {
"properties": {
"workflow": {
"const": "scene_list_revision"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"change_request"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "change_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"anyOf": [
{
"required": [
"change_request"
]
},
{
"required": [
"beat_changes"
],
"properties": {
"beat_changes": {
"minItems": 1
}
}
}
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "polish_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"prompt"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "creative_canvas"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"selected_card_codes"
],
"properties": {
"selected_card_codes": {
"minItems": 1
}
}
}
}
}
},
{
"if": {
"anyOf": [
{
"required": [
"page_proposal_ids"
]
},
{
"required": [
"outline_proposal_ids"
]
}
]
},
"then": {
"properties": {
"workflow": {
"enum": [
"scene_list_revision",
"planning_revision"
]
},
"phase": {
"const": "apply"
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "planning_revision"
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"operation_ids": false,
"reservation_id": false
}
},
"else": {
"if": {
"properties": {
"workflow": {
"const": "scene_list_revision"
}
}
},
"then": {
"properties": {
"phase": {
"not": {
"const": "create"
}
},
"payload": {
"properties": {
"request_id": false,
"instruction": false,
"read_scope": false,
"edit_scope": false,
"choices": false
}
}
}
},
"else": {
"if": {
"properties": {
"workflow": {
"const": "creative_canvas"
},
"phase": {
"const": "review"
}
}
},
"then": {
"required": [
"proposal_id",
"payload"
],
"properties": {
"payload": {
"required": [
"revision_id"
],
"properties": {
"request_id": false,
"instruction": false,
"read_scope": false,
"edit_scope": false,
"choices": false
}
}
}
},
"else": {
"if": {
"properties": {
"workflow": {
"const": "polish_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"properties": {
"payload": {
"not": {
"required": [
"revision_id",
"edit_scope"
]
},
"properties": {
"request_id": false,
"instruction": false,
"read_scope": false,
"choices": false
}
}
}
},
"else": {
"properties": {
"phase": {
"not": {
"enum": [
"create",
"review"
]
}
},
"payload": {
"properties": {
"request_id": false,
"instruction": false,
"read_scope": false,
"edit_scope": false,
"choices": false
}
}
},
"allOf": [
{
"if": {
"properties": {
"workflow": {
"const": "creative_canvas"
},
"phase": {
"enum": [
"readiness",
"quote",
"start"
]
}
}
},
"then": {},
"else": {
"properties": {
"payload": {
"properties": {
"revision_id": false
}
}
}
}
}
]
}
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "planning_revision"
},
"phase": {
"const": "create"
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"request_id"
],
"properties": {
"change_request": false,
"scene_ids": false,
"sequence_numbers": false,
"constraints": false,
"operation_ids": false,
"beat_changes": false,
"prompt": false,
"preset_id": false,
"model_hint": false,
"snapshot_rev": false,
"selected_card_codes": false,
"canon_excluded_card_codes": false,
"visible_group_ids": false,
"refinement_text": false,
"discussion_turns": false,
"current_directions": false,
"revision_id": false,
"choices": false
},
"oneOf": [
{
"required": [
"instruction",
"read_scope",
"edit_scope"
],
"properties": {
"note_ref": false
}
},
{
"required": [
"note_ref"
],
"properties": {
"instruction": false,
"read_scope": false,
"edit_scope": false
}
}
]
},
"proposal_id": false,
"job_id": false
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "planning_revision"
},
"phase": {
"const": "readiness"
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"revision_id"
],
"properties": {
"change_request": false,
"scene_ids": false,
"sequence_numbers": false,
"constraints": false,
"operation_ids": false,
"beat_changes": false,
"prompt": false,
"preset_id": false,
"model_hint": false,
"snapshot_rev": false,
"selected_card_codes": false,
"canon_excluded_card_codes": false,
"visible_group_ids": false,
"refinement_text": false,
"discussion_turns": false,
"current_directions": false,
"request_id": false,
"instruction": false,
"read_scope": false,
"edit_scope": false,
"choices": false
}
},
"proposal_id": false,
"job_id": false
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "planning_revision"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"revision_id"
],
"properties": {
"change_request": false,
"scene_ids": false,
"sequence_numbers": false,
"constraints": false,
"operation_ids": false,
"beat_changes": false,
"prompt": false,
"preset_id": false,
"model_hint": false,
"snapshot_rev": false,
"selected_card_codes": false,
"canon_excluded_card_codes": false,
"visible_group_ids": false,
"refinement_text": false,
"discussion_turns": false,
"current_directions": false,
"request_id": false,
"read_scope": false,
"edit_scope": false,
"choices": false
}
},
"proposal_id": false,
"job_id": false
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "planning_revision"
},
"phase": {
"const": "finalize"
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"revision_id"
],
"properties": {
"change_request": false,
"scene_ids": false,
"sequence_numbers": false,
"constraints": false,
"operation_ids": false,
"beat_changes": false,
"prompt": false,
"preset_id": false,
"model_hint": false,
"snapshot_rev": false,
"selected_card_codes": false,
"canon_excluded_card_codes": false,
"visible_group_ids": false,
"refinement_text": false,
"discussion_turns": false,
"current_directions": false,
"request_id": false,
"instruction": false,
"read_scope": false,
"edit_scope": false,
"choices": false
}
},
"proposal_id": false
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "planning_revision"
},
"phase": {
"const": "review"
}
}
},
"then": {
"required": [
"payload",
"proposal_id"
],
"properties": {
"payload": {
"required": [
"revision_id"
],
"properties": {
"change_request": false,
"scene_ids": false,
"sequence_numbers": false,
"constraints": false,
"operation_ids": false,
"beat_changes": false,
"prompt": false,
"preset_id": false,
"model_hint": false,
"snapshot_rev": false,
"selected_card_codes": false,
"canon_excluded_card_codes": false,
"visible_group_ids": false,
"refinement_text": false,
"discussion_turns": false,
"current_directions": false,
"request_id": false,
"instruction": false,
"read_scope": false,
"edit_scope": false,
"choices": false
}
},
"job_id": false
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "planning_revision"
},
"phase": {
"const": "apply"
}
}
},
"then": {
"required": [
"payload",
"proposal_id"
],
"properties": {
"payload": {
"required": [
"revision_id",
"request_id",
"choices"
],
"properties": {
"change_request": false,
"scene_ids": false,
"sequence_numbers": false,
"constraints": false,
"operation_ids": false,
"beat_changes": false,
"prompt": false,
"preset_id": false,
"model_hint": false,
"snapshot_rev": false,
"selected_card_codes": false,
"canon_excluded_card_codes": false,
"visible_group_ids": false,
"refinement_text": false,
"discussion_turns": false,
"current_directions": false,
"instruction": false,
"read_scope": false,
"edit_scope": false
}
},
"job_id": false
},
"anyOf": [
{
"properties": {
"payload": {
"properties": {
"choices": {
"minItems": 1
}
}
}
}
},
{
"required": [
"page_proposal_ids"
],
"properties": {
"page_proposal_ids": {
"minItems": 1
}
}
},
{
"required": [
"outline_proposal_ids"
],
"properties": {
"outline_proposal_ids": {
"minItems": 1
}
}
}
]
}
},
{
"if": {
"properties": {
"workflow": {
"const": "scene_list_revision"
},
"phase": {
"const": "review"
}
}
},
"then": {
"required": [
"proposal_id",
"payload"
],
"properties": {
"payload": {
"required": [
"revision_id"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"enum": [
"planning_revision",
"creative_canvas",
"scene_list_revision"
]
},
"phase": {
"enum": [
"readiness",
"start",
"quote"
]
}
}
},
"then": {},
"else": {
"properties": {
"payload": {
"properties": {
"source_selection": false,
"page_proposal_ids": false
}
}
}
}
},
{
"if": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"page_proposal_ids"
]
}
}
},
"then": {
"properties": {
"payload": {
"required": [
"source_selection"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"enum": [
"creative_canvas",
"scene_list_revision"
]
},
"payload": {
"required": [
"source_selection"
]
}
},
"required": [
"payload"
]
},
"then": {
"properties": {
"payload": {
"required": [
"revision_id"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"const": "planning_revision"
},
"phase": {
"const": "create"
}
}
},
"then": {},
"else": {
"properties": {
"payload": {
"properties": {
"note_ref": false
}
}
}
}
},
{
"if": {
"properties": {
"phase": {
"enum": [
"status",
"finish",
"reopen"
]
}
}
},
"then": {
"properties": {
"workflow": {
"const": "planning_revision"
},
"job_id": false,
"reservation_id": false,
"proposal_id": false,
"operation_ids": false,
"page_proposal_ids": false,
"outline_proposal_ids": false
}
},
"else": {
"properties": {
"payload": {
"properties": {
"expected_version": false,
"expected_review_key": false,
"set_aside_pending": false
}
}
}
}
},
{
"if": {
"properties": {
"phase": {
"const": "status"
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"type": "object",
"required": [
"revision_id"
],
"properties": {
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"additionalProperties": false
}
}
}
},
{
"if": {
"properties": {
"phase": {
"enum": [
"finish",
"reopen"
]
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"type": "object",
"required": [
"revision_id",
"request_id",
"expected_version",
"expected_review_key",
"set_aside_pending"
],
"properties": {
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"expected_version": {
"type": "integer",
"minimum": 1
},
"expected_review_key": {
"type": "string",
"minLength": 64,
"maxLength": 64
},
"set_aside_pending": {
"type": "boolean"
}
},
"additionalProperties": false
}
}
}
},
{
"if": {
"properties": {
"phase": {
"const": "reopen"
}
}
},
"then": {
"properties": {
"payload": {
"properties": {
"set_aside_pending": {
"const": false
}
}
}
}
}
},
{
"if": {
"properties": {
"phase": {
"const": "quote"
}
}
},
"then": {
"properties": {
"workflow": {
"enum": [
"polish_wizard",
"planning_revision",
"change_wizard",
"scene_list_revision",
"creative_canvas"
]
}
}
}
},
{
"if": {
"properties": {
"workflow": {
"enum": [
"polish_wizard",
"planning_revision",
"change_wizard",
"scene_list_revision",
"creative_canvas"
]
},
"phase": {
"const": "start"
}
}
},
"then": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"billing_quote_id",
"billing_request_id"
]
}
}
},
"else": {
"properties": {
"payload": {
"properties": {
"billing_quote_id": false,
"billing_request_id": false
}
}
}
}
},
{
"if": {
"required": [
"payload"
],
"properties": {
"payload": {
"required": [
"novel_scope"
]
}
}
},
"then": {
"properties": {
"workflow": {
"const": "change_wizard"
},
"phase": {
"enum": [
"quote",
"start"
]
}
}
}
}
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"workflow": {
"const": "editing_comparison",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"enum": [
"readiness",
"quote",
"start"
],
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"payload": {
"type": "object",
"properties": {
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"source_selection": {
"type": "object",
"properties": {
"proposal_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"operation_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"minItems": 0,
"maxItems": 500,
"uniqueItems": true
},
"edited_fields": {
"type": "object",
"maxProperties": 500,
"additionalProperties": {
"type": "object",
"additionalProperties": true
}
}
},
"required": [
"proposal_id",
"operation_ids"
],
"additionalProperties": false,
"description": "Saved parent proposal and selected operation/suggestion IDs for proposed-source comparison or development. Retain selection and any source page_proposal_ids through readiness, quote and Start."
},
"page_proposal_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"maxItems": 20,
"uniqueItems": true,
"description": "Source page candidates for readiness/quote/Start with source_selection; retain exact IDs. Apply selected drafts using top-level page_proposal_ids."
},
"billing_quote_id": {
"type": "string",
"format": "uuid",
"description": "Accepted quote identity from the returned Start action; required on Start only. Reuse unchanged on retries."
},
"billing_request_id": {
"type": "string",
"format": "uuid",
"description": "Start request UUID from the accepted quote action; required on Start only. Reuse with the same quote and scope on retries."
}
},
"required": [
"revision_id"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [
"page_proposal_ids"
],
"properties": {
"page_proposal_ids": {
"minItems": 1
}
}
},
"then": {
"required": [
"source_selection"
]
}
}
]
}
},
"required": [
"workflow",
"project_id",
"phase",
"payload"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"phase": {
"const": "start"
}
}
},
"then": {
"properties": {
"payload": {
"required": [
"billing_quote_id",
"billing_request_id"
]
}
}
},
"else": {
"properties": {
"payload": {
"not": {
"anyOf": [
{
"required": [
"billing_quote_id"
]
},
{
"required": [
"billing_request_id"
]
}
]
}
}
}
}
}
]
},
{
"type": "object",
"properties": {
"workflow": {
"const": "editing_comparison",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"enum": [
"finalize"
],
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"payload": {
"type": "object",
"properties": {
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"revision_id"
],
"additionalProperties": false
},
"job_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"workflow",
"project_id",
"phase",
"payload",
"job_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"workflow": {
"const": "editing_comparison",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"enum": [
"review"
],
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"payload": {
"type": "object",
"properties": {
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"revision_id"
],
"additionalProperties": false
},
"comparison_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"workflow",
"project_id",
"phase",
"payload",
"comparison_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"workflow": {
"const": "editing_comparison",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"enum": [
"decide"
],
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"payload": {
"type": "object",
"properties": {
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"finding_id": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"decision": {
"enum": [
"retain",
"defer"
]
},
"explanation": {
"type": "string",
"maxLength": 4000
},
"expected_decision_id": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"revision_id",
"request_id",
"finding_id",
"decision"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"decision": {
"const": "retain"
}
}
},
"then": {
"required": [
"explanation"
],
"properties": {
"explanation": {
"pattern": "\\S"
}
}
}
}
]
},
"comparison_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"workflow",
"project_id",
"phase",
"payload",
"comparison_id"
],
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"project_id",
"phase",
"comparison_id",
"payload"
],
"properties": {
"workflow": {
"const": "outline_reconciliation",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"enum": [
"readiness",
"quote"
],
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"comparison_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"payload": {
"type": "object",
"required": [
"scene_id",
"revision_id"
],
"properties": {
"scene_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"project_id",
"phase",
"comparison_id",
"payload"
],
"properties": {
"workflow": {
"const": "outline_reconciliation",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"const": "start",
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"comparison_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"payload": {
"type": "object",
"required": [
"scene_id",
"revision_id",
"billing_quote_id",
"billing_request_id"
],
"properties": {
"scene_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"billing_quote_id": {
"type": "string",
"format": "uuid",
"description": "Accepted quote identity from the returned Start action; required on Start only. Reuse unchanged on retries."
},
"billing_request_id": {
"type": "string",
"format": "uuid",
"description": "Start request UUID from the accepted quote action; required on Start only. Reuse with the same quote and scope on retries."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"project_id",
"phase",
"job_id",
"payload"
],
"properties": {
"workflow": {
"const": "outline_reconciliation",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"const": "finalize",
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"job_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"payload": {
"type": "object",
"required": [
"scene_id"
],
"properties": {
"scene_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"project_id",
"phase",
"proposal_id",
"payload"
],
"properties": {
"workflow": {
"const": "outline_reconciliation",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"const": "review",
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"proposal_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"payload": {
"type": "object",
"required": [
"scene_id"
],
"properties": {
"scene_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"project_id",
"phase",
"payload"
],
"properties": {
"workflow": {
"const": "outline_reconciliation",
"description": "scene_list_revision changes scene structure and dependent pages, starting at readiness; planning_revision connects card/page changes, starting at create. change_wizard develops a revision direction; polish_wizard refines dialogue/style; creative_canvas explores alternatives. editing_comparison compares planning/pages; outline_reconciliation proposes an outline from a saved comparison. adaptive_revision continues a saved revision under an accepted allowance."
},
"project_id": {
"type": "integer"
},
"phase": {
"const": "list",
"description": "Use the selected workflow's returned next_actions. Paid generation requires quote then accepted Start; follow job_get and finalize where requested. Review before approved Apply. Comparison decide records retain/defer; outline_reconciliation never applies content directly."
},
"payload": {
"type": "object",
"required": [
"revision_id",
"source_selection"
],
"properties": {
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"source_selection": {
"type": "object",
"properties": {
"proposal_id": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"operation_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"minItems": 0,
"maxItems": 500,
"uniqueItems": true
},
"edited_fields": {
"type": "object",
"maxProperties": 500,
"additionalProperties": {
"type": "object",
"additionalProperties": true
}
}
},
"required": [
"proposal_id",
"operation_ids"
],
"additionalProperties": false,
"description": "Saved parent proposal and selected operation/suggestion IDs for proposed-source comparison or development. Retain selection and any source page_proposal_ids through readiness, quote and Start."
},
"page_proposal_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"maxItems": 20,
"uniqueItems": true,
"description": "Source page candidates for readiness/quote/Start with source_selection; retain exact IDs. Apply selected drafts using top-level page_proposal_ids."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"offset": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"oneOf": [
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "readiness"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "list"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"run_id"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "status"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"run_id": {
"type": "string",
"format": "uuid"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "start"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"payload": {
"type": "object",
"required": [
"request_id",
"expected_revision_version",
"credit_limit",
"billing_quote_id",
"billing_request_id"
],
"properties": {
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"expected_revision_version": {
"type": "integer",
"minimum": 1
},
"credit_limit": {
"type": "integer",
"minimum": 1
},
"billing_quote_id": {
"type": "string",
"format": "uuid"
},
"billing_request_id": {
"type": "string",
"format": "uuid"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"run_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "answer"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"run_id": {
"type": "string",
"format": "uuid"
},
"payload": {
"type": "object",
"required": [
"request_id",
"expected_version",
"answer"
],
"properties": {
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"expected_version": {
"type": "integer",
"minimum": 1
},
"answer": {
"type": "string",
"minLength": 1,
"maxLength": 8000
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"run_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "scope"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"run_id": {
"type": "string",
"format": "uuid"
},
"payload": {
"type": "object",
"required": [
"request_id",
"expected_version",
"approve"
],
"properties": {
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"expected_version": {
"type": "integer",
"minimum": 1
},
"approve": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"run_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "budget"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"run_id": {
"type": "string",
"format": "uuid"
},
"payload": {
"type": "object",
"required": [
"request_id",
"expected_version",
"credit_limit"
],
"properties": {
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"expected_version": {
"type": "integer",
"minimum": 1
},
"credit_limit": {
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"run_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "recover"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"run_id": {
"type": "string",
"format": "uuid"
},
"payload": {
"type": "object",
"required": [
"expected_version"
],
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"run_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "stop"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"run_id": {
"type": "string",
"format": "uuid"
},
"payload": {
"type": "object",
"required": [
"expected_version"
],
"properties": {
"expected_version": {
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "questions"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"proposal_id": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"question_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "question_answer"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"question_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"payload": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"answer": {
"type": "string",
"minLength": 1,
"maxLength": 8000
}
},
"required": [
"request_id",
"answer"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"question_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "question_continue"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"question_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"payload": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"workflow",
"phase",
"project_id",
"revision_id",
"payload"
],
"properties": {
"workflow": {
"const": "adaptive_revision"
},
"phase": {
"const": "quote"
},
"project_id": {
"type": "integer"
},
"revision_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"payload": {
"type": "object",
"required": [
"expected_revision_version",
"credit_limit"
],
"properties": {
"expected_revision_version": {
"type": "integer",
"minimum": 1
},
"credit_limit": {
"type": "integer",
"minimum": 1
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}
]
}Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"workflow",
"phase"
],
"properties": {
"credits_charged": {
"type": "number",
"minimum": 0
},
"credits_skipped_reason": {
"type": "string"
},
"workflow": {
"type": "string"
},
"phase": {
"type": "string"
},
"async": {
"type": "boolean"
},
"job_id": {
"type": "string"
},
"reservation_id": {
"type": "string"
},
"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"
}
}
},
"additionalProperties": true
}