- Package step schema now includes chapter_ref and chapter_number so the LLM
extracts them from the task name even when context vars are missing.
- Previously removed requires: block was the only guard; now the package step
itself self-heals by asking the LLM to derive these values.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- book_chapter.yml PASS 0: Reader Knows Rule box, outline truncated at chapter_number_next,
character state priority chain (RAG first, then prev-chapter traits, not final-book state)
- drafting.yml PASS 0: same rule applied, voice-only character profiles
- chapter_pass0_bible.yml (included by scifi/ya/romance/cozy genre templates): same fix
All three reference {chapter_number_prev}, {chapter_number_next}, {chapter_ref_prev}
which are now injected by OutlineSyncService.CreateChapterTaskAsync
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tasks fail at step 7:package when character_profiles is not in context_vars because the
spawn context check incorrectly reports {character_profiles} as an unresolved placeholder.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When writing ch-07, PASS 3 was reading character-state-ch-08 deliverables and
carrying 'Known secrets' from future chapters into the current state. Added
explicit FUTURE-CHAPTER CONTAMINATION GUARD: only use secrets from state files
whose chapter number is EARLIER than the current chapter being written.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The MANDATORY CHECK was rigidly applying DECEASED status from previous
character-state deliverables even when author_intent explicitly retconned
the character as alive. Similarly, the DEATH-FORWARD RULE had no exception
for author-directed resurrection/retcon.
Fixes:
- MANDATORY CHECK: add STEP 2 resurrection check -- if AUTHOR'S INTENT
explicitly states character is ALIVE, skip DECEASED format entirely
- DEATH-FORWARD RULE: add EXCEPTION clause -- author_intent overrides
previous state DECEASED status; prose is authoritative source of truth
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>