main
John Lauer Add conservative JLC sourcing audit, isolated silk candidate and narrated wiki clip provenance 89e01c9
from pathlib import Path
import json,collections
r=Path(__file__).resolve().parents[1];p=r/'jlcpcb-flow';a=json.loads((p/'sourcing/exact-match-audit.json').read_text());groups=collections.defaultdict(list)
for x in a:groups[x['mpn']].append(x)
lines=['# Five-board SMT quotation preflight','','Status: not a vendor quote, not an order or manufacturing release. Q1 is manually installed by user authorization. Original R7 board remains unchanged.','','## Sourcing','','| Part | References | JLC match | Live stock | Five-board demand before attrition | Status |','|---|---|---|---:|---:|---|']
for m,xs in groups.items():
 x=xs[0];c=x.get('lcsc');f=p/'sourcing/live'/f'{c}.json';stock='unverified';state=x['status']
 if f.exists():
  raw=json.loads(f.read_text());s=raw.get('stdout','');i=s.find('{')
  if i>=0:
   d=json.loads(s[i:]);cs=d.get('components',[])
   if cs:
    cc=cs[0];stock=cc.get('stock','unknown');state=cc.get('source','unknown source')
    if isinstance(stock,int) and stock<5*len(xs):state+='; SHORTAGE'
 lines.append(f"| {m} | {', '.join(x['ref']for x in xs)} | {c or 'unresolved'} | {stock} | {5*len(xs)} | {state} |")
lines+=['','## Remaining work','','- Resolve unmatched catalog identities/alternates and stock shortages; no unapproved substitutions or extra manual-fit assumptions.','- Validate every assembly footprint and CPL rotation; inspect vendor placement preview.','- Finish and visually review separate JLC silkscreen variant; original 3rdPartyFab labels retained.','- Obtain actual five-board SMT vendor quote, itemize manual/cooling/harness work and shipping/tax.','- Thermal and bench qualification remain separate from vendor quotation.','','## DRC and silkscreen','','Original R7: zero errors, zero unconnected items, 447 warnings: 182 text height, 199 stroke thickness, 66 missing Load-library references in the temporary check. Current wiki rules reproduced all warnings.','','Separate UNADOPTED JLC candidate: text increased to 0.8 mm minimum and strokes to 0.15 mm. Native geometry relocation moved 71 labels; latest check leaves 52 overlaps, 19 silk-over-copper, 6 edge-clearance warnings, plus 66 library warnings. Zero errors and zero unconnected. This is work in progress, not a replacement for the current board.','','## Video','','Recorded present-day project/component-page walkthrough on arav-rog; narrated draft 26.556 s, full decode passed. Raw and render remain remote. Captions and final playback review pending; not original creation footage.','']
(p/'quote-preflight.md').write_text('\n'.join(lines));print('Wrote',p/'quote-preflight.md')