Follow-up from #176 (fixed in PR #216 for pack-level supplementaryDoctorChecks).
ExternalPackAdapter.convertComponent() calls ProjectDetector.findProjectRoot() for each component that has inline doctorChecks defined. These checks are baked into ComponentDefinition.supplementaryChecks as concrete [any DoctorCheck] instances at construction time — the projectRoot used during creation is frozen into the check structs.
This means:
pack.components triggers findProjectRoot() for each component with doctorChecksprojectRoot (e.g., global scope should use nil, but picks up the project root from CWD)allDoctorChecks(projectRoot:) returns derived + supplementaryChecks — only derived checks use the scope-appropriate projectRoot; the baked-in supplementary checks do notComponentDefinition.supplementaryChecks is a let stored property ([any DoctorCheck])allDoctorChecks(projectRoot:) (doctor runs) and ComponentExecutor (install-time "already installed?" checks)components is a TechPack protocol property used in many contexts beyond doctor — adding a projectRoot parameter would be a larger refactorChange ComponentDefinition.supplementaryChecks from [any DoctorCheck] to @Sendable (URL?) -> [any DoctorCheck] (a factory closure). Call the factory from allDoctorChecks(projectRoot:) so each doctor run gets scope-correct checks. ComponentExecutor would pass nil or the appropriate project root.
Low — same as #176. Pack count and component count are small in practice and the walk-up is fast. This is a code quality improvement, not a performance fix.
Sources/mcs/TechPack/Component.swift — change supplementaryChecks typeSources/mcs/ExternalPack/ExternalPackAdapter.swift:157 — provide closure instead of eager checksSources/mcs/Doctor/DerivedDoctorChecks.swift:46-49 — call factory with projectRootSources/mcs/Install/ComponentExecutor.swift:338 — pass appropriate projectRoot