Repository navigation
05_Phase_5_Prompt_Engineer
Goal: Perform the final technical audit of the JSON files and author the custom Lucifer_ChatPreset.json to assemble the context window at runtime.
The Prompt Engineer is the final agent in the pipeline. It ensures that the JSONs produced by the Compiler will actually function correctly when injected into the AI's context window.
The Prompt Engineer ran an extensive audit over the compiled JSONs (Prompt_Engineer_Audit.md), checking position logic, injection order, and token budget risks.
The Engineer caught a critical flaw.
During the Card-Lorebook Consistency Audit, the Engineer found a conflict in Anna's post_history_instructions (PHI).
-
The Problem: The PHI listed "shaking hands, edge-of-chair posture" as permanent physical tells. While accurate for her Arc 1 withdrawal state, the Engineer noted that this contradicted her Arc 3 and Arc 4
ANNA_STATEentries, where her physicality is described as unhurried and relaxed. Because the PHI injects at the bottom of the context window, it would have forced the AI to render Anna as shivering and anxious even in Arc 4. -
The Fix: The Prompt Engineer rewrote the PHI to explicitly mention the arc-shift: "The specific physical vocabulary shifts across arcs — active withdrawal trembling in Arc 1, guarded tension in Arc 2, relaxed confidence in Arcs 3–4." It then reinforced the deference to the active
ANNA_STATElorebook entry.
With the files verified and the PHI corrected, the Prompt Engineer authored the Lucifer_ChatPreset.json.
Based on the 8 Failure Modes identified for the Lucifer world (e.g., Sensory engagement defaulting to vision-only, trauma responses flattening over time), the Engineer enabled specific contextual blocks:
- Sensory Embodiment: Forces the model to engage with smell (sulfur, bleach) and temperature.
- Multi-Character Dynamics: Enables the complex lattice required for the World Director to voice multiple NPCs alongside Anna.
- NSFW (Intimacy): Included to support the Phase 2.5 trauma maps.
- Consequence Tracking: Ensures injuries don't heal instantly between scenes, maintaining the grimdark reality.
- Internal Monologue Discipline: Enforces the rule that Anna's internal thoughts must remain in narration (asterisks) and never leak into spoken dialogue, preserving her defensive sarcasm.
The pipeline was complete. The Export/ folder now contained the audited character cards, the perfectly sequenced lorebooks, and the custom Chat Preset. The Lucifer world was ready to be played.