Shared interface design
PcbLib Clean Interfaces
Configuration and result dataclasses for PCB-library cleanup.
PcbLibMechanicalPrimitiveRemovalConfig
Rationale
Mechanical primitive removal needs a named policy.
Purpose
Configures which mechanical primitives are removed from footprints.
Test Requirements
PcbLib clean config tests must cover config discovery and loading.
Working Definition
Working when mechanical cleanup follows config without hidden defaults.
PcbLibTextStringRemovalConfig
Rationale
Text-string removal needs explicit matching rules.
Purpose
Configures footprint text removal behavior.
Test Requirements
PcbLib clean config tests must cover config path discovery.
Working Definition
Working when only configured text is removed.
PcbLibRegionRemovalConfig
Rationale
Region removal needs explicit configuration.
Purpose
Configures removal of footprint regions.
Test Requirements
PcbLib clean config tests must cover environment and workspace lookup.
Working Definition
Working when region cleanup is controlled by config.
PcbLibCleanConfig
Rationale
PcbLib cleanup needs a versionable root config.
Purpose
Aggregates PCB-library clean policies.
Test Requirements
Config lookup tests must preserve discovery behavior.
Working Definition
Working when the clean command can find and apply config predictably.
PcbLibFootprintCleanReport
Rationale
Footprint cleanup should be inspectable per footprint.
Purpose
Reports changes made to one footprint.
Test Requirements
PcbLib clean tests must keep report creation compatible with config lookup.
Working Definition
Working when callers can inspect what each footprint cleanup changed.
PcbLibCleanApplyResult
Rationale
Command callers need an aggregate PCB-library clean result.
Purpose
Aggregates footprint clean reports.
Test Requirements
PcbLib clean tests must preserve result construction and reporting.
Working Definition
Working when command output can summarize all footprint changes.