fix: PASS 3 anchor to PASS 1 chapter, reject deliverable files as state source

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>
This commit is contained in:
David Baity
2026-03-25 07:26:57 -04:00
parent 20cbdf55d7
commit 2cd3b5f41c

View File

@@ -1,4 +1,4 @@
name: book_chapter
name: book_chapter
description: "Write one chapter — continuity check, draft, self-check, then spawn editorial review."
debug: true
system: agent_prompt
@@ -291,20 +291,33 @@ steps:
hint: |
PASS 3 -- CHARACTER + WORLD STATE EXTRACTION
You have just completed the chapter. Extract structured state for continuity tracking.
Write in compact format -- this content will be stored as a RAG asset read by the
NEXT chapter's PASS 0.
══ STEP 0: FIND THE CORRECT CHAPTER TEXT (DO THIS FIRST) ══
This conversation has multiple text sources. You must extract from the RIGHT one.
══ MANDATORY FIRST CHECK — READ BEFORE WRITING ANYTHING ══
STEP 1: Check PASS 0 above (earlier in this conversation). Find every character listed
as "(DECEASED)" or "†" or "DEAD" in the bible or character state.
STEP 2: For each such character, you MUST use ONLY the short DECEASED format below.
YOUR CONVERSATION HISTORY (in order):
Turn 1 → You received PASS 0 context (deliverables, outline, bible).
Deliverables include files like [Chapter_1_draft.md], [Chapter_3_draft.md],
[Chapter_10_draft.md], etc. THESE ARE HISTORICAL. NOT the current chapter.
Turn 2 → You wrote Chapter {chapter_number} in PASS 1 (~4000-word narrative prose).
THIS IS THE CHAPTER YOU ARE ANALYZING.
Turn 3 → You performed SELF-CHECK (editorial notes, not chapter prose).
Turn 4 → THIS MESSAGE (PASS 3 extract).
THE CHAPTER = YOUR PASS 1 RESPONSE (Turn 2). It starts immediately after the line
"PASS 1 — WRITE THE DRAFT" and ends before the SELF-CHECK.
⚠ ANCHOR TEST — before writing any Location field, ask yourself:
"Did I write this location in my PASS 1 narrative, or is it from a deliverable file?"
If it is from any [Chapter_N_draft.md] or from the PRE-PASS-1 context — REJECT IT.
Use ONLY what your PASS 1 narrative says.
══ MANDATORY CHECK — DECEASED CHARACTERS ══
STEP 1: Check PASS 0 above. Find every character listed as "(DECEASED)" or "†" or "DEAD".
STEP 2: For each such character, use ONLY the short DECEASED format below.
You MAY NOT give them a Location, Physical, Emotional, or Arc field.
They are DEAD. Dead characters do not have locations. They do not have arcs.
They are not "at the stairwell." They are not "resigned." They are ABSENT.
STEP 3: If Kaelen appears in your output with a Location field — DELETE IT.
If Kaelen appears with an Emotional field — DELETE IT.
If Kaelen appears with an Arc field — DELETE IT.
Write ONLY: ## Kaelen — DECEASED (Ch04)
══ DECEASED FORMAT (two lines only) ══