@wae/open-eda-skills 0.0.0-stage → 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,30 @@
1
- # Temporary Holding Version
1
+ # @wae/open-eda-skills
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Agent skills for OpenEDA. The package ships skill documents only; it is not a
4
+ runtime library and contains no schematic, board, routing or fabrication
5
+ algorithms.
6
+
7
+ ## Status
8
+
9
+ `skills/open-eda/SKILL.md` records the routing and evidence rules for create,
10
+ edit, review and delivery against the implemented document core. The CLI and SDK
11
+ behind it create, edit and inspect a `.oeda` document, undo and redo edits, edit
12
+ sheets, and project to a netlist, SVG, BOM or PDF. Board layout, DRC, clearance,
13
+ power and KiCad/Gerber exchange are not implemented, and the skill says so
14
+ instead of inventing commands.
15
+
16
+ ## Layout
17
+
18
+ ```text
19
+ packages/open-eda-skills/
20
+ ├── package.json
21
+ ├── README.md
22
+ └── skills/
23
+ └── open-eda/
24
+ └── SKILL.md
25
+ ```
26
+
27
+ The skill must never be shipped claiming methods, commands or flags that the
28
+ installed SDK/CLI does not expose. The capability matrix remains the only support
29
+ claim; unsupported checks and exchange targets reject with
30
+ `capability/not-implemented`.
package/package.json CHANGED
@@ -1,6 +1,29 @@
1
1
  {
2
+ "description": "Agent skills for OpenEDA: create, edit, template fill, review and delivery",
3
+ "engines": {
4
+ "node": ">=18"
5
+ },
6
+ "files": [
7
+ "skills"
8
+ ],
9
+ "keywords": [
10
+ "open-eda",
11
+ "eda",
12
+ "schematic",
13
+ "pcb",
14
+ "skills",
15
+ "agent"
16
+ ],
17
+ "license": "Apache-2.0",
2
18
  "name": "@wae/open-eda-skills",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "repository": {
23
+ "directory": "projects/packages/open-eda-skills",
24
+ "type": "git",
25
+ "url": "git+https://github.com/nyar-os/OpenEDA.git"
26
+ },
27
+ "type": "module",
28
+ "version": "0.0.0"
29
+ }
@@ -0,0 +1,374 @@
1
+ ---
2
+ name: open-eda
3
+ description: Create, edit, inspect and deliver schematic design documents with OpenEDA. Use when a task involves schematic sheets, components, nets, netlists, BOM or PDF handoff, ERC review or SVG sheet output.
4
+ ---
5
+
6
+ # open-eda
7
+
8
+ ## Status
9
+
10
+ The schematic document core is executable. The CLI and SDK create, edit and
11
+ reopen one `.oeda` document, run ERC, electrical, net, connectivity, footprint
12
+ and power checks, compare two documents with `diff`, and write a netlist, SPICE netlist,
13
+ SVG sheet, BOM CSV/JSON/HTML, one-page PDF or
14
+ Markdown report projection. The design carries title-block properties (title,
15
+ drawing revision, company and date) that `design set` edits and the KiCad writer
16
+ reads and writes. Hierarchical sheet symbols and their ports round-trip as
17
+ declarations, and `export --format kicad_sym` writes the placed components' pin
18
+ interface as an importable KiCad symbol library. The SDK keeps a bounded 32-step undo/redo history
19
+ per open handle, and the CLI mirrors it in a `<file>.history.json` sidecar so
20
+ `undo` and `redo` work across separate command invocations. Sheet
21
+ add/rename/delete, component move, update and delete, deterministic reference
22
+ annotation, BOM variants with do-not-populate lists, no-connect flags that can
23
+ mark a pin as deliberately open, wire add, update, list and delete, net derive, disconnect and
24
+ delete, and junction/text move and delete work in place. Design-level net classes
25
+ declare trace width, clearance and via attributes and assign declared nets and
26
+ buses to them. Reference prefix rules declare the expected designator prefix per
27
+ component class and the `references` check reports violations with severities and
28
+ waivers. A KiCad `.net` netlist imports into a new document and compares with an
29
+ open one. Board layout, the
30
+ interactive renderer, DRC and clearance checks, and KiCad board, Gerber and drill
31
+ exchange are not implemented and report `capability/not-implemented`.
32
+
33
+ Only these commands are executable today:
34
+
35
+ ```bash
36
+ open-eda capabilities
37
+ open-eda create --out <file.oeda> [--title <title>] [--rev <rev>] [--company <company>] [--date <date>] [--overwrite]
38
+ open-eda design set <file.oeda> [--title <title>] [--rev <rev>] [--company <company>] [--date <date>]
39
+ open-eda open <file.oeda>
40
+ open-eda list <file.oeda>
41
+ open-eda symbols <file.oeda>
42
+ open-eda connectivity <file.oeda>
43
+ open-eda inspect <file.oeda> [--checks erc,electrical,nets,connectivity,footprints,power,references] [--severity code=level,...] [--waive code[@objectId|@sheetId/objectId],...]
44
+ open-eda diff <left.oeda> <right.oeda>
45
+ open-eda annotate <file.oeda>
46
+ open-eda export <file.oeda> --format net|net_csv|net_hier|spice|spice_subckt|svg|bom|bom_json|bom_html|pdf|report|kicad_sch|kicad_sym --out <file> [--variant <name>]
47
+ open-eda variant add <file.oeda> --name <name> [--dnp R1,R2] [--values R1=22k]
48
+ open-eda variant list <file.oeda>
49
+ open-eda variant remove <file.oeda> --name <name>
50
+ open-eda import <file.kicad_sch> --out <file.oeda> [--overwrite]
51
+ open-eda netlist import <file.net> --out <file.oeda> [--overwrite]
52
+ open-eda netlist diff <file.oeda> <file.net>
53
+ open-eda library <file.kicad_sym>
54
+ open-eda undo <file.oeda>
55
+ open-eda redo <file.oeda>
56
+ open-eda component list <file.oeda> [--sheet <sheet>]
57
+ open-eda component add <file.oeda> --ref <ref> --value <value> --x <n> --y <n> [--rotation <deg>] [--pins 1,2] [--sheet <sheet>]
58
+ open-eda component move <file.oeda> --ref <ref> --x <n> --y <n> [--rotation <deg>] [--sheet <sheet>]
59
+ open-eda component update <file.oeda> --ref <ref> --value <value> [--sheet <sheet>]
60
+ open-eda component footprint <file.oeda> --ref <ref> [--footprint <footprint>] [--sheet <sheet>]
61
+ open-eda component pin-type <file.oeda> <ref> <pin> [type] [--clear] [--sheet <sheet>]
62
+ open-eda component delete <file.oeda> --ref <ref> [--sheet <sheet>]
63
+ open-eda net list <file.oeda> [--sheet <sheet>]
64
+ open-eda net connect <file.oeda> --net <name> --nodes <ref.pin>,<ref.pin> [--sheet <sheet>]
65
+ open-eda net derive <file.oeda> [--sheet <sheet>]
66
+ open-eda net disconnect <file.oeda> --net <name> [--nodes <ref.pin>,<ref.pin>] [--sheet <sheet>]
67
+ open-eda net delete <file.oeda> --net <name> [--sheet <sheet>]
68
+ open-eda net rename <file.oeda> --id <net> --name <new-name> [--sheet <sheet>]
69
+ open-eda bus add <file.oeda> --name <name> --width <n> [--aliases D,E]
70
+ open-eda bus list <file.oeda>
71
+ open-eda bus remove <file.oeda> --id <bus>
72
+ open-eda net-class add <file.oeda> --name <name> --width <n> [--clearance <n>] [--via <n>] [--nets VCC,GND] [--buses DATA]
73
+ open-eda net-class list <file.oeda>
74
+ open-eda net-class remove <file.oeda> --id <name>
75
+ open-eda reference add <file.oeda> --class <class> --prefix <prefix>
76
+ open-eda reference list <file.oeda>
77
+ open-eda reference remove <file.oeda> --class <class>
78
+ open-eda reference assign <file.oeda> --ref <ref> --class <class> [--sheet <sheet>]
79
+ open-eda reference unassign <file.oeda> --ref <ref> [--sheet <sheet>]
80
+ open-eda wire add <file.oeda> --from <x,y> --to <x,y> [--net <name>] [--sheet <sheet>]
81
+ open-eda wire update <file.oeda> --id <wire-id> [--from <x,y>] [--to <x,y>] [--net <name>] [--sheet <sheet>]
82
+ open-eda wire list <file.oeda> [--sheet <sheet>]
83
+ open-eda wire delete <file.oeda> --id <wire-id> [--sheet <sheet>]
84
+ open-eda junction add <file.oeda> --x <n> --y <n> [--sheet <sheet>]
85
+ open-eda junction move <file.oeda> --index <n> --x <n> --y <n> [--sheet <sheet>]
86
+ open-eda junction delete <file.oeda> --index <n> [--sheet <sheet>]
87
+ open-eda no-connect add <file.oeda> --x <n> --y <n> [--ref <ref> --pin <pin>] [--sheet <sheet>]
88
+ open-eda no-connect delete <file.oeda> --index <n> [--sheet <sheet>]
89
+ open-eda text add <file.oeda> --text <text> --x <n> --y <n> [--sheet <sheet>]
90
+ open-eda text move <file.oeda> --index <n> --x <n> --y <n> [--sheet <sheet>]
91
+ open-eda text delete <file.oeda> --index <n> [--sheet <sheet>]
92
+ open-eda sheet add <file.oeda> [--name <name>]
93
+ open-eda sheet rename <file.oeda> --id <sheet-id> --name <name>
94
+ open-eda sheet delete <file.oeda> --id <sheet-id>
95
+ open-eda gui
96
+ ```
97
+
98
+ Every editing command except `capabilities`, `open`, `diff`, `list`, `inspect`
99
+ and `gui` rewrites the input document in place through a temporary file and a
100
+ rename. Confirm the path before running them.
101
+
102
+ `undo` and `redo` restore the newest snapshot from `<file>.history.json`, bump
103
+ the restored revision relative to the current file, and move the replaced text to
104
+ the opposite stack. Each mutating command records the document it replaces, keeps
105
+ the newest 32 steps and clears the redo stack. `create` deletes a stale sidecar.
106
+ A direction with no snapshot fails with `history/empty`. The sidecar is not part
107
+ of the design and is never written into `.oeda`.
108
+
109
+ ## Preflight
110
+
111
+ 1. Run `open-eda capabilities` and confirm that the check or export target the
112
+ task needs is reported as `supported`. A method or extension name is not a
113
+ capability.
114
+ 2. Run `open-eda list <file.oeda>` and confirm the components, references, pins
115
+ and sheet ids the task will address actually exist.
116
+ 3. If the preflight reports a missing capability, stop and report it. Never
117
+ degrade silently or swap in an unrelated tool.
118
+
119
+ ## Executable routes
120
+
121
+ | Route | Intent | Minimum evidence |
122
+ |-------|--------|------------------|
123
+ | create | Build a schematic document from a brief | `open-eda list` output, `open-eda inspect` report |
124
+ | edit | Change an existing document without losing identity | `open-eda list` before and after, `open-eda inspect` |
125
+ | review | Audit references, connectivity, pin roles and component values | `open-eda inspect` findings with codes and objects |
126
+ | compare | See what changed between two revisions | `open-eda diff` report with changed objects and `equal` |
127
+ | deliver | Write a netlist, SVG, BOM or PDF projection | the exported file plus `open-eda inspect` at the same revision |
128
+
129
+ ## Inspection checks
130
+
131
+ `erc` reports duplicate references, empty references, duplicate net names and net
132
+ nodes that point at a missing component or pin, and warns about unconnected pins.
133
+ A hierarchical port that no net in the document names is reported as
134
+ `erc/unconnected-hierarchical-port`, because the parent wires drawn on that pin
135
+ are not part of the model.
136
+ It also rejects names that would break the writer grammar:
137
+ `erc/reference-illegal` and `erc/pin-name-illegal` for whitespace or a dot inside
138
+ a `REF.PIN` token, and `erc/net-name-illegal` for whitespace or control
139
+ characters in a net name. A no-connect flag with `--ref` and `--pin` (or the SDK
140
+ `node`) marks that pin as deliberately open: `erc/unconnected-pin` and
141
+ `unreferenced-pin` are skipped for it, and the connectivity report omits it from
142
+ `unconnectedPins`. A coordinate-only flag suppresses nothing.
143
+ `nets` reports floating wires, wires that name an undeclared net, single-node
144
+ nets and empty sheets. A net named with a bus alias resolves to the same bus as
145
+ the canonical name; `net-bus-alias-collision` reports two nets on one sheet that
146
+ resolve to the same bus. `connectivity` groups wires by coincident endpoints,
147
+ junctions and T-junctions, then reports `wire-net-conflict` (one error per group
148
+ naming two nets), `wire-net-unassigned` (one warning per unlabeled group) and
149
+ `junction-floating`. `footprints` reports components without a value. `power`
150
+ detects rails by case-insensitive prefix (`VCC`, `VDD`, `VSS`, `GND`, `VBAT`,
151
+ `VIN`, `PWR`, or a leading `+`/`-`) and warns with `power-net-underconnected`
152
+ below two nodes and `power-net-duplicate` when one rail name appears on more
153
+ than one sheet. It also reports `power/driver-conflict` (error) when more than
154
+ one `power_out` pin drives a net and `power/output-driver-conflict` (error) when
155
+ a `power_out` pin shares a net with a logic `output` pin. Errors fail the
156
+ report; warnings are reported but do not.
157
+
158
+ `inspect` also accepts `--severity code=level` overrides (`error`, `warning`,
159
+ `info` or `off`) and `--waive code[@objectId|@sheetId/objectId]` entries. A
160
+ waiver moves the finding from `issues` to `waived` (shape plus `waived: true`),
161
+ and only active errors fail the report. Never use a waiver to hide a finding the
162
+ user has not accepted.
163
+
164
+ `drc` and `clearance` are declared but not implemented; requesting them rejects
165
+ with `capability/not-implemented`. Never describe a design as DRC clean or
166
+ clearance checked.
167
+
168
+ ## Electrical check
169
+
170
+ Pins may carry a role: `input`, `output`, `bidirectional`, `tri_state`,
171
+ `passive`, `power_in`, `power_out`, `open_collector`, `open_emitter` or
172
+ `unspecified`. `component pin-type` assigns one, and `--clear` removes it. The
173
+ `electrical` check reads only typed pins and reports
174
+ `erc/input-input-conflict`, `erc/output-output-conflict` and
175
+ `erc/power-in-unpowered`; an untyped pin is never a finding. Power-driver
176
+ conflicts between `power_out` pins, or between a `power_out` and a logic
177
+ `output`, belong to the `power` check (`power/driver-conflict`,
178
+ `power/output-driver-conflict`). Roles are written
179
+ into the KiCad library symbols and read back; an unknown imported type is a loss
180
+ entry, not a guess.
181
+
182
+ ## KiCad netlist import and comparison
183
+
184
+ `open-eda netlist import <file.net> --out <file.oeda>` reads a KiCad `.net`
185
+ export: components contribute their reference, value and footprint; nets
186
+ contribute their name and `REF.PIN` nodes, and those nodes are the only pin
187
+ evidence a netlist carries, so unconnected pins are not invented. Components are
188
+ laid out on a deterministic grid because a netlist has no placement, and no
189
+ wires, junctions, labels or buses exist in the result. A node that names an
190
+ undeclared component (`net/missing-component`), a repeated reference
191
+ (`net/duplicate-reference`), a component without a reference
192
+ (`net/missing-reference`) and a section outside the subset
193
+ (`net/unsupported-element`) are reported as losses. `netlist diff <file.oeda>
194
+ <file.net>` compares the design (reference side) with the netlist: components are
195
+ matched by reference and compared by value and footprint, nets by name and their
196
+ sorted `REF.PIN` node sets, and the report lists added, removed and modified
197
+ entries plus netlist losses. Placement, wires and pin order are not compared
198
+ because a netlist does not carry them. The same entry points are
199
+ `OpenEDA.importKicadNet()` and `design.compareNetlist()` in the SDK.
200
+
201
+ ## Reference annotation
202
+
203
+ `open-eda annotate <file.oeda>` renumbers every reference designator: sheets in
204
+ document order, components top to bottom and left to right, each prefix from 1.
205
+ Net nodes are rewritten to the new references, and the command reports every
206
+ `from`/`to` change. An already annotated design adds no revision. References
207
+ without leading letters join the `U` group; the numerals in `TP_A` are replaced.
208
+
209
+ ## Reference prefix rules
210
+
211
+ `open-eda reference add --class <class> --prefix <prefix>` declares the expected
212
+ designator prefix of a component class; a prefix is one to eight uppercase
213
+ letters (`R`, `C`, `U`, `J`, `TP`). `reference assign --ref <ref> --class <class>`
214
+ places a component in a class and stores the assignment by the component's stable
215
+ id, so annotation does not detach it; `reference unassign` clears it. A class
216
+ must be declared before a component can join it. `reference list` prints the
217
+ rules and the current assignments. The `references` inspection check reports
218
+ `reference/prefix-mismatch` (error) when a classified component's designator is
219
+ not the class prefix followed by a number, and `reference/class-unknown`
220
+ (warning) when a rule was removed while components still carry the class. Both
221
+ codes honour `--severity` and `--waive`.
222
+
223
+ ## Net classes
224
+
225
+ `open-eda net-class add` declares a design-level class with a trace width above
226
+ zero, a clearance and a via diameter that default to zero, and optional net and
227
+ bus assignments. Width, clearance and via use the design unit (`mm` or `mil`)
228
+ verbatim; the model declares the attributes and never routes or checks clearance
229
+ with them. Every assigned net must already be declared, every assigned bus must
230
+ exist, and a bus alias is stored as its canonical bus name. Redeclaring a class
231
+ replaces it as a whole and adds no revision when nothing changed.
232
+ `net-class list` reports the declared classes. `net-class remove` drops one by
233
+ id or name. Deleting a net, deleting a component that emptied a net, renaming a
234
+ net and removing a bus keep the assignments consistent: the class follows a
235
+ rename and loses a name the document no longer declares. Net classes appear in
236
+ the `json` projection as `netClasses` and in the `report` projection as a table.
237
+
238
+ ## BOM variants and DNP
239
+ `open-eda variant add` declares a design-level variant with `--dnp` (reference
240
+ designators that are not populated) and `--values` (`ref=value` overrides). It
241
+ replaces a variant with the same name. Every designator must already be placed;
242
+ a variant never invents a part. `export --variant <name>` applies the variant to
243
+ `bom` and `bom_json` and `bom_html` only: DNP rows disappear and overridden
244
+ values replace the
245
+ component value. Other export targets reject a variant with
246
+ `session/argument-invalid`. Variants do not change the schematic, the KiCad
247
+ `dnp` flag or any board output.
248
+
249
+ ## Drawing properties
250
+ `title`, `rev`, `company` and `date` are design-wide title-block properties.
251
+ `rev` is a text label such as `A`; it is not the edit revision counter. `design
252
+ set` changes them in place, an empty string clears a field, and an update that
253
+ changes nothing adds no revision. The KiCad writer emits them as a
254
+ `title_block`; the importer reads the same four fields back and reports any
255
+ other title-block field as a loss.
256
+
257
+ ## Design diff
258
+ `open-eda diff <left.oeda> <right.oeda>` compares the modelled objects of two
259
+ documents and never writes a file. Sheets match by id, components by reference,
260
+ nets by name inside a sheet and buses and BOM variants by name. Only changed
261
+ sheets appear; a sheet on one side only lists all its objects as added or
262
+ removed. The report, tagged `open-eda-diff`, records field-level changes (value,
263
+ footprint, position, rotation, pins, pin roles, net node sets, wire endpoints,
264
+ bus width, variant DNP lists and variant value overrides), and `equal` is true
265
+ when nothing changed. Net node order is not a change, and the
266
+ internal edit counter is ignored, but changed drawing properties (title, rev,
267
+ company, date, units) make the report unequal. This is not a textual
268
+ or byte diff, and it never merges, applies or repairs a difference.
269
+
270
+ ## Connectivity report
271
+
272
+ `open-eda connectivity <file.oeda>` lists what each net actually connects: per
273
+ sheet, every net with its node count and `REF.PIN` pin list, the pins no net
274
+ reaches, and the wire-group and junction totals (groups, unassigned groups,
275
+ conflicting groups, floating junctions). The report is read-only, tagged
276
+ `open-eda-connectivity`, and deterministic for one revision; it never assigns
277
+ nets or edits the document.
278
+
279
+ ## Symbol library
280
+
281
+ `open-eda symbols` groups placed components by the library id the KiCad writer
282
+ derives from their pins (`open-eda:<n>pin` for the numeric sequence `1..n`, a
283
+ hashed suffix otherwise). Each entry reports the pin count, the sorted
284
+ references that place the symbol, the distinct assigned footprints and how many
285
+ components still have no footprint. It is a read-only report: it never assigns
286
+ a footprint and never claims a library part exists outside the document.
287
+
288
+ `open-eda library <file.kicad_sym>` reads a KiCad symbol library instead of a
289
+ design document. It reports every declared symbol with its unit count and each
290
+ pin's number, name, electrical role and unit, plus a
291
+ `kicad_sym/unsupported-element` loss entry for any construct outside that
292
+ subset. It creates no design handle and writes no file.
293
+ `open-eda export --format kicad_sym` is the reverse projection: it writes one
294
+ library symbol per derived library id with the pins the schematic declares, and
295
+ adds no body, value or footprint.
296
+
297
+ ## Referential integrity
298
+
299
+ - Deleting a component removes its net nodes, drops nets that become empty, and
300
+ detaches wires that named a dropped net.
301
+ - Renaming a net updates every wire that used the old name, and rejects a name
302
+ already used on that sheet.
303
+ - A sheet with components, nets or wires cannot be deleted, and the last sheet is
304
+ always protected (`sheet/not-empty`, `sheet/last-sheet`).
305
+
306
+ ## Export limits
307
+
308
+ - `net` writes `# OpenEDA netlist v1`, then `NET <name>` and `NODE <ref>.<pin>`.
309
+ A declared bus expands into `<bus><index>` members, and a net named with a bus
310
+ alias expands into the canonical members rather than alias-derived names.
311
+ - `net_csv` writes the same connectivity as `Sheet,Net,Ref,Pin` rows; bus nets
312
+ expand into their member names and fields are quoted when the CSV grammar
313
+ needs it.
314
+ - `net_hier` prefixes each net with its sheet path (`NET Main/VCC`). The segment
315
+ is the sanitized sheet name, a numeric suffix keeps it unique, and a name with
316
+ no usable characters falls back to the sheet id. A `SHEET <path>` line precedes
317
+ that sheet's nets, and declared buses expand like the flat netlist.
318
+ - `spice` writes a deterministic `.cir` netlist; open pins become
319
+ `NC_<ref>_<pin>` and are reported with `spice/open-pin`.
320
+ - `spice_subckt` writes one `.SUBCKT <name> <ports>` block per sheet, with the
321
+ sheet's nets as ports and a `.ENDS <name>` terminator; names and ports are
322
+ legalized and unique, open pins use the same `NC_<ref>_<pin>` nodes, and the
323
+ file ends with `.END`.
324
+ - `svg` writes a sheet frame, wires and component boxes with reference and value
325
+ labels; the viewBox is derived from the placed geometry.
326
+ - `bom` writes `Comment,Footprint,Designator,Quantity`, grouped by value and
327
+ footprint with sorted designators compressed into inclusive ranges (`R5-R7`
328
+ for three or more consecutive numbers). Footprint text is whatever was
329
+ assigned with `component footprint`; the model never picks one.
330
+ `--variant <name>` drops that variant's DNP designators and applies its value
331
+ overrides.
332
+ - `bom_json` writes the same rows as a deterministic `open-eda-bom` JSON
333
+ projection with `designators` and `designatorRanges` arrays.
334
+ - `bom_html` writes one self-contained HTML table with the same rows, escaped
335
+ fields and the design header; `--variant <name>` applies the variant.
336
+ - `pdf` writes one A4 landscape vector page with sheet names, component boxes,
337
+ wires and a cross-reference table.
338
+ - `report` writes deterministic Markdown with a design header, per-sheet object
339
+ counts, a `Net | Nodes | Pins` table per sheet and the inspection findings
340
+ grouped by severity.
341
+ - `kicad_sch` writes the modelled schematic subset plus the title-block title,
342
+ date, revision and company, the library pin electrical roles and hierarchical
343
+ sheet symbols with their ports; `kicad_pcb`
344
+ and `gbr` reject with `capability/not-implemented`.
345
+ - `kicad_sym` writes one importable `kicad_symbol_lib` with one symbol per
346
+ derived library id and one `_1_1` unit holding the pins, their names and
347
+ electrical roles. It writes no graphics, value or footprint and invents no
348
+ library part.
349
+ - No exchange format can be imported or edited. `.oeda` is the only editable
350
+ document; `import` materializes a `.kicad_sch` into `.oeda`, while `library`
351
+ only reads a `.kicad_sym` symbol declaration. Hierarchical
352
+ `sheet` symbols and their `pin` ports import as declarations; the referenced
353
+ child sheet file is never opened.
354
+
355
+ ## Hard rules
356
+
357
+ - Never claim a check ran when it did not, and never fabricate ERC or
358
+ connectivity results.
359
+ - Never describe a format as supported because an extension is listed; read the
360
+ capability matrix.
361
+ - Keep one design model: the netlist, SVG, BOM or PDF must come from the revision
362
+ the inspection saw.
363
+ - Do not add ad-hoc geometry, routing or placement outside the editing commands.
364
+ - In the SDK, undo history belongs to one open handle. Across CLI invocations it
365
+ lives in `<file>.history.json`; deleting the sidecar or recreating the design
366
+ discards it.
367
+
368
+ ## Safety
369
+
370
+ - Confirm with the user before any command that writes or overwrites a design
371
+ document, and state the target path first.
372
+ - Never overwrite an input design unless the task asks for an in-place edit.
373
+ - Fabrication outputs are manufacturing inputs; state exactly what was exported
374
+ and what was not. No Gerber or drill file can be produced by this build.