Fix book_chapter.yml: write chapter draft before char-state extraction

Chapter_N_draft doc step was placed after PASS 3 think, so last_text()
returned char state (3151 chars) instead of the actual chapter from SELF-CHECK.
Moved doc step to immediately after step 2 (SELF-CHECK).

New step order: 0-think, 1-think, 2-think(selfcheck), 3-doc(draft),
4-think(charstate), 5-rag_write, 6-doc(charstate), 7-package, 8-close

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Baity
2026-03-24 00:51:32 -04:00
parent 9b1dbab857
commit 4ab09d1c16

View File

@@ -251,6 +251,10 @@ steps:
verbatim everywhere else). Start the chapter directly with the chapter title verbatim everywhere else). Start the chapter directly with the chapter title
and first line. No preamble or commentary within the chapter text. and first line. No preamble or commentary within the chapter text.
# Commit chapter draft now — last_text() = self-check output (step 2). Must come before
# PASS 3 think so the character-state extraction does not overwrite last_text().
- type: document
filename: "Chapter_{chapter_number}_draft"
- type: think - type: think
hint: | hint: |
@@ -299,8 +303,6 @@ steps:
- type: document - type: document
filename: "character-state-{chapter_ref}" filename: "character-state-{chapter_ref}"
- type: document
filename: "Chapter_{chapter_number}_draft"
- type: package - type: package
max_tokens: 12000 max_tokens: 12000