Skip to content

Extension Step Contract #366

Description

@Seddryck

Description

An Extension Step Contract defines the minimal interface that an extension must implement to participate in the Didot pipeline.

It specifies how Didot invokes the extension, what input it receives, and what output it must return.

The goal is to make all pipeline extensions behave in a consistent and predictable way, regardless of whether they enrich, normalize, filter, validate, or otherwise modify the model.

Purpose

The contract ensures that Didot core can execute any compatible extension without knowing its internal logic.

In practice, the contract answers questions such as:

  • how an extension is identified
  • how it receives the current model
  • how it receives its configuration
  • how it returns the updated model
  • how failures are reported

Expected behavior

A pipeline extension implementing this contract should:

  1. expose a stable name
  2. accept the current model as input
  3. optionally accept extension-specific configuration
  4. return a model compatible with the next pipeline step
  5. fail in a controlled and diagnosable way if execution is not possible

Example

If Didot executes the pipeline:

source → parse → expressif → render

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions