Преглед изворни кода

fix: increase prohibition length cap and enhance dim 24-26 notes

- Prohibition max length raised from 15 to 30 chars, allowing
  longer keyword bans while still skipping concept-level rules
- Audit dimension notes for 支线停滞(24), 弧线平坦(25), 节奏单调(26)
  now include explicit checking criteria and reference to
  chapter_summaries/subplot_board/emotional_arcs data sources
majx_mac пре 8 месеци
родитељ
комит
ee94700be9

+ 3 - 3
packages/core/src/agents/continuity.ts

@@ -131,13 +131,13 @@ function buildDimensionList(
       note = "检查视角切换是否有过渡、是否与设定视角一致";
       note = "检查视角切换是否有过渡、是否与设定视角一致";
     }
     }
     if (id === 24) {
     if (id === 24) {
-      note = "检查支线剧情是否停滞超过5章未推进";
+      note = "对照 subplot_board 和 chapter_summaries:如果任何支线超过5章未被提及或推进→warning。如果存在支线但近3章完全没有任何支线推进→warning";
     }
     }
     if (id === 25) {
     if (id === 25) {
-      note = "检查主要角色情感弧线是否平坦(连续3章无情绪变化)";
+      note = "对照 emotional_arcs 和 chapter_summaries:如果主要角色连续3章情绪状态无变化(没有新的压力、释放、转变)→warning。注意区分'角色处境未变'和'角色内心未变'";
     }
     }
     if (id === 26) {
     if (id === 26) {
-      note = "检查章节类型节奏:连续≥3同类型章→warning,≥5章无高潮/回收→warning";
+      note = "对照 chapter_summaries 的章节类型分布:连续≥3章相同类型(如连续3个事件章/战斗章/布局章)→warning。≥5章没有出现回收章或高潮章→warning。请明确列出最近章节的类型序列";
     }
     }
     if (id === 28) {
     if (id === 28) {
       note = "检查番外事件是否与正典约束表矛盾";
       note = "检查番外事件是否与正典约束表矛盾";

+ 4 - 2
packages/core/src/agents/post-write-validator.ts

@@ -218,10 +218,12 @@ export function validatePostWrite(
     });
     });
   }
   }
 
 
-  // 11. Book-level prohibitions (substring match for short prohibitions, min 2 chars)
+  // 11. Book-level prohibitions
+  // Short prohibitions (2-30 chars): exact substring match
+  // Long prohibitions (>30 chars): skip — these are conceptual rules for prompt-level enforcement only
   if (bookRules?.prohibitions) {
   if (bookRules?.prohibitions) {
     for (const prohibition of bookRules.prohibitions) {
     for (const prohibition of bookRules.prohibitions) {
-      if (prohibition.length >= 2 && prohibition.length <= 15 && content.includes(prohibition)) {
+      if (prohibition.length >= 2 && prohibition.length <= 30 && content.includes(prohibition)) {
         violations.push({
         violations.push({
           rule: "本书禁忌",
           rule: "本书禁忌",
           severity: "error",
           severity: "error",