Skip to content

Commit 1a2655d

Browse files
committed
feat: add deterministic control content source
1 parent 972cb7b commit 1a2655d

186 files changed

Lines changed: 20624 additions & 40 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Normalize line endings to LF on checkout
22
* text=auto eol=lf
33

4+
# Authoring sources preserve legacy delivery whitespace; materialization owns parity.
5+
content-source/** whitespace=-trailing-space,-blank-at-eof
6+
47
# Binary files
58
*.png binary
69
*.ico binary
7-

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# 变更日志 (CHANGELOG)
22

33
> **说明**: 版本概览摘要。最新版本的详细变更见下方表格首行的 `changelogs/releases/vX.Y.Z.md` 链接;历史版本见对应详细变更文件
4-
> **最后更新**: 2026-07-21
4+
> **最后更新**: 2026-07-29
5+
> **当前未发布**: 控制面 Markdown 已建立统一 authoring source、确定性物化、重复处置与 intent semantic quality 门禁;详见 [`changelogs/unreleased.md`](./changelogs/unreleased.md)。
56
67
---
78

‎README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,15 @@ npm 全局包 / 源码 install -g
223223
```bash
224224
cd <devcodex-source-root>
225225
npm install
226+
npm run check:control-content
226227
npm run test:stop-gate
227228
npm run test:docs-surface-inventory
228229
npm run test:skill-route
229230
npm run global-adapters:apply
230231
```
231232

233+
源码仓中的 instruction、prompt 与 Skill Markdown 维护入口统一位于 `content-source/`。修改 authoring source 后先运行 `npm run check:control-content`;需要更新既有 delivery 路径时显式运行 `npm run generate:control-content`。运行时和 npm 安装包继续读取原路径,不读取或携带 `content-source/`。
234+
232235
维护者文档站(需本机已有完整 `website/`):
233236

234237
```bash

‎RULES.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ DevCodex 同时支持五宿主的用户级加载路径,规则语义保持一
5959
- **S01** 破坏性操作需确认 · **S02** 默认允许敏感信息与硬编码,按用户 / 项目显式策略处理 · **S03** 禁止编造规范
6060
- **S04** 禁止整文件覆写 · **S05** 记忆+报告自动写入 · **S06** 禁止危险命令 · **S07** 全模式入口检查强制输出 PC0~PC7(dev 模式追加 PC4 完整诊断)
6161

62+
## 控制面 Markdown 维护
63+
64+
- 135 个 instruction/prompt/Skill Markdown 的唯一手写源位于 `content-source/`。
65+
- `instructions.md`、`instructions/`、`prompts/`、`skills/*/SKILL.md` 是确定性 delivery,不直接双写。
66+
- shared include 只在构建期展开;禁止 runtime include、嵌套 include、symlink 和路径穿越。
67+
- 提交前必须通过 `npm run test:control-content`;prepack 只校验,不自动改写,npm 包不含 authoring source。
68+
6269

6370
## 相关链接
6471

‎changelogs/unreleased.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
> **当前**: v1.15.3 已归档到 `changelogs/releases/v1.15.3.md`;本文件仅保留历史锚点索引与镜像供 validate 探针消费。发版后新实现再写入下方「当前未发布」。
55
66
## 当前未发布实现候选
7+
- **控制面规范资产去重与确定性组合**:新增 `content-source/` 作为 135 个 instruction/prompt/Skill Markdown 的唯一手写根,保留既有 tracked delivery 路径;22 个 build-time 单层 shared fragments 覆盖 58 个消费点,26 exact + 4 near-section 候选全部有 disposition。新增 zero-write materializer、受控 extraction、重复分析、compatibility mirror、validation DAG invariant 与 prepack/package 排除门禁;修复 folded/literal frontmatter 解析和纯 `>`/`|` intent false-green,83 active intent 全部重生并通过 semantic quality。
78
- **工作区 Skill 意图结构化与渐进路由(B4 收口)**:83 个 active Skill 使用 `SkillIntentV1`;运行时构建 W + managed G 动态快照,经单一 `skill_route` MCP Tool 执行 catalog/commit/load_stage/status、0/1 自由选择、依赖闭包、冲突与预算校验、分阶段正文加载、条件重规划、幂等重放、会话隔离恢复和有锁 GC。统一路由现为 Claude/Codex/Copilot/Gemini/Grok 五宿主唯一源码默认,能力证据仅用于发布后观测,不再切换模式或阻塞完成;旧 `WorkspaceSkillAutoMatch` / `WorkspaceSkillIntent` 生命周期分支、CLI 入口和验证节点退出活跃闭包。修复跨会话 Stop 读取共享状态导致的 `test` 误触发,并把否定、截图、日志、报告、诊断性提及排除在显式调用外;多项目工作区目标未绑定时改为 `SkillRouteBootstrapPendingV1`,只接受 observed ContextRead plan 绑定现有项目,禁止用 workspace basename 创建合成 namespace。MCP 为宿主按需启动的本地 stdio 子进程,无端口、HTTP、远程服务或常驻 daemon。W 在每轮动态发现;用户原生 `AGENTS.md` / `CLAUDE.md` / `SKILL.md` 与个人 Skill 保持宿主所有权,同名不构成清理或覆盖权限。
89
- **公共 README 校验迁移**:以严格 `PublicReadmeContractV1` 替代要求公共 README 罗列内部 Gate/Skill/控制面术语的历史断言;README/client/release/workflow/brand/turn/execution consumers 共用该边界,并用损坏核心安装路径的负向探针防止宽松绕过。
910
- **全局验证 skill `skill-load-verify`**:触发「验证技能 / skill load verify」;用户可见仅固定句 `SKILL-LOAD-VERIFY-OK`;Skill 规模 85→**86**(83 active + 3 gray)。

‎content-source/README.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Control Content Source
2+
3+
`content-source/` 是 instruction、prompt 和 Skill Markdown 的唯一手写根。现有仓库路径仍是可直接消费的 delivery 输出,由 `scripts/generate-control-content.js` 确定性生成和校验。
4+
5+
## 目录
6+
7+
- `instructions.md`、`instructions/`、`prompts/`、`skills/*/SKILL.md`:135 个可物化 source entry。
8+
- `shared/`:至少有两个真实消费者的单层 include 片段。
9+
- `manifest.json`:source、delivery、companion 和 compatibility mirror 合同。
10+
- `duplication-inventory.json`、`duplication-dispositions.json`:重复候选与人工处置。
11+
12+
禁止 runtime 读取本目录;禁止嵌套 include、路径穿越、symlink include 和打包时隐式改写。修改后先运行 zero-write check,再显式执行 `--write`。
13+
14+
## 术语
15+
16+
| 术语 | 含义 |
17+
|------|------|
18+
| **工作流** | 路由级完整执行路径(dev/fix/analyze/audit/self-fix/resume/plan/chat)|
19+
| **流程** | 步骤级执行序列(某个功能的具体操作步骤)|
20+
| **约束** | C01~C22 编号的强制/执行规则 |
21+
| **规则** | 更宽泛的执行规定(含约束、建议、说明等)|
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
{
2+
"schemaVersion": "ControlContentDuplicationDispositionV1",
3+
"rules": [
4+
{
5+
"id": "DP-001",
6+
"candidateIds": ["exact-00c02fddc98a"],
7+
"decision": "must-retain",
8+
"reason": "代码示例分别属于 Prompt 与 Skill 的就地可执行说明,抽离会降低单文件可读性。"
9+
},
10+
{
11+
"id": "DP-002",
12+
"candidateIds": ["exact-072e721fa31b"],
13+
"decision": "extract",
14+
"fragment": "shared/report/host-capability-routing-record.md",
15+
"reason": "五个报告模板使用完全相同的宿主能力记录合同。"
16+
},
17+
{
18+
"id": "DP-003",
19+
"candidateIds": ["exact-11eb37c0cd8b"],
20+
"decision": "extract",
21+
"fragment": "shared/report/issue-suggestion-validation-table.md",
22+
"reason": "三个开发类报告共享同一问题建议验证表。"
23+
},
24+
{
25+
"id": "DP-004",
26+
"candidateIds": ["exact-1384a5bbaa79"],
27+
"decision": "extract",
28+
"fragment": "shared/report/evidence-freshness-table.md",
29+
"reason": "报告模板共享同一 EvidenceFreshness 表合同。"
30+
},
31+
{
32+
"id": "DP-005",
33+
"candidateIds": ["exact-16e52ddb101d"],
34+
"decision": "extract",
35+
"fragment": "shared/instructions/sensitive-data-policy-table.md",
36+
"reason": "完整 instructions 与安全模块共享同一强制策略表。"
37+
},
38+
{
39+
"id": "DP-006",
40+
"candidateIds": ["exact-2e4b0a3ec0e7"],
41+
"decision": "extract",
42+
"fragment": "shared/instructions/concurrency-config-contract.md",
43+
"reason": "完整 instructions 与 common 模块共享同一并发配置合同。"
44+
},
45+
{
46+
"id": "DP-007",
47+
"candidateIds": ["exact-3ed14b010f82"],
48+
"decision": "extract",
49+
"fragment": "shared/memory/active-root-layout.md",
50+
"reason": "instruction 与两个 memory Skill 共享同一 active-root 定义。"
51+
},
52+
{
53+
"id": "DP-008",
54+
"candidateIds": ["exact-58890abb3ff3"],
55+
"decision": "extract",
56+
"fragment": "shared/compliance/env-mode-table.md",
57+
"reason": "compliance instruction 与 Skill 共享同一环境模式表。"
58+
},
59+
{
60+
"id": "DP-009",
61+
"candidateIds": ["exact-5ee0c1300203"],
62+
"decision": "extract",
63+
"fragment": "shared/report/context-handoff-condition.md",
64+
"reason": "五个报告模板共享同一 ContextHandoffCard 触发合同。"
65+
},
66+
{
67+
"id": "DP-010",
68+
"candidateIds": ["exact-647b517a00b9"],
69+
"decision": "extract",
70+
"fragment": "shared/memory/ambiguous-workspace-error.md",
71+
"reason": "memory instruction 与 Skill 共享同一歧义错误语义。"
72+
},
73+
{
74+
"id": "DP-011",
75+
"candidateIds": ["exact-64cf3fe0744c"],
76+
"decision": "extract",
77+
"fragment": "shared/instructions/question-evidence-gate.md",
78+
"reason": "完整 instructions 与 common 模块共享同一推荐证据门禁。"
79+
},
80+
{
81+
"id": "DP-012",
82+
"candidateIds": ["exact-74b4a887d580"],
83+
"decision": "extract",
84+
"fragment": "shared/compliance/validation-summary.md",
85+
"reason": "compliance instruction 与 Skill 共享同一验证摘要合同。"
86+
},
87+
{
88+
"id": "DP-013",
89+
"candidateIds": ["exact-7800f1897e98"],
90+
"decision": "extract",
91+
"fragment": "shared/instructions/sensitive-data-default-policy.md",
92+
"reason": "完整 instructions 与安全模块共享同一 S02 默认策略。"
93+
},
94+
{
95+
"id": "DP-014",
96+
"candidateIds": ["exact-7e32f7357215"],
97+
"decision": "must-retain",
98+
"reason": "一个是索引模板、一个是 Skill 输出示例,局部角色不同且需保持单文件完整。"
99+
},
100+
{
101+
"id": "DP-015",
102+
"candidateIds": ["exact-904be7e09270"],
103+
"decision": "extract",
104+
"fragment": "shared/instructions/single-writer-domains.md",
105+
"reason": "完整 instructions 与 common 模块共享同一单写者域合同。"
106+
},
107+
{
108+
"id": "DP-016",
109+
"candidateIds": ["exact-931970a6d292"],
110+
"decision": "extract",
111+
"fragment": "shared/report/shared-schema-note.md",
112+
"reason": "五个报告模板共享同一 schema/registry 说明。"
113+
},
114+
{
115+
"id": "DP-017",
116+
"candidateIds": ["exact-a6436187b327"],
117+
"decision": "extract",
118+
"fragment": "shared/report/mcp-fallback-recording.md",
119+
"reason": "dev/fix 报告共享同一 MCP fallback 记录合同。"
120+
},
121+
{
122+
"id": "DP-018",
123+
"candidateIds": ["exact-b07517d8bac0"],
124+
"decision": "extract",
125+
"fragment": "shared/report/review-grade-card-template.md",
126+
"reason": "四个执行类报告共享同一 ReviewGradeCard 模板。"
127+
},
128+
{
129+
"id": "DP-019",
130+
"candidateIds": ["exact-b1a52321ef03"],
131+
"decision": "extract",
132+
"fragment": "shared/report/task-continuation-record.md",
133+
"reason": "两个开发类报告共享同一续接记录合同。"
134+
},
135+
{
136+
"id": "DP-020",
137+
"candidateIds": ["exact-b25391184ad9"],
138+
"decision": "extract",
139+
"fragment": "shared/intent/three-question-table.md",
140+
"reason": "完整 instructions 与 intent 模块共享同一路由三问。"
141+
},
142+
{
143+
"id": "DP-021",
144+
"candidateIds": ["exact-d42f24fce99c"],
145+
"decision": "extract",
146+
"fragment": "shared/intent/routing-table.md",
147+
"reason": "完整 instructions 与 intent 模块共享同一意图路由表。"
148+
},
149+
{
150+
"id": "DP-022",
151+
"candidateIds": ["exact-dc20351a252b"],
152+
"decision": "extract",
153+
"fragment": "shared/memory/workspace-selection.md",
154+
"reason": "memory instruction 与 Skill 共享同一 workspace namespace 选择合同。"
155+
},
156+
{
157+
"id": "DP-023",
158+
"candidateIds": ["exact-e5250d20569e"],
159+
"decision": "must-retain",
160+
"reason": "两个模块中的优先级列表分别约束 intent 与 memory 恢复,上下文角色不同。"
161+
},
162+
{
163+
"id": "DP-024",
164+
"candidateIds": ["exact-ee12e8a45a36"],
165+
"decision": "extract",
166+
"fragment": "shared/profile/profile-read-chain.md",
167+
"reason": "profile instruction 与 Skill 共享同一读取链门禁。"
168+
},
169+
{
170+
"id": "DP-025",
171+
"candidateIds": ["exact-f93be1be0dd5"],
172+
"decision": "extract",
173+
"fragment": "shared/report/gate-result-table.md",
174+
"reason": "五个报告模板共享同一 gate result 表。"
175+
},
176+
{
177+
"id": "DP-026",
178+
"candidateIds": ["exact-fb49a4ef9dcc"],
179+
"decision": "must-retain",
180+
"reason": "common 与 intent 模块的段落语义相同,但 intent 文件内部保留历史 mixed-EOL 字节;抽离会破坏 byte parity。"
181+
},
182+
{
183+
"id": "DP-027",
184+
"candidateIds": ["near-084bc14794b9"],
185+
"decision": "structural-only",
186+
"reason": "章节主题相同但完整 instructions 与模块投影包含不同边界,不可按相似度合并。"
187+
},
188+
{
189+
"id": "DP-028",
190+
"candidateIds": ["near-4dc1a579045e"],
191+
"decision": "structural-only",
192+
"reason": "并发章节存在完整源与模块投影差异,只抽离已确认的 exact contracts。"
193+
},
194+
{
195+
"id": "DP-029",
196+
"candidateIds": ["near-c64f2a915392"],
197+
"decision": "structural-only",
198+
"reason": "dev 与 fix 的 ECR 语义和责任不同,保留工作流专属章节。"
199+
},
200+
{
201+
"id": "DP-030",
202+
"candidateIds": ["near-fcf6cda19ef4"],
203+
"decision": "structural-only",
204+
"reason": "S02 章节包含不同上下文,只抽离两段完全一致的合同。"
205+
}
206+
]
207+
}

0 commit comments

Comments
 (0)