|
|
@@ -44,6 +44,7 @@ export function buildWriterSystemPrompt(
|
|
|
buildEnglishGenreIntro(book, genreProfile),
|
|
|
buildEnglishCoreRules(book),
|
|
|
buildGovernedInputContract("en", governed),
|
|
|
+ buildChapterMemoContract("en", governed),
|
|
|
buildLengthGuidance(resolvedLengthSpec, "en"),
|
|
|
buildWritingCraftCard("en"),
|
|
|
buildGenreRules(genreProfile, genreBody),
|
|
|
@@ -61,6 +62,7 @@ export function buildWriterSystemPrompt(
|
|
|
buildGenreIntro(book, genreProfile),
|
|
|
buildCoreRules(resolvedLengthSpec),
|
|
|
buildGovernedInputContract("zh", governed),
|
|
|
+ buildChapterMemoContract("zh", governed),
|
|
|
buildLengthGuidance(resolvedLengthSpec, "zh"),
|
|
|
buildWritingCraftCard("zh"),
|
|
|
buildGoldenChaptersRules(chapterNumber, isEnglish ? "en" : "zh"),
|
|
|
@@ -118,6 +120,44 @@ function buildGovernedInputContract(language: "zh" | "en", governed: boolean): s
|
|
|
- 多角色场景里,至少给出一轮带阻力的直接交锋,不要把人物关系写成纯解释或纯总结。`;
|
|
|
}
|
|
|
|
|
|
+// ---------------------------------------------------------------------------
|
|
|
+// Chapter memo alignment — 7 sections from new.txt methodology
|
|
|
+// ---------------------------------------------------------------------------
|
|
|
+
|
|
|
+function buildChapterMemoContract(language: "zh" | "en", governed: boolean): string {
|
|
|
+ if (!governed) return "";
|
|
|
+
|
|
|
+ if (language === "en") {
|
|
|
+ return `## Chapter Memo Alignment
|
|
|
+
|
|
|
+You will receive a chapter_memo composed of 7 markdown sections:
|
|
|
+
|
|
|
+- ## 当前任务 → the concrete action this chapter must complete; stay aligned with it throughout
|
|
|
+- ## 读者此刻在等什么 → controls how emotional gaps are created / delayed / paid off
|
|
|
+- ## 该兑现的 / 暂不掀的 → payoffs that must land this chapter + cards you must NOT reveal
|
|
|
+- ## 日常/过渡承担什么任务 → function map for non-conflict passages ([passage location] → [function])
|
|
|
+- ## 关键抉择过三连问 → three-question check every key character choice must pass
|
|
|
+- ## 章尾必须发生的改变 → 1-3 concrete changes the ending must deliver (info / relation / physical / power)
|
|
|
+- ## 不要做 → hard prohibitions for this chapter
|
|
|
+
|
|
|
+Address each section in order when drafting the chapter. Every section must leave a visible trace in the prose — if a section is not reflected, the chapter is incomplete.`;
|
|
|
+ }
|
|
|
+
|
|
|
+ return `## 章节备忘对齐
|
|
|
+
|
|
|
+你将收到本章的 chapter_memo,由 7 段 markdown 组成:
|
|
|
+
|
|
|
+- ## 当前任务 → 本章必须完成的具体动作,写作时始终对齐这条
|
|
|
+- ## 读者此刻在等什么 → 控制情绪缺口的制造/延迟/兑现程度
|
|
|
+- ## 该兑现的 / 暂不掀的 → 本章必须兑现的伏笔清单 + 必须压住不掀的底牌
|
|
|
+- ## 日常/过渡承担什么任务 → 非冲突段落的功能映射([段落位置] → [承担功能])
|
|
|
+- ## 关键抉择过三连问 → 关键人物选择必须过的检查
|
|
|
+- ## 章尾必须发生的改变 → 结尾落地的 1-3 条具体改变(信息/关系/物理/权力)
|
|
|
+- ## 不要做 → 硬约束红线
|
|
|
+
|
|
|
+写作时按段落顺序落实,每一段都要在正文里有对应的兑现痕迹。如果某一段没有体现到正文里,本章不算完成。`;
|
|
|
+}
|
|
|
+
|
|
|
function buildLengthGuidance(lengthSpec: LengthSpec, language: "zh" | "en"): string {
|
|
|
if (language === "en") {
|
|
|
return `## Length Guidance
|
|
|
@@ -629,10 +669,15 @@ function buildCreativeOutputFormat(book: BookConfig, gp: GenreProfile, lengthSpe
|
|
|
: "";
|
|
|
|
|
|
const preWriteTable = `=== PRE_WRITE_CHECK ===
|
|
|
-(必须输出Markdown表格)
|
|
|
+(必须输出Markdown表格,全部检查项对齐 chapter_memo 七段,而不是卷纲)
|
|
|
| 检查项 | 本章记录 | 备注 |
|
|
|
|--------|----------|------|
|
|
|
-| 大纲锚定 | 当前卷名/阶段 + 本章应推进的具体节点 | 严禁跳过节点或提前消耗后续剧情 |
|
|
|
+| 当前任务 | 复述 chapter_memo 的「当前任务」并写出本章执行动作 | 必须具体,不能抽象 |
|
|
|
+| 读者在等什么 | 本章如何处理「读者此刻在等什么」—制造/延迟/兑现 | 与 memo 一致 |
|
|
|
+| 该兑现的 / 暂不掀的 | 本章确认要兑现的伏笔 + 必须压住不掀的底牌 | 引用 memo 原文 |
|
|
|
+| 日常/过渡承担任务 | 若有日常/过渡段落,说明各自承担的功能 | 对齐 memo 映射表 |
|
|
|
+| 章尾必须发生的改变 | 列出 memo「章尾必须发生的改变」中 1-3 条具体改变 | 必须落地 |
|
|
|
+| 不要做 | 复述 memo「不要做」清单 | 正文不得触碰 |
|
|
|
| 上下文范围 | 第X章至第Y章 / 状态卡 / 设定文件 | |
|
|
|
| 当前锚点 | 地点 / 对手 / 收益目标 | 锚点必须具体 |
|
|
|
${resourceRow}| 待回收伏笔 | 用真实 hook_id 填写(无则写 none) | 与伏笔池一致 |
|
|
|
@@ -664,10 +709,15 @@ function buildOutputFormat(book: BookConfig, gp: GenreProfile, lengthSpec: Lengt
|
|
|
: "";
|
|
|
|
|
|
const preWriteTable = `=== PRE_WRITE_CHECK ===
|
|
|
-(必须输出Markdown表格)
|
|
|
+(必须输出Markdown表格,全部检查项对齐 chapter_memo 七段,而不是卷纲)
|
|
|
| 检查项 | 本章记录 | 备注 |
|
|
|
|--------|----------|------|
|
|
|
-| 大纲锚定 | 当前卷名/阶段 + 本章应推进的具体节点 | 严禁跳过节点或提前消耗后续剧情 |
|
|
|
+| 当前任务 | 复述 chapter_memo 的「当前任务」并写出本章执行动作 | 必须具体,不能抽象 |
|
|
|
+| 读者在等什么 | 本章如何处理「读者此刻在等什么」—制造/延迟/兑现 | 与 memo 一致 |
|
|
|
+| 该兑现的 / 暂不掀的 | 本章确认要兑现的伏笔 + 必须压住不掀的底牌 | 引用 memo 原文 |
|
|
|
+| 日常/过渡承担任务 | 若有日常/过渡段落,说明各自承担的功能 | 对齐 memo 映射表 |
|
|
|
+| 章尾必须发生的改变 | 列出 memo「章尾必须发生的改变」中 1-3 条具体改变 | 必须落地 |
|
|
|
+| 不要做 | 复述 memo「不要做」清单 | 正文不得触碰 |
|
|
|
| 上下文范围 | 第X章至第Y章 / 状态卡 / 设定文件 | |
|
|
|
| 当前锚点 | 地点 / 对手 / 收益目标 | 锚点必须具体 |
|
|
|
${resourceRow}| 待回收伏笔 | 用真实 hook_id 填写(无则写 none) | 与伏笔池一致 |
|