File size: 5,883 Bytes
45b6c02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c62fc09
45b6c02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c62fc09
45b6c02
c62fc09
45b6c02
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
license: gpl-3.0
language:
- en
- fr
pretty_name: KiCad 9+ Schematic Corpus  Copyleft subset
task_categories:
- text-generation
tags:
- kicad
- eda
- schematic
- s-expression
- electronics
- hardware
- copyleft
size_categories:
- n<1K
---

# KiCad 9+ Schematic Corpus — Copyleft subset

209 KiCad 9+ schematic samples (`.kicad_sch` S-expression format, version >= 20240722).

**Copyleft / strong reciprocal licenses only**: GPL-3.0 (169), CERN-OHL-S-2.0 (36), EUPL-1.2 (4).

This is the copyleft 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 these inputs. CC-BY-SA-4.0 is one-way compatible *to* GPLv3 only, never the reverse — so the aggregated work has been re-licensed to GPL-3.0-or-later, the most restrictive of the inputs (CERN-OHL-S-2.0 and EUPL-1.2 are explicitly compatible with GPL-3.0+ via FSF / EUPL appendix interoperability).

For permissive samples (Apache-2.0, MIT, CC0-1.0, CERN-OHL-P-2.0): see [`electron-rare/kicad9plus-permissive`](https://huggingface.co/datasets/electron-rare/kicad9plus-permissive).

## EU AI Act compliance (Template AI Office, July 2025)

### General information
- **Name**: kicad9plus-sch-corpus (copyleft 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. **Models trained on this dataset must comply with GPL-3.0-or-later obligations** (source disclosure of weights, derivative training data, and inference code if redistributed).

### 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 detection of GPL-3.0, CERN-OHL-S-2.0, EUPL-1.2
- 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**: 209 samples, ~2.1 MB JSONL (raw `.kicad_sch` totals ~38 MB before chat-format wrapping)
- **License mix (input)**:
  - GPL-3.0: 169 samples (80.9%)
  - CERN-OHL-S-2.0: 36 (17.2%)
  - EUPL-1.2: 4 (1.9%)
- **KiCad version mix**: 20240819 / 20240910 / 20241004 / 20241209 (KiCad 9 dev), 20250114 (KiCad 9 stable), 20250227 / 20250318 / 20250610 / 20250829 / 20250901 / 20250922 / 20251012 / 20251028 (later 9.x), 20260101 / 20260306 (KiCad 10)
- **Source repos**: 9 distinct upstream projects (full list in `LICENSE_INVENTORY.md`); largest contributors are `jaguilar/kicad` (133) and `flaviens/kicad` (34) — both KiCad demo / fork repositories under GPL-3.0.

### Licenses applied
This dataset (the aggregated work) is released under **GPL-3.0-or-later**.

Per-sample original licenses are **preserved in `metadata.license_spdx`** and listed in `LICENSE_INVENTORY.md`. Downstream users MUST preserve attribution per sample and comply with the strongest applicable copyleft term (GPL-3.0-or-later for the aggregate).

Compatibility notes:
- **CERN-OHL-S-2.0 -> GPL-3.0+**: explicitly compatible (CERN-OHL-S §7 allows redistribution under GPL when combining with GPL works).
- **EUPL-1.2 -> GPL-3.0+**: compatible via the EUPL §5 / Appendix list (GPL-3.0 is a listed compatible licence).
- **GPL-3.0 -> GPL-3.0+**: trivially compatible.

### Copyright considerations
- All sources are public GitHub repositories under copyleft 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": "GPL-3.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_copyleft_2026,
  author    = {electron-rare},
  title     = {KiCad 9+ Schematic Corpus — Copyleft subset},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/datasets/electron-rare/kicad9plus-copyleft}
}
```