Skip to content

Add flutter-app-runtime rule for proactive hot reload - #220

Open
jwren wants to merge 1 commit into
mainfrom
rule-flutter-app-runtime
Open

Add flutter-app-runtime rule for proactive hot reload#220
jwren wants to merge 1 commit into
mainfrom
rule-flutter-app-runtime

Conversation

@jwren

@jwren jwren commented Aug 17, 2026

Copy link
Copy Markdown
Member

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.

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.
@jwren jwren changed the title feat(rules): add flutter-app-runtime rule for proactive hot reload Add flutter-app-runtime rule for proactive hot reload Aug 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

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.

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.

Comment on lines +1 to +4
---
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"
---

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"
---

Comment on lines +8 to +11
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.

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.

Comment on lines +9 to +12
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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant