Use this guide when you have a plugin kind and need predictable diagnostics before the plugin installs runtime behavior.
You will define a JSON-compatible component config, validate required fields and supported values, return structured diagnostics, and confirm that disabled components still report config problems before rollout.
The canonical plugin configuration is a top-level document with version, components, and policy.
Each component has:
kind: the plugin kind to activate.enabled: whether the component should initialize.config: the component-local JSON object passed to validation and registration.Disabled components are still validated. This lets operators detect config problems before enabling a component in a later rollout.
Validation should be deterministic and side-effect free. It should inspect config and return diagnostics; it should not register middleware, open network connections, create clients, or mutate process state.
Validate these areas first:
Use warnings when a config can still activate but deserves operator attention. Use errors when initialization should not proceed.
Diagnostics should be actionable and stable enough for tests or deployment automation:
Prefer stable diagnostic codes over prose-only messages. The message can improve over time; the code should remain testable.
Use the validation API before initialization and fail deployment if the report contains errors.
This error check does not catch an unknown or unregistered component kind. Under
the default unknown_component="warn" policy that case is reported as a warning,
not an error, so the check below passes while initialize() still raises for a
kind that is not registered. Register every kind before initialization, or set
unknown_component="error" to make validation fail on unknown kinds.
Before sharing a plugin config contract:
Check these symptoms first when the workflow does not behave as expected.
Use these links to continue from this workflow into the next related task.