Goal: fast, correct monorepo builds with maximal cache reuse.
Use for:
- structuring tasks across multiple packages
- slow CI from rebuilding unchanged packages
- setting up local and remote caching
Workflow:
- Define tasks and their dependsOn graph in the pipeline.
- Declare inputs and outputs so caching is correct.
- Run with workspace filters to scope to affected packages.
- Enable local caching; verify cache hits on reruns.
- Add remote caching to share across CI and team.
- Tune task boundaries to maximize parallelism.
Patterns:
- pipeline dependsOn to order build/test/lint correctly
- precise inputs/outputs to avoid false cache hits and misses
- --filter to run only affected packages
- remote cache for CI and cross-machine reuse
Rules:
- declare every output a task produces, or caching breaks
- keep tasks deterministic so cache results are valid
- do not over-couple packages; it kills parallelism
- verify cache correctness before trusting CI speedups