Skip to content

Commit dfaac8b

Browse files
committed
feat(p1.5-d): Verifier minimum normative slice — §6 升格 + 消费路径 contract
protocol.md §6 Verifier 从 informative 升格为 normative(P1.5-D): - verdict/evidence/source MUST, scope SHOULD(RFC 2119) - 消费路径 contract:verdict → Validator 风险因子, evidence → 证据链 + handoff SHOULD, receipt deferred - §7 存储位置 normative/deferred 边界收紧 design.md 引用修正:verdict shape §7→§6 tasks.md review 修正: - B 行 ExecutionAuthorizationReceipt 引用 §6→§7 - D 行完成状态标记 - 全部 Lxxx 脆弱行号引用替换为章节级引用 方案包:plan/20260506_p15_verifier_normative_slice(background + design + tasks)
1 parent 423f039 commit dfaac8b

6 files changed

Lines changed: 171 additions & 13 deletions

File tree

.sopify-skills/blueprint/design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Sopify 的 durable core 是跨宿主 AI 工作流的 **证据与授权层**。
7373
- 方案状态流转:`draft → under_review → [accept → approved | revise → draft | blocked → escalate]`
7474
- 停点条件:至少一轮审查无阻塞性 finding 且返回 accept;或用户显式 override;或审查轮数达到上限(默认 3 轮)
7575
- 多审查者冲突:有任一 `blocked` 则整体 blocked;`accept` + `revise` 混合时取 revise
76-
- 机器契约subject identity / verdict shape`protocol.md §7`策略性规则(轮数上限、severity 判定)归 Default Workflow,不进 Core
76+
- 机器契约subject identity `protocol.md §7`verdict shape `protocol.md §6`策略性规则(轮数上限、severity 判定)归 Default Workflow,不进 Core
7777

7878
### 哲学 2: Wire-composable (线可组合)
7979

.sopify-skills/blueprint/protocol.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146

147147
## 6. Integration Contract(外部能力接入契约)— *informative / draft*
148148

149-
> 本节是方向性参考,尚未稳定为规范。具体字段定义待 Validator/Receipt 接口稳定后正式化。当前用于说明外部能力如何接入 Sopify 的收敛链。
149+
> 本节整体是方向性参考,尚未稳定为规范。当前仅 `### Verifier` 子段已升格为 normative(P1.5-D);其余子段仍为 informative/draft。当前用于说明外部能力如何接入 Sopify 的收敛链。
150150
151151
Sopify 不做生产/验证/知识处理节点本身,但拥有证据规范、授权判定、收据生成这几个控制节点。外部能力通过以下契约接入 Sopify 的收敛链。
152152

@@ -165,16 +165,26 @@ Sopify 接收后由 Validator 授权,不由生产器自行决定执行。
165165

166166
### Verifier(外部验证器)
167167

168+
> **升格状态**:本子段从 informative 升格为 **normative**(P1.5-D 升格)。字段约束使用 RFC 2119 表述。消费路径为 normative 声明。evidence attachment wire format 为 deferred。
169+
168170
外部验证器(cross-review、测试框架、lint 等)回传给 Sopify 的是 **verdict + evidence**
169171

170-
| 字段 | 说明 |
171-
|------|------|
172-
| `verdict` | passed / failed / warning / info |
173-
| `evidence` | 支撑判定的具体事实(文件路径、行号、代码片段等) |
174-
| `source` | 验证器标识(如 `cross-review:v1``unittest`|
175-
| `scope` | 验证范围(全量 / 增量 / 特定文件) |
172+
| 字段 | RFC 2119 | 说明 |
173+
|------|----------|------|
174+
| `verdict` | **MUST** | 可被 Validator 消费的判定标识。具体值域可由 Verifier 实现细化;canonical verdict 值域与完整 mapping 待后续里程碑正式化 |
175+
| `evidence` | **MUST** | 可 machine-readably 消费的证据(如文件路径、行号、代码片段等) |
176+
| `source` | **MUST** | 验证器来源标识(如 `cross-review:v1``unittest`),供 Validator 和宿主解释 evidence provenance |
177+
| `scope` | **SHOULD** | 验证范围(全量 / 增量 / 特定文件)。缺失不阻断 contract 成立,但会降低证据解释力 |
178+
179+
**注意**:Verifier 输出的是 **evidence 输入**,不是授权输出;只有 Validator 有权授权。
180+
181+
#### Verifier 消费路径
182+
183+
**verdict**:Validator **MUST** 将 Verifier verdict 视为授权风险因子。Verifier **MAY** 使用实现特定的更细粒度枚举;Validator 与宿主 **SHOULD** 能将其归一化到稳定语义层。canonical verdict 值域与完整 normalization mapping 待后续里程碑正式化;在此之前,verdict **MUST NOT** 被当作自授权信号,而只能作为风险/证据输入。
184+
185+
**evidence**:Verifier evidence **MUST** 进入 Sopify 的后续证据链。当存在结构化 handoff 承载位点时,**SHOULD** 挂载到 handoff。receipt / history / plan metadata 的具体 attachment 位置与 wire format 继续 **deferred**
176186

177-
验证结果进入 handoff / receipt,作为后续授权和归档的证据。**注意**Verifier 输出的是 **evidence 输入**,不是授权输出;只有 Validator 有权授权。Verifier 的 verdict 作为 Validator 授权判定的风险因子之一
187+
**source****MUST** 标识验证器来源,供 Validator 和宿主解释 evidence provenance。是否基于 source 做差异化处理不在当前 normative scope
178188

179189
### Knowledge Provider(外部知识工具)
180190

@@ -304,7 +314,7 @@ execute_existing_plan 是 subject identity 最关键的消费场景。宿主 MUS
304314

305315
### 存储位置
306316

307-
审查记录作为 evidence 进入 handoff 或 plan metadata,归档时纳入 receipt 的 verification_evidence。具体字段与路径待 Validator/Receipt 接口稳定后正式化
317+
审查记录作为 evidence 进入 handoff 或 plan metadata,归档时纳入 receipt 的 verification_evidence。evidence 挂载的 normative 消费规则见 §6 Verifier 消费路径。evidence attachment 的 wire format(字段 schema、路径约定)为 deferred,不属于当前 normative scope
308318

309319
## 非目标
310320

.sopify-skills/blueprint/tasks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ ADR-017 的直系后续。不要求落地完整 ExecutionAuthorizationReceipt
8181
|------|--------|---------|------|------|------|
8282
| C | Plan Materialization Auth Boundary | #6 || 修现存 bug + P2 硬前置 | ✅ 已完成(PR #23, 2026-05-05)。`immediate``authorized_only`;Validator 授权结果传到 planning 流程;router `_ACTION_KEYWORDS` 单字止血。Known debt: resume path authorization provenance 留 P1.5-B/P2 |
8383
| A | DECISION_REJECT Surface 收口 | #1 | 无(独立) | P1 语义债清理 | ✅ 已完成(2026-05-06)。reject 从 consult 伪装剥离为独立 non-family surface `proposal_rejected`;handoff_kind="reject" + reject_reason_code 结构化 artifact;output 投影全链路对齐(_PHASE_LABELS / _status_message / _handoff_next_hint / _status_symbol);required_host_action 保持 continue_host_consult(预算 5 不破)。Known debt: stale receipt run-level integration test 归 T5-C follow-up |
84-
| B | Authorization Contract Spec | #2 #3 #4 #5 #7 | C 先做更稳 | P1.5 核心交付 | ✅ 已完成(2026-05-06)。ExecutionAuthorizationReceipt 8-field spec normative(protocol §6 + ADR-017);generate_proposal_id + host reject;engine receipt generation (deferred to post-gate);RunState persistence + handoff exposure;stale detection fail-closed(integrity → binding → freshness);authorization_source shape 严格匹配 `{kind: "request_hash", request_sha1}`。Known debt: engine/handoff 端到端集成测试(T5-C)未交付,需单独补充 |
85-
| D | Verifier Minimum Normative Slice | 桥接 | B 稳定 | P1.5→P2 桥接 | protocol.md §6 升格 normative + Verifier 输出消费路径 |
84+
| B | Authorization Contract Spec | #2 #3 #4 #5 #7 | C 先做更稳 | P1.5 核心交付 | ✅ 已完成(2026-05-06)。ExecutionAuthorizationReceipt 8-field spec normative(protocol §7 + ADR-017);generate_proposal_id + host reject;engine receipt generation (deferred to post-gate);RunState persistence + handoff exposure;stale detection fail-closed(integrity → binding → freshness);authorization_source shape 严格匹配 `{kind: "request_hash", request_sha1}`。Known debt: engine/handoff 端到端集成测试(T5-C)未交付,需单独补充 |
85+
| D | Verifier Minimum Normative Slice | 桥接 | B 稳定 | P1.5→P2 桥接 | ✅ 已完成(2026-05-06)。protocol.md §6 Verifier 从 informative 升格为 normative(verdict/evidence/source MUST, scope SHOULD);消费路径 contract 口径(verdict → Validator 风险因子, evidence → 证据链 + handoff SHOULD, receipt deferred);§7 存储位置 deferred 边界收紧;design.md §7→§6 引用修正 |
8686

8787
**蓝图条目索引:**
8888

@@ -104,7 +104,7 @@ ADR-017 的直系后续。不要求落地完整 ExecutionAuthorizationReceipt
104104

105105
**P1.5→P2 桥接切片(涉及 protocol 层契约升格,需 P1.5 授权脊柱稳定后执行):**
106106

107-
- **Verifier minimum normative slice**:将 protocol.md §6 Verifier 子段从 informative/draft 升格为 normative。最小 normative 字段:`verdict` (passed/failed/warning/info) + `evidence` + `source`(RFC 2119 表述);`scope` 保留 recommended。明确 Verifier 输出消费路径:verdict 作为 Validator 授权判定的风险因子,evidence 挂载在 handoff/receipt 中。不定义 evidence attachment 完整 schema,不扩 canonical 预算。外部启发:HelloAGENTS 交付证据链(contract.json / review.json),准入 T1 Adoption
107+
- **Verifier minimum normative slice**:将 protocol.md §6 Verifier 子段从 informative/draft 升格为 normative。最小 normative 字段:`verdict`(MUST 提供可被 Validator 消费的判定标识,具体值域允许实现细化)+ `evidence` + `source`(RFC 2119 表述);`scope` 保留 recommended。明确 Verifier 输出消费路径:verdict 作为 Validator 授权判定的风险因子,evidence 挂载在 handoff/receipt 中。不定义 evidence attachment 完整 schema,不扩 canonical 预算。外部启发:HelloAGENTS 交付证据链(contract.json / review.json),准入 T1 Adoption
108108

109109
### P2: Local Action Contracts on Bound Subjects
110110

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# P1.5-D: Verifier Minimum Normative Slice — 背景
2+
3+
## 触发背景
4+
5+
P1.5 的授权脊柱已完成三个切片:
6+
7+
- **C**(PR #23):Plan Materialization Auth Boundary — `immediate``authorized_only`
8+
- **B**(PR #25):Authorization Contract Spec — ExecutionAuthorizationReceipt 8-field normative
9+
- **A**(PR #25):DECISION_REJECT Surface — reject 从 consult 伪装剥离为独立 non-family surface
10+
11+
D 是 P1.5 → P2 的桥接切片。P2 的 Local Action Contracts 需要 Verifier 输出作为 Validator 授权判定的风险因子输入。当前 protocol.md §6 Verifier 段是 informative(有字段表格但无 RFC 2119 语义),消费路径只有一句泛话("验证结果进入 handoff/receipt"),不构成可执行的 contract 口径。
12+
13+
## 核心问题
14+
15+
1. **§6 Verifier 字段无 normative 约束**:verdict/evidence/source/scope 列出了但没有 MUST/SHOULD 等级
16+
2. **消费路径是泛话**:"进入 handoff/receipt" 不说明 Validator 怎么消费 verdict、evidence 在证据链中的挂载规则
17+
3. **design.md 引用漂移**:写 "verdict shape 见 protocol.md §7" — Verifier 实际在 §6
18+
4. **§7 存储位置段有悬空尾巴**:"具体字段与路径待稳定后正式化" — 与 D 目标矛盾,需收紧 deferred 边界
19+
20+
## 约束
21+
22+
- 纯 spec / docs slice,不改 runtime 代码
23+
- 不定义 evidence attachment 完整 schema / wire format
24+
- 不扩 canonical 预算(receipt 字段维持 8 个,不新增)
25+
- 不做 Verifier runtime 实现
26+
- 消费路径重点在"消费语义",不在"存储拓扑"
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# P1.5-D: Verifier Minimum Normative Slice — 设计
2+
3+
## 设计决策
4+
5+
### D1: §6 Verifier 字段 RFC 2119 升格
6+
7+
将 protocol.md §6 Verifier 字段从 informative 表格升格为 normative:
8+
9+
| 字段 | 升格前 | 升格后 |
10+
|------|--------|--------|
11+
| `verdict` | 列出固定值域 | **MUST** 提供可被 Validator 消费的判定标识;具体值域允许实现细化,canonical 值域待后续正式化 |
12+
| `evidence` | "支撑判定的具体事实" | **MUST** 提供可 machine-readably 消费的证据(如文件路径、行号、代码片段等) |
13+
| `source` | "验证器标识" | **MUST** 标识验证器来源,供 Validator 和宿主解释 evidence provenance |
14+
| `scope` | "验证范围" | **SHOULD** 提供;缺失不阻断 contract 成立,但会降低证据解释力 |
15+
16+
### D2: Verifier 消费路径 — contract 口径
17+
18+
在 §6 Verifier 段之后新增消费路径规则:
19+
20+
**verdict 消费规则:**
21+
- Validator **MUST** 将 Verifier verdict 视为授权风险因子
22+
- Verifier **MAY** 使用实现特定的更细粒度枚举
23+
- Validator / 宿主 **SHOULD** 能将实现特定枚举归一化到稳定语义层
24+
- canonical verdict 值域与完整 normalization mapping 留待后续里程碑正式化;在此之前 verdict **MUST NOT** 被当作自授权信号
25+
26+
**evidence 消费规则:**
27+
- Verifier evidence **MUST** 进入 Sopify 的后续证据链
28+
- 当存在结构化 handoff 承载位点时,**SHOULD** 挂载到 handoff
29+
- receipt / history / plan metadata 的具体 attachment 位置与 wire format 继续 **deferred**
30+
31+
**source 消费规则:**
32+
- source **MUST** 标识验证器来源,供 Validator 和宿主解释 evidence provenance
33+
- 是否基于 source 做差异化处理不在 D scope
34+
35+
**关键设计点:** 消费路径的 normative 重点在"消费语义"(谁必须看、怎么用),不在"存储拓扑"(存哪个字段、什么路径)。避免反向制造新的 runtime 实现承诺。
36+
37+
### D3: protocol.md §7 存储位置收紧
38+
39+
原文:"具体字段与路径待 Validator/Receipt 接口稳定后正式化。"
40+
41+
修改为:明确 normative/deferred 边界。evidence 挂载的消费规则 → normative(见 §6);attachment 的 wire format → deferred。
42+
43+
### D4: design.md 引用修正
44+
45+
原文:"subject identity / verdict shape 见 `protocol.md §7`"
46+
修正:"subject identity 见 `protocol.md §7`;verdict shape 见 `protocol.md §6`"
47+
48+
§7 是 Subject Identity & Review Wire Contract,Verifier 在 §6。
49+
50+
### D5: §6 升格状态标注
51+
52+
参考 B 对 Receipt 的升格模式(protocol.md §7 ExecutionAuthorizationReceipt),在 §6 Verifier 段开头添加升格状态标注:
53+
54+
> **升格状态**`§6` 整体仍为 informative/draft;其中 `### Verifier` 子段从 informative 升格为 **normative**(P1.5-D 升格)。字段约束使用 RFC 2119 表述。消费路径为 normative 声明。evidence attachment wire format 为 deferred。
55+
56+
## Scope 边界
57+
58+
### In-scope
59+
60+
1. protocol.md §6 Verifier 字段 → RFC 2119 升格
61+
2. protocol.md §6 新增消费路径段(verdict + evidence + source 消费规则)
62+
3. protocol.md §7 存储位置 → normative/deferred 边界收紧
63+
4. design.md 引用 §7 → §6 修正
64+
5. tasks.md D 状态标记
65+
66+
### Out-of-scope
67+
68+
- runtime Verifier 实现
69+
- evidence attachment 完整 schema / wire format
70+
- canonical 预算扩展(receipt 字段维持 8 个)
71+
- 测试矩阵(无代码变更)
72+
- §7 Review Wire Contract 升格(仍 informative/draft)
73+
74+
## 验收标准
75+
76+
1. protocol.md §6 Verifier 四字段有明确 RFC 2119 等级(MUST × 3, SHOULD × 1)
77+
2. protocol.md §6 消费路径段存在且包含 verdict/evidence/source 三组规则
78+
3. protocol.md §7 存储位置不再有"待稳定后正式化"的悬空表述,normative/deferred 边界清晰
79+
4. design.md 引用从 §7 修正为 §6
80+
5. tasks.md D 标记完成
81+
6. 无 runtime 代码变更
82+
7. 全量 pytest 通过(确认文档改动不破坏任何测试)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# P1.5-D: Verifier Minimum Normative Slice — 任务
2+
3+
## 任务清单
4+
5+
| # | 任务 | 文件 | 状态 |
6+
|---|------|------|------|
7+
| T1 | §6 Verifier 段添加升格状态标注 | `protocol.md` ||
8+
| T2 | §6 Verifier 字段表格 → RFC 2119 改写 | `protocol.md` ||
9+
| T3 | §6 消费路径注释 → 独立消费路径段 | `protocol.md` ||
10+
| T4 | §6 新增 Verifier 消费路径规则(verdict + evidence + source) | `protocol.md` ||
11+
| T5 | §7 存储位置 → normative/deferred 边界收紧 | `protocol.md` ||
12+
| T6 | design.md 引用 §7 → §6 修正 | `design.md` ||
13+
| T7 | tasks.md D 状态标记完成 | `tasks.md` ||
14+
| T8 | 全量 pytest 确认无回归 |||
15+
16+
## 任务说明
17+
18+
### T1: 升格状态标注
19+
20+
`### Verifier(外部验证器)` 标题后、字段表格前,添加升格 blockquote(与 B 的 Receipt 升格模式一致)。
21+
22+
### T2: 字段表格改写
23+
24+
将现有 4 行表格从"说明"列改为 RFC 2119 语义:
25+
- verdict: MUST + 可消费判定标识约束
26+
- evidence: MUST + 结构化要求
27+
- source: MUST + provenance 语义
28+
- scope: SHOULD + 降级影响
29+
30+
### T3-T4: 消费路径
31+
32+
现有段尾注释是一段文字。改写为独立的"Verifier 消费路径"段,包含 verdict/evidence/source 三组消费规则;scope 保留字段级 SHOULD。
33+
34+
### T5: §7 存储位置收紧
35+
36+
替换"具体字段与路径待 Validator/Receipt 接口稳定后正式化"为 normative/deferred 边界声明。
37+
38+
### T6: 引用修正
39+
40+
design.md `§7``§6`(方案级收敛引用修正)。

0 commit comments

Comments
 (0)