Skip to content

docs(architecture): ADR for plugins and extensions taxonomy#589

Open
seanspeaks wants to merge 1 commit into
nextfrom
adr/extensions
Open

docs(architecture): ADR for plugins and extensions taxonomy#589
seanspeaks wants to merge 1 commit into
nextfrom
adr/extensions

Conversation

@seanspeaks

Copy link
Copy Markdown
Contributor

Summary

Adds docs/architecture/ADR-EXTENSIONS.md — a proposed three-tier taxonomy for what's pluggable in Frigg:

  • Core Plugins — required infrastructure with defaults (provider, queue, encryption, DB). Already covered by ADR-MULTI-PROVIDER-SUPPORT; this ADR names the category for contrast.
  • Application Extensions — optional, declarative additions to the core app, listed on appDefinition.extensions. Grounded in the packages/core/extensions/ prototype on claude/frigg-netlify-exploration-aY2Bh and the reference @friggframework/extension-db-credentials package.
  • Integration Extensions — off-the-shelf handler bundles (webhooks, sync routines) shipped with API modules, bound into an integration's Definition.extensions. Grounded in the this.extensions prototypes in lefthookhq/frigg-2.0-prototyping, stack-global--frigg-2.0, and vartopia--frigg-2.0.

What the ADR resolves

  • Vocabulary collision. "Plugin" and "extension" are currently used for at least three different things across the codebase and prototypes.
  • Shape mismatch. The Tier 2 loader expects extensions: [...] (array); the Tier 3 prototypes use extensions: { name: {...} } (object). The ADR keeps both — they model different problems — and explains why.
  • this.extensions vs static Definition.extensions. Recommends moving Tier 3 wiring out of the constructor and onto the static Definition, with string-name handler binding done by the framework at instantiation.

Status

  • Status: Proposed — open for review and revision before acceptance.
  • No code changes. Pure design doc.
  • Implementation phases sketched at the end of the ADR (Tier 2 land → Tier 3 formalize → docs → deprecate old shape).

Open questions in the ADR

  1. Handler-binding-by-string trade-offs vs. a factory form
  2. Whether Tier 3 should be able to contribute Prisma models (currently a Tier 2 capability)
  3. Versioning / compatibility metadata on extensions

Test plan

  • Confirm the three-tier model maps cleanly to the existing Multi-Provider ADR (Tier 1)
  • Confirm Tier 2 description matches the netlify-exploration prototype's intent
  • Confirm Tier 3 description matches the LeftHook downstream prototypes' intent
  • Resolve open questions before marking Accepted

🤖 Generated with Claude Code

Defines a three-tier model for what's pluggable in Frigg, distinguishing
Core Plugins (required infrastructure with defaults — provider, queue,
encryption), Application Extensions (optional cross-cutting features on
appDefinition.extensions), and Integration Extensions (off-the-shelf
handler bundles on IntegrationBase.Definition.extensions).

Grounds the model in existing prototypes: the packages/core/extensions
system on claude/frigg-netlify-exploration-aY2Bh for Tier 2, and the
this.extensions pattern in the frigg-2.0 downstream repos for Tier 3.
Calls out current shape mismatches (array vs object, constructor vs
static Definition, vocabulary collision) and proposes resolutions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, push a new commit or reopen this pull request to trigger a review.

@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant