- 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>
Root cause: PASS 0 loads all project deliverables including Ch1-13 drafts.
Ch 3 'adjoining quarters' scene appeared LAST in deliverables just before
the Write Chapter 8 instruction. PASS 3 was using that as 'the chapter I
just wrote' instead of the actual PASS 1 narrative.
Fix: PASS 3 hint now explicitly identifies the conversation turn structure,
anchors to Turn 2 (PASS 1 response), and adds an ANCHOR TEST that rejects
any Location from a [Chapter_N_draft.md] deliverable file.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previous rule was hint-only and ignored by LLM deep in long context.
Now uses system: override (added to system prompt) plus hyper-explicit
step-by-step self-check targeting Kaelen by name. Dead = no Location,
no Physical, no Emotional, no Arc. Final self-check before submit.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Added DECEASED CHARACTER RULE block at top of PASS 3 hint. Dead characters
get a two-line entry (Established + Legacy), NO Location/Physical/Emotional/Arc.
Prevents the LLM from inventing living Kaelen presence in Ch 6-12 state files.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add source_step: 4 so rag_write explicitly targets PASS 3 output instead of
relying on last_text() which could fall back to the chapter document text.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Changed 'STRUCTURAL VALIDATION ONLY' → 'STRUCTURAL VALIDATION AND WORD-COUNT EXPANSION'
- Word floor check now EXPANDS (not just flags) when draft is >10% below chapter_target_words
- Added expansion rules: interiority, sensory grounding, dialogue beats, scene transitions
- Added max_tokens: 32000 and model: power to self-check step for capacity headroom
- Removed 'Expand any description or add sensory detail' from NOT ALLOWED (only applies to existing prose)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>