Astro + Starlight docs site at docs-site/ with 18 pages organized by diataxis: getting-started (intro, install, config), guides (9 how-to guides), reference (tools, batch, env vars), development (architecture, adding tools, troubleshooting). Includes Docker infrastructure following warehacking cookie-cutter pattern: multi-stage Dockerfile (Node builder -> Caddy prod / Node dev), docker-compose with caddy-docker-proxy labels, Makefile. Content migrated from docs/ markdown guides with Starlight frontmatter, cross-links updated, and full-text search via Pagefind.
3.9 KiB
| title | description |
|---|---|
| Design Rule Checks | Run DRC checks, track violations, and generate rule sets |
The DRC tools let you run Design Rule Checks on your KiCad PCB designs, get detailed violation reports, track progress over time, and generate technology-specific rule sets. All DRC operations use kicad-cli and do not require a running KiCad instance.
Prerequisites
- KiCad 9.0 or newer installed
kicad-cliavailable in your system PATH (included with KiCad 9.0+)
Running a DRC check
Run a DRC check on my project at /path/to/project.kicad_pro
The run_drc_check tool:
- Locates the
.kicad_pcbfile for the project - Runs DRC via
kicad-cli pcb drc - Parses the JSON report to extract violations
- Saves results to DRC history
- Compares with previous runs (if available)
Viewing DRC reports
Current report
Show me the DRC report for /path/to/project.kicad_pro
Loads the kicad://drc/project_path resource, showing total violations, categorized issues, violation details with locations, and recommendations for common fixes.
DRC history
Show me the DRC history for /path/to/project.kicad_pro
Loads the kicad://drc/history/project_path resource, showing a visual trend of violations over time, table of all check runs, comparison between first and most recent checks, and progress indicators.
Understanding violations
Common categories
| Category | Description | Common fixes |
|---|---|---|
| Clearance | Items too close together | Increase spacing, reroute traces |
| Track Width | Traces too narrow | Increase trace width, check current requirements |
| Annular Ring | Via rings too small | Increase via size, adjust manufacturing settings |
| Drill Size | Holes too small | Increase drill diameter, check fab capabilities |
| Silkscreen | Silkscreen conflicts with pads | Adjust silkscreen position, resize text |
| Courtyard | Component courtyards overlap | Adjust placement, reduce footprint sizes |
Generating rule sets
Technology-specific rules
Create a DRC rule set for HDI technology
The create_drc_rule_set tool generates rules tailored to specific PCB technologies:
- standard -- conventional PCB manufacturing
- HDI -- high-density interconnect
- RF -- radio frequency designs
- automotive -- automotive-grade requirements
Exporting rules
Export DRC rules for RF technology in KiCad format
The export_kicad_drc_rules tool outputs rules in KiCad-compatible text format, ready to paste into your project's design rules.
Manufacturing constraints
Get manufacturing constraints for automotive technology
The get_manufacturing_constraints tool returns numeric limits (minimum track width, clearance, via size, etc.) along with design recommendations and notes for the specified technology.
Workflow
The DRC tools work alongside KiCad's built-in DRC:
- Run the mckicad DRC check to get an overview and start tracking progress
- Use KiCad's built-in DRC for interactive fixes (highlights exact locations in the editor)
- Re-run the mckicad DRC to verify fixes and update the history
Custom design rules
Use the DRC prompt templates for help creating specialized rules:
I need custom design rules for a high-voltage circuit with 2kV isolation
This provides guidance for high-voltage circuits, high-current paths, RF constraints, and specialized manufacturing requirements.
Troubleshooting
DRC check fails
- Ensure the project exists at the specified path
- Verify the project contains a
.kicad_pcbfile - Check that
kicad-cliis in your PATH or setKICAD_CLI_PATH - Use the full absolute path to the project file
- Check the server logs for detailed error information
Incomplete results
- Verify the PCB file is not corrupted -- try opening it in KiCad
- Ensure you are using KiCad 9.0+ for full kicad-cli DRC support
- Check that all referenced libraries are available