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
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flutter-cursor-plugin",
"displayName": "Flutter Cursor Plugin",
"version": "1.9.1",
"version": "1.10.0",
"description": "Open-source Cursor plugin for end-to-end Flutter development and testing with Dart MCP, Figma MCP, practical architecture patterns, and reliable test workflows.",
"author": {
"name": "Aleksandr Lozhkovoi",
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

- Added command namespacing with aliases in `flutter:*` form for all canonical commands.
- Added alias generator script `scripts/generate_namespaced_command_aliases.py`.
- Added command namespacing documentation (`docs/command-namespacing.md`).
- Added release automation workflow:
- `.github/workflows/release-automation.yml`
- `scripts/release_automation.py`
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Three ready-to-run scenarios:
- Canonical manifest: `.cursor-plugin/plugin.json` (schema-aligned for Cursor plugins).
- Compatibility manifest kept for existing setups: `plugin.json`.
- MCP auto-configuration: `mcp.json` (Dart MCP server).
- Command namespace support: canonical commands plus `flutter:*` aliases.

## Compatibility matrix

Expand Down Expand Up @@ -172,6 +173,8 @@ Three ready-to-run scenarios:
13. For automated release cut (version/changelog/tag/release), use:
- `.github/workflows/release-automation.yml`
- `docs/release-automation.md`
14. For command namespacing/aliases (`flutter:*`), see:
- `docs/command-namespacing.md`

Note: every code review flow includes mandatory security checks (OWASP MASVS-oriented).

Expand Down
10 changes: 10 additions & 0 deletions commands/flutter-generate-flutter-tests.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-implement-figma-screen.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-implement-flutter-feature.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-integrate-firebase.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-migrate-flutter-code.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-prepare-mobile-release.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-resolve-flutter-build-error.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-review-flutter-code.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-scaffold-flutter-feature.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-security-review.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-setup-mobile-github-pipeline.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-sync-official-flutter-ai-rules.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-update-flutter-dependencies.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-write-bloc-test.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-write-e2e-test.md
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.
10 changes: 10 additions & 0 deletions commands/flutter-write-widget-test.md
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.
20 changes: 20 additions & 0 deletions docs/command-namespacing.md
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.
1 change: 1 addition & 0 deletions docs/official-release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Use this checklist before tagging a public release.
- Plugin metadata is up to date (`plugin.json`: name, version, author, description, keywords).
- README clearly explains scope, commands, agents, and MCP requirements.
- Changelog includes the release notes for the target version.
- Command naming and aliases are documented (`docs/command-namespacing.md`).

## Quality

Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flutter-cursor-plugin",
"displayName": "Flutter Cursor Plugin",
"version": "1.9.1",
"version": "1.10.0",
"description": "Open-source Cursor plugin for end-to-end Flutter development and testing with Dart MCP, Figma MCP, practical architecture patterns, and reliable test workflows.",
"author": "Aleksandr Lozhkovoi",
"license": "MIT",
Expand Down
50 changes: 50 additions & 0 deletions scripts/generate_namespaced_command_aliases.py
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
Comment on lines +30 to +31

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Regenerate existing aliases instead of skipping them

The generator currently exits early when an alias file already exists, so rerunning scripts/generate_namespaced_command_aliases.py will not refresh aliases after canonical command descriptions or instructions change. That leaves commands/flutter-*.md files 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 👍 / 👎.


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()