Reference

Monorepos glossary

Shared vocabulary for this workspace. Lessons stick to these meanings.

Monorepo
A single version-control repository that holds multiple distinct projects (apps, libraries, tools) with well-defined relationships between them. Not the same as a monolith. Without graph-aware tooling, you often only have code collocation.
Polyrepo (multi-repo)
One repository per project (or per team/service). Independence and isolation by default; cross-repo changes and shared tooling become coordination problems.
Monolith
A deployment / architecture shape: one application that ships as one unit. Orthogonal to monorepo. You can put many independently deployable services in one monorepo, or keep a monolith in its own polyrepo.
Code collocation
Multiple projects live in one git tree, but without task graphs, caching, affected detection, or boundaries. Easy to start; tends to get slow and messy as the repo grows.
Atomic change
One commit (or one PR) that updates a producer and all in-repo consumers together — e.g. rename an API and fix every caller — so mainline stays consistent. A classic monorepo advantage at Google scale and small scale.
Project (moon)
A library, application, package, binary, or tool inside the workspace. Has a unique ID, optional moon.* config, and may dependsOn other projects. Not the same as a git repository.
Project graph
A directed map of projects and how they depend on each other. Tools use it to run only what a change can affect, order tasks, and enforce boundaries. In moon, this is a core concept (DAG of projects).
Workspace (moon)
In moon: a directory that contains projects, manages a toolchain, runs tasks, and is coupled with a VCS repository. The root is denoted by a .moon folder.
Task
A named command run in the context of a project (lint, test, build, …). Monorepo tools often support inheritance so you define a task once and many projects get it.
Task inheritance (moon)
Define tasks once under .moon/tasks/**; matching projects receive them. Controlled by inheritedBy conditions and per-project workspace.inheritedTasks (include / exclude / rename). Same-name local tasks merge with strategies (append, prepend, replace, preserve).
Target (moon)
A compound identifier pairing a scope with a task (e.g. which project + which task). Used on the CLI and in dependency edges between tasks.
Toolchain (moon)
Layer that downloads, installs, and pins language/tool versions so local machines and CI share a deterministic environment. Configured in optional .moon/toolchains.*; powered by proto (~/.proto). Without it, tasks use the system toolchain (PATH). Pin with version; escape hatch MOON_TOOLCHAIN_FORCE_GLOBALS for preinstalled CI/Docker binaries.
Affected
Projects or tasks impacted by a change (e.g. git diff + graph). Running only affected work is how monorepos stay fast in CI.
Package manager workspaces
npm / pnpm / Yarn / Bun workspaces: install and link local packages so projects can import each other. They do not by themselves provide full task orchestration, remote cache, or affected pipelines — that is the monorepo build system layer (moon, Nx, Turborepo, …).
moon
A Rust-written task runner and monorepo management tool for the web ecosystem (and more languages): project graph, task inheritance, integrated toolchain, caching, orchestration. This track’s concrete tool.