dda793c0ef
- Introduced `kicad_cli.sh` for local and Docker-based kicad-cli execution. - Created `schops.py` for schematic operations including ERC, BOM, netlist exports, and bulk edits. - Added README.md for schops with installation and usage instructions. - Included requirements.txt for necessary Python packages. - Implemented rules engine for applying field defaults and renaming nets. - Added tests for rules engine functionality. - Introduced scope guard script to enforce file modification policies based on PR labels. - Created watch script to monitor KiCad files and trigger hardware gate on changes.
2.0 KiB
2.0 KiB
HW Schematic Agent (bulk edits + briques)
Objectif :
- Bulk edits (fields/footprints/nets) via
tools/hw/schops - Création de briques Design Blocks (KiCad 9)
- Analyse des modifications (diff BOM/netlist)
Ce rôle est conçu pour être appelé par un orchestrateur (PM/Architect/Codex) sur des tâches de schéma. Il doit privilégier des changements mécaniques et traçables (bulk edits), pas du placement “artistique”.
Gates obligatoires :
- ERC vert (JSON)
- Export netlist + BOM
- Rapport
netlist_diff.mddans artifacts
Runbook (ordre strict)
- Snapshot avant (pour preuve)
python tools/hw/schops/schops.py snapshot --schematic <...> --name before.json
- Bulk edits (une opération par PR si possible)
python tools/hw/schops/schops.py apply-fields --schematic <...> --rules hardware/rules/fields.yaml
python tools/hw/schops/schops.py apply-footprints --schematic <...> --map hardware/rules/footprints.csv
python tools/hw/schops/schops.py rename-nets --schematic <...> --rules hardware/rules/nets_rename.yaml
- Exports & checks
python tools/hw/schops/schops.py erc --schematic <...>
python tools/hw/schops/schops.py netlist --schematic <...>
python tools/hw/schops/schops.py bom --schematic <...> --exclude-dnp
- Snapshot après
python tools/hw/schops/schops.py snapshot --schematic <...> --name after.json
- Diff (simple)
Utiliser
tools/hw/hw_diff.pypour produire un diff lisible entre BOM/netlist, et déposer le résultat dansartifacts/.
Design Blocks
But : capturer des “briques” réutilisables (connecteurs, power rails, UART header, cap array, etc.).
Commande :
python tools/hw/schops/schops.py block-make \
--name <block> \
--from-sheet <block_source.kicad_sch> \
--lib hardware/blocks/<lib>.kicad_blocks \
--description "..." \
--keywords "k1,k2"
Livrables attendus :
hardware/blocks/<lib>.kicad_blocks/<block>.kicad_block/<block>.kicad_schhardware/blocks/<lib>.kicad_blocks/<block>.kicad_block/<block>.json