Skip to content

Commit 376ea67

Browse files
authored
Merge pull request #10 from sopify-ai/feature/context-v1-guard-rails
feat(runtime): freeze v1 guardrail contracts and boundaries
2 parents 55dc40f + 2c6ab2c commit 376ea67

18 files changed

Lines changed: 2667 additions & 18 deletions

.sopify-skills/plan/20260403_plan-a-risk-adaptive-interruption/critical-reference-notes.md

Lines changed: 336 additions & 0 deletions
Large diffs are not rendered by default.

.sopify-skills/plan/20260403_plan-a-risk-adaptive-interruption/tasks.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ plan_status: design_active
8585

8686
### 3. 局部语义分类骨架
8787

88-
- [ ] 3.1 定义 `Deterministic Guard` 的输入、输出与 fail-close 行为
89-
- [ ] 3.2 定义 `Local Context Builder` 的最小上下文块,限制 assistant prose 污染
90-
- [ ] 3.3 定义各 `required_host_action` 对应的 `Action Projection` schema
91-
- [ ] 3.4 定义 `Resolution Planner` 的标准动作集合与禁止副作用
88+
- [x] 3.1 定义 `Deterministic Guard` 的输入、输出与 fail-close 行为
89+
- [x] 3.2 定义 `Local Context Builder` 的最小上下文块,限制 assistant prose 污染
90+
- [x] 3.3 定义各 `required_host_action` 对应的 `Action Projection` schema
91+
- [x] 3.4 定义 `Resolution Planner` 的标准动作集合与禁止副作用
9292

9393
验收标准:
9494

@@ -97,10 +97,10 @@ plan_status: design_active
9797

9898
### 4. 参考实现经验的落地转译
9999

100-
- [ ] 4.1 把“规则优先”明确映射到 Sopify 的 runtime facts
101-
- [ ] 4.2 把“动作语义投影接口”的思想映射为 Sopify 的 action projection contract
102-
- [ ] 4.3 把“独立侧路判定”明确降级为候选机制,而不是 v1 既定实现
103-
- [ ] 4.4 写清 `parser-first v1 / hybrid classifier vNext` 的阶段路线与切换条件
100+
- [x] 4.1 把“规则优先”明确映射到 Sopify 的 runtime facts
101+
- [x] 4.2 把“动作语义投影接口”的思想映射为 Sopify 的 action projection contract
102+
- [x] 4.3 把“独立侧路判定”明确降级为候选机制,而不是 v1 既定实现
103+
- [x] 4.4 写清 `parser-first v1 / hybrid classifier vNext` 的阶段路线与切换条件
104104

105105
验收标准:
106106

@@ -306,7 +306,7 @@ plan_status: design_active
306306

307307
- [ ] 14.1 建立 `feature/context-boundary-core`,承载 `1.x + 2.1/2.2 + 9.x + 10.x + 11.x`
308308
- [ ] 14.2 建立 `feature/public-surface-governance`,承载 `8.x`(允许与 14.1 并行)
309-
- [ ] 14.3 建立 `feature/context-v1-guard-rails`(4a),承载 `3.x + 4.1-4.3 + 17.1-17.3 + 18.x + 19.x(入口/出口定义)`
309+
- [x] 14.3 建立 `feature/context-v1-guard-rails`(4a),承载 `3.x + 4.1-4.3 + 17.1-17.3 + 18.x + 19.x(入口/出口定义)`
310310
- [ ] 14.4 建立 `feature/context-sample-invariant-gate`,承载 `5.x + 6.x`
311311
- [ ] 14.5 建立 `feature/context-v1-scope-finalize`(4b),承载 `7.x + 17.4`
312312
- [ ] 14.6 建立 `feature/context-vnext-gate`,承载 `4.4 + 12.x + 13.x`
@@ -362,9 +362,9 @@ plan_status: design_active
362362

363363
### 17. 可见性级边界锁定
364364

365-
- [ ] 17.1 在 `feature/context-v1-guard-rails` 提交 `runtime/context_v1_scope.py`(常量注册表)
366-
- [ ] 17.2 至少冻结常量:`SUPPORTED_CHECKPOINT_KINDS_V1``ALLOWED_V1_STATE_EFFECTS``FORBIDDEN_V1_SIDE_EFFECTS`
367-
- [ ] 17.3 提交 `tests/test_context_v1_scope.py`,对越界动作做阻断断言
365+
- [x] 17.1 在 `feature/context-v1-guard-rails` 提交 `runtime/context_v1_scope.py`(常量注册表)
366+
- [x] 17.2 至少冻结常量:`SUPPORTED_CHECKPOINT_KINDS_V1``ALLOWED_V1_STATE_EFFECTS``FORBIDDEN_V1_SIDE_EFFECTS`
367+
- [x] 17.3 提交 `tests/test_context_v1_scope.py`,对越界动作做阻断断言
368368
- [ ] 17.4 把 `7.1~7.4` 的名单口径映射到上述注册表与测试,不允许“只写文档不落守卫”
369369

370370
验收标准:

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ This changelog is maintained manually (not auto-generated).
66

77
## [Unreleased]
88

9+
## [2026-04-09.163847] - 2026-04-09
10+
11+
### Runtime
12+
13+
- Updated runtime internals:
14+
- `runtime/action_projection.py`
15+
- `runtime/context_builder.py`
16+
- `runtime/context_v1_scope.py`
17+
- `runtime/deterministic_guard.py`
18+
- `runtime/handoff.py`
19+
- `runtime/resolution_planner.py`
20+
- `runtime/sidecar_classifier_boundary.py`
21+
- `runtime/vnext_phase_boundary.py`
22+
23+
### Tests
24+
25+
- Updated automated coverage:
26+
- `tests/test_context_v1_scope.py`
27+
928
## [2026-04-08.160810] - 2026-04-08
1029

1130
### Runtime

Claude/Skills/CN/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- bootstrap: lang=zh-CN; encoding=UTF-8 -->
2-
<!-- SOPIFY_VERSION: 2026-04-08.160810 -->
2+
<!-- SOPIFY_VERSION: 2026-04-09.163847 -->
33
<!-- ARCHITECTURE: Adaptive Workflow + Layered Rules -->
44

55
# Sopify - 自适应 AI 编程助手

Claude/Skills/EN/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- bootstrap: lang=en-US; encoding=UTF-8 -->
2-
<!-- SOPIFY_VERSION: 2026-04-08.160810 -->
2+
<!-- SOPIFY_VERSION: 2026-04-09.163847 -->
33
<!-- ARCHITECTURE: Adaptive Workflow + Layered Rules -->
44

55
# Sopify - Adaptive AI Programming Assistant

Codex/Skills/CN/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- bootstrap: lang=zh-CN; encoding=UTF-8 -->
2-
<!-- SOPIFY_VERSION: 2026-04-08.160810 -->
2+
<!-- SOPIFY_VERSION: 2026-04-09.163847 -->
33
<!-- ARCHITECTURE: Adaptive Workflow + Layered Rules -->
44

55
# Sopify - 自适应 AI 编程助手

Codex/Skills/EN/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- bootstrap: lang=en-US; encoding=UTF-8 -->
2-
<!-- SOPIFY_VERSION: 2026-04-08.160810 -->
2+
<!-- SOPIFY_VERSION: 2026-04-09.163847 -->
33
<!-- ARCHITECTURE: Adaptive Workflow + Layered Rules -->
44

55
# Sopify - Adaptive AI Programming Assistant

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)
1010
[![Docs](https://img.shields.io/badge/docs-CC%20BY%204.0-green.svg)](./LICENSE-docs)
11-
[![Version](https://img.shields.io/badge/version-2026--04--08.160810-orange.svg)](#version-history)
11+
[![Version](https://img.shields.io/badge/version-2026--04--09.163847-orange.svg)](#version-history)
1212
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
1313

1414
English · [简体中文](./README.zh-CN.md) · [Quick Start](#quick-start) · [Configuration](#configuration) · [Contributors](./CONTRIBUTORS.md)

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[![许可证](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE)
1010
[![文档](https://img.shields.io/badge/docs-CC%20BY%204.0-green.svg)](./LICENSE-docs)
11-
[![版本](https://img.shields.io/badge/version-2026--04--08.160810-orange.svg)](#版本历史)
11+
[![版本](https://img.shields.io/badge/version-2026--04--09.163847-orange.svg)](#版本历史)
1212
[![欢迎PR](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING_CN.md)
1313

1414
[English](./README.md) · 简体中文 · [快速开始](#快速开始) · [配置说明](#配置说明) · [贡献者](./CONTRIBUTORS.md)

0 commit comments

Comments
 (0)