Repository navigation
docs(governance): P2 文档治理(归档 4 篇 / 纳入 3 篇)+ 悬空指针与 main 分支守卫 - #48
Merged
Merged
Conversation
… pointers, and block work on main P2 of docs/agent-workflow.md plus a guard for a mistake I made twice in this session. Governance: archives four top-level docs into docs/archive/ with per-file headers (iteration-roadmap was self-marked obsolete since 2026-05, ai-handoff was superseded by mechanism, open-questions had zero references and mostly resolved content, github-cicd was bootstrap-era with a stale CI list), and brings three under governance with explicit authority statements (community-roadmap and good-first-issues are unreleased-project placeholders, desktop-client is a topic doc). Live content moved rather than buried: unresolved early questions into foundation-progress 7.7, CI steps and branch protection into development-workflow 8. Gates: scripts/check-doc-refs.mjs reports only references whose path was once committed and is gone, so forward-looking references do not become 32 false positives; scripts/check-branch.mjs refuses to let local main carry uncommitted changes or unpushed commits. The git pre-commit route was tried and abandoned because git here cannot spawn an extension-less hook script - an unverifiable guard is worse than none.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P2「文档治理」——
docs/agent-workflow.md的最后一个 P 阶段。7 篇不受doc-index管辖的顶层文档逐一定性(每篇都读过内容,不凭标题),外加一道防"移动文档打断引用"的门禁,和一条针对我自己反复犯的错的守卫。处置结果
iteration-roadmap.mdai-handoff.mdopen-questions.mdgithub-cicd.mdcommunity-roadmap.mdgood-first-issues.mddesktop-client.md仍然生效的内容是迁走而不是埋掉:未决的早期待确认项 →
foundation-progress.md§7.7(密码策略/等保、2FA、桌面端离线与更新源、Linux 发行版优先级、OpenIM 运维与保留策略);CI 步骤与分支保护 →development-workflow.md§8。四篇归档文件各带"何时/为何归档/职责由谁接管"的头,docs/archive/README.md写明归档约定。两道新门禁
pnpm doc-refs(悬空指针):用一次git log --all --diff-filter=DR建索引,只报"曾经提交过、现已不在工作树"的引用。前瞻引用(如计划中的docs/testing-strategy.md)与别的项目的文档树不算违规。不扫docs/archive/**与verification-log.md(时间点快照,不追改)。pnpm check:branch:本地main上有未提交改动或未推送提交即失败(CI 的 detached HEAD 与非 main 分支跳过)。这是为我自己加的——同一会话里我两次把改动直接提交到本地main,两次都靠人工"建分支引用 +reset --hard"补救。Verification
pnpm check:repoexit 0(现为 6 道门禁)pnpm vitest run --config vitest.config.mts scripts→ 104 通过(八套)doc-refs的负向验证:先只提交四次git mv、不改引用 → 门禁精确报出 6 处悬空指针(全部指向docs/ai-handoff.md,无误报);补齐引用后通过check:branch的负向验证:在main上改动一个已跟踪文件 →[B1]+ exit 1;在特性分支上通过;detached HEAD 跳过git mv,历史保留Review Focus
community-roadmap/good-first-issues我选择保留并标注非权威而不是归档——它们是 README 里的贡献入口,删掉等于我替产品决定"不做社区化")doc-refs只报"曾被移除"的窄规则是否认可(放宽会立刻产生 32 条误报,见验证记录)check:branch作为"防我自己犯错"的门禁是否值得保留备注
docs/archive/github-cicd.md里 §3 的 CI 命令列表是错的——但我没有去修正归档文件:归档是历史快照,按当时事实写、不追改(与verification-log.md同理)。正确版本在development-workflow.md§8。