|
@@ -267,19 +267,27 @@ class ScriptBuildInputSnapshotV1:
|
|
|
|
|
|
|
|
```python
|
|
```python
|
|
|
@dataclass(frozen=True)
|
|
@dataclass(frozen=True)
|
|
|
-class ScriptDirectionArtifactV1:
|
|
|
|
|
- goals: tuple[DirectionGoal, ...] # 1..3
|
|
|
|
|
- criteria: tuple[Criterion, ...]
|
|
|
|
|
- domain_criteria: tuple[Criterion, ...]
|
|
|
|
|
|
|
+class DirectionGoal:
|
|
|
|
|
+ goal_id: str
|
|
|
|
|
+ parent_goal_id: str | None
|
|
|
|
|
+ statement: str
|
|
|
|
|
+ rationale: str
|
|
|
|
|
+ success_criteria: tuple[str, ...]
|
|
|
|
|
+
|
|
|
|
|
+@dataclass(frozen=True)
|
|
|
|
|
+class DirectionArtifact:
|
|
|
|
|
+ goals: tuple[DirectionGoal, ...] # 通常 3..6 个顶层目标,全部节点最多 30
|
|
|
|
|
+ constraints: tuple[DirectionConstraint, ...]
|
|
|
|
|
+ preferences: tuple[DirectionPreference, ...]
|
|
|
topic_refs: tuple[str, ...]
|
|
topic_refs: tuple[str, ...]
|
|
|
persona_refs: tuple[str, ...]
|
|
persona_refs: tuple[str, ...]
|
|
|
strategy_refs: tuple[str, ...]
|
|
strategy_refs: tuple[str, ...]
|
|
|
evidence_refs: tuple[str, ...]
|
|
evidence_refs: tuple[str, ...]
|
|
|
- legacy_markdown: str
|
|
|
|
|
|
|
+ legacy_markdown: str # Host 根据上述字段自动投影
|
|
|
canonical_sha256: str
|
|
canonical_sha256: str
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-`legacy_markdown` 是面向旧 `script_direction` 字段的投影,不是结构化真源。Direction Task 经 Validator passed 且 Planner ACCEPT 后,Host 才把已接受版本标记为 active direction;普通工具不得任意覆盖。
|
|
|
|
|
|
|
+Direction 允许顶层目标交叉覆盖后续产物,并只允许一层子目标;硬性要求进入 `constraints`,可权衡要求进入 `preferences`。每个目标必须包含理由和可验证的成功标准。`legacy_markdown` 是面向旧 `script_direction` 字段的 Host 确定性投影,不是结构化真源,模型不能提交该字段。Direction Task 经 Validator passed 且 Planner ACCEPT 后,Host 才把已接受版本标记为 active direction;普通工具不得任意覆盖。当前 Wire schema 名仍为 `script-direction/v1`,但不兼容缺少层级目标、约束和偏好字段的旧 Direction JSON。
|
|
|
|
|
|
|
|
### 3.3 证据产物
|
|
### 3.3 证据产物
|
|
|
|
|
|
|
@@ -312,12 +320,15 @@ class StructuredScriptArtifactV1:
|
|
|
elements: tuple[dict, ...]
|
|
elements: tuple[dict, ...]
|
|
|
paragraph_element_links: tuple[dict, ...]
|
|
paragraph_element_links: tuple[dict, ...]
|
|
|
source_artifact_refs: tuple[str, ...]
|
|
source_artifact_refs: tuple[str, ...]
|
|
|
|
|
+ goal_coverage: tuple[GoalCoverage, ...]
|
|
|
evidence_refs: tuple[str, ...]
|
|
evidence_refs: tuple[str, ...]
|
|
|
acceptance_notes: tuple[str, ...]
|
|
acceptance_notes: tuple[str, ...]
|
|
|
canonical_sha256: str
|
|
canonical_sha256: str
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-它是阶段二 Compose Worker 提交的不可变完整候选,不等同于旧表中可变的“当前 branch”。Candidate Validator、Root Validator 和 Publisher 必须读取该版本固定的 canonical JSON。
|
|
|
|
|
|
|
+`GoalCoverage` 只包含 `goal_id` 和 `source_artifact_refs`。Host 按 Direction 中父子 Goal 的原始顺序,从 Compose 实际采用的 Structure、Paragraph、ElementSet 自动推导;Retrieval、Comparison 和 Direction 可以支撑决策,但不能冒充 Goal 的创作实现。所有父 Goal 和子 Goal 都必须分别有来源;同一 Artifact 可以覆盖多个 Goal,同一 Goal 也可以由多个 Artifact 共同实现。Coverage 不复制到 Portfolio、Root Manifest 或数据库控制表。
|
|
|
|
|
+
|
|
|
|
|
+它是阶段二 Compose Worker 提交的不可变完整候选,不等同于旧表中可变的“当前 branch”。Candidate Validator、Root Validator 和 Publisher 必须读取该版本固定的 canonical JSON。缺少 `goal_coverage` 的旧 StructuredScript 直接拒绝,不做历史 fallback。
|
|
|
|
|
|
|
|
### 3.5 Portfolio 与 Root 交付清单
|
|
### 3.5 Portfolio 与 Root 交付清单
|
|
|
|
|
|
|
@@ -1151,7 +1162,7 @@ async def execute_candidate_write(
|
|
|
|
|
|
|
|
| Preset | 允许的旧只读能力 | 产物/用途 | 禁止项 |
|
|
| Preset | 允许的旧只读能力 | 产物/用途 | 禁止项 |
|
|
|
|---|---|---|---|
|
|
|---|---|---|---|
|
|
|
-| Direction Worker | topic detail、persona points、accepted evidence、strategy snapshot | `ScriptDirectionArtifactV1` | live 输入、正式写入、外部搜索 |
|
|
|
|
|
|
|
+| Direction Worker | topic detail、persona points、accepted evidence、strategy snapshot | `DirectionArtifact` | live 输入、正式写入、外部搜索 |
|
|
|
| Structure Worker | accepted direction、topic composition、section patterns、script snapshot | 段落结构候选 | 跨 Attempt branch、发布 |
|
|
| Structure Worker | accepted direction、topic composition、section patterns、script snapshot | 段落结构候选 | 跨 Attempt branch、发布 |
|
|
|
| Paragraph Worker | accepted direction/structure/evidence、persona points、reference detail | Paragraph 候选 | 未接受检索结果、其他候选最新值 |
|
|
| Paragraph Worker | accepted direction/structure/evidence、persona points、reference detail | Paragraph 候选 | 未接受检索结果、其他候选最新值 |
|
|
|
| Element Worker | 当前 Attempt Paragraph、accepted evidence、关系读取 | Element/Link 候选,含 commonality/topic_support/weight/support elements | branch0、状态更新 |
|
|
| Element Worker | 当前 Attempt Paragraph、accepted evidence、关系读取 | Element/Link 候选,含 commonality/topic_support/weight/support elements | branch0、状态更新 |
|
|
@@ -1702,6 +1713,8 @@ Direction Worker 输出三类结构化目标,可与旧样本的认知深度、
|
|
|
|
|
|
|
|
Direction 已 completed,阶段二不能再给它加 child。Host 受控 UNBLOCK Root,Planner 在 Root 下创建一个 `candidate-portfolio` 父 Task,再在其子树中动态建任务;各任务通过 `AcceptedInputResolver` 钉死 Direction Decision/Artifact version/digest。
|
|
Direction 已 completed,阶段二不能再给它加 child。Host 受控 UNBLOCK Root,Planner 在 Root 下创建一个 `candidate-portfolio` 父 Task,再在其子树中动态建任务;各任务通过 `AcceptedInputResolver` 钉死 Direction Decision/Artifact version/digest。
|
|
|
|
|
|
|
|
|
|
+每个阶段二合同还冻结 `goal_ids`:Structure、Paragraph、ElementSet、Compare 和 Retrieval 可覆盖 Direction Goal 的任意交叉子集;子 Task 不得超出父 Task Goal 集,Compare 必须等于候选并集,Compose 和 CandidatePortfolio 必须携带全部父子 Goal。Paragraph 可以先于 Structure 探索,但被 Compose 采用时必须同时采用覆盖其 scope 的 Structure。段落数、ElementSet、Retrieval 和 Compare 数量都由 Goal 与内容需要决定,不存在固定五段或固定七步工作流。
|
|
|
|
|
+
|
|
|
针对 Run 454 同类输入,一条允许但不固定的轨迹是:
|
|
针对 Run 454 同类输入,一条允许但不固定的轨迹是:
|
|
|
|
|
|
|
|
```text
|
|
```text
|
|
@@ -1718,7 +1731,7 @@ C1 Compose:计算 frontier,串行组合完整候选
|
|
|
|
|
|
|
|
### 14.5 阶段三 Root 与发布
|
|
### 14.5 阶段三 Root 与发布
|
|
|
|
|
|
|
|
-Host 再次受控 UNBLOCK Root。Root Worker 只读 accepted Portfolio 和其唯一 frozen StructuredScript,做 legacy projection dry-run 后冻结 RootDeliveryManifest;Root Validator 核验 Manifest 与同一正文,通过后 Planner ACCEPT Root。Publisher 只从该 ACCEPT 绑定的 Manifest 解析 StructuredScript 并投影到 `branch_id=0`,旧详情回读得到相同 canonical digest 后才把状态设为 success。5 Paragraph、11 Element、13 Link 只是旧样本的可表达性基线,不是硬编码数量。
|
|
|
|
|
|
|
+Host 再次受控 UNBLOCK Root。Root Worker 只读 accepted Direction、Portfolio 和其唯一 frozen StructuredScript,做 legacy projection dry-run 后冻结 RootDeliveryManifest。确定性预检先证明 GoalCoverage 完整且三者属于同一冻结闭包;Root Validator 再逐个检查父 Goal、子 Goal及各自 success criteria,任一 constraint 违反都 REJECT,preferences 只记录满足情况和权衡。通过后 Planner ACCEPT Root。Publisher 只从该 ACCEPT 绑定的 Manifest 解析 StructuredScript 并投影到 `branch_id=0`,旧详情回读得到相同 canonical digest 后才把状态设为 success。5 Paragraph、11 Element、13 Link 只是旧样本的可表达性基线,不是硬编码数量。
|
|
|
|
|
|
|
|
## 15. 三阶段实施计划
|
|
## 15. 三阶段实施计划
|
|
|
|
|
|