Skip to content

Commit cf7d142

Browse files
committed
docs: drop website from public git and rewrite user-facing README
Ignore website/* in public tracking (keep website/README.md pointer only); npm already excludes website. Soften docs-surface/public-text/governance probes when website is absent. Rewrite README for install, skill verify, language honesty, host Partial limits, and public vs maintainer doc boundaries.
1 parent 2c0a7c4 commit cf7d142

171 files changed

Lines changed: 222 additions & 18795 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.

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ coverage/
1111
.env
1212
.env.local
1313

14+
# Maintainer docs site (Rspress) — NOT in public git / NOT in npm pack.
15+
# Keep a local copy for maintainers; public users use README only.
16+
# Ignore all website content except a short public pointer README.
17+
website/*
18+
!website/README.md
19+
1420
# DevCodex AI context data (session memory, reports, profile, etc. - do not commit)
1521
.devcodex/
1622

‎README.md‎

Lines changed: 148 additions & 674 deletions
Large diffs are not rendered by default.

‎changelogs/unreleased.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
- **技能过程文案**:inject 引导过程侧写「正在加载 <id> 技能」,避免「命中 … 正在读取并按该技能执行」。
1010
- **宿主 skill 目录隐私**:PreToolUse 拦截 List/扫描 `~/.grok/skills`、`bundled/skills` 等用户主目录 skill 树,避免过程 UI 暴露 `C:\\Users\\…`;只允许读单个已知 SKILL.md。
1111
- **过程关账回填(B1–B3)**:ECR `reports/requirements/grok/20260727/01–03`;需求目录 `技能加载可见性收敛与验证` 00–05;用户站 `website/docs/guide/skills-loading.md`;Profile **N/A**。
12+
- **website 不进公开仓**:`.gitignore` 忽略 `website/*`(保留 `website/README.md` 指针);npm `files` 本就不含 website;docs-surface / public-text / 相关探针在 website 缺省时 optional。
13+
- **README 用户向重写**:安装、验证 skill、语言诚实、宿主 Partial、仓库边界;去掉 Gate 百科式长清单。
1214
- **控制面 ImplementStartGate 防过程跳过**:`classifyImplementStartGate` 对控制面 mutation **禁止 unbound 放行**(`implement-start-without-task-binding`);绑定任务后除 04/05/复审清单外还须 **00/01 + 02 技术方案**(`implement-start-without-design`);lifecycle PreTool 无任务也 enforce。探针 `test-implement-start-gate.js`。需求:`VSCode全局MCP与五宿主同刷`(过程事故:承诺按流程却直接改码)。
1315
- **VS Code 全局 MCP 与五宿主同刷**:`global-adapters apply` / 全局安装在 Copilot host 事务中合并写入用户级 `Code/User/mcp.json`(及已存在的 Code - Insiders)的 `servers.devcodex-memory|profile`(stdio→copilot runtime mcp),保留既有 `inputs`/其它 server;测试与边界见 `global-host-target.resolveVscodeUserMcpPaths`。
1416
- **SkillsDeployModeV1(隐蔽运行时 + PR-1 防假绿)**:默认 `skillsDeployMode=hidden` 将 active skills 部署到 `~/.agents/devcodex/skills`(G_RUNTIME),停写/目录 prune `~/.agents/skills`、`~/.claude/skills`、`~/.copilot/skills` 中的包 managed id;`resolveGlobalSkillsRoot` 随 mode 切换(ENV `DEVCODEX_GLOBAL_SKILLS_ROOT` 仍最高优先);`global-adapters apply --mode=hidden|legacy` 与 npm lifecycle 透传;receipt 记录 mode。强化 `pr1EvidenceOk`:有 `02` 须独立实质 `03` 复审(长度+blocker=0+实质章节),拒绝 thin open-blocker / sessions-only;改写 stop-gate 负向探针。需求:`全局Skill与插件隐蔽运行时`。

‎scripts/lib/docs-surface-inventory.js‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ function scanDocsSurfaceInventory (root) {
110110
const scriptsLib = listFiles(root, 'scripts/lib', /\.js$/i)
111111
const scriptsTop = listFiles(root, 'scripts', /\.(js|cjs|mjs)$/i)
112112
const npmScripts = Object.keys(pkg.scripts || {}).sort()
113-
const websiteMd = walkMd(root, 'website/docs').sort()
113+
// website/ is maintainer-only and may be absent from public clones (not shipped in npm / public git).
114+
const websiteDocsRoot = path.join(root, 'website', 'docs')
115+
const websitePresent = fs.existsSync(websiteDocsRoot)
116+
const websiteMd = websitePresent ? walkMd(root, 'website/docs').sort() : []
114117

115118
const gates = JSON.parse(
116119
fs.readFileSync(path.join(root, 'skills/spec-governance/gate-registry.json'), 'utf8')
@@ -151,6 +154,7 @@ function scanDocsSurfaceInventory (root) {
151154
scriptsLib: scriptsLib.length,
152155
scriptsTop: scriptsTop.length,
153156
npmScripts: npmScripts.length,
157+
websitePresent,
154158
websiteMd: websiteMd.length,
155159
gateGroups,
156160
validationNodes: validationNodes.length,
@@ -200,7 +204,10 @@ function assertDocsSurfaceInventory (inv) {
200204
if (inv.instructionsMain !== 15) {
201205
failures.push(`instructions main expected 15 got ${inv.instructionsMain}`)
202206
}
203-
if (inv.websiteMd < 156) failures.push(`website md expected >=156 got ${inv.websiteMd}`)
207+
// Public tree policy: website is optional. When present (maintainer checkout), enforce floor.
208+
if (inv.websitePresent && inv.websiteMd < 156) {
209+
failures.push(`website md expected >=156 got ${inv.websiteMd}`)
210+
}
204211
if (inv.gateGroups !== 51) failures.push(`gate groups expected 51 got ${inv.gateGroups}`)
205212
if (inv.validationNodes < 83) {
206213
failures.push(`validation nodes expected >=83 got ${inv.validationNodes}`)

‎scripts/lib/test-spec-governance-review.js‎

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ function runSpecGovernanceReviewSuite(ctx) {
88
mustNotInclude, collectChangelogContents, mustIncludeInChangelogs
99
} = ctx
1010

11+
const websitePresent = fs.existsSync(path.join(ROOT, 'website', 'docs'))
12+
function mustIncludeOptional (file, needle) {
13+
if (String(file).startsWith('website/') && !websitePresent) return
14+
if (!fs.existsSync(path.join(ROOT, file))) return
15+
mustIncludeOptional(file, needle)
16+
}
17+
1118
const checkV75 = 'PromptLongGateListDriftProbe'
1219
for (const [file, needle] of [
1320
['scripts/lib/validate-governance-review.js', 'checkV75'],
@@ -22,12 +29,12 @@ function runSpecGovernanceReviewSuite(ctx) {
2229
['website/docs/guide/development.md', checkV75],
2330
['changelogs/releases/v1.11.28.md', 'V75']
2431
]) {
25-
mustInclude(file, needle)
32+
mustIncludeOptional(file, needle)
2633
}
2734

2835
const promptLongGateListDriftConsumerFiles = [
2936
'README.md',
30-
'website/docs/guide/development.md',
37+
...(websitePresent ? ['website/docs/guide/development.md'] : []),
3138
'instructions/10-dev.instructions.md',
3239
'instructions/11-fix.instructions.md',
3340
'instructions/12-audit.instructions.md',
@@ -90,7 +97,7 @@ function runSpecGovernanceReviewSuite(ctx) {
9097
['website/docs/guide/development.md', checkV76],
9198
['changelogs/releases/v1.11.28.md', 'V76']
9299
]) {
93-
mustInclude(file, needle)
100+
mustIncludeOptional(file, needle)
94101
}
95102

96103
const checkV77 = 'NativeCommandExitCodeGate'
@@ -115,7 +122,7 @@ function runSpecGovernanceReviewSuite(ctx) {
115122
['website/docs/guide/development.md', checkV77],
116123
['changelogs/releases/v1.11.28.md', 'V77']
117124
]) {
118-
mustInclude(file, needle)
125+
mustIncludeOptional(file, needle)
119126
}
120127

121128
const checkV78 = 'PostConfirmationReviewScopeGate'
@@ -151,7 +158,7 @@ function runSpecGovernanceReviewSuite(ctx) {
151158
['website/docs/guide/development.md', 'DevelopmentDriftGate'],
152159
['changelogs/releases/v1.11.28.md', 'V78']
153160
]) {
154-
mustInclude(file, needle)
161+
mustIncludeOptional(file, needle)
155162
}
156163

157164
const checkV79 = 'CoverageGateDecision'
@@ -176,7 +183,7 @@ function runSpecGovernanceReviewSuite(ctx) {
176183
['README.md', 'coverage 与外部 runtime 生命周期验证'],
177184
['website/docs/guide/development.md', '存在 coverage 阈值']
178185
]) {
179-
mustInclude(file, needle)
186+
mustIncludeOptional(file, needle)
180187
}
181188

182189
const checkV80 = 'UserManualReviewScope'
@@ -223,7 +230,7 @@ function runSpecGovernanceReviewSuite(ctx) {
223230
['website/docs/guide/development.md', 'audit-user-manual'],
224231
['website/docs/specs/directory-structure.md', 'audit-user-manual']
225232
]) {
226-
mustInclude(file, needle)
233+
mustIncludeOptional(file, needle)
227234
}
228235
mustIncludeInChangelogs('V80')
229236

@@ -285,7 +292,7 @@ function runSpecGovernanceReviewSuite(ctx) {
285292
['website/docs/guide/development.md', 'CommonNormGeneralizationGate'],
286293
['website/docs/versions/v1/1.0.1/CHANGELOG.md', 'V81']
287294
]) {
288-
mustInclude(file, needle)
295+
mustIncludeOptional(file, needle)
289296
}
290297
mustIncludeInChangelogs('V81')
291298
mustIncludeInChangelogs('CommonNormGeneralizationGate')
@@ -345,7 +352,7 @@ function runSpecGovernanceReviewSuite(ctx) {
345352
['website/docs/guide/development.md', checkV82],
346353
['website/docs/versions/v1/1.0.1/CHANGELOG.md', 'V82']
347354
]) {
348-
mustInclude(file, needle)
355+
mustIncludeOptional(file, needle)
349356
}
350357
mustIncludeInChangelogs('V82')
351358
mustIncludeInChangelogs('LatestAbsorptionExecutionPack')

‎scripts/test-client-contracts.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,17 @@ const clientContractProbes = [
5252
['README.md', '用户可见交付与链接兼容'],
5353
['README.md', 'profile_load'],
5454
['README.md', 'invoke'],
55-
['website/docs/guide/development.md', 'DevCodexVisibleEnvelopeV1'],
56-
['website/docs/guide/development.md', 'mcpFallback=used'],
5755
['scripts/test-mcp-servers.js', 'testProfileLoadWithoutArguments']
5856
]
5957

6058
for (const [file, needle] of clientContractProbes) mustInclude(file, needle)
6159

60+
// website/ is optional on public clones (maintainer-only docs site).
61+
if (fs.existsSync(path.join(ROOT, 'website', 'docs', 'guide', 'development.md'))) {
62+
mustInclude('website/docs/guide/development.md', 'DevCodexVisibleEnvelopeV1')
63+
mustInclude('website/docs/guide/development.md', 'mcpFallback=used')
64+
}
65+
6266
mustMatch(
6367
'instructions/02-output-paths.instructions.md',
6468
/-\s*\[[^\]]+\]\(\.devcodex\/[^\)]+\.md\)/,

‎scripts/test-docs-surface-inventory.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ console.log(
3333
hookRuntime: inv.hookRuntimeCount,
3434
prompts: inv.prompts,
3535
instructions: inv.instructionsMain,
36+
websitePresent: inv.websitePresent,
3637
websiteMd: inv.websiteMd,
3738
npmScripts: inv.npmScripts,
3839
scriptsLib: inv.scriptsLib,

‎scripts/test-public-text-integrity.js‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,17 @@ try {
7777
fs.rmSync(tempRoot, { recursive: true, force: true })
7878
}
7979

80-
const current = checkPublicTextSurfaces(ROOT, config)
81-
assert.ok(current.surfaceCount > config.surfaces.length, 'normative/public root expansion must be active')
80+
// website/ is maintainer-only; public clones may omit it. Drop website surfaces/roots when absent.
81+
const websitePresent = fs.existsSync(path.join(ROOT, 'website', 'docs'))
82+
const runtimeConfig = websitePresent
83+
? config
84+
: {
85+
...config,
86+
surfaces: (config.surfaces || []).filter((s) => !String(s.path || '').startsWith('website/')),
87+
roots: (config.roots || []).filter((r) => !String(r.path || '').startsWith('website/'))
88+
}
89+
const current = checkPublicTextSurfaces(ROOT, runtimeConfig)
90+
assert.ok(current.surfaceCount > runtimeConfig.surfaces.length, 'normative/public root expansion must be active')
8291
assert.ok(!current.results.some(item => item.path.startsWith('website/docs/versions/')), 'historical version docs must not be current public-text surfaces')
8392
assert.ok(!current.results.some(item => item.path.startsWith('changelogs/releases/')), 'historical release notes must not be current public-text surfaces')
8493
if (current.blockers.length) {
@@ -87,5 +96,8 @@ if (current.blockers.length) {
8796
}
8897
process.exitCode = 1
8998
} else {
90-
console.log(`public text integrity passed: surfaces=${current.surfaceCount} warnings=${current.warnings.length}`)
99+
console.log(
100+
`public text integrity passed: surfaces=${current.surfaceCount} warnings=${current.warnings.length}` +
101+
(websitePresent ? '' : ' website=optional-absent')
102+
)
91103
}

‎website/README.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# website/(维护者文档站 · 不进公开仓)
2+
3+
本目录是 **DevCodex 维护者文档站**(Rspress 源码),**不进入公开 Git 默认跟踪**,也 **不打进 npm 包**。
4+
5+
## 策略
6+
7+
| 通道 | 是否包含 website |
8+
|------|------------------|
9+
| 公开 Git 仓库 | **否**(见根目录 `.gitignore`) |
10+
| `npm pack` / `npm install -g devcodex` | **否**(`package.json` `files` 未列入) |
11+
| 维护者本机 | **是**(本地保留完整 `website/` 以便 `cd website && npm run dev`) |
12+
13+
## 用户文档
14+
15+
公开用户请阅读仓库根目录 **[README.md](../README.md)**。
16+
17+
## 维护者
18+
19+
若你已有本目录完整历史拷贝,可在本机继续构建文档站。若从公开仓全新克隆,默认 **没有** `website/docs` 全量内容;门禁会将 website 视为 optional。

0 commit comments

Comments
 (0)