Skip to content

Commit ead9b71

Browse files
committed
w2.3c: cutover host prompt + skill sources from runtime-first to protocol-first
Replace runtime gate / sopify_runtime / go_plan_runtime references in tracked source templates (zh + en) with protocol-first entry language: request admission, 4-step entry order, sopify_writer write boundary. - Header templates: 3 runtime-first notes → protocol-first (zh + en) - Design rules: runtime helper boundary section → protocol entry boundary - Analyze/Design/Develop/KB skill files: remove runtime routing refs - Golden snapshots regenerated for updated managed block - tasks.md: sopify_protocol_check scoped as CI/preflight, not host prompt
1 parent d65c87e commit ead9b71

14 files changed

Lines changed: 37 additions & 53 deletions

File tree

.sopify-skills/plan/20260605_p8_protocol_kernel_runtime_retirement/plan.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ depends_on: [P7 (payload_only_onboarding_mainline), P6 (writer_cutover), P5 (con
1313
## Plan Snapshot
1414

1515
- **Goal**: 把 AI 开发过程中的方案、决策、交接、执行/验证证据收敛为可追溯审计资产;真相源从 runtime 切到 protocol.md + sopify_writer,并用 Qoder 证明这些资产可跨宿主接续
16-
- **Status**: W1 完成 / W2 进行中(W2.0a-W2.3b done,W2.3c next)
17-
- **Next**: W2.3cHost Prompt / Copilot Instructions Cutover
18-
- **Task**: W2.3c 清理 copilot-instructions runtime-first 措辞,然后串行 W2.4 → ...
16+
- **Status**: W1 完成 / W2 进行中(W2.0a-W2.3c done,W2.4 next)
17+
- **Next**: W2.4Migrate StateStore to 2-File Model
18+
- **Task**: W2.4 把 StateStore 迁到 active_plan + current_handoff 2 文件模型,然后串行 W2.5 → ...
1919

2020
## Context / Why
2121

.sopify-skills/plan/20260605_p8_protocol_kernel_runtime_retirement/tasks.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,13 @@ created: 2026-06-05
254254

255255
### W2.3c Host Prompt / Copilot Instructions Cutover
256256

257-
- [ ] Depends: W2.3b
258-
- [ ] Input: `.github/copilot-instructions.md`
259-
- [ ] Output: 清理 runtime-first 措辞(runtime gate / sopify_runtime 引用)
260-
- [ ] Output: 删除不存在的 `go_plan_runtime.py` 引用
261-
- [ ] Output: 替换为 protocol-first 入口(protocol.md + sopify_protocol_check + sopify_writer)
262-
- [ ] Verify: `rg "runtime_gate|sopify_runtime|go_plan_runtime" .github/copilot-instructions.md` returns no matches
263-
- [ ] Verify: copilot-instructions.md 不再引用 runtime-first 入口
257+
- [x] Depends: W2.3b
258+
- [x] Input: `.github/copilot-instructions.md`
259+
- [x] Output: 清理 runtime-first 措辞(runtime gate / sopify_runtime 引用)
260+
- [x] Output: 删除不存在的 `go_plan_runtime.py` 引用
261+
- [x] Output: 替换为 protocol-first 入口(protocol.md + sopify_writer);sopify_protocol_check 是 CI/preflight 验证项(W2.3b 已接入),不进入宿主 prompt
262+
- [x] Verify: `rg "runtime_gate|sopify_runtime|go_plan_runtime" .github/copilot-instructions.md` returns no matches
263+
- [x] Verify: copilot-instructions.md 不再引用 runtime-first 入口
264264

265265
### W2.4 Migrate StateStore to 2-File Model
266266

skills/en/header.md.template

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,11 @@ Complex Task (full 3 phases):
128128
| `~go plan` | Plan only, no execution |
129129
| `~go finalize` | Close out the current metadata-managed plan |
130130

131-
Note: Before every Sopify turn, the host must execute the runtime gate and validate its JSON contract. Continue into normal stages only when the gate passes. See `.sopify-skills/blueprint/protocol.md §8.1` for the full gate entry protocol, `allowed_response_mode` values, and ActionProposal capability.
131+
Note: On each Sopify turn, the host first classifies the user request (consult / quick_fix / new_plan / continue_plan / finalize). Only managed plan / continuation / finalize enter the 4-step protocol entry; consult / quick_fix do not auto-resume active_plan by default. See `.sopify-skills/blueprint/protocol.md §8`.
132132

133-
Note: After runtime execution, the host must consume `.sopify-skills/state/current_handoff.json` structured fields to decide the next step. Respect any pending checkpoint before continuing. See `.sopify-skills/blueprint/protocol.md §8.2` for the full handoff protocol and `required_host_action` values.
133+
Note: The 4-step entry order for managed plan / continuation / finalize is `state/active_plan.json` → `plan/<id>/plan.md` → `state/current_handoff.json` → `plan/<id>/receipts/`. Read plan.md first for semantic truth, then handoff as a resumption hint; handoff is not a second truth source. Respect any pending checkpoint before continuing.
134134

135-
Note: The host must not self-route before the gate, bypass checkpoint constraints, or write machine truth directly. Routing and state management are owned by the runtime. See `.sopify-skills/blueprint/protocol.md §8.3` for boundaries.
136-
137-
**Host Integration Contract:** See `.sopify-skills/blueprint/protocol.md §8` for the full host runtime integration protocol, including gate entry, handoff consumption, checkpoint handling, runtime helper index, and state file index.
135+
Note: The host must not bypass checkpoint constraints or write machine truth directly. Protocol state writes (active_plan / current_handoff / receipts) go through `sopify_writer`. See `.sopify-skills/blueprint/protocol.md §8`: Host Protocol Entry Contract.
138136

139137
---
140138

@@ -361,7 +359,7 @@ Next: Please verify the functionality
361359
~go finalize # Explicitly close out the current metadata-managed plan
362360
```
363361

364-
**Runtime helpers and state files:** See `.sopify-skills/blueprint/protocol.md §8.4–8.5` for the full runtime helper index and state file index.
362+
**Protocol state files:** See `.sopify-skills/blueprint/protocol.md §8`.
365363

366364
**Configuration File:** `sopify.config.yaml` (project root)
367365

skills/en/skills/sopify/analyze/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ The script returns JSON with total score, threshold result, and missing dimensio
4949
## Boundaries
5050

5151
- This skill does not generate a plan package directly; hand off to `design`.
52-
- This skill does not execute code changes directly; hand off to `develop` or runtime routing.
52+
- This skill does not execute code changes directly; hand off to `develop`.

skills/en/skills/sopify/design/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ The script returns JSON with the suggested level and explicit reasons.
4444
## Boundaries
4545

4646
- This skill does not execute code changes directly; hand off to `develop`.
47-
- This skill does not replace runtime routing; it defines the plan structure and task contract only.
47+
- This skill does not handle routing or protocol state writes; it defines the plan structure and task contract only.

skills/en/skills/sopify/design/references/design-rules.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,9 @@ Task markers:
7171
- `~go plan`: stop after rendering the plan summary.
7272
- If the user gives plan feedback, stay in this phase, update the files, and render again.
7373

74-
## Runtime helper boundaries
74+
## Protocol entry boundary
7575

76-
When the repo contains `scripts/sopify_runtime.py` and the input is the raw request:
77-
78-
1. Prefer the default runtime entry; do not rewrite it manually into `~go plan`.
79-
2. When the intent is explicitly `~go plan`, prefer `scripts/go_plan_runtime.py`.
80-
3. `go_plan_runtime.py` is plan-only and not a generic default entry.
81-
82-
Generate plan files manually only when the runtime helpers are absent.
76+
Plan structure and task splitting are owned by this skill; protocol state writes (active_plan / current_handoff / receipts) go through `sopify_writer`, not this skill directly.
8377

8478
## Naming rules
8579

skills/en/skills/sopify/develop/references/develop-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Execution constraints:
174174
- Execution failure or `inconclusive` verdict does not block the main flow.
175175
- `concerns` / `needs_human_triage` are shown to the user and await their decision; do not auto-write checkpoints or auto-modify code.
176176
- If prerequisites are not met (e.g. CLI not installed), skip and log the reason without blocking.
177-
- Note: Phase 4a stays in Convention mode; this does not introduce `bridge.py`, `pipeline_hooks`, or a runtime lifecycle hook.
177+
- Note: Phase 4a stays in Convention mode; this does not introduce `bridge.py` or `pipeline_hooks`.
178178

179179
## Step 4: Sync the knowledge base
180180

skills/zh/header.md.template

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,11 @@ Next: {下一步提示}
128128
| `~go plan` | 只规划不执行 |
129129
| `~go finalize` | 对当前 metadata-managed plan 执行收口归档 |
130130

131-
说明:每次进入新的 Sopify 回合前,宿主必须先执行 runtime gate 并消费其 JSON contract;仅当 gate 通过时才可进入后续阶段。详见 `.sopify-skills/blueprint/protocol.md §8.1`:gate 入口协议、`allowed_response_mode` 值域、ActionProposal capability
131+
说明:每次进入 Sopify 回合时,宿主先判断用户请求意图(consult / quick_fix / new_plan / continue_plan / finalize)。仅 managed plan / continuation / finalize 进入 4 步协议入口;consult / quick_fix 默认不自动接续 active_plan。详见 `.sopify-skills/blueprint/protocol.md §8`
132132

133-
说明:runtime 执行后,宿主必须优先消费 `.sopify-skills/state/current_handoff.json` 结构化字段决定下一步;有未完成 checkpoint 时必须先响应 checkpoint 再继续。详见 `.sopify-skills/blueprint/protocol.md §8.2`:handoff 消费协议与 `required_host_action` 值域
133+
说明:managed plan / continuation / finalize 的 4 步入口顺序为 `state/active_plan.json` → `plan/<id>/plan.md` → `state/current_handoff.json` → `plan/<id>/receipts/`。先读 plan.md 建立语义真相,再读 handoff 作为恢复提示;handoff 不是第二真相源。有未完成 checkpoint 时必须先响应再继续
134134

135-
说明:宿主不得在 gate 前自行路由、绕过 checkpoint 约束、或直接写入 machine truth。路由与状态管理归 runtime 所有。详见 `.sopify-skills/blueprint/protocol.md §8.3`:宿主行为边界。
136-
137-
**宿主接入约定:** 详见 `.sopify-skills/blueprint/protocol.md §8`:完整 gate 入口协议、handoff 消费规则、checkpoint 处理、runtime helper 索引与 state 文件索引。
135+
说明:宿主不得绕过 checkpoint 约束或直接写入 machine truth。协议状态写入(active_plan / current_handoff / receipts)统一走 `sopify_writer`。详见 `.sopify-skills/blueprint/protocol.md §8`:Host Protocol Entry Contract。
138136

139137
---
140138

@@ -361,7 +359,7 @@ Next: 请验证功能
361359
~go finalize # 显式收口当前 metadata-managed plan
362360
```
363361

364-
**Runtime helper 与状态文件索引:** 详见 `.sopify-skills/blueprint/protocol.md §8.4–8.5`。
362+
**协议状态文件索引:** 详见 `.sopify-skills/blueprint/protocol.md §8`。
365363

366364
**配置文件:** `sopify.config.yaml` (项目根目录)
367365

skills/zh/skills/sopify/analyze/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ python3 skills/zh/skills/sopify/analyze/scripts/score_requirement.py \
4949
## 边界
5050

5151
- 不在本技能直接生成方案包(交给 `design`)。
52-
- 不在本技能直接执行代码修改(交给 `develop` 或 runtime 路由)。
52+
- 不在本技能直接执行代码修改(交给 `develop`)。

skills/zh/skills/sopify/design/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ python3 skills/zh/skills/sopify/design/scripts/select_plan_level.py \
4444
## 边界
4545

4646
- 不直接执行代码任务(交给 `develop`)。
47-
- 不替代 runtime 的路由决策,仅提供方案结构与任务拆分契约。
47+
- 不负责路由或协议状态写入,仅提供方案结构与任务拆分契约。

0 commit comments

Comments
 (0)