| name | world-monorepo |
| description | Use when navigating Shopify's World monorepo, working across multiple zones, managing sparse checkouts, or discovering code locations. Covers zone structure, manifest lookups, checkout management, and cross-zone code changes. |
World Monorepo Navigation
Core Concepts
Terminology
- World Path: Path starting with
//(e.g.,//areas/tools/tec,//areas/tools/tec/README.md) - Zone Path: World Path at the root of a zone (has
zone.nixand manifest entry), e.g.,//areas/tools/tec - Zone ID: Stable identifier (
W-+ 6 hex chars), defined in//.meta/manifest.json - Worktree: A separate working copy of the repo with its own checkout
- Checkout root:
$HOME/world/trees/<treeName>/src
Worktrees
World supports multiple worktrees. The git directory lives at ~/world/git, with worktrees at ~/world/trees/<name>/src.
Common worktrees:
root- Default worktree (~/world/trees/root/src)hotfixes- For hotfix work (~/world/trees/hotfixes/src)- Custom worktrees for parallel work
World paths (//) resolve relative to the current worktree:
- In
~/world/trees/root/src/areas/foo→//.meta=~/world/trees/root/src/.meta - In
~/world/trees/hotfixes/src/areas/foo→//.meta=~/world/trees/hotfixes/src/.meta
Each worktree has its own sparse checkout configuration.
Zone Structure
Zones are NOT nested. Almost everything lives in a zone. Major roots:
//areas- Application code//libraries- Shared code//protocols- Schemas//config- Shared configs//.meta- Tectonix build system
Finding Zones
Discover Current Zone
tec resolve .
Returns the //zone/path for the current directory.
List All Zones
tec zone list
Zone Manifest
The source of truth for all zones is //.meta/manifest.json. Use this to:
- Find zones by name or ID
- Discover all zones in a specific area
- Look up zone IDs for external references
Sparse Checkout Management
World uses sparse checkout. Files outside checked-out zones are NOT available on disk. Each worktree maintains its own sparse checkout configuration.
List Checked-Out Zones
tec checkout list
Add a Zone to Checkout
tec checkout add //path/to/zone
Remove a Zone from Checkout
tec checkout remove //path/to/zone
Access Files Not in Checkout
Use git show to read files without adding to sparse checkout:
git show HEAD:path/to/zone/file
Cross-Zone Code Changes
When modifying code across multiple zones:
- Identify all affected zones: Search for usages across zones using
git showor add zones to checkout - Add zones to checkout:
tec checkout add //zone/pathfor each zone you need to modify - Verify zone dependencies: Check
zone.nixfor declared dependencies between zones - Make coordinated changes: Update all zones atomically to avoid broken intermediate states
- Test across zones: Run tests in each affected zone
Zone Development Environment
Each zone can define commands in dev.yml. Common commands:
dev up- Build nix environment (activated via Shadowenv)dev server- Start development serverdev console- Interactive consoledev test- Run testsdev style- Run linting
To run dev commands: /opt/dev/bin/dev <command>
Navigation Patterns
Finding Code by Domain
- Check
//areasfor application code organized by team/domain - Check
//librariesfor shared utilities - Check
//protocolsfor API schemas
Finding Dependencies
- Look at
zone.nixfor declared zone dependencies - Search for imports across zones using the manifest
Path Resolution
From a checkout (e.g., $HOME/world/trees/root/src/areas/tools/dev):
//.metarefers to$HOME/world/trees/root/src/.meta- Paths are relative to the checkout root, not the filesystem root