Package-local rules in a monorepo
Keep per-package adoption rules next to the package while the central files stay the router.
Goal: let each package carry its own architecture, testing or code-design rules, and let skills load only the packages a diff or story touches.
Prerequisites
- A monorepo with pair installed
- The central adoption files in
.pair/adoption/tech/
Steps
- Wait for, or request, the proposal
- In your assistant: skills never activate the override on their own. When
review,assess-*orrefine-storysee three or more packages with recurring package-specific rules, or a central file past 400 lines, they propose a scaffold plan (which packages, which rules move, the router to add) and wait for your approval. You can also ask for the plan directly. - With
/pair-assistant(optional, Claude Code): "add package-local rules for apps/web".
- In your assistant: skills never activate the override on their own. When
- Declare the router
- In your assistant: add a
## Package-Local Adoptiontable to the centraltech/<area>.mdwith one row per package:Package | Local context | Areas, for exampleapps/web | apps/web/.pair/ | architecture, testing.
- In your assistant: add a
- Create the package files
- In your assistant: write
<pkg>/.pair/<area>.mdfor each listed package and area, holding only the package-specific rules. Global rules stay central. - With
/pair-assistant(optional, Claude Code): shows each file before writing.
- In your assistant: write
- Move, do not duplicate
- A rule present both centrally and locally is reported as a conflict by
reviewandassess-*, never resolved silently. Delete the central copy when a rule becomes local.
- A rule present both centrally and locally is reported as a conflict by
Verify
- A review of a diff in
apps/webloads the global rules plusapps/web/.pair/, and nothing from other packages. pair-cli validate-configstill passes: local.pair/directories are project content, never a registry target.
Related
- Package-local adoption: precedence, scoped loading and the thresholds
- Adoption files