Skip to main content

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

Go to Code Review SettingsRepository → click on a directory to configure it. Each directory can have its own:
  • Kody Rules (file-level and PR-level)
  • Review options (which analysis types to enable)
  • Suggestion control (severity filters, max suggestions)
  • Ignored paths

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 — Configure suggestion control per directory

High-traffic packages might need stricter limits:
  • apps/web/ — max 5 suggestions, medium severity filter (frontend moves fast)
  • libs/shared/ — max 15 suggestions, low severity filter (stability matters)
  • infra/ — max 3 suggestions, high severity filter (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
For more on directory configs, see Directory-Level Configuration. For rule inheritance, see Rules Inheritance.