Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8e6c622
w1.1: freeze 5 must-freeze schemas (P8 protocol kernel)
Li-Sanze Jun 6, 2026
1a3581c
w1.2: rewrite protocol.md §2/§6/§8 for P8 post-cutover
Li-Sanze Jun 6, 2026
a45e033
w1.3: define host prompt protocol entry spec + sync task status
Li-Sanze Jun 6, 2026
11c37cb
w1.4+w1.5: plan package sections spec + registry retirement contract
Li-Sanze Jun 6, 2026
5a42526
w1.5b: blueprint interim sync — authorization narrowing + legacy reti…
Li-Sanze Jun 6, 2026
420741d
w1.6-w1.7: protocol check and wave 1 gate
Li-Sanze Jun 6, 2026
ed57992
w2.0: plan doc closure — catalog relocation + CI/prompt audit + W2 ta…
Li-Sanze Jun 7, 2026
0613119
w2.0a: snapshot registry lifecycle before retirement
Li-Sanze Jun 7, 2026
8b9881a
w2.0b: catalog relocation + generator runtime-free
Li-Sanze Jun 7, 2026
74019ef
w2.1: decouple minimal cli inspection from runtime
Li-Sanze Jun 7, 2026
225d67a
w2.2+w2.2b: decouple installer core from runtime + catalog payload re…
Li-Sanze Jun 7, 2026
4c6b953
w2.3: rename canonical_writer → sopify_writer + scope public API
Li-Sanze Jun 8, 2026
d65c87e
w2.3b: detach CI hard gate from runtime smoke
Li-Sanze Jun 8, 2026
ead9b71
w2.3c: cutover host prompt + skill sources from runtime-first to prot…
Li-Sanze Jun 8, 2026
1c5da06
w2.4: migrate StateStore to P8 2-file model (A-lite)
Li-Sanze Jun 8, 2026
81af24b
w2.5: fold clarification/decision into handoff artifacts
Li-Sanze Jun 8, 2026
d1bf424
w2.6: retire registry chain — hard removal of _registry.yaml and plan…
Li-Sanze Jun 8, 2026
a8ac76a
w2.7: reclassify tests — retire runtime mirrors, anchor protocol/writ…
Li-Sanze Jun 9, 2026
395c9e0
w2.8: delete runtime entry/smoke scripts + clean validate.py + fix do…
Li-Sanze Jun 9, 2026
ac5e3b8
w2.9: reclassify protocol-verified hosts — DEEP_VERIFIED → PROTOCOL_V…
Li-Sanze Jun 9, 2026
3578103
w2.10: delete runtime/ directory (46 files / ~15.6K LOC)
Li-Sanze Jun 9, 2026
457c796
w2.11: ProtocolStore — writer finalize API + boundary validation
Li-Sanze Jun 9, 2026
dabfd8a
wave-2-gate: pass verification + close W2 wave
Li-Sanze Jun 9, 2026
95b3880
phase-0: pre-flight cleanup — purge stale state, dead governance chai…
Li-Sanze Jun 10, 2026
2933cd6
w3.1: Qoder PROTOCOL_VERIFIED host adapter — home-scope hybrid
Li-Sanze Jun 10, 2026
a5f6c06
w3.2+w3.3: Qoder proof package — installed payload writer + durable t…
Li-Sanze Jun 10, 2026
3f97d80
w3.4: canonical protocol root fixed to .sopify; configurable root rem…
Li-Sanze Jun 10, 2026
6a8560e
w3.5: docs narrative cutover — protocol-first, user-friendly, post-P8…
Li-Sanze Jun 10, 2026
b177e10
fix: rename missed test fixtures from .sopify-skills to .sopify
Li-Sanze Jun 10, 2026
13ee4b2
w3.6: blueprint sync — post-P8 narrative alignment across all layers
Li-Sanze Jun 10, 2026
13dfdcf
finalize: P8 archived + protocol prose de-ambiguation
Li-Sanze Jun 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,5 @@ if [[ -f "$STATE_FILE" ]]; then
upsert_trailer "$MESSAGE_FILE" "Release-Date" "$RELEASE_DATE"
fi

CHECKPOINT_SCRIPT="$ROOT_DIR/scripts/check-context-checkpoints.py"
if [[ -f "$CHECKPOINT_SCRIPT" ]]; then
python3 "$CHECKPOINT_SCRIPT" commit-msg --root "$ROOT_DIR" --message-file "$MESSAGE_FILE"
fi

trap - EXIT
cleanup
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ trap on_exit EXIT
is_release_relevant_file() {
local path="$1"
case "$path" in
runtime/*|installer/*|skills/*|README.md|README.zh-CN.md|CHANGELOG.md)
sopify_writer/*|sopify_contracts/*|installer/*|skills/*|README.md|README.zh-CN.md|CHANGELOG.md)
return 0
;;
scripts/sopify_runtime.py|scripts/model_compare_runtime.py|scripts/check-bundle-smoke.sh|scripts/release-sync.sh|scripts/release-preflight.sh|scripts/sync-skills.sh|scripts/check-version-consistency.sh)
scripts/release-sync.sh|scripts/release-preflight.sh|scripts/sync-skills.sh|scripts/check-version-consistency.sh)
return 0
;;
*)
Expand Down
40 changes: 24 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Check version consistency
run: bash scripts/check-version-consistency.sh

runtime-tests:
protocol-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand All @@ -33,7 +33,7 @@ jobs:
run: |
tmp="$(mktemp)"
python3 scripts/generate-builtin-catalog.py --output "$tmp" >/dev/null
python3 - runtime/builtin_catalog.generated.json "$tmp" <<'PY'
python3 - skills/catalog/builtin_catalog.generated.json "$tmp" <<'PY'
import difflib
import json
from pathlib import Path
Expand All @@ -53,24 +53,32 @@ jobs:
raise SystemExit(1)
PY

- name: Check context checkpoints
run: python3 scripts/check-context-checkpoints.py repo --root .

- name: Run hard gate tests (contract + smoke + distribution)
- name: Run hard gate tests (protocol + smoke + distribution)
run: |
pip install --quiet pytest
python3 -m pytest tests -m "not implementation_mirror" -v
python3 -m pytest \
tests/protocol/test_convention_compliance.py \
tests/test_check_readme_links.py \
tests/test_distribution.py \
tests/test_golden_snapshots.py \
tests/test_release_hooks.py \
tests/test_sopify_init_smoke.py \
-v

- name: Run protocol smoke — new-plan
run: python3 scripts/sopify_protocol_check.py check --scenario new-plan --fixture tests/fixtures/minimal_plan

- name: Run protocol smoke — continuation
run: python3 scripts/sopify_protocol_check.py check --scenario continuation --fixture tests/fixtures/minimal_plan

- name: Run implementation-mirror tests (advisory)
if: always()
continue-on-error: true
run: python3 -m pytest tests -m "implementation_mirror" -v
- name: Run protocol smoke — continuation (clarification pending)
run: python3 scripts/sopify_protocol_check.py check --scenario continuation --fixture tests/fixtures/clarification_pending

- name: Run runtime smoke check
run: bash scripts/check-bundle-smoke.sh
- name: Run protocol smoke — continuation (decision pending)
run: python3 scripts/sopify_protocol_check.py check --scenario continuation --fixture tests/fixtures/decision_pending

- name: Run protocol smoke — finalize
run: python3 scripts/sopify_protocol_check.py check --scenario finalize --fixture tests/fixtures/minimal_plan

- name: Run install/payload bootstrap smoke
run: python3 scripts/check-install-payload-bundle-smoke.py

- name: Run prompt runtime gate smoke
run: python3 scripts/check-prompt-runtime-gate-smoke.py
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ __pycache__/

.sopify-runtime/

.sopify-skills/state/
.sopify-skills/replay/
.sopify-skills/plan/_registry.yaml
.sopify/state/
.sopify/replay/

evals/skill_eval_report.json

Expand Down
925 changes: 0 additions & 925 deletions .sopify-skills/blueprint/design.md

This file was deleted.

This file was deleted.

98 changes: 0 additions & 98 deletions .sopify-skills/plan/_registry.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions .sopify-skills/sopify.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
## 当前焦点

<!-- sopify:auto:focus:start -->
- 当前活动 plan:暂无。
- history 归档:已可用;最近归档为 `../history/2026-06/20260529_pre_launch_consolidation`。
- 当前活动 plan:无(P8 已归档)。
- P8 Protocol Kernel & Runtime Retirement 已归档至 `../history/2026-06/20260605_p8_protocol_kernel_runtime_retirement`(runtime 删除 + canonical root .sopify + Qoder host proof + 蓝图全量对齐)。
- history 归档:已可用;最近归档为 `../history/2026-06/20260605_p8_protocol_kernel_runtime_retirement`。
<!-- sopify:auto:focus:end -->

## 深入阅读入口
Expand All @@ -27,5 +28,5 @@
- [Sopify 宿主接入规范 (Protocol v0)](./protocol.md)
- [Skill 标准对齐蓝图](./skill-standards-refactor.md)
- [变更历史](../history/index.md)
- 最近归档:`../history/2026-06/20260529_pre_launch_consolidation`
- 最近归档:`../history/2026-06/20260605_p8_protocol_kernel_runtime_retirement`
<!-- sopify:auto:read-next:end -->
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ Sopify 需要明确自身在 AI 编程生态中的定位,避免与宿主(Kir

Sopify 官方在 core 之上提供轻量、可插拔、收敛式的 blueprint-driven workflow 作为默认产品体验。

> **P8 Final Scope(2026-06)**:P8 后"Authorization"的含义已最终收窄。本 ADR 标题"Evidence & Authorization Layer"不改(不做品牌手术)。P8 后 Authorization 不再指 pre-execution side-effect approval(该职责退回宿主原生权限、sandbox、用户确认、工具审批)。Sopify 保留的 authorization 语义为:protocol admission(sopify_writer schema/contract 校验)、receipt validity(证据链完整性)、archive admission(归档准入)。ExecutionAuthorizationReceipt 作为 pre-execution authorization artifact 在 P8 已退场(详见 ADR-017 [RETIRED by P8])。收敛链已确定为 produce → verify → record evidence → settle。

Core 职责:

1. **证据规范**:定义任务/方案/交接/归档事实的标准格式(`.sopify-skills/` 纯文件协议)
2. **授权判定**:Validator 是唯一授权者——判定行动是否可执行、方案是否可归档
3. **收据生成**:fail-closed 授权回执让每次决策可追溯、可审计
1. **证据规范**:定义任务/方案/交接/归档事实的标准格式(`.sopify/` 纯文件协议)
2. **协议准入**:sopify_writer 做结构级校验——判定写入是否符合协议格式、receipt 是否有效、归档是否完整
3. **审计证据**:receipts 让每次决策可追溯、可审计
4. **跨宿主接力**:handoff 机器契约让任务在不同 session/model/host 间精确恢复
5. **知识沉淀**:跨任务可复用的稳定结论沉淀为 blueprint / history

Expand Down Expand Up @@ -57,13 +59,13 @@ Core + Default Workflow 之外的生产/验证/知识增强,归入 **Plugins /

如果以上任一能力被宿主完全替代且无跨宿主可携带性需求,该能力应 sunset。

**Feature intake gate**:每个新特性必须回答——它增强了哪项不可替代能力?是否扩大了 runtime surface?如果只在单宿主场景下有价值,不进 core。
**Feature intake gate**:每个新特性必须回答——它增强了哪项不可替代能力?是否扩大了 protocol surface?如果只在单宿主场景下有价值,不进 core。

## 后果

- Core(durable)只保留证据规范 / 授权判定 / 收据生成 / 合规验证 / 跨宿主接力契约
- Core(durable)只保留证据规范 / 协议准入 / 审计证据 / 合规验证 / 跨宿主接力契约
- Default Workflow 是 Core 之上的官方收敛式工作流,地位高于参考 demo,低于 Core
- 具有独立用户价值的生产/验证/知识能力设计为外插 Plugins / Skills
- CrossReview 是已实现的外插参考范本
- Runtime 是参考实现,服务于 Default Workflow,不是 co-equal product
- Runtime 已在 P8 中退场;protocol kernel(sopify_writer + sopify_contracts + protocol.md)是 post-P8 的真相源
- Core promotion rule:只有影响跨宿主互操作、receipt validity、archive admissibility 的契约才进 Core
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sopify runtime 已膨胀至 ~29K 行 Python / 66 个模块。核心价值(plan

| 层 | 内容 | 体量 | 可替代性 |
|----|------|------|---------|
| **Protocol** | `.sopify-skills/` 目录约定、plan/state/history schema、SKILL.md 编排 | 纯文档 | 不可替代 |
| **Protocol** | `.sopify/` 目录约定、plan/state/history schema、SKILL.md 编排 | 纯文档 | 不可替代 |
| **Validator** | ActionProposal 校验、状态迁移校验、archive check/apply、diagnostics | ~2K 行 | 独立交付 |
| **Runtime** | gate / router / engine / handoff / checkpoint 状态机 | 目标 <20K 行 | 可选增强 / 参考实现 |

Expand All @@ -29,7 +29,7 @@ Sopify runtime 已膨胀至 ~29K 行 Python / 66 个模块。核心价值(plan
## 战略论据

1. **核心价值不在 Python runtime** — plan、状态交接、checkpoint、history 天然是文件协议
2. **Protocol 更抗平台替代** — Runtime 编排易被宿主替代;`.sopify-skills/` 可审计资产格式可被各宿主复用
2. **Protocol 更抗平台替代** — Runtime 编排易被宿主替代;`.sopify/` 可审计资产格式可被各宿主复用
3. **Convention 是多宿主最短路径** — Protocol + SKILL.md + Validator 让新宿主先"会读会写"
4. **复杂 runtime 不解决 LLM 出错** — 把随机错误变成系统性卡顿更不可控

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ADR-017: Action/Effect Boundary

状态: P0 完成,P1.5-B ExecutionAuthorizationReceipt 升格 normative
状态: P0 完成,P1.5-B ExecutionAuthorizationReceipt 升格 normative(P8 RETIRED)
日期: 2026-04-28 (P0),2026-05-06 (P1.5-B receipt normative)

## 背景
Expand Down Expand Up @@ -29,9 +29,11 @@
4. **执行层不理解人话** — 只按结构化字段和文件事实做事
5. **`fallback_router` 是临时兼容出口** — 应单调收缩,不承接新的长期能力

### ExecutionAuthorizationReceipt — *normative*
### ExecutionAuthorizationReceipt — *[RETIRED by P8]*

> **升格状态**:本节从"方向"升格为 **normative**(P1.5-B 升格)。字段语义使用 RFC 2119 表述。
> **P8 退场声明**:本节在 P8 中标记为 [RETIRED by P8]。pre-execution authorization model(runtime gate 在执行前生成 EAR)不再适用;P8 删除 runtime gate 后,不存在稳定的"执行前授权时刻"。post-P8 审计主链改由 `plan/<id>/receipts/*.json` + `history/<id>/receipt.md` 承担(post-execution evidence chain)。W3.6 全量收口时升级为 [RETIRED by P8]。以下为 pre-P8 legacy reference,不作为 post-P8 新宿主接入 contract。

> ~~**升格状态**:本节从"方向"升格为 **normative**(P1.5-B 升格)。字段语义使用 RFC 2119 表述。~~ [RETIRED by P8 — normative 状态已随 runtime gate 退场]

execution_confirm checkpoint 重分类为机器授权事实:

Expand Down Expand Up @@ -79,7 +81,7 @@ Implementation plan 可补充字段,但 MUST NOT 删除或弱化上述字段
## 后续扩展方向

- ✅ `propose_plan` + `write_plan_package` side-effect proof(P1.5-C 完成:authorized_only 策略)
- ✅ `execute_existing_plan` 通过 ExecutionAuthorizationReceipt 授权(P1.5-B 升格 normative)
- ~~✅ `execute_existing_plan` 通过 ExecutionAuthorizationReceipt 授权(P1.5-B 升格 normative)~~ [RETIRED by P8 — pre-execution authorization model retired]
- `fallback_router` 职责单调收缩

## 后果
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Sopify 官方在 core 之上提供一个轻量、可插拔、收敛式的 bluepr
- **证据规范**:定义任务事实、方案事实、交接事实、归档事实的标准格式
- **授权判定**:Validator 是唯一授权者——判断当前上下文下行动是否可执行
- **收据生成**:fail-closed 授权回执让每次决策可追溯、可审计
- **跨宿主接力**:`.sopify-skills/` 纯文件协议让任务中断后在不同宿主/模型间精确恢复
- **跨宿主接力**:`.sopify/` 纯文件协议让任务中断后在不同宿主/模型间精确恢复
- **知识沉淀**:只有跨任务可复用、能改变后续授权或验证基线的稳定结论,才进入长期知识层(blueprint / history)

**外插原则**:谁负责"把事做好"(生产、验证、知识处理),谁外插;谁负责"把结果变成可验证事实"(证据规范、授权判定、收据生成),谁进 Sopify core。
Expand Down
Loading
Loading