principle-build-the-lever
造杠杆
When the work isn’t trivial, build the tool that does it instead of doing it by hand.
活不琐碎时,造能干这活的工具,别手干。
Why: Two payoffs. Throughput: a codemod, generator, or script does the work the same way every time and reruns for free. Confidence: the tool is one artifact a reviewer can read and rerun to check the work. Hand-done changes can only be re-verified by redoing them. A deterministic script turns “trust me” into “run this”.
为什么: 两头赚。吞吐:codemod、生成器或脚本每次同样干,重跑免费。信心:工具是审阅者能读、能重跑以核对的一份产物。手改只能靠重做再验证。确定性脚本把「信我」变成「跑这个」。
Pattern: Default to building the lever. Skip it only when the task is trivial, a couple of obvious edits you can see at a glance.
模式: 默认造杠杆。只有活琐碎、一眼能看完的几处明显编辑时才跳过。
-
Do the first unit by hand to learn the recipe, then build the tool. Prove it by rerunning it on that unit and diffing against your hand-done version. Make the lever safe to rerun.
-
Codemod or script for edits, generator for repetitive files, a dump-to-sqlite query for analysis, a rerunnable check for verification.
-
A deterministic lever beats fan-out. If the tool can process every unit in one pass, run it yourself. Don’t fan out delegates to hand-apply what a script can do.
-
When you fan work out to subagents, write the lever as a skill they all read: the recipe, the verification contract, and the do-not-touch fences in one artifact. Keep it outside the delegates’ write scope so they can’t quietly edit the contract.
-
Applying this principle produces a file. If you cited it and there is no codemod, script, generator, or delegate skill in the diff, you didn’t apply it.
-
Commit the lever when the work outlives the session.
-
先手做第一单元摸清配方,再造工具。在该单元上重跑并对齐手做版本来证明。让杠杆可安全重跑。
-
编辑用 codemod 或脚本;重复文件用生成器;分析用 dump-to-sqlite 查询;验证用可重跑检查。
-
确定性杠杆胜过扇出。工具一趟能处理全部单元,就自己跑。别扇出委托手去套脚本能干的活。
-
扇出给 subagent 时,把杠杆写成大家都读的 skill:配方、验证契约、勿碰篱笆,一份产物。放在委托写范围外,免得他们悄悄改契约。
-
应用本原则会产出文件。你引用了它,但 diff 里没有 codemod/脚本/生成器/委托 skill,就等于没应用。
-
活比会话活得久,就把杠杆 commit 进去。
Balance: The bar is triviality, not repetition. A one-off still earns a lever when the lever is what makes the work checkable. Per the Laziness Protocol, build the smallest script that does or proves the job, never a framework.
平衡: 门槛是琐碎与否,不是是否重复。一次性活若杠杆才能让活可核对,也值得造。按 Laziness Protocol,造能完成或证明工作的最小脚本,绝不要框架。
Distinct from Encode Lessons in Structure, which makes a recurring instruction a durable guardrail. This is throughput and reviewability on the work in front of you. For scripting the verification itself, see Prove It Works.
不同于 Encode Lessons in Structure(把反复出现的指示变成持久护栏)。本原则管眼前活的吞吐与可审阅性。验证本身要脚本化,见 Prove It Works。