Brass

PythonKiCadOpenSCADTyper

The Problem

When AI agents generate hardware designs — schematics, enclosures, firmware — there's no automated way to validate that everything is consistent before sending files to manufacturing. A pin mismatch between the schematic and firmware, a BOM part that doesn't match the footprint, or an enclosure that's too small for the board — these are expensive mistakes that only surface when the physical prototype arrives wrong.

Brass is hardware CI for AI agents. It orchestrates KiCad, OpenSCAD, and PlatformIO to validate design files, check cross-artifact consistency, and package manufacturing-ready bundles.

How It Works

The core workflow is designed for AI-in-the-loop iteration:

  1. AI generates hardware files (schematic, PCB, enclosure, firmware)
  2. brass validate runs cross-artifact checks and reports findings as structured JSON
  3. AI reads the errors and fixes the designs
  4. Repeat until all checks pass
  5. brass package creates a manufacturing-ready ZIP bundle

Everything is driven by a brass.yaml manifest that declares the project's design files, constraints (power budget, cost limits, board dimensions), and which validators to run.

Cross-Artifact Validation

This is where Brass shines. Instead of checking files in isolation, it validates relationships between artifacts:

  • Pin assignments: do schematic net names match firmware pin definitions?
  • BOM matching: does every component in the schematic have a valid sourced part?
  • Board dimensions: does the enclosure actually fit the PCB?
  • Power budget: does total draw stay within the declared supply?
  • I2C/SPI compatibility: are bus addresses and clock speeds consistent across schematic and firmware?

With --profile full, Brass also shells out to the backend tools themselves — running KiCad's ERC/DRC, compiling firmware via PlatformIO, and rendering the enclosure in OpenSCAD.

Tech Stack

Built with Python and Typer for the CLI, Pydantic for manifest validation, and asyncio for parallel subprocess execution. Parsers use kiutils for KiCad files, regex and CSV for firmware and BOM data. The v1 target is ESP32-S3 sensor gadgets with USB-C, I2C sensors, and PLA enclosures.

The design is intentionally opinionated for a narrow device class first, with the goal of expanding to broader hardware targets over time.