Skip to content

Genericize run-evals prompts and enforce lint cheating rubric - #196

Merged
reidbaker merged 3 commits into
flutter:mainfrom
reidbaker:feature/generic-run-evals-and-anti-cheating
Jul 27, 2026
Merged

Genericize run-evals prompts and enforce lint cheating rubric#196
reidbaker merged 3 commits into
flutter:mainfrom
reidbaker:feature/generic-run-evals-and-anti-cheating

Conversation

@reidbaker-agent

@reidbaker-agent reidbaker-agent commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This came up as part of feedback in flutter/packages#12285. My goal was to reduce the duplication of llm prompts to the minimum while still enabling evals to run in the package repo.

Like in dart skills lint there is no automated way to run these tests. They run as a skill inside whatever harness you are using. The evals authored here are all the internal version of agy running against gemini 3.1 pro.


Agent authored description

Addresses PR feedback to make run-evals generic and prevents lint cheating by subagents.

Evaluation Results

Code Quality Rubric Meta-Evals Results

Eval 1 (bad_script.dart): PASS

  • The evaluator successfully flagged the script for directory placement hygiene, effective Dart idioms, cross-platform compatibility, and lint cheating, correctly matching all expected failures in the rubric.

Eval 2 (good_script.dart): PASS

  • After resolving the missing dependency issue in the Workspace: branch environment by explicitly adding dart pub get to the eval execution prompts (commit b8202c9), the evaluator correctly recognized that all 5 code quality criteria (compilation_and_health, effective_dart_and_idioms, cross_platform_compatibility, directory_and_placement_hygiene, lint_cheating) passed successfully without any failures.

Skill Evaluator (run-evals Meta-Evals) Results

Overall Grade: PASS

  • All 4 test cases for the run-evals skill passed successfully. Independent subagents were spawned for each scenario. They accurately navigated the skill instructions (branching to evaluate the definition-of-done skill as instructed) and correctly aborted when warned about workspace limitations (Eval 4).

Code Review Findings

The code review subagent flagged that evals/README.md and *_evals.json are internal to tool/dart_skills_lint and shouldn't have been genericized. However, this feedback was dismissed because downstream packages like camera_android_camerax do maintain their own copies of these files when they adopt the run-evals skill infrastructure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the skill evaluation framework to support dynamic target package roots (<target-package-root>) and adds a new lint_cheating rubric rule to prevent subagents from bypassing lint configurations or adding file-level ignores. Feedback suggests extending the lint_cheating rule to also forbid line-level ignores, and clarifying that the <target-package-root> placeholder should be replaced in all prompt templates, including the baseline execution prompt.

Comment thread tool/dart_skills_lint/evals/code_quality_rubric.json
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 `<path-to-skill>`, you MUST use a relative path from the repository root, not an absolute path. If you are running a cross-skill evaluation, fill in `<path-to-skill>` with `"none (cross-skill meta-eval)"`.
- Provide the task prompt. See `resources/with_skill_execution_prompt.md` for the template. When filling in `<path-to-skill>`, you MUST use a relative path from the repository root, not an absolute path. If you are running a cross-skill evaluation, fill in `<path-to-skill>` with `"none (cross-skill meta-eval)"`. Also, replace `<target-package-root>` with the actual directory path.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The prompt template resources/baseline_execution_prompt.md also contains the <target-package-root> placeholder. It would be clearer to instruct the agent to replace this placeholder in any of the prompt templates used, rather than just mentioning with_skill_execution_prompt.md.

Comment thread tool/dart_skills_lint/.agents/skills/run-evals/SKILL.md Outdated
…s evals.json and clarify prompt template placeholder instructions
@reidbaker
reidbaker self-requested a review July 27, 2026 17:34
@@ -1,6 +1,5 @@
{
"repo_criteria": [
"evals/code_quality_rubric.json"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was this removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it because of the feedback from the code review bot on the upstream flutter/packages PR (#12285). The bot flagged that when downstream consumers (like camera_android_camerax) adopt the run-evals skill, they typically don't have the evals/code_quality_rubric.json file in their repository root, which causes the eval runner to crash with a file not found error.

Additionally, according to evals/README.md (## Cross-Cutting Rules), only "Skills that author or modify code MUST adhere to the universal code quality expectations". Since run-evals is an orchestrator skill that only spawns subagents and doesn't write Dart code itself, it seemed safe to remove it from this specific skill's criteria.

Should I put it back and find a different way to resolve the downstream missing file issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for now. My gut says that we will end up moving both the code_quality_rubric.json and its evals into the run-evals skill so the rubric can be shared with consumers.

@reidbaker
reidbaker merged commit 8aaa41d into flutter:main Jul 27, 2026
13 checks passed
@reidbaker
reidbaker deleted the feature/generic-run-evals-and-anti-cheating branch July 27, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants