Reference / Reference

TraceRules Reference

Where your rules file and the project notebook live, who sees them and how the assistant uses them.

A quick summary of the two files the assistant reads in every project. For the full explanation, see TraceRules.

The Two Files

Your rulesProject notebook
File.trace/rules.md.trace/context.md
HoldsYour personal preferencesProject requirements, decisions and open questions
Edit withRules in the chat (the Project Rules editor, or the Rules tab of the project's notes in Flow), or any text editorAny text editor; the assistant also adds facts it has checked. In Flow, read it on the Context tab under Rules
In a team projectStays on your computerShared with the team when you commit and push
Sent to the assistantWith every message (first 20 KB)Read at the start of the assistant's work

File Location

my-project/
├── my-board.kicad_pro
├── my-board.trace_sch
├── my-board.trace_pcb
└── .trace/
    ├── rules.md     # Your preferences
    └── context.md   # Project notebook

A .tracerules file from an older project is no longer read. Copy what you still need into .trace/rules.md.

What You Can Put in Your Rules

  • Preferred manufacturer, package sizes and part makers.
  • Schematic naming and drawing preferences.
  • Placement habits.
  • How you want the assistant to work, such as asking before it swaps a part.

Rules guide the assistant; they don't enforce limits. Keep enforced limits in your design rules and run DRC.

Quick Setup

In the Trace App or Trace Plugin

  1. Open a project.
  2. In the chat, click Rules.
  3. Type your preferences in the Project Rules editor and click Save. In Flow, press Write rules (or Edit rules) on the Rules tab, then Save.

By Hand

Create .trace/rules.md in your project folder:

# My Preferences

## Components
- Prefer 0603 passives where appropriate.
- Don't replace a part number I chose without asking.

## Working Style
- Explain package and pinout assumptions before changing parts.

With trace-cli

trace-cli chat sends the same .trace/rules.md for the project you point it at. There is no separate rules command: edit the file, save it, then start your next chat. Install the Trace app and sign in to it before you use trace-cli. See CLI commands.

Manufacturer Limits

When you apply your own manufacturer profile or import a manufacturer's rule file in the board editor's DRC dialog, Trace adds a Manufacturing Constraints section to your rules file. Naming a manufacturer in your rules doesn't change the board's design rules; choose them in the DRC dialog. See DRC Import.

Tips

  • Say which items are musts and which are preferences.
  • Keep the file short; put the most important items first.
  • Put team-wide requirements in the notebook so everyone gets them.
  • Don't put passwords or other secrets in either file: both are sent to the assistant.
  • Check the design itself, not a note that says something was done.