Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions packages/ai-autopilot/src/personas/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,14 +452,22 @@ Reach for a bespoke component only for a genuinely custom region, and even then
style it with the theme's CSS variables so it tracks light/dark and the brand.`,
})

/**
* The framework- and path-neutral guardrails that apply on every path — plain
* Prisma or composed extensions, Vike or Next. Kept as one named tail so both
* {@link sharedPersonas} and {@link vikeExtensionPersonas} spread it instead of
* re-listing it, and adding a neutral guardrail can't silently drop from a path.
*/
const neutralGuardrails: readonly Persona[] = Object.freeze([uiIntentDesigner])

/**
* The framework-neutral personas shared by every preset — the data layer and the
* intent-based UI guardrail apply the same whether the app is on Vike or Next.
* A preset adds its framework-specific page builder on top (see the presets seam).
*/
export const sharedPersonas: readonly Persona[] = Object.freeze([
dataModeler,
uiIntentDesigner,
...neutralGuardrails,
])

/**
Expand All @@ -478,7 +486,7 @@ export const vikeExtensionPersonas: readonly Persona[] = Object.freeze([
vikeRbacComposer,
vikeCrudComposer,
vikeShellComposer,
uiIntentDesigner,
...neutralGuardrails,
])

/** All built-in stack personas (the Vike stack), in a stable order. */
Expand Down
17 changes: 10 additions & 7 deletions packages/framework/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export async function runFramework(opts: RunFrameworkOptions): Promise<RunFramew
// nothing (its whole workspace is always "empty"), so it opts out to stay
// deterministic.
const verifyWorkspace = opts.driver.name !== 'fake'
const workspaceOpt = verifyWorkspace ? { verifyWorkspace: true } : {}

const ledger = new DecisionLedger()
let preview: AppPreview | undefined
Expand All @@ -248,14 +249,16 @@ export async function runFramework(opts: RunFrameworkOptions): Promise<RunFramew
steps: {
scope: () => ({ scope: opts.scope ?? 'full', intent: opts.intent }),
architect: driverArchitect(session),
build: driverBuild(session, verifyWorkspace ? { verifyWorkspace: true } : {}),
build: driverBuild(session, workspaceOpt),
checklist,
improve: driverImprove(session, verifyWorkspace ? { verifyWorkspace: true } : {}),
...(opts.deploy && opts.deployTarget
? { deploy: deployWith(opts.deploy, opts.deployTarget) }
: opts.deploy
? { deploy: decideDeploy(opts.deploy) }
: {}),
improve: driverImprove(session, workspaceOpt),
...(opts.deploy
? {
deploy: opts.deployTarget
? deployWith(opts.deploy, opts.deployTarget)
: decideDeploy(opts.deploy),
}
: {}),
},
})
const result = await bootstrap.run()
Expand Down
Loading