fix: PASS 3 system-override anti-hallucination for deceased Kaelen

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>
This commit is contained in:
David Baity
2026-03-25 07:08:01 -04:00
parent 41ad0596e3
commit f5d4be7f69

View File

@@ -281,59 +281,69 @@ steps:
primary_deliverable: true primary_deliverable: true
- type: think - type: think
system: |
EXTRACTION MODE — DO NOT CREATE FICTION.
Your ONLY task is to extract factual state from the chapter you just wrote.
You are NOT writing the story. You are NOT continuing the narrative.
Characters who are DEAD are DEAD. You may NOT invent a living version of them.
KAELEN IS DEAD. HE DIED IN CHAPTER 4. DO NOT WRITE KAELEN AS ALIVE.
If you write a "Location:" or "Physical:" or "Emotional:" field for Kaelen, that is WRONG.
hint: | hint: |
PASS 3 -- CHARACTER + WORLD STATE EXTRACTION PASS 3 -- CHARACTER + WORLD STATE EXTRACTION
You have just completed the chapter. Extract structured state for continuity tracking. 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 Write in compact format -- this content will be stored as a RAG asset read by the
NEXT chapter's PASS 0. Every character who appeared must have an entry. NEXT chapter's PASS 0.
══ DECEASED CHARACTER RULE (HIGHEST PRIORITY) ══ ══ MANDATORY FIRST CHECK — READ BEFORE WRITING ANYTHING ══
If a character DIED before or during this chapter -- whether the death happened in STEP 1: Check PASS 0 above (earlier in this conversation). Find every character listed
this chapter or was already established when this chapter began -- their entry is: 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.
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) ══
## [Name] — DECEASED (Ch[N]) ## [Name] — DECEASED (Ch[N])
Established: [one sentence: how and when they died] Established: [one sentence: how they died]
Legacy: [one sentence: how their absence affects the current chapter] Legacy: [one sentence: how their death affected this chapter]
DO NOT assign Location, Physical, Emotional, Active obligations, Open loops, or Arc
to a deceased character. A dead character has NO location, NO emotional state, NO arc.
References to a dead character in dialogue, memory, or grief do NOT make them alive.
If a character is mentioned only in past tense, memory, or as an absence -- they are DEAD.
DO NOT invent a living presence for them. DO NOT put them in the scene.
══ LIVING CHARACTER FORMAT ══ ══ LIVING CHARACTER FORMAT ══
# Character State: {chapter_ref} # Character State: {chapter_ref}
## [Character Name] ## [Character Name]
Location: [specific location -- building, floor, city, planet -- no vague "nearby"] Location: [specific location -- building, floor, city, planet]
Physical: [injuries, fatigue, notable physical state, or "no injuries"] Physical: [injuries, fatigue, notable physical state, or "no injuries"]
Emotional: [dominant emotion at chapter end; what they are CARRYING into next chapter] Emotional: [dominant emotion at chapter end]
Active obligations: [debts/promises owed, format: "owes [person] [what] (Ch[N]) -- UNPAID/PAID"] Active obligations: [format: "owes [person] [what] (Ch[N]) -- UNPAID/PAID"]
Open loops: [unresolved conflicts, unanswered questions, format: "[parties] [issue] (Ch[N]) -- UNRESOLVED/RESOLVED"] Open loops: [format: "[parties] [issue] (Ch[N]) -- UNRESOLVED/RESOLVED"]
Known secrets: [information this character has that others don't -- format: "knows [what] -- [who does NOT know]"] Known secrets: [format: "knows [what] -- [who does NOT know]"]
Arc: [XX%] -- [one sentence: what permanently changed in this character this chapter, or "no change"] Arc: [XX%] -- [one sentence: what permanently changed this chapter]
Permanent: [YES if something permanently changed (power gained/lost, relationship status changed, secret revealed); NO otherwise] Permanent: [YES/NO]
(Repeat for EVERY named character who appeared in this chapter -- deceased get the short form above) (Repeat for EVERY named character who appeared. Deceased = short form only.)
# World State: {chapter_ref} # World State: {chapter_ref}
## NPC Memory ## NPC Memory
- [NPC Name] ([faction/location]): [ATTITUDE] -- [what happened] -- [behavioral consequence] - [NPC Name] ([faction/location]): [ATTITUDE] -- [what happened] -- [consequence]
(List every NPC who interacted with a protagonist and now has a changed attitude)
## Faction Attitudes ## Faction Attitudes
- [Faction name]: [current attitude toward protagonists] -- [reason] - [Faction name]: [attitude] -- [reason]
(List any faction whose attitude changed this chapter)
## Active World Events ## Active World Events
- [Event]: [status and expected timeline] - [Event]: [status and timeline]
(List any ongoing world events that will affect future chapters)
CRITICAL: Keep the total output under 3500 characters. Be precise and specific. FINAL SELF-CHECK before submitting: Scan your output for Kaelen's name.
Do NOT write prose -- only the structured data above. If he has a Location, Physical, or Emotional field — delete them. He is dead.
If any other character is noted as DECEASED in PASS 0 — apply the same rule.
CRITICAL: Keep total output under 3500 characters. NO prose — structured data only.
- type: rag_write - type: rag_write
asset_id: "character-state" asset_id: "character-state"