Local compiler extension demo

Local Motif Plugin ABI

Teams can register deterministic MotifPlugin implementations that lower enterprise motif intent into portable CompositionIR primitives without corrupting compiler invariants.

Plugin Boundary

class RiskPanelPlugin(MotifPlugin):
    id = "acme.risk_panel.v1"
    priority = 100

    def supports(self, motif, context):
        return motif.kind == "acme.risk_panel"

    def lower(self, motif, context):
        return CompositionIR(
            nodes=[
                surface("risk_panel"),
                value("exposure"),
                badge("policy_status"),
            ]
        )

Deterministic Lowering

The compiler selects motif plugins through an ordered local registry and fails on unsupported or ambiguous matches. Plugin ids are explicit, priorities are numeric, and output remains portable CompositionIR.

This is not dynamic plugin discovery, filesystem plugin loading, remote code execution, or an untrusted sandbox. It is a local deterministic extension seam for compiler-owned motif lowering.

Portable Output

Emitters still render standard primitives. A custom motif such as financial_candlestick or acme.risk_panel can carry domain intent at the input edge, then lower into the same renderer-safe tree as built-in table, list, form, detail, and hero motifs.

Hosted Tiering

Public pricing remains unchanged: Free includes the local SDK, Pro includes five custom motif instances per hosted compile, and Enterprise supports unlimited custom motifs with org sharing and launch support.

Use this page as the architecture proof point; AppBundle V3 State IR is the flagship app-generation story.