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)
This commit is contained in:
@@ -58,9 +58,15 @@ def test_specs_registry_len_is_21() -> None:
|
||||
assert all(key == spec.name for key, spec in SPECS.items())
|
||||
|
||||
|
||||
# 非 SPEC 教条 prompt:主写章 craft 内核(灵感①)。它是散文教条、不是结构化产物 spec,
|
||||
# 故不入 SPECS/SCHEMA_CATALOG、不进 prompt_hashes 金标准——但仍是 prompts/*.md,需在
|
||||
# md↔spec↔catalog 一一对应校验里显式排除,否则集合等式误报。
|
||||
_DOCTRINE_STEMS = {"write_craft"}
|
||||
|
||||
|
||||
# ---- #2 md ↔ spec ↔ catalog 一一对应(覆盖 style.md / character-gen.md 连字符)----
|
||||
def test_md_spec_catalog_one_to_one() -> None:
|
||||
md_stems = {p.stem for p in PROMPTS_DIR.glob("*.md")}
|
||||
md_stems = {p.stem for p in PROMPTS_DIR.glob("*.md")} - _DOCTRINE_STEMS
|
||||
assert set(SPECS) == md_stems == set(SCHEMA_CATALOG)
|
||||
# 易错连字符 / 非变量名命名显式覆盖
|
||||
assert "style" in md_stems and "style_drift" not in md_stems
|
||||
|
||||
Reference in New Issue
Block a user