Lesson 0007 · ~12 minutes · synthesis
One skill: given a multi-project brief, defend topology + tool + moon loop + one risk you own — without feature tourism.
This is the durable skill from MISSION.md (issue #10): standardize multi-project maintenance with monorepo judgment and moon as the concrete tool — or knowingly pick Turborepo / Nx / Bazel / polyrepo when they fit better.
You can complete this from lessons 1–6 alone. Official comparison pages remain optional enrichment, not a gate.
Related projects that change together, shared standards, atomic API/type fixes → monorepo. Hard isolation / separate access / independent release ownership with no shared change pressure → polyrepo. Deploy monolith is a different axis (lesson 1).
Package manager workspaces only link packages. You still need a project graph + tasks + affected + cache or you are collocating (lessons 2, 6; Nx KB).
Pick the class of tool for the job — next section. Do not start from brand loyalty.
Sources: moon’s own feature comparison (explicitly incomplete / may be outdated — use as a map, not gospel) and monorepo.tools/compare.
| Tool | Best-fit signal | Not the default when… |
|---|---|---|
| Turborepo |
JS/TS monorepo; mostly
package.json scripts + cache; thin layer; Vercel
remote cache OK
|
Need built-in language toolchain, non-JS projects as first-class, or repo-wide task inheritance without repeating scripts (moon: Turbo ≈ scripts orchestrator + cache) |
| moon | Config-first; task inheritance; integrated toolchain pins; polyglot commands on PATH + managed envs; ownership / constraints; repo management beyond pure turbo-style pipelines | You only want the thinnest JS script cache and already live in pure npm workspaces with no pin story |
| Nx | Full monorepo platform: plugins, generators, deep affected/CI, distributed task execution / cloud features (monorepo.tools marks DTE + deflake + agentic CI for Nx) | You want minimal surface and will not invest in Nx’s plugin / cloud model |
| Bazel | Hermetic sandbox builds; transparent remote execution; extreme multi-language scale (Bazel’s differentiator on monorepo.tools) | Small/medium web monorepo that will not pay BUILD-file and hermetic modeling cost |
Mission bias is valid: for “standardize multiple projects with shared tasks + toolchain + orchestration,” moon is a strong default — not the only correct tool. Lerna is now Nx-flavored package/publish (moon comparison); treat as Nx-adjacent, not a third major path.
moon initprojects (globs or sources).moon/tasks + inheritedBy.moon/toolchains full semvermoon run scope:task and CI with
--affected
Cheat sheets: everyday loop, inheritance, toolchain, deal-breakers.
“We use mono | poly because job; tool is moon | turbo | nx | bazel because need; if moon, loop is init → map → inherit → pin → run affected; we own ownership | cache inputs | migration | isolation.”
Equal-length options. Design-review fluency.
Gate A — strongest polyrepo default?
Gate C — best Turborepo fit?
Gate C — best moon fit for this track’s mission?
Gate D — strongest monorepo+moon ship package?
Recommended: moon feature comparison (read the caveats first) + skim monorepo.tools compare for Bazel/Nx/Turbo/moon capability rows. Print the playbook sheet for real reviews.