Skip to content

docs(governance): P2 文档治理(归档 4 篇 / 纳入 3 篇)+ 悬空指针与 main 分支守卫 - #48

Merged
babycoder-dev merged 1 commit into
mainfrom
chore/agent-infra-p2-docs
Oct 7, 2026
Merged

babycoder-dev merged 1 commit into
mainfrom
chore/agent-infra-p2-docs

Conversation

@babycoder-dev

Copy link
Copy Markdown
Owner

Summary

P2「文档治理」——docs/agent-workflow.md 的最后一个 P 阶段。7 篇不受 doc-index 管辖的顶层文档逐一定性(每篇都读过内容,不凭标题),外加一道防"移动文档打断引用"的门禁,和一条针对我自己反复犯的错的守卫。

处置结果

文档 定性 依据
iteration-roadmap.md 归档 自 2026-05 起自标"已过时",Phase 划分与现行里程碑不一致
ai-handoff.md 归档 已被机制取代(P1.1);手工状态文档漂移 4.5 个月
open-questions.md 归档 零引用;多数已解决(ORM=Drizzle、UI 自研、身份源、部署)
github-cicd.md 归档 引导期产物;§3 的 CI 命令列表已过期
community-roadmap.md 纳入 README 引用;补"项目未发布、非权威、可能滞后"状态条
good-first-issues.md 纳入 同上
desktop-client.md 纳入 M20+ 专题,内容仍有效

仍然生效的内容是迁走而不是埋掉:未决的早期待确认项 → 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:repo
UI 还原度 A 类门禁:通过(215 个文件)
证据形式门禁:通过(生效起点后 5 条条目)
技能格式门禁:通过(4 个技能)
文档路径引用门禁:通过(90 个文件,无悬空指针)
分支门禁:通过(当前分支 chore/agent-infra-p2-docs)      exit 0
  • pnpm check:repo exit 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

  • 7 篇的定性是否认可(尤其:community-roadmap / good-first-issues 我选择保留并标注非权威而不是归档——它们是 README 里的贡献入口,删掉等于我替产品决定"不做社区化")
  • doc-refs 只报"曾被移除"的窄规则是否认可(放宽会立刻产生 32 条误报,见验证记录)
  • check:branch 作为"防我自己犯错"的门禁是否值得保留
  • 纯文档 + 仓库工具改动,不涉及代码 / API / 权限 / 迁移

备注

docs/archive/github-cicd.md 里 §3 的 CI 命令列表是错的——但我没有去修正归档文件:归档是历史快照,按当时事实写、不追改(与 verification-log.md 同理)。正确版本在 development-workflow.md §8。

… 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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@babycoder-dev
babycoder-dev merged commit 183d842 into main Oct 7, 2026
3 checks passed
@babycoder-dev
babycoder-dev deleted the chore/agent-infra-p2-docs branch October 7, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant