fabricatio_novel.models.plan

Chapter plan model bundling draft, script, and word count per chapter.

Classes

ChapterPlan

A per-chapter plan combining the draft outline, generated script, and target word count.

Module Contents

class fabricatio_novel.models.plan.ChapterPlan(/, **data: Any)

Bases: fabricatio_capabilities.models.generic.WordCount

A per-chapter plan combining the draft outline, generated script, and target word count.

chapter_index: int

Zero-based index of this chapter within the novel.

draft: fabricatio_novel.models.draft.ChapterDraft

The chapter draft containing title, synopsis, and weight.

script: fabricatio_novel.models.scripting.Script

The narrative script outlining scenes for this chapter.

classmethod from_draft(draft: fabricatio_novel.models.draft.NovelDraft, scripts: List[fabricatio_novel.models.scripting.Script | None]) List[Self]

Build chapter plans by pairing each chapter draft with its script.

property formatted_chapter_title: str

{title}’.

Type:

Return the display title as ‘Ch-{idx}

classmethod new(draft: fabricatio_novel.models.draft.ChapterDraft, script: fabricatio_novel.models.scripting.Script, expected_word_count: int, chapter_index: int) Self

Create a new chapter plan.

classmethod with_try_script(draft: fabricatio_novel.models.draft.ChapterDraft, script: None | fabricatio_novel.models.scripting.Script, expected_word_count: int, chapter_index: int) Self

Create a plan, falling back to a raw-synopsis script when script is None.