Skip to content

Commit e396971

Browse files
committed
fix: harden fresh workspace profile context
1 parent f136a45 commit e396971

31 files changed

Lines changed: 204 additions & 132 deletions

‎CHANGELOG.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# 变更日志 (CHANGELOG)
22

33
> **说明**: 版本概览摘要。最新版本的详细变更见下方表格首行的 `changelogs/releases/vX.Y.Z.md` 链接;历史版本见对应详细变更文件
4-
> **最后更新**: 2026-07-31
5-
> **当前未发布**: v1.15.7 已归档;后续未发布实现继续记录到 [`changelogs/unreleased.md`](./changelogs/unreleased.md)。
4+
> **最后更新**: 2026-08-03
5+
> **当前未发布**: v1.15.8 已归档;后续未发布实现继续记录到 [`changelogs/unreleased.md`](./changelogs/unreleased.md)。
66
77
---
88

99
## 版本概览
1010

1111
| 版本 | 日期 | 变更摘要 | 详细 |
1212
|------|------|---------|------|
13+
| [v1.15.8](./changelogs/releases/v1.15.8.md) | 2026-08-03 | 🔧 **新电脑 Profile 初始化与 MCP source observation 防复发**:MCP 直接调用会从 workspace-namespace activeRoot 推断项目 hook state,避免已读 Profile/memory 后 `skill_route commit` 仍 `CONTEXT_BINDING_PENDING`;Profile README 缺失与 `status` 输出给出完整 `profile plan/init` 命令 | [查看](./changelogs/releases/v1.15.8.md) |
1314
| [v1.15.7](./changelogs/releases/v1.15.7.md) | 2026-07-31 | 🔧 **SkillRoute MCP schema + closeout/rebind 防复发**:`skill_route` schema 改为 per-op `oneOf`,禁止 `catalog/load_stage/status` 接收 `contextBinding`;`CONTEXT_BINDING_PENDING/STALE` 返回结构化恢复建议,Stop closeout 阻断给出可执行 `load_stage` 调用 | [查看](./changelogs/releases/v1.15.7.md) |
1415
| [v1.15.6](./changelogs/releases/v1.15.6.md) | 2026-07-31 | 🔧 **README 目录导航 + SkillRoute stale receipt 防复发**:README 增加用户章节目录导航并纳入公共 README 契约;修复 MCP source observation 遇到 stale receipt 时复用旧 receipt 导致 `skill_route commit` 继续 pending 的复发路径 | [查看](./changelogs/releases/v1.15.6.md) |
1516
| [v1.15.5](./changelogs/releases/v1.15.5.md) | 2026-07-31 | 🔧 **README 自动推进说明 + SkillRoute MCP 来源观测修复 + package runtime 闭包**:补齐 `@rocky` / `autoAliases` 用户配置说明,修复 MCP-only 路径下已读 profile/memory 但 `skill_route commit` pending 的阻断,并确保 npm 包内置 Skill portfolio 与 runtime contract digest 同步 | [查看](./changelogs/releases/v1.15.5.md) |
@@ -131,9 +132,9 @@
131132

132133
## 相关文档
133134

134-
- [`changelogs/releases/v1.15.7.md`](./changelogs/releases/v1.15.7.md) — 最新版本详细变更文档
135-
- [`changelogs/releases/v1.15.6.md`](./changelogs/releases/v1.15.6.md) — 上一版本详细变更文档
136-
- [`changelogs/releases/v1.15.5.md`](./changelogs/releases/v1.15.5.md) — 历史版本详细变更文档
135+
- [`changelogs/releases/v1.15.8.md`](./changelogs/releases/v1.15.8.md) — 最新版本详细变更文档
136+
- [`changelogs/releases/v1.15.7.md`](./changelogs/releases/v1.15.7.md) — 上一版本详细变更文档
137+
- [`changelogs/releases/v1.15.6.md`](./changelogs/releases/v1.15.6.md) — 历史版本详细变更文档
137138
- [`changelogs/releases/v1.15.0.md`](./changelogs/releases/v1.15.0.md) — 上一版本详细变更文档
138139
- [`changelogs/releases/v1.14.0.md`](./changelogs/releases/v1.14.0.md) — 历史版本详细变更文档
139140
- [`changelogs/releases/v1.11.21.md`](./changelogs/releases/v1.11.21.md) — 历史版本详细变更文档

‎RULES.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# DevCodex v1.15.7 — 使用入口
1+
# DevCodex v1.15.8 — 使用入口
22

3-
> AI workflow injector for Copilot / Claude Code / Codex / Gemini / Grok · publisher: Rocky · version: 1.15.7
3+
> AI workflow injector for Copilot / Claude Code / Codex / Gemini / Grok · publisher: Rocky · version: 1.15.8
44
55
## 正式主支持客户端
66

‎changelogs/releases/v1.15.8.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# v1.15.8
2+
3+
> 发布日期:2026-08-03
4+
> 类型:Patch
5+
6+
## 摘要
7+
8+
本版本修复新电脑 / fresh workspace 安装后容易遇到的 Profile 初始化与 MCP 上下文绑定问题:MCP 直接调用 `profile_load` / `memory_status` 时,会根据 `.devcodex/<project>` activeRoot 自动推断 workspace-namespace lifecycle state,不再把已观察证据写到 `__workspace__` 导致 `skill_route commit` 继续 `CONTEXT_BINDING_PENDING`;Profile README 基线缺失时,错误提示和 `devcodex status` 会给出完整的 `profile plan/init` 恢复命令。
9+
10+
## 主要变更
11+
12+
- `recordMcpContextSourceObservations` 从 activeRoot 形态推断 workspace-namespace 项目 hook state,即使 MCP caller 未传或误传 `workspaceNamespace=false`,仍会写入 `.memory/hooks/<project>/lifecycle-state.json`。
13+
- `skill_route` MCP-only 场景新增防复发测试:已通过 MCP source observation 读完 mandatory Profile/memory 后,`commit` 必须成功,不得继续报 `CONTEXT_BINDING_PENDING`。
14+
- `profile_context_plan` 在 active target 缺少 `profile/README.md` 时,返回可执行恢复命令:先 `devcodex init`,再 `devcodex profile plan --tier profile-lite` 与 `devcodex profile init --tier profile-lite`。
15+
- `devcodex status` 的 Profile missing 提示改为完整 plan/init 命令,避免用户误以为全局安装失败或需要猜测下一步。
16+
17+
## 验证
18+
19+
- `node scripts/test-skill-route-state.js`
20+
- `node scripts/test-mcp-servers.js`
21+
- `node scripts/test-cli-behavior.js`
22+
23+
## 发布说明
24+
25+
- npm 包名:`devcodex`
26+
- registry:`https://registry.npmjs.org/`
27+
- 发布分支:`main`
28+
- 发布路径:tag `v1.15.8` 触发 GitHub Actions `Publish to npm`

‎changelogs/unreleased.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# 未发布变更(Unreleased)
22

33
> **用途**: 记录尚未正式发版的实现级变更。
4-
> **当前**: v1.15.7 已归档到 `changelogs/releases/v1.15.7.md`;本文件仅保留历史锚点索引与镜像供 validate 探针消费。发版后新实现再写入下方「当前未发布」。
4+
> **当前**: v1.15.8 已归档到 `changelogs/releases/v1.15.8.md`;本文件仅保留历史锚点索引与镜像供 validate 探针消费。发版后新实现再写入下方「当前未发布」。
55
66
## 当前未发布实现候选
7+
- **v1.15.8 已归档**:新电脑 Profile 初始化提示、MCP source observation workspace-namespace 推断与 `skill_route commit` pending 防复发已进入 `changelogs/releases/v1.15.8.md`。
78
- **README 首次信任与 workspace 初始化说明 + status 初始化误报修复**:公共 README 补充 `devcodex init`、多项目 workspace `.devcodex/layout.json` 基线、首次宿主 trust/allow 提示、工作区 Skill 路径、Profile missing 不是安装失败以及可选 `profile plan/init`;`devcodex status` 改为基于 workspace layout/runtime 证据判断 `.devcodex` 是否 ready,避免 fresh workspace 已初始化后仍提示 “Workspace runtime not initialized”;CLI 行为测试增加防复发断言。
89
- **v1.15.7 已归档**:SkillRoute MCP schema 与 closeout/rebind 防复发已进入 `changelogs/releases/v1.15.7.md`。
910
- **v1.15.6 已归档**:README 目录导航与 SkillRoute stale receipt 防复发修复已进入 `changelogs/releases/v1.15.6.md`。

‎content/duplication-inventory.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schemaVersion": "ControlContentDuplicationInventoryV1",
3-
"sourceBundleDigest": "0083839a35d50d6c1a94065c4a501439c70a1abe63e9cf2970394c04442bc9e8",
3+
"sourceBundleDigest": "a1b133b7d7ae0fd88e77c15fbd4e5b7ad83cfad7621c8c9abd5421b3cb512916",
44
"thresholds": {
55
"minParagraphChars": 100,
66
"sectionThreshold": 0.94,

‎content/instructions/00-safety.instructions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
applyTo: "**"
33
description: 安全底线与输出语言规则,定义 S01~S07、违规处理与不可豁免边界
44
priority: P2
5-
version: 1.15.7
5+
version: 1.15.8
66
---
77
# 安全底线规范(S01~S07)
88

‎content/instructions/01-common.instructions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
applyTo: "**"
33
description: 通用规范总则,覆盖优先级、意图路由、Profile/active-root、宿主适配与治理总线
44
priority: P5
5-
version: 1.15.7
5+
version: 1.15.8
66
---
77
# 通用规范
88

‎content/instructions/01a-profile-loading.instructions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
applyTo: "**"
33
description: 意图驱动的 Profile 加载、active-root 路径、目标项目识别与项目现实扩展规范
44
priority: P5
5-
version: 1.15.7
5+
version: 1.15.8
66
---
77
# Profile 加载与项目现实扩展
88

‎content/instructions/01b-record-router.instructions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
applyTo: "**"
33
description: 任务切换边界、RecordRouter 分流、Improvement Intake 与提交发布边界的通用规范
44
priority: P5
5-
version: 1.15.7
5+
version: 1.15.8
66
---
77
# 任务边界与 RecordRouter
88

‎content/instructions/01c-intent-expansion.instructions.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
applyTo: "**"
33
description: 意图识别、Intent Expansion Card、上下文重建与可见回复证据的通用规范
44
priority: P5
5-
version: 1.15.7
5+
version: 1.15.8
66
---
77
# 意图扩展与上下文重建
88

0 commit comments

Comments
 (0)