44
55## 产品定位 (ADR-013)
66
7- Sopify 的 durable core 是跨宿主 AI 工作流的 ** 证据与授权层** 。它不负责生成代码或编排 agent,而是把外部生产、验证、知识工具的结果收敛成可恢复、可审计、可授权的机器事实。Sopify 官方在 core 之上提供一个轻量、可插拔、收敛式的 blueprint-driven workflow 作为默认产品体验 。
7+ Sopify 的 durable core 是跨宿主 AI 工作流的 ** 证据与授权层** 。它不负责生成代码或编排 agent,而是把外部生产、验证、知识工具的结果收敛成可恢复、可审计、可授权的机器事实。Sopify 官方在 core 之上提供一个轻量、可插拔、收敛式的 workflow,并以 blueprint 作为默认的长期知识基线 。
88
99| 层级 | 表述 |
1010| ------| ------|
1111| 用户层 | 任务可恢复、决策可追踪、产出质量可验证,跨宿主无缝接力 |
12- | 产品层 | Core: 证据规范 + 授权判定 + 收据 + 接力 + archive truth;Default Workflow: blueprint 驱动的收敛式工作流 |
13- | 架构层 | Evidence & authorization layer + official blueprint-driven workflow on top |
12+ | 产品层 | Core: 证据规范 + 授权判定 + 收据 + 接力 + archive truth;Default Workflow: 以 blueprint 为基线的收敛式工作流 |
13+ | 架构层 | Evidence & authorization layer + official workflow anchored on blueprint as long-term knowledge baseline |
1414
1515## 产品分层
1616
1717| 产品层 | 职责 | 映射到实现 |
1818| -------| ------| -----------|
1919| ** Core** | 证据规范、授权判定、收据生成、handoff 接力、archive truth | Protocol + Validator |
20- | ** Default Workflow** | blueprint 驱动分析 、标准方案包生成、checkpoint 讨论(含跨宿主审查)、归档回写 | Protocol conventions + Validator policies + 可选 Runtime 编排 |
20+ | ** Default Workflow** | 以 blueprint 为基线的分析 、标准方案包生成、checkpoint 讨论(含跨宿主审查)、归档回写 | Protocol conventions + Validator policies + 可选 Runtime 编排 |
2121| ** Plugins / Skills** | 生产增强、验证增强、知识增强(cross-review, graphify 等) | Integration Contract (protocol.md §6) + Validator admission |
2222
2323** 层间规则:**
@@ -100,6 +100,8 @@ Sopify 的 durable core 是跨宿主 AI 工作流的 **证据与授权层**。
100100
101101> ** 迁移现状(2026-05)** :Protocol-first 是已确认的架构方向。` blueprint/protocol.md ` v0 已落地,定义了不依赖 runtime 也成立的最小可携带协议。当前 runtime(~ 29K 行 / 66 模块)仍是最完整的参考实现,protocol.md 是协议层的规范起点。
102102>
103+ > ** Blueprint Truth Cutover 原则** :Blueprint 是产品合法边界和预算的唯一定义源。Runtime 定义 how it currently runs,blueprint 定义 what is valid。当 runtime 与 blueprint 冲突时,以 blueprint 为准——runtime 中超出 canonical 预算的面是待迁移的遗留面,不是产品真相。Runtime 在架构上是参考实现和迁移层,不是 truth source。当前产品尚处于早期阶段,无外部消费者依赖和生产级兼容承诺,处于可激进收敛的窗口期。
104+ >
103105> ** 协议规范** :` blueprint/protocol.md ` 定义最小可携带协议(目录结构、必备文件/字段、宿主最小义务、生命周期样例)。本节定义三层架构分工,protocol.md 定义最小合规下界。
104106
105107| 层 | 内容 | 体量目标 | 可替代性 |
@@ -185,7 +187,7 @@ Sopify 的 durable core 是跨宿主 AI 工作流的 **证据与授权层**。
185187
186188| 旧类型 | 新定位 | 说明 |
187189| --------| --------| ------|
188- | ` plan_proposal ` | propose_plan 的 pending artifact | 等 ActionProposal side-effect proof 稳定后降级 |
190+ | ` plan_proposal ` | ~~ propose_plan 的 pending artifact~~ | ** Wave 3a 已 hard-cut 删除 ** |
189191| ` execution_confirm ` | ExecutionAuthorizationReceipt | 机器授权事实,不是协作分叉 |
190192| ` develop_checkpoint ` | develop callback source | 可触发 clarification 或 decision,不是独立 checkpoint type |
191193
@@ -203,7 +205,7 @@ Sopify 的 durable core 是跨宿主 AI 工作流的 **证据与授权层**。
203205
204206| Legacy action | 目标归宿 | Sunset 条件 |
205207| ---------------| ----------| ------------|
206- | ` confirm_plan_package ` | propose_plan artifact flow | ActionProposal side-effect proof 覆盖 |
208+ | ` confirm_plan_package ` | ~~ propose_plan artifact flow~~ | ** Wave 3a 已 hard-cut 删除 ** |
207209| ` confirm_execute ` | ExecutionAuthorizationReceipt | receipt 替代 checkpoint |
208210| ` review_or_execute_plan ` | ActionProposal routing | Validator 接管 |
209211| ` continue_host_quick_fix ` | ` continue_host_develop(mode=quick_fix) ` | 合并为 hint |
@@ -214,16 +216,30 @@ Sopify 的 durable core 是跨宿主 AI 工作流的 **证据与授权层**。
214216
215217#### Route Families (target: 6)
216218
217- | Canonical | 覆盖旧 route |
218- | -----------| -------------|
219- | ` plan ` | workflow, light_iterate, plan_only |
220- | ` develop ` | quick_fix, exec_plan, resume_active |
221- | ` consult ` | consult_readonly |
222- | ` archive ` | archive |
223- | ` clarification ` | clarification_pending, clarification_resume |
224- | ` decision ` | decision_pending, decision_resume |
219+ | Canonical | 覆盖 route_name(runtime 实际值) |
220+ | -----------| -------------------------------|
221+ | ` plan ` | ` plan_only ` , ` workflow ` , ` light_iterate ` |
222+ | ` develop ` | ` exec_plan ` , ` resume_active ` , ` quick_fix ` |
223+ | ` consult ` | ` consult ` , ` replay ` |
224+ | ` archive ` | ` archive_lifecycle ` |
225+ | ` clarification ` | ` clarification_pending ` , ` clarification_resume ` |
226+ | ` decision ` | ` decision_pending ` , ` decision_resume ` |
227+
228+ #### Non-family Surfaces
229+
230+ 以下 route 不计入 6 family 预算。总条件:它不是 resumable 的 host-facing workflow continuation。然后必须属于以下之一:
231+
232+ 1 . ** 跨路由错误面** — 任何 route 内均可触发的横切 error handling
233+ 2 . ** 显式 control/teardown 命令** — 不产出 handoff、不参与工作流推进
234+ 3 . ** 显式 read-only utility 命令** — 不影响工作流状态的只读渲染
235+
236+ | route_name | 分类 | 说明 |
237+ | ------------| ------| ------|
238+ | ` state_conflict ` | 跨路由错误面 | state-resolution error surface |
239+ | ` cancel_active ` | control/teardown | 清空 active flow,不产出 handoff |
240+ | ` summary ` | read-only utility | ` ~summary ` 显式命令,不写 last_route、不覆盖 handoff |
225241
226- ` resolve_state_conflict ` 是 state-resolution error surface,不计入 workflow route family。它在任何 route 内均可触发,作为横切 error handling 存在 。
242+ 新增 non-family surface 必须显式修改本段落,默认不允许扩口。non-family surface 如果不再被 runtime 主链路引用,应直接删除而非保留为 legacy 。
227243
228244#### Core State Files (target: 6, authoritative)
229245
@@ -236,7 +252,7 @@ Sopify 的 durable core 是跨宿主 AI 工作流的 **证据与授权层**。
236252| ` current_decision.json ` | decision checkpoint |
237253| ` current_archive_receipt.json ` | archive 可审计 receipt(不是 host action) |
238254
239- ** Fold/remove:** ` current_plan_proposal.json ` → ` current_handoff.artifacts.proposal ` 或 ` current_run ` pending artifact。不得新建替代文件。
255+ ** Fold/remove:** ~~ ` current_plan_proposal.json ` ~~ — ** Wave 3a 已删除,未新建替代文件。 ` context_snapshot.current_plan_proposal ` 字段保留为 ` None ` (反序列化兼容)。 **
240256
241257** Derived/compat(不计入 core budget):** ` last_route.json ` — 后续证明可从 handoff/run 派生后移除。
242258
@@ -292,7 +308,7 @@ Sopify 的设计目标不仅是工程轻量(削减 runtime),更是产品
292308
293309** Decision:** 多方案拍板。Runtime 写入 ` current_decision.json ` ,handoff 暴露推荐项与提交状态。宿主展示选项,等待确认后恢复 runtime。Pending 期间不物化 plan。
294310
295- ** Develop callback:** ` continue_host_develop ` 期间命中用户拍板分叉时,通过 ` develop_checkpoint_runtime .py` 回调 runtime,触发 clarification 或 decision。不是独立 checkpoint type。
311+ ** Develop callback:** ` continue_host_develop ` 期间命中用户拍板分叉时,通过 ` develop_callback_runtime .py` 回调 runtime,触发 clarification 或 decision。不是独立 checkpoint type。
296312
297313### knowledge_sync
298314
@@ -319,7 +335,7 @@ knowledge_sync:
319335# ## Runtime state scope
320336
321337- Review state 默认落在 `state/sessions/<session_id>/`,覆盖 `current_plan/current_run/current_handoff/current_clarification/current_decision/last_route`
322- - 根级 `state/` 只承载 global execution truth(当前仍包含 `execution_confirm_pending / resume_active / exec_plan` 等 transitional 语义,将随 ExecutionAuthorizationReceipt 和 route 收敛逐步清理)
338+ - 根级 `state/` 只承载 global execution truth(当前仍包含 `resume_active / exec_plan` 等 transitional 语义,将随 route 收敛逐步清理;`execution_confirm_pending` 已在 Wave 3b 删除 )
323339- Archive lifecycle 只在归档主体等于当前 global `current_plan` 时清理对应执行状态
324340- ` session_id` 由宿主透传或 gate 自动生成;同一条 review 续轮必须复用同一个 `session_id`
325341- 并发 review 使用不同 `session_id`;global truth 只补 soft ownership 观测字段
0 commit comments