镜像 clarify_refine(仅 name/prompt 不同,复用 ClarifyDecision,不新增 schema): 新增 clarify_rewrite_spec(analyst 档、reads=()/writes=() 只读,不变量 #2/#3)+ 章级 教条 prompts/clarify_rewrite.md(segment→整章:判作者章级重写意见是否含糊)。注册进 SPECS/SCHEMA_CATALOG,自检数量 24→25,__init__ 导出,金标准仅新增 1 条哈希无漂移。
168 lines
3.6 KiB
Python
168 lines
3.6 KiB
Python
"""ww-agents:内置 Agent 声明(AgentSpec)+ 结构化输出 schema(C6)。
|
||
|
||
对齐 ARCH §5.1(AgentSpec)/ §5.4(I/O 契约)/ §6.1(冲突分类)/ §6.2 §6.4(伏笔/节奏)。
|
||
"""
|
||
|
||
from __future__ import annotations
|
||
|
||
from .prompt_loader import PromptNotFoundError, load_craft_doctrine, load_prompt
|
||
from .schema_catalog import SCHEMA_CATALOG, output_schema_for
|
||
from .schemas import (
|
||
Blurb,
|
||
BlurbResult,
|
||
BookTeardownResult,
|
||
CharacterCard,
|
||
CharacterGenResult,
|
||
CharacterizationIssue,
|
||
CharacterizationReview,
|
||
CharacterRelation,
|
||
ClarifyDecision,
|
||
ClarifyOption,
|
||
ClarifyQuestion,
|
||
Conflict,
|
||
ConflictType,
|
||
ContinuationResult,
|
||
ContinuityReview,
|
||
DeAiResult,
|
||
DetailedOutlineResult,
|
||
ForeshadowReview,
|
||
ForeshadowSuggestion,
|
||
ForeshadowWindow,
|
||
GlossaryResult,
|
||
GlossaryTerm,
|
||
GoldenFinger,
|
||
GoldenFingerResult,
|
||
Idea,
|
||
IdeaListResult,
|
||
NameListResult,
|
||
NameSuggestion,
|
||
Opening,
|
||
OpeningResult,
|
||
OutlineChapter,
|
||
OutlineResult,
|
||
PaceIssue,
|
||
PaceReview,
|
||
PolishResult,
|
||
ProjectPlanResult,
|
||
Scene,
|
||
StyleDimension,
|
||
StyleDriftReview,
|
||
StyleDriftSegment,
|
||
StyleFingerprintResult,
|
||
Title,
|
||
TitleListResult,
|
||
WorldEntityCard,
|
||
WorldGenResult,
|
||
)
|
||
from .specs import (
|
||
REVIEW_RESERVED_NAMES,
|
||
SPECS,
|
||
AgentSpec,
|
||
blurb_spec,
|
||
book_title_spec,
|
||
brainstorm_spec,
|
||
character_gen_spec,
|
||
characterization_spec,
|
||
clarify_refine_spec,
|
||
clarify_rewrite_spec,
|
||
continue_spec,
|
||
continuity_spec,
|
||
de_ai_spec,
|
||
expand_spec,
|
||
fine_outline_spec,
|
||
foreshadow_spec,
|
||
glossary_spec,
|
||
golden_finger_spec,
|
||
name_spec,
|
||
opening_spec,
|
||
outliner_spec,
|
||
pace_spec,
|
||
project_plan_spec,
|
||
refiner_spec,
|
||
style_drift_spec,
|
||
style_extract_spec,
|
||
teardown_spec,
|
||
worldbuilder_spec,
|
||
)
|
||
|
||
__all__ = [
|
||
"REVIEW_RESERVED_NAMES",
|
||
"SCHEMA_CATALOG",
|
||
"SPECS",
|
||
"AgentSpec",
|
||
"Blurb",
|
||
"BlurbResult",
|
||
"BookTeardownResult",
|
||
"CharacterCard",
|
||
"CharacterGenResult",
|
||
"CharacterizationIssue",
|
||
"CharacterizationReview",
|
||
"CharacterRelation",
|
||
"ClarifyDecision",
|
||
"ClarifyOption",
|
||
"ClarifyQuestion",
|
||
"Conflict",
|
||
"ConflictType",
|
||
"ContinuationResult",
|
||
"ContinuityReview",
|
||
"DeAiResult",
|
||
"DetailedOutlineResult",
|
||
"ForeshadowReview",
|
||
"ForeshadowSuggestion",
|
||
"ForeshadowWindow",
|
||
"GlossaryResult",
|
||
"GlossaryTerm",
|
||
"GoldenFinger",
|
||
"GoldenFingerResult",
|
||
"Idea",
|
||
"IdeaListResult",
|
||
"NameListResult",
|
||
"NameSuggestion",
|
||
"Opening",
|
||
"OpeningResult",
|
||
"OutlineChapter",
|
||
"PromptNotFoundError",
|
||
"OutlineResult",
|
||
"PaceIssue",
|
||
"PaceReview",
|
||
"PolishResult",
|
||
"ProjectPlanResult",
|
||
"Scene",
|
||
"StyleDimension",
|
||
"StyleDriftReview",
|
||
"StyleDriftSegment",
|
||
"StyleFingerprintResult",
|
||
"Title",
|
||
"TitleListResult",
|
||
"WorldEntityCard",
|
||
"WorldGenResult",
|
||
"blurb_spec",
|
||
"book_title_spec",
|
||
"brainstorm_spec",
|
||
"character_gen_spec",
|
||
"characterization_spec",
|
||
"clarify_refine_spec",
|
||
"clarify_rewrite_spec",
|
||
"continue_spec",
|
||
"continuity_spec",
|
||
"de_ai_spec",
|
||
"expand_spec",
|
||
"fine_outline_spec",
|
||
"foreshadow_spec",
|
||
"glossary_spec",
|
||
"golden_finger_spec",
|
||
"load_craft_doctrine",
|
||
"load_prompt",
|
||
"name_spec",
|
||
"opening_spec",
|
||
"outliner_spec",
|
||
"output_schema_for",
|
||
"pace_spec",
|
||
"project_plan_spec",
|
||
"refiner_spec",
|
||
"style_drift_spec",
|
||
"style_extract_spec",
|
||
"teardown_spec",
|
||
"worldbuilder_spec",
|
||
]
|