.trace/rules.md is a plain Markdown file that tells the AI how you want to design. Write your preferences once; the AI follows them every session — no repeating yourself.
For a full conceptual overview, examples, and best practices, see Core Concepts → TraceRules.
File Location
.trace/rules.md(recommended).tracerulesin the.kicad_prodirectory.tracerulesin the project root
What You Can Configure
| Category | Example Rules |
|---|---|
| Placement strategy | ”Place decoupling caps within 2mm of IC power pins”, “Group by functional block” |
| Manufacturer target | ”Preferred fab: JLCPCB 4-layer”, “Min trace width: 6mil”, “Surface finish: ENIG” |
| Passive sizes | ”0402 imperial default”, “0201 where space-constrained” |
| Clearance & trace width | ”Power traces: minimum 20mil for 1A”, “USB diff pair: 90Ω impedance” |
| Thermal relief | ”Thermal relief on all ground pads”, “Direct connect for high-current pads” |
| DRC ignore categories | ”Ignore silkscreen overlap warnings”, “Skip courtyard checks on test points” |
| Routing conventions | ”No acute angles on high-speed signals”, “Route clocks on inner layers” |
| Component preferences | ”Prefer parts with JLCPCB stock”, “AEC-Q200 rated passives” |
Quick Setup
From the Desktop App
Open the TraceRules editor from the chat panel menu: ⋮ → TraceRulesFrom the CLI
By Hand
Create.trace/rules.md in your project and write in plain Markdown:
How the AI Uses Rules
Every time you start a conversation, the AI:- Reads
.trace/rules.mdfor your explicit preferences - Reads
.trace/context.mdfor accumulated project knowledge - Applies manufacturer DFM constraints if you’ve specified a fab
- Follows your conventions throughout the session
Workspace Context (.trace/context.md)
This companion file is maintained by the AI automatically. It acts as a design notebook that persists learnings across conversations:- Component decisions and rationale
- Custom-generated symbols and footprints (parts created from a datasheet or by request, rather than pulled from a library)
- Layout constraints discovered during routing
- DFM feedback from previous manufacturing attempts
- Design history and tradeoffs
Tips
Related
- TraceRules — Full Guide — Detailed concepts, workspace context, and complete examples
- DRC Import — Import manufacturer constraint files
- CLI
rulesCommand — Manage rules from the terminal

