refactor(book): name the five cross-cutting design patterns once in Chapter 1 - #861
Merged
bojieli merged 2 commits intoAug 15, 2026
Merged
Conversation
…hapter 1 Five structures recur across the book, and until now each chapter re-derived its own version and then wrote a paragraph explaining how it relates to the other chapters' versions. Proposer-Reviewer alone appears in chapters 3, 4, 5, 7, 9 and 10; progressive disclosure in 2, 3, 4 and 10; append-only in 2, 3 and 4; boundary set + retention set in 7, 8 and 9; minimal reversible diffs in 1, 2, 3, 5, 6, 7 and 9. Add a new Chapter 1 section, "Design Patterns That Run Through the Book", which names all five and gives each a canonical definition together with the list of chapters that instantiate it. The section closes on what they share: every one of them moves judgment from "the model decides" to "a mechanism outside the model decides"—the reviewer sits outside the context, the catalogue outside the body text, the cache outside the change, the retention set outside the boundary set, the rollback outside the commit. The three-layer guardrails introduced earlier in the same chapter are that motif applied to security. Later chapters now call the patterns by name instead of re-deriving them: chapter 3 points at Chapter 1 rather than enumerating chapters 4, 5 and 10; chapter 5 says its Proposer-Reviewer loop and chapter 4's pre-approval are the same named pattern; chapters 4, 7, 8 and 9 label their local variants. Applied to the Chinese edition and all 12 translations. Also fixes the Vietnamese chapter 1, whose thought-questions heading was an H3 while every other edition uses an H2. Verified: experiment, figure and thought-question inventories still match the Chinese across all 13 editions, chapter 1 now has the same section count everywhere, and there are no dangling footnotes, missing images or unbalanced code fences. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Implements item 6 of the structural review: "几个横切模式在 5-6 章里被反复重新推导".
The problem
Five structures recur across the book, and until now each chapter re-derived its own version and then wrote a paragraph explaining how it relates to the other chapters' versions:
Chapter 3 literally said "沿用第四、第五和第十章的提议者-审核者机制" — pointing sideways at three other chapters because there was no canonical definition to point at.
The fix
A new Chapter 1 section, "Design Patterns That Run Through the Book", names all five and gives each a canonical definition plus the list of chapters that instantiate it.
It closes on what they share — and this is the part worth reading:
The three-layer guardrails introduced earlier in the same chapter (#860) are that same motif applied to security, so the two sections reinforce each other.
Later chapters now call the patterns by name instead of re-deriving them:
Chapter 1's summary gains one bullet for the five patterns.
Scope
Applied to the Chinese edition and all 12 translations.
Drive-by: the Vietnamese Chapter 1 had its thought-questions heading as an
###while every other edition uses##; fixed, so Chapter 1 now has the same section count in all 13 editions.Verified: experiment, figure and thought-question inventories still match the Chinese across all 13 editions; no dangling footnotes, missing images, or unbalanced code fences.
Note on a pre-existing divergence
The verifier flags that chapters 7 and 8 have one more
##section in every translation than in the Chinese. That predates this PR — it is the chapter-7 content desync reported earlier and is untouched here.🤖 Generated with Claude Code