Use when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases
日本語の概要は準備中です。原文の説明を表示しています。
Use when building Flutter screens - compose small stateless widgets, keep layout declarative, decide layout by available width not device/orientation, separate presentation from business logic, and use the theme not hardcoded styles
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Flutter UI is a tree of widgets. The quality difference is in decomposition: small, focused, mostly-stateless widgets that read like the UI they render, with business logic pushed out of the widget tree.
Core principle: Widgets describe what the UI looks like given state. They do not fetch data, hold business rules, or talk to the network — that lives in state/services (see flutter-state-management).
StatelessWidget. Reach for StatefulWidget only for truly local, ephemeral UI state (an animation controller, a text field's focus). App/business state lives in your state management layer.build methods. A build longer than ~40 lines or nested 5+ deep is a set of extract-widget opportunities. Extract named widgets, not Widget _buildX() helper methods (named widgets get their own rebuild scope and are testable).const constructors everywhere possible — a const widget subtree is skipped on rebuild. This is the cheapest performance win in Flutter.Theme.of(context) / a design-token file (context.space, see mobile-design-system-foundation) — never scattered Color(0xFF...) and magic paddings. This is the Flutter equivalent of "no custom CSS."LayoutBuilder or MediaQuery.sizeOf(context) — never MediaQuery.of(context).size (that rebuilds on every metric change, not just size) and never a device-type/orientation check to pick a layout. See adaptive-layout and mobile-visual-self-review for the size matrix this must hold at.Color.withValues(alpha:), not the deprecated withOpacity (precision loss). TextScaler (MediaQuery.textScalerOf(context).scale(...)), not the deprecated textScaleFactor.// ❌ one giant build, hardcoded style, logic in the widget
Widget build(BuildContext context) {
return Container(padding: EdgeInsets.all(16), color: Color(0xFF2196F3),
child: Column(children: [ Text(task.title, style: TextStyle(fontSize: 18)), /* 60 more lines */ ]));
}
// ✅ composed from small const widgets, themed, logic elsewhere
class TaskCard extends StatelessWidget {
const TaskCard({super.key, required this.task});
final Task task;
@override
Widget build(BuildContext context) => Card(
child: Padding(
padding: EdgeInsets.all(context.space.md), // token, not a magic 16
child: Column(children: [
TaskTitle(title: task.title), // extracted, testable atom
TaskStatusChip(status: task.status), // extracted molecule
]),
),
);
}
Four errors that show up repeatedly and what they mean:
Column/ListView inside another unbounded-height ancestor (e.g. a Column inside a SingleChildScrollView with no Expanded/shrinkWrap). Give it a bound: Expanded, SizedBox, or shrinkWrap: true when genuinely short.InputDecorator ... unbounded width" — a TextField/TextFormField inside a Row with no Expanded/Flexible wrapping it.RenderFlex overflowed by N pixels" — the matrix-test failure mode (see mobile-visual-self-review); fix by deciding layout from available width, not by shrinking content to fit.ParentData widget" — a widget meant for one parent (Expanded, Positioned) used under the wrong parent type (not Flex/Stack). The fix is almost always removing a stray wrapper, not adding one.material_ui/cupertino_ui are now separate packages from the bundled Material/Cupertino libraries; don't run dart fix --apply --code=migrate_design_widgets or otherwise migrate a repo to them unless the task explicitly asks — follow what the repo already uses.
StatefulWidget holding data that came from an API — that's app state, lift it out.Widget _buildHeader() helper methods instead of real widget classes.const on static subtrees → needless rebuilds.MediaQuery.of(context).size or an orientation/device check instead of LayoutBuilder/MediaQuery.sizeOf.textScaleFactor/withOpacity instead of TextScaler/Color.withValues.build method you scroll to read.setState mutating something a service should own.Color(0xFF...) / magic paddings outside the theme file.Theme.of(context).platform or MediaQuery.orientationOf instead of width.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases
日本語の概要は準備中です。原文の説明を表示しています。
Use when the diff adds or changes an endpoint, resolver, RPC, job or query that takes an object id, a role check, a request binding or a tenant filter - BOLA/IDOR, function-level authorization, mass assignment and tenant scoping
日本語の概要は準備中です。原文の説明を表示しています。
Use on every UI change - semantic HTML, labels for controls, keyboard-navigable dialogs/menus, visible focus, and never color as the only signal
日本語の概要は準備中です。原文の説明を表示しています。
Use when a task changes any screen, form, dialog, menu or control - Lighthouse/axe scan of the changed screens, a keyboard walk, and the thresholds that fail a task
日本語の概要は準備中です。原文の説明を表示しています。
How to work a task returned with review, QA or UAT findings. Use when a task is in need_revision or PR review comments are in your context.
日本語の概要は準備中です。原文の説明を表示しています。
Use when deciding whether a request needs an analiz task before implementation - the conditions that require the architect's analysis versus going straight to implementation
日本語の概要は準備中です。原文の説明を表示しています。