FlutterBench Methodology
Learn about Dart and Flutter's evaluation frameworks for measuring AI tooling reliability.
Overview
#FlutterBench is our evaluation framework designed to measure how AI coding agents perform within the Dart and Flutter ecosystem. The evaluation system consists of four core components:
| Component | Description |
|---|---|
| Dataset | Real-world development tasks derived from critical user journeys (CUJs). |
| Test matrix | Multidimensional testing framework across models, agents, tooling configurations, and SDK versions. |
| Scoring system | Unified grading approach evaluating functional outcomes, code quality, and developer experience, paired with diagnostic telemetry. |
| Harness | Containerized automation infrastructure that executes evaluations at scale. |
Dataset & tasks
#Task derivation
#Evaluation tasks derive directly from Flutter's canonical Critical User Journeys (CUJs), which are the core workflows that developers perform regularly. This approach ensures evaluations reflect real-world developer needs rather than synthetic puzzles.
Each CUJ represents a combination of:
- A Flutter developer persona (e.g., app developer, plugin developer, full-stack developer)
- A high-level goal
- The specific sequential steps required to achieve that goal
Note: We can't open-source the full evaluation tasks without contaminating the benchmark dataset, but we publish our canonical list of CUJs. With this list, along with the example task below, you can understand our evaluation philosophy for FlutterBench.
These CUJs are converted into Harbor tasks. Harbor is the framework used to run containerized evaluation tasks.
CUJs and Harbor tasks don't map cleanly one-to-one. Instead, the CUJ list serves as a guide to verify that core developer workflows are evaluated. In some cases, several CUJs combine into a single task, and vice-versa. Our most ambitious evaluations combine multiple Harbor tasks, and thus cover many CUJs.
Task specifications
#Task Structure
Directory layout, instructions, environments, and verification criteria.
Each task lives in its own directory and contains four elements:
| Element | Description |
|---|---|
| Instruction | A realistic prompt written the way developers talk to agents (typically 1–2 sentences, behavior-focused rather than prescriptive). |
| Target codebase & environment | A containerized Docker environment preseeded with a Dart or Flutter codebase, testing greenfield generation or existing codebases with bugs or debt. |
| Verification criteria |
Verification scripts (
tests/graders.dart
and
test.sh
) executing
package:eval_scoring
.
|
| Configuration & metadata |
The
task.toml
configuration defining associated CUJs, priority tiers, expected skills, and MCP tools.
|
Task Categories
Primary agent capabilities and workflows evaluated across benchmarks.
Tasks are categorized by the primary agent capability being evaluated:
| Category | Description |
|---|---|
| Greenfield generation | Creating new features or applications from scratch. |
| Hill climbing | Iterative debugging, test repair, and multi-turn problem-solving. |
| Refactoring | Restructuring existing code while maintaining functionality. |
| Migration | Upgrading deprecated APIs or transitioning between architectural patterns. |
| Integration | Adding platform-specific features, native plugins, or third-party packages. |
Task Tiers & Prioritization
Execution cadences and priority levels balancing coverage and speed.
To balance comprehensive coverage with evaluation speed, tasks are organized into execution tiers and priorities:
| Tier | Description |
|---|---|
| Tier 1 | Core benchmark tasks executed monthly across the complete evaluation matrix. |
| Tier 2 | Maturing tasks slated to graduate into Tier 1 once calibrated. |
| Tier 3 | Experimental tasks used for ad-hoc investigations and targeted questions. |
| Priority | Description |
|---|---|
| P0 | Critical production workflows and high-frequency productivity tasks |
| P1 | Core functionality and API consistency verification |
| P2 | Standard features and application maturity tasks |
| P3 | Edge cases and cosmetic polish |
Quality Assurance
Engineering audits and human reviewer calibration for dataset integrity.
Before a task graduates into the core benchmark suite, it undergoes an engineering audit. Human reviewers inspect initial trial runs and label results as:
| Audit label | Definition |
|---|---|
| True positive | Agent correctly passed the task. |
| True negative | Agent correctly failed the task. |
| False positive | Agent passed incorrectly due to overly lenient checks. |
| False negative | Agent failed incorrectly due to brittle or flaky tests. |
Interactive task anatomy
#Each task contains an instruction, a target codebase and environment, verification criteria, and metadata. Using the CUJ example above, a corresponding Harbor task looks like this:
The instruction is the task prompt provided to the agent. It mimics real-world workflows from developers, and is written in a way that real developers interact with agents.
Design principles:
Prompts state symptoms and expected outcomes without naming exact remedy widgets. Prompts require the agent to write regression tests, measuring both implementation skills and testing rigor.
We currently keep receiving `RenderFlex overflowed` errors both horizontally and vertically. Implement the correct widgets to resolve these layout issues.
Write widget tests in
`test/main_test.dart` that verifies the changes.
Evaluation test matrix
#4-Axis Evaluation Matrix
Select an evaluation axis to explore its configurations, supported targets, and methodology.
Axis 1: Tooling Configurations
3 SetupsFlutterBench tests three configurations to isolate the impact of specialized Dart and Flutter AI tools (skills, MCP tools, compiler diagnostics, and sandboxes).
- Baseline: No specialized Dart or Flutter tools loaded — tests raw model capability and baseline reasoning.
- Enhanced: Full suite of Dart and Flutter skills, MCP server tools, and compiler diagnostics loaded.
- Enhanced Minus N: Full suite with a specific tool or skill group ablated to measure its isolated delta.
Axis 2: Frontier Model Families
3 FamiliesEvaluations span major frontier model families across high-capability reasoning tiers and low-latency production tiers.
- Gemini: Evaluated across Gemini Pro (deep reasoning and complex architecture) and Gemini Flash (low-latency generation) tiers.
- Claude: Evaluated across Claude Opus (heavy multi-file refactoring) and Claude Sonnet (daily developer workflows).
- ChatGPT: Evaluated across the GPT-4o series and specialized reasoning checkpoints.
Axis 3: Agent Runtime Harnesses
2 HarnessesDifferent agents employ distinct system prompts, context management techniques, and tool-loading strategies. We evaluate the CLI agents Flutter developers use most.
- Antigravity CLI: Google's developer agent harness featuring optimized tool discovery, compact context budgets, and deep IDE integration.
- Claude Code: Anthropic's terminal-based agent harness with autonomous multi-turn problem-solving capabilities.
Axis 4: SDK Release Channels
2 ChannelsEvaluations run against both Flutter release channels to verify developer-ready reliability and detect framework regressions early.
- Stable: The current production SDK release — measures developer-ready reliability on the version used by most teams.
- Beta: Monthly beta releases — catches deprecation migrations, API evolutions, and analyzer changes before stable rollout.
Scoring architecture
#Scoring philosophy
#When evaluating AI coding agents, execution friction—such as tool failures, endless retries, and hallucinations—is often attributed entirely to model capability. However, AI coding systems follow a core equation:
- Primary focus: The quality and correctness of the final code artifact.
- First-class signal: Developer experience friction, tool accuracy, and recovery efficiency.
Three core evaluation dimensions
#Each evaluation produces three independent dimensions that compute the composite Result Score in Harbor's reward:
1. Outcome
Evaluates whether the generated code compiles, runs, and fulfills all functional UI and task requirements correctly.
2. Code Quality
Measures code maintainability, static analysis lints, architectural health, and idiomatic Dart 3 standards.
3. Developer Experience
Tracks agent execution friction, tool call accuracy, error recovery loops, and step efficiency.
Grader matrix
#FlutterBench deploys a mix of deterministic, LLM-as-a-judge, and heuristic graders across all three dimensions:
Grader Matrix
Explore deterministic, LLM-as-a-judge, and heuristic evaluation graders.
Build & Run
Binary pass/fail checking if code compiles and launches cleanly.
Unit & Widget Testing
Executes test suites and scores passing test ratio across affected code.
Visual Validation
Compares DevTools screenshot captures against visual UI expectations.
Task Heuristics
Task-specific checks verifying dependency additions, required config, and files.
Static Analysis
Runs dart analyze enforcing strict project lint rules.
Dart Code Metrics (DCM)
Detects dead code, widget complexity, undisposed controllers, and memory leaks.
Idiomatic Dart Review
Evaluates modern Dart 3 pattern compliance and adherence to Effective Dart.
Structural Validation
Verifies directory structure, naming conventions, and required file placement.
Tool Usage Analysis
Checks whether appropriate MCP tools and CLI utilities were called effectively.
Step & Token Economy
Measures trajectory length, token burn, and redundant execution steps.
Error Recovery
Rates how fluidly the agent adapts to compiler, analysis, and test errors.
Grader implementation tiers
#| Tier | Grader Type | Evaluation Role |
|---|---|---|
| Code-based | Compilers, test runners, `dart analyze`, DCM, structural checkers | Deterministic, unambiguous source of truth for syntax, compilation, and functional test assertions. |
| LLM judge (BINEVAL) | Frontier model rubric evaluation | Evaluates qualitative dimensions (visual UI, idiomatic review, trajectory, recovery) using binary yes/no questions. |
| Human audit | Flutter engineer manual review | Ground truth calibration, failure root-cause analysis, and conflict resolution. |
Diagnostic telemetry (excluded from Result Score)
#To avoid penalizing capability scores on complex tasks that naturally require more reasoning steps or tokens, FlutterBench tracks diagnostic telemetry separately from the Result Score:
| Metric | Measurement Target |
|---|---|
| Token usage | Tracks total input, cache, and output tokens consumed to measure efficiency deltas and verify token reductions from skill optimizations. |
| Expected tool calls | Compares actual tool invocations against expected tools. If an agent succeeds without using an expected tool, it is not penalized; this telemetry helps evaluate whether the tool is necessary for that user journey. |
Evaluation harness
#Reliability & triage
#Multi-run reliability metrics
#Single-run trials only sample luck. True agent trust requires measuring multi-trial stability across repeated runs:
Capability
The probability that an agent succeeds at least once across k attempts. Shows what the model can achieve under ideal sample runs.
Consistency
The probability that an agent succeeds every single time across all k attempts. Solves unreliability friction for real developer workflows.
Score interpretation & triage
#Click a score tier to view its grading criteria and actionable engineering triage steps:
Score Triage & Action Matrix
Select a score range to view its criteria and immediate engineering triage actions.
Score 1.00 — Perfect Success
Criteria & TriageCode compiles, runs, and passes all unit and widget tests. Zero analyzer or DCM warnings. Idiomatic Dart 3 and flawless DX.
- Telemetry check: Validate whether all expected tools were utilized.
- Skip optimization: If expected tools were skipped successfully, re-evaluate if the tool is redundant.
- Token burn review: If token consumption was high, optimize prompt context and create fast-path shortcut tools.
Score 0.75 – 0.99 — Minor Flaws
Criteria & TriageCode works and functional tests pass, but exhibits minor lint warnings, slightly unidiomatic patterns, or minor DX friction.
- Prompt tuning: Tune skill prompt instructions for better Dart 3 style enforcement.
- Schema refinement: Refine tool parameter schemas and validation logic to prevent minor parameter retry hiccups.
- Model collaboration: Collaborate with model team to polish code generation formatting.
Score 0.50 – 0.74 — Partial Success
Criteria & TriageCore requirements work but some widget or unit tests fail, lint warnings are significant, or the agent entered noticeable recovery loops.
- Assertion triage: Investigate specific test assertion failures.
- Context gap analysis: Analyze whether the agent lacked key framework or package context.
- Diagnostic feedback: Refine compiler diagnostic feedback to help the agent self-correct faster.
Score 0.25 – 0.49 — Poor Implementation
Criteria & TriageFails to compile, ignores constraints, or encountered severe developer experience breakdown during execution.
- Tool discoverability: If expected tools were ignored, fix tool discoverability, frontmatter, and prompt instructions.
- Tool output clarity: If tools were used but failed, improve helper tool output clarity and error messaging.
- Loop prevention: If token burn was high due to endless fix loops, improve compiler errors for single-step healing.
Score 0.00 — Total Failure
Criteria & TriageNo working code produced, severe runtime crash, or agent caught in an infinite loop.
- Human root-cause audit: Engineers inspect reasoning traces, plan adherence, and test harness logs.
- Behavior categorization: Identify premature surrender versus infinite loop traps.
- Constraint refinement: Update benchmark task prompt constraints and bounding parameters.
Human root-cause audits
#When an evaluation task receives a low Result Score, human expert reviewers inspect the diagnostic process data:
- Reasoning trace review: Inspect the agent's internal thoughts to identify where misunderstandings of Dart/Flutter APIs occurred.
- Plan adherence audit: Check whether the agent derailed due to ambiguous task prompts or missing context.
- Harness diagnostics: Audit error messages returned to the agent during failed compile/test steps to see why recovery failed.
Transparency & dataset integrity
#To prevent model training contamination, raw datasets and reference solutions cannot be open-sourced. However, the Flutter team maintains transparency by:
- Publishing the comprehensive evaluation methodology on this page.
- Sharing task prompts and Critical User Journey (CUJ) lists.
- Publishing regular blog posts with analysis and insights.
- Open-sourcing verification tooling that does not risk dataset compromise.
To run benchmark tasks locally using the Harbor evaluation runner:
# Run an individual trial with Harbor
harbor run \
--task dataset/flutter/manage-state-with-bloc \
--agent antigravity-sdk \
--model google/gemini-3.5-flash \
--mcp dart
This methodology will evolve as more data is gathered and analyzed. Expect updates and refinements in future blog posts and documentation.
For questions or to contribute new CUJ evaluation tasks, visit the Flutter repository on GitHub.