What It Does
Each project can hold two short Markdown files that the assistant reads:
- Your rules, in
.trace/rules.md: your personal preferences, such as a preferred manufacturer, passive size, part makers or how you like the assistant to work. In the app this is called Project Rules. - The project notebook, in
.trace/context.md: what the project needs and what has been decided, such as requirements, chosen parts and why, and open questions.
Rules are guidance for the assistant, not checks. Limits you need enforced, such as track widths and clearances, belong in your design rules and DRC.
File Location
Both files sit in a .trace folder inside your project folder:
my-project/
├── my-board.kicad_pro
├── my-board.trace_sch
├── my-board.trace_pcb
└── .trace/
├── rules.md # Your preferences (Project Rules)
└── context.md # Project notebook, shared with your team
Older projects may have a .tracerules file. Trace now reads only .trace/rules.md, so copy anything you still want from the old file into it.
Edit Your Rules
- In the chat, click Rules at the top right.
- The Project Rules editor opens with the current project's rules. Type your preferences.
- Click Save.
The editor can also open the .trace folder for you. You can edit .trace/rules.md in any text editor too.
The same Rules button is in the Trace Plugin chat, and it edits .trace/rules.md in the selected project's folder.
Rules File Format
Use short Markdown sections. Say which items are musts and which are preferences:
# My Preferences
## Components
- Prefer 0603 passives where the design allows.
- Keep any part number I chose unless I approve a change.
- Prefer TI for voltage regulators.
## Placement
- Start placement from the external connectors and work inward.
## Working Style
- Explain any pinout or package assumption before changing parts.
How the Assistant Uses Your Rules
Trace sends your rules file with every message you send, so the assistant has it from the first step. Changes apply from your next message. Only the first 20 KB of the file is sent, so keep it short and put the important items first.
trace-cli chat sends the same file for the project you point it at.
Manufacturer limits
When you apply your own manufacturer profile, or import a manufacturer's rule file, in the board editor's DRC dialog, Trace writes its limits into a Manufacturing Constraints section of your rules file, so the assistant designs within them. For PCBWay, JLCPCB and Pikkolo, the assistant looks the limits up by name.
Writing a manufacturer's name in your rules doesn't change your board's design rules. Choose the manufacturer's rules in the DRC dialog, and run DRC. See DRC Import.
The Project Notebook
.trace/context.md holds what the project needs: goals, chosen parts and the reasons for them, interface and enclosure requirements, results you have checked, and open questions.
The assistant reads the notebook at the start of its work and adds facts it has checked. Read it now and then and correct anything that is out of date: a note in the notebook is not a measurement or an approval.
Sharing With Your Team
In a team project in Workspaces:
.trace/context.mdis part of the project. It is shared when you commit and push, and merges like other project files..trace/rules.mdstays on your computer. Each teammate keeps their own preferences.
Both files are sent to the assistant with your requests, so don't put passwords or other secrets in either one.
What to Put in Your Rules
- Preferred manufacturer, package sizes and part makers.
- How you like schematics drawn and named.
- Placement habits, such as where connectors go.
- How you want the assistant to work, such as asking before swapping parts.
Put requirements the whole team must follow in the notebook instead, so everyone gets them.
What Not to Put
- Passwords, keys or private information.
- Instructions to skip DRC or ERC, or to ignore whole categories of findings.
- Claims that a design passed a test or a review it hasn't had.
- Several copies of the same requirement that disagree.
Example: A Shared Notebook
# Sensor Board: Requirements
## Requirements
- The programming header must be reachable through the enclosure opening.
- Keep the USB-C connector on the top edge, centred.
## Decisions
- 3.3 V regulator: TPS62133, chosen for efficiency at 500 mA.
## Open Questions
- Confirm the enclosure drawing and the connector's mating clearance.
Getting Good Results
Keep rules short and specific. If the assistant doesn't follow one, check that it is near the top of the file and that it doesn't clash with the notebook or your request. Always check the design itself rather than a note about it.
See the TraceRules reference for a quick summary.