Native workspaces (recommended)
Create a separate blueprint for each subdirectory. Each workspace gets its own initialize, maintenance, and knowledge sections with the working directory automatically set to the subdirectory.
Subshells
Run commands in subdirectories within a single blueprint using
(cd dir && command). Simpler for small monorepos with only a few packages.Native workspaces
Recommended for most monorepos. Native workspaces give each subdirectory its own blueprint with isolated setup, knowledge, and working directory. This is cleaner and easier to maintain than subshells as the number of packages grows.
cd or subshells needed.
The root blueprint
Every repo using native workspaces is expected to have a root blueprint. The root blueprint runs from the repository root and executes before any workspace-scoped blueprints. Use it for shared setup that applies across the entire repo — installing runtimes, global tools, or running root-level dependency installs.Creating a workspace
- Go to Settings > Environment > Blueprints
- Click on the repository
- Open the Workspaces tab and click Add blueprint
- Enter the subdirectory path (e.g.,
packages/frontend) - Write the blueprint for that workspace
Example
A monorepo with a React frontend and a Python backend. The root blueprint installs shared tools, then each workspace handles its own dependencies:- Root
- packages/frontend
- packages/backend
knowledge entries are scoped to that subdirectory. When Devin works in packages/frontend, it sees the frontend lint/test/dev commands — not the backend ones.
When to use native workspaces
- Subdirectories have different languages or package managers
- Each package needs its own knowledge entries (lint, test, build commands)
- You want isolated setup — a broken blueprint for one workspace doesn’t block the others
- The number of packages is growing and a single blueprint is getting unwieldy
Subshells
For simpler monorepos, you can manage everything in a single blueprint by changing into each subdirectory inside the step that needs it:cd lasts only until the end of its step. The parentheses (cd ... && ...) create a subshell, which also resets the working directory for the remaining lines of the same step.
Why subshells matter
A barecd carries over to the following lines of the same run, so use subshells when one step changes directory more than once:
packages/backend inside packages/frontend and fail.
When to use subshells
- The monorepo has a few packages with straightforward setup
- All packages share the same language and package manager
- You don’t need per-package knowledge entries
Knowledge entries for monorepos
Whether you use native workspaces or subshells, well-structured knowledge entries help Devin navigate the codebase:Examples
Turborepo / Nx workspace
For workspaces managed by a monorepo build tool like Turborepo or Nx, install dependencies at the root and let the tool handle per-package orchestration:Multiple JDK versions
A Java monorepo where different services require different JDK versions:Org blueprint for shared tools
When multiple monorepo packages share the same tools, install them once in the org-wide blueprint. Go to Settings > Environment > Blueprints and click Edit on the Organization blueprint row in the Configuration section:Best practices
Prefer native workspaces for complex monorepos
Prefer native workspaces for complex monorepos
When each subdirectory has its own language, package manager, or build process, native workspaces keep each blueprint focused and independent. Reserve subshells for simple cases with a few packages.
Use subshells when a step changes directory more than once
Use subshells when a step changes directory more than once
During a build, each step starts in the blueprint’s working directory, so a
cd never carries into the next step. Within one step, wrap cd commands in parentheses: (cd dir && command). This prevents one line’s directory change from affecting the lines after it.Order maintenance steps by dependency
Order maintenance steps by dependency
If package A depends on package B being built first, list B’s build step before A’s install step in
maintenance. Blueprint steps run sequentially in the order listed.Add a structure knowledge entry
Add a structure knowledge entry
A knowledge entry named
structure that maps directories to their languages and tools helps Devin navigate the codebase. Include which package manager each subdirectory uses and any cross-package dependencies.Use per-package knowledge entries
Use per-package knowledge entries
Instead of one large knowledge entry, create separate entries for each package (e.g.,
frontend, backend, ml-pipeline). With native workspaces, each workspace has its own knowledge section built in.Keep maintenance incremental
Keep maintenance incremental
Use
pnpm install (not pnpm install --force) and uv sync (not rm -rf .venv && uv sync). Incremental commands are faster during periodic rebuilds.Related pages
- Declarative environment configuration
- Blueprint reference
- Template library — includes ready-to-use monorepo templates

