Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

principle-sequence-verifiable-units

把工作排成可验证单元

Order work as a sequence of small units, each ending in a state you can check, and don’t advance until the current one is green.

把工作排成小单元序列,每个以可检查状态结束;当前变绿之前别前进。

Why: A break caught at the unit that caused it is cheap to localize. A break caught after a batch is buried, and you have already built further on a broken base. Sequencing those same units into a delivery a reviewer can replay turns “trust me” into “watch it go red, then green.”

为什么: 在造成破坏的单元抓住问题,定位便宜。一批之后才抓住,问题被埋住,你已在坏基底上继续建。把同样单元排成审阅者可回放的交付,把「信我」变成「看它先红再绿」。

Execution. In a sweep, migration, or any run of similar edits, verify each change before starting the next. Each unit is a before/after bracket: known-good state, one change, run the check, then proceed. Rebase onto clean trunk first so every check measures against the real baseline. When a lever does the edits, the per-unit check is nearly free. Run it anyway.

执行。 清扫、迁移或任何一串相似编辑里,验证完一处再开下一处。每个单元是前后括号:已知好状态 → 一处改动 → 跑检查 → 再继续。先 rebase 到干净主干,让每次检查对照真实 baseline。杠杆在做编辑时,逐单元检查几乎免费。照样跑。

Delivery. Stack commits and PRs in the order that proves the work. The canonical shape is the failing test first, then the fix on top. Other story orders are a subtraction before the reshape, a baseline capture before the treatment, the scaffold before the feature. Each commit lands on its own and the sequence reads as an argument.

交付。 按能证明工作的顺序叠 commit 与 PR。经典形状是先失败测试,再叠修复。其他叙事顺序:先减再重塑、先抓 baseline 再处理、先脚手架再功能。每个 commit 独立落地,整条序列读起来像论证。

The sequencing complement to the prove-it-works principle skill, which keeps each check real, and the build-the-lever principle skill, which makes the per-unit check cheap.

这是 prove-it-works(让每次检查真实)与 build-the-lever(让逐单元检查便宜)在排序上的互补。