feat(ai-autopilot): web-app preset seam — framework detection + Vike/Next presets (#115)#130
Merged
Merged
Conversation
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.
Child of #110. The web-app preset layer.
Builds the mechanism the agreed epic scope calls for (agnostic core + domain presets): framework-specific knowledge lives at the persona layer and is selected by detecting the app's framework, not by forking the runtime.
Preset— data: a framework's personas + the signals that identify it.definePresetvalidates it.detectFramework(presets, signals)— scores a project's dependencies + files (deps weigh more than files), deterministic, returns every score so ties are inspectable.PresetRegistry.select(signals)— picks the detected preset, falling back to the flagship when nothing matches, so a run always has a preset.vikePreset(flagship) andnextPreset, plus a newnextPageBuilderpersona (App Router + RSC).presetPersonas(preset)— the framework page builder followed by the shared, framework-neutral personas (sharedPersonas= universal-orm modeler + intent-UI designer). Only the page builder swaps between frameworks; the rest of the stack and the prompts stay put.This answers the issue's two open questions: detection drives selection via deps/files scoring, and prompts stay framework-neutral (the framework knowledge is in personas), so no Next prompt fork is needed for v1.
Scope note: this is the seam/mechanism, which the epic scope already settled ("agnostic core + domain presets"). The deliberately-open question — whether to hard-limit the market to Next/Vike vs keep it agnostic — is untouched; the registry takes any
Preset, so that stays a positioning call, not a code constraint.Wiring:
personaWorkers(presetPersonas(registry.select(signals).preset))drops straight intosupervisorBuild(the bootstrap build step). Left as a call-site so this PR stays self-contained.Tests: detection (Vike/Next by dep + file, bare-list deps, no-match, overlap/migration tie-break, dep-vs-file weighting), the built-ins +
presetPersonas(only the page builder swaps), the registry (select + flagship fallback + explicit fallback + get/all/add), anddefinePresetvalidation. Full suite 204 green.Closes #115.