Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ is_release_relevant_file() {
runtime/*|installer/*|skills/*|README.md|README.zh-CN.md|CHANGELOG.md)
return 0
;;
scripts/sopify_runtime.py|scripts/model_compare_runtime.py|scripts/check-runtime-smoke.sh|scripts/release-sync.sh|scripts/release-preflight.sh|scripts/sync-skills.sh|scripts/check-version-consistency.sh)
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)
return 0
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: python3 -m pytest tests -m "implementation_mirror" -v

- name: Run runtime smoke check
run: bash scripts/check-runtime-smoke.sh
run: bash scripts/check-bundle-smoke.sh

- name: Run install/payload bootstrap smoke
run: python3 scripts/check-install-payload-bundle-smoke.py
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ evals/skill_eval_report.json
Codex/Skills/
Claude/Skills/
Copilot/Skills/

# Copilot workspace install product (dogfood / local testing).
.github/copilot-instructions.md
6 changes: 3 additions & 3 deletions .sopify-skills/blueprint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
## 当前焦点

<!-- sopify:auto:focus:start -->
- 当前活动 plan:[推广前宿主分发与 Bundle 统一](../plan/20260526_pre_launch_host_and_bundle_unification/)(P0)
- history 归档:已可用;最近归档为 `../history/2026-05/20260522_runtime_slimming_kernel_extraction`。
- 当前活动 plan:暂无
- history 归档:已可用;最近归档为 `../history/2026-05/20260526_pre_launch_host_and_bundle_unification`。
<!-- sopify:auto:focus:end -->

## 深入阅读入口
Expand All @@ -27,5 +27,5 @@
- [Sopify 宿主接入规范 (Protocol v0)](./protocol.md)
- [Skill 标准对齐蓝图](./skill-standards-refactor.md)
- [变更历史](../history/index.md)
- 最近归档:`../history/2026-05/20260522_runtime_slimming_kernel_extraction`
- 最近归档:`../history/2026-05/20260526_pre_launch_host_and_bundle_unification`
<!-- sopify:auto:read-next:end -->
2 changes: 1 addition & 1 deletion .sopify-skills/blueprint/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ P6: 直接切 canonical writer 新栈 + 定义 writer_input 契约
2. 停止维护 deep-capable host(Claude / Codex / Copilot)的宿主专属 legacy glue(bridge / renderer / bundle / smoke),但 kernel 通过协议对所有 deep-capable host 保持可达
3. runtime 退场的真实门槛收敛为:
- 先解耦仍需保留的非 runtime 面:`installer/validate.py`、`installer/bootstrap_workspace.py`、`installer/inspection.py`、`scripts/install_sopify.py`、`scripts/sopify_init.py`
- 再同步删除 `runtime/`、`installer/runtime_bundle.py`、legacy deep scripts 与 runtime-coupled tests
- 再同步删除 `runtime/`、`installer/sopify_bundle.py`、legacy deep scripts 与 runtime-coupled tests
4. `scripts/sopify_status.py` / `scripts/sopify_doctor.py` 不作为独立解耦目标;它们仅通过 `installer/inspection.py` 的 cutover 继续保留


Expand Down
2 changes: 1 addition & 1 deletion .sopify-skills/blueprint/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ P0→P4c 主航道已全部完成。后续执行遵循以下原则:

## 流程与工具项

- [ ] Runtime retirement cutover(`target-state-first` 已于 2026-05-22 拍板):先解耦 `installer/validate.py`、`installer/bootstrap_workspace.py`、`installer/inspection.py`、`scripts/install_sopify.py`、`scripts/sopify_init.py`,再同步删除 `runtime/`、`installer/runtime_bundle.py` 与 legacy deep path
- [ ] Runtime retirement cutover(`target-state-first` 已于 2026-05-22 拍板):先解耦 `installer/validate.py`、`installer/bootstrap_workspace.py`、`installer/inspection.py`、`scripts/install_sopify.py`、`scripts/sopify_init.py`,再同步删除 `runtime/`、`installer/sopify_bundle.py` 与 legacy deep path
- Phase 1 已完成(方案包 `20260522_runtime_slimming_kernel_extraction`):contract 面清理 −6,400 LOC + engine 重构 + 34 退役测试块清理 −1,400 LOC + installer bundle 纯 Python 重写 + legacy workspace marker 退场。runtime/ 从 ~22K LOC 收至 37 文件 / 16,286 LOC
- Phase 2 未启动:installer 5 文件解耦 + runtime/ 全删 + legacy deep path 退场
- [ ] Plan intake checklist(后续新 plan 开包时手工回答以下问题):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plan_id: "20260526_pre_launch_host_and_bundle_unification"
title: "推广前宿主分发与 Bundle 统一"
level: standard
topic_key: pre_launch_host_and_bundle_unification
lifecycle_state: active
lifecycle_state: completed
created_at: "2026-05-26T14:30:00+08:00"
---

Expand Down Expand Up @@ -66,6 +66,7 @@ created_at: "2026-05-26T14:30:00+08:00"

## T1 | 单一事实源建立 + installer source cutover(合并原 T1+T2)


**动作**:

1. ~~从 **Codex** 树移入 `skills/en/` 和 `skills/zh/`~~ — ✅ 已存在,白名单校验通过(6 个 SKILL.md 仅脚本路径替换,其余与 Codex 等价)
Expand All @@ -83,7 +84,7 @@ created_at: "2026-05-26T14:30:00+08:00"
- 渲染脚本 `render-host-skills.py` 输出的 claude/codex header 与 golden snapshot 内容等价
- skill 文件内部不再引用旧宿主目录路径

**状态**:pending
**状态**:done

---

Expand All @@ -103,7 +104,7 @@ created_at: "2026-05-26T14:30:00+08:00"
- `install.sh --target copilot` 走统一主链路
- 渲染产物与 golden snapshot 中 copilot:zh-CN 基线内容等价;copilot:en-US 无旧基线(hash == null),只验证新产物存在、可安装、由 `skills/en/` 渲染且通过 smoke

**状态**:pending
**状态**:done

---

Expand Down Expand Up @@ -137,7 +138,7 @@ created_at: "2026-05-26T14:30:00+08:00"
- `installer/resources/copilot/` 目录已删除
- 全量测试通过

**状态**:pending
**状态**:done

---

Expand All @@ -161,7 +162,7 @@ created_at: "2026-05-26T14:30:00+08:00"
- `runtime_bundle` / `runtime-smoke` 作为文件名和对外接口名不再存在
- CI + 全量测试通过

**状态**:pending
**状态**:done

---

Expand All @@ -176,7 +177,7 @@ created_at: "2026-05-26T14:30:00+08:00"
- 社区用户按指南可独立完成新宿主接入
- 文档中不再引用 `Claude/`、`Codex/`、`Copilot/` 目录

**状态**:pending
**状态**:done

---

Expand All @@ -199,7 +200,7 @@ created_at: "2026-05-26T14:30:00+08:00"
- smoke 脚本全通过
- 全量测试通过

**状态**:pending
**状态**:done

---

Expand Down Expand Up @@ -233,7 +234,7 @@ created_at: "2026-05-26T14:30:00+08:00"
- 旧同步脚本不再引用已删目录
- CI + 全量测试通过

**状态**:pending
**状态**:done

---

Expand Down
1 change: 1 addition & 0 deletions .sopify-skills/history/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## 索引

- `2026-05-27` [`20260526_pre_launch_host_and_bundle_unification`](2026-05/20260526_pre_launch_host_and_bundle_unification/) - standard - 推广前宿主分发与 Bundle 统一: 4 套宿主语言内容→2 套语言源 + 安装时 host 渲染,Copilot 纳入统一 registry,runtime_bundle→sopify_bundle 命名收口,三宿主双语言端到端验证通过(6 条安装路径 + 8 项 golden snapshot 全绿),旧宿主目录删除
- `2026-05-26` [`20260522_runtime_slimming_kernel_extraction`](2026-05/20260522_runtime_slimming_kernel_extraction/) - standard - 任务清单: Runtime Slimming — Orchestration Kernel Extraction
- `2026-05-22` [`20260522_p7_payload_only_onboarding_mainline`](2026-05/20260522_p7_payload_only_onboarding_mainline/) - standard - P7 Payload-Only Onboarding Mainline: 外部仓库一键初始化(sopify_init.py + bootstrap.sh),Copilot 指令分发(managed block + owned file),统一 workspace marker(sopify.json),README/docs/example 文档收口,ANSI Shadow ASCII art logo
- `2026-05-20` [`20260520_p5_contract_surface_shrinkage`](2026-05/20260520_p5_contract_surface_shrinkage/) - standard - P5 Contract Surface Shrinkage: 58 sub-surface 裁定(10 cross-tier / 1 candidate-kernel / 46 deep-only / 1 deleted),Shadow Writer Gap Analysis 结论 B(candidate-kernel 680→210 LOC = StateStore only),Runtime 退场路线写入蓝图(三层分离 + 激进版:无用户零迁移),write_runtime_handoff 死代码删除 8 LOC
Expand Down
8 changes: 4 additions & 4 deletions .sopify-skills/plan/_registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ plans:
updated_at: "2026-05-05T11:12:58+00:00"
- plan_id: "20260526_pre_launch_host_and_bundle_unification"
snapshot:
path: ".sopify-skills/plan/20260526_pre_launch_host_and_bundle_unification"
path: ".sopify-skills/history/2026-05/20260526_pre_launch_host_and_bundle_unification"
title: "推广前宿主分发与 Bundle 统一"
level: "standard"
topic_key: "pre_launch_host_and_bundle_unification"
lifecycle_state: "active"
lifecycle_state: "completed"
created_at: "2026-05-26T14:30:00+08:00"
governance:
priority: "p0"
priority_source: "explicit"
priority_confirmed_at: "2026-05-26T14:30:00+08:00"
status: "active"
note: "推广前必做,当前最高优先级"
status: "completed"
note: "T0-T7 全部完成,2026-05-27 归档"
advice:
suggested_priority: "p0"
suggested_source: "explicit"
Expand Down
56 changes: 6 additions & 50 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,66 +10,22 @@ Format: Summary → Changed → Plan Packages. File-level details live in `git l

### Summary

- Host bundle unification closeout: `runtime_bundle` → `sopify_bundle` rename, plan `20260526_pre_launch_host_and_bundle_unification` finalized and archived.
- Changes across: Docs, Runtime, Scripts, Skills, Tests, Changed.

### Changed

- **Docs**: Refined public documentation (5 files)
- **Runtime**: Updated runtime internals (2 files)
- **Scripts**: Adjusted maintenance scripts (5 files)
- **Scripts**: Adjusted maintenance scripts (5 files) — `check-runtime-smoke` → `check-bundle-smoke` rename
- **Skills**: Synced prompt-layer skills (92 files)
- **Tests**: Updated automated coverage (3 files)
- **Changed**: Updated project files (4 files)

## [2026-05-27.160548] - 2026-05-27

### Summary

- Changes across: Docs, Runtime, Scripts, Skills, Tests, Changed.

### Changed

- **Docs**: Refined public documentation (5 files)
- **Runtime**: Updated runtime internals (2 files)
- **Scripts**: Adjusted maintenance scripts (5 files)
- **Skills**: Synced prompt-layer skills (92 files)
- **Tests**: Updated automated coverage (2 files)
- **Changed**: Updated project files (2 files)

## [2026-05-27.132948] - 2026-05-27

### Summary

- Changes across: Changed.

### Changed

- **Changed**: Updated project files (1 files)

## [2026-05-27.111148] - 2026-05-27

### Summary

- Changes across: Scripts, Tests, Changed.

### Changed

- **Scripts**: Adjusted maintenance scripts (2 files)
- **Tests**: Updated automated coverage (1 files)
- **Changed**: Updated project files (6 files)

## [2026-05-27.094217] - 2026-05-27

### Summary

- Changes across: Scripts, Tests, Changed.

### Changed

- **Scripts**: Adjusted maintenance scripts (2 files)
- **Tests**: Updated automated coverage (4 files)
- **Changed**: Updated project files (10 files)

### Plan Packages

- `20260526_pre_launch_host_and_bundle_unification` (completed → archived)

## [2026-05-26.221112] - 2026-05-26

### Summary
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ Use these commands when you need maintainer-level control over the vendored runt

```bash
# Sync runtime assets into a target workspace (maintainer command)
python3 -c "from installer.runtime_bundle import sync_runtime_bundle; from pathlib import Path; sync_runtime_bundle(Path('.'), Path('/path/to/project'))"
python3 -c "from installer.sopify_bundle import sync_runtime_bundle; from pathlib import Path; sync_runtime_bundle(Path('.'), Path('/path/to/project'))"

# Validate the raw input entry in the target workspace
python3 /path/to/project/.sopify-runtime/scripts/sopify_runtime.py \
--workspace-root /path/to/project "Refactor the database layer"

# Optional: portable smoke checks in the target workspace
python3 -m pytest /path/to/project/.sopify-runtime/tests/test_runtime.py -v
bash /path/to/project/.sopify-runtime/scripts/check-runtime-smoke.sh
bash /path/to/project/.sopify-runtime/scripts/check-bundle-smoke.sh
```

Bundle rules:
Expand Down Expand Up @@ -112,7 +112,7 @@ python3 scripts/sopify_runtime.py "Refactor the database layer"
python3 scripts/runtime_gate.py enter --workspace-root . --request "Refactor the database layer"
python3 scripts/sopify_runtime.py "~go plan Refactor the database layer"
python3 scripts/sopify_runtime.py "~go finalize"
bash scripts/check-runtime-smoke.sh
bash scripts/check-bundle-smoke.sh
```

Documentation and release validation:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ python3 scripts/runtime_gate.py enter \
--request "~go plan 重构数据库层"

# 验证 bundle 完整性
bash scripts/check-runtime-smoke.sh
bash scripts/check-bundle-smoke.sh

# 验证“一次安装 + 项目触发 bootstrap + selected bundle 接管”
python3 scripts/check-install-payload-bundle-smoke.py
Expand Down Expand Up @@ -118,7 +118,7 @@ python3 scripts/sopify_runtime.py "重构数据库层"
python3 scripts/runtime_gate.py enter --workspace-root . --request "重构数据库层"
python3 scripts/sopify_runtime.py "~go plan 重构数据库层"
python3 scripts/sopify_runtime.py "~go finalize"
bash scripts/check-runtime-smoke.sh
bash scripts/check-bundle-smoke.sh
```

文档与发布校验:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,16 @@ Install targets:
- `codex:en-US`
- `claude:zh-CN`
- `claude:en-US`
- `copilot`
- `copilot:zh-CN`
- `copilot:en-US`

The protocol works with any host. Verified runtime integrations today:

| Host | Install target | Availability | Validation coverage | Notes |
|------|----------------|--------------|---------------------|-------|
| `codex` | `codex:zh-CN` / `codex:en-US` | Deep verified | Host install flow, workspace bootstrap, and runtime package smoke are verified | Suitable for daily use |
| `claude` | `claude:zh-CN` / `claude:en-US` | Deep verified | Host install flow, workspace bootstrap, and runtime package smoke are verified | Suitable for daily use |
| `copilot` | Bootstrap via `install.sh` | Workspace ready | Workspace bootstrap, instruction distribution, and workspace marker are verified | Trigger wiring coming next |
| `copilot` | `copilot:zh-CN` / `copilot:en-US` | Workspace ready | Workspace bootstrap, instruction distribution, and workspace marker are verified | Trigger wiring coming next |

Notes:

Expand Down
5 changes: 3 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,16 @@ python3 scripts/install_sopify.py --target claude:zh-CN --workspace /path/to/pro
- `codex:en-US`
- `claude:zh-CN`
- `claude:en-US`
- `copilot`
- `copilot:zh-CN`
- `copilot:en-US`

协议层适用于任何宿主。当前已验证的 runtime 集成:

| 宿主 | 安装 target | 可用性 | 验证范围 | 说明 |
|------|-------------|--------|----------|------|
| `codex` | `codex:zh-CN` / `codex:en-US` | Deep verified | 已验证宿主安装链路、workspace bootstrap,且运行时包已通过 smoke 验证 | 适合日常使用 |
| `claude` | `claude:zh-CN` / `claude:en-US` | Deep verified | 已验证宿主安装链路、workspace bootstrap,且运行时包已通过 smoke 验证 | 适合日常使用 |
| `copilot` | 通过 `install.sh` bootstrap | Workspace ready | 已验证 workspace bootstrap、指令分发和 workspace marker | 触发入口即将推出 |
| `copilot` | `copilot:zh-CN` / `copilot:en-US` | Workspace ready | 已验证 workspace bootstrap、指令分发和 workspace marker | 触发入口即将推出 |

说明:

Expand Down
2 changes: 1 addition & 1 deletion installer/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from installer.hosts.base import HostAdapter, read_sopify_version, HEADER_TEMPLATE_NAME, render_single_file
from installer.models import BootstrapResult, InstallError, InstallPhaseResult
from installer.runtime_bundle import sync_runtime_bundle
from installer.sopify_bundle import sync_runtime_bundle
from installer.validate import _normalize_payload_bundle_version, resolve_payload_bundle_root, validate_payload_install
from canonical_writer import iso_now

Expand Down
4 changes: 2 additions & 2 deletions installer/runtime_bundle.py → installer/sopify_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DEFAULT_BUNDLE_DIRNAME = ".sopify-runtime"

_DIRECTORY_ASSETS = ("runtime", "sopify_contracts", "canonical_writer")
_SCRIPT_ASSETS = ("sopify_runtime.py", "runtime_gate.py", "check-runtime-smoke.sh")
_SCRIPT_ASSETS = ("sopify_runtime.py", "runtime_gate.py", "check-bundle-smoke.sh")
_COPY_IGNORE = shutil.ignore_patterns("__pycache__", "*.pyc")


Expand Down Expand Up @@ -60,7 +60,7 @@ def sync_runtime_bundle(repo_root: Path, workspace_root: Path, *, bundle_dirname
bundle_root / "runtime" / "__init__.py",
bundle_root / "scripts" / "sopify_runtime.py",
bundle_root / "scripts" / "runtime_gate.py",
bundle_root / "scripts" / "check-runtime-smoke.sh",
bundle_root / "scripts" / "check-bundle-smoke.sh",
bundle_root / "tests" / "test_runtime.py",
)
missing = [path for path in required_paths if not path.exists()]
Expand Down
2 changes: 1 addition & 1 deletion installer/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def validate_payload_install(payload_root: Path) -> tuple[Path, ...]:

def run_bundle_smoke_check(bundle_root: Path, *, payload_manifest_path: Path | None = None) -> str:
"""Run the vendored bundle smoke check and return its stdout."""
smoke_script = bundle_root / "scripts" / "check-runtime-smoke.sh"
smoke_script = bundle_root / "scripts" / "check-bundle-smoke.sh"
if not smoke_script.is_file():
raise InstallError(f"Missing bundle smoke script: {smoke_script}")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BUNDLE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

usage() {
cat <<'EOF'
Usage: scripts/check-runtime-smoke.sh
Usage: scripts/check-bundle-smoke.sh

Run a minimal zero-config smoke test against the current Sopify runtime bundle.
This script works both in the repository root and inside a vendored runtime bundle.
Expand Down
2 changes: 1 addition & 1 deletion scripts/release-preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ else
fi
run_step "Run install/payload bootstrap smoke" python3 "$ROOT_DIR/scripts/check-install-payload-bundle-smoke.py"
run_step "Run prompt runtime gate smoke" python3 "$ROOT_DIR/scripts/check-prompt-runtime-gate-smoke.py"
run_step "Run bundle runtime smoke check" bash "$ROOT_DIR/scripts/check-runtime-smoke.sh"
run_step "Run bundle runtime smoke check" bash "$ROOT_DIR/scripts/check-bundle-smoke.sh"

echo "[release-preflight] All checks passed."
Loading
Loading