Selaa lähdekoodia

fix: wire hookDebtBlock into reviser user prompt

reviser.ts called buildGovernedMemoryEvidenceBlocks() but only
destructured hooksBlock, dropping the hookDebtBlock field.
The hook debt briefs (original seed text from hook-planting chapters)
were constructed but never reached the repair prompt.

Now hookDebtBlock is extracted and prepended to the hooks section
in the user prompt, giving the reviser the same hook context
that the main writer path already has.
Ma 7 kuukautta sitten
vanhempi
commit
2b652cbaae
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      packages/core/src/agents/reviser.ts

+ 2 - 1
packages/core/src/agents/reviser.ts

@@ -197,6 +197,7 @@ ${outputFormat}`;
     const governedMemoryBlocks = options?.contextPackage
       ? buildGovernedMemoryEvidenceBlocks(options.contextPackage, resolvedLanguage)
       : undefined;
+    const hookDebtBlock = governedMemoryBlocks?.hookDebtBlock ?? "";
     const hooksBlock = governedMemoryBlocks?.hooksBlock
       ?? `\n## 伏笔池\n${hooksWorkingSet}\n`;
     const outlineBlock = volumeOutline !== "(文件不存在)"
@@ -242,7 +243,7 @@ ${issueList}
 ## 当前状态卡
 ${currentState}
 ${ledgerBlock}
-${hooksBlock}${volumeSummariesBlock}${reducedControlBlock || outlineBlock}${bibleBlock}${matrixBlock}${summariesBlock}${canonBlock}${fanficCanonBlock}${styleGuideBlock}${lengthGuidanceBlock}
+${hookDebtBlock}${hooksBlock}${volumeSummariesBlock}${reducedControlBlock || outlineBlock}${bibleBlock}${matrixBlock}${summariesBlock}${canonBlock}${fanficCanonBlock}${styleGuideBlock}${lengthGuidanceBlock}
 
 ## 待修正章节
 ${chapterContent}`;