- book_chapter.yml: add mini-package step after SELF-CHECK to extract chapter_number/chapter_ref
before document steps run. Without this every chapter was saved as Chapter_chapter-number_draft.md.
Also add source_step to both document steps so they read from correct prior step.
- DocumentStepHandler.cs (C#): add source_step support (template change depends on this).
- chapter_roundtable.yml: remove broken depends_on from chapter_polish spawn that caused deadlock
(Polish: {chapter_ref_prev} never exists for ch-01, blocking all polish tasks).
- project_index.yml: Loop 2 CLM dispatch -- when book is complete, enqueue marketing_campaign
to crimson_leaf_marketing/book-marketing-agency.
- project.yml files: fill in name, goal, genre, lead_author for all 3 CLP projects.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- 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>