Просмотр исходного кода

feat(v13): add creative constitution + six pillars of immersion to writer system prompt [phase 6/8 part 5]

Two new prose sections injected into buildWriterSystemPrompt (zh + en), placed
right after the Writing Craft Card in the system-role assembly:

1. Creative Constitution — 14 core principles distilled to always-on prose:
   show don't tell, salt in soup, three-leg character actions, side-character
   B-face, rhythm as breathing, end-of-chapter hooks, full-cast intelligence,
   era-appropriate references, timeline rigour, 70% daily-to-mainline ratio,
   event-driven relationship change, character consistency with earned growth,
   scene-over-summary for plot beats, refuse chronicle drift.

2. Six Pillars of Immersion — the six levers that install reader presence in
   the opening of every scene: basic info tagging, visible familiarity, dual
   resonance (cognitive + emotional), dual desire tracks (base wants + active
   expectation gap), sensory hooks beyond sight, core tag plus contrasting
   detail for live characters.

Both are written as prose paragraphs — NOT checklists. The writer must
internalise them and never quote/list/narrate them. No schema fields added.
Ma 6 месяцев назад
Родитель
Сommit
9276af9d37
1 измененных файлов с 42 добавлено и 0 удалено
  1. 42 0
      packages/core/src/agents/writer-prompts.ts

+ 42 - 0
packages/core/src/agents/writer-prompts.ts

@@ -47,6 +47,8 @@ export function buildWriterSystemPrompt(
         buildChapterMemoContract("en", governed),
         buildLengthGuidance(resolvedLengthSpec, "en"),
         buildWritingCraftCard("en"),
+        buildCreativeConstitution("en"),
+        buildImmersionPillars("en"),
         buildGenreRules(genreProfile, genreBody),
         buildProtagonistRules(bookRules),
         buildBookRulesBody(bookRulesBody),
@@ -65,6 +67,8 @@ export function buildWriterSystemPrompt(
         buildChapterMemoContract("zh", governed),
         buildLengthGuidance(resolvedLengthSpec, "zh"),
         buildWritingCraftCard("zh"),
+        buildCreativeConstitution("zh"),
+        buildImmersionPillars("zh"),
         buildGoldenChaptersRules(chapterNumber, isEnglish ? "en" : "zh"),
         bookRules?.enableFullCastTracking ? buildFullCastTracking() : "",
         buildGenreRules(genreProfile, genreBody),
@@ -439,6 +443,44 @@ function buildWritingCraftCard(language: "zh" | "en"): string {
 - **信息边界**:角色此刻知道什么?不知道什么?对局势有什么误判?角色只能基于已掌握的信息行动`;
 }
 
+// ---------------------------------------------------------------------------
+// 创作宪法(14 条原则精华) — always-on prose; internalise, do not report back
+// ---------------------------------------------------------------------------
+
+function buildCreativeConstitution(language: "zh" | "en"): string {
+  if (language === "en") {
+    return `## Creative Constitution
+
+These fourteen principles are your spine. Internalise them — never quote them, never list them, never narrate them. They tell you how to pick between two plausible next sentences.
+
+Show don't tell: stack real detail to make truth visible, never deliver feeling in a flat declarative line. Let values dissolve in action like salt in soup — conviction is proved by what a character does when nobody is watching. Every character act sits on three legs at once: lived history, current interest, temperamental core; remove any leg and the act reads as authorial fiat. Every side character keeps their own ledger with their own profit motive; they exist before the protagonist meets them and continue after. Rhythm breathes — slow fires cook the richest broth, daily moments work as bait for the main line, they are never filler. End every chapter with a small hook or emotional gap; readers must want the next page. Everyone on stage stays smart — no convenient stupidity, saint-mode mercy, or un-set-up compromise. Use after-time references in the voice of the era they land in. Timeline and period common sense cannot be bent. Seventy percent of daily scenes must double as seeds for the main line later. Relationship changes need an event to drive them — no overnight brotherhood, no out-of-nowhere love. Character setup holds across the arc; growth shows its work. Important plot beats and foreshadowing earn their detail — scene over summary. Refuse chronicle drift: every line either moves the plot or sharpens a person.`;
+  }
+  return `## 创作宪法
+
+这十四条原则是你写作的脊梁。内化它们——绝不引用、绝不列表、绝不在正文里复述。它们的用途是帮你在"两个都说得通的下一句"之间做出选择。
+
+Show don't tell,用细节堆出真实,禁止用一行直白陈述替代情绪。价值观要像盐溶于汤——角色的信念靠"没人看时他在做什么"来证明,不靠口号。任何角色的任何行动都必须同时立于三条腿上:过往经历、当前利益、性格底色;缺一条就成了作者强行安排。每个配角都有自己的账本和利益诉求,他们在遇到主角之前就存在、在离开主角之后继续过日子,不是工具人。节奏即呼吸——慢火才能炖出高汤,日常当饵用,不是填充。每章结尾必须有小悬念或情绪缺口,把读者钉在下一章。全员智商在线——禁止降智、圣母心、无铺垫的妥协。后世梗用符合年代语境的说法落地。时间线与时代常识不能错。日常场景的七成必须在后面成为主线伏笔。任何关系的改变都要事件驱动——没有一夜称兄道弟、没有莫名其妙的深情。人设前后一致,成长有过程。重要剧情和伏笔用场景,不用总结。拒绝流水账——每一行字要么推动剧情,要么塑造人物。`;
+}
+
+// ---------------------------------------------------------------------------
+// 代入感六支柱 — always-on prose; internalise, do not narrate checklist items
+// ---------------------------------------------------------------------------
+
+function buildImmersionPillars(language: "zh" | "en"): string {
+  if (language === "en") {
+    return `## Six Pillars of Immersion
+
+Reader immersion rests on six pillars. Write to install all six inside the first few pages of every scene — tacitly, without ever addressing them by name.
+
+Tag the basics: within a hundred words the reader knows who is on stage, where the stage is, and what is happening, so they can build the room in their head. Reach for visible familiarity: give ground-level specifics the reader has touched in their own life, so the scene loads before the second paragraph ends. Earn resonance twice — cognitive (the reader would make the same choice) and emotional (family feeling, anger at unfair treatment, grief, quiet pride). Feed desire on two tracks: the base wants (getting something for nothing, outranking those above, exhaling after being pressed down) and the active want the chapter seeds itself — an expectation gap the reader now carries forward. Plant sensory hooks: every scene carries one or two senses beyond sight (sound, smell, touch, taste), dropped in passing, never a paragraph of weather. Make characters alive with a core tag plus one contrasting detail — the cold killer who feeds stray cats, the warm father whose jokes land like knives. These pillars are the default shape of every scene, not a checklist you tick at the end.`;
+  }
+  return `## 代入感六支柱
+
+读者代入感靠六根支柱支撑。每一个场景的前几页都要把六根柱子立起来——静默地立,不要点名、不要报告。
+
+基础信息标签化:一百字内让读者知道谁在场、在哪儿、发生什么,读者脑里才能搭出这个房间。可视化熟悉感:给出读者亲身碰过的地面级具体细节——医院消毒水的味、地铁座椅的凉、外卖塑料袋的塑胶感——场景在第二段之前就要加载完。共鸣分两层:认知共鸣("这种情况下我也会这么选")+ 情绪共鸣(亲情、被欺压时的愤怒、不公、隐忍的骄傲)。欲望两条腿走路:基础欲望(不劳而获、压制比自己高的人、被欺压之后的扬眉吐气)+ 主动欲望(本章自己挖的期待感——一个读者会带到下一章的情绪缺口)。五感钩子:每个场景除视觉外放 1-2 种感官细节(听/嗅/触/味),顺手带过,绝不写成大段天气描写。人设要"核心标签 + 一个反差细节"才活——冷面杀手偷偷喂流浪猫、和善父亲开的玩笑像刀子。这六根柱子是场景的默认形状,不是章末打勾的清单。`;
+}
+
 // ---------------------------------------------------------------------------
 // 黄金开篇(中文3章/英文5章)
 // ---------------------------------------------------------------------------