-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add namespaced flutter command aliases #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:generate-flutter-tests | ||
| description: Alias for `generate-flutter-tests`. Generate or extend Flutter tests (unit/widget/bloc/Patrol E2E) for existing code paths. | ||
| --- | ||
|
|
||
| Namespaced alias for `generate-flutter-tests`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./generate-flutter-tests.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:implement-figma-screen | ||
| description: Alias for `implement-figma-screen`. Implement a Flutter screen/component from Figma using Figma MCP and Flutter best practices. | ||
| --- | ||
|
|
||
| Namespaced alias for `implement-figma-screen`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./implement-figma-screen.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:implement-flutter-feature | ||
| description: Alias for `implement-flutter-feature`. Implement or refactor a Flutter feature using clean architecture and Dart MCP workflows. | ||
| --- | ||
|
|
||
| Namespaced alias for `implement-flutter-feature`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./implement-flutter-feature.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:integrate-firebase | ||
| description: Alias for `integrate-firebase`. Set up Firebase in Flutter app with FlutterFire CLI and production-ready checks for core Firebase services. | ||
| --- | ||
|
|
||
| Namespaced alias for `integrate-firebase`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./integrate-firebase.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:migrate-flutter-code | ||
| description: Alias for `migrate-flutter-code`. Perform targeted Flutter/Dart migration or refactor with safe incremental steps. | ||
| --- | ||
|
|
||
| Namespaced alias for `migrate-flutter-code`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./migrate-flutter-code.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:prepare-mobile-release | ||
| description: Alias for `prepare-mobile-release`. Execute Android and iOS release-readiness workflow for Flutter apps before Play Store/App Store submission. | ||
| --- | ||
|
|
||
| Namespaced alias for `prepare-mobile-release`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./prepare-mobile-release.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:resolve-flutter-build-error | ||
| description: Alias for `resolve-flutter-build-error`. Diagnose and fix Flutter build/runtime errors across Dart, Android, iOS, and package dependency layers. | ||
| --- | ||
|
|
||
| Namespaced alias for `resolve-flutter-build-error`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./resolve-flutter-build-error.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:review-flutter-code | ||
| description: Alias for `review-flutter-code`. Review Flutter code or diff against conventions, architecture, and testing standards. | ||
| --- | ||
|
|
||
| Namespaced alias for `review-flutter-code`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./review-flutter-code.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:scaffold-flutter-feature | ||
| description: Alias for `scaffold-flutter-feature`. Generate a new Flutter feature skeleton with clean architecture and selected state-management pattern. | ||
| --- | ||
|
|
||
| Namespaced alias for `scaffold-flutter-feature`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./scaffold-flutter-feature.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:security-review | ||
| description: Alias for `security-review`. Run security-focused review with secret scanning and prioritized findings for Flutter/Dart repositories. | ||
| --- | ||
|
|
||
| Namespaced alias for `security-review`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./security-review.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:setup-mobile-github-pipeline | ||
| description: Alias for `setup-mobile-github-pipeline`. Create a typical GitHub Actions mobile CI pipeline for Flutter with APK/AAB build artifacts and release-ready quality gates. | ||
| --- | ||
|
|
||
| Namespaced alias for `setup-mobile-github-pipeline`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./setup-mobile-github-pipeline.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:sync-official-flutter-ai-rules | ||
| description: Alias for `sync-official-flutter-ai-rules`. Sync official Flutter AI rules from Flutter upstream and select active profile (10k, 4k, 1k). | ||
| --- | ||
|
|
||
| Namespaced alias for `sync-official-flutter-ai-rules`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./sync-official-flutter-ai-rules.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:update-flutter-dependencies | ||
| description: Alias for `update-flutter-dependencies`. Upgrade Flutter SDK and Dart/Flutter dependencies safely with analysis, tests, and rollback guidance. | ||
| --- | ||
|
|
||
| Namespaced alias for `update-flutter-dependencies`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./update-flutter-dependencies.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:write-bloc-test | ||
| description: Alias for `write-bloc-test`. Create or update a Bloc/Cubit test using the plugin skill, rules, and template. | ||
| --- | ||
|
|
||
| Namespaced alias for `write-bloc-test`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./write-bloc-test.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:write-e2e-test | ||
| description: Alias for `write-e2e-test`. Create or update a Patrol E2E test for a critical user flow. | ||
| --- | ||
|
|
||
| Namespaced alias for `write-e2e-test`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./write-e2e-test.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: flutter:write-widget-test | ||
| description: Alias for `write-widget-test`. Create or update a Flutter widget test using the plugin skill, rules, and template. | ||
| --- | ||
|
|
||
| Namespaced alias for `write-widget-test`. | ||
|
|
||
| 1. Run the canonical command with the same intent. | ||
| 2. Follow `./write-widget-test.md`. | ||
| 3. Keep output and checks identical to the canonical command. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Command Namespacing | ||
|
|
||
| This plugin keeps canonical command names and provides namespaced aliases to reduce marketplace conflicts. | ||
|
|
||
| ## Naming model | ||
|
|
||
| - Canonical command: `implement-flutter-feature` | ||
| - Namespaced alias: `flutter:implement-flutter-feature` | ||
|
|
||
| Both forms are supported and route to the same workflow. | ||
|
|
||
| ## Alias generation | ||
|
|
||
| To regenerate aliases for all canonical commands: | ||
|
|
||
| ```bash | ||
| scripts/generate_namespaced_command_aliases.py | ||
| ``` | ||
|
|
||
| This creates `commands/flutter-*.md` alias files for every canonical command. |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/usr/bin/env python3 | ||
|
|
||
| import re | ||
| from pathlib import Path | ||
|
|
||
|
|
||
| FRONTMATTER_RE = re.compile(r"^---\n(.*?)\n---\n", re.DOTALL) | ||
|
|
||
|
|
||
| def extract_description(content: str) -> str: | ||
| match = FRONTMATTER_RE.search(content) | ||
| if not match: | ||
| return "Namespaced alias command." | ||
| frontmatter = match.group(1) | ||
| for line in frontmatter.splitlines(): | ||
| if line.strip().startswith("description:"): | ||
| return line.split(":", 1)[1].strip() | ||
| return "Namespaced alias command." | ||
|
|
||
|
|
||
| def main() -> None: | ||
| repo_root = Path(__file__).resolve().parents[1] | ||
| commands_dir = repo_root / "commands" | ||
| for cmd_file in sorted(commands_dir.glob("*.md")): | ||
| stem = cmd_file.stem | ||
| if stem.startswith("flutter-"): | ||
| continue | ||
|
|
||
| alias_file = commands_dir / f"flutter-{stem}.md" | ||
| if alias_file.exists(): | ||
| continue | ||
|
|
||
| content = cmd_file.read_text(encoding="utf-8") | ||
| description = extract_description(content) | ||
| alias_content = ( | ||
| "---\n" | ||
| f"name: flutter:{stem}\n" | ||
| f"description: Alias for `{stem}`. {description}\n" | ||
| "---\n\n" | ||
| f"Namespaced alias for `{stem}`.\n\n" | ||
| "1. Run the canonical command with the same intent.\n" | ||
| f"2. Follow `./{stem}.md`.\n" | ||
| "3. Keep output and checks identical to the canonical command.\n" | ||
| ) | ||
| alias_file.write_text(alias_content, encoding="utf-8") | ||
| print(f"Created {alias_file.relative_to(repo_root)}") | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generator currently exits early when an alias file already exists, so rerunning
scripts/generate_namespaced_command_aliases.pywill not refresh aliases after canonical command descriptions or instructions change. That leavescommands/flutter-*.mdfiles stale and out of sync with the canonical command files over time, even though this script is documented as the way to regenerate aliases.Useful? React with 👍 / 👎.