Skip to content
Source
Sign inSign up

Review by domain

Software factory / Pull requests

Review a big pull request by domain

A big pull request shows its files in one flat list. You cannot see which files go together, where to start, or how far you are.

4 min read

The File domains step of the PR summary agent puts the changed files in named groups, the domains, in a reading order. An AI model makes the groups. Then code makes sure that each changed file is in exactly one domain.

You need the File domains step on. It is off by default: see For admins: turn it on.

1. Open Files changed

  1. Open the pull request.
  2. Click the Files changed tab.

The sidebar has a Domains section, above the category chips. On a small screen, click Files to open the same sidebar.

The section shows All files first. Then it shows each domain in reading order, with its progress, for example 2 of 14 viewed.

2. Pick a domain

Click the name of a domain. The file list and the diff show only the files of that domain, in reading order.

The URL keeps the domain that you picked (dom), so you can share the link or come back to it.

The Files changed tab with the Core definitions domain picked: the Domains section shows each domain with its viewed count, and the diff shows only the 4 files of the domain.

3. Read the note and Read first

A note above the diff shows the name of the domain and what changes in it.

When the domain depends on other domains, the note shows Read first: and a button for each of them. Click a button to go to that domain.

4. Mark the files as viewed

When you finish a file, click Viewed on its header. The count next to the domain goes up, for example from 2 of 14 viewed to 3 of 14 viewed.

The Viewed marks are the same marks as in All files. They stay in your browser.

5. Go back to all files

Click All files at the top of the Domains section. The diff shows every file again, with your other filters.

Done

You review your part of the pull request first, in the order of its domains. The count of each domain tells you how far you are.

  • The domains describe the latest push. Each push gets new domains. While the agent groups the files of a new push, the section says "Grouping the files of the latest push".
  • A file that the model did not put in a domain goes in the last domain, Other.

For admins: turn it on

The File domains step is off by default. Its agent, PR summary, is off by default too. To turn the step on:

  1. Open the repository, then Agents.
  2. In the sidebar, click Agents under Software factory.
  3. Turn on the switch of PR summary.
  4. Click Settings next to PR summary.
  5. Under Steps, turn on File domains. It saves at once.

The step runs when a pull request opens, when it is made ready, and on each push to it. It runs next to the Impact step, and no step waits for it. Who starts it of PR summary applies, and its default is Everyone.

When the latest push has no domains and no run on it is going, the picker uses the domains of an older commit. A file that those domains do not list goes in Other.

It does not run on every pull request:

  • A pull request with fewer than 10 changed files gets no domains.
  • A pull request with more than 5000 changed files, or a file list that is too large to make, is skipped. src pr domains gives the reason.

The run gives the model the pull request, its intent summary, the paths of all its changed files and its diff, in one call. The diff is cut at 150,000 characters. The model reads no files itself.

The model is the model of PR summary: GPT-6 Luna when the forge has an AI Gateway, else the Workers AI model. Its cost counts toward the monthly spend cap of the owner. To change the model or the trigger, see Factory settings.

Note

With the step off and no domains for the latest push, the Domains section does not show.

Your agent can read the same answer

Your agent can read the domains of a pull request: src pr domains <number> (add --json for JSON), the MCP tool get_pull_domains, or GET /api/v1/repos/{owner}/{repo}/pulls/{n}/domains.

When the latest push has no domains, src pr domains prints why, for example "This pull request changes fewer than 10 files, so it has no domains."