Reference / Reference

TraceRules Reference

File locations, sharing scope and concise examples for project preferences and notes.

Use .trace/rules.md for personal design preferences and .trace/context.md for project requirements and notes. See TraceRules for the full explanation.

File Location

my-project/
├── my-board.kicad_pro
├── my-board.trace_sch
├── my-board.trace_sch.xo
└── .trace/
    ├── rules.md     # Personal preferences
    └── context.md   # Shared project notes

.tracerules is legacy. Current native requests use .trace/rules.md; do not assume a fallback priority or automatic merge of several rule files. Review old content before moving intended preferences into the current file.

What You Can Configure

  • Preferred packages and sourcing constraints, subject to actual part fitness.
  • Schematic naming, hierarchy and drawing preferences.
  • Layout/mechanical requirements grounded in the selected board and enclosure.
  • Manufacturer targets to verify in actual DRC settings.
  • Review priorities and unresolved design questions.

Text preferences are not machine-enforced limits. Do not use rules to suppress DRC categories or bypass required review.

Quick Setup

From the Desktop App

Use TraceRules in chat controls where offered. Check the active project, edit the Markdown and save. Exact entry points depend on the build.

From the CLI

The native trace-cli bundled with Trace reads bounded .trace/rules.md preferences for new chat requests; it has no separate rules command. Edit the file in Trace or your text editor, then save it before starting the next CLI turn.

Install Trace and sign in to the main app first for hosted CLI chat. The CLI reuses that session; an expired session needs desktop refresh/sign-in. Use native chat options with an explicit --mode ask for read-only assistance. Preferences do not grant Workspaces operation authority.

By Hand

Create or edit .trace/rules.md as short Markdown:

# Personal Preferences

## Components
- Prefer 0603 imperial passives where appropriate.
- Do not replace an exact selected MPN without asking.

## Review
- Explain unresolved package and pinout assumptions.
- Confirm the active manufacturer rules before layout.

How the AI Uses Rules

Capable native requests include bounded rules as context. Large files can be truncated; keep important requirements explicit and concise. Save before the next new request. Host behavior and existing-task resume can differ.

Naming a manufacturer does not itself activate its DRC preset. Rules do not waive ERC/DRC, guarantee electrical correctness or authorize Push/merge or physical hardware actions.

Workspace Context (.trace/context.md)

The notebook can record confirmed requirements, decisions, rationale and open questions. Read and correct it; an assistant-written note is not automatically current or independently verified.

In native Workspaces:

  • .trace/context.md is shared project content and participates in Commit/Push/Pull/merge.
  • .trace/rules.md is personal and excluded from Workspaces publication.
  • .traceignore is the inclusion policy, not the preference file.
  • Checkout metadata, credentials and operation recovery are not shared notes.

Personal rules can still be sent to hosted AI as context. Do not place secrets in either file. Other hosts' sharing behavior needs its own verification.

Tips

  • Distinguish mandatory requirements from preferences.
  • Resolve contradictory notes instead of relying on file or line order.
  • Put team requirements in the shared notebook only after reviewing confidentiality.
  • Use DRC Import and actual checks for enforceable limits.
  • Inspect the saved design; a note claiming completion is not an operation receipt.