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

fix: raise consecutive-le threshold to 6 and clean up gitignore

4-sentence threshold triggered on nearly every chapter. Raised to 6
for Chinese prose. Added _notes/, test-project/, .venv*/ to gitignore.
Ma 7 месяцев назад
Родитель
Сommit
7fee5b0282

+ 4 - 0
.gitignore

@@ -7,3 +7,7 @@ dist/
 .DS_Store
 coverage/
 .turbo/
+_notes/
+_tmp_*
+test-project/
+.venv*/

+ 1 - 1
packages/core/src/__tests__/post-write-validator.test.ts

@@ -94,7 +94,7 @@ describe("validatePostWrite", () => {
   });
 
   it("detects consecutive '了' sentences", () => {
-    const content = "他走了过去。他拿了杯子。他喝了一口。他放了下来。他转了身。";
+    const content = "他走了过去。他拿了杯子。他喝了一口。他放了下来。他转了身。他叹了口气。他摇了摇头。";
     const result = validatePostWrite(content, baseProfile, null);
     const v = findRule(result, "连续了字");
     expect(v).toBeDefined();

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

@@ -193,7 +193,7 @@ export function validatePostWrite(
       consecutiveLe = 0;
     }
   }
-  if (maxConsecutiveLe >= 4) {
+  if (maxConsecutiveLe >= 6) {
     violations.push({
       rule: "连续了字",
       severity: "warning",