feat(agents): Scope B A1 — 4 竞品生成器 schema/spec + 2 上下文 builder
续写/扩写/降AI率/拆书 4 个生成器的声明(preview-only writes=[],只声明 tier #2): - schemas.py: ContinuationResult/PolishResult/DeAiResult/BookTeardownResult - specs.py: continue(writer)/expand(writer)/de-ai(analyst)/teardown(analyst),各配 system_prompt - generation_node.py: build_continuation_context(续写读前文)/build_text_input_context(原文输入) - 单测: 4 spec/schema 契约 + 2 builder 纯函数(确定性/空值降级) 守不变量 #2(只声明 tier)/#3(纯预览不写库)/#9(system_prompt 进缓存前缀)。
This commit is contained in:
@@ -527,3 +527,64 @@ class DetailedOutlineResult(BaseModel):
|
||||
default_factory=list,
|
||||
description="展开的场景清单;无则空列表",
|
||||
)
|
||||
|
||||
|
||||
# ---- 竞品快赢 · 续写生成器(continue;writer;纯预览 writes=[])----
|
||||
|
||||
|
||||
class ContinuationResult(BaseModel):
|
||||
"""续写生成器结构化产出:承接前文的续写正文(Scope B 竞品快赢)。
|
||||
|
||||
纯预览产物——不映射任何业务表、不入库(`continue_spec.writes=[]`,不变量 #3)。
|
||||
"""
|
||||
|
||||
text: str = Field(description="续写正文(承接前文,可直接作为下文草稿)")
|
||||
|
||||
|
||||
# ---- 竞品快赢 · 扩写生成器(expand;writer;纯预览 writes=[])----
|
||||
|
||||
|
||||
class PolishResult(BaseModel):
|
||||
"""扩写生成器结构化产出:在原文基础上扩写/丰富后的正文(Scope B 竞品快赢)。
|
||||
|
||||
纯预览产物——不映射任何业务表、不入库(`expand_spec.writes=[]`,不变量 #3)。
|
||||
"""
|
||||
|
||||
text: str = Field(description="扩写后的正文(在原文基础上丰富细节/铺陈)")
|
||||
|
||||
|
||||
# ---- 竞品快赢 · 降 AI 率生成器(de-ai;analyst;纯预览 writes=[])----
|
||||
|
||||
|
||||
class DeAiResult(BaseModel):
|
||||
"""降 AI 率生成器结构化产出:去 AI 腔/口语化改写后的正文(Scope B 竞品快赢)。
|
||||
|
||||
纯预览产物——不映射任何业务表、不入库(`de_ai_spec.writes=[]`,不变量 #3)。
|
||||
"""
|
||||
|
||||
text: str = Field(description="降 AI 率改写后的正文(去机翻腔、更自然的人写质感)")
|
||||
|
||||
|
||||
# ---- 竞品快赢 · 拆书生成器(teardown;analyst;纯预览 writes=[])----
|
||||
|
||||
|
||||
class BookTeardownResult(BaseModel):
|
||||
"""拆书生成器结构化产出:样本作品的结构化拆解(Scope B 竞品快赢)。
|
||||
|
||||
纯预览产物——不映射任何业务表、不入库(`teardown_spec.writes=[]`,不变量 #3)。
|
||||
拆书「落库成 rules」为可选 follow-up(需 `KNOWN_TABLES` + `_ingest_rules`),本期不做。
|
||||
"""
|
||||
|
||||
themes: list[str] = Field(
|
||||
default_factory=list,
|
||||
description="核心主题/立意清单;无则空列表",
|
||||
)
|
||||
archetypes: list[str] = Field(
|
||||
default_factory=list,
|
||||
description="人物原型/角色模板清单;无则空列表",
|
||||
)
|
||||
structure: str = Field(description="叙事结构概述(开篇/铺垫/高潮/收束的脉络)")
|
||||
hooks: list[str] = Field(
|
||||
default_factory=list,
|
||||
description="抓人钩子/爽点套路清单;无则空列表",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user