Skip to content

Conversation

@pditommaso
Copy link
Member

Summary

This ADR proposes interface modules - abstract module definitions that declare input/output contracts without implementation. Concrete modules can implement these interfaces, and users select the target implementation at runtime via configuration.

This enables:

  • Tool benchmarking (run same data through multiple tools)
  • User customization (swap implementations without modifying workflow code)
  • LLM-assisted pipeline construction (semantic discovery of interchangeable tools)

Key Design Decisions

  • Minimal syntax impact: No new DSL keywords; uses meta.yaml fields
  • type: interface in meta.yaml marks a module as an abstract contract
  • implements: <interface> declares that a module complies with an interface
  • Resolution via config: modules.interfaces {} block in nextflow.config
  • Three resolution strategies: static, parameter-based, and per-sample closure

Example

# Interface module meta.yaml
name: nf-core/msa-alignment
type: interface
input: [...]
output: [...]
# Implementation module meta.yaml
name: nf-core/clustalo-align
implements: nf-core/msa-alignment@>=1.0.0
// nextflow.config
modules {
    interfaces {
        'nf-core/msa-alignment' = params.aligner
    }
}

Related

🤖 Generated with Claude Code

This ADR proposes interface modules - abstract module definitions that
declare input/output contracts without implementation. Concrete modules
can implement these interfaces, and users select the target implementation
at runtime via configuration.

Key features:
- type: interface field in meta.yaml for abstract contracts
- implements: field for declaring interface compliance
- Resolution via modules.interfaces {} block in nextflow.config
- Support for static, parameter-based, and per-sample binding

Related: nextflow-io/schemas#11

Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
@netlify
Copy link

netlify bot commented Jan 20, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 403eac3
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/696f66e67674080008658680

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants