OpenWebF Init (Wizard)
Create a guided, project-aware plan and (optionally) apply safe scaffolding for OpenWebF/WebF projects.
Safety first
If this will generate or modify multiple files, suggest the user create a checkpoint first (so they can undo easily), then proceed only after confirmation.
Steps
- If the user passed
$ARGUMENTS, treat it as the directory to inspect; otherwise use the current working directory.
- Call
mcp__openwebf__project_profile with { "cwd": "<dir>" } and summarize:
- Type + confidence
- Detected dependencies and versions
- Whether WebF controller manager, bundle loading, caching, theming, routing, and performance monitoring appear to be set up
- Top 3 warnings (if any)
- Ask only the minimum clarifying questions needed to proceed (based on type):
- For
flutter-host:
- Bundle loading mode:
assets | localhost | remote | inline
- Router:
go_router? (yes/no)
- Controller name(s) and initial route strategy
- Whether to enable DevTools in debug builds
- For
webf-app:
- Preferred stack: React + TypeScript (default) or something else
- Dev URL / port (for WebF Go or host app)
- Whether the user wants a basic testing setup (Vitest)
- For
monorepo:
- Which subdir is the Flutter host and which is the WebF app
- Call
mcp__openwebf__recommendations with { "cwd": "<dir>", "goals": [ ... ] }, where goals are derived from the user’s answers (e.g. performance, caching, routing, testing, release).
- Produce an ordered “init plan”:
- Quick win (small patch) suggestions first
- Then scaffolding templates to apply (if requested)
- Then manual steps
- If the user confirms they want scaffolding:
- Fetch the relevant template(s) with
mcp__openwebf__templates_get
- Apply them to the repo in the appropriate locations, adapting names/paths to match the user’s structure
- Keep changes minimal and explain how to verify success
- Finish with verification commands:
- For Flutter host: run/debug instructions + what to look for (first render, logs, DevTools, FP/FCP/LCP callbacks)
- For WebF app: dev server commands + WebF Go loading instructions