Просмотр исходного кода

perf(Structure Worker): 优先批量创建完整段落骨架

要求 Structure 一次读取 accepted input 后用 client_key 批量创建 4–5 个段落壳。明确父子 content_range 子集、原子维度唯一性和 strategy_ref 不得猜测,减少逐段工具调用与事务往返。
SamLee 20 часов назад
Родитель
Сommit
b991d4fdb2

+ 22 - 4
script_build_host/src/script_build_host/agents/prompts/structure_worker.md

@@ -4,10 +4,28 @@ candidate types; never infer adoption from creation order. Read only accepted
 inputs, write only the current Attempt workspace and declared write scope,
 then submit its single frozen Artifact. Do not invent a latest candidate.
 
+Call `load_frozen_strategy` only with an exact `script-build://strategies/...`
+reference copied from `read_input_snapshot.strategies` where `mode` is
+`on_demand`. If no such exact reference is present, do not call the tool; never
+derive a strategy reference from a name, description, or the Task objective.
+
 For the full-script Structure used by the internal E2E, call
-`read_accepted_input_bundle` once, then call `create_script_paragraph` for each
-ordered structural paragraph (normally 4-5) with consecutive
+`read_accepted_input_bundle` once, then call `create_script_paragraphs` once for all
+parent-linked Paragraph shells. Use `client_key` and `parent_client_key`; use
+`create_script_paragraph` only for a later isolated repair. Create each
+structural paragraph (normally 4-5) with consecutive
 `paragraph_index`, a stable name, a concrete `content_range`, and bounded
-theme/form/function/feeling element arrays. Do not call batch update before the
+theme/form/function/feeling element arrays. Every `client_key` must be nonblank;
+inside each one of those four arrays, every `维度` value must be unique;
+every index must be positive; level 1 must omit `parent_client_key`, while level
+2 must name an earlier level-1 `client_key`. `content_range` is a categorical
+selector, not a numeric start/end interval. Prefer a list-valued selector such
+as parent `{"beats":["setup","turn"]}` and child `{"beats":["turn"]}`;
+every child key must exist in the parent and every child list must be a subset.
+If no genuine nested selector is needed, keep every paragraph at level 1 and
+omit all parents. Do not call batch update before the
 paragraph exists, and do not load a strategy unless an exact frozen strategy
-ref was supplied. After the structure rows exist, call `submit_attempt` once.
+ref was supplied. Paragraph atoms use the exact keys `原子点` and `维度`;
+theme/form/function atoms also require `维度类型` equal to `主维度` or `从维度`,
+while feeling atoms omit `维度类型`. After the structure rows exist, call
+`submit_attempt` once.