Dies ist die deutsche MFDoctor-Dokumentation. Technische Bezeichner, CLI-Flags, Regel-IDs und Codebeispiele bleiben unverändert, damit die Inhalte zwischen den Sprachen vollständig kompatibel bleiben. Verwenden Sie den Sprachumschalter für die kanonische englische Fassung.
Monorepos
Build each federation app with the MFDoctor plugin so it writes
.mf/doctor/project.json. Then run the one-shot workspace gate from the
monorepo root (or scoped roots):
That is tier 2 of the agent loop: do not claim green from
mfdoctor check alone. After every host and remote has built with its adapter,
this gate checks version ranges, providers, singleton choices, and share scopes
across projects. Exit 0 / 1 / 2 match the rest of the CLI.
Federation-Geltungsbereich auswählen
A workspace can be one real federation, a repository of independent fixtures, or several deliberate federation groups. Keep those cases explicit:
- A real monorepo may use the default workspace gate.
- Independent fixtures should use separate roots/globs, or assign each fixture a group in its MFDoctor options.
- Multiple graphs should set the same
federationGroupon every app in one graph and use--groupwhen running a focused gate.
Projects in different explicit groups are not compared by federation-wide
rules. workspace still reports the available group metadata so CI can keep
the gate aligned with the repository topology. Legacy project facts without a
group remain in the ungrouped scope for backwards compatibility.
MFDoctor keeps project display names for v1 reports, but workspace federation uses a stable application identity based on the workspace-relative app path. This means two apps with the same package name stay separate. The gate also follows Node's normal package resolution chain, so pnpm hoists, nested installs, and workspace links are checked from each app's own context.
If a project report points at a missing root, or duplicate reports share an
identity with different contents, MFDoctor reports partial analysis and exits 2.
Keep workspace roots scoped to the monorepo and rely on the default ignores for
node_modules, build output, caches, and coverage directories.
Manual globs remain available when you need an escape hatch:
Share org policy with a workspace package (or path) and extends — see
policy packs and presets. Example fixture:
fixtures/policy-packs/acme-mfdoctor-policy.
See CLI and CI for the reusable GitHub Action
(consumer snippet without Vite Plus / setup-vp).