Domains

The architectural areas Scrubby identifies in a codebase, and the files that belong to each one.

A domain is a capability of the system, such as "Authentication", "Billing", "API Layer", or "Background Jobs". Domains are discovered from the codebase's structure, imports, naming, and directory organization.

Global domains

Global domains are predefined domain templates that activate automatically based on the technology detected in a repository. For example, detecting Ruby in a Gemfile activates Ruby-related global domains, while detecting React in package.json activates frontend ones.

Global domains cover:

Because global-domain knowledge is shared across repositories, a newly indexed repository gets reasonable domain coverage immediately, before its own repository-scoped domains are established.

Repository-scoped domains

Repository-scoped domains are specific to a single codebase and are discovered during indexing. For example, a fintech application might have "Transaction Processing", "Risk Assessment", and "Regulatory Reporting" domains that a generic template wouldn't predict. These are refined on every incremental index as the codebase changes.

Viewing domains

How domains relate to each other and how that powers blast-radius analysis is covered in Domain Connections.