Replace workflow docs sync with single-session orchestration#16
Merged
Conversation
wlvh
force-pushed
the
agent/simplify-workflow-docs-sync
branch
from
July 21, 2026 05:41
fd00006 to
6b8d2ca
Compare
wlvh
marked this pull request as ready for review
July 21, 2026 06:04
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.
Supersedes #13
1. 背景与目标
workflow-docs-sync的旧实现依赖六 mode harness、运行状态、review Skill 和发布绑定。本 PR 将其替换为一次用户调用、单会话内建编排,并删除旧控制面。
本轮不重新设计产品,只处理三个合并 blocker:删除仓库中 tracked 的旧
PR_BODY.md、让安装器在升级时精确清理旧 reviewer Skill,以及严格验证可选.gitignore的文件类型和 UTF-8 编码。2. 实现方案
workflow-docs-sync为单会话 Skill;无 subagent 平台时按四个隔离章节顺序执行。sync_docs.py只暴露prepare/check:固定 upstream SHA、预检 dirty allowlist、只安装缺失模板,并只读检查九份最终文档。workflow-docs-sync,同时在两个固定平台 root 精确删除workflow-docs-sync-review;目录使用shutil.rmtree,symlink 或普通文件使用unlink,不扫描其他 Skill,不读写.source.json,不保存 migration state。.gitignore缺失时允许;存在时必须是非 symlink 普通 UTF-8 文件,并继续使用 Git-equivalent whitespace 检查。PR_BODY.md;根.gitignore继续允许本地普通 PR 草稿。3. 变更范围
PR_BODY.mdzh/skills/workflow-docs-sync/.gitignore严格检查的sync_docs.pyzh/skills/workflow-docs-sync-review/zh/scripts/install_skills.pyscripts/、en/scripts/、旧zh/scripts/文件tests/test_workflow_docs_sync.py本轮没有恢复旧 harness、mode、state、receipt、PR body 协议、
.source.json或GitHub adapter,也没有改变主体架构。
4. 文档影响
受影响文档包括根目录与中英文 README、中英文 development workflow 入口,以及
zh/docs/development_workflow/decisions.md中的 DEC-005。它们说明单会话入口、主Agent 唯一写入、四领域只读分析、内部审计和最终机械检查。
本轮三个 blocker 是仓库卫生、安装升级和机械检查正确性修复,不新增产品能力或
用户流程,因此没有追加架构重设计。
5. 用户与架构影响
用户只调用一次
$workflow-docs-sync,只提供目标仓库、可选语言和可选 draft PR意图。upstream checkout/SHA、领域分工和机械命令都是 Skill 内部细节。
同步过程不读取、改写或删除目标仓库自己的 ignored
PR_BODY.md,不创建.coding_workflow,不 commit、push 或执行 GitHub 写操作。PR 发布使用仓库外临时Markdown body,并且只在本地报告获得用户明确批准后执行。
6. Review / 修复记录
PR_BODY.md仍是 tracked 的旧运行产物并引用已删除协议git rm、工作树不存在、index 不再跟踪;目标 ignored 草稿回归继续通过workflow-docs-sync-reviewremoved_obsolete与幂等回归.gitignore可因 Git 返回 1 且无诊断而误通过7. Case A 独立验证
7.1 Untouched heavy clone
portability 问题,不是
workflow-docs-sync编排或 checker 失败。7.2 Test-only rebased disposable heavy clone
10 -> 11 -> 10 -> 12通过。63/63 PASS。75/75 PASS。结论:
workflow-docs-syncCase A 通过。本 PR 没有修复、掩盖或宣称修复SEC_metrics committed artifact 的可移植性。
8. 已知限制与回滚
仍会因此失败。本 PR 不修改该 artifact portability 问题。
Supersedes #13只表示本 PR 取代其方案,不关闭 issue。9. 验证
python3 -m pytest -q tests/test_workflow_docs_sync.py:87 passed。python3 -m pytest -q:87 passed。python命令别名;python -m pytest -q返回 command not found,同一解释器入口已用
python3完整执行并通过。python3 -m py_compile zh/skills/workflow-docs-sync/scripts/sync_docs.py zh/scripts/install_skills.py:通过。quick_validate.py:Skill is valid!。git diff --check:通过。14 passed。695个wc -l物理行;测试:999个wc -l物理行。sync_docs.py --help只列出{prepare,check}。prepare/check不创建.coding_workflow或PR_BODY.md。本地验证没有重跑或修改远端 CI,也不声称存在两个不同的 CI checks。
10. 过程与发布闸门
上一轮提前发布违反了“先报告、后批准、再发布”的人工闸门。本轮已恢复两阶段流程:
第一阶段只进行本地修改、测试、仓库外 PR body 准备并返回报告;收到用户明确批准后,
第二阶段才 amend 单一 commit、以
force-with-lease推送并更新本 PR body。PR 保持draft;本轮没有评论 PR、关闭 issue 或创建新 PR。