Skip to content
Open
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
24 changes: 24 additions & 0 deletions rules/flutter-app-runtime.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
description: Proactively connect to running Dart/Flutter apps and trigger hot reload using the flutter-app-runtime skill workflows upon editing .dart files.
globs: "**/*.dart"
---
Comment on lines +1 to +4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The previous rule file rules/hot_reload.md included trigger: glob in its frontmatter. If the rule parser requires this field to trigger the rule on glob matches, it should be retained in the new rules/flutter-app-runtime.md file.

Suggested change
---
description: Proactively connect to running Dart/Flutter apps and trigger hot reload using the flutter-app-runtime skill workflows upon editing .dart files.
globs: "**/*.dart"
---
---
trigger: glob
description: Proactively connect to running Dart/Flutter apps and trigger hot reload using the flutter-app-runtime skill workflows upon editing .dart files.
globs: "**/*.dart"
---


# Proactive Flutter Hot Reload Rule

Whenever you edit or modify any `.dart` file in this project, adhere to the runtime management procedures in the `flutter-app-runtime` skill:

1. **Refer to Skill**:
- Activate and follow the `flutter-app-runtime` skill workflows for Dart Tooling Daemon (`dtd`), hot reloading, hot restarting, and runtime error inspection.
Comment on lines +8 to +11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The rule references the flutter-app-runtime skill, but this skill is currently not defined in resources/flutter_skills.yaml. Please make sure to define the flutter-app-runtime skill in resources/flutter_skills.yaml so that the skill can be generated and successfully resolved by the agent.


2. **Discover & Connect**:
- Discover active running application instances using the `dtd` tool (or `list_running_apps` / `vm_service`).

3. **Trigger Hot Reload / Hot Restart**:
- Execute `hot_reload` immediately after making changes to UI widgets or simple methods.
- Execute `hot_restart` if fundamental logic, state initialization, or `main()` was modified.

4. **Verify Runtime Stability**:
- Run `get_runtime_errors` via `dart-mcp-server` to confirm that the hot reload/restart did not introduce new exceptions.

5. **Fallback Handling**:
- If no running app instance is connected via DTD, briefly inform the user, but do not let it stop you from completing the code edits.
25 changes: 25 additions & 0 deletions rules/flutter-app-runtime.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
description: Proactively connect to running Dart/Flutter apps and trigger hot reload using the flutter-app-runtime skill workflows upon editing .dart files.
globs: "**/*.dart"
alwaysApply: false
---

# Proactive Flutter Hot Reload Rule

Whenever you edit or modify any `.dart` file in this project, adhere to the runtime management procedures in the `flutter-app-runtime` skill:

1. **Refer to Skill**:
- Activate and follow the `flutter-app-runtime` skill workflows for Dart Tooling Daemon (`dtd`), hot reloading, hot restarting, and runtime error inspection.
Comment on lines +9 to +12

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The rule references the flutter-app-runtime skill, but this skill is currently not defined in resources/flutter_skills.yaml. Please make sure to define the flutter-app-runtime skill in resources/flutter_skills.yaml so that the skill can be generated and successfully resolved by the agent.


2. **Discover & Connect**:
- Discover active running application instances using the `dtd` tool (or `list_running_apps` / `vm_service`).

3. **Trigger Hot Reload / Hot Restart**:
- Execute `hot_reload` immediately after making changes to UI widgets or simple methods.
- Execute `hot_restart` if fundamental logic, state initialization, or `main()` was modified.

4. **Verify Runtime Stability**:
- Run `get_runtime_errors` via `dart-mcp-server` to confirm that the hot reload/restart did not introduce new exceptions.

5. **Fallback Handling**:
- If no running app instance is connected via DTD, briefly inform the user, but do not let it stop you from completing the code edits.
10 changes: 0 additions & 10 deletions rules/hot_reload.md

This file was deleted.

9 changes: 0 additions & 9 deletions rules/hot_reload.mdc

This file was deleted.

Loading