docs: record github cli split boundary

This commit is contained in:
Codex
2026-06-25 16:24:58 +00:00
parent 00b167b68d
commit 2d551fb944
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -9,6 +9,14 @@ UniDesk 受控 GitHub 操作入口,底层 issue/PR REST 读写走 `bun scripts
**固定入口前缀**: `cd /root/unidesk && bun scripts/cli.ts gh ...`
## 实现边界
GitHub 受控入口的长期架构权威是 `project-management/PJ2026-01/specs/PJ2026-010606-github-controlled-entry.md``scripts/src/gh.ts` 只保留兼容 re-export;新增或修改 GitHub 子命令必须落到 `scripts/src/gh/` 下对应职责模块(client/options/refs/body/issue/pr/board/attachments/escape-scan/help/index 等),不得把业务实现重新堆回根入口。
拆分后的 gh 模块文件头应保留 `SPEC: PJ2026-010606 GitHub入口 <实现引用版本>` 追溯,单个模块超过 3000 行时继续拆分。PR closeout 除常规 smoke 外,应覆盖至少一条 `trans gh:/... apply-patch --dry-run` 或等价写回路径,证明虚拟正文仍走同一 guard。
CLI 自检使用 `bun scripts/cli.ts check --syntax-only`、针对被改模块的 `bun --check <file>` 和必要 `gh ... --dry-run`/read smoke。不要把 `bun --check scripts/cli.ts` 当作低噪声自检;它可能执行根 help 并触发 dump。需要 scripts 类型检查时走 `bun scripts/cli.ts check --scripts-typecheck ...`,让 CLI 输出 heartbeat 和 bounded timeout 结果。
## 写入语言
- Issue/PR 的正式写入一律使用中文,包括标题、正文、评论、关闭/重开说明、PR 描述、PR 评论和 merge closeout 说明。