Files
writer-work-flow/packages/agents/ww_agents/__init__.py
Yaojia Wang 452bd56d95 feat(agents,core,config): 写章 craft 教条块 + genre-aware 片段 + 开篇黄金三章特判
- 新增 write_craft.md 品类无关写章 craft 内核(网文语域/show-don't-tell/对话 voice/
  反注水/结构性文字质感,灵活原则非穷举清单)+ load_craft_doctrine()(import 期读盘,
  不入 SPECS/金标准)
- build_write_request 把 craft 教条作为最前的 cache=True system 块注入(craft→stable_core,
  守缓存前缀 #9,tier=writer 不写 model)
- 新增 packages/config GENRE_CRAFT 题材片段表,assemble 按 project.genre 注入 stable_core;
  ProjectSpecView + SqlProjectSpecRepo 透传 genre
- 开篇前 3 章在 volatile 注入黄金三章提示(含章号→每章易变,不进缓存前缀)
- 修正 toolbox_registry 注释:11 条 → 15 条(legacy 3 + 新 8 + Scope B 4)
2026-07-06 14:29:43 +02:00

148 lines
3.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""ww-agents内置 Agent 声明AgentSpec+ 结构化输出 schemaC6
对齐 ARCH §5.1AgentSpec/ §5.4I/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,
CharacterRelation,
Conflict,
ConflictType,
ContinuationResult,
ContinuityReview,
DeAiResult,
DetailedOutlineResult,
ForeshadowReview,
ForeshadowSuggestion,
ForeshadowWindow,
GlossaryResult,
GlossaryTerm,
GoldenFinger,
GoldenFingerResult,
Idea,
IdeaListResult,
NameListResult,
NameSuggestion,
Opening,
OpeningResult,
OutlineChapter,
OutlineResult,
PaceIssue,
PaceReview,
PolishResult,
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,
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,
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",
"CharacterRelation",
"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",
"Scene",
"StyleDimension",
"StyleDriftReview",
"StyleDriftSegment",
"StyleFingerprintResult",
"Title",
"TitleListResult",
"WorldEntityCard",
"WorldGenResult",
"blurb_spec",
"book_title_spec",
"brainstorm_spec",
"character_gen_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",
"refiner_spec",
"style_drift_spec",
"style_extract_spec",
"teardown_spec",
"worldbuilder_spec",
]