Skip to content

refactor(book): name the five cross-cutting design patterns once in Chapter 1 - #861

Merged
bojieli merged 2 commits into
book/unify-security-taxonomyfrom
book/name-cross-cutting-patterns
Aug 15, 2026
Merged

refactor(book): name the five cross-cutting design patterns once in Chapter 1#861
bojieli merged 2 commits into
book/unify-security-taxonomyfrom
book/name-cross-cutting-patterns

Conversation

@bojieli

@bojieli bojieli commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Implements item 6 of the structural review: "几个横切模式在 5-6 章里被反复重新推导".

Stacked on #860 (which is stacked on #859). Retargets to main as those merge.

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:

Pattern Chapters it appears in
Proposer-Reviewer 3, 4, 5, 7, 9, 10
Progressive disclosure 2, 3, 4, 10
Append-only 2, 3, 4
Boundary set + retention set 7, 8, 9
Minimal diff / reversible 1, 2, 3, 5, 6, 7, 9

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:

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 (#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 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.

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

bojieli and others added 2 commits August 15, 2026 18:25
…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>
@bojieli
bojieli merged commit c91d4f5 into book/unify-security-taxonomy Aug 15, 2026
1 of 2 checks passed
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