From 8b7ce11c4dbebf86d1ab4eb21ac0b96c650d2a61 Mon Sep 17 00:00:00 2001 From: Reid-Agent <269567208+reidbaker-agent@users.noreply.github.com> Date: Thu, 23 Jul 2026 11:20:35 -0400 Subject: [PATCH 01/13] docs: add changelog style reference to AGENTS.md --- AGENTS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index d24104b1435c..1a010c82736d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ This document provides guidance for AI agents to effectively contribute to the ` - **Format All Code**: Every code change must be formatted using the repository's tools. - **Pass All Tests**: All changes must pass linting, analysis, and relevant tests. -- **Update CHANGELOGs**: Any user-facing change or bug fix in a package requires an update to its `CHANGELOG.md` and `pubspec.yaml` version. +- **Update CHANGELOGs**: Any user-facing change or bug fix in a package requires an update to its `CHANGELOG.md` and `pubspec.yaml` version. Ensure you follow the [CHANGELOG style guide](https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style). - **Follow Conventions**: Adhere to the repository's specific conventions, such as federated plugin structure and code generation steps. ## Agent Environment Setup @@ -154,4 +154,4 @@ dart run $REPO_ROOT/script/tool/bin/flutter_plugin_tools.dart update-release-inf - When making public API changes, use `--version=minor` instead. - `--base-branch=origin/main`: Diffs against the `main` branch to find changed packages. -If you update manually, follow semantic versioning and the repository's CHANGELOG format. +If you update manually, follow semantic versioning and the [repository's CHANGELOG style](https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style). From 07db9dae9ace1d1b1069da093d1a661e7e189d1a Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 24 Jul 2026 16:00:33 -0400 Subject: [PATCH 02/13] Update agent evals for check-readiness and run-evals --- .../skills/check-readiness/evals/evals.json | 32 +++++ .../.agents/skills/run-evals | 1 + .../evals/cross_skill_rubric.json | 17 +++ .../evals/cross_skill_rubric_evals.json | 30 +++++ .../test_data/bad_code/tmp/bad_script.dart | 12 ++ .../test_data/ok_code/bin/good_script.dart | 12 ++ .../evals/test_data/simulate_failure.sh | 14 +++ .../evals/test_data/simulate_success.sh | 8 ++ .../test/skills_evals_test.dart | 116 ++++++++++++++++++ .../.agents/skills/run-evals/SKILL.md | 20 +++ .../.agents/skills/run-evals/evals/evals.json | 62 ++++++++++ .../run-evals/resources/agent_judge_prompt.md | 13 ++ .../resources/baseline_execution_prompt.md | 8 ++ .../resources/with_skill_execution_prompt.md | 9 ++ third_party/skill-repos/agent-plugins/LICENSE | 25 ++++ .../agent-plugins/skills-lock.json | 11 ++ 16 files changed, 390 insertions(+) create mode 100644 packages/camera/camera_android_camerax/.agents/skills/check-readiness/evals/evals.json create mode 120000 packages/camera/camera_android_camerax/.agents/skills/run-evals create mode 100644 packages/camera/camera_android_camerax/evals/cross_skill_rubric.json create mode 100644 packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json create mode 100644 packages/camera/camera_android_camerax/evals/test_data/bad_code/tmp/bad_script.dart create mode 100644 packages/camera/camera_android_camerax/evals/test_data/ok_code/bin/good_script.dart create mode 100644 packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh create mode 100644 packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh create mode 100644 packages/camera/camera_android_camerax/test/skills_evals_test.dart create mode 100644 third_party/skill-repos/agent-plugins/.agents/skills/run-evals/SKILL.md create mode 100644 third_party/skill-repos/agent-plugins/.agents/skills/run-evals/evals/evals.json create mode 100644 third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/agent_judge_prompt.md create mode 100644 third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/baseline_execution_prompt.md create mode 100644 third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/with_skill_execution_prompt.md create mode 100644 third_party/skill-repos/agent-plugins/LICENSE create mode 100644 third_party/skill-repos/agent-plugins/skills-lock.json diff --git a/packages/camera/camera_android_camerax/.agents/skills/check-readiness/evals/evals.json b/packages/camera/camera_android_camerax/.agents/skills/check-readiness/evals/evals.json new file mode 100644 index 000000000000..d9f2a7164e43 --- /dev/null +++ b/packages/camera/camera_android_camerax/.agents/skills/check-readiness/evals/evals.json @@ -0,0 +1,32 @@ +{ + "repo_criteria": [ + "evals/cross_skill_rubric.json" + ], + "evals": [ + { + "id": 1, + "prompt": "Simulate running the check-readiness skill. Assume the `tool/check.dart` script executed successfully. Based on the skill's 'Handling the Results' instructions, what should you say to the user?", + "expected_chat_output": [ + "The response explicitly states that the environment is clean.", + "The response explicitly states that dependencies are resolved.", + "The response explicitly states that it is ready for new work." + ], + "expected_repo_state": [ + "No files were modified in the repository." + ], + "agent_config": "reidbaker-agent" + }, + { + "id": 2, + "prompt": "Simulate running the check-readiness skill. Assume the `tool/check.dart` script failed with the output: 'Error: symlink at lib/foo is broken'. Based on the skill's 'Handling the Results' instructions, what should you say to the user?", + "expected_chat_output": [ + "The response explicitly explains that the check failed because a symlink at lib/foo is broken.", + "The response explicitly offers to help the user resolve the issue." + ], + "expected_repo_state": [ + "No files were modified in the repository." + ], + "agent_config": "reidbaker-agent" + } + ] +} diff --git a/packages/camera/camera_android_camerax/.agents/skills/run-evals b/packages/camera/camera_android_camerax/.agents/skills/run-evals new file mode 120000 index 000000000000..7008e7b8bfc9 --- /dev/null +++ b/packages/camera/camera_android_camerax/.agents/skills/run-evals @@ -0,0 +1 @@ +../../../../../third_party/skill-repos/agent-plugins/.agents/skills/run-evals \ No newline at end of file diff --git a/packages/camera/camera_android_camerax/evals/cross_skill_rubric.json b/packages/camera/camera_android_camerax/evals/cross_skill_rubric.json new file mode 100644 index 000000000000..706190128339 --- /dev/null +++ b/packages/camera/camera_android_camerax/evals/cross_skill_rubric.json @@ -0,0 +1,17 @@ +{ + "evals": [ + { + "id": "scope_limitation", + "expected_repo_state": [ + "All code modifications, additions, and deletions are strictly confined to the 'packages/camera/camera_android_camerax' package directory.", + "No changes are made to sibling plugins." + ] + }, + { + "id": "pigeon_generation", + "expected_repo_state": [ + "If the file 'pigeons/camerax_library.dart' is modified, the Pigeon code generator must be executed to regenerate the corresponding platform output files." + ] + } + ] +} \ No newline at end of file diff --git a/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json b/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json new file mode 100644 index 000000000000..e0ffabcf9f62 --- /dev/null +++ b/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json @@ -0,0 +1,30 @@ +{ + "repo_criteria": [ + "evals/cross_skill_rubric.json" + ], + "agent_config": "reidbaker-agent", + "evals": [ + { + "id": 1, + "prompt": "First, execute 'bash evals/test_data/simulate_failure.sh'. Then, evaluate the current repository's uncommitted changes using cross_skill_rubric.json. Output your findings into a markdown artifact file. DO NOT FIX OR COMMIT ANY OF THE ISSUES YOU FIND. ONLY EVALUATE THE STATE.", + "expected_chat_output": [ + "Any natural language output summarizing the completed work is acceptable." + ], + "expected_repo_state": [ + "The evaluation artifact explicitly flags a failure for scope limitation.", + "The evaluation artifact explicitly flags a failure for pigeon generation." + ], + "agent_config": "reidbaker-agent" + }, + { + "id": 2, + "prompt": "First, execute 'bash evals/test_data/simulate_success.sh'. Then, evaluate the current repository's uncommitted changes using cross_skill_rubric.json. Output your findings into a markdown artifact file. DO NOT FIX OR COMMIT ANY OF THE ISSUES YOU FIND. ONLY EVALUATE THE STATE.", + "expected_chat_output": [ + "Any natural language output summarizing the completed work is acceptable." + ], + "expected_repo_state": [ + "The evaluation artifact explicitly flags that all code quality criteria passed successfully without any failures." + ] + } + ] +} diff --git a/packages/camera/camera_android_camerax/evals/test_data/bad_code/tmp/bad_script.dart b/packages/camera/camera_android_camerax/evals/test_data/bad_code/tmp/bad_script.dart new file mode 100644 index 000000000000..c41e753c4ab7 --- /dev/null +++ b/packages/camera/camera_android_camerax/evals/test_data/bad_code/tmp/bad_script.dart @@ -0,0 +1,12 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// ignore_for_file: avoid_print, prefer_single_quotes +// BAD CODE EXAMPLE FOR META-EVAL +// +// I modified code in packages/camera/camera_android/ instead of camera_android_camerax. +// I also changed pigeons/camerax_library.dart but I did not run the pigeon generator. +void main() { + print("This script simulates an agent that violated both rules in the cross_skill_rubric."); +} diff --git a/packages/camera/camera_android_camerax/evals/test_data/ok_code/bin/good_script.dart b/packages/camera/camera_android_camerax/evals/test_data/ok_code/bin/good_script.dart new file mode 100644 index 000000000000..6108fea4d2d1 --- /dev/null +++ b/packages/camera/camera_android_camerax/evals/test_data/ok_code/bin/good_script.dart @@ -0,0 +1,12 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// ignore_for_file: avoid_print, prefer_single_quotes +// GOOD CODE EXAMPLE FOR META-EVAL +// +// I strictly confined all my code modifications to the packages/camera/camera_android_camerax directory. +// I did not modify pigeons/camerax_library.dart, so no regeneration was needed. +void main() { + print("This script simulates an agent that followed both rules in the cross_skill_rubric."); +} diff --git a/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh b/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh new file mode 100644 index 000000000000..5057e6bc4b31 --- /dev/null +++ b/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Simulates a failure of the cross_skill_rubric.json by modifying files incorrectly. + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PACKAGE_ROOT="$(cd "$SCRIPT_DIR/../../" && pwd)" + +# 1. Modify a sibling package (Violates scope_limitation) +# We append a comment to a file in the sibling directory. +# README.md is highly unlikely to be moved or deleted. +echo "" >> "$PACKAGE_ROOT/../camera_android/README.md" + +# 2. Modify pigeon file without running pigeon generator (Violates pigeon_generation) +# We append a comment to the pigeon file. +echo "// dummy eval modification" >> "$PACKAGE_ROOT/pigeons/camerax_library.dart" diff --git a/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh b/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh new file mode 100644 index 000000000000..40c67827e6d2 --- /dev/null +++ b/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Simulates a successful adherence to cross_skill_rubric.json + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PACKAGE_ROOT="$(cd "$SCRIPT_DIR/../../" && pwd)" + +# Modify a safe file inside the package. +echo "" >> "$PACKAGE_ROOT/README.md" diff --git a/packages/camera/camera_android_camerax/test/skills_evals_test.dart b/packages/camera/camera_android_camerax/test/skills_evals_test.dart new file mode 100644 index 000000000000..c885999b724e --- /dev/null +++ b/packages/camera/camera_android_camerax/test/skills_evals_test.dart @@ -0,0 +1,116 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:convert'; +import 'dart:io'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:path/path.dart' as p; + +void main() { + group('Evals structure consistency', () { + test('all evals.json files across skills share consistent expected keys', () { + final String packageRoot = Directory.current.path; + + final List evalsFiles = [ + ..._findEvalsFiles(Directory(p.join(packageRoot, '.agents', 'skills'))), + ..._findEvalsFiles(Directory(p.join(packageRoot, 'evals'))), + ]..sort((a, b) => a.path.compareTo(b.path)); + + expect( + evalsFiles, + isNotEmpty, + reason: 'Should find at least one evals.json file in .agents/skills or evals.', + ); + + _verifyStructuralConsistency(evalsFiles, 'evals'); + }); + + test('all rubric JSON files in evals/ share consistent structure and keys', () { + final String packageRoot = Directory.current.path; + + final rubricsDir = Directory(p.join(packageRoot, 'evals')); + if (!rubricsDir.existsSync()) { + return; + } + + final List rubricFiles = + rubricsDir + .listSync() + .whereType() + .where((File f) => f.path.endsWith('.json') && !f.path.endsWith('_evals.json')) + .toList() + ..sort((a, b) => a.path.compareTo(b.path)); + + if (rubricFiles.isEmpty) { + return; + } + + _verifyStructuralConsistency(rubricFiles, 'evals'); + }); + }); +} + +void _verifyStructuralConsistency(List files, String itemsKey) { + Set? expectedRootKeys; + String? expectedRootKeysFilePath; + Set? expectedItemKeys; + String? expectedItemFilePath; + + for (final file in files) { + final Object? decoded = jsonDecode(file.readAsStringSync()); + final Map decodedMap = switch (decoded) { + final Map map => map, + _ => fail('${file.path} must be a JSON map.'), + }; + final Set rootKeys = decodedMap.keys.toSet(); + if (expectedRootKeys == null) { + expectedRootKeys = rootKeys; + expectedRootKeysFilePath = file.path; + } else { + expect( + rootKeys, + equals(expectedRootKeys), + reason: + '${file.path} root keys do not match consistency pattern. ' + 'Expected keys to match the first processed file ($expectedRootKeysFilePath).', + ); + } + + final Object? itemsRaw = decodedMap[itemsKey]; + final List itemsList = switch (itemsRaw) { + final List list => list, + _ => fail('$itemsKey key in ${file.path} must be a List.'), + }; + for (final Object? item in itemsList) { + final Map itemMap = switch (item) { + final Map map => map, + _ => fail('Item in $itemsKey list in ${file.path} must be a JSON map.'), + }; + final Set itemKeys = itemMap.keys.toSet(); + if (expectedItemKeys == null) { + expectedItemKeys = itemKeys; + expectedItemFilePath = file.path; + } else { + expect( + itemKeys, + equals(expectedItemKeys), + reason: + 'Item in ${file.path} keys do not match consistency pattern. ' + 'Expected item keys to match the first processed file ($expectedItemFilePath).', + ); + } + } + } +} + +List _findEvalsFiles(Directory baseDir) { + if (!baseDir.existsSync()) { + return []; + } + return baseDir.listSync(recursive: true).whereType().where((File f) { + final String name = p.basename(f.path); + return name == 'evals.json' || name.endsWith('_evals.json'); + }).toList(); +} diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/SKILL.md b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/SKILL.md new file mode 100644 index 000000000000..776354f9c220 --- /dev/null +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/SKILL.md @@ -0,0 +1,20 @@ +--- +name: run-evals +description: Run evaluations for one, multiple, or all skills using the agent orchestration framework. Make sure to use this skill whenever the user asks to run evals, test a skill's performance, run benchmarks, or compare baseline versus with-skill execution. +metadata: + internal: true +--- + +# Run Skill Evals + +1. **Read Framework**: Read `tool/dart_skills_lint/evals/README.md` for understanding the difference between per-skill evals and cross-skill evals. +2. **Locate Targets**: Find target `evals/evals.json` files inside `.agents/skills/` and/or `skills/`. For cross-skill evaluations, look for `*_evals.json` files directly in `tool/dart_skills_lint/evals/`. +3. **Determine Agent Configuration**: Check the `agent_config` field in the target target JSON file to determine the environment/harness to spawn. If `agent_config` is `"bare-agent"`, spawn a subagent with the `bare-agent` profile. If it is a specific contributor profile (e.g. `"reidbaker-agent"`), use that profile to provide the necessary contributor context. +4. **Orchestrate**: By default, run an Integration Test by spawning a single **With-Skill** subagent using `Workspace: branch` and the identified `agent_config`. + - Provide the task prompt. See `resources/with_skill_execution_prompt.md` for the template. When filling in ``, you MUST use a relative path from the repository root, not an absolute path. If you are running a cross-skill evaluation, fill in `` with `"none (cross-skill meta-eval)"`. + - **Only if the user explicitly requests a comparison or benchmark**, also spawn a **Baseline** subagent. See `resources/baseline_execution_prompt.md` for the template. + Instruct the subagent(s) to return their `git diff` and verification outputs (`dart format`, `dart analyze`, `dart test`) without committing. + **CRITICAL**: You must explicitly warn the subagent(s) to confine all file edits strictly to their current working directory and avoid using absolute paths to modify the parent workspace. + **WORKSPACE LIMITATION WARNING**: If the user has multiple active workspaces mounted, the `Workspace: branch` feature will fail. In this situation, you MUST warn the user that running concurrent evaluations in `Workspace: inherit` mode will cause git state bleed and cross-eval pollution (e.g., changes made by a failure scenario will be visible to a success scenario running simultaneously in the same shared directory). Instruct the user to fix this by closing all workspaces except the primary package workspace, and then re-run the evaluations. Do NOT silently fallback to `Workspace: inherit` for concurrent tasks. +5. **Grade**: Parse the combined rubric (resolving `repo_criteria` + `evals.json` expectations). Use the grading instructions in `resources/agent_judge_prompt.md`. When an expectation fails, you MUST explicitly list both the expectation and what was actually found that caused the failure. +6. **Artifact**: Grade the outputs and generate a Markdown artifact (e.g., `_eval_results.md`) containing the metadata, pass/fail rationale, and raw diffs/stdout. diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/evals/evals.json b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/evals/evals.json new file mode 100644 index 000000000000..498e12b34c48 --- /dev/null +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/evals/evals.json @@ -0,0 +1,62 @@ +{ + "repo_criteria": [ + "evals/code_quality_rubric.json" + ], + "evals": [ + { + "id": 1, + "prompt": "Run the evals for the definition-of-done skill.", + "expected_chat_output": [ + "Any natural language output summarizing the completed work is acceptable." + ], + "expected_repo_state": [ + "The agent successfully triggered subagents to run the test cases.", + "There is an artifact with the results.", + "No files are modified in the parent workspace after the eval is done running (all modifications must be confined to the isolated subagent worktree).", + "The evaluation artifact includes evals sourced from code_quality_rubric.json for a skill that produces code." + ], + "agent_config": "reidbaker-agent" + }, + { + "id": 2, + "prompt": "Can you test the definition-of-done skill and see if it passes its rubric?", + "expected_chat_output": [ + "Any natural language output summarizing the completed work is acceptable." + ], + "expected_repo_state": [ + "There is an artifact with the results.", + "No files are modified in the parent workspace after the eval is done running (all modifications must be confined to the isolated subagent worktree).", + "The evaluation artifact includes evals sourced from code_quality_rubric.json for a skill that produces code." + ], + "agent_config": "reidbaker-agent" + }, + { + "id": 3, + "prompt": "Run an A/B benchmark evaluation for the definition-of-done skill, comparing it explicitly against a baseline without the skill.", + "expected_chat_output": [ + "Any natural language output summarizing the completed work is acceptable." + ], + "expected_repo_state": [ + "The agent successfully triggered both baseline and with-skill subagents.", + "There is an artifact with the results.", + "The evaluation artifact contains explicit sections for both the 'With-Skill Agent' and the 'Baseline Agent'.", + "No files are modified in the parent workspace after the eval is done running (all modifications must be confined to the isolated subagent worktree)." + ], + "agent_config": "reidbaker-agent" + }, + { + "id": 4, + "prompt": "Please run the evals for the run-evals skill. Note: assume that there are currently 3 active workspaces mounted in our conversation environment.", + "expected_chat_output": [ + "The response explicitly warns the user that running concurrent evaluations in 'Workspace: inherit' mode will cause git state bleed and cross-eval pollution.", + "The response explicitly instructs the user to close all workspaces except the primary package workspace.", + "The response refuses to silently fallback to 'Workspace: inherit' for concurrent tasks." + ], + "expected_repo_state": [ + "No evaluation artifact is generated.", + "No subagents are spawned." + ], + "agent_config": "reidbaker-agent" + } + ] +} \ No newline at end of file diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/agent_judge_prompt.md b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/agent_judge_prompt.md new file mode 100644 index 000000000000..e5686225d49f --- /dev/null +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/agent_judge_prompt.md @@ -0,0 +1,13 @@ +You are an expert evaluator. Review the following execution outputs from an AI agent against the provided combined rubric. + +Execution Outputs: +- Git Diff: +- Command Stdout: + +Combined Rubric Expectations: + + +For every single expectation, explicitly state whether it PASSED or FAILED and provide a 1-sentence justification. +IMPORTANT: When an expectation fails, explicitly list the expectation and explain exactly what you found that caused the failure. + +Finally, provide an overall PASS/FAIL grade. diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/baseline_execution_prompt.md b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/baseline_execution_prompt.md new file mode 100644 index 000000000000..a9a4a98d0d16 --- /dev/null +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/baseline_execution_prompt.md @@ -0,0 +1,8 @@ +Execute this task: +- Task: +- Input files: + +WARNING: You are executing in an isolated branch workspace. Confine all file modifications strictly to your current working directory. Do NOT use absolute paths to modify files in the parent workspace. + +Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart format`, `dart analyze`, `dart test`). +NOTE: If your task is strictly to grade, review, or evaluate code, do NOT fix the issues you find. Leave the code exactly as it is, even if verification commands fail. Your job is only to report the evaluation results. diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/with_skill_execution_prompt.md b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/with_skill_execution_prompt.md new file mode 100644 index 000000000000..d9341be809ff --- /dev/null +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/with_skill_execution_prompt.md @@ -0,0 +1,9 @@ +Execute this task: +- Skill path: (Please read and STRICTLY FOLLOW the instructions in this skill file before finishing) +- Task: +- Input files: + +WARNING: You are executing in an isolated branch workspace. Confine all file modifications strictly to your current working directory. Do NOT use absolute paths to modify files in the parent workspace. + +Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart format`, `dart analyze`, `dart test`). +NOTE: If your task is strictly to grade, review, or evaluate code, do NOT fix the issues you find. Leave the code exactly as it is, even if verification commands fail. Your job is only to report the evaluation results. diff --git a/third_party/skill-repos/agent-plugins/LICENSE b/third_party/skill-repos/agent-plugins/LICENSE new file mode 100644 index 000000000000..29b709dac6c7 --- /dev/null +++ b/third_party/skill-repos/agent-plugins/LICENSE @@ -0,0 +1,25 @@ +Copyright 2013 The Flutter Authors + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third_party/skill-repos/agent-plugins/skills-lock.json b/third_party/skill-repos/agent-plugins/skills-lock.json new file mode 100644 index 000000000000..7dea2fabdba8 --- /dev/null +++ b/third_party/skill-repos/agent-plugins/skills-lock.json @@ -0,0 +1,11 @@ +{ + "version": 1, + "skills": { + "run-evals": { + "source": "flutter/agent-plugins", + "sourceType": "github", + "skillPath": "tool/dart_skills_lint/.agents/skills/run-evals/SKILL.md", + "computedHash": "3f74f0103642268792d279db773f737a8d38210dc0bd602ac76ff11be1333676" + } + } +} From 915d0144c7199f978ed2d1cfa7be8037c3cd484f Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 24 Jul 2026 16:05:50 -0400 Subject: [PATCH 03/13] Remove agent_config from root to fix test --- .../camera_android_camerax/evals/cross_skill_rubric_evals.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json b/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json index e0ffabcf9f62..fc15c6475d23 100644 --- a/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json +++ b/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json @@ -2,7 +2,6 @@ "repo_criteria": [ "evals/cross_skill_rubric.json" ], - "agent_config": "reidbaker-agent", "evals": [ { "id": 1, From 392af7e63abd8093893ff5b1fccfeddcef98f7ac Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 24 Jul 2026 16:06:10 -0400 Subject: [PATCH 04/13] Fix evals.json format --- .../camera_android_camerax/evals/cross_skill_rubric_evals.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json b/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json index fc15c6475d23..c34be2e1c81c 100644 --- a/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json +++ b/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json @@ -23,7 +23,8 @@ ], "expected_repo_state": [ "The evaluation artifact explicitly flags that all code quality criteria passed successfully without any failures." - ] + ], + "agent_config": "reidbaker-agent" } ] } From 4e5d9d57e3828405424e42eb056236bd51ce654c Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 24 Jul 2026 16:08:00 -0400 Subject: [PATCH 05/13] Add license blocks to bash scripts --- packages/camera/camera_android/README.md | 1 + .../evals/test_data/simulate_success.sh | 4 ++++ .../camera_android_camerax/pigeons/camerax_library.dart | 2 ++ 3 files changed, 7 insertions(+) diff --git a/packages/camera/camera_android/README.md b/packages/camera/camera_android/README.md index 36f1dd5c3c04..bc9af52b63c7 100644 --- a/packages/camera/camera_android/README.md +++ b/packages/camera/camera_android/README.md @@ -21,3 +21,4 @@ you will only see the first frame. [3]: https://pub.dev/packages/camera_android_camerax [4]: https://developer.android.com/media/camera/camera2 [5]: https://developer.android.com/reference/android/media/MediaRecorder + diff --git a/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh b/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh index 40c67827e6d2..839a79960069 100644 --- a/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh +++ b/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh @@ -1,4 +1,8 @@ #!/bin/bash +# Copyright 2013 The Flutter Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + # Simulates a successful adherence to cross_skill_rubric.json SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/packages/camera/camera_android_camerax/pigeons/camerax_library.dart b/packages/camera/camera_android_camerax/pigeons/camerax_library.dart index 47c64caa4b57..77e7cc3e5d84 100644 --- a/packages/camera/camera_android_camerax/pigeons/camerax_library.dart +++ b/packages/camera/camera_android_camerax/pigeons/camerax_library.dart @@ -1191,3 +1191,5 @@ abstract class DisplayOrientedMeteringPointFactory extends MeteringPointFactory /// CameraInfo. DisplayOrientedMeteringPointFactory(CameraInfo cameraInfo, double width, double height); } + +// dummy eval modification From b22323517a6bc4e6ec1bb8823ede41873aba3f1e Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 24 Jul 2026 16:17:34 -0400 Subject: [PATCH 06/13] Fix license in simulate_failure.sh --- .../evals/test_data/simulate_failure.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh b/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh index 5057e6bc4b31..c9b0d4dc0130 100644 --- a/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh +++ b/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh @@ -1,4 +1,8 @@ #!/bin/bash +# Copyright 2013 The Flutter Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + # Simulates a failure of the cross_skill_rubric.json by modifying files incorrectly. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" From f47ecb672be5d4f1fe1ee7f91d9f99f65135f99a Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 24 Jul 2026 16:25:33 -0400 Subject: [PATCH 07/13] Add rule enforcing relative paths for subagents --- packages/camera/camera_android_camerax/AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/camera/camera_android_camerax/AGENTS.md b/packages/camera/camera_android_camerax/AGENTS.md index 8d0be1efc5fd..084feab8b2b6 100644 --- a/packages/camera/camera_android_camerax/AGENTS.md +++ b/packages/camera/camera_android_camerax/AGENTS.md @@ -23,3 +23,4 @@ - Maintain high test coverage using [dart-add-unit-test](.agents/skills/dart-add-unit-test/SKILL.md) and [dart-collect-coverage](.agents/skills/dart-collect-coverage/SKILL.md). - Avoid duplicating constant strings; reuse existing ones from adjacent code. +- **CRITICAL**: When spawning subagents, NEVER provide absolute file paths in prompts. ALWAYS use relative paths. Passing absolute paths breaks `Workspace: branch` isolation and causes state bleed into the active workspace. From 35ad4685a45fb6ccf24bfdce6d9f3978b1a94a03 Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 24 Jul 2026 16:55:44 -0400 Subject: [PATCH 08/13] Update run-evals skill hash to match agent-plugins PR #195 --- third_party/skill-repos/agent-plugins/skills-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/skill-repos/agent-plugins/skills-lock.json b/third_party/skill-repos/agent-plugins/skills-lock.json index 7dea2fabdba8..c6eb4c93ea70 100644 --- a/third_party/skill-repos/agent-plugins/skills-lock.json +++ b/third_party/skill-repos/agent-plugins/skills-lock.json @@ -5,7 +5,7 @@ "source": "flutter/agent-plugins", "sourceType": "github", "skillPath": "tool/dart_skills_lint/.agents/skills/run-evals/SKILL.md", - "computedHash": "3f74f0103642268792d279db773f737a8d38210dc0bd602ac76ff11be1333676" + "computedHash": "5f7c3ac28377c4f2a467388ae099878b157d3c4a42c329f93b1e51b31629fe85" } } -} +} \ No newline at end of file From c8f0176a14b5d96b15eacc33f17363f51a44beab Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Fri, 24 Jul 2026 16:58:32 -0400 Subject: [PATCH 09/13] Address PR feedback: remove unused evals code and leaked files --- packages/camera/camera_android/README.md | 1 - .../skills/check-readiness/evals/evals.json | 15 +++++---------- .../evals/cross_skill_rubric.json | 7 +++++++ .../evals/cross_skill_rubric_evals.json | 3 ++- .../evals/test_data/bad_code/tmp/bad_script.dart | 12 ------------ .../evals/test_data/ok_code/bin/good_script.dart | 12 ------------ .../evals/test_data/simulate_failure.sh | 4 ++++ .../pigeons/camerax_library.dart | 2 -- .../skill-repos/agent-plugins/skills-lock.json | 4 ++-- 9 files changed, 20 insertions(+), 40 deletions(-) delete mode 100644 packages/camera/camera_android_camerax/evals/test_data/bad_code/tmp/bad_script.dart delete mode 100644 packages/camera/camera_android_camerax/evals/test_data/ok_code/bin/good_script.dart diff --git a/packages/camera/camera_android/README.md b/packages/camera/camera_android/README.md index bc9af52b63c7..36f1dd5c3c04 100644 --- a/packages/camera/camera_android/README.md +++ b/packages/camera/camera_android/README.md @@ -21,4 +21,3 @@ you will only see the first frame. [3]: https://pub.dev/packages/camera_android_camerax [4]: https://developer.android.com/media/camera/camera2 [5]: https://developer.android.com/reference/android/media/MediaRecorder - diff --git a/packages/camera/camera_android_camerax/.agents/skills/check-readiness/evals/evals.json b/packages/camera/camera_android_camerax/.agents/skills/check-readiness/evals/evals.json index d9f2a7164e43..beb8846482bc 100644 --- a/packages/camera/camera_android_camerax/.agents/skills/check-readiness/evals/evals.json +++ b/packages/camera/camera_android_camerax/.agents/skills/check-readiness/evals/evals.json @@ -1,15 +1,11 @@ { - "repo_criteria": [ - "evals/cross_skill_rubric.json" - ], + "repo_criteria": [], "evals": [ { "id": 1, - "prompt": "Simulate running the check-readiness skill. Assume the `tool/check.dart` script executed successfully. Based on the skill's 'Handling the Results' instructions, what should you say to the user?", + "prompt": "Run the check-readiness skill.", "expected_chat_output": [ - "The response explicitly states that the environment is clean.", - "The response explicitly states that dependencies are resolved.", - "The response explicitly states that it is ready for new work." + "The agent ran the check.dart script." ], "expected_repo_state": [ "No files were modified in the repository." @@ -18,10 +14,9 @@ }, { "id": 2, - "prompt": "Simulate running the check-readiness skill. Assume the `tool/check.dart` script failed with the output: 'Error: symlink at lib/foo is broken'. Based on the skill's 'Handling the Results' instructions, what should you say to the user?", + "prompt": "Are we ready to start new work?", "expected_chat_output": [ - "The response explicitly explains that the check failed because a symlink at lib/foo is broken.", - "The response explicitly offers to help the user resolve the issue." + "The agent ran the check.dart script." ], "expected_repo_state": [ "No files were modified in the repository." diff --git a/packages/camera/camera_android_camerax/evals/cross_skill_rubric.json b/packages/camera/camera_android_camerax/evals/cross_skill_rubric.json index 706190128339..e5560011a63d 100644 --- a/packages/camera/camera_android_camerax/evals/cross_skill_rubric.json +++ b/packages/camera/camera_android_camerax/evals/cross_skill_rubric.json @@ -12,6 +12,13 @@ "expected_repo_state": [ "If the file 'pigeons/camerax_library.dart' is modified, the Pigeon code generator must be executed to regenerate the corresponding platform output files." ] + }, + { + "id": "lint_cheating", + "expected_repo_state": [ + "No lint configurations (e.g., analysis_options.yaml or its rules) are removed or disabled.", + "No file-level Dart ignores (e.g., // ignore_for_file:) are added to any Dart files." + ] } ] } \ No newline at end of file diff --git a/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json b/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json index c34be2e1c81c..bec6a1e54565 100644 --- a/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json +++ b/packages/camera/camera_android_camerax/evals/cross_skill_rubric_evals.json @@ -11,7 +11,8 @@ ], "expected_repo_state": [ "The evaluation artifact explicitly flags a failure for scope limitation.", - "The evaluation artifact explicitly flags a failure for pigeon generation." + "The evaluation artifact explicitly flags a failure for pigeon generation.", + "The evaluation artifact explicitly flags a failure for lint cheating." ], "agent_config": "reidbaker-agent" }, diff --git a/packages/camera/camera_android_camerax/evals/test_data/bad_code/tmp/bad_script.dart b/packages/camera/camera_android_camerax/evals/test_data/bad_code/tmp/bad_script.dart deleted file mode 100644 index c41e753c4ab7..000000000000 --- a/packages/camera/camera_android_camerax/evals/test_data/bad_code/tmp/bad_script.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// ignore_for_file: avoid_print, prefer_single_quotes -// BAD CODE EXAMPLE FOR META-EVAL -// -// I modified code in packages/camera/camera_android/ instead of camera_android_camerax. -// I also changed pigeons/camerax_library.dart but I did not run the pigeon generator. -void main() { - print("This script simulates an agent that violated both rules in the cross_skill_rubric."); -} diff --git a/packages/camera/camera_android_camerax/evals/test_data/ok_code/bin/good_script.dart b/packages/camera/camera_android_camerax/evals/test_data/ok_code/bin/good_script.dart deleted file mode 100644 index 6108fea4d2d1..000000000000 --- a/packages/camera/camera_android_camerax/evals/test_data/ok_code/bin/good_script.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// ignore_for_file: avoid_print, prefer_single_quotes -// GOOD CODE EXAMPLE FOR META-EVAL -// -// I strictly confined all my code modifications to the packages/camera/camera_android_camerax directory. -// I did not modify pigeons/camerax_library.dart, so no regeneration was needed. -void main() { - print("This script simulates an agent that followed both rules in the cross_skill_rubric."); -} diff --git a/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh b/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh index c9b0d4dc0130..ed07ee2ea0c4 100644 --- a/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh +++ b/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh @@ -16,3 +16,7 @@ echo "" >> "$PACKAGE_ROOT/../camera_android/READ # 2. Modify pigeon file without running pigeon generator (Violates pigeon_generation) # We append a comment to the pigeon file. echo "// dummy eval modification" >> "$PACKAGE_ROOT/pigeons/camerax_library.dart" + +# 3. Add file-level dart ignore & remove lint config (Violates lint_cheating) +echo "// ignore_for_file: unused_local_variable" >> "$PACKAGE_ROOT/lib/camera_android_camerax.dart" +rm -f "$PACKAGE_ROOT/analysis_options.yaml" diff --git a/packages/camera/camera_android_camerax/pigeons/camerax_library.dart b/packages/camera/camera_android_camerax/pigeons/camerax_library.dart index 77e7cc3e5d84..47c64caa4b57 100644 --- a/packages/camera/camera_android_camerax/pigeons/camerax_library.dart +++ b/packages/camera/camera_android_camerax/pigeons/camerax_library.dart @@ -1191,5 +1191,3 @@ abstract class DisplayOrientedMeteringPointFactory extends MeteringPointFactory /// CameraInfo. DisplayOrientedMeteringPointFactory(CameraInfo cameraInfo, double width, double height); } - -// dummy eval modification diff --git a/third_party/skill-repos/agent-plugins/skills-lock.json b/third_party/skill-repos/agent-plugins/skills-lock.json index c6eb4c93ea70..f537844058ea 100644 --- a/third_party/skill-repos/agent-plugins/skills-lock.json +++ b/third_party/skill-repos/agent-plugins/skills-lock.json @@ -5,7 +5,7 @@ "source": "flutter/agent-plugins", "sourceType": "github", "skillPath": "tool/dart_skills_lint/.agents/skills/run-evals/SKILL.md", - "computedHash": "5f7c3ac28377c4f2a467388ae099878b157d3c4a42c329f93b1e51b31629fe85" + "computedHash": "470700f3eda0775056acaf7d39bb5713bc4e2f5ab3c56f7c5d44d070f19ea79b" } } -} \ No newline at end of file +} From 2f67c2cfe691457ea4c4c1286efe8acd97628db7 Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Mon, 27 Jul 2026 13:56:19 -0400 Subject: [PATCH 10/13] Update run-evals skill to match agent-plugins PR #196 --- .../agent-plugins/.agents/skills/run-evals/SKILL.md | 8 ++++---- .../.agents/skills/run-evals/evals/evals.json | 1 - .../run-evals/resources/baseline_execution_prompt.md | 3 ++- .../run-evals/resources/with_skill_execution_prompt.md | 3 ++- third_party/skill-repos/agent-plugins/skills-lock.json | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/SKILL.md b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/SKILL.md index 776354f9c220..a7a180f4d79b 100644 --- a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/SKILL.md +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/SKILL.md @@ -7,13 +7,13 @@ metadata: # Run Skill Evals -1. **Read Framework**: Read `tool/dart_skills_lint/evals/README.md` for understanding the difference between per-skill evals and cross-skill evals. -2. **Locate Targets**: Find target `evals/evals.json` files inside `.agents/skills/` and/or `skills/`. For cross-skill evaluations, look for `*_evals.json` files directly in `tool/dart_skills_lint/evals/`. +1. **Read Framework**: Read `/evals/README.md` for understanding the difference between per-skill evals and cross-skill evals (where `` is the directory containing the `.agents` or `skills` folder). +2. **Locate Targets**: Find target `evals/evals.json` files inside `.agents/skills/` and/or `skills/`. For cross-skill evaluations, look for `*_evals.json` files directly in `/evals/`. 3. **Determine Agent Configuration**: Check the `agent_config` field in the target target JSON file to determine the environment/harness to spawn. If `agent_config` is `"bare-agent"`, spawn a subagent with the `bare-agent` profile. If it is a specific contributor profile (e.g. `"reidbaker-agent"`), use that profile to provide the necessary contributor context. 4. **Orchestrate**: By default, run an Integration Test by spawning a single **With-Skill** subagent using `Workspace: branch` and the identified `agent_config`. - - Provide the task prompt. See `resources/with_skill_execution_prompt.md` for the template. When filling in ``, you MUST use a relative path from the repository root, not an absolute path. If you are running a cross-skill evaluation, fill in `` with `"none (cross-skill meta-eval)"`. + - Provide the task prompt. See `resources/with_skill_execution_prompt.md` for the template. When filling in ``, you MUST use a relative path from the repository root, not an absolute path. If you are running a cross-skill evaluation, fill in `` with `"none (cross-skill meta-eval)"`. Also, replace `` with the actual directory path in both templates. - **Only if the user explicitly requests a comparison or benchmark**, also spawn a **Baseline** subagent. See `resources/baseline_execution_prompt.md` for the template. - Instruct the subagent(s) to return their `git diff` and verification outputs (`dart format`, `dart analyze`, `dart test`) without committing. + Instruct the subagent(s) to return their `git diff` and verification outputs (`dart pub get`, `dart format`, `dart analyze`, `dart test`) without committing. Ensure you instruct them to run these commands exclusively from within the `` directory to avoid analyzing unrelated packages. **CRITICAL**: You must explicitly warn the subagent(s) to confine all file edits strictly to their current working directory and avoid using absolute paths to modify the parent workspace. **WORKSPACE LIMITATION WARNING**: If the user has multiple active workspaces mounted, the `Workspace: branch` feature will fail. In this situation, you MUST warn the user that running concurrent evaluations in `Workspace: inherit` mode will cause git state bleed and cross-eval pollution (e.g., changes made by a failure scenario will be visible to a success scenario running simultaneously in the same shared directory). Instruct the user to fix this by closing all workspaces except the primary package workspace, and then re-run the evaluations. Do NOT silently fallback to `Workspace: inherit` for concurrent tasks. 5. **Grade**: Parse the combined rubric (resolving `repo_criteria` + `evals.json` expectations). Use the grading instructions in `resources/agent_judge_prompt.md`. When an expectation fails, you MUST explicitly list both the expectation and what was actually found that caused the failure. diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/evals/evals.json b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/evals/evals.json index 498e12b34c48..0e83e89d6dc1 100644 --- a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/evals/evals.json +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/evals/evals.json @@ -1,6 +1,5 @@ { "repo_criteria": [ - "evals/code_quality_rubric.json" ], "evals": [ { diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/baseline_execution_prompt.md b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/baseline_execution_prompt.md index a9a4a98d0d16..8e65b34bad32 100644 --- a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/baseline_execution_prompt.md +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/baseline_execution_prompt.md @@ -4,5 +4,6 @@ Execute this task: WARNING: You are executing in an isolated branch workspace. Confine all file modifications strictly to your current working directory. Do NOT use absolute paths to modify files in the parent workspace. -Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart format`, `dart analyze`, `dart test`). +Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart pub get`, `dart format`, `dart analyze`, `dart test`). +CRITICAL: You must explicitly `cd` into the `` directory before running any verification commands to avoid analyzing unrelated packages in the workspace! NOTE: If your task is strictly to grade, review, or evaluate code, do NOT fix the issues you find. Leave the code exactly as it is, even if verification commands fail. Your job is only to report the evaluation results. diff --git a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/with_skill_execution_prompt.md b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/with_skill_execution_prompt.md index d9341be809ff..8a8b54643b23 100644 --- a/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/with_skill_execution_prompt.md +++ b/third_party/skill-repos/agent-plugins/.agents/skills/run-evals/resources/with_skill_execution_prompt.md @@ -5,5 +5,6 @@ Execute this task: WARNING: You are executing in an isolated branch workspace. Confine all file modifications strictly to your current working directory. Do NOT use absolute paths to modify files in the parent workspace. -Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart format`, `dart analyze`, `dart test`). +Once you are done, do not commit. Just send me a message with the `git diff` of your changes, and the output of running verification commands (e.g., `dart pub get`, `dart format`, `dart analyze`, `dart test`). +CRITICAL: You must explicitly `cd` into the `` directory before running any verification commands to avoid analyzing unrelated packages in the workspace! NOTE: If your task is strictly to grade, review, or evaluate code, do NOT fix the issues you find. Leave the code exactly as it is, even if verification commands fail. Your job is only to report the evaluation results. diff --git a/third_party/skill-repos/agent-plugins/skills-lock.json b/third_party/skill-repos/agent-plugins/skills-lock.json index f537844058ea..d177c4ee3940 100644 --- a/third_party/skill-repos/agent-plugins/skills-lock.json +++ b/third_party/skill-repos/agent-plugins/skills-lock.json @@ -5,7 +5,7 @@ "source": "flutter/agent-plugins", "sourceType": "github", "skillPath": "tool/dart_skills_lint/.agents/skills/run-evals/SKILL.md", - "computedHash": "470700f3eda0775056acaf7d39bb5713bc4e2f5ab3c56f7c5d44d070f19ea79b" + "computedHash": "4d471f91a771be1bb49a90a8545f46d04ca01adada8fe08f1c5c64193a4fa6c5" } } } From 26657f36624c5def708b8de98cd29833ffacd8d5 Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Tue, 28 Jul 2026 10:00:55 -0400 Subject: [PATCH 11/13] Update CHANGELOG and version for agent evals --- packages/camera/camera_android_camerax/CHANGELOG.md | 4 ++++ packages/camera/camera_android_camerax/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/camera/camera_android_camerax/CHANGELOG.md b/packages/camera/camera_android_camerax/CHANGELOG.md index 4fdc3f410008..d043f88d183a 100644 --- a/packages/camera/camera_android_camerax/CHANGELOG.md +++ b/packages/camera/camera_android_camerax/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.4+3 + +* Adds agent evaluation scripts and skills. + ## 0.7.4+2 * Bumps cameraxVersion from 1.6.0 to 1.6.1. diff --git a/packages/camera/camera_android_camerax/pubspec.yaml b/packages/camera/camera_android_camerax/pubspec.yaml index d881582c0968..185f799743a8 100644 --- a/packages/camera/camera_android_camerax/pubspec.yaml +++ b/packages/camera/camera_android_camerax/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_android_camerax description: Android implementation of the camera plugin using the CameraX library. repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.7.4+2 +version: 0.7.4+3 environment: From 92ce7a765c635fd36b733b5c2c830026ae121f25 Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Tue, 28 Jul 2026 10:02:08 -0400 Subject: [PATCH 12/13] Add execute permissions to test scripts --- .../camera_android_camerax/evals/test_data/simulate_failure.sh | 0 .../camera_android_camerax/evals/test_data/simulate_success.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh mode change 100644 => 100755 packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh diff --git a/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh b/packages/camera/camera_android_camerax/evals/test_data/simulate_failure.sh old mode 100644 new mode 100755 diff --git a/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh b/packages/camera/camera_android_camerax/evals/test_data/simulate_success.sh old mode 100644 new mode 100755 From d37aaf12f9e7da2a993bf0a1adf3aeaa1c3681ea Mon Sep 17 00:00:00 2001 From: Reid Baker Date: Tue, 28 Jul 2026 10:09:44 -0400 Subject: [PATCH 13/13] Revert "Update CHANGELOG and version for agent evals" This reverts commit 26657f36624c5def708b8de98cd29833ffacd8d5. --- packages/camera/camera_android_camerax/CHANGELOG.md | 4 ---- packages/camera/camera_android_camerax/pubspec.yaml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/camera/camera_android_camerax/CHANGELOG.md b/packages/camera/camera_android_camerax/CHANGELOG.md index d043f88d183a..4fdc3f410008 100644 --- a/packages/camera/camera_android_camerax/CHANGELOG.md +++ b/packages/camera/camera_android_camerax/CHANGELOG.md @@ -1,7 +1,3 @@ -## 0.7.4+3 - -* Adds agent evaluation scripts and skills. - ## 0.7.4+2 * Bumps cameraxVersion from 1.6.0 to 1.6.1. diff --git a/packages/camera/camera_android_camerax/pubspec.yaml b/packages/camera/camera_android_camerax/pubspec.yaml index 185f799743a8..d881582c0968 100644 --- a/packages/camera/camera_android_camerax/pubspec.yaml +++ b/packages/camera/camera_android_camerax/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_android_camerax description: Android implementation of the camera plugin using the CameraX library. repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.7.4+3 +version: 0.7.4+2 environment: