Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
26 changes: 26 additions & 0 deletions changelogs/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,32 @@ TaskLifecycle 规范能力吸纳、源码操作状态恢复及本次入口/CP/

修复和边界见 [v1.20.5候选说明](releases/v1.20.5.md)。当前仅准备本地候选,不表示已发布或最终资格通过。下方既有历史条目保留,不批量移入新版本。

## Grok Bot 宿主驱动(grok-bot)

- 会话隔离:Grok Bot 多会话共用连接器与 `grok-bot-session` 时会互相覆盖同一项目的 lifecycle-state。现驱动 `turn-begin`/`observe-tool` 支持 `--session-id`,连接器每次调用可携带 `hostSession`(校验格式与 contextBinding 归属,逐调用切换会话);仅对 grok-bot 驱动宿主,lifecycle/恢复/准入/路由状态按 `.memory/hooks/<project>/.sessions/<id>/` 分区,其他宿主不变。新增 `hooks/_runtime/host-session-partition.cjs` 与双会话交错/任务恢复不越界测试。
- 新增 `grok-bot` hostVariant(`grok-bot/driver-synthesized-local-stdio`,UNVERIFIED、非默认):`host-adapter-identity.cjs` 注册变体/别名,`DEVCODEX_AGENT=grok-bot` 归一为 `grok` agent,不再落入 `unknown-agent`。
- `lifecycle-host-adapters.cjs grok-bot` 复用 Grok 事件映射,事件与输出均标记 `devcodexEventProvenance=driver-synthesized`,不冒充原生宿主事件。
- 新增 `devcodex grok-bot turn-begin|observe-tool|run`(`scripts/lib/grok-bot-driver.js`),供无原生生命周期 Hook 的 Grok Bot 合成 SessionStart/UserPromptSubmit 并为每次 MCP 调用补发 Pre/PostToolUse,打通 profile_context_plan → skill_route → memory_task_admit_v2。
- `observe-tool` 新增 `--args-file`、`--response-file`(自动剥离 Grok Bot 不可信数据围栏并还原 MCP CallToolResult 形状)并强制 `--project-dir`;每次 MCP 调用前后各一条命令。
- 入口检查感知 grok-bot:`profile_compose_entry_check` 的 PC5 在 `DEVCODEX_AGENT=grok-bot` 时如实报告 Grok Bot 驱动档(`WARN`,Partial 类,不可判 Full);PC6 读取项目 Git 分支与未提交改动数(有改动为 `WARN`);PC4 读取 Profile `config.mode`,dev 模式在调用方提供 `entry.specRadar` 时判 `PASS`。其他宿主无证据时仍为 `UNVERIFIED`。
- `memory_task_admit_v2` 回执新增 `ingressWarnings`:调用方传入的 ingressRef 无效而回退到服务端入口投影时不再静默。
- `observe-tool --tool` 仅为裸 DevCodex 工具名补命名空间,原生工具名(Write/Edit/Bash)原样透传。
- Grok 插件 Skill 增加「Grok Bot (no native hooks)」小节与 HostParity 驱动档行。
- 新增 `scripts/grok-bot-runtime.sh update|restart|status`:Grok Bot 连接器与驱动固定运行在独立干净副本(默认 `/workspace/devcodex-runtime`),只做 fast-forward 更新,并按副本路径重启 profile/memory 服务。
- 新增来源级别 `driver-synthesized-host-event`:驱动合成事件不再记为原生 `trusted-host-event`;仅 `grok-bot/driver-synthesized-local-stdio` 变体可获得等同的入口授权(语义决策、准入、恢复判定),其他宿主不变,伪造到其他变体会被校验拒绝。
- 新增 `memory_turn_closeout_v1`:一次调用完成 S05——可选新建报告(与 operational 写租约同等授权校验,仅限 `reports/` 下新文件)、会话分配/复用、📨 对话行与状态行更新、SUMMARY 追加。
- `memory_session_write` 新增 `turn`(自动编号写入 📨 表格行)与 `sessionStatus`(更新「状态」行,不再停留在「已分配,待补充内容」);自由 Markdown 紧跟表格时自动空行分隔,不再拼进表格。`content` 改为可选(至少提供 content/turn/sessionStatus/artifacts 之一)。
- 入口检查表 PC 标签与内容对齐(PC0 版本与运行、PC2 会话、PC3 执行准备、PC5 宿主、PC6 工作区、PC7 续接、PC8 流程与方案;英文同步),模板 `precheck-status.prompt.md` 同步;`profile_compose_entry_check` 未提供 `languageDecision` 时按用户提示语言渲染(中文提示 → 中文)。
- `devcodex grok-bot turn-begin` 输出 `profileFreshness` 与 `warnings`:Profile current-truth `gitHead` 与项目 HEAD 不一致(`PROFILE_TRUTH_DRIFT`)或 Profile 更新后已有 ≥20 次提交(`PROFILE_POSSIBLY_STALE`)时告警。
- Grok 插件 Skill 的 Grok Bot 小节补充:S04 在该路径不可强制、Profile 新鲜度告警、`memory_turn_closeout_v1` 收尾。
- 任务目录被删除后遗留的 TaskRecoveryBinding 不再污染后续准入:PreToolUse 重放前清除孤立绑定(`lastResumeIngressRehydrate.reasonCode=task-root-missing`),`memory_task_admit_v2` 的 bounded-resume 回退忽略孤立绑定,省略 `ingressRef` 的准入恢复正常。
- Codex CLI Skill 路由能力由 `PASS` 降为 `UNVERIFIED`(`defaultEligible=false`):`task-recovery-store-v5.cjs` 等运行时契约文件变更后,旧 S15 证据的 `runtimeContractDigest`/`hostAdapterDigest` 已过期;在 codex-cli 0.155.1 上用 `probe-skill-route-s15-host.js --host codex`(隔离与 production 模式)重放均因宿主恢复指令要求提交后立即 load_stage 而无法完成条件重规划,未取得可提升的新鲜证据。旧证据文件保留作历史,待真实宿主重放通过后用 `refresh-host-skill-route-capability.js` 重新提升。
- `memory_turn_closeout_v1` 新增 `terminal`:用本轮真实数据(ECR 复审项、完成项)在 `<taskRoot>/evidence/closeout/` 生成 ECR 与完成清单,引用同一调用写入的报告与会话记忆摘要,读取 owner CAS 后执行受围栏的 `memory_task_terminal_v1`;`completed` 仍要求已验证 CP1。补齐此前 terminal 四类证据缺少生产者的缺口。
- 驱动宿主写入 `DEVCODEX_HOST_VARIANT`,turn-begin 的 SkillRouteBootstrap 报告 `grok-bot/driver-synthesized-local-stdio`。
- `devcodex profile init` 对 DevCodex 源码仓库自身生成 ProfileCurrentTruthV1 与 currentTruthRef:仅取 package.json、本地 git/候选身份、CI 矩阵与公开 GitHub Release/workflow 回执;证据缺失保持 UNVERIFIED,由未改动的 ProfileCurrentTruthGate 拒绝。
- 使用前提:在父级工作区(如 `/workspace`)执行 `devcodex init`,不要在仓库内初始化;各项目再执行 `devcodex profile init`。
- 限制:事件由驱动合成,PreToolUse 仅观测不强制拦截;回归见 `npm run test:grok-bot-host`。

## 全项目审查问题修复

- MCP supervisor 固定客户端已协商的 tools/prompts 契约;worker 崩溃后先复核候选,schema 漂移返回明确的重启错误。外层 stdin 使用共享有界 JSONL reader,超大帧拒绝后仍能处理合法请求。
Expand Down
2 changes: 1 addition & 1 deletion content/duplication-inventory.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": "ControlContentDuplicationInventoryV1",
"sourceBundleDigest": "dbb6e63c39ced5100c50a8deddd47427a170bb59594b249ecc2afb3f661f2466",
"sourceBundleDigest": "034cda1c943f913bfcb24cc58203d4256e35e0d0e797193206d3cfde6f2bb785",
"thresholds": {
"minParagraphChars": 100,
"sectionThreshold": 0.94,
Expand Down
14 changes: 7 additions & 7 deletions content/prompts/precheck-status.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ applyTo: "**"

| 检查项 | 状态 | 结论(人话;禁止进度缩写) |
|----|----|----------------------------|
| PC0 中断处理 | `PASS` | 版本:已安装 package version · 活动 runtime generation · 当前配置 runtime generation · 是否需要重启 · 可选源码候选 `{packageVersion, shortHead, dirty}` · alignment |
| PC0 版本与运行 | `PASS` | 版本:已安装 package version · 活动 runtime generation · 当前配置 runtime generation · 是否需要重启 · 可选源码候选 `{packageVersion, shortHead, dirty}` · alignment |
| PC1 当前意图 | `PASS` | 意图:语义初判 → 项目现实扩展后的最终路由/工作流 |
| PC2 项目绑定 | `PASS` | 会话:轮次/Token · 待跟进 |
| PC3 确认边界 | `PASS` | 执行准备:唯一项目 · 连续性 · 产物落点(禁止「写报告 02」式施工日志) |
| PC2 会话 | `PASS` | 会话:轮次/Token · 待跟进 |
| PC3 执行准备 | `PASS` | 执行准备:唯一项目 · 连续性 · 产物落点(禁止「写报告 02」式施工日志) |
| PC4 规范雷达 | `N/A` | 规范雷达:dev 完整;非 dev=`N/A` + skipReason |
| PC5 本轮范围 | `UNVERIFIED` | 宿主:名称 + Full/Partial · 部署/同步证据(legacy 诊断可覆盖 `.github/`、`.claude/`、根 `AGENTS.md`、`.agents/`、`.codex/`;GlobalOnly 以 doctor/receipt 为准) |
| PC6 Dirty 边界 | `PASS` | 工作区:git dirty 范围 · 任务目录 |
| PC7 上下文 | `PASS` | 续接:新会话/resume 有界检测 |
| PC8 风险等级 | `PASS` | 流程与方案:初判/二次判断的 ceremonyTier、designDepth 及差异原因 |
| PC5 宿主 | `UNVERIFIED` | 宿主:名称 + Full/Partial · 部署/同步证据(legacy 诊断可覆盖 `.github/`、`.claude/`、根 `AGENTS.md`、`.agents/`、`.codex/`;GlobalOnly 以 doctor/receipt 为准) |
| PC6 工作区 | `PASS` | 工作区:git dirty 范围 · 任务目录 |
| PC7 续接 | `PASS` | 续接:新会话/resume 有界检测 |
| PC8 流程与方案 | `PASS` | 流程与方案:初判/二次判断的 ceremonyTier、designDepth 及差异原因 |
| PC9 验证 | `PASS` | 验证计划:assuranceLevel · targeted/affected/full 数量 · CI/package/install/release · 预计时长 |
| PC10 下一步 | `PASS` | 后续动作:下一阶段 · 是否自动继续 · 用户当前动作 · 如何修正判断 |

Expand Down
78 changes: 71 additions & 7 deletions content/skills/portfolio.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"skillsPattern": "content/skills/*/SKILL.md",
"optionalSidecar": "content/skills/*/devcodex.skill.json",
"registry": "plugin.json",
"sourceDigest": "67c010bb3feae21da186da62f59250aee200c90aa17ab34b36690759f40810eb",
"sourceDigest": "551b528e53b10b866a48cc8cb3f4b858a85de28930fb88f88ecfc03de34b760c",
"sidecarDigest": "774105d7947b340d15d17115fcb8e37b62ae545cf553f06126d529184fd74872",
"pluginDigest": "16cf44508be1000903d8d9f5ebf7b1a97a32a3806646dd4af2f2f1aed4a68e7c",
"publicTaxonomy": "content/skills/public-taxonomy.json",
"publicTaxonomyDigest": "7f6ee8c30f5484b8881e27099af72c69625b73a7cf3b53fe51c8c0c147d4f124",
"portfolioEvidence": "content/skills/portfolio-evidence.json",
"portfolioEvidenceDigest": "cfd709b1248855c06c56373d1bcfe4798acefd7f1e0c11555b26cfd8caa1e8a6",
"consumerInventoryFileCount": 731,
"consumerInventoryDigest": "54a64aa98ede8816cdccee8a821adf8a75bfd30921b90deb1b631f8a7d260508",
"consumerProjectionDigest": "abdd741feaa9bda23d8a7b02944ed8fc7baa3d966b60d8f649e20e15f21175c8",
"portfolioInputDigest": "5ba18148cfefc6a2e95544b4a20ea6650d747d905817288d03207759b6a1a94c"
"consumerInventoryFileCount": 735,
"consumerInventoryDigest": "c2f71f2924d163753b5dab8146ddefb15d1d343d2ff8201957fe4e5aba513231",
"consumerProjectionDigest": "2b09ec9588ad0e960884aaf0cf16520f87e8844840f281d36d0d1d53ce747fd9",
"portfolioInputDigest": "07007518e994791b588a490b63403b8b1bd46c99857ca3c37d55a8b78973e184"
},
"ordering": "skills.id asc; graph edges from/to asc",
"summary": {
Expand Down Expand Up @@ -9378,6 +9378,10 @@
"path": "scripts/lib/validate-rework-trust-controls.js",
"role": "current"
},
{
"path": "scripts/test-grok-bot-host.js",
"role": "current"
},
{
"path": "scripts/test-host-parity-scorecard.js",
"role": "current"
Expand All @@ -9400,6 +9404,7 @@
}
],
"validationProfile": [
"scripts/test-grok-bot-host.js",
"scripts/test-host-parity-scorecard.js",
"scripts/test-repair-prevention-assessment.js",
"scripts/test-requirement-parallel-orchestration.js",
Expand Down Expand Up @@ -9452,6 +9457,7 @@
],
"evolvableUnitRef": "skill:fix-default",
"probeSuiteRefs": [
"scripts/test-grok-bot-host.js",
"scripts/test-host-parity-scorecard.js",
"scripts/test-repair-prevention-assessment.js",
"scripts/test-requirement-parallel-orchestration.js",
Expand Down Expand Up @@ -11125,6 +11131,10 @@
"path": "scripts/lib/global-host-config.js",
"role": "current"
},
{
"path": "scripts/lib/grok-bot-driver.js",
"role": "current"
},
{
"path": "scripts/lib/host-capability-routing.js",
"role": "current"
Expand Down Expand Up @@ -11317,6 +11327,10 @@
"path": "scripts/test-governance-intake.js",
"role": "current"
},
{
"path": "scripts/test-grok-bot-host.js",
"role": "current"
},
{
"path": "scripts/test-hooks-ingress-continuity.js",
"role": "current"
Expand Down Expand Up @@ -11479,6 +11493,7 @@
"scripts/test-feature-inventory-evidence.js",
"scripts/test-global-skill-runtime-root.js",
"scripts/test-governance-intake.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-ingress-continuity.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-adapters.js",
Expand Down Expand Up @@ -11597,6 +11612,7 @@
"scripts/test-feature-inventory-evidence.js",
"scripts/test-global-skill-runtime-root.js",
"scripts/test-governance-intake.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-ingress-continuity.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-adapters.js",
Expand Down Expand Up @@ -12304,6 +12320,10 @@
"path": "hooks/_runtime/evidence/grok-skill-route-pass.v1.json",
"role": "current"
},
{
"path": "hooks/_runtime/host-session-partition.cjs",
"role": "current"
},
{
"path": "hooks/_runtime/host-tool-mutation-adapters.cjs",
"role": "current"
Expand Down Expand Up @@ -12612,6 +12632,10 @@
"path": "scripts/lib/governance-ledger-resolver.js",
"role": "current"
},
{
"path": "scripts/lib/grok-bot-driver.js",
"role": "current"
},
{
"path": "scripts/lib/grok-workspace-launcher.js",
"role": "current"
Expand Down Expand Up @@ -12816,6 +12840,10 @@
"path": "scripts/test-governance-status-summary.js",
"role": "current"
},
{
"path": "scripts/test-grok-bot-host.js",
"role": "current"
},
{
"path": "scripts/test-hooks-ingress-continuity.js",
"role": "current"
Expand Down Expand Up @@ -13016,6 +13044,7 @@
"scripts/test-global-install-smoke.js",
"scripts/test-governance-intake.js",
"scripts/test-governance-status-summary.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-ingress-continuity.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-adapters.js",
Expand Down Expand Up @@ -13119,6 +13148,7 @@
"scripts/test-global-install-smoke.js",
"scripts/test-governance-intake.js",
"scripts/test-governance-status-summary.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-ingress-continuity.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-adapters.js",
Expand Down Expand Up @@ -14063,6 +14093,10 @@
"path": "scripts/lib/governance-ledger-migration.js",
"role": "current"
},
{
"path": "scripts/lib/grok-bot-driver.js",
"role": "current"
},
{
"path": "scripts/lib/grok-workspace-launcher.js",
"role": "current"
Expand Down Expand Up @@ -14439,6 +14473,10 @@
"path": "scripts/test-governance-status-summary.js",
"role": "current"
},
{
"path": "scripts/test-grok-bot-host.js",
"role": "current"
},
{
"path": "scripts/test-hooks-ingress-continuity.js",
"role": "current"
Expand Down Expand Up @@ -14721,6 +14759,7 @@
"scripts/test-governance-intake.js",
"scripts/test-governance-ledger-resolver.js",
"scripts/test-governance-status-summary.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-ingress-continuity.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-adapters.js",
Expand Down Expand Up @@ -14858,6 +14897,7 @@
"scripts/test-governance-intake.js",
"scripts/test-governance-ledger-resolver.js",
"scripts/test-governance-status-summary.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-ingress-continuity.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-adapters.js",
Expand Down Expand Up @@ -17054,6 +17094,10 @@
"path": "scripts/lib/global-adapters-cli.js",
"role": "current"
},
{
"path": "scripts/lib/grok-bot-driver.js",
"role": "current"
},
{
"path": "scripts/lib/host-parity-scorecard.js",
"role": "current"
Expand Down Expand Up @@ -17286,6 +17330,10 @@
"path": "scripts/test-global-runtime-continuity.js",
"role": "current"
},
{
"path": "scripts/test-grok-bot-host.js",
"role": "current"
},
{
"path": "scripts/test-hooks-runtime.js",
"role": "current"
Expand Down Expand Up @@ -17461,6 +17509,7 @@
"scripts/test-global-host-removal.js",
"scripts/test-global-install-smoke.js",
"scripts/test-global-runtime-continuity.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-adapters.js",
"scripts/test-host-capability-routing.js",
Expand Down Expand Up @@ -17567,6 +17616,7 @@
"scripts/test-global-host-removal.js",
"scripts/test-global-install-smoke.js",
"scripts/test-global-runtime-continuity.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-adapters.js",
"scripts/test-host-capability-routing.js",
Expand Down Expand Up @@ -20364,6 +20414,10 @@
"path": "changelogs/unreleased.md",
"role": "current"
},
{
"path": "grok/plugins/devcodex-workspace/skills/devcodex-workspace/SKILL.md",
"role": "current"
},
{
"path": "hooks/_runtime/artifact-template-contract.cjs",
"role": "current"
Expand Down Expand Up @@ -20528,6 +20582,10 @@
"path": "scripts/lib/governance-status-summary.js",
"role": "current"
},
{
"path": "scripts/lib/grok-bot-driver.js",
"role": "current"
},
{
"path": "scripts/lib/memory-index.js",
"role": "current"
Expand Down Expand Up @@ -20688,6 +20746,10 @@
"path": "scripts/test-governance-status-summary.js",
"role": "current"
},
{
"path": "scripts/test-grok-bot-host.js",
"role": "current"
},
{
"path": "scripts/test-hooks-runtime.js",
"role": "current"
Expand Down Expand Up @@ -20801,6 +20863,7 @@
"scripts/test-global-install-smoke.js",
"scripts/test-governance-intake.js",
"scripts/test-governance-status-summary.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-capability-routing.js",
"scripts/test-lifecycle-stop-gate.js",
Expand Down Expand Up @@ -20882,6 +20945,7 @@
"scripts/test-global-install-smoke.js",
"scripts/test-governance-intake.js",
"scripts/test-governance-status-summary.js",
"scripts/test-grok-bot-host.js",
"scripts/test-hooks-runtime.js",
"scripts/test-host-capability-routing.js",
"scripts/test-lifecycle-stop-gate.js",
Expand Down Expand Up @@ -21690,8 +21754,8 @@
"content/skills/user-visible-output-contract/SKILL.md"
],
"source": "content/skills/user-visible-output-contract/SKILL.md",
"hash": "2877ea53f4e7b53ef6ac14b95b42f555dc3fa78d722b4fbb4d95fcb60f413b0f",
"sourceBytes": 26296,
"hash": "ba9afc969c8e7092fde8bcf441c631099d465e4d71df921ae0938eb88a69b166",
"sourceBytes": 26299,
"version": "1.20.7",
"lifecycleState": "active",
"publicCategory": "runtime-governance",
Expand Down
Loading
Loading