Loading...
Loading...
Enforces Effective-Dart casing (UpperCamelCase types, lowerCamelCase members/constants, lowercase_with_underscores files) plus architectural role suffixes so a name or grep reveals the layer — Screen/Notifier/Repository/Dao/Service/Gateway/Failure, file=primary-declaration, units-and-semantics in identifiers, booleans as is/has/can/should assertions, no get-prefix, no Hungarian, no SCREAMING_CAPS, grouped-and-sorted imports. Use when creating a file, naming a class/enum/mixin/extension/typedef/variable/function/getter/constant/parameter, organizing imports, choosing a role suffix, or reviewing a diff for naming and directive ordering.
npx skill4agent add zakariaf/flutter-skills naming-conventionsgrepUpperCamelCaseTaskScreenOrderStatusPredicate<T>lowerCamelCasedueDateloadTasks()itemCountlowerCamelCaseSCREAMING_CAPSconst maxItemsPerPage = 50;const MAX_ITEMS = 50constant_identifier_nameslowercase_with_underscorestask_detail_screen.dartfeatures/task_detail/import 'package:app_core/app_core.dart';TaskNotifiertask_notifier.dartutils.darthelpers.dartmodels.dartutils/common/helpers/misc/core/ResultFailureClockproject-structure-and-packagesJsonHttpUrlApiJsonOrderHttpClientfromJsonimageUrlJSONOrderHTTPClientIDUI__dartdoc-conventionsstrNameiCountlstItemsuserMapnameStringitemsListnameusersByIditemsmaxItemsPerPageretryDelaySecondsorderTotalMinorUnitsmaxdelaytotaloptqtyamtisLoadinghasErrorcanSubmitshouldRetryloadingerrorretryishascanshouldgetdueTasksgetDueTasks()loadTasks()scheduleReminder()itemCountnextDueDatedart:package:exportdart formatdirectives_orderinggrep| Role | Suffix / pattern | Layer | File → symbol |
|---|---|---|---|
| Screen / route target | | UI (View) | |
| Reusable widget | | UI | |
| ViewModel (Riverpod, default) | | UI (ViewModel) | |
| ViewModel (Provider appendix only) | | UI (ViewModel) | |
| Repository (interface) | | data | |
| Repository (impl) | | data | |
| Drift DAO | | data | |
| Capability interface you define | | boundary | |
| Service impl (per flavor) | | app adapter | |
| Wrapper over a specific plugin/SDK/native channel | | boundary | |
| Gateway impl | | app adapter | |
| Pure-Dart domain logic | | domain | |
| Immutable model | domain noun, no suffix | any | |
| Failure type | | any | |
NotifierViewModelChangeNotifierNotifierAsyncNotifierStreamNotifierScreen[Feature]Notifier[feature]_notifier.dart[Feature]ViewModel[feature]_view_model.dartChangeNotifier[Feature]Controllerstate-management-riverpodServiceGateway[Concern]ServiceShareServiceAnalyticsService[Concern]GatewayMethodChannelNotificationGatewayflutter_local_notificationsSecureStorageGatewayflutter_secure_storageFirebaseAnalyticsServiceFlnNotificationGatewayservice-boundary-and-nativeCalculatorValidatorFormatterParserDateTime.now()// A real wall-clock instant is legal only at the Clock boundary and named as one.
final DateTime capturedAt = clock.now(); // instant, from package:clock's Clock (never DateTime.now())
// A stored quantity carries its canonical unit in the name.
final int priceMinorUnits; // not `price` — unit is explicit
final int distanceMeters; // SI base unit, integer
// Unused callback params are `_` (and `__` for a second).
onChanged: (_) => notifier.refresh(),value-objects-money-and-unitsservice-boundary-and-nativeClockpackage:clockclockProviderClockService// task_list_notifier.dart — file name == primary declaration, snake_cased
import 'dart:async'; // dart: group, alphabetized
import 'package:flutter_riverpod/flutter_riverpod.dart'; // package: group, alphabetized
import 'task.dart'; // relative group, alphabetized
/// Frozen paging bound — unit lives in the name (rule 9).
const int maxItemsPerPage = 50; // lowerCamelCase const, not SCREAMING_CAPS
/// ViewModel for [TaskListScreen]. One Notifier per Screen, 1:1 (role suffix).
class TaskListNotifier extends AsyncNotifier<List<Task>> {
Future<List<Task>> build() => ref.watch(taskRepositoryProvider).loadTasks();
/// Verb-phrase command; routes through the repository's single write path.
Future<void> archive(String taskId) async {
await ref.read(taskRepositoryProvider).archive(taskId);
ref.invalidateSelf();
}
bool get hasTasks => state.valueOrNull?.isNotEmpty ?? false; // boolean assertion
int get taskCount => state.valueOrNull?.length ?? 0; // noun getter, no get- prefix
}SCREAMING_CAPSconst MAX_ITEMS = 50lowerCamelCaseTaskScreenhome.dartutils.dartmodels.dart…Calculator…Validator…ViewModel…VM…Controller…Notifier…ViewModelFlnNotificationGatewayFirebaseAnalyticsServiceGatewayServiceDateTime.now()ClockcapturedAtgetDueTasks()getsetuserMapnameStringitemsListstrNameiCountishascanshouldloadingvalidtotaldelay_lOIdatatempfoooptqtymsgdart formatdirectives_orderingUpperCamelCaselowerCamelCaselower_snake_caseScreenNotifierRepositoryDaoServiceGatewayFailure…Notifier…Controller…ViewModel…VMCalculatorValidatorFormatterServiceGatewayClockgetdart:package:dart formatdart analyze --fatal-infosdart3-idioms-and-coding-standardsstate-management-riverpodNotifierservice-boundary-and-nativeServicevalue-objects-money-and-unitsnamingdartdoc-conventions///lint-and-style-configdirectives_orderingconstant_identifier_namesflutter-architectureconstant_identifier_namescamel_case_typesfile_namesdirectives_orderingnon_constant_identifier_names