Add flutter-app-runtime rule for proactive hot reload - #220
Conversation
dart-lang/ai#498 Add proactive Flutter hot reload rules (flutter-app-runtime.md and flutter-app-runtime.mdc) to automate the hot reload and runtime error verification loop when editing Dart and Flutter files. Problem: The sub-second Stateful Hot Reload cycle is the cornerstone of the Flutter development experience. However, during AI-driven workflows: - Out-of-Sync Execution: Agents modify source code on disk but fail to update the active session, leaving the simulator/device screen stale. - Friction in Context Switching: Users must exit the chat interface to manually initiate a reload via the CLI ('r') or IDE tooling. - Latent Feedback on Regressions: Build failures and layout issues (e.g., RenderFlex overflows) are only revealed after manual intervention, leading to fragmented multi-turn debugging sessions.
There was a problem hiding this comment.
Code Review
This pull request replaces the old hot reload rules with new proactive Flutter hot reload rules in rules/flutter-app-runtime.md and rules/flutter-app-runtime.mdc. The feedback suggests retaining the trigger: glob field in the frontmatter of the new rule file, and points out that the referenced flutter-app-runtime skill needs to be defined in resources/flutter_skills.yaml to ensure it can be resolved properly.
| --- | ||
| 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" | ||
| --- |
There was a problem hiding this comment.
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.
| --- | |
| 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" | |
| --- |
| 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. |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
dart-lang/ai#498
Add proactive Flutter hot reload rules (flutter-app-runtime.md and flutter-app-runtime.mdc) to automate the hot reload and runtime error verification loop when editing Dart and Flutter files. Problem:
The sub-second Stateful Hot Reload cycle is the cornerstone of the Flutter development experience. However, during AI-driven workflows: