feat(framework): capability-extension + skill SPI (#190)#205
Merged
Conversation
6 tasks
…dcoded (#190) The Framework's composition was pinned in run.ts (a fixed vikeExtensionPersonas list swapped in behind --compose-extensions), so no third party could publish a framework-* package and have it auto-compose. Add the agnostic extension SPI: - defineFrameworkExtension: a capability (auth/data/rbac/crud/shell) that self-registers, matched by signal or opt-in, framing the agent with personas. An extension supersedes the neutral default persona of the same capability. - defineSkill: a doc pointer (an llms.txt), the shared unit with #204. A framework is a skill, not an adapter: Vike rides the seam as vike.dev/llms.txt. - ExtensionRegistry / SkillRegistry, composePersonas, skillInstructions, and loadExtensionsFromModules for discovering installed framework-* packages. run.ts composes matched extensions + skills through the registry; the CLI reads the project's real signals and discovers installed framework-* packages (resolved from the user workspace, failures reported not thrown). The built-in vike-* composers ship as extensions and Vike as a skill, proving the seam. The publish-safe default (hand-rolled + Prisma) is unchanged. Closes #190.
a9947b8 to
ffb3e66
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes The Framework modular (#190). Installed capability packages self-register and compose into a run instead of the CLI hardcoding the list. All agnostic, nothing framework-gated.
What changed
defineFrameworkExtension(ai-autopilot): a capability (auth, data, rbac, crud, shell) that self-registers, matched by signal (a dep is present) or opt-in, framing the agent with its personas. An extension supersedes the neutral default persona of the samecapability(soframework-datareplaces the default ORM modeler, no conflicting personas).defineSkill: a doc pointer (an llms.txt), the shared unit with Open Loop: customizable prompts + flows, domain presets, marketplace #204. A framework is a skill, not an adapter package. Vike now rides the seam as https://vike.dev/llms.txt.ExtensionRegistry/SkillRegistry,composePersonas,skillInstructions, andloadExtensionsFromModulesfor discovering installedframework-*packages.run.tscomposes matched extensions + skills through the registry, dropping the hardcodedvikeExtensionPersonaslist and the compose gate.framework-*capability packages, resolved from the user's workspace. Bad or missing packages are reported, not thrown.Proof (scope checklist)
FrameworkExtensionSPI (defineFrameworkExtension)framework-*packages, plus opt-inrun.ts, drop the hardcoded list / gateframework-*extension (README)The publish-safe default (hand-rolled + Prisma) is unchanged;
--compose-extensionsstill opts every built-in in.Tests: new coverage for define/registry/compose/discovery in ai-autopilot, plus framework-level tests that Vike arrives as a skill and a registered extension auto-activates by signal. Repo typecheck + both suites green (339 tests).
Closes #190.