将角色与 Skill 从 .claude 迁入 .agent,移除 Claude CLI 运行时并接入固定 Opus 角色 profile、完整 schema、预算 deadline、raw 与回执证据链。 同步拆分 Skill 职责、复利 lesson、Gate 回放、Dashboard 人审入口、数据库登记和机械门禁;候选设计正文不包含在本提交中。
55 lines
3.1 KiB
Markdown
55 lines
3.1 KiB
Markdown
---
|
||
name: refresh-runtime-probe
|
||
description: 通过 execute-role-task 用当前 writer 提示词、结构和档案实跑一次极小合成角色任务,刷新运行探针记录与自哈希并把完整配置写到新文件。角色合同或运行时、模型策略版本变化导致执行门失败时使用;不就地覆盖原配置,不把离线预览伪装成成功证明。
|
||
disable-model-invocation: true
|
||
---
|
||
|
||
# 刷新角色运行探针
|
||
|
||
正文回放执行门要求 `runtimeProbe.executionProfileSha256` 等于当前 writer profile 身份,并同时绑定运行时版本、模型策略版本、prompt/schema/input/输出和调用回执。任一合同变化都会使旧探针失效;本 Skill 是重新获得能力证明的唯一入口。
|
||
|
||
## 输入
|
||
|
||
只读 `--config` 指定的 base 配置,只消费 `executionProfiles.writer`。探针输入是固定、极小、全合成的 `WriterCreativeInput`,不读取样本、oracle、真实正文或 raw。
|
||
|
||
真实刷新经 `muse_role.run_role` 调用当前 writer 角色;profile 重建复用 `replay-writer-gate.profile_from_mapping`,探针自哈希复用 `adjudicate-quality-gate.canonical_sha256`。
|
||
|
||
```bash
|
||
.venv/bin/python .agent/skills/refresh-runtime-probe/scripts/refresh_runtime_probe.py \
|
||
--config .agent/skills/replay-writer-gate/configs/writer-gate-a-deep-space-v1.json \
|
||
--output /tmp/writer-gate-a.probe-preview.json \
|
||
--dry-run
|
||
```
|
||
|
||
`--dry-run` 只验证构建、校验、重签和写文件链,输出探针状态固定为 `dry_run`,执行门拒绝该状态。真实刷新去掉 `--dry-run`,成功状态才是 `successful`。
|
||
|
||
## 输出
|
||
|
||
新 `runtime-probe-v2` 绑定:
|
||
|
||
- `runtimeAdapter` / `runtimeAdapterVersion` / `modelPolicyVersion`
|
||
- writer 的角色、profile 版本、模型策略别名、冻结完整模型 ID 和 `executionProfileSha256`
|
||
- prompt/schema 的 ID 与哈希
|
||
- 固定探针 `inputSha256`
|
||
- requested 策略别名、actual 模型与 `modelMatch`
|
||
- `executionReceiptSha256`、`structuredOutputSha256`、正常终止和可信成本
|
||
- 记录自身的 `receiptSha256`
|
||
|
||
工具只替换深拷贝中的 `executionAuthorization.runtimeProbe`,`budget`、`rawRetention` 和 `profileSha256` 保持原样;完整配置写到 `--output` 新文件,禁止原地覆盖。
|
||
|
||
## 红线
|
||
|
||
- 真实探针必须通过 writer schema、profile/prompt/schema/input/output 哈希、模型策略、deadline 和单次预算校验。
|
||
- `actualModelId` 必须符合当前 profile 的模型策略;固定 Opus 策略必须命中冻结完整模型 ID,不能降级或换供应商。
|
||
- dry-run、固定模型不可用、内容链耗尽、策略外模型、非法输出、超预算或回执不可信均不能产生 `successful`。
|
||
- 审计摘要不输出 prompt、response、raw 路径或供应商原始响应。
|
||
- 探针失配时不得手改哈希绕门。
|
||
|
||
## 数据边界
|
||
|
||
不写作品、候选或质量业务表。真实角色调用的完整模型证据由 `record-run-evidence` 接管;Git 配置只保存安全探针摘要。
|
||
|
||
## 复利合同
|
||
|
||
- **模式 C(平台底座)**:`lifecycle=platform`,D8 不适用;不登记创作经验 `example_lesson`。
|