The challenge
In a monorepo, different packages have different standards. Your React frontend cares about component patterns, your NestJS backend cares about dependency injection, and your shared libs care about API stability. A one-size-fits-all review doesn’t work.Strategy overview
Kodus supports three config levels that map naturally to a monorepo:Step 1 — Map your packages
Identify the distinct areas in your monorepo and their review needs:Step 2 — Create directory-level configs
In the sidebar, open the scope picker at the top of the Code review group and choose Add repository configuration. In Create repository settings, Select the target repository (the monorepo), then Select the target directories (one or more package folders) and click Create settings. Each directory appears indented under the repository in the scope picker — pick it to configure it. Each directory can have its own:- Kody Rules (file-level and PR-level)
- What to review (which categories to enable, and the minimum severity to post)
- Ignored files (on General)
Step 3 — Write targeted rules
Frontend rules (scope: apps/web/)
Backend rules (scope: apps/api/)
Shared library rules (scope: libs/shared/)
Step 4 — Use Memories for cross-cutting conventions
Some conventions apply everywhere. Teach them as Memories:Step 5 — Set the severity threshold per directory
High-traffic packages might need stricter filters. Pick the directory in the scope picker, open What to review, and set Minimum severity to post:- apps/web/ — Medium (frontend moves fast)
- libs/shared/ — Low/All (stability matters)
- infra/ — High (fewer but critical)
Step 6 — Ignore generated paths
Add monorepo-specific ignores to avoid noise:Tips
- Start with 2-3 rules per directory and expand based on what your team actually flags in reviews
- Use rule inheritance — org-level rules cover security, repo-level covers conventions, directory-level covers architecture
- If a rule fires too often in one package but is valid elsewhere, exclude that directory from the rule rather than weakening it