Skip to content

Make The Framework modular (Vike-style extensions) #190

Description

@suleimansh

Make The Framework modular, similar to Vike: installed framework-* packages self-register instead of the CLI hardcoding the list.

Decisions (settled)

  • Agnostic core. Nothing is Vike-gated. Capabilities are framework-agnostic.
  • Framework = a skill. A framework isn't a special adapter package. It's just a skill = a pointer to its llms.txt (e.g. https://vike.dev/llms.txt for Vike, the equivalent for Next). The old "adapter" axis is gone.
  • Flat naming. framework-sentry, not framework-tracking-sentry.
  • Open Loop / presets / marketplace / modes moved to Open Loop: customizable prompts + flows, domain presets, marketplace #204. This issue stays scoped to the extension SPI.

So the model is two things: capabilities (auth, data, ...) that self-register + skills (doc pointers for framework/domain knowledge). Skills are the shared unit with #204.

Where it's hardwired today

packages/framework/src/run.ts pins the composition:

const { preset, detection } = builtinPresetRegistry().select(opts.signals ?? {})
const personas = detection.framework === 'Vike'
  ? presetPersonas(preset, vikeExtensionPersonas)   // fixed list, Vike-gated
  : presetPersonas(preset)

The registry and the extension list are pinned in code, so no third party can publish framework-next or framework-drizzle and have it auto-compose. The substrate is already there (Preset detection + Persona capabilities + registries in @gemstack/ai-autopilot), it just isn't exposed.

What to build

A public FrameworkExtension unit (capability) that bundles:

  • detection signals (deps/files) that decide when it activates
  • persona(s) it contributes to the agent frame
  • optional serve / checklist / deploy contributions
  • optional skill(s) it pulls in (e.g. a data extension can register the ORM's llms.txt)

The CLI discovers installed framework-* packages, registers them, and composes whatever matched, instead of hardcoding vikeExtensionPersonas. Framework knowledge comes in as a skill, not a gate.

Scope

  • Define the FrameworkExtension SPI (defineFrameworkExtension)
  • Define the skill unit (pointer to an llms.txt) and how extensions/presets register skills
  • Discovery: find + register installed framework-* packages (plus explicit opt-in via config)
  • Compose matched extensions in run.ts, drop the hardcoded vikeExtensionPersonas / Vike gate
  • Ship the built-ins (auth, data) as extensions and Vike as a skill through the same seam to prove it
  • Docs: how to author and publish a framework-* extension

Related: #204 (Open Loop), #186 (compose framing), #110 (AI framework epic).

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions