docs(C34): v2 勘误保留 + 补 4 个 v2 模式 (YAO-132) - #62
Merged
Conversation
在 v1 7 模式基础上新增 4 个 v2 架构模式: - 模式 8: Bridge IPC — crash-recovery pointer + mtime 心跳 - 模式 9: Coordinator-Agent — 同源码双角色,env 切换 - 模式 10: Migration-as-Code — 11 个独立幂等迁移文件 - 模式 11: Output-Style-as-Plugin — markdown + frontmatter 扩展协议 更新章节内引用:24→33 篇,7→11 个模式。重写 mermaid 关系图,补 4 个新模式与既有模式的连边。closing 章节 扩展为 8 条 trade-off。 保留 v1 全部 H1/H2 与 7 个模式正文;遵循 v1 散文体(每节 问题→解法→迁移要点),保持代码块比例。 Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
L855 小标题保持 '## 7 个模式的全景关系'(绕开 C-2,无需 spec/CI 改动)。 L857 改写说明 11 个模式由 v1 提炼 7 个 + v2 新增 4 个组成,本节沿用 v1 的 7 个骨架展开关系图,新增 4 个模式并入对应象限叙述。事实层面圆口径。 Co-authored-by: multica-agent <github@multica.ai>
YAO-132 的最终修法: - docs/25-架构模式总结.md L855: '## 7 个模式的全景关系' → '## 11 个模式的全景关系',与正文/源码事实一致。 - 同文件正文删除 'v1/v2' 'v1 提炼的 7 个 + v2 新增的 4 个' 等修订口径表述,符合 spec §0.1:v1/v2 是 squad 内部代号,不进读者侧成书。 - scripts/check-heading-preservation.ts 新增 heading-rewrite-allowlist.txt 单行豁免通道,避免事实勘误必须改写标题时被迫加 frontmatter(与 §0.1 no-frontmatter 闸互锁)。 - scripts/heading-rewrite-allowlist.txt 仅登记 docs/25 的 '## 7 个模式的全景关系' 一条,附 YAO-132 原因。 由尧哥拍板方案 1,覆盖此前麻薯的方案 C。 Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
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.
概要
YAO-132 / C34《架构模式总结》v1→v2 勘误保留档。
来源 commit
290fdc9481a70612bc5823aa4ed225c52c52aad3(Claude Code 源仓库),所有引用均含 file:line 锚点。风格双亲实证
风格双亲:v1-03《状态管理 — React 与非 React 世界的状态桥接》+ v1-20《API 调用与错误恢复 — 面向不可靠网络的鲁棒设计》
两章都是"先把问题的真实复杂度铺开 → 给一段源码 → 解释为什么这么写 → 给迁移启示"的散文体,正是本章模式 8(Bridge IPC)/ 模式 9(Coordinator)需要复刻的叙事节奏。
v1 原文摘抄(真实摘自 docs/,未删改)
v1-03 节选 ·
docs/03-状态管理.mdL7–L16("为什么状态管理值得单独一篇?"小节)(中文计数 ≈ 250 字,超过 200 字闸)
v1-20 节选 ·
docs/20-API调用与错误恢复.mdL7–L17("为什么需要如此复杂的错误恢复?"小节)(中文计数 ≈ 280 字,超过 200 字闸)
本 PR 新写正文摘抄(真实摘自
docs/25-架构模式总结.md本次新增段落)新写段落 1 · 模式 8 Bridge IPC 开篇 + 解法 + 哲学解释(L592–L626)
(中文计数 ≈ 290 字,超过 200 字闸;叙事性段落,非纯代码过渡段,刻意复刻 v1-20 "先把真实复杂度铺出来再剖析源码"的破题节奏)
新写段落 2 · 模式 9 Coordinator-Agent 开篇 + 解法 + 减法白名单(L650–L684)
(中文计数 ≈ 280 字,超过 200 字闸;叙事性段落,复刻 v1-03 "先讲为什么这个方案不行 → 给最终选择"的对照节奏)
段落统计
CI 验证
按 YAO-132 issue 显式要求:「只提 PR,不要 merge」——Yao 手动合并。