PYMCP_012_APPLICATION_USES_PORTS: Application kennt nur Ports (typing.Protocol)
Severity: must. Bereich: python-mcp.
Regel
Use Cases MUESSEN ihre externen Abhaengigkeiten ueber typing.Protocol- Interfaces (Ports) deklarieren und per Konstruktor entgegennehmen. Ein direkter Import eines Adapters in der Application-Schicht ist verboten.
Reflection-Check
check:
reflect:
fields:
- port_protocols
object: mcp_layering_profileEvidence
- PY_TYPING_PROTOCOL, typing.Protocol — Structural subtyping
- LOCAL_KI_WEB_AUDIT, Audit des ki-web MCP-Servers (Mai 2026)