|
| 1 | +--- |
| 2 | +name: vgv-create-project |
| 3 | +description: Scaffold a new Dart or Flutter project from a Very Good CLI template. Use when user says "create a new project", "start a new flutter app", "scaffold a package", "initialize a dart cli", "new flame game", or "generate a plugin". Supports flutter_app, dart_package, flutter_package, flutter_plugin, dart_cli, flame_game, and docs_site templates. |
| 4 | +allowed-tools: mcp__very-good-cli__create,mcp__very-good-cli__packages_get |
| 5 | +argument-hint: "[template] [project-name]" |
| 6 | +--- |
| 7 | + |
| 8 | +# Create Project |
| 9 | + |
| 10 | +Scaffold a new Dart or Flutter project using Very Good CLI templates. |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## Core Standards |
| 15 | + |
| 16 | +- **Use the Very Good CLI MCP server** to scaffold projects and install dependencies |
| 17 | +- **Infer the template from context** — determine the right template based on what the user wants to build, not by asking them to pick a subcommand name |
| 18 | +- **Use `AskUserQuestion` only for information you cannot infer** — project name and organization are the most common missing pieces |
| 19 | +- **Install dependencies after creation** |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## Workflow |
| 24 | + |
| 25 | +### Step 1: Understand What the User Wants to Build |
| 26 | + |
| 27 | +Infer the subcommand from the user's description — the available subcommands and their descriptions are defined by the Very Good CLI MCP server. Do NOT ask users to pick a subcommand name — figure it out from context. |
| 28 | + |
| 29 | +If the intent is ambiguous, use `AskUserQuestion` to clarify with a high-level question about what they're building — not which subcommand they want. |
| 30 | + |
| 31 | +### Step 2: Gather Missing Parameters |
| 32 | + |
| 33 | +Use `AskUserQuestion` to collect only what you cannot infer. Batch questions into a single call when possible. Do NOT ask for optional parameters (description, output directory, application ID, etc.) unless the user brings them up. |
| 34 | + |
| 35 | +### Step 3: Create and Set Up |
| 36 | + |
| 37 | +1. Create the project using the Very Good CLI MCP server |
| 38 | +2. Install dependencies using the Very Good CLI MCP server |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## Key Domain Knowledge |
| 43 | + |
| 44 | +- Use `dart_package` (not `flutter_package`) for data layer and repository layer packages in the **layered-architecture** pattern — these must not depend on Flutter SDK |
| 45 | +- If a user provides a project name with dashes, convert to underscores — Dart package names only allow lowercase letters, numbers, and underscores |
| 46 | +- Templates that produce apps, plugins, or games require an organization name — do not skip this or it defaults to a placeholder value |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## Examples |
| 51 | + |
| 52 | +### User says "Create a new Flutter app" |
| 53 | + |
| 54 | +1. Infer: `flutter_app` |
| 55 | +2. Ask for project name and organization |
| 56 | +3. Create and install dependencies |
| 57 | + |
| 58 | +### User says "I need a package for my weather API client, put it in packages/" |
| 59 | + |
| 60 | +1. Infer: "API client" → pure Dart → `dart_package`, name `weather_api_client`, output `packages/` |
| 61 | +2. Everything is clear — no questions needed |
| 62 | +3. Create and install dependencies |
| 63 | + |
| 64 | +### User says "I want to build something for iOS and Android with bluetooth" |
| 65 | + |
| 66 | +1. Ambiguous: app or plugin? Ask to clarify |
| 67 | +2. Gather remaining parameters based on answer |
| 68 | +3. Create and install dependencies |
| 69 | + |
| 70 | +### User says "Create a new package" |
| 71 | + |
| 72 | +1. Ambiguous: Flutter or pure Dart? Ask to clarify |
| 73 | +2. Ask for project name |
| 74 | +3. Create and install dependencies |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Troubleshooting |
| 79 | + |
| 80 | +### Invalid project name error |
| 81 | + |
| 82 | +- Names must be valid Dart package names: lowercase letters, numbers, underscores only |
| 83 | +- Dashes are not allowed — convert `my-app` to `my_app` |
| 84 | + |
| 85 | +### Dependencies fail to install after creation |
| 86 | + |
| 87 | +- Verify the Dart SDK is installed and on PATH |
| 88 | +- Try running from the project root directory |
| 89 | + |
| 90 | +--- |
| 91 | + |
| 92 | +## Anti-Patterns |
| 93 | + |
| 94 | +| Anti-Pattern | Problem | Correct Approach | |
| 95 | +| --- | --- | --- | |
| 96 | +| Asking user to pick a template name | Users think in terms of what they're building, not CLI subcommands | Infer the template from context | |
| 97 | +| Over-asking for optional parameters | Slows down the workflow | Only ask for what you cannot infer | |
| 98 | +| Using `flutter_package` for a data layer | Adds unnecessary Flutter SDK dependency | Use `dart_package` for data and repository layer packages | |
| 99 | +| Skipping organization name for apps/plugins | Defaults to a placeholder value | Ask when the template requires it | |
0 commit comments