Exactly one way
Every operation has one path. Multiple paths to the "same" thing diverge over time, hide bugs in the unused branch, and force readers to figure out which is canonical.
Concrete applications
- Sync daemon start — one entrypoint:
sync.sh start [--wait-ready]. There is nosync.sh onceand no "synchronous mode" flag.--wait-readycovers the "I want to know when it's done seeding" case. - Cold copy — one path:
_cold_copy_via_watchman. There is no host-watchman fallback, no "detect-and-degrade" branch, noif not have_watchman: rsync_full. Watchman missing is a fail-loud SystemExit at the subprocess layer. - Dev toolchain habitat — distrobox, mandatory. There is no
--no-distroboxflag, no "host-side install" alternative, nocommand -v lx ||host-fallback. The Containerfile is the toolchain spec. - Watchman install —
dnfinside the container, period. Not "Fedora RPM if available else build from source else apt repo else zip extract". One path. - Consent — running the script is the consent. One press-Enter splash up front. No per-step Y/n.
The audit prompt
When you see two ways to do something, ask:
- Is one of them load-bearing for a real platform? (e.g. WSL vs Linux is real; "host has watchman" vs "container has watchman" is not — it's a decision we made.)
- If both paths exist, what test exercises the non-default branch? If nothing does, delete that branch.
- Are we maintaining a fallback for an impossible state? (E.g. "what if watchman isn't installed even though sync.Containerfile installs it?" — that's a stale-container problem, fixed by always rebuilding, not by adding a fallback.)
What this rule does not mean
- WSL and Linux paths legitimately differ (engine binary lives in different places, sync only matters on WSL). Real platform branches stay.
- Configurability via
.env(BAR_DATA_DIR,ALLOW_SPRINGSETTINGS_MOD) is fine. One mechanism (the env var), one read site, one decision point.
When tempted to add a second path
Ask: would the user notice if we deleted the new path tomorrow? If no, don't add it. If yes — what's wrong with the existing path that we can't fix in place?