Skip to content

Hosted Breakspec is in private beta. Ask for access

Docsreviews

Team rules

A team writes its review rules in a file in the repository, in plain English. Breakspec holds each pull request to these rules.

Where the file goes

Put the rules in .breakspec/rules.md at the root of the repository. Write sentences or a list. There is no special syntax.

The file is optional. Without a rules file, a review runs with no team rules and the rules reviewer does not run.

An example file

.breakspec/rules.md
# Review rules for this repository- A signal that crosses clock domains goes through `cdc_sync` or an async FIFO from `rtl/common/`.- A register that software can write resets to the value in `docs/regmap.md`.- A change to a register offset or a bit field also changes `fw/include/regs.h` in the same pull request.- An AXI-Stream source holds `tvalid` and `tdata` stable until `tready` is high.- No `initial` block in synthesizable RTL. Use a reset.- We accept unsynchronized reads of the quasi-static configuration registers in `cfg_regs.sv`. Do not report them.

Write each rule so that a reviewer can check it in the code. Name the module, the file or the signal that the rule is about.

Rules come from the target branch

Breakspec reads the rules from the branch the pull request goes into. It does not read them from the pull request.

So a pull request cannot change the rules it is reviewed under. If a pull request edits a rules file, the summary comment says so. The edit applies after the merge.

A rule that you add to the target branch applies to each open pull request from its next review.

A finding must quote its rule

One reviewer holds the change to the rules. A finding that cites a rule must quote the rule. Breakspec checks the quote against the file.

If the quoted words are not in the file, Breakspec drops the citation. A reviewer cannot report a rule that the team did not write.

The comment on the pull request shows the rule and the file and line where it is written. A second agent then judges the finding against the rule as written.

Nothing is simulated for a rule. A finding that cites only a rule states how far it got in one of these phrases:

phrasemeaning
breaks a team rule, checked against the codeThe second agent read the code and agrees that the change breaks the rule.
team rule, uncertain after a second lookThe second agent could not decide.
team rule, raised by a reviewer, not examinedNo second agent examined the finding.

If a broken rule and a defect are the same problem at the same line, the author gets one finding. It is the defect, with the rule on it.

Rules for one folder

A rules file in a folder applies to that folder only. For example, rtl/.breakspec/rules.md applies to files below rtl/.

A finding on a file outside the folder cannot cite a rule from that file.

Rules that say what the team accepts

A rule can also say what the team accepts. The last line of the example file does this.

All reviewers and the second agent read the rules before they report or confirm a finding. A finding that the rules accept is not raised.

When a collaborator tells Breakspec in a reply that the team accepts a finding, the answer offers a line for this file.

Such a rule is an instruction to the reviewers. It does not remove paths from the review. To do that, list the paths in .breakspec/ignore, one pattern on a line, written as in a .gitignore file. Breakspec reads this file from the target branch too. The file is new. See Configuration.

Limits

  • Breakspec reads up to 8,000 characters of one rules file, and up to 16,000 characters of all rules files together. The summary comment says when a file was cut.
  • Files written for coding agents, such as CLAUDE.md and AGENTS.md, are given to the reviewers as background. A finding cannot cite them.