Overview
Use the native DRC Rule Editor to create constraints and conditions for PCB checks. In a compatible Full interface, open Tools → DRC Rule Editor. Check build and host availability; this native panel is not a companion-host guarantee.
Start with a saved board and actual manufacturer/process requirements. Keep a copy of custom rules before replacing them with a preset or import.
Constraint Types
Choose the constraint that matches the physical requirement and check its available fields. A supported constraint panel does not mean every exporter or router implements that constraint in the same way.
Clearance
Set spacing between copper objects. Review the condition's object/net-class scope; copper, hole, edge, and courtyard clearances are different requirements.
Track Width
Set the permitted width range and any target/optimum value. An optimum with tolerance needs sensible bounds; a geometric width rule does not by itself prove current capacity or impedance.
Via Style
Review drill, pad diameter, and annular-ring requirements for the intended via type. Blind, buried, and microvias also require compatible stackup and manufacturer processes.
Matched Length
Set requirement-derived length and skew limits with explicit units and scope. Creating a rule does not add meanders or route a bus. Use native length tuning and matched groups to inspect and tune members.
Text Height & Thickness
Set readable text height and stroke limits on the intended layers. Check the actual silkscreen output and the manufacturer's printing limits.
Courtyard Clearance
Set component-courtyard spacing. A courtyard is library geometry, not an independent measurement of enclosure clearance, tool access, or thermal separation.
Custom Expressions
Use the expression input and offered completions for object properties, functions, and conditions. Check syntax, rule ordering, and which objects the condition actually matches. Autocomplete is assistance, not proof that the rule expresses the engineering requirement.
Rule Management
Naming and Validation
Use descriptive names and review duplicate-name warnings. A syntactically valid rule can still target the wrong objects or conflict with another rule.
Dynamic Unit Labels
Read each displayed unit before entering a value. For reference, 1 mil is 0.0254 mm; 6 mil is 0.1524 mm. Check conversions when copying a capability table.
Keyboard Shortcuts
Use the editor's save action; default shortcuts depend on OS and build. Confirm the rules were saved rather than assuming a keypress succeeded.
Scrolling
Review the whole relevant rule set, including conditions and later rules, before deciding which constraint applies.
Workflow
- Open the intended board and verify its active rules/preset.
- Add or edit a named constraint using current design and manufacturer requirements.
- Check values, units, conditions, and precedence.
- Save and inspect any validation errors.
- Refill zones and run Inspect → Design Rules Checker → Run DRC.
- Locate affected objects, correct the design or rule as justified, and rerun DRC.
The active .kicad_dru and board/net-class settings govern DRC. Assistant preferences in .trace/rules.md do not override those constraints.
If the Rules Do Not Apply
Check syntax errors, file permissions, condition scope, rule order, and the selected preset. A failed rule load is not a clean board. Correct the file or restore the previous known rule set, then run DRC again.
For manufacturer selection and importing a file, see DRC Import. For the final review, see Design Review.