agentleFS
ArenukvernArenukvern/mcp_flutter/.cursor/rules/dart_doc.mdc

mcp_flutter / rules

Cursor rule385 starsChanged 5 months agoMITView on GitHub

Please add comprehensive Dart documentation comments to the specified classes, following these guidelines: `dart /// {@template progress_indicator} /// A widget that displays a customizable progress indicator. /// /// This class provides a flexible way to show loading progress in your app. /// It supports both determinate and indeterminate progress modes. /// /// Use [ProgressIndicator.circular] for a circular indicator, or /// [ProgressIndicator.linear] for a linear one. /// /// /// /// See also: /// /// * [CircularProgressIndicator], which shows progress along a…

The file

Show its rules and text

We split this dart_doc.mdc into the rules it gives an agent

14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always focus on WHY (key Design Decisions) it does what it does in concise manner.

    line 9
  2. Distinctive:

    Use /// for documentation comments.

    line 10
  3. Distinctive:

    Start with a brief, single-sentence summary of the class's purpose.

    line 11
  4. Distinctive:

    Follow with a more detailed description if necessary, keeping it concise.

    line 12
  5. Distinctive:

    Document all public members (methods, properties, etc.) with clear, concise explanations of their purpose and usage.

    line 14
  6. Distinctive:

    Use [bracketed] references for any mentioned identifiers within the class.

    line 15
  7. Distinctive:

    Use PREFER, AVOID, or CONSIDER for recommendations about usage patterns.

    line 18
  8. Distinctive:

    Add @deprecated tags with explanations for any deprecated members.

    line 19
  9. Distinctive:

    Place doc comments before metadata annotations.

    line 20
  10. Distinctive:

    Use prose to explain parameters, return values, and exceptions.

    line 21
  11. Distinctive:

    Document only the getter for properties with both a getter and setter.

    line 23
  12. Distinctive:

    Consider including a code sample in the class-level comment.

    line 24
  13. Distinctive:

    Keep 80-length characters per line.

    line 25
  14. Very specific:

    Ensure that the documentation is clear, concise, and provides valuable information for both human developers and AI tools.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
dart_doc.mdc
---
alwaysApply: false
---

<!-- description: when generating dartdoc or documentation for dart -->

Please add comprehensive Dart documentation comments to the specified classes, following these guidelines:

0. Always focus on WHY (key Design Decisions) it does what it does in concise manner.
1. Use /// for documentation comments.
2. Start with a brief, single-sentence summary of the class's purpose.
3. Follow with a more detailed description if necessary, keeping it concise.
4. Include an @ai annotation with specific instructions for AI tools on how to interpret and use this class.
5. Document all public members (methods, properties, etc.) with clear, concise explanations of their purpose and usage.
6. Use [bracketed] references for any mentioned identifiers within the class.
7. Include code examples where appropriate, using ```dart code fences.
8. Mention any important relationships with other classes or libraries.
9. Use PREFER, AVOID, or CONSIDER for recommendations about usage patterns.
10. Add @deprecated tags with explanations for any deprecated members.
11. Place doc comments before metadata annotations.
12. Use prose to explain parameters, return values, and exceptions.
13. For boolean properties, start comments with "Whether" followed by a description.
14. Document only the getter for properties with both a getter and setter.
15. Consider including a code sample in the class-level comment.
16. Keep 80-length characters per line.

Example format:

````dart
/// {@template progress_indicator}
/// A widget that displays a customizable progress indicator.
///
/// This class provides a flexible way to show loading progress in your app.
/// It supports both determinate and indeterminate progress modes.
///
/// Use [ProgressIndicator.circular] for a circular indicator, or
/// [ProgressIndicator.linear] for a linear one.
///
/// ```dart
/// ProgressIndicator(
///   value: 0.7,
///   backgroundColor: Colors.grey[300],
///   valueColor: AlwaysStoppedAnimation<Color>(Colors.blue),
/// )
/// ```
///
/// See also:
///
///  * [CircularProgressIndicator], which shows progress along a circular arc.
///  * [LinearProgressIndicator], which displays progress along a line.
///
/// @ai When generating code involving this class, ensure proper initialization
/// of [value] and consider the appropriate use of [backgroundColor] and [valueColor].
/// {@endtemplate}
class ProgressIndicator extends StatefulWidget {
  /// {@macro progress_indicator}
  ///
  /// Creates a progress indicator.
  ///
  /// The [value] argument should be null for an indeterminate progress indicator.
  /// For determinate progress indicators, [value] should be a non-null value
  /// between 0.0 and 1.0, inclusive.
  ///
  /// @ai Ensure [value] is within the valid range when provided.
  const ProgressIndicator({
    Key? key,
    this.value,
    this.backgroundColor,
    this.valueColor,
    this.semanticsLabel,
    this.semanticsValue,
  }) : super(key: key);

  /// The progress value between 0.0 and 1.0.
  ///
  /// If null, the progress indicator is indeterminate.
  ///
  /// @ai Use this property to control the progress. Ensure it's between 0.0 and 1.0.
  final double? value;

  /// The progress indicator's background color.
  ///
  /// @ai Consider using a contrasting color to [valueColor] for better visibility.
  final Color? backgroundColor;

  /// The progress indicator's color as an animated value.
  ///
  /// @ai Use [AlwaysStoppedAnimation] for a solid color, or custom animations for dynamic effects.
  final Animation<Color?>? valueColor;

  /// Creates a circular progress indicator.
  ///
  /// @ai Use this constructor for a circular representation of progress.
  const ProgressIndicator.circular({Key? key}) : this(key: key);

  /// Creates a linear progress indicator.
  ///
  /// @ai Use this constructor for a linear representation of progress.
  const ProgressIndicator.linear({Key? key}) : this(key: key);

  /// This method is deprecated and will be removed in the next major version.
  ///
  /// Use [newMethod] instead.
  @Deprecated('Use newMethod() instead')
  void oldMethod() {
    // ...
  }

  @override
  State<ProgressIndicator> createState() => _ProgressIndicatorState();
}
````

Please apply this documentation style to the following classes:

1. ClassA
2. ClassB
3. ClassC

Ensure that the documentation is clear, concise, and provides valuable information for both human developers and AI tools. Use `dart format` to format the code correctly.

References:
@Dart

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.