Skip to main content
.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

The AI loads rules from the first file it finds, in priority order:
  1. .trace/rules.md (recommended)
  2. .tracerules in the .kicad_pro directory
  3. .tracerules in the project root

What You Can Configure

Quick Setup

From the Desktop App

Open the TraceRules editor from the chat panel menu: ⋮ → TraceRules

From 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:
  1. Reads .trace/rules.md for your explicit preferences
  2. Reads .trace/context.md for accumulated project knowledge
  3. Applies manufacturer DFM constraints if you’ve specified a fab
  4. Follows your conventions throughout the session
If a rule conflicts with electrical safety or engineering best practices, the AI prioritizes correctness and explains why.

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
You can read it to see what the AI has learned, but generally should not edit it — the AI keeps it current. Each project has its own independent context file.

Tips

Be specific. “Use 10K pull-ups on I2C” is better than “use appropriate pull-ups.” Concrete rules produce consistent results.
Layer preferences by priority. Put your most important constraints first — the AI weighs earlier rules more heavily when resolving conflicts.
Combine with DRC Import. Import your manufacturer’s .kicad_dru file to get machine-checked constraints in addition to your natural-language preferences. See DRC Import.