| --- |
| license: cc-by-sa-4.0 |
| language: |
| - en |
| - fr |
| pretty_name: KiCad 9+ Schematic Corpus — Permissive subset |
| task_categories: |
| - text-generation |
| tags: |
| - kicad |
| - eda |
| - schematic |
| - s-expression |
| - electronics |
| - hardware |
| size_categories: |
| - n<1K |
| --- |
| |
| # KiCad 9+ Schematic Corpus — Permissive subset |
|
|
| 98 KiCad 9+ schematic samples (`.kicad_sch` S-expression format, version >= 20240722). |
|
|
| **Permissive licenses only**: Apache-2.0 (74), MIT (20), CC0-1.0 (3), CERN-OHL-P-2.0 (1). |
|
|
| This is the permissive split of the original `electron-rare/kicad9plus-sch-corpus` (now deprecated). The split was done after legal audit revealed CC-BY-SA-4.0 incompatibility with GPL-3 / CERN-OHL-S inputs (one-way directionality: CC-BY-SA-4.0 -> GPLv3 only, never the reverse). |
|
|
| For copyleft samples (GPL-3.0, CERN-OHL-S-2.0, EUPL-1.2): see [`electron-rare/kicad9plus-copyleft`](https://huggingface.co/datasets/electron-rare/kicad9plus-copyleft). |
|
|
| ## EU AI Act compliance (Template AI Office, July 2025) |
|
|
| ### General information |
| - **Name**: kicad9plus-sch-corpus (permissive subset) |
| - **Modality**: text (KiCad S-expression source) |
| - **Languages**: English (technical), French (some title-block descriptions) |
| - **Intended use**: training / fine-tuning of code-style language models on KiCad 9 / KiCad 10 schematic generation tasks |
|
|
| ### Data sources |
|
|
| **Publicly available datasets**: None. |
|
|
| **Web scraping**: Yes — public GitHub repositories. |
| - Discovery method: `gh search code "(kicad_sch (version 202X)" extension:kicad_sch` |
| - Filtering: SPDX license whitelist (Apache-2.0, MIT, CC0-1.0, CERN-OHL-P-2.0) |
| - Per-sample provenance: see `metadata.source_url`, `metadata.commit_sha`, `metadata.repo` |
|
|
| **Licensed data**: None (no commercial / proprietary licenses). |
|
|
| ### Data processing |
| - Sparse-clone with `gh repo clone --depth 1` |
| - Per-file `.meta.json` sidecar with `source_url`, `commit_sha`, `license_spdx`, `kicad_version` |
| - Deduplication via SHA-256 of file contents |
| - Truncation at 8 KB to fit training context (marked in metadata when applicable) |
| - Validation via `kicad-cli sch erc --format json --severity-all` (99.6% pass rate on tested subset) |
| - All processing scripts available at https://github.com/ailiance/ailiance-bench/tree/main/scripts |
|
|
| ### Data characteristics |
| - **Size**: 98 samples, ~1.2 MB JSONL (raw `.kicad_sch` totals ~21 MB before chat-format wrapping) |
| - **License mix (input)**: |
| - Apache-2.0: 74 samples (75.5%) |
| - MIT: 20 (20.4%) |
| - CC0-1.0: 3 (3.1%) |
| - CERN-OHL-P-2.0: 1 (1.0%) |
| - **KiCad version mix**: 20250114 (KiCad 9 stable), 20250316, 20250610 (KiCad 9.0.1), 20260101 / 20260301 / 20260306 (KiCad 10) |
| - **Source repos**: 9 distinct upstream projects (full list in `LICENSE_INVENTORY.md`) |
|
|
| ### Licenses applied |
| This dataset (the aggregated work) is released under **CC-BY-SA-4.0**. |
|
|
| Per-sample original licenses are **preserved in `metadata.license_spdx`** and listed in `LICENSE_INVENTORY.md`. Downstream users MUST preserve attribution per sample. |
| |
| Apache-2.0 patent grant (§3) does NOT transfer through CC-BY-SA-4.0 — downstream users wishing to claim those grants must refer to the original sources. |
| |
| ### Copyright considerations |
| - All sources are public GitHub repositories under permissive licenses. |
| - The `.kicad_sch` files are treated as software source under their original licenses. |
| - **Opt-out mechanism**: contact `c.saillant@gmail.com` to remove specific samples; we will respect Article 4(3) DSM Directive opt-outs (TDM reservations). |
| - **Reservations of rights**: we honor `robots.txt`, `noai` / `noimageai` HTML meta tags, and TDM Reservation Protocol (TDMRep) signals when discoverable on source repositories. |
| |
| ### Sample format |
| |
| Each line is a chat-format JSON object: |
| |
| ```json |
| { |
| "messages": [ |
| {"role": "user", "content": "Generate a KiCad 9 schematic (titled '...', by ..., N components, libraries: ...). Use the standard S-expression format starting with `(kicad_sch ...)`."}, |
| {"role": "assistant", "content": "(kicad_sch\n\t(version 20250114)\n\t..."} |
| ], |
| "metadata": { |
| "repo": "owner/name", |
| "rel_path": "path/to/file.kicad_sch", |
| "source_url": "https://github.com/owner/name/blob/<sha>/path/to/file.kicad_sch", |
| "commit_sha": "<git sha>", |
| "license_spdx": "Apache-2.0", |
| "kicad_version": "20250114", |
| "file_sha256": "<content sha>", |
| "file_size_bytes": 12345, |
| "downloaded_at": "2026-05-11T...", |
| "compliance_notes": "...", |
| "ia_act_status": "requires_review" |
| } |
| } |
| ``` |
| |
| ## Pipeline reproducibility |
| See https://github.com/ailiance/ailiance-bench/tree/main/scripts: |
| - `kicad9plus_pipeline.sh`, `build_kicad9plus_dataset.py` |
| - Original audit: https://github.com/ailiance/ailiance-bench/blob/main/docs/audit_kicad9plus.md |
| |
| ## Citation |
| |
| ```bibtex |
| @dataset{electron_rare_kicad9plus_permissive_2026, |
| author = {electron-rare}, |
| title = {KiCad 9+ Schematic Corpus — Permissive subset}, |
| year = {2026}, |
| publisher = {Hugging Face}, |
| url = {https://huggingface.co/datasets/electron-rare/kicad9plus-permissive} |
| } |
| ``` |
| |