.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
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

