.agents/skills/turborepo/references/boundaries/RULE.md
Experimental feature - See RFC
Full docs: https://turborepo.dev/docs/reference/boundaries
Boundaries enforce package isolation by detecting:
package.json dependenciesturbo boundaries
Run this to check for workspace violations across your monorepo.
Tags allow you to create rules for which packages can depend on each other.
// packages/ui/turbo.json
{
"tags": ["internal"]
}
Rules go in root turbo.json:
// turbo.json
{
"boundaries": {
"tags": {
"public": {
"dependencies": {
"deny": ["internal"]
}
}
}
}
}
This prevents public-tagged packages from importing internal-tagged packages.
Allow-list approach (only allow specific tags):
{
"boundaries": {
"tags": {
"public": {
"dependencies": {
"allow": ["public"]
}
}
}
}
}
Deny-list approach (block specific tags):
{
"boundaries": {
"tags": {
"public": {
"dependencies": {
"deny": ["internal"]
}
}
}
}
}
Restrict dependents (who can import this package):
{
"boundaries": {
"tags": {
"private": {
"dependents": {
"deny": ["public"]
}
}
}
}
}
Package names work in place of tags:
{
"boundaries": {
"tags": {
"private": {
"dependents": {
"deny": ["@repo/my-pkg"]
}
}
}
}
}