Project Data
Every Harnice project keeps its design in a few lists. Build instructions write them, and every drawing, BOM, and export is derived from them. This page says what each list is for. The columns of each one are in the data schemas. See Schema.
Instances
An instances file is a list of every physical or notional item, idea, note, part, instruction, circuit, drawing element, thing, or concept that describes how to build a harness or system.
It is the single source of truth for the project you are working on. Other inputs, especially build instructions (your Python script), build this file, and all output documentation is derived from it.
- Harnesses and systems each have one (
instances.json). - Each instance has an
item_type. Harnice supports a fixed set of item types. An underscore joins two words into one name (harness_connector). A hyphen means hierarchy: acable-segmentis the part of acablethat runs along onesegment. - You may add your own columns.
- A system also writes a post-harness instances file: the system's instances plus the instances each harness added at the harness level.
Signals lists
A signals list defines every signal going into or out of a device or disconnect. It is the primary way Harnice stores information about a device.

Signals lists are usually repetitive, long, and deterministic. Harnice helps you write them with build instructions: Python rules that build the list for you.

Harnice checks these rules every time you build the device that owns the list:
General Signals List Rules
-
A channel type is electrical information only. It must not specify a connector type. Signal names, direction, and electrical limits belong on the channel type. Connector family, gender, shell, and part number belong on
connector_id,device_connector_mpn, andharness_connector_mpn. The same electrical channel on two different connectors is still one channel type. -
Every signal in the Signals List must be contained by a pre-defined channel type
Channel Types
Channel Types
A channel type is electrical information only. It records the signals on one electrical channel, the direction (
in,out, or blank), optional electrical limits (voltage, current, power, level), and which other channel types that channel may connect to.A channel type must not specify a connector type. Connector family, gender, shell, insert, and part number are not channel-type fields. They belong on the device signals list (
connector_id,device_connector_mpn,harness_connector_mpn) and on the connector part.The same electrical channel on two connectors is one channel type. Balanced mic level on an XLR and balanced mic level on a terminal block share a type. Do not add a channel type because the connector changed. Leave connector names out of
descriptionandsignals.balanced audio mic levelis a description.XLR mic inputis a connector, so it is not a channel type.
How channels are mapped is on Systems.
How to define a new channel type
- In a repository of your choice (or start with harnice-general-library on your own branch), navigate to
channel_types.tsvat the library root - If you want channel definitions to be private and are therefore working in a private repository, ensure the repo's path is listed in file
repository_locations.csv(located at root of your harnice source code repo). The first column is the URL or traceable path, and the second column is your local path. - If you find the channel_type you're looking for, temporarily note it as a touple in a notepad somewhere with format
(ch_type_id, universal_library_repository). - If you don't find it, make a new one. It's important to try and reduce the number of channel_types in here to reduce complexity, but it's also important that you adhere to strict and true rules about what is allowed to be mapped to what. A new connector is not a new channel type. The row records electrical information only and must not name a connector type. Modifications and additions to this document should be taken and reviewed very seriously.
Two optional columns set the default appearance. Both cells are Python dict literals, parsed with
ast.literal_eval. Leave a cell blank to leave that default unset. Harnice reads thechannel_types.tsvat the root of the library named by the channel type'slib_repo.channel_default_appearance— one engineering appearance dict. A channel trace (channelorharness-channel) and the channel card in the connectors view use it. Example:{'base_color': '#D59A10'}.signal_default_appearances— signal name to appearance dict. A circuit trace uses the entry for itssignal_of_channel_type, and the connectors view uses that entry for the signal bar. Names match thesignalscolumn. Example:{'pos': {'base_color': '#E24B4A'}, 'neg': {'base_color': '#2E6B9F'}}.
An instance
appearancethat already includesbase_coloris the appearance drawn for that trace. Traces are drawn when the project is built, so a change to these columns shows up on overlays after the next build. The connectors view reads the columns when the page opens. A trace whose resolved appearance has nobase_coloris the rainbow placeholder. A card or bar with nobase_colorkeeps the console palette.The dict is the engineering appearance from the Appearance guide:
base_color, and optionallyoutline_color,parallelstripe,perpstripe, andtwisted. Single quotes match the rows already in the file. The separator is a tab, so a comma inside the literal stays in the cell. - In a repository of your choice (or start with harnice-general-library on your own branch), navigate to
-
Each signal in the signals list must have every other signal defined by its channel type also present in the list.
- you can't just define 'positive' if the channel type requires 'positive' and 'negative'
-
Each signal defined in the list is contained by one or more cavities of connectors.
- you can't "cap off" or not populate one of the signals within a channel because that changes the channel type.
-
Every combination of (channel_id, signal, repeat_channel_id) must be unique within the signals list
- you can’t have two i.e. “ch1, pos” signals on the same endpoint
- if you need to break one signal out onto multiple conductors, you'll need to change the channel type to one that defines multiple conductors (i.e. named "ch1, pos-1")
-
Each channel endpoint lives on exactly one connector_id
- a passthrough is the same
channel_idon two connectors, each with its ownrepeat_channel_id - signals that belong to one endpoint cannot be split across connectors
- more than two endpoints on one
channel_idis an error
- a passthrough is the same
Configurable Device Signals List Rules
A configuration records how to set up the hardware, not what the hardware is. Record as much of that setup as you can, including answers the build never reads. The same part number can also have different electrical behavior (balanced vs unbalanced, voltage setting, phantom on/off) without a new part number, as long as form, fit, and function of the hardware stay the same.
The signals list is not a pile of alternate rows that get filtered. Build instructions write one signals list for the answers currently in configuration (a dict). Harnice fills that dict from the defaults in fileio.path("configuration setup"), or—when the device is placed in a system—from that instance's answers on the block diagram / BOM.
-
Declare fields in
fileio.path("configuration setup"), then read them in build instructions- Each field has an
id. In the device script, useconfiguration["that_id"]for any reason. Harnice parsesjson,yaml, andtomlbefore that script runs, so that value is the loaded data. Alistis a list of strings. A system script reads the same answers from the BOM for any reason. Choosing a channel map is one example. How each type looks in the device script, in the system script, and from another program are on Reading Device Configurations. - You can have as many fields as you need. One field is enough for an SM58 that is either balanced or unbalanced. A mixing console might have a field per input. Add fields for setup the signals list never uses.
- Field types, validation,
show_if, and a full YAML example are on Device Configurations.
- Each field has an
-
The list you emit still has to obey the general signals-list rules
- Complete endpoints, unique
(channel_id, signal, repeat_channel_id), one connector per endpoint. Validation only sees the list for this configuration.
- Complete endpoints, unique
-
Do not use configuration to change the physical part
- If the connector or the hardware build changes, that is a new part number, not a configuration.
- Unused pins stay off the list
- A pin is on the signals list only when a channel in this configuration uses it. Omitting a pin this configuration does not use is correct. A channel that is present still includes every signal its channel type defines.
Passthrough Signals List Rules
- A passthrough is exactly two endpoints of the same
channel_id, each with a distinctrepeat_channel_id - The two channel types must be compatible with each other
- this is so a patch that crosses the device still mates compatible types on both faces
- A single-endpoint channel must leave
repeat_channel_idblank; a 3-tuple inmap()on that channel is an error
Channel maps
A channel map lists the channels on the devices within each group of connected harnesses. Each completed pairing is a mapped channel. Rows that are not paired are unmapped channels. How mapping works is on Systems.
Passthrough maps
A passthrough map lists every passthrough channel in the system: a channel with exactly two endpoints on the same device. A build creates the map, optionally routes required hops through it, then resolves it into the channel map's chains.
Circuits lists
A circuits list is every individual electrical connection that must be present in your system or harness to satisfy the channel and passthrough maps.
Networks
A harness has an available network (every path it could take), a chosen network (the one path it takes), and a flattened network (the 2D drawing). See Networks.
Revision history
A record of every revision of a part and its release status. It lives in the part number folder, next to the revision folders, and it is how Harnice knows what kind of project a folder is.
Library history
A report of what the most recent build imported from libraries, and which revision of each part it used.