Share library/extracted for schematic and PCB review.
PCB AI skips a second PDF exam (pintable cache, pdf_path=None) and the report gains a PCB exam section plus power-trace, thermal, via, Kelvin, and GND-stitch checks grounded in board geometry and extracted specs.
This commit is contained in:
+29
-12
@@ -113,8 +113,9 @@ Normalization resta **downgrade-only**.
|
||||
| `.kicad_pcb` (`has_pcb`) | Sì |
|
||||
| `design_graph.json` | Sì |
|
||||
| `extracted/` + `layout_rules` / pintable | Per check numerici e AI |
|
||||
| PDF datasheet | Per AI (skip IC senza PDF, come schema) |
|
||||
| Stackup nel PCB | Per Z0; skip se assente |
|
||||
| **Shared library** `library/extracted/{safe_mpn}.json` | **Unico** store schema+PCB. Deep exam PDF una volta (pipeline schema). |
|
||||
| PDF datasheet | Solo per estrazione / review **schema**. PCB **non** riattacca il PDF. |
|
||||
| Stackup nel PCB | Per Z0 e ampacity; skip se assente |
|
||||
|
||||
---
|
||||
|
||||
@@ -134,22 +135,32 @@ Net con rame: lunghezza, layer, width min/max, via, coppia, bus, Z0 se stackup.
|
||||
| `PE-SI-001` | skew coppia | `length_match` mm |
|
||||
| `PE-DRT-001` | Vop > Vrated sul cap (derating.py) | entrambe le tensioni |
|
||||
| `PE-Z0-001` | Z0 fuori target | target in regola o netclass; mai 50 Ω default |
|
||||
| `PE-PWR-001` | Larghezza × spessore rame vs I_load | I_load + width; IPC-2221 solo con `copper_thickness_mm` e Tjmax (ΔT=Tjmax−25 °C) |
|
||||
| `PE-VIA-001` | I_load / N via | geometria via + I_load; INFO (niente tabella via inventata) |
|
||||
| `PE-THM-001` | P=I_load×(Vin−Vout) senza pour/via courtyard | I_load, Vin/Vout, courtyard |
|
||||
| `PE-KEL-001` | Pin sense/Kelvin su net di carico | nome pintable + ≥2 altri sul net |
|
||||
| `PE-STCH-001` | Segnale sopra pour GND senza via GND nel bbox | zone GND + segmenti; INFO |
|
||||
| Creepage | — | **skip** senza numero datasheet/IEC |
|
||||
| Crystal keepout | `PE-PLC-004` | `layout_rules` kind=keepout |
|
||||
|
||||
Filtri: `check_filters` **non** duplicato nel report PCB (resta schema). L’AI e i groups usano `role_hint=filter` per proximity se c’è mm.
|
||||
|
||||
### 3.3 AI exam (schema-like)
|
||||
### 3.3 AI exam (layout-only, shared library)
|
||||
|
||||
Per ogni IC con PDF:
|
||||
Per ogni IC con **pintable in `library/extracted` o extracted/ di progetto** (stesso JSON):
|
||||
|
||||
- System prompt **PCB** (placement, routing, decoupling, filtri, lunghezze, Z0, compliance layout).
|
||||
- User: `build_component_context` + blocco layout (xy, satelliti del group, lunghezze net, domains).
|
||||
- Stessi graph tools + `submit_review`.
|
||||
- Quote verify. Recommendation obbligatoria su ogni finding.
|
||||
- Isolamento per-IC; skip senza PDF.
|
||||
- **Non** si ri-legge il PDF. L’esame datasheet profondo è quello della pipeline schema.
|
||||
- System prompt **PCB**: layout vs JSON di libreria.
|
||||
- User: `format_library_extraction` + `build_pcb_layout_context`.
|
||||
- `review_ic_async(..., pdf_path=None)` — niente attach, niente quote-verify PDF.
|
||||
- Skip: `no library extraction — run schematic review first`.
|
||||
- Recommendation obbligatoria; isolation per-IC.
|
||||
|
||||
UI: sezione report **PCB exam** (`pcb-exam-section.tsx`) — findings `source=pcb_review` e PE-PWR/THM/VIA/KEL/STCH. Nascosta con `?domain=schema`.
|
||||
|
||||
### 3.4 Skip (no folklore)
|
||||
|
||||
3W, creepage IEC, CPWG, HV isolation, length-match USB spec, confronto foto TI vs gerber.
|
||||
3W, creepage IEC senza numero, CPWG, HV isolation, length-match USB spec, confronto foto TI vs gerber, 1 oz / 10 °C / 50 Ω di default.
|
||||
|
||||
---
|
||||
|
||||
@@ -160,7 +171,7 @@ Per ogni IC con PDF:
|
||||
| Hub | **Run PCB review** se `hasPcb` |
|
||||
| `/project/[id]/pcb` | Stepper SSE (include `ai_review`) |
|
||||
| Sidebar | **Layout** → `/pcb` |
|
||||
| Report | Merge `report.json` + `pcb_report.json`; `?domain=layout`; badge Layout + `rule_id`; recommendation sempre visibile |
|
||||
| Report | Merge + sezione **PCB exam**; `?domain=layout`; badge Layout; recommendation sempre visibile |
|
||||
| Inventory | Traces/buses/Z0 + domains/groups |
|
||||
|
||||
---
|
||||
@@ -185,12 +196,18 @@ Meta `pcb_*`, worker, router, `run_pcb_checks`, inventory, report merge, UI star
|
||||
|
||||
`classify` + `ai_review` per-IC, prompt PCB, recommendation obbligatoria, changelog Layout.
|
||||
|
||||
**Done when:** con API key, IC con PDF producono finding `source=pcb_review` o coverage vuota; senza key, skip loggato. Deploy.
|
||||
**Done when:** con API key, IC con libreria producono finding `source=pcb_review` o coverage vuota; senza key, skip loggato. Deploy.
|
||||
|
||||
### Fase 3 — Plugin + eval PCB
|
||||
|
||||
Cad-bridge pcbnew; golden fixture. Packing resta fuori.
|
||||
|
||||
### Fase 4 — Libreria unica + sezione PCB exam (macro operativa)
|
||||
|
||||
Un store `library/extracted` (più extracted/ di progetto). PCB non duplica l’esame PDF. Sezione report PCB exam + PE-PWR/THM/VIA/KEL/STCH.
|
||||
|
||||
**Done when:** IC senza pintable skipped; con libreria, AI layout-only; check IPC solo con stackup+Tjmax. Deploy.
|
||||
|
||||
---
|
||||
|
||||
## 6. Fuori scope
|
||||
|
||||
Reference in New Issue
Block a user